Rerun autoconf.
[ira/wip.git] / source / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --with-fhs              Use FHS-compliant paths (default=no)"
17 ac_help="$ac_help
18   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
19 ac_help="$ac_help
20   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
21 ac_help="$ac_help
22   --with-piddir=DIR       Where to put pid files ($ac_default_prefix/var/locks)"
23 ac_help="$ac_help
24   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
25 ac_help="$ac_help
26   --with-configdir=DIR    Where to put configuration files (\$libdir)"
27 ac_help="$ac_help
28   --with-logfilebase=DIR  Where to put log files (\$(VARDIR))"
29 ac_help="$ac_help
30   --enable-debug          Turn on compiler debugging information (default=no)"
31 ac_help="$ac_help
32   --enable-developer      Turn on developer warnings and debugging (default=no)"
33 ac_help="$ac_help
34   --enable-krb5developer  Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)"
35 ac_help="$ac_help
36   --enable-dmalloc        Enable heap debugging [default=no]"
37 ac_help="$ac_help
38   --enable-cups           Turn on CUPS support (default=auto)"
39 ac_help="$ac_help
40   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
41 ac_help="$ac_help
42   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
43 ac_help="$ac_help
44   --with-smbwrapper       Include SMB wrapper support (default=no) "
45 ac_help="$ac_help
46   --with-afs              Include AFS clear-text auth support (default=no) "
47 ac_help="$ac_help
48   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
49 ac_help="$ac_help
50   --with-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-sam              Build new (experimental) SAM database (default=no)"
61 ac_help="$ac_help
62   --with-tdbsam           Include experimental TDB SAM support (default=no)"
63 ac_help="$ac_help
64   --with-nisplussam       Include NISPLUS SAM support (default=no)"
65 ac_help="$ac_help
66   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
67 ac_help="$ac_help
68   --with-syslog           Include experimental SYSLOG support (default=no)"
69 ac_help="$ac_help
70   --with-profiling-data   Include gathering source code profile information (default=no)"
71 ac_help="$ac_help
72   --with-quotas           Include experimental disk-quota support (default=no)"
73 ac_help="$ac_help
74   --with-utmp             Include experimental utmp accounting (default=no)"
75 ac_help="$ac_help
76   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
77 ac_help="$ac_help
78   --with-libsmbclient     Build the libsmbclient shared library (default=yes)"
79 ac_help="$ac_help
80   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
81 ac_help="$ac_help
82   --with-acl-support      Include ACL support (default=no)"
83 ac_help="$ac_help
84   --with-sendfile-support      Include sendfile 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 ac_help="$ac_help
90   --with-python=PYTHONNAME  build Python libraries"
91
92 # Initialize some variables set by options.
93 # The variables have the same names as the options, with
94 # dashes changed to underlines.
95 build=NONE
96 cache_file=./config.cache
97 exec_prefix=NONE
98 host=NONE
99 no_create=
100 nonopt=NONE
101 no_recursion=
102 prefix=NONE
103 program_prefix=NONE
104 program_suffix=NONE
105 program_transform_name=s,x,x,
106 silent=
107 site=
108 srcdir=
109 target=NONE
110 verbose=
111 x_includes=NONE
112 x_libraries=NONE
113 bindir='${exec_prefix}/bin'
114 sbindir='${exec_prefix}/sbin'
115 libexecdir='${exec_prefix}/libexec'
116 datadir='${prefix}/share'
117 sysconfdir='${prefix}/etc'
118 sharedstatedir='${prefix}/com'
119 localstatedir='${prefix}/var'
120 libdir='${exec_prefix}/lib'
121 includedir='${prefix}/include'
122 oldincludedir='/usr/include'
123 infodir='${prefix}/info'
124 mandir='${prefix}/man'
125
126 # Initialize some other variables.
127 subdirs=
128 MFLAGS= MAKEFLAGS=
129 SHELL=${CONFIG_SHELL-/bin/sh}
130 # Maximum number of lines to put in a shell here document.
131 ac_max_here_lines=12
132
133 ac_prev=
134 for ac_option
135 do
136
137   # If the previous option needs an argument, assign it.
138   if test -n "$ac_prev"; then
139     eval "$ac_prev=\$ac_option"
140     ac_prev=
141     continue
142   fi
143
144   case "$ac_option" in
145   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
146   *) ac_optarg= ;;
147   esac
148
149   # Accept the important Cygnus configure options, so we can diagnose typos.
150
151   case "$ac_option" in
152
153   -bindir | --bindir | --bindi | --bind | --bin | --bi)
154     ac_prev=bindir ;;
155   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
156     bindir="$ac_optarg" ;;
157
158   -build | --build | --buil | --bui | --bu)
159     ac_prev=build ;;
160   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
161     build="$ac_optarg" ;;
162
163   -cache-file | --cache-file | --cache-fil | --cache-fi \
164   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
165     ac_prev=cache_file ;;
166   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
167   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
168     cache_file="$ac_optarg" ;;
169
170   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
171     ac_prev=datadir ;;
172   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
173   | --da=*)
174     datadir="$ac_optarg" ;;
175
176   -disable-* | --disable-*)
177     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
178     # Reject names that are not valid shell variable names.
179     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
180       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
181     fi
182     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
183     eval "enable_${ac_feature}=no" ;;
184
185   -enable-* | --enable-*)
186     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
187     # Reject names that are not valid shell variable names.
188     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
189       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
190     fi
191     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
192     case "$ac_option" in
193       *=*) ;;
194       *) ac_optarg=yes ;;
195     esac
196     eval "enable_${ac_feature}='$ac_optarg'" ;;
197
198   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
199   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
200   | --exec | --exe | --ex)
201     ac_prev=exec_prefix ;;
202   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
203   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
204   | --exec=* | --exe=* | --ex=*)
205     exec_prefix="$ac_optarg" ;;
206
207   -gas | --gas | --ga | --g)
208     # Obsolete; use --with-gas.
209     with_gas=yes ;;
210
211   -help | --help | --hel | --he)
212     # Omit some internal or obsolete options to make the list less imposing.
213     # This message is too long to be a string in the A/UX 3.1 sh.
214     cat << EOF
215 Usage: configure [options] [host]
216 Options: [defaults in brackets after descriptions]
217 Configuration:
218   --cache-file=FILE       cache test results in FILE
219   --help                  print this message
220   --no-create             do not create output files
221   --quiet, --silent       do not print \`checking...' messages
222   --version               print the version of autoconf that created configure
223 Directory and file names:
224   --prefix=PREFIX         install architecture-independent files in PREFIX
225                           [$ac_default_prefix]
226   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
227                           [same as prefix]
228   --bindir=DIR            user executables in DIR [EPREFIX/bin]
229   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
230   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
231   --datadir=DIR           read-only architecture-independent data in DIR
232                           [PREFIX/share]
233   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
234   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
235                           [PREFIX/com]
236   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
237   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
238   --includedir=DIR        C header files in DIR [PREFIX/include]
239   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
240   --infodir=DIR           info documentation in DIR [PREFIX/info]
241   --mandir=DIR            man documentation in DIR [PREFIX/man]
242   --srcdir=DIR            find the sources in DIR [configure dir or ..]
243   --program-prefix=PREFIX prepend PREFIX to installed program names
244   --program-suffix=SUFFIX append SUFFIX to installed program names
245   --program-transform-name=PROGRAM
246                           run sed PROGRAM on installed program names
247 EOF
248     cat << EOF
249 Host type:
250   --build=BUILD           configure for building on BUILD [BUILD=HOST]
251   --host=HOST             configure for HOST [guessed]
252   --target=TARGET         configure for TARGET [TARGET=HOST]
253 Features and packages:
254   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
255   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
256   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
257   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
258   --x-includes=DIR        X include files are in DIR
259   --x-libraries=DIR       X library files are in DIR
260 EOF
261     if test -n "$ac_help"; then
262       echo "--enable and --with options recognized:$ac_help"
263     fi
264     exit 0 ;;
265
266   -host | --host | --hos | --ho)
267     ac_prev=host ;;
268   -host=* | --host=* | --hos=* | --ho=*)
269     host="$ac_optarg" ;;
270
271   -includedir | --includedir | --includedi | --included | --include \
272   | --includ | --inclu | --incl | --inc)
273     ac_prev=includedir ;;
274   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
275   | --includ=* | --inclu=* | --incl=* | --inc=*)
276     includedir="$ac_optarg" ;;
277
278   -infodir | --infodir | --infodi | --infod | --info | --inf)
279     ac_prev=infodir ;;
280   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
281     infodir="$ac_optarg" ;;
282
283   -libdir | --libdir | --libdi | --libd)
284     ac_prev=libdir ;;
285   -libdir=* | --libdir=* | --libdi=* | --libd=*)
286     libdir="$ac_optarg" ;;
287
288   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
289   | --libexe | --libex | --libe)
290     ac_prev=libexecdir ;;
291   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
292   | --libexe=* | --libex=* | --libe=*)
293     libexecdir="$ac_optarg" ;;
294
295   -localstatedir | --localstatedir | --localstatedi | --localstated \
296   | --localstate | --localstat | --localsta | --localst \
297   | --locals | --local | --loca | --loc | --lo)
298     ac_prev=localstatedir ;;
299   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
300   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
301   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
302     localstatedir="$ac_optarg" ;;
303
304   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
305     ac_prev=mandir ;;
306   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
307     mandir="$ac_optarg" ;;
308
309   -nfp | --nfp | --nf)
310     # Obsolete; use --without-fp.
311     with_fp=no ;;
312
313   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
314   | --no-cr | --no-c)
315     no_create=yes ;;
316
317   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
318   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
319     no_recursion=yes ;;
320
321   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
322   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
323   | --oldin | --oldi | --old | --ol | --o)
324     ac_prev=oldincludedir ;;
325   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
326   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
327   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
328     oldincludedir="$ac_optarg" ;;
329
330   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
331     ac_prev=prefix ;;
332   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
333     prefix="$ac_optarg" ;;
334
335   -program-prefix | --program-prefix | --program-prefi | --program-pref \
336   | --program-pre | --program-pr | --program-p)
337     ac_prev=program_prefix ;;
338   -program-prefix=* | --program-prefix=* | --program-prefi=* \
339   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
340     program_prefix="$ac_optarg" ;;
341
342   -program-suffix | --program-suffix | --program-suffi | --program-suff \
343   | --program-suf | --program-su | --program-s)
344     ac_prev=program_suffix ;;
345   -program-suffix=* | --program-suffix=* | --program-suffi=* \
346   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
347     program_suffix="$ac_optarg" ;;
348
349   -program-transform-name | --program-transform-name \
350   | --program-transform-nam | --program-transform-na \
351   | --program-transform-n | --program-transform- \
352   | --program-transform | --program-transfor \
353   | --program-transfo | --program-transf \
354   | --program-trans | --program-tran \
355   | --progr-tra | --program-tr | --program-t)
356     ac_prev=program_transform_name ;;
357   -program-transform-name=* | --program-transform-name=* \
358   | --program-transform-nam=* | --program-transform-na=* \
359   | --program-transform-n=* | --program-transform-=* \
360   | --program-transform=* | --program-transfor=* \
361   | --program-transfo=* | --program-transf=* \
362   | --program-trans=* | --program-tran=* \
363   | --progr-tra=* | --program-tr=* | --program-t=*)
364     program_transform_name="$ac_optarg" ;;
365
366   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
367   | -silent | --silent | --silen | --sile | --sil)
368     silent=yes ;;
369
370   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
371     ac_prev=sbindir ;;
372   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
373   | --sbi=* | --sb=*)
374     sbindir="$ac_optarg" ;;
375
376   -sharedstatedir | --sharedstatedir | --sharedstatedi \
377   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
378   | --sharedst | --shareds | --shared | --share | --shar \
379   | --sha | --sh)
380     ac_prev=sharedstatedir ;;
381   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
382   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
383   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
384   | --sha=* | --sh=*)
385     sharedstatedir="$ac_optarg" ;;
386
387   -site | --site | --sit)
388     ac_prev=site ;;
389   -site=* | --site=* | --sit=*)
390     site="$ac_optarg" ;;
391
392   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
393     ac_prev=srcdir ;;
394   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
395     srcdir="$ac_optarg" ;;
396
397   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
398   | --syscon | --sysco | --sysc | --sys | --sy)
399     ac_prev=sysconfdir ;;
400   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
401   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
402     sysconfdir="$ac_optarg" ;;
403
404   -target | --target | --targe | --targ | --tar | --ta | --t)
405     ac_prev=target ;;
406   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
407     target="$ac_optarg" ;;
408
409   -v | -verbose | --verbose | --verbos | --verbo | --verb)
410     verbose=yes ;;
411
412   -version | --version | --versio | --versi | --vers)
413     echo "configure generated by autoconf version 2.13"
414     exit 0 ;;
415
416   -with-* | --with-*)
417     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
418     # Reject names that are not valid shell variable names.
419     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
420       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
421     fi
422     ac_package=`echo $ac_package| sed 's/-/_/g'`
423     case "$ac_option" in
424       *=*) ;;
425       *) ac_optarg=yes ;;
426     esac
427     eval "with_${ac_package}='$ac_optarg'" ;;
428
429   -without-* | --without-*)
430     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
431     # Reject names that are not valid shell variable names.
432     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
433       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
434     fi
435     ac_package=`echo $ac_package| sed 's/-/_/g'`
436     eval "with_${ac_package}=no" ;;
437
438   --x)
439     # Obsolete; use --with-x.
440     with_x=yes ;;
441
442   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
443   | --x-incl | --x-inc | --x-in | --x-i)
444     ac_prev=x_includes ;;
445   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
446   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
447     x_includes="$ac_optarg" ;;
448
449   -x-libraries | --x-libraries | --x-librarie | --x-librari \
450   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
451     ac_prev=x_libraries ;;
452   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
453   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
454     x_libraries="$ac_optarg" ;;
455
456   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
457     ;;
458
459   *)
460     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
461       echo "configure: warning: $ac_option: invalid host type" 1>&2
462     fi
463     if test "x$nonopt" != xNONE; then
464       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
465     fi
466     nonopt="$ac_option"
467     ;;
468
469   esac
470 done
471
472 if test -n "$ac_prev"; then
473   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
474 fi
475
476 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
477
478 # File descriptor usage:
479 # 0 standard input
480 # 1 file creation
481 # 2 errors and warnings
482 # 3 some systems may open it to /dev/tty
483 # 4 used on the Kubota Titan
484 # 6 checking for... messages and results
485 # 5 compiler messages saved in config.log
486 if test "$silent" = yes; then
487   exec 6>/dev/null
488 else
489   exec 6>&1
490 fi
491 exec 5>./config.log
492
493 echo "\
494 This file contains any messages produced by compilers while
495 running configure, to aid debugging if configure makes a mistake.
496 " 1>&5
497
498 # Strip out --no-create and --no-recursion so they do not pile up.
499 # Also quote any args containing shell metacharacters.
500 ac_configure_args=
501 for ac_arg
502 do
503   case "$ac_arg" in
504   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
505   | --no-cr | --no-c) ;;
506   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
507   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
508   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
509   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
510   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
511   esac
512 done
513
514 # NLS nuisances.
515 # Only set these to C if already set.  These must not be set unconditionally
516 # because not all systems understand e.g. LANG=C (notably SCO).
517 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
518 # Non-C LC_CTYPE values break the ctype check.
519 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
520 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
521 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
522 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
523
524 # confdefs.h avoids OS command line length limits that DEFS can exceed.
525 rm -rf conftest* confdefs.h
526 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
527 echo > confdefs.h
528
529 # A filename unique to this package, relative to the directory that
530 # configure is in, which we can look for to find out if srcdir is correct.
531 ac_unique_file=include/includes.h
532
533 # Find the source files, if location was not specified.
534 if test -z "$srcdir"; then
535   ac_srcdir_defaulted=yes
536   # Try the directory containing this script, then its parent.
537   ac_prog=$0
538   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
539   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
540   srcdir=$ac_confdir
541   if test ! -r $srcdir/$ac_unique_file; then
542     srcdir=..
543   fi
544 else
545   ac_srcdir_defaulted=no
546 fi
547 if test ! -r $srcdir/$ac_unique_file; then
548   if test "$ac_srcdir_defaulted" = yes; then
549     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
550   else
551     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
552   fi
553 fi
554 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
555
556 # Prefer explicitly selected file to automatically selected ones.
557 if test -z "$CONFIG_SITE"; then
558   if test "x$prefix" != xNONE; then
559     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
560   else
561     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
562   fi
563 fi
564 for ac_site_file in $CONFIG_SITE; do
565   if test -r "$ac_site_file"; then
566     echo "loading site script $ac_site_file"
567     . "$ac_site_file"
568   fi
569 done
570
571 if test -r "$cache_file"; then
572   echo "loading cache $cache_file"
573   . $cache_file
574 else
575   echo "creating cache $cache_file"
576   > $cache_file
577 fi
578
579 ac_ext=c
580 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
581 ac_cpp='$CPP $CPPFLAGS'
582 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
583 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
584 cross_compiling=$ac_cv_prog_cc_cross
585
586 ac_exeext=
587 ac_objext=o
588 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
589   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
590   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
591     ac_n= ac_c='
592 ' ac_t='        '
593   else
594     ac_n=-n ac_c= ac_t=
595   fi
596 else
597   ac_n= ac_c='\c' ac_t=
598 fi
599
600
601
602
603 #################################################
604 # Directory handling stuff to support both the
605 # legacy SAMBA directories and FHS compliant
606 # ones...
607
608
609 # Check whether --with-fhs or --without-fhs was given.
610 if test "${with_fhs+set}" = set; then
611   withval="$with_fhs"
612   configdir="${sysconfdir}/samba"
613     lockdir="\${VARDIR}/cache/samba"
614     piddir="\$(VARDIR)/run/samba"
615     logfilebase="\${VARDIR}/log/samba"
616     privatedir="\${CONFIGDIR}/private"
617     swatdir="\${DATADIR}/samba/swat"
618 else
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 log directory location
725 # Check whether --with-logfilebase or --without-logfilebase was given.
726 if test "${with_logfilebase+set}" = set; then
727   withval="$with_logfilebase"
728    case "$withval" in
729   yes|no)
730   #
731   # Just in case anybody does it
732   #
733     echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2
734   ;;
735   * )
736     logfilebase="$withval"
737     ;;
738   esac
739 fi
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770 # compile with optimization and without debugging by default
771 CFLAGS="-O ${CFLAGS}"
772
773 # Check whether --enable-debug or --disable-debug was given.
774 if test "${enable_debug+set}" = set; then
775   enableval="$enable_debug"
776   if eval "test x$enable_debug = xyes"; then
777         CFLAGS="${CFLAGS} -g"
778     fi
779 fi
780
781
782 # Check whether --enable-developer or --disable-developer was given.
783 if test "${enable_developer+set}" = set; then
784   enableval="$enable_developer"
785   if eval "test x$enable_developer = xyes"; then
786         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
787     fi
788 fi
789
790
791 # Check whether --enable-krb5developer or --disable-krb5developer was given.
792 if test "${enable_krb5developer+set}" = set; then
793   enableval="$enable_krb5developer"
794   if eval "test x$enable_krb5developer = xyes"; then
795         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
796     fi
797 fi
798
799
800 # Check whether --enable-dmalloc or --disable-dmalloc was given.
801 if test "${enable_dmalloc+set}" = set; then
802   enableval="$enable_dmalloc"
803   :
804 fi
805
806
807 if test "x$enable_dmalloc" = xyes
808 then
809         cat >> confdefs.h <<\EOF
810 #define ENABLE_DMALLOC 1
811 EOF
812
813         cat >> confdefs.h <<\EOF
814 #define DMALLOC_FUNC_CHECK 1
815 EOF
816
817         LIBS="$LIBS -ldmalloc"  
818 fi
819
820 # Extract the first word of "gcc", so it can be a program name with args.
821 set dummy gcc; ac_word=$2
822 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
823 echo "configure:824: checking for $ac_word" >&5
824 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
825   echo $ac_n "(cached) $ac_c" 1>&6
826 else
827   if test -n "$CC"; then
828   ac_cv_prog_CC="$CC" # Let the user override the test.
829 else
830   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
831   ac_dummy="$PATH"
832   for ac_dir in $ac_dummy; do
833     test -z "$ac_dir" && ac_dir=.
834     if test -f $ac_dir/$ac_word; then
835       ac_cv_prog_CC="gcc"
836       break
837     fi
838   done
839   IFS="$ac_save_ifs"
840 fi
841 fi
842 CC="$ac_cv_prog_CC"
843 if test -n "$CC"; then
844   echo "$ac_t""$CC" 1>&6
845 else
846   echo "$ac_t""no" 1>&6
847 fi
848
849 if test -z "$CC"; then
850   # Extract the first word of "cc", so it can be a program name with args.
851 set dummy cc; ac_word=$2
852 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
853 echo "configure:854: checking for $ac_word" >&5
854 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
855   echo $ac_n "(cached) $ac_c" 1>&6
856 else
857   if test -n "$CC"; then
858   ac_cv_prog_CC="$CC" # Let the user override the test.
859 else
860   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
861   ac_prog_rejected=no
862   ac_dummy="$PATH"
863   for ac_dir in $ac_dummy; do
864     test -z "$ac_dir" && ac_dir=.
865     if test -f $ac_dir/$ac_word; then
866       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
867         ac_prog_rejected=yes
868         continue
869       fi
870       ac_cv_prog_CC="cc"
871       break
872     fi
873   done
874   IFS="$ac_save_ifs"
875 if test $ac_prog_rejected = yes; then
876   # We found a bogon in the path, so make sure we never use it.
877   set dummy $ac_cv_prog_CC
878   shift
879   if test $# -gt 0; then
880     # We chose a different compiler from the bogus one.
881     # However, it has the same basename, so the bogon will be chosen
882     # first if we set CC to just the basename; use the full file name.
883     shift
884     set dummy "$ac_dir/$ac_word" "$@"
885     shift
886     ac_cv_prog_CC="$@"
887   fi
888 fi
889 fi
890 fi
891 CC="$ac_cv_prog_CC"
892 if test -n "$CC"; then
893   echo "$ac_t""$CC" 1>&6
894 else
895   echo "$ac_t""no" 1>&6
896 fi
897
898   if test -z "$CC"; then
899     case "`uname -s`" in
900     *win32* | *WIN32*)
901       # Extract the first word of "cl", so it can be a program name with args.
902 set dummy cl; ac_word=$2
903 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
904 echo "configure:905: checking for $ac_word" >&5
905 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
906   echo $ac_n "(cached) $ac_c" 1>&6
907 else
908   if test -n "$CC"; then
909   ac_cv_prog_CC="$CC" # Let the user override the test.
910 else
911   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
912   ac_dummy="$PATH"
913   for ac_dir in $ac_dummy; do
914     test -z "$ac_dir" && ac_dir=.
915     if test -f $ac_dir/$ac_word; then
916       ac_cv_prog_CC="cl"
917       break
918     fi
919   done
920   IFS="$ac_save_ifs"
921 fi
922 fi
923 CC="$ac_cv_prog_CC"
924 if test -n "$CC"; then
925   echo "$ac_t""$CC" 1>&6
926 else
927   echo "$ac_t""no" 1>&6
928 fi
929  ;;
930     esac
931   fi
932   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
933 fi
934
935 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
936 echo "configure:937: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
937
938 ac_ext=c
939 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
940 ac_cpp='$CPP $CPPFLAGS'
941 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
942 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
943 cross_compiling=$ac_cv_prog_cc_cross
944
945 cat > conftest.$ac_ext << EOF
946
947 #line 948 "configure"
948 #include "confdefs.h"
949
950 main(){return(0);}
951 EOF
952 if { (eval echo configure:953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
953   ac_cv_prog_cc_works=yes
954   # If we can't run a trivial program, we are probably using a cross compiler.
955   if (./conftest; exit) 2>/dev/null; then
956     ac_cv_prog_cc_cross=no
957   else
958     ac_cv_prog_cc_cross=yes
959   fi
960 else
961   echo "configure: failed program was:" >&5
962   cat conftest.$ac_ext >&5
963   ac_cv_prog_cc_works=no
964 fi
965 rm -fr conftest*
966 ac_ext=c
967 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
968 ac_cpp='$CPP $CPPFLAGS'
969 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
970 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
971 cross_compiling=$ac_cv_prog_cc_cross
972
973 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
974 if test $ac_cv_prog_cc_works = no; then
975   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
976 fi
977 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
978 echo "configure:979: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
979 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
980 cross_compiling=$ac_cv_prog_cc_cross
981
982 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
983 echo "configure:984: checking whether we are using GNU C" >&5
984 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
985   echo $ac_n "(cached) $ac_c" 1>&6
986 else
987   cat > conftest.c <<EOF
988 #ifdef __GNUC__
989   yes;
990 #endif
991 EOF
992 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
993   ac_cv_prog_gcc=yes
994 else
995   ac_cv_prog_gcc=no
996 fi
997 fi
998
999 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1000
1001 if test $ac_cv_prog_gcc = yes; then
1002   GCC=yes
1003 else
1004   GCC=
1005 fi
1006
1007 ac_test_CFLAGS="${CFLAGS+set}"
1008 ac_save_CFLAGS="$CFLAGS"
1009 CFLAGS=
1010 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1011 echo "configure:1012: checking whether ${CC-cc} accepts -g" >&5
1012 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1013   echo $ac_n "(cached) $ac_c" 1>&6
1014 else
1015   echo 'void f(){}' > conftest.c
1016 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1017   ac_cv_prog_cc_g=yes
1018 else
1019   ac_cv_prog_cc_g=no
1020 fi
1021 rm -f conftest*
1022
1023 fi
1024
1025 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1026 if test "$ac_test_CFLAGS" = set; then
1027   CFLAGS="$ac_save_CFLAGS"
1028 elif test $ac_cv_prog_cc_g = yes; then
1029   if test "$GCC" = yes; then
1030     CFLAGS="-g -O2"
1031   else
1032     CFLAGS="-g"
1033   fi
1034 else
1035   if test "$GCC" = yes; then
1036     CFLAGS="-O2"
1037   else
1038     CFLAGS=
1039   fi
1040 fi
1041
1042 ac_aux_dir=
1043 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1044   if test -f $ac_dir/install-sh; then
1045     ac_aux_dir=$ac_dir
1046     ac_install_sh="$ac_aux_dir/install-sh -c"
1047     break
1048   elif test -f $ac_dir/install.sh; then
1049     ac_aux_dir=$ac_dir
1050     ac_install_sh="$ac_aux_dir/install.sh -c"
1051     break
1052   fi
1053 done
1054 if test -z "$ac_aux_dir"; then
1055   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1056 fi
1057 ac_config_guess=$ac_aux_dir/config.guess
1058 ac_config_sub=$ac_aux_dir/config.sub
1059 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1060
1061 # Find a good install program.  We prefer a C program (faster),
1062 # so one script is as good as another.  But avoid the broken or
1063 # incompatible versions:
1064 # SysV /etc/install, /usr/sbin/install
1065 # SunOS /usr/etc/install
1066 # IRIX /sbin/install
1067 # AIX /bin/install
1068 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1069 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1070 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1071 # ./install, which can be erroneously created by make from ./install.sh.
1072 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1073 echo "configure:1074: checking for a BSD compatible install" >&5
1074 if test -z "$INSTALL"; then
1075 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1076   echo $ac_n "(cached) $ac_c" 1>&6
1077 else
1078     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1079   for ac_dir in $PATH; do
1080     # Account for people who put trailing slashes in PATH elements.
1081     case "$ac_dir/" in
1082     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1083     *)
1084       # OSF1 and SCO ODT 3.0 have their own names for install.
1085       # Don't use installbsd from OSF since it installs stuff as root
1086       # by default.
1087       for ac_prog in ginstall scoinst install; do
1088         if test -f $ac_dir/$ac_prog; then
1089           if test $ac_prog = install &&
1090             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1091             # AIX install.  It has an incompatible calling convention.
1092             :
1093           else
1094             ac_cv_path_install="$ac_dir/$ac_prog -c"
1095             break 2
1096           fi
1097         fi
1098       done
1099       ;;
1100     esac
1101   done
1102   IFS="$ac_save_IFS"
1103
1104 fi
1105   if test "${ac_cv_path_install+set}" = set; then
1106     INSTALL="$ac_cv_path_install"
1107   else
1108     # As a last resort, use the slow shell script.  We don't cache a
1109     # path for INSTALL within a source directory, because that will
1110     # break other packages using the cache if that directory is
1111     # removed, or if the path is relative.
1112     INSTALL="$ac_install_sh"
1113   fi
1114 fi
1115 echo "$ac_t""$INSTALL" 1>&6
1116
1117 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1118 # It thinks the first close brace ends the variable substitution.
1119 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1120
1121 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1122
1123 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1124
1125 for ac_prog in mawk gawk nawk awk
1126 do
1127 # Extract the first word of "$ac_prog", so it can be a program name with args.
1128 set dummy $ac_prog; ac_word=$2
1129 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1130 echo "configure:1131: checking for $ac_word" >&5
1131 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1132   echo $ac_n "(cached) $ac_c" 1>&6
1133 else
1134   if test -n "$AWK"; then
1135   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1136 else
1137   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1138   ac_dummy="$PATH"
1139   for ac_dir in $ac_dummy; do
1140     test -z "$ac_dir" && ac_dir=.
1141     if test -f $ac_dir/$ac_word; then
1142       ac_cv_prog_AWK="$ac_prog"
1143       break
1144     fi
1145   done
1146   IFS="$ac_save_ifs"
1147 fi
1148 fi
1149 AWK="$ac_cv_prog_AWK"
1150 if test -n "$AWK"; then
1151   echo "$ac_t""$AWK" 1>&6
1152 else
1153   echo "$ac_t""no" 1>&6
1154 fi
1155
1156 test -n "$AWK" && break
1157 done
1158
1159
1160 LD=ld
1161 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1162 echo "configure:1163: checking if the linker ($LD) is GNU ld" >&5
1163 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1164   echo $ac_n "(cached) $ac_c" 1>&6
1165 else
1166   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1167 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1168   ac_cv_prog_gnu_ld=yes
1169 else
1170   ac_cv_prog_gnu_ld=no
1171 fi
1172 fi
1173
1174 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1175
1176
1177 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1178 echo "configure:1179: checking for POSIXized ISC" >&5
1179 if test -d /etc/conf/kconfig.d &&
1180   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1181 then
1182   echo "$ac_t""yes" 1>&6
1183   ISC=yes # If later tests want to check for ISC.
1184   cat >> confdefs.h <<\EOF
1185 #define _POSIX_SOURCE 1
1186 EOF
1187
1188   if test "$GCC" = yes; then
1189     CC="$CC -posix"
1190   else
1191     CC="$CC -Xp"
1192   fi
1193 else
1194   echo "$ac_t""no" 1>&6
1195   ISC=
1196 fi
1197
1198
1199 if test "x$CC" != xcc; then
1200   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1201 echo "configure:1202: checking whether $CC and cc understand -c and -o together" >&5
1202 else
1203   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1204 echo "configure:1205: checking whether cc understands -c and -o together" >&5
1205 fi
1206 set dummy $CC; ac_cc="`echo $2 |
1207                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1208 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1209   echo $ac_n "(cached) $ac_c" 1>&6
1210 else
1211   echo 'foo(){}' > conftest.c
1212 # Make sure it works both with $CC and with simple cc.
1213 # We do the test twice because some compilers refuse to overwrite an
1214 # existing .o file with -o, though they will create one.
1215 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1216 if { (eval echo configure:1217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1217    test -f conftest.o && { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1218 then
1219   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1220   if test "x$CC" != xcc; then
1221     # Test first that cc exists at all.
1222     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1223       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1224       if { (eval echo configure:1225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1225          test -f conftest.o && { (eval echo configure:1226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1226       then
1227         # cc works too.
1228         :
1229       else
1230         # cc exists but doesn't like -o.
1231         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1232       fi
1233     fi
1234   fi
1235 else
1236   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1237 fi
1238 rm -f conftest*
1239
1240 fi
1241 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1242   echo "$ac_t""yes" 1>&6
1243 else
1244   echo "$ac_t""no" 1>&6
1245   cat >> confdefs.h <<\EOF
1246 #define NO_MINUS_C_MINUS_O 1
1247 EOF
1248
1249 fi
1250
1251 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1252       BROKEN_CC=
1253 else
1254       BROKEN_CC=#
1255 fi
1256
1257
1258 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1259 echo "configure:1260: checking that the C compiler understands volatile" >&5
1260 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1261   echo $ac_n "(cached) $ac_c" 1>&6
1262 else
1263   
1264     cat > conftest.$ac_ext <<EOF
1265 #line 1266 "configure"
1266 #include "confdefs.h"
1267 #include <sys/types.h>
1268 int main() {
1269 volatile int i = 0
1270 ; return 0; }
1271 EOF
1272 if { (eval echo configure:1273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1273   rm -rf conftest*
1274   samba_cv_volatile=yes
1275 else
1276   echo "configure: failed program was:" >&5
1277   cat conftest.$ac_ext >&5
1278   rm -rf conftest*
1279   samba_cv_volatile=no
1280 fi
1281 rm -f conftest*
1282 fi
1283
1284 echo "$ac_t""$samba_cv_volatile" 1>&6
1285 if test x"$samba_cv_volatile" = x"yes"; then
1286    cat >> confdefs.h <<\EOF
1287 #define HAVE_VOLATILE 1
1288 EOF
1289
1290 fi
1291
1292
1293
1294 # Do some error checking and defaulting for the host and target type.
1295 # The inputs are:
1296 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1297 #
1298 # The rules are:
1299 # 1. You are not allowed to specify --host, --target, and nonopt at the
1300 #    same time.
1301 # 2. Host defaults to nonopt.
1302 # 3. If nonopt is not specified, then host defaults to the current host,
1303 #    as determined by config.guess.
1304 # 4. Target and build default to nonopt.
1305 # 5. If nonopt is not specified, then target and build default to host.
1306
1307 # The aliases save the names the user supplied, while $host etc.
1308 # will get canonicalized.
1309 case $host---$target---$nonopt in
1310 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1311 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1312 esac
1313
1314
1315 # Make sure we can run config.sub.
1316 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1317 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1318 fi
1319
1320 echo $ac_n "checking host system type""... $ac_c" 1>&6
1321 echo "configure:1322: checking host system type" >&5
1322
1323 host_alias=$host
1324 case "$host_alias" in
1325 NONE)
1326   case $nonopt in
1327   NONE)
1328     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1329     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1330     fi ;;
1331   *) host_alias=$nonopt ;;
1332   esac ;;
1333 esac
1334
1335 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1336 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1337 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1338 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1339 echo "$ac_t""$host" 1>&6
1340
1341 echo $ac_n "checking target system type""... $ac_c" 1>&6
1342 echo "configure:1343: checking target system type" >&5
1343
1344 target_alias=$target
1345 case "$target_alias" in
1346 NONE)
1347   case $nonopt in
1348   NONE) target_alias=$host_alias ;;
1349   *) target_alias=$nonopt ;;
1350   esac ;;
1351 esac
1352
1353 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1354 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1355 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1356 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1357 echo "$ac_t""$target" 1>&6
1358
1359 echo $ac_n "checking build system type""... $ac_c" 1>&6
1360 echo "configure:1361: checking build system type" >&5
1361
1362 build_alias=$build
1363 case "$build_alias" in
1364 NONE)
1365   case $nonopt in
1366   NONE) build_alias=$host_alias ;;
1367   *) build_alias=$nonopt ;;
1368   esac ;;
1369 esac
1370
1371 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1372 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1373 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1374 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1375 echo "$ac_t""$build" 1>&6
1376
1377 test "$host_alias" != "$target_alias" &&
1378   test "$program_prefix$program_suffix$program_transform_name" = \
1379     NONENONEs,x,x, &&
1380   program_prefix=${target_alias}-
1381
1382
1383   case "$host_os" in
1384         *irix6*) cat >> confdefs.h <<\EOF
1385 #include <standards.h>
1386 EOF
1387
1388         ;;
1389 esac
1390
1391
1392     
1393     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1394 echo "configure:1395: checking config.cache system type" >&5
1395     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1396          test x"$ac_cv_host_system_type" != x"$host"; } ||
1397        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1398          test x"$ac_cv_build_system_type" != x"$build"; } ||
1399        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1400          test x"$ac_cv_target_system_type" != x"$target"; }; then
1401         echo "$ac_t""different" 1>&6
1402         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1403     else
1404         echo "$ac_t""same" 1>&6
1405     fi
1406     ac_cv_host_system_type="$host"
1407     ac_cv_build_system_type="$build"
1408     ac_cv_target_system_type="$target"
1409
1410
1411 DYNEXP=
1412
1413 #
1414 # Config CPPFLAG settings for strange OS's that must be set
1415 # before other tests.
1416 #
1417 case "$host_os" in
1418 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1419     *hpux*)
1420     
1421       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1422 echo "configure:1423: checking whether ${CC-cc} accepts -Ae" >&5
1423 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1424   echo $ac_n "(cached) $ac_c" 1>&6
1425 else
1426   echo 'void f(){}' > conftest.c
1427 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1428   ac_cv_prog_cc_Ae=yes
1429 else
1430   ac_cv_prog_cc_Ae=no
1431 fi
1432 rm -f conftest*
1433
1434 fi
1435
1436 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1437       # mmap on HPUX is completely broken...
1438       cat >> confdefs.h <<\EOF
1439 #define MMAP_BLACKLIST 1
1440 EOF
1441
1442       if test $ac_cv_prog_cc_Ae = yes; then
1443         CPPFLAGS="$CPPFLAGS -Ae"
1444       fi
1445 #
1446 # Defines needed for HPUX support.
1447 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1448 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1449 #
1450       case `uname -r` in
1451                         *9*|*10*)
1452                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1453                                 cat >> confdefs.h <<\EOF
1454 #define USE_BOTH_CRYPT_CALLS 1
1455 EOF
1456
1457                                 cat >> confdefs.h <<\EOF
1458 #define _HPUX_SOURCE 1
1459 EOF
1460
1461                                 cat >> confdefs.h <<\EOF
1462 #define _POSIX_SOURCE 1
1463 EOF
1464
1465                                 cat >> confdefs.h <<\EOF
1466 #define _ALIGNMENT_REQUIRED 1
1467 EOF
1468
1469                                 cat >> confdefs.h <<\EOF
1470 #define _MAX_ALIGNMENT 4
1471 EOF
1472
1473                                 ;;
1474                         *11*)
1475                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1476                                 cat >> confdefs.h <<\EOF
1477 #define USE_BOTH_CRYPT_CALLS 1
1478 EOF
1479
1480                                 cat >> confdefs.h <<\EOF
1481 #define _HPUX_SOURCE 1
1482 EOF
1483
1484                                 cat >> confdefs.h <<\EOF
1485 #define _POSIX_SOURCE 1
1486 EOF
1487
1488                                 cat >> confdefs.h <<\EOF
1489 #define _LARGEFILE64_SOURCE 1
1490 EOF
1491
1492                                 cat >> confdefs.h <<\EOF
1493 #define _ALIGNMENT_REQUIRED 1
1494 EOF
1495
1496                                 cat >> confdefs.h <<\EOF
1497 #define _MAX_ALIGNMENT 4
1498 EOF
1499
1500                                 ;;
1501       esac
1502       DYNEXP="-Wl,-E"
1503       ;;
1504
1505 #
1506 # CRAY Unicos has broken const handling
1507        *unicos*)
1508           echo "$ac_t""disabling const" 1>&6
1509           CPPFLAGS="$CPPFLAGS -Dconst="
1510           ;;
1511         
1512 #
1513 # AIX4.x doesn't even admit to having large
1514 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1515 #
1516     *aix4*)
1517           echo "$ac_t""enabling large file support" 1>&6
1518       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1519       cat >> confdefs.h <<\EOF
1520 #define _LARGE_FILES 1
1521 EOF
1522
1523       ;;    
1524 #
1525 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1526 # to the existance of large files..
1527 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1528 # recommendations on large file support, however it makes the
1529 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1530 # recommendation makes the compile fail on gcc2.7. JRA.
1531 #
1532         *solaris*)
1533                 case `uname -r` in
1534                         5.0*|5.1*|5.2*|5.3*|5.5*)
1535                                 echo "$ac_t""no large file support" 1>&6
1536                                 ;;
1537                         5.*)
1538                         echo "$ac_t""enabling large file support" 1>&6
1539                         if test "$ac_cv_prog_gcc" = yes; then
1540                                 ${CC-cc} -v >conftest.c 2>&1
1541                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1542                                 rm -fr conftest.c
1543                                 case "$ac_cv_gcc_compiler_version_number" in
1544                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1545                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1546                                                 cat >> confdefs.h <<\EOF
1547 #define _LARGEFILE64_SOURCE 1
1548 EOF
1549
1550                                                 ;;
1551                                         *)
1552                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1553                                                 cat >> confdefs.h <<\EOF
1554 #define _LARGEFILE64_SOURCE 1
1555 EOF
1556
1557                                                 cat >> confdefs.h <<\EOF
1558 #define _FILE_OFFSET_BITS 64
1559 EOF
1560
1561                                                 ;;
1562                                 esac
1563                         else
1564                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1565                                 cat >> confdefs.h <<\EOF
1566 #define _LARGEFILE64_SOURCE 1
1567 EOF
1568
1569                                 cat >> confdefs.h <<\EOF
1570 #define _FILE_OFFSET_BITS 64
1571 EOF
1572
1573                         fi
1574                         ;;
1575                 esac
1576                 ;;
1577 #
1578 # Tests needed for SINIX large file support.
1579 #
1580     *sysv4*)
1581       if test $host = mips-sni-sysv4 ; then
1582         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1583 echo "configure:1584: checking for LFS support" >&5
1584         old_CPPFLAGS="$CPPFLAGS"
1585         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1586         if test "$cross_compiling" = yes; then
1587   SINIX_LFS_SUPPORT=cross
1588 else
1589   cat > conftest.$ac_ext <<EOF
1590 #line 1591 "configure"
1591 #include "confdefs.h"
1592
1593 #include <unistd.h>
1594 main () {
1595 #if _LFS64_LARGEFILE == 1
1596 exit(0);
1597 #else
1598 exit(1);
1599 #endif
1600 }
1601 EOF
1602 if { (eval echo configure:1603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1603 then
1604   SINIX_LFS_SUPPORT=yes
1605 else
1606   echo "configure: failed program was:" >&5
1607   cat conftest.$ac_ext >&5
1608   rm -fr conftest*
1609   SINIX_LFS_SUPPORT=no
1610 fi
1611 rm -fr conftest*
1612 fi
1613
1614         CPPFLAGS="$old_CPPFLAGS"
1615         if test x$SINIX_LFS_SUPPORT = xyes ; then
1616           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1617           cat >> confdefs.h <<\EOF
1618 #define _LARGEFILE64_SOURCE 1
1619 EOF
1620
1621           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1622           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1623           LIBS="`getconf LFS64_LIBS` $LIBS"
1624         fi
1625       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1626       fi
1627     ;;
1628
1629 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1630 #
1631     *linux*)
1632         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1633 echo "configure:1634: checking for LFS support" >&5
1634         old_CPPFLAGS="$CPPFLAGS"
1635         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1636        if test "$cross_compiling" = yes; then
1637   LINUX_LFS_SUPPORT=cross
1638 else
1639   cat > conftest.$ac_ext <<EOF
1640 #line 1641 "configure"
1641 #include "confdefs.h"
1642
1643 #include <unistd.h>
1644 #include <sys/utsname.h>
1645 main() {
1646 #if _LFS64_LARGEFILE == 1
1647        struct utsname uts;
1648        char *release;
1649        int major, minor;
1650
1651        /* Ensure this is glibc 2.2 or higher */
1652 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1653        int libc_major = __GLIBC__;
1654        int libc_minor = __GLIBC_MINOR__;
1655
1656        if (libc_major < 2)
1657               exit(1);
1658        if (libc_minor < 2)
1659               exit(1);
1660 #endif
1661
1662        /* Ensure this is kernel 2.4 or higher */
1663
1664        uname(&uts);
1665        release = uts.release;
1666        major = atoi(strsep(&release, "."));
1667        minor = atoi(strsep(&release, "."));
1668
1669        if (major > 2 || (major == 2 && minor > 3))
1670                exit(0);
1671        exit(1);
1672 #else
1673        exit(1);
1674 #endif
1675 }
1676
1677 EOF
1678 if { (eval echo configure:1679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1679 then
1680   LINUX_LFS_SUPPORT=yes
1681 else
1682   echo "configure: failed program was:" >&5
1683   cat conftest.$ac_ext >&5
1684   rm -fr conftest*
1685   LINUX_LFS_SUPPORT=no
1686 fi
1687 rm -fr conftest*
1688 fi
1689
1690         CPPFLAGS="$old_CPPFLAGS"
1691         if test x$LINUX_LFS_SUPPORT = xyes ; then
1692           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1693           cat >> confdefs.h <<\EOF
1694 #define _LARGEFILE64_SOURCE 1
1695 EOF
1696
1697           cat >> confdefs.h <<\EOF
1698 #define _FILE_OFFSET_BITS 64
1699 EOF
1700
1701           cat >> confdefs.h <<\EOF
1702 #define _GNU_SOURCE 1
1703 EOF
1704
1705         fi
1706        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1707                 ;;
1708
1709     *hurd*)
1710         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1711 echo "configure:1712: checking for LFS support" >&5
1712         old_CPPFLAGS="$CPPFLAGS"
1713         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1714         if test "$cross_compiling" = yes; then
1715   GLIBC_LFS_SUPPORT=cross
1716 else
1717   cat > conftest.$ac_ext <<EOF
1718 #line 1719 "configure"
1719 #include "confdefs.h"
1720
1721 #include <unistd.h>
1722 main () {
1723 #if _LFS64_LARGEFILE == 1
1724 exit(0);
1725 #else
1726 exit(1);
1727 #endif
1728 }
1729 EOF
1730 if { (eval echo configure:1731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1731 then
1732   GLIBC_LFS_SUPPORT=yes
1733 else
1734   echo "configure: failed program was:" >&5
1735   cat conftest.$ac_ext >&5
1736   rm -fr conftest*
1737   GLIBC_LFS_SUPPORT=no
1738 fi
1739 rm -fr conftest*
1740 fi
1741
1742         CPPFLAGS="$old_CPPFLAGS"
1743         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1744           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1745           cat >> confdefs.h <<\EOF
1746 #define _LARGEFILE64_SOURCE 1
1747 EOF
1748
1749           cat >> confdefs.h <<\EOF
1750 #define _GNU_SOURCE 1
1751 EOF
1752
1753         fi
1754       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1755     ;;
1756
1757 esac
1758
1759 echo $ac_n "checking for inline""... $ac_c" 1>&6
1760 echo "configure:1761: checking for inline" >&5
1761 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1762   echo $ac_n "(cached) $ac_c" 1>&6
1763 else
1764   ac_cv_c_inline=no
1765 for ac_kw in inline __inline__ __inline; do
1766   cat > conftest.$ac_ext <<EOF
1767 #line 1768 "configure"
1768 #include "confdefs.h"
1769
1770 int main() {
1771 } $ac_kw foo() {
1772 ; return 0; }
1773 EOF
1774 if { (eval echo configure:1775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1775   rm -rf conftest*
1776   ac_cv_c_inline=$ac_kw; break
1777 else
1778   echo "configure: failed program was:" >&5
1779   cat conftest.$ac_ext >&5
1780 fi
1781 rm -f conftest*
1782 done
1783
1784 fi
1785
1786 echo "$ac_t""$ac_cv_c_inline" 1>&6
1787 case "$ac_cv_c_inline" in
1788   inline | yes) ;;
1789   no) cat >> confdefs.h <<\EOF
1790 #define inline 
1791 EOF
1792  ;;
1793   *)  cat >> confdefs.h <<EOF
1794 #define inline $ac_cv_c_inline
1795 EOF
1796  ;;
1797 esac
1798
1799 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1800 echo "configure:1801: checking how to run the C preprocessor" >&5
1801 # On Suns, sometimes $CPP names a directory.
1802 if test -n "$CPP" && test -d "$CPP"; then
1803   CPP=
1804 fi
1805 if test -z "$CPP"; then
1806 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1807   echo $ac_n "(cached) $ac_c" 1>&6
1808 else
1809     # This must be in double quotes, not single quotes, because CPP may get
1810   # substituted into the Makefile and "${CC-cc}" will confuse make.
1811   CPP="${CC-cc} -E"
1812   # On the NeXT, cc -E runs the code through the compiler's parser,
1813   # not just through cpp.
1814   cat > conftest.$ac_ext <<EOF
1815 #line 1816 "configure"
1816 #include "confdefs.h"
1817 #include <assert.h>
1818 Syntax Error
1819 EOF
1820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1821 { (eval echo configure:1822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1822 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1823 if test -z "$ac_err"; then
1824   :
1825 else
1826   echo "$ac_err" >&5
1827   echo "configure: failed program was:" >&5
1828   cat conftest.$ac_ext >&5
1829   rm -rf conftest*
1830   CPP="${CC-cc} -E -traditional-cpp"
1831   cat > conftest.$ac_ext <<EOF
1832 #line 1833 "configure"
1833 #include "confdefs.h"
1834 #include <assert.h>
1835 Syntax Error
1836 EOF
1837 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1838 { (eval echo configure:1839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1839 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1840 if test -z "$ac_err"; then
1841   :
1842 else
1843   echo "$ac_err" >&5
1844   echo "configure: failed program was:" >&5
1845   cat conftest.$ac_ext >&5
1846   rm -rf conftest*
1847   CPP="${CC-cc} -nologo -E"
1848   cat > conftest.$ac_ext <<EOF
1849 #line 1850 "configure"
1850 #include "confdefs.h"
1851 #include <assert.h>
1852 Syntax Error
1853 EOF
1854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1855 { (eval echo configure:1856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1857 if test -z "$ac_err"; then
1858   :
1859 else
1860   echo "$ac_err" >&5
1861   echo "configure: failed program was:" >&5
1862   cat conftest.$ac_ext >&5
1863   rm -rf conftest*
1864   CPP=/lib/cpp
1865 fi
1866 rm -f conftest*
1867 fi
1868 rm -f conftest*
1869 fi
1870 rm -f conftest*
1871   ac_cv_prog_CPP="$CPP"
1872 fi
1873   CPP="$ac_cv_prog_CPP"
1874 else
1875   ac_cv_prog_CPP="$CPP"
1876 fi
1877 echo "$ac_t""$CPP" 1>&6
1878
1879 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1880 echo "configure:1881: checking for ANSI C header files" >&5
1881 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1882   echo $ac_n "(cached) $ac_c" 1>&6
1883 else
1884   cat > conftest.$ac_ext <<EOF
1885 #line 1886 "configure"
1886 #include "confdefs.h"
1887 #include <stdlib.h>
1888 #include <stdarg.h>
1889 #include <string.h>
1890 #include <float.h>
1891 EOF
1892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1893 { (eval echo configure:1894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1895 if test -z "$ac_err"; then
1896   rm -rf conftest*
1897   ac_cv_header_stdc=yes
1898 else
1899   echo "$ac_err" >&5
1900   echo "configure: failed program was:" >&5
1901   cat conftest.$ac_ext >&5
1902   rm -rf conftest*
1903   ac_cv_header_stdc=no
1904 fi
1905 rm -f conftest*
1906
1907 if test $ac_cv_header_stdc = yes; then
1908   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1909 cat > conftest.$ac_ext <<EOF
1910 #line 1911 "configure"
1911 #include "confdefs.h"
1912 #include <string.h>
1913 EOF
1914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1915   egrep "memchr" >/dev/null 2>&1; then
1916   :
1917 else
1918   rm -rf conftest*
1919   ac_cv_header_stdc=no
1920 fi
1921 rm -f conftest*
1922
1923 fi
1924
1925 if test $ac_cv_header_stdc = yes; then
1926   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1927 cat > conftest.$ac_ext <<EOF
1928 #line 1929 "configure"
1929 #include "confdefs.h"
1930 #include <stdlib.h>
1931 EOF
1932 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1933   egrep "free" >/dev/null 2>&1; then
1934   :
1935 else
1936   rm -rf conftest*
1937   ac_cv_header_stdc=no
1938 fi
1939 rm -f conftest*
1940
1941 fi
1942
1943 if test $ac_cv_header_stdc = yes; then
1944   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1945 if test "$cross_compiling" = yes; then
1946   :
1947 else
1948   cat > conftest.$ac_ext <<EOF
1949 #line 1950 "configure"
1950 #include "confdefs.h"
1951 #include <ctype.h>
1952 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1953 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1954 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1955 int main () { int i; for (i = 0; i < 256; i++)
1956 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1957 exit (0); }
1958
1959 EOF
1960 if { (eval echo configure:1961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1961 then
1962   :
1963 else
1964   echo "configure: failed program was:" >&5
1965   cat conftest.$ac_ext >&5
1966   rm -fr conftest*
1967   ac_cv_header_stdc=no
1968 fi
1969 rm -fr conftest*
1970 fi
1971
1972 fi
1973 fi
1974
1975 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1976 if test $ac_cv_header_stdc = yes; then
1977   cat >> confdefs.h <<\EOF
1978 #define STDC_HEADERS 1
1979 EOF
1980
1981 fi
1982
1983 ac_header_dirent=no
1984 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1985 do
1986 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1987 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1988 echo "configure:1989: checking for $ac_hdr that defines DIR" >&5
1989 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1990   echo $ac_n "(cached) $ac_c" 1>&6
1991 else
1992   cat > conftest.$ac_ext <<EOF
1993 #line 1994 "configure"
1994 #include "confdefs.h"
1995 #include <sys/types.h>
1996 #include <$ac_hdr>
1997 int main() {
1998 DIR *dirp = 0;
1999 ; return 0; }
2000 EOF
2001 if { (eval echo configure:2002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2002   rm -rf conftest*
2003   eval "ac_cv_header_dirent_$ac_safe=yes"
2004 else
2005   echo "configure: failed program was:" >&5
2006   cat conftest.$ac_ext >&5
2007   rm -rf conftest*
2008   eval "ac_cv_header_dirent_$ac_safe=no"
2009 fi
2010 rm -f conftest*
2011 fi
2012 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2013   echo "$ac_t""yes" 1>&6
2014     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2015   cat >> confdefs.h <<EOF
2016 #define $ac_tr_hdr 1
2017 EOF
2018  ac_header_dirent=$ac_hdr; break
2019 else
2020   echo "$ac_t""no" 1>&6
2021 fi
2022 done
2023 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2024 if test $ac_header_dirent = dirent.h; then
2025 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2026 echo "configure:2027: checking for opendir in -ldir" >&5
2027 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2028 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2029   echo $ac_n "(cached) $ac_c" 1>&6
2030 else
2031   ac_save_LIBS="$LIBS"
2032 LIBS="-ldir  $LIBS"
2033 cat > conftest.$ac_ext <<EOF
2034 #line 2035 "configure"
2035 #include "confdefs.h"
2036 /* Override any gcc2 internal prototype to avoid an error.  */
2037 /* We use char because int might match the return type of a gcc2
2038     builtin and then its argument prototype would still apply.  */
2039 char opendir();
2040
2041 int main() {
2042 opendir()
2043 ; return 0; }
2044 EOF
2045 if { (eval echo configure:2046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2046   rm -rf conftest*
2047   eval "ac_cv_lib_$ac_lib_var=yes"
2048 else
2049   echo "configure: failed program was:" >&5
2050   cat conftest.$ac_ext >&5
2051   rm -rf conftest*
2052   eval "ac_cv_lib_$ac_lib_var=no"
2053 fi
2054 rm -f conftest*
2055 LIBS="$ac_save_LIBS"
2056
2057 fi
2058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2059   echo "$ac_t""yes" 1>&6
2060   LIBS="$LIBS -ldir"
2061 else
2062   echo "$ac_t""no" 1>&6
2063 fi
2064
2065 else
2066 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2067 echo "configure:2068: checking for opendir in -lx" >&5
2068 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2069 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2070   echo $ac_n "(cached) $ac_c" 1>&6
2071 else
2072   ac_save_LIBS="$LIBS"
2073 LIBS="-lx  $LIBS"
2074 cat > conftest.$ac_ext <<EOF
2075 #line 2076 "configure"
2076 #include "confdefs.h"
2077 /* Override any gcc2 internal prototype to avoid an error.  */
2078 /* We use char because int might match the return type of a gcc2
2079     builtin and then its argument prototype would still apply.  */
2080 char opendir();
2081
2082 int main() {
2083 opendir()
2084 ; return 0; }
2085 EOF
2086 if { (eval echo configure:2087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2087   rm -rf conftest*
2088   eval "ac_cv_lib_$ac_lib_var=yes"
2089 else
2090   echo "configure: failed program was:" >&5
2091   cat conftest.$ac_ext >&5
2092   rm -rf conftest*
2093   eval "ac_cv_lib_$ac_lib_var=no"
2094 fi
2095 rm -f conftest*
2096 LIBS="$ac_save_LIBS"
2097
2098 fi
2099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2100   echo "$ac_t""yes" 1>&6
2101   LIBS="$LIBS -lx"
2102 else
2103   echo "$ac_t""no" 1>&6
2104 fi
2105
2106 fi
2107
2108 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2109 echo "configure:2110: checking whether time.h and sys/time.h may both be included" >&5
2110 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2111   echo $ac_n "(cached) $ac_c" 1>&6
2112 else
2113   cat > conftest.$ac_ext <<EOF
2114 #line 2115 "configure"
2115 #include "confdefs.h"
2116 #include <sys/types.h>
2117 #include <sys/time.h>
2118 #include <time.h>
2119 int main() {
2120 struct tm *tp;
2121 ; return 0; }
2122 EOF
2123 if { (eval echo configure:2124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2124   rm -rf conftest*
2125   ac_cv_header_time=yes
2126 else
2127   echo "configure: failed program was:" >&5
2128   cat conftest.$ac_ext >&5
2129   rm -rf conftest*
2130   ac_cv_header_time=no
2131 fi
2132 rm -f conftest*
2133 fi
2134
2135 echo "$ac_t""$ac_cv_header_time" 1>&6
2136 if test $ac_cv_header_time = yes; then
2137   cat >> confdefs.h <<\EOF
2138 #define TIME_WITH_SYS_TIME 1
2139 EOF
2140
2141 fi
2142
2143 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2144 echo "configure:2145: checking for sys/wait.h that is POSIX.1 compatible" >&5
2145 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2146   echo $ac_n "(cached) $ac_c" 1>&6
2147 else
2148   cat > conftest.$ac_ext <<EOF
2149 #line 2150 "configure"
2150 #include "confdefs.h"
2151 #include <sys/types.h>
2152 #include <sys/wait.h>
2153 #ifndef WEXITSTATUS
2154 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2155 #endif
2156 #ifndef WIFEXITED
2157 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2158 #endif
2159 int main() {
2160 int s;
2161 wait (&s);
2162 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2163 ; return 0; }
2164 EOF
2165 if { (eval echo configure:2166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2166   rm -rf conftest*
2167   ac_cv_header_sys_wait_h=yes
2168 else
2169   echo "configure: failed program was:" >&5
2170   cat conftest.$ac_ext >&5
2171   rm -rf conftest*
2172   ac_cv_header_sys_wait_h=no
2173 fi
2174 rm -f conftest*
2175 fi
2176
2177 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2178 if test $ac_cv_header_sys_wait_h = yes; then
2179   cat >> confdefs.h <<\EOF
2180 #define HAVE_SYS_WAIT_H 1
2181 EOF
2182
2183 fi
2184
2185 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2186 do
2187 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2188 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2189 echo "configure:2190: checking for $ac_hdr" >&5
2190 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2191   echo $ac_n "(cached) $ac_c" 1>&6
2192 else
2193   cat > conftest.$ac_ext <<EOF
2194 #line 2195 "configure"
2195 #include "confdefs.h"
2196 #include <$ac_hdr>
2197 EOF
2198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2199 { (eval echo configure:2200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2201 if test -z "$ac_err"; then
2202   rm -rf conftest*
2203   eval "ac_cv_header_$ac_safe=yes"
2204 else
2205   echo "$ac_err" >&5
2206   echo "configure: failed program was:" >&5
2207   cat conftest.$ac_ext >&5
2208   rm -rf conftest*
2209   eval "ac_cv_header_$ac_safe=no"
2210 fi
2211 rm -f conftest*
2212 fi
2213 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2214   echo "$ac_t""yes" 1>&6
2215     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2216   cat >> confdefs.h <<EOF
2217 #define $ac_tr_hdr 1
2218 EOF
2219  
2220 else
2221   echo "$ac_t""no" 1>&6
2222 fi
2223 done
2224
2225 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2226 do
2227 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2228 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2229 echo "configure:2230: checking for $ac_hdr" >&5
2230 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2231   echo $ac_n "(cached) $ac_c" 1>&6
2232 else
2233   cat > conftest.$ac_ext <<EOF
2234 #line 2235 "configure"
2235 #include "confdefs.h"
2236 #include <$ac_hdr>
2237 EOF
2238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2239 { (eval echo configure:2240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2241 if test -z "$ac_err"; then
2242   rm -rf conftest*
2243   eval "ac_cv_header_$ac_safe=yes"
2244 else
2245   echo "$ac_err" >&5
2246   echo "configure: failed program was:" >&5
2247   cat conftest.$ac_ext >&5
2248   rm -rf conftest*
2249   eval "ac_cv_header_$ac_safe=no"
2250 fi
2251 rm -f conftest*
2252 fi
2253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2254   echo "$ac_t""yes" 1>&6
2255     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2256   cat >> confdefs.h <<EOF
2257 #define $ac_tr_hdr 1
2258 EOF
2259  
2260 else
2261   echo "$ac_t""no" 1>&6
2262 fi
2263 done
2264
2265 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2266 do
2267 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2268 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2269 echo "configure:2270: checking for $ac_hdr" >&5
2270 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2271   echo $ac_n "(cached) $ac_c" 1>&6
2272 else
2273   cat > conftest.$ac_ext <<EOF
2274 #line 2275 "configure"
2275 #include "confdefs.h"
2276 #include <$ac_hdr>
2277 EOF
2278 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2279 { (eval echo configure:2280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2280 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2281 if test -z "$ac_err"; then
2282   rm -rf conftest*
2283   eval "ac_cv_header_$ac_safe=yes"
2284 else
2285   echo "$ac_err" >&5
2286   echo "configure: failed program was:" >&5
2287   cat conftest.$ac_ext >&5
2288   rm -rf conftest*
2289   eval "ac_cv_header_$ac_safe=no"
2290 fi
2291 rm -f conftest*
2292 fi
2293 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2294   echo "$ac_t""yes" 1>&6
2295     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2296   cat >> confdefs.h <<EOF
2297 #define $ac_tr_hdr 1
2298 EOF
2299  
2300 else
2301   echo "$ac_t""no" 1>&6
2302 fi
2303 done
2304
2305 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2306 do
2307 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2308 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2309 echo "configure:2310: checking for $ac_hdr" >&5
2310 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2311   echo $ac_n "(cached) $ac_c" 1>&6
2312 else
2313   cat > conftest.$ac_ext <<EOF
2314 #line 2315 "configure"
2315 #include "confdefs.h"
2316 #include <$ac_hdr>
2317 EOF
2318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2319 { (eval echo configure:2320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2321 if test -z "$ac_err"; then
2322   rm -rf conftest*
2323   eval "ac_cv_header_$ac_safe=yes"
2324 else
2325   echo "$ac_err" >&5
2326   echo "configure: failed program was:" >&5
2327   cat conftest.$ac_ext >&5
2328   rm -rf conftest*
2329   eval "ac_cv_header_$ac_safe=no"
2330 fi
2331 rm -f conftest*
2332 fi
2333 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2334   echo "$ac_t""yes" 1>&6
2335     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2336   cat >> confdefs.h <<EOF
2337 #define $ac_tr_hdr 1
2338 EOF
2339  
2340 else
2341   echo "$ac_t""no" 1>&6
2342 fi
2343 done
2344
2345 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
2346 do
2347 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2348 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2349 echo "configure:2350: checking for $ac_hdr" >&5
2350 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2351   echo $ac_n "(cached) $ac_c" 1>&6
2352 else
2353   cat > conftest.$ac_ext <<EOF
2354 #line 2355 "configure"
2355 #include "confdefs.h"
2356 #include <$ac_hdr>
2357 EOF
2358 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2359 { (eval echo configure:2360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2360 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2361 if test -z "$ac_err"; then
2362   rm -rf conftest*
2363   eval "ac_cv_header_$ac_safe=yes"
2364 else
2365   echo "$ac_err" >&5
2366   echo "configure: failed program was:" >&5
2367   cat conftest.$ac_ext >&5
2368   rm -rf conftest*
2369   eval "ac_cv_header_$ac_safe=no"
2370 fi
2371 rm -f conftest*
2372 fi
2373 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2374   echo "$ac_t""yes" 1>&6
2375     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2376   cat >> confdefs.h <<EOF
2377 #define $ac_tr_hdr 1
2378 EOF
2379  
2380 else
2381   echo "$ac_t""no" 1>&6
2382 fi
2383 done
2384
2385 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2386 do
2387 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2388 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2389 echo "configure:2390: checking for $ac_hdr" >&5
2390 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2391   echo $ac_n "(cached) $ac_c" 1>&6
2392 else
2393   cat > conftest.$ac_ext <<EOF
2394 #line 2395 "configure"
2395 #include "confdefs.h"
2396 #include <$ac_hdr>
2397 EOF
2398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2399 { (eval echo configure:2400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2401 if test -z "$ac_err"; then
2402   rm -rf conftest*
2403   eval "ac_cv_header_$ac_safe=yes"
2404 else
2405   echo "$ac_err" >&5
2406   echo "configure: failed program was:" >&5
2407   cat conftest.$ac_ext >&5
2408   rm -rf conftest*
2409   eval "ac_cv_header_$ac_safe=no"
2410 fi
2411 rm -f conftest*
2412 fi
2413 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2414   echo "$ac_t""yes" 1>&6
2415     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2416   cat >> confdefs.h <<EOF
2417 #define $ac_tr_hdr 1
2418 EOF
2419  
2420 else
2421   echo "$ac_t""no" 1>&6
2422 fi
2423 done
2424
2425 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2426 do
2427 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2428 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2429 echo "configure:2430: checking for $ac_hdr" >&5
2430 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2431   echo $ac_n "(cached) $ac_c" 1>&6
2432 else
2433   cat > conftest.$ac_ext <<EOF
2434 #line 2435 "configure"
2435 #include "confdefs.h"
2436 #include <$ac_hdr>
2437 EOF
2438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2439 { (eval echo configure:2440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2440 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2441 if test -z "$ac_err"; then
2442   rm -rf conftest*
2443   eval "ac_cv_header_$ac_safe=yes"
2444 else
2445   echo "$ac_err" >&5
2446   echo "configure: failed program was:" >&5
2447   cat conftest.$ac_ext >&5
2448   rm -rf conftest*
2449   eval "ac_cv_header_$ac_safe=no"
2450 fi
2451 rm -f conftest*
2452 fi
2453 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2454   echo "$ac_t""yes" 1>&6
2455     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2456   cat >> confdefs.h <<EOF
2457 #define $ac_tr_hdr 1
2458 EOF
2459  
2460 else
2461   echo "$ac_t""no" 1>&6
2462 fi
2463 done
2464
2465 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
2466 do
2467 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2468 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2469 echo "configure:2470: checking for $ac_hdr" >&5
2470 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2471   echo $ac_n "(cached) $ac_c" 1>&6
2472 else
2473   cat > conftest.$ac_ext <<EOF
2474 #line 2475 "configure"
2475 #include "confdefs.h"
2476 #include <$ac_hdr>
2477 EOF
2478 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2479 { (eval echo configure:2480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2480 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2481 if test -z "$ac_err"; then
2482   rm -rf conftest*
2483   eval "ac_cv_header_$ac_safe=yes"
2484 else
2485   echo "$ac_err" >&5
2486   echo "configure: failed program was:" >&5
2487   cat conftest.$ac_ext >&5
2488   rm -rf conftest*
2489   eval "ac_cv_header_$ac_safe=no"
2490 fi
2491 rm -f conftest*
2492 fi
2493 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2494   echo "$ac_t""yes" 1>&6
2495     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2496   cat >> confdefs.h <<EOF
2497 #define $ac_tr_hdr 1
2498 EOF
2499  
2500 else
2501   echo "$ac_t""no" 1>&6
2502 fi
2503 done
2504
2505 for ac_hdr in sys/syslog.h syslog.h
2506 do
2507 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2508 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2509 echo "configure:2510: checking for $ac_hdr" >&5
2510 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2511   echo $ac_n "(cached) $ac_c" 1>&6
2512 else
2513   cat > conftest.$ac_ext <<EOF
2514 #line 2515 "configure"
2515 #include "confdefs.h"
2516 #include <$ac_hdr>
2517 EOF
2518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2519 { (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2521 if test -z "$ac_err"; then
2522   rm -rf conftest*
2523   eval "ac_cv_header_$ac_safe=yes"
2524 else
2525   echo "$ac_err" >&5
2526   echo "configure: failed program was:" >&5
2527   cat conftest.$ac_ext >&5
2528   rm -rf conftest*
2529   eval "ac_cv_header_$ac_safe=no"
2530 fi
2531 rm -f conftest*
2532 fi
2533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2534   echo "$ac_t""yes" 1>&6
2535     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2536   cat >> confdefs.h <<EOF
2537 #define $ac_tr_hdr 1
2538 EOF
2539  
2540 else
2541   echo "$ac_t""no" 1>&6
2542 fi
2543 done
2544
2545
2546 #
2547 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2548 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2549 #
2550 case "$host_os" in
2551     *hpux*)
2552                 cat > conftest.$ac_ext <<EOF
2553 #line 2554 "configure"
2554 #include "confdefs.h"
2555 #include <shadow.h>
2556 int main() {
2557 struct spwd testme
2558 ; return 0; }
2559 EOF
2560 if { (eval echo configure:2561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2561   rm -rf conftest*
2562   ac_cv_header_shadow_h=yes
2563 else
2564   echo "configure: failed program was:" >&5
2565   cat conftest.$ac_ext >&5
2566   rm -rf conftest*
2567   ac_cv_header_shadow_h=no
2568 fi
2569 rm -f conftest*
2570                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2571                    cat >> confdefs.h <<\EOF
2572 #define HAVE_SHADOW_H 1
2573 EOF
2574
2575                 fi
2576         ;;
2577 esac
2578 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2579 do
2580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2582 echo "configure:2583: checking for $ac_hdr" >&5
2583 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2584   echo $ac_n "(cached) $ac_c" 1>&6
2585 else
2586   cat > conftest.$ac_ext <<EOF
2587 #line 2588 "configure"
2588 #include "confdefs.h"
2589 #include <$ac_hdr>
2590 EOF
2591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2592 { (eval echo configure:2593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2594 if test -z "$ac_err"; then
2595   rm -rf conftest*
2596   eval "ac_cv_header_$ac_safe=yes"
2597 else
2598   echo "$ac_err" >&5
2599   echo "configure: failed program was:" >&5
2600   cat conftest.$ac_ext >&5
2601   rm -rf conftest*
2602   eval "ac_cv_header_$ac_safe=no"
2603 fi
2604 rm -f conftest*
2605 fi
2606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2607   echo "$ac_t""yes" 1>&6
2608     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2609   cat >> confdefs.h <<EOF
2610 #define $ac_tr_hdr 1
2611 EOF
2612  
2613 else
2614   echo "$ac_t""no" 1>&6
2615 fi
2616 done
2617
2618 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2619 do
2620 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2621 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2622 echo "configure:2623: checking for $ac_hdr" >&5
2623 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2624   echo $ac_n "(cached) $ac_c" 1>&6
2625 else
2626   cat > conftest.$ac_ext <<EOF
2627 #line 2628 "configure"
2628 #include "confdefs.h"
2629 #include <$ac_hdr>
2630 EOF
2631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2632 { (eval echo configure:2633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2634 if test -z "$ac_err"; then
2635   rm -rf conftest*
2636   eval "ac_cv_header_$ac_safe=yes"
2637 else
2638   echo "$ac_err" >&5
2639   echo "configure: failed program was:" >&5
2640   cat conftest.$ac_ext >&5
2641   rm -rf conftest*
2642   eval "ac_cv_header_$ac_safe=no"
2643 fi
2644 rm -f conftest*
2645 fi
2646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2647   echo "$ac_t""yes" 1>&6
2648     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2649   cat >> confdefs.h <<EOF
2650 #define $ac_tr_hdr 1
2651 EOF
2652  
2653 else
2654   echo "$ac_t""no" 1>&6
2655 fi
2656 done
2657
2658 for ac_hdr in stropts.h poll.h
2659 do
2660 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2661 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2662 echo "configure:2663: checking for $ac_hdr" >&5
2663 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2664   echo $ac_n "(cached) $ac_c" 1>&6
2665 else
2666   cat > conftest.$ac_ext <<EOF
2667 #line 2668 "configure"
2668 #include "confdefs.h"
2669 #include <$ac_hdr>
2670 EOF
2671 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2672 { (eval echo configure:2673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2673 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2674 if test -z "$ac_err"; then
2675   rm -rf conftest*
2676   eval "ac_cv_header_$ac_safe=yes"
2677 else
2678   echo "$ac_err" >&5
2679   echo "configure: failed program was:" >&5
2680   cat conftest.$ac_ext >&5
2681   rm -rf conftest*
2682   eval "ac_cv_header_$ac_safe=no"
2683 fi
2684 rm -f conftest*
2685 fi
2686 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2687   echo "$ac_t""yes" 1>&6
2688     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2689   cat >> confdefs.h <<EOF
2690 #define $ac_tr_hdr 1
2691 EOF
2692  
2693 else
2694   echo "$ac_t""no" 1>&6
2695 fi
2696 done
2697
2698 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2699 do
2700 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2701 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2702 echo "configure:2703: checking for $ac_hdr" >&5
2703 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2704   echo $ac_n "(cached) $ac_c" 1>&6
2705 else
2706   cat > conftest.$ac_ext <<EOF
2707 #line 2708 "configure"
2708 #include "confdefs.h"
2709 #include <$ac_hdr>
2710 EOF
2711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2712 { (eval echo configure:2713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2714 if test -z "$ac_err"; then
2715   rm -rf conftest*
2716   eval "ac_cv_header_$ac_safe=yes"
2717 else
2718   echo "$ac_err" >&5
2719   echo "configure: failed program was:" >&5
2720   cat conftest.$ac_ext >&5
2721   rm -rf conftest*
2722   eval "ac_cv_header_$ac_safe=no"
2723 fi
2724 rm -f conftest*
2725 fi
2726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2727   echo "$ac_t""yes" 1>&6
2728     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2729   cat >> confdefs.h <<EOF
2730 #define $ac_tr_hdr 1
2731 EOF
2732  
2733 else
2734   echo "$ac_t""no" 1>&6
2735 fi
2736 done
2737
2738 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2739 do
2740 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2741 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2742 echo "configure:2743: checking for $ac_hdr" >&5
2743 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2744   echo $ac_n "(cached) $ac_c" 1>&6
2745 else
2746   cat > conftest.$ac_ext <<EOF
2747 #line 2748 "configure"
2748 #include "confdefs.h"
2749 #include <$ac_hdr>
2750 EOF
2751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2752 { (eval echo configure:2753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2754 if test -z "$ac_err"; then
2755   rm -rf conftest*
2756   eval "ac_cv_header_$ac_safe=yes"
2757 else
2758   echo "$ac_err" >&5
2759   echo "configure: failed program was:" >&5
2760   cat conftest.$ac_ext >&5
2761   rm -rf conftest*
2762   eval "ac_cv_header_$ac_safe=no"
2763 fi
2764 rm -f conftest*
2765 fi
2766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2767   echo "$ac_t""yes" 1>&6
2768     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2769   cat >> confdefs.h <<EOF
2770 #define $ac_tr_hdr 1
2771 EOF
2772  
2773 else
2774   echo "$ac_t""no" 1>&6
2775 fi
2776 done
2777
2778
2779 # For experimental utmp support (lastlog on some BSD-like systems)
2780 for ac_hdr in utmp.h utmpx.h lastlog.h
2781 do
2782 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2783 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2784 echo "configure:2785: checking for $ac_hdr" >&5
2785 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2786   echo $ac_n "(cached) $ac_c" 1>&6
2787 else
2788   cat > conftest.$ac_ext <<EOF
2789 #line 2790 "configure"
2790 #include "confdefs.h"
2791 #include <$ac_hdr>
2792 EOF
2793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2794 { (eval echo configure:2795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2796 if test -z "$ac_err"; then
2797   rm -rf conftest*
2798   eval "ac_cv_header_$ac_safe=yes"
2799 else
2800   echo "$ac_err" >&5
2801   echo "configure: failed program was:" >&5
2802   cat conftest.$ac_ext >&5
2803   rm -rf conftest*
2804   eval "ac_cv_header_$ac_safe=no"
2805 fi
2806 rm -f conftest*
2807 fi
2808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2809   echo "$ac_t""yes" 1>&6
2810     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2811   cat >> confdefs.h <<EOF
2812 #define $ac_tr_hdr 1
2813 EOF
2814  
2815 else
2816   echo "$ac_t""no" 1>&6
2817 fi
2818 done
2819
2820  
2821 # For quotas on Veritas VxFS filesystems
2822 for ac_hdr in sys/fs/vx_quota.h
2823 do
2824 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2825 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2826 echo "configure:2827: checking for $ac_hdr" >&5
2827 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2828   echo $ac_n "(cached) $ac_c" 1>&6
2829 else
2830   cat > conftest.$ac_ext <<EOF
2831 #line 2832 "configure"
2832 #include "confdefs.h"
2833 #include <$ac_hdr>
2834 EOF
2835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2836 { (eval echo configure:2837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2838 if test -z "$ac_err"; then
2839   rm -rf conftest*
2840   eval "ac_cv_header_$ac_safe=yes"
2841 else
2842   echo "$ac_err" >&5
2843   echo "configure: failed program was:" >&5
2844   cat conftest.$ac_ext >&5
2845   rm -rf conftest*
2846   eval "ac_cv_header_$ac_safe=no"
2847 fi
2848 rm -f conftest*
2849 fi
2850 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2851   echo "$ac_t""yes" 1>&6
2852     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2853   cat >> confdefs.h <<EOF
2854 #define $ac_tr_hdr 1
2855 EOF
2856  
2857 else
2858   echo "$ac_t""no" 1>&6
2859 fi
2860 done
2861
2862
2863 # For quotas on Linux XFS filesystems
2864 for ac_hdr in linux/xqm.h
2865 do
2866 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2867 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2868 echo "configure:2869: checking for $ac_hdr" >&5
2869 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2870   echo $ac_n "(cached) $ac_c" 1>&6
2871 else
2872   cat > conftest.$ac_ext <<EOF
2873 #line 2874 "configure"
2874 #include "confdefs.h"
2875 #include <$ac_hdr>
2876 EOF
2877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2878 { (eval echo configure:2879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2880 if test -z "$ac_err"; then
2881   rm -rf conftest*
2882   eval "ac_cv_header_$ac_safe=yes"
2883 else
2884   echo "$ac_err" >&5
2885   echo "configure: failed program was:" >&5
2886   cat conftest.$ac_ext >&5
2887   rm -rf conftest*
2888   eval "ac_cv_header_$ac_safe=no"
2889 fi
2890 rm -f conftest*
2891 fi
2892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2893   echo "$ac_t""yes" 1>&6
2894     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2895   cat >> confdefs.h <<EOF
2896 #define $ac_tr_hdr 1
2897 EOF
2898  
2899 else
2900   echo "$ac_t""no" 1>&6
2901 fi
2902 done
2903
2904
2905 echo $ac_n "checking size of int""... $ac_c" 1>&6
2906 echo "configure:2907: checking size of int" >&5
2907 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2908   echo $ac_n "(cached) $ac_c" 1>&6
2909 else
2910   if test "$cross_compiling" = yes; then
2911   ac_cv_sizeof_int=cross
2912 else
2913   cat > conftest.$ac_ext <<EOF
2914 #line 2915 "configure"
2915 #include "confdefs.h"
2916 #include <stdio.h>
2917 #include <sys/types.h>
2918 main()
2919 {
2920   FILE *f=fopen("conftestval", "w");
2921   if (!f) exit(1);
2922   fprintf(f, "%d\n", sizeof(int));
2923   exit(0);
2924 }
2925 EOF
2926 if { (eval echo configure:2927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2927 then
2928   ac_cv_sizeof_int=`cat conftestval`
2929 else
2930   echo "configure: failed program was:" >&5
2931   cat conftest.$ac_ext >&5
2932   rm -fr conftest*
2933   ac_cv_sizeof_int=0
2934 fi
2935 rm -fr conftest*
2936 fi
2937
2938 fi
2939 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2940 cat >> confdefs.h <<EOF
2941 #define SIZEOF_INT $ac_cv_sizeof_int
2942 EOF
2943
2944
2945 echo $ac_n "checking size of long""... $ac_c" 1>&6
2946 echo "configure:2947: checking size of long" >&5
2947 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2948   echo $ac_n "(cached) $ac_c" 1>&6
2949 else
2950   if test "$cross_compiling" = yes; then
2951   ac_cv_sizeof_long=cross
2952 else
2953   cat > conftest.$ac_ext <<EOF
2954 #line 2955 "configure"
2955 #include "confdefs.h"
2956 #include <stdio.h>
2957 #include <sys/types.h>
2958 main()
2959 {
2960   FILE *f=fopen("conftestval", "w");
2961   if (!f) exit(1);
2962   fprintf(f, "%d\n", sizeof(long));
2963   exit(0);
2964 }
2965 EOF
2966 if { (eval echo configure:2967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2967 then
2968   ac_cv_sizeof_long=`cat conftestval`
2969 else
2970   echo "configure: failed program was:" >&5
2971   cat conftest.$ac_ext >&5
2972   rm -fr conftest*
2973   ac_cv_sizeof_long=0
2974 fi
2975 rm -fr conftest*
2976 fi
2977
2978 fi
2979 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2980 cat >> confdefs.h <<EOF
2981 #define SIZEOF_LONG $ac_cv_sizeof_long
2982 EOF
2983
2984
2985 echo $ac_n "checking size of short""... $ac_c" 1>&6
2986 echo "configure:2987: checking size of short" >&5
2987 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2988   echo $ac_n "(cached) $ac_c" 1>&6
2989 else
2990   if test "$cross_compiling" = yes; then
2991   ac_cv_sizeof_short=cross
2992 else
2993   cat > conftest.$ac_ext <<EOF
2994 #line 2995 "configure"
2995 #include "confdefs.h"
2996 #include <stdio.h>
2997 #include <sys/types.h>
2998 main()
2999 {
3000   FILE *f=fopen("conftestval", "w");
3001   if (!f) exit(1);
3002   fprintf(f, "%d\n", sizeof(short));
3003   exit(0);
3004 }
3005 EOF
3006 if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3007 then
3008   ac_cv_sizeof_short=`cat conftestval`
3009 else
3010   echo "configure: failed program was:" >&5
3011   cat conftest.$ac_ext >&5
3012   rm -fr conftest*
3013   ac_cv_sizeof_short=0
3014 fi
3015 rm -fr conftest*
3016 fi
3017
3018 fi
3019 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3020 cat >> confdefs.h <<EOF
3021 #define SIZEOF_SHORT $ac_cv_sizeof_short
3022 EOF
3023
3024
3025
3026 echo $ac_n "checking for working const""... $ac_c" 1>&6
3027 echo "configure:3028: checking for working const" >&5
3028 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3029   echo $ac_n "(cached) $ac_c" 1>&6
3030 else
3031   cat > conftest.$ac_ext <<EOF
3032 #line 3033 "configure"
3033 #include "confdefs.h"
3034
3035 int main() {
3036
3037 /* Ultrix mips cc rejects this.  */
3038 typedef int charset[2]; const charset x;
3039 /* SunOS 4.1.1 cc rejects this.  */
3040 char const *const *ccp;
3041 char **p;
3042 /* NEC SVR4.0.2 mips cc rejects this.  */
3043 struct point {int x, y;};
3044 static struct point const zero = {0,0};
3045 /* AIX XL C 1.02.0.0 rejects this.
3046    It does not let you subtract one const X* pointer from another in an arm
3047    of an if-expression whose if-part is not a constant expression */
3048 const char *g = "string";
3049 ccp = &g + (g ? g-g : 0);
3050 /* HPUX 7.0 cc rejects these. */
3051 ++ccp;
3052 p = (char**) ccp;
3053 ccp = (char const *const *) p;
3054 { /* SCO 3.2v4 cc rejects this.  */
3055   char *t;
3056   char const *s = 0 ? (char *) 0 : (char const *) 0;
3057
3058   *t++ = 0;
3059 }
3060 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3061   int x[] = {25, 17};
3062   const int *foo = &x[0];
3063   ++foo;
3064 }
3065 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3066   typedef const int *iptr;
3067   iptr p = 0;
3068   ++p;
3069 }
3070 { /* AIX XL C 1.02.0.0 rejects this saying
3071      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3072   struct s { int j; const int *ap[3]; };
3073   struct s *b; b->j = 5;
3074 }
3075 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3076   const int foo = 10;
3077 }
3078
3079 ; return 0; }
3080 EOF
3081 if { (eval echo configure:3082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3082   rm -rf conftest*
3083   ac_cv_c_const=yes
3084 else
3085   echo "configure: failed program was:" >&5
3086   cat conftest.$ac_ext >&5
3087   rm -rf conftest*
3088   ac_cv_c_const=no
3089 fi
3090 rm -f conftest*
3091 fi
3092
3093 echo "$ac_t""$ac_cv_c_const" 1>&6
3094 if test $ac_cv_c_const = no; then
3095   cat >> confdefs.h <<\EOF
3096 #define const 
3097 EOF
3098
3099 fi
3100
3101 echo $ac_n "checking for inline""... $ac_c" 1>&6
3102 echo "configure:3103: checking for inline" >&5
3103 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3104   echo $ac_n "(cached) $ac_c" 1>&6
3105 else
3106   ac_cv_c_inline=no
3107 for ac_kw in inline __inline__ __inline; do
3108   cat > conftest.$ac_ext <<EOF
3109 #line 3110 "configure"
3110 #include "confdefs.h"
3111
3112 int main() {
3113 } $ac_kw foo() {
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   ac_cv_c_inline=$ac_kw; break
3119 else
3120   echo "configure: failed program was:" >&5
3121   cat conftest.$ac_ext >&5
3122 fi
3123 rm -f conftest*
3124 done
3125
3126 fi
3127
3128 echo "$ac_t""$ac_cv_c_inline" 1>&6
3129 case "$ac_cv_c_inline" in
3130   inline | yes) ;;
3131   no) cat >> confdefs.h <<\EOF
3132 #define inline 
3133 EOF
3134  ;;
3135   *)  cat >> confdefs.h <<EOF
3136 #define inline $ac_cv_c_inline
3137 EOF
3138  ;;
3139 esac
3140
3141 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3142 echo "configure:3143: checking whether byte ordering is bigendian" >&5
3143 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3144   echo $ac_n "(cached) $ac_c" 1>&6
3145 else
3146   ac_cv_c_bigendian=unknown
3147 # See if sys/param.h defines the BYTE_ORDER macro.
3148 cat > conftest.$ac_ext <<EOF
3149 #line 3150 "configure"
3150 #include "confdefs.h"
3151 #include <sys/types.h>
3152 #include <sys/param.h>
3153 int main() {
3154
3155 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3156  bogus endian macros
3157 #endif
3158 ; return 0; }
3159 EOF
3160 if { (eval echo configure:3161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3161   rm -rf conftest*
3162   # It does; now see whether it defined to BIG_ENDIAN or not.
3163 cat > conftest.$ac_ext <<EOF
3164 #line 3165 "configure"
3165 #include "confdefs.h"
3166 #include <sys/types.h>
3167 #include <sys/param.h>
3168 int main() {
3169
3170 #if BYTE_ORDER != BIG_ENDIAN
3171  not big endian
3172 #endif
3173 ; return 0; }
3174 EOF
3175 if { (eval echo configure:3176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3176   rm -rf conftest*
3177   ac_cv_c_bigendian=yes
3178 else
3179   echo "configure: failed program was:" >&5
3180   cat conftest.$ac_ext >&5
3181   rm -rf conftest*
3182   ac_cv_c_bigendian=no
3183 fi
3184 rm -f conftest*
3185 else
3186   echo "configure: failed program was:" >&5
3187   cat conftest.$ac_ext >&5
3188 fi
3189 rm -f conftest*
3190 if test $ac_cv_c_bigendian = unknown; then
3191 if test "$cross_compiling" = yes; then
3192     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3193 else
3194   cat > conftest.$ac_ext <<EOF
3195 #line 3196 "configure"
3196 #include "confdefs.h"
3197 main () {
3198   /* Are we little or big endian?  From Harbison&Steele.  */
3199   union
3200   {
3201     long l;
3202     char c[sizeof (long)];
3203   } u;
3204   u.l = 1;
3205   exit (u.c[sizeof (long) - 1] == 1);
3206 }
3207 EOF
3208 if { (eval echo configure:3209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3209 then
3210   ac_cv_c_bigendian=no
3211 else
3212   echo "configure: failed program was:" >&5
3213   cat conftest.$ac_ext >&5
3214   rm -fr conftest*
3215   ac_cv_c_bigendian=yes
3216 fi
3217 rm -fr conftest*
3218 fi
3219
3220 fi
3221 fi
3222
3223 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3224 if test $ac_cv_c_bigendian = yes; then
3225   cat >> confdefs.h <<\EOF
3226 #define WORDS_BIGENDIAN 1
3227 EOF
3228
3229 fi
3230
3231 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3232 echo "configure:3233: checking whether char is unsigned" >&5
3233 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3234   echo $ac_n "(cached) $ac_c" 1>&6
3235 else
3236   if test "$GCC" = yes; then
3237   # GCC predefines this symbol on systems where it applies.
3238 cat > conftest.$ac_ext <<EOF
3239 #line 3240 "configure"
3240 #include "confdefs.h"
3241 #ifdef __CHAR_UNSIGNED__
3242   yes
3243 #endif
3244
3245 EOF
3246 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3247   egrep "yes" >/dev/null 2>&1; then
3248   rm -rf conftest*
3249   ac_cv_c_char_unsigned=yes
3250 else
3251   rm -rf conftest*
3252   ac_cv_c_char_unsigned=no
3253 fi
3254 rm -f conftest*
3255
3256 else
3257 if test "$cross_compiling" = yes; then
3258     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3259 else
3260   cat > conftest.$ac_ext <<EOF
3261 #line 3262 "configure"
3262 #include "confdefs.h"
3263 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3264 #if !defined(__STDC__) || __STDC__ != 1
3265 #define volatile
3266 #endif
3267 main() {
3268   volatile char c = 255; exit(c < 0);
3269 }
3270 EOF
3271 if { (eval echo configure:3272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3272 then
3273   ac_cv_c_char_unsigned=yes
3274 else
3275   echo "configure: failed program was:" >&5
3276   cat conftest.$ac_ext >&5
3277   rm -fr conftest*
3278   ac_cv_c_char_unsigned=no
3279 fi
3280 rm -fr conftest*
3281 fi
3282
3283 fi
3284 fi
3285
3286 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3287 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3288   cat >> confdefs.h <<\EOF
3289 #define __CHAR_UNSIGNED__ 1
3290 EOF
3291
3292 fi
3293
3294
3295 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3296 echo "configure:3297: checking return type of signal handlers" >&5
3297 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3298   echo $ac_n "(cached) $ac_c" 1>&6
3299 else
3300   cat > conftest.$ac_ext <<EOF
3301 #line 3302 "configure"
3302 #include "confdefs.h"
3303 #include <sys/types.h>
3304 #include <signal.h>
3305 #ifdef signal
3306 #undef signal
3307 #endif
3308 #ifdef __cplusplus
3309 extern "C" void (*signal (int, void (*)(int)))(int);
3310 #else
3311 void (*signal ()) ();
3312 #endif
3313
3314 int main() {
3315 int i;
3316 ; return 0; }
3317 EOF
3318 if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3319   rm -rf conftest*
3320   ac_cv_type_signal=void
3321 else
3322   echo "configure: failed program was:" >&5
3323   cat conftest.$ac_ext >&5
3324   rm -rf conftest*
3325   ac_cv_type_signal=int
3326 fi
3327 rm -f conftest*
3328 fi
3329
3330 echo "$ac_t""$ac_cv_type_signal" 1>&6
3331 cat >> confdefs.h <<EOF
3332 #define RETSIGTYPE $ac_cv_type_signal
3333 EOF
3334
3335
3336 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3337 echo "configure:3338: checking for uid_t in sys/types.h" >&5
3338 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3339   echo $ac_n "(cached) $ac_c" 1>&6
3340 else
3341   cat > conftest.$ac_ext <<EOF
3342 #line 3343 "configure"
3343 #include "confdefs.h"
3344 #include <sys/types.h>
3345 EOF
3346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3347   egrep "uid_t" >/dev/null 2>&1; then
3348   rm -rf conftest*
3349   ac_cv_type_uid_t=yes
3350 else
3351   rm -rf conftest*
3352   ac_cv_type_uid_t=no
3353 fi
3354 rm -f conftest*
3355
3356 fi
3357
3358 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3359 if test $ac_cv_type_uid_t = no; then
3360   cat >> confdefs.h <<\EOF
3361 #define uid_t int
3362 EOF
3363
3364   cat >> confdefs.h <<\EOF
3365 #define gid_t int
3366 EOF
3367
3368 fi
3369
3370 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3371 echo "configure:3372: checking for mode_t" >&5
3372 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3373   echo $ac_n "(cached) $ac_c" 1>&6
3374 else
3375   cat > conftest.$ac_ext <<EOF
3376 #line 3377 "configure"
3377 #include "confdefs.h"
3378 #include <sys/types.h>
3379 #if STDC_HEADERS
3380 #include <stdlib.h>
3381 #include <stddef.h>
3382 #endif
3383 EOF
3384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3385   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3386   rm -rf conftest*
3387   ac_cv_type_mode_t=yes
3388 else
3389   rm -rf conftest*
3390   ac_cv_type_mode_t=no
3391 fi
3392 rm -f conftest*
3393
3394 fi
3395 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3396 if test $ac_cv_type_mode_t = no; then
3397   cat >> confdefs.h <<\EOF
3398 #define mode_t int
3399 EOF
3400
3401 fi
3402
3403 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3404 echo "configure:3405: checking for off_t" >&5
3405 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3406   echo $ac_n "(cached) $ac_c" 1>&6
3407 else
3408   cat > conftest.$ac_ext <<EOF
3409 #line 3410 "configure"
3410 #include "confdefs.h"
3411 #include <sys/types.h>
3412 #if STDC_HEADERS
3413 #include <stdlib.h>
3414 #include <stddef.h>
3415 #endif
3416 EOF
3417 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3418   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3419   rm -rf conftest*
3420   ac_cv_type_off_t=yes
3421 else
3422   rm -rf conftest*
3423   ac_cv_type_off_t=no
3424 fi
3425 rm -f conftest*
3426
3427 fi
3428 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3429 if test $ac_cv_type_off_t = no; then
3430   cat >> confdefs.h <<\EOF
3431 #define off_t long
3432 EOF
3433
3434 fi
3435
3436 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3437 echo "configure:3438: checking for size_t" >&5
3438 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3439   echo $ac_n "(cached) $ac_c" 1>&6
3440 else
3441   cat > conftest.$ac_ext <<EOF
3442 #line 3443 "configure"
3443 #include "confdefs.h"
3444 #include <sys/types.h>
3445 #if STDC_HEADERS
3446 #include <stdlib.h>
3447 #include <stddef.h>
3448 #endif
3449 EOF
3450 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3451   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3452   rm -rf conftest*
3453   ac_cv_type_size_t=yes
3454 else
3455   rm -rf conftest*
3456   ac_cv_type_size_t=no
3457 fi
3458 rm -f conftest*
3459
3460 fi
3461 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3462 if test $ac_cv_type_size_t = no; then
3463   cat >> confdefs.h <<\EOF
3464 #define size_t unsigned
3465 EOF
3466
3467 fi
3468
3469 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3470 echo "configure:3471: checking for pid_t" >&5
3471 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3472   echo $ac_n "(cached) $ac_c" 1>&6
3473 else
3474   cat > conftest.$ac_ext <<EOF
3475 #line 3476 "configure"
3476 #include "confdefs.h"
3477 #include <sys/types.h>
3478 #if STDC_HEADERS
3479 #include <stdlib.h>
3480 #include <stddef.h>
3481 #endif
3482 EOF
3483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3484   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3485   rm -rf conftest*
3486   ac_cv_type_pid_t=yes
3487 else
3488   rm -rf conftest*
3489   ac_cv_type_pid_t=no
3490 fi
3491 rm -f conftest*
3492
3493 fi
3494 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3495 if test $ac_cv_type_pid_t = no; then
3496   cat >> confdefs.h <<\EOF
3497 #define pid_t int
3498 EOF
3499
3500 fi
3501
3502 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3503 echo "configure:3504: checking for st_rdev in struct stat" >&5
3504 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3505   echo $ac_n "(cached) $ac_c" 1>&6
3506 else
3507   cat > conftest.$ac_ext <<EOF
3508 #line 3509 "configure"
3509 #include "confdefs.h"
3510 #include <sys/types.h>
3511 #include <sys/stat.h>
3512 int main() {
3513 struct stat s; s.st_rdev;
3514 ; return 0; }
3515 EOF
3516 if { (eval echo configure:3517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3517   rm -rf conftest*
3518   ac_cv_struct_st_rdev=yes
3519 else
3520   echo "configure: failed program was:" >&5
3521   cat conftest.$ac_ext >&5
3522   rm -rf conftest*
3523   ac_cv_struct_st_rdev=no
3524 fi
3525 rm -f conftest*
3526 fi
3527
3528 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3529 if test $ac_cv_struct_st_rdev = yes; then
3530   cat >> confdefs.h <<\EOF
3531 #define HAVE_ST_RDEV 1
3532 EOF
3533
3534 fi
3535
3536 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3537 echo "configure:3538: checking for d_off in dirent" >&5
3538 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3539   echo $ac_n "(cached) $ac_c" 1>&6
3540 else
3541   cat > conftest.$ac_ext <<EOF
3542 #line 3543 "configure"
3543 #include "confdefs.h"
3544
3545 #include <unistd.h>
3546 #include <sys/types.h>
3547 #include <dirent.h>
3548 int main() {
3549 struct dirent d; d.d_off;
3550 ; return 0; }
3551 EOF
3552 if { (eval echo configure:3553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3553   rm -rf conftest*
3554   ac_cv_dirent_d_off=yes
3555 else
3556   echo "configure: failed program was:" >&5
3557   cat conftest.$ac_ext >&5
3558   rm -rf conftest*
3559   ac_cv_dirent_d_off=no
3560 fi
3561 rm -f conftest*
3562 fi
3563
3564 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3565 if test $ac_cv_dirent_d_off = yes; then
3566   cat >> confdefs.h <<\EOF
3567 #define HAVE_DIRENT_D_OFF 1
3568 EOF
3569
3570 fi
3571
3572 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3573 echo "configure:3574: checking for ino_t" >&5
3574 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3575   echo $ac_n "(cached) $ac_c" 1>&6
3576 else
3577   cat > conftest.$ac_ext <<EOF
3578 #line 3579 "configure"
3579 #include "confdefs.h"
3580 #include <sys/types.h>
3581 #if STDC_HEADERS
3582 #include <stdlib.h>
3583 #include <stddef.h>
3584 #endif
3585 EOF
3586 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3587   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3588   rm -rf conftest*
3589   ac_cv_type_ino_t=yes
3590 else
3591   rm -rf conftest*
3592   ac_cv_type_ino_t=no
3593 fi
3594 rm -f conftest*
3595
3596 fi
3597 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3598 if test $ac_cv_type_ino_t = no; then
3599   cat >> confdefs.h <<\EOF
3600 #define ino_t unsigned
3601 EOF
3602
3603 fi
3604
3605 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3606 echo "configure:3607: checking for loff_t" >&5
3607 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3608   echo $ac_n "(cached) $ac_c" 1>&6
3609 else
3610   cat > conftest.$ac_ext <<EOF
3611 #line 3612 "configure"
3612 #include "confdefs.h"
3613 #include <sys/types.h>
3614 #if STDC_HEADERS
3615 #include <stdlib.h>
3616 #include <stddef.h>
3617 #endif
3618 EOF
3619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3620   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3621   rm -rf conftest*
3622   ac_cv_type_loff_t=yes
3623 else
3624   rm -rf conftest*
3625   ac_cv_type_loff_t=no
3626 fi
3627 rm -f conftest*
3628
3629 fi
3630 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3631 if test $ac_cv_type_loff_t = no; then
3632   cat >> confdefs.h <<\EOF
3633 #define loff_t off_t
3634 EOF
3635
3636 fi
3637
3638 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3639 echo "configure:3640: checking for offset_t" >&5
3640 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3641   echo $ac_n "(cached) $ac_c" 1>&6
3642 else
3643   cat > conftest.$ac_ext <<EOF
3644 #line 3645 "configure"
3645 #include "confdefs.h"
3646 #include <sys/types.h>
3647 #if STDC_HEADERS
3648 #include <stdlib.h>
3649 #include <stddef.h>
3650 #endif
3651 EOF
3652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3653   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3654   rm -rf conftest*
3655   ac_cv_type_offset_t=yes
3656 else
3657   rm -rf conftest*
3658   ac_cv_type_offset_t=no
3659 fi
3660 rm -f conftest*
3661
3662 fi
3663 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3664 if test $ac_cv_type_offset_t = no; then
3665   cat >> confdefs.h <<\EOF
3666 #define offset_t loff_t
3667 EOF
3668
3669 fi
3670
3671 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3672 echo "configure:3673: checking for ssize_t" >&5
3673 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3674   echo $ac_n "(cached) $ac_c" 1>&6
3675 else
3676   cat > conftest.$ac_ext <<EOF
3677 #line 3678 "configure"
3678 #include "confdefs.h"
3679 #include <sys/types.h>
3680 #if STDC_HEADERS
3681 #include <stdlib.h>
3682 #include <stddef.h>
3683 #endif
3684 EOF
3685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3686   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3687   rm -rf conftest*
3688   ac_cv_type_ssize_t=yes
3689 else
3690   rm -rf conftest*
3691   ac_cv_type_ssize_t=no
3692 fi
3693 rm -f conftest*
3694
3695 fi
3696 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3697 if test $ac_cv_type_ssize_t = no; then
3698   cat >> confdefs.h <<\EOF
3699 #define ssize_t int
3700 EOF
3701
3702 fi
3703
3704 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3705 echo "configure:3706: checking for wchar_t" >&5
3706 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3707   echo $ac_n "(cached) $ac_c" 1>&6
3708 else
3709   cat > conftest.$ac_ext <<EOF
3710 #line 3711 "configure"
3711 #include "confdefs.h"
3712 #include <sys/types.h>
3713 #if STDC_HEADERS
3714 #include <stdlib.h>
3715 #include <stddef.h>
3716 #endif
3717 EOF
3718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3719   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3720   rm -rf conftest*
3721   ac_cv_type_wchar_t=yes
3722 else
3723   rm -rf conftest*
3724   ac_cv_type_wchar_t=no
3725 fi
3726 rm -f conftest*
3727
3728 fi
3729 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3730 if test $ac_cv_type_wchar_t = no; then
3731   cat >> confdefs.h <<\EOF
3732 #define wchar_t unsigned short
3733 EOF
3734
3735 fi
3736
3737
3738 ############################################
3739 # for cups support we need libcups, and a handful of header files
3740
3741 # Check whether --enable-cups or --disable-cups was given.
3742 if test "${enable_cups+set}" = set; then
3743   enableval="$enable_cups"
3744   :
3745 fi
3746
3747
3748 if test x$enable_cups != xno; then
3749         # Extract the first word of "cups-config", so it can be a program name with args.
3750 set dummy cups-config; ac_word=$2
3751 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3752 echo "configure:3753: checking for $ac_word" >&5
3753 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
3754   echo $ac_n "(cached) $ac_c" 1>&6
3755 else
3756   case "$CUPS_CONFIG" in
3757   /*)
3758   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
3759   ;;
3760   ?:/*)                  
3761   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path.
3762   ;;
3763   *)
3764   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3765   ac_dummy="$PATH"
3766   for ac_dir in $ac_dummy; do 
3767     test -z "$ac_dir" && ac_dir=.
3768     if test -f $ac_dir/$ac_word; then
3769       ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word"
3770       break
3771     fi
3772   done
3773   IFS="$ac_save_ifs"
3774   ;;
3775 esac
3776 fi
3777 CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG"
3778 if test -n "$CUPS_CONFIG"; then
3779   echo "$ac_t""$CUPS_CONFIG" 1>&6
3780 else
3781   echo "$ac_t""no" 1>&6
3782 fi
3783
3784
3785         if test "x$CUPS_CONFIG" != x; then
3786                         cat >> confdefs.h <<\EOF
3787 #define HAVE_CUPS 1
3788 EOF
3789
3790                 CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
3791                 LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
3792                 PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`"
3793         fi
3794 fi
3795
3796 ############################################
3797 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3798 for ac_func in dlopen
3799 do
3800 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3801 echo "configure:3802: checking for $ac_func" >&5
3802 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3803   echo $ac_n "(cached) $ac_c" 1>&6
3804 else
3805   cat > conftest.$ac_ext <<EOF
3806 #line 3807 "configure"
3807 #include "confdefs.h"
3808 /* System header to define __stub macros and hopefully few prototypes,
3809     which can conflict with char $ac_func(); below.  */
3810 #include <assert.h>
3811 /* Override any gcc2 internal prototype to avoid an error.  */
3812 /* We use char because int might match the return type of a gcc2
3813     builtin and then its argument prototype would still apply.  */
3814 char $ac_func();
3815
3816 int main() {
3817
3818 /* The GNU C library defines this for functions which it implements
3819     to always fail with ENOSYS.  Some functions are actually named
3820     something starting with __ and the normal name is an alias.  */
3821 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3822 choke me
3823 #else
3824 $ac_func();
3825 #endif
3826
3827 ; return 0; }
3828 EOF
3829 if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3830   rm -rf conftest*
3831   eval "ac_cv_func_$ac_func=yes"
3832 else
3833   echo "configure: failed program was:" >&5
3834   cat conftest.$ac_ext >&5
3835   rm -rf conftest*
3836   eval "ac_cv_func_$ac_func=no"
3837 fi
3838 rm -f conftest*
3839 fi
3840
3841 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3842   echo "$ac_t""yes" 1>&6
3843     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3844   cat >> confdefs.h <<EOF
3845 #define $ac_tr_func 1
3846 EOF
3847  
3848 else
3849   echo "$ac_t""no" 1>&6
3850 fi
3851 done
3852
3853 if test x"$ac_cv_func_dlopen" = x"no"; then
3854     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3855 echo "configure:3856: checking for dlopen in -ldl" >&5
3856 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3857 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3858   echo $ac_n "(cached) $ac_c" 1>&6
3859 else
3860   ac_save_LIBS="$LIBS"
3861 LIBS="-ldl  $LIBS"
3862 cat > conftest.$ac_ext <<EOF
3863 #line 3864 "configure"
3864 #include "confdefs.h"
3865 /* Override any gcc2 internal prototype to avoid an error.  */
3866 /* We use char because int might match the return type of a gcc2
3867     builtin and then its argument prototype would still apply.  */
3868 char dlopen();
3869
3870 int main() {
3871 dlopen()
3872 ; return 0; }
3873 EOF
3874 if { (eval echo configure:3875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3875   rm -rf conftest*
3876   eval "ac_cv_lib_$ac_lib_var=yes"
3877 else
3878   echo "configure: failed program was:" >&5
3879   cat conftest.$ac_ext >&5
3880   rm -rf conftest*
3881   eval "ac_cv_lib_$ac_lib_var=no"
3882 fi
3883 rm -f conftest*
3884 LIBS="$ac_save_LIBS"
3885
3886 fi
3887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3888   echo "$ac_t""yes" 1>&6
3889   LIBS="$LIBS -ldl";
3890         cat >> confdefs.h <<\EOF
3891 #define HAVE_DLOPEN 1
3892 EOF
3893
3894 else
3895   echo "$ac_t""no" 1>&6
3896 fi
3897
3898 fi
3899 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3900
3901 ############################################
3902 # check if the compiler can do immediate structures
3903 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3904 echo "configure:3905: checking for immediate structures" >&5
3905 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3906   echo $ac_n "(cached) $ac_c" 1>&6
3907 else
3908   
3909     cat > conftest.$ac_ext <<EOF
3910 #line 3911 "configure"
3911 #include "confdefs.h"
3912
3913 #include <stdio.h>
3914 int main() {
3915
3916    typedef struct {unsigned x;} FOOBAR;
3917    #define X_FOOBAR(x) ((FOOBAR) { x })
3918    #define FOO_ONE X_FOOBAR(1)
3919    FOOBAR f = FOO_ONE;   
3920    static struct {
3921         FOOBAR y; 
3922         } f2[] = {
3923                 {FOO_ONE}
3924         };   
3925
3926 ; return 0; }
3927 EOF
3928 if { (eval echo configure:3929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3929   rm -rf conftest*
3930   samba_cv_immediate_structures=yes
3931 else
3932   echo "configure: failed program was:" >&5
3933   cat conftest.$ac_ext >&5
3934   rm -rf conftest*
3935   samba_cv_immediate_structures=no
3936 fi
3937 rm -f conftest*
3938 fi
3939
3940 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3941 if test x"$samba_cv_immediate_structures" = x"yes"; then
3942    cat >> confdefs.h <<\EOF
3943 #define HAVE_IMMEDIATE_STRUCTURES 1
3944 EOF
3945
3946 fi
3947
3948 ############################################
3949 # check for unix domain sockets
3950 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3951 echo "configure:3952: checking for unix domain sockets" >&5
3952 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3953   echo $ac_n "(cached) $ac_c" 1>&6
3954 else
3955   
3956     cat > conftest.$ac_ext <<EOF
3957 #line 3958 "configure"
3958 #include "confdefs.h"
3959
3960 #include <sys/types.h>
3961 #include <stdlib.h>
3962 #include <stddef.h>
3963 #include <sys/socket.h>
3964 #include <sys/un.h>
3965 int main() {
3966
3967   struct sockaddr_un sunaddr; 
3968   sunaddr.sun_family = AF_UNIX;
3969
3970 ; return 0; }
3971 EOF
3972 if { (eval echo configure:3973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3973   rm -rf conftest*
3974   samba_cv_unixsocket=yes
3975 else
3976   echo "configure: failed program was:" >&5
3977   cat conftest.$ac_ext >&5
3978   rm -rf conftest*
3979   samba_cv_unixsocket=no
3980 fi
3981 rm -f conftest*
3982 fi
3983
3984 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3985 if test x"$samba_cv_unixsocket" = x"yes"; then
3986    cat >> confdefs.h <<\EOF
3987 #define HAVE_UNIXSOCKET 1
3988 EOF
3989
3990 fi
3991
3992
3993 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3994 echo "configure:3995: checking for socklen_t type" >&5
3995 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3996   echo $ac_n "(cached) $ac_c" 1>&6
3997 else
3998   
3999     cat > conftest.$ac_ext <<EOF
4000 #line 4001 "configure"
4001 #include "confdefs.h"
4002
4003 #include <sys/types.h>
4004 #if STDC_HEADERS
4005 #include <stdlib.h>
4006 #include <stddef.h>
4007 #endif
4008 #include <sys/socket.h>
4009 int main() {
4010 socklen_t i = 0
4011 ; return 0; }
4012 EOF
4013 if { (eval echo configure:4014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4014   rm -rf conftest*
4015   samba_cv_socklen_t=yes
4016 else
4017   echo "configure: failed program was:" >&5
4018   cat conftest.$ac_ext >&5
4019   rm -rf conftest*
4020   samba_cv_socklen_t=no
4021 fi
4022 rm -f conftest*
4023 fi
4024
4025 echo "$ac_t""$samba_cv_socklen_t" 1>&6
4026 if test x"$samba_cv_socklen_t" = x"yes"; then
4027    cat >> confdefs.h <<\EOF
4028 #define HAVE_SOCKLEN_T_TYPE 1
4029 EOF
4030
4031 fi
4032
4033 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
4034 echo "configure:4035: checking for sig_atomic_t type" >&5
4035 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
4036   echo $ac_n "(cached) $ac_c" 1>&6
4037 else
4038   
4039     cat > conftest.$ac_ext <<EOF
4040 #line 4041 "configure"
4041 #include "confdefs.h"
4042
4043 #include <sys/types.h>
4044 #if STDC_HEADERS
4045 #include <stdlib.h>
4046 #include <stddef.h>
4047 #endif
4048 #include <signal.h>
4049 int main() {
4050 sig_atomic_t i = 0
4051 ; return 0; }
4052 EOF
4053 if { (eval echo configure:4054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4054   rm -rf conftest*
4055   samba_cv_sig_atomic_t=yes
4056 else
4057   echo "configure: failed program was:" >&5
4058   cat conftest.$ac_ext >&5
4059   rm -rf conftest*
4060   samba_cv_sig_atomic_t=no
4061 fi
4062 rm -f conftest*
4063 fi
4064
4065 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4066 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4067    cat >> confdefs.h <<\EOF
4068 #define HAVE_SIG_ATOMIC_T_TYPE 1
4069 EOF
4070
4071 fi
4072
4073 # stupid headers have the functions but no declaration. grrrr.
4074
4075  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4076 echo "configure:4077: checking for errno declaration" >&5
4077 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4078   echo $ac_n "(cached) $ac_c" 1>&6
4079 else
4080   
4081     cat > conftest.$ac_ext <<EOF
4082 #line 4083 "configure"
4083 #include "confdefs.h"
4084 #include <errno.h>
4085 int main() {
4086 int i = (int)errno
4087 ; return 0; }
4088 EOF
4089 if { (eval echo configure:4090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4090   rm -rf conftest*
4091   ac_cv_have_errno_decl=yes
4092 else
4093   echo "configure: failed program was:" >&5
4094   cat conftest.$ac_ext >&5
4095   rm -rf conftest*
4096   ac_cv_have_errno_decl=no
4097 fi
4098 rm -f conftest*
4099 fi
4100
4101 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4102  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4103     cat >> confdefs.h <<\EOF
4104 #define HAVE_ERRNO_DECL 1
4105 EOF
4106
4107  fi
4108
4109
4110  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4111 echo "configure:4112: checking for setresuid declaration" >&5
4112 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4113   echo $ac_n "(cached) $ac_c" 1>&6
4114 else
4115   
4116     cat > conftest.$ac_ext <<EOF
4117 #line 4118 "configure"
4118 #include "confdefs.h"
4119 #include <unistd.h>
4120 int main() {
4121 int i = (int)setresuid
4122 ; return 0; }
4123 EOF
4124 if { (eval echo configure:4125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4125   rm -rf conftest*
4126   ac_cv_have_setresuid_decl=yes
4127 else
4128   echo "configure: failed program was:" >&5
4129   cat conftest.$ac_ext >&5
4130   rm -rf conftest*
4131   ac_cv_have_setresuid_decl=no
4132 fi
4133 rm -f conftest*
4134 fi
4135
4136 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4137  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4138     cat >> confdefs.h <<\EOF
4139 #define HAVE_SETRESUID_DECL 1
4140 EOF
4141
4142  fi
4143
4144
4145  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4146 echo "configure:4147: checking for setresgid declaration" >&5
4147 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4148   echo $ac_n "(cached) $ac_c" 1>&6
4149 else
4150   
4151     cat > conftest.$ac_ext <<EOF
4152 #line 4153 "configure"
4153 #include "confdefs.h"
4154 #include <unistd.h>
4155 int main() {
4156 int i = (int)setresgid
4157 ; return 0; }
4158 EOF
4159 if { (eval echo configure:4160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4160   rm -rf conftest*
4161   ac_cv_have_setresgid_decl=yes
4162 else
4163   echo "configure: failed program was:" >&5
4164   cat conftest.$ac_ext >&5
4165   rm -rf conftest*
4166   ac_cv_have_setresgid_decl=no
4167 fi
4168 rm -f conftest*
4169 fi
4170
4171 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4172  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4173     cat >> confdefs.h <<\EOF
4174 #define HAVE_SETRESGID_DECL 1
4175 EOF
4176
4177  fi
4178
4179
4180  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4181 echo "configure:4182: checking for asprintf declaration" >&5
4182 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4183   echo $ac_n "(cached) $ac_c" 1>&6
4184 else
4185   
4186     cat > conftest.$ac_ext <<EOF
4187 #line 4188 "configure"
4188 #include "confdefs.h"
4189 #include <stdio.h>
4190 int main() {
4191 int i = (int)asprintf
4192 ; return 0; }
4193 EOF
4194 if { (eval echo configure:4195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4195   rm -rf conftest*
4196   ac_cv_have_asprintf_decl=yes
4197 else
4198   echo "configure: failed program was:" >&5
4199   cat conftest.$ac_ext >&5
4200   rm -rf conftest*
4201   ac_cv_have_asprintf_decl=no
4202 fi
4203 rm -f conftest*
4204 fi
4205
4206 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4207  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4208     cat >> confdefs.h <<\EOF
4209 #define HAVE_ASPRINTF_DECL 1
4210 EOF
4211
4212  fi
4213
4214
4215  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4216 echo "configure:4217: checking for vasprintf declaration" >&5
4217 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4218   echo $ac_n "(cached) $ac_c" 1>&6
4219 else
4220   
4221     cat > conftest.$ac_ext <<EOF
4222 #line 4223 "configure"
4223 #include "confdefs.h"
4224 #include <stdio.h>
4225 int main() {
4226 int i = (int)vasprintf
4227 ; return 0; }
4228 EOF
4229 if { (eval echo configure:4230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4230   rm -rf conftest*
4231   ac_cv_have_vasprintf_decl=yes
4232 else
4233   echo "configure: failed program was:" >&5
4234   cat conftest.$ac_ext >&5
4235   rm -rf conftest*
4236   ac_cv_have_vasprintf_decl=no
4237 fi
4238 rm -f conftest*
4239 fi
4240
4241 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4242  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4243     cat >> confdefs.h <<\EOF
4244 #define HAVE_VASPRINTF_DECL 1
4245 EOF
4246
4247  fi
4248
4249
4250  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4251 echo "configure:4252: checking for vsnprintf declaration" >&5
4252 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4253   echo $ac_n "(cached) $ac_c" 1>&6
4254 else
4255   
4256     cat > conftest.$ac_ext <<EOF
4257 #line 4258 "configure"
4258 #include "confdefs.h"
4259 #include <stdio.h>
4260 int main() {
4261 int i = (int)vsnprintf
4262 ; return 0; }
4263 EOF
4264 if { (eval echo configure:4265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4265   rm -rf conftest*
4266   ac_cv_have_vsnprintf_decl=yes
4267 else
4268   echo "configure: failed program was:" >&5
4269   cat conftest.$ac_ext >&5
4270   rm -rf conftest*
4271   ac_cv_have_vsnprintf_decl=no
4272 fi
4273 rm -f conftest*
4274 fi
4275
4276 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4277  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4278     cat >> confdefs.h <<\EOF
4279 #define HAVE_VSNPRINTF_DECL 1
4280 EOF
4281
4282  fi
4283
4284
4285  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4286 echo "configure:4287: checking for snprintf declaration" >&5
4287 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4288   echo $ac_n "(cached) $ac_c" 1>&6
4289 else
4290   
4291     cat > conftest.$ac_ext <<EOF
4292 #line 4293 "configure"
4293 #include "confdefs.h"
4294 #include <stdio.h>
4295 int main() {
4296 int i = (int)snprintf
4297 ; return 0; }
4298 EOF
4299 if { (eval echo configure:4300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4300   rm -rf conftest*
4301   ac_cv_have_snprintf_decl=yes
4302 else
4303   echo "configure: failed program was:" >&5
4304   cat conftest.$ac_ext >&5
4305   rm -rf conftest*
4306   ac_cv_have_snprintf_decl=no
4307 fi
4308 rm -f conftest*
4309 fi
4310
4311 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4312  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4313     cat >> confdefs.h <<\EOF
4314 #define HAVE_SNPRINTF_DECL 1
4315 EOF
4316
4317  fi
4318
4319
4320 # and glibc has setresuid under linux but the function does
4321 # nothing until kernel 2.1.44! very dumb.
4322 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4323 echo "configure:4324: checking for real setresuid" >&5
4324 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4325   echo $ac_n "(cached) $ac_c" 1>&6
4326 else
4327   
4328     if test "$cross_compiling" = yes; then
4329   samba_cv_have_setresuid=cross
4330 else
4331   cat > conftest.$ac_ext <<EOF
4332 #line 4333 "configure"
4333 #include "confdefs.h"
4334 #include <errno.h>
4335 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4336 EOF
4337 if { (eval echo configure:4338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4338 then
4339   samba_cv_have_setresuid=yes
4340 else
4341   echo "configure: failed program was:" >&5
4342   cat conftest.$ac_ext >&5
4343   rm -fr conftest*
4344   samba_cv_have_setresuid=no
4345 fi
4346 rm -fr conftest*
4347 fi
4348
4349 fi
4350
4351 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4352 if test x"$samba_cv_have_setresuid" = x"yes"; then
4353     cat >> confdefs.h <<\EOF
4354 #define HAVE_SETRESUID 1
4355 EOF
4356
4357 fi
4358
4359 # Do the same check for setresguid...
4360 #
4361 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4362 echo "configure:4363: checking for real setresgid" >&5
4363 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4364   echo $ac_n "(cached) $ac_c" 1>&6
4365 else
4366   
4367     if test "$cross_compiling" = yes; then
4368   samba_cv_have_setresgid=cross
4369 else
4370   cat > conftest.$ac_ext <<EOF
4371 #line 4372 "configure"
4372 #include "confdefs.h"
4373 #include <unistd.h>
4374 #include <errno.h>
4375 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4376 EOF
4377 if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4378 then
4379   samba_cv_have_setresgid=yes
4380 else
4381   echo "configure: failed program was:" >&5
4382   cat conftest.$ac_ext >&5
4383   rm -fr conftest*
4384   samba_cv_have_setresgid=no
4385 fi
4386 rm -fr conftest*
4387 fi
4388
4389 fi
4390
4391 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4392 if test x"$samba_cv_have_setresgid" = x"yes"; then
4393     cat >> confdefs.h <<\EOF
4394 #define HAVE_SETRESGID 1
4395 EOF
4396
4397 fi
4398
4399 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4400 echo "configure:4401: checking for 8-bit clean memcmp" >&5
4401 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4402   echo $ac_n "(cached) $ac_c" 1>&6
4403 else
4404   if test "$cross_compiling" = yes; then
4405   ac_cv_func_memcmp_clean=no
4406 else
4407   cat > conftest.$ac_ext <<EOF
4408 #line 4409 "configure"
4409 #include "confdefs.h"
4410
4411 main()
4412 {
4413   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4414   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4415 }
4416
4417 EOF
4418 if { (eval echo configure:4419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4419 then
4420   ac_cv_func_memcmp_clean=yes
4421 else
4422   echo "configure: failed program was:" >&5
4423   cat conftest.$ac_ext >&5
4424   rm -fr conftest*
4425   ac_cv_func_memcmp_clean=no
4426 fi
4427 rm -fr conftest*
4428 fi
4429
4430 fi
4431
4432 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4433 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4434
4435
4436 ###############################################
4437 # test for where we get crypt() from
4438 for ac_func in crypt
4439 do
4440 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4441 echo "configure:4442: checking for $ac_func" >&5
4442 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4443   echo $ac_n "(cached) $ac_c" 1>&6
4444 else
4445   cat > conftest.$ac_ext <<EOF
4446 #line 4447 "configure"
4447 #include "confdefs.h"
4448 /* System header to define __stub macros and hopefully few prototypes,
4449     which can conflict with char $ac_func(); below.  */
4450 #include <assert.h>
4451 /* Override any gcc2 internal prototype to avoid an error.  */
4452 /* We use char because int might match the return type of a gcc2
4453     builtin and then its argument prototype would still apply.  */
4454 char $ac_func();
4455
4456 int main() {
4457
4458 /* The GNU C library defines this for functions which it implements
4459     to always fail with ENOSYS.  Some functions are actually named
4460     something starting with __ and the normal name is an alias.  */
4461 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4462 choke me
4463 #else
4464 $ac_func();
4465 #endif
4466
4467 ; return 0; }
4468 EOF
4469 if { (eval echo configure:4470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4470   rm -rf conftest*
4471   eval "ac_cv_func_$ac_func=yes"
4472 else
4473   echo "configure: failed program was:" >&5
4474   cat conftest.$ac_ext >&5
4475   rm -rf conftest*
4476   eval "ac_cv_func_$ac_func=no"
4477 fi
4478 rm -f conftest*
4479 fi
4480
4481 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4482   echo "$ac_t""yes" 1>&6
4483     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4484   cat >> confdefs.h <<EOF
4485 #define $ac_tr_func 1
4486 EOF
4487  
4488 else
4489   echo "$ac_t""no" 1>&6
4490 fi
4491 done
4492
4493 if test x"$ac_cv_func_crypt" = x"no"; then
4494     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4495 echo "configure:4496: checking for crypt in -lcrypt" >&5
4496 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4497 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4498   echo $ac_n "(cached) $ac_c" 1>&6
4499 else
4500   ac_save_LIBS="$LIBS"
4501 LIBS="-lcrypt  $LIBS"
4502 cat > conftest.$ac_ext <<EOF
4503 #line 4504 "configure"
4504 #include "confdefs.h"
4505 /* Override any gcc2 internal prototype to avoid an error.  */
4506 /* We use char because int might match the return type of a gcc2
4507     builtin and then its argument prototype would still apply.  */
4508 char crypt();
4509
4510 int main() {
4511 crypt()
4512 ; return 0; }
4513 EOF
4514 if { (eval echo configure:4515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4515   rm -rf conftest*
4516   eval "ac_cv_lib_$ac_lib_var=yes"
4517 else
4518   echo "configure: failed program was:" >&5
4519   cat conftest.$ac_ext >&5
4520   rm -rf conftest*
4521   eval "ac_cv_lib_$ac_lib_var=no"
4522 fi
4523 rm -f conftest*
4524 LIBS="$ac_save_LIBS"
4525
4526 fi
4527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4528   echo "$ac_t""yes" 1>&6
4529   LIBS="$LIBS -lcrypt";
4530         cat >> confdefs.h <<\EOF
4531 #define HAVE_CRYPT 1
4532 EOF
4533
4534 else
4535   echo "$ac_t""no" 1>&6
4536 fi
4537
4538 fi
4539
4540
4541 ###############################################
4542 # Readline included by default unless explicitly asked not to
4543 test "${with_readline+set}" != "set" && with_readline=yes
4544
4545 # test for where we get readline() from
4546 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4547 echo "configure:4548: checking whether to use readline" >&5
4548 # Check whether --with-readline or --without-readline was given.
4549 if test "${with_readline+set}" = set; then
4550   withval="$with_readline"
4551     case "$with_readline" in
4552   yes)
4553     echo "$ac_t""yes" 1>&6
4554
4555     for ac_hdr in readline.h history.h readline/readline.h
4556 do
4557 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4558 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4559 echo "configure:4560: checking for $ac_hdr" >&5
4560 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4561   echo $ac_n "(cached) $ac_c" 1>&6
4562 else
4563   cat > conftest.$ac_ext <<EOF
4564 #line 4565 "configure"
4565 #include "confdefs.h"
4566 #include <$ac_hdr>
4567 EOF
4568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4569 { (eval echo configure:4570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4571 if test -z "$ac_err"; then
4572   rm -rf conftest*
4573   eval "ac_cv_header_$ac_safe=yes"
4574 else
4575   echo "$ac_err" >&5
4576   echo "configure: failed program was:" >&5
4577   cat conftest.$ac_ext >&5
4578   rm -rf conftest*
4579   eval "ac_cv_header_$ac_safe=no"
4580 fi
4581 rm -f conftest*
4582 fi
4583 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4584   echo "$ac_t""yes" 1>&6
4585     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4586   cat >> confdefs.h <<EOF
4587 #define $ac_tr_hdr 1
4588 EOF
4589  
4590 else
4591   echo "$ac_t""no" 1>&6
4592 fi
4593 done
4594
4595     for ac_hdr in readline/history.h
4596 do
4597 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4598 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4599 echo "configure:4600: checking for $ac_hdr" >&5
4600 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4601   echo $ac_n "(cached) $ac_c" 1>&6
4602 else
4603   cat > conftest.$ac_ext <<EOF
4604 #line 4605 "configure"
4605 #include "confdefs.h"
4606 #include <$ac_hdr>
4607 EOF
4608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4609 { (eval echo configure:4610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4611 if test -z "$ac_err"; then
4612   rm -rf conftest*
4613   eval "ac_cv_header_$ac_safe=yes"
4614 else
4615   echo "$ac_err" >&5
4616   echo "configure: failed program was:" >&5
4617   cat conftest.$ac_ext >&5
4618   rm -rf conftest*
4619   eval "ac_cv_header_$ac_safe=no"
4620 fi
4621 rm -f conftest*
4622 fi
4623 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4624   echo "$ac_t""yes" 1>&6
4625     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4626   cat >> confdefs.h <<EOF
4627 #define $ac_tr_hdr 1
4628 EOF
4629  
4630 else
4631   echo "$ac_t""no" 1>&6
4632 fi
4633 done
4634
4635
4636     for ac_hdr in readline.h readline/readline.h
4637 do
4638 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4639 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4640 echo "configure:4641: checking for $ac_hdr" >&5
4641 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4642   echo $ac_n "(cached) $ac_c" 1>&6
4643 else
4644   cat > conftest.$ac_ext <<EOF
4645 #line 4646 "configure"
4646 #include "confdefs.h"
4647 #include <$ac_hdr>
4648 EOF
4649 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4650 { (eval echo configure:4651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4651 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4652 if test -z "$ac_err"; then
4653   rm -rf conftest*
4654   eval "ac_cv_header_$ac_safe=yes"
4655 else
4656   echo "$ac_err" >&5
4657   echo "configure: failed program was:" >&5
4658   cat conftest.$ac_ext >&5
4659   rm -rf conftest*
4660   eval "ac_cv_header_$ac_safe=no"
4661 fi
4662 rm -f conftest*
4663 fi
4664 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4665   echo "$ac_t""yes" 1>&6
4666     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4667   cat >> confdefs.h <<EOF
4668 #define $ac_tr_hdr 1
4669 EOF
4670  
4671       for termlib in ncurses curses termcap terminfo termlib; do
4672        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4673 echo "configure:4674: checking for tgetent in -l${termlib}" >&5
4674 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4675 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4676   echo $ac_n "(cached) $ac_c" 1>&6
4677 else
4678   ac_save_LIBS="$LIBS"
4679 LIBS="-l${termlib}  $LIBS"
4680 cat > conftest.$ac_ext <<EOF
4681 #line 4682 "configure"
4682 #include "confdefs.h"
4683 /* Override any gcc2 internal prototype to avoid an error.  */
4684 /* We use char because int might match the return type of a gcc2
4685     builtin and then its argument prototype would still apply.  */
4686 char tgetent();
4687
4688 int main() {
4689 tgetent()
4690 ; return 0; }
4691 EOF
4692 if { (eval echo configure:4693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4693   rm -rf conftest*
4694   eval "ac_cv_lib_$ac_lib_var=yes"
4695 else
4696   echo "configure: failed program was:" >&5
4697   cat conftest.$ac_ext >&5
4698   rm -rf conftest*
4699   eval "ac_cv_lib_$ac_lib_var=no"
4700 fi
4701 rm -f conftest*
4702 LIBS="$ac_save_LIBS"
4703
4704 fi
4705 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4706   echo "$ac_t""yes" 1>&6
4707   TERMLIBS="-l${termlib}"; break
4708 else
4709   echo "$ac_t""no" 1>&6
4710 fi
4711
4712       done
4713       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4714 echo "configure:4715: checking for rl_callback_handler_install in -lreadline" >&5
4715 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4716 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4717   echo $ac_n "(cached) $ac_c" 1>&6
4718 else
4719   ac_save_LIBS="$LIBS"
4720 LIBS="-lreadline $TERMLIBS $LIBS"
4721 cat > conftest.$ac_ext <<EOF
4722 #line 4723 "configure"
4723 #include "confdefs.h"
4724 /* Override any gcc2 internal prototype to avoid an error.  */
4725 /* We use char because int might match the return type of a gcc2
4726     builtin and then its argument prototype would still apply.  */
4727 char rl_callback_handler_install();
4728
4729 int main() {
4730 rl_callback_handler_install()
4731 ; return 0; }
4732 EOF
4733 if { (eval echo configure:4734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4734   rm -rf conftest*
4735   eval "ac_cv_lib_$ac_lib_var=yes"
4736 else
4737   echo "configure: failed program was:" >&5
4738   cat conftest.$ac_ext >&5
4739   rm -rf conftest*
4740   eval "ac_cv_lib_$ac_lib_var=no"
4741 fi
4742 rm -f conftest*
4743 LIBS="$ac_save_LIBS"
4744
4745 fi
4746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4747   echo "$ac_t""yes" 1>&6
4748   TERMLIBS="-lreadline $TERMLIBS"
4749        cat >> confdefs.h <<\EOF
4750 #define HAVE_LIBREADLINE 1
4751 EOF
4752
4753        break
4754 else
4755   echo "$ac_t""no" 1>&6
4756 TERMLIBS=
4757 fi
4758
4759 else
4760   echo "$ac_t""no" 1>&6
4761 fi
4762 done
4763
4764     ;;
4765   no)
4766     echo "$ac_t""no" 1>&6
4767     ;;
4768   *)
4769     echo "$ac_t""yes" 1>&6
4770
4771     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4772     # alternate readline path
4773     _ldflags=${LDFLAGS}
4774     _cppflags=${CPPFLAGS}
4775
4776     # Add additional search path
4777     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4778     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4779
4780     for ac_hdr in readline.h history.h readline/readline.h
4781 do
4782 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4783 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4784 echo "configure:4785: checking for $ac_hdr" >&5
4785 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4786   echo $ac_n "(cached) $ac_c" 1>&6
4787 else
4788   cat > conftest.$ac_ext <<EOF
4789 #line 4790 "configure"
4790 #include "confdefs.h"
4791 #include <$ac_hdr>
4792 EOF
4793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4794 { (eval echo configure:4795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4796 if test -z "$ac_err"; then
4797   rm -rf conftest*
4798   eval "ac_cv_header_$ac_safe=yes"
4799 else
4800   echo "$ac_err" >&5
4801   echo "configure: failed program was:" >&5
4802   cat conftest.$ac_ext >&5
4803   rm -rf conftest*
4804   eval "ac_cv_header_$ac_safe=no"
4805 fi
4806 rm -f conftest*
4807 fi
4808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4809   echo "$ac_t""yes" 1>&6
4810     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4811   cat >> confdefs.h <<EOF
4812 #define $ac_tr_hdr 1
4813 EOF
4814  
4815 else
4816   echo "$ac_t""no" 1>&6
4817 fi
4818 done
4819
4820     for ac_hdr in readline/history.h
4821 do
4822 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4823 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4824 echo "configure:4825: checking for $ac_hdr" >&5
4825 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4826   echo $ac_n "(cached) $ac_c" 1>&6
4827 else
4828   cat > conftest.$ac_ext <<EOF
4829 #line 4830 "configure"
4830 #include "confdefs.h"
4831 #include <$ac_hdr>
4832 EOF
4833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4834 { (eval echo configure:4835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4836 if test -z "$ac_err"; then
4837   rm -rf conftest*
4838   eval "ac_cv_header_$ac_safe=yes"
4839 else
4840   echo "$ac_err" >&5
4841   echo "configure: failed program was:" >&5
4842   cat conftest.$ac_ext >&5
4843   rm -rf conftest*
4844   eval "ac_cv_header_$ac_safe=no"
4845 fi
4846 rm -f conftest*
4847 fi
4848 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4849   echo "$ac_t""yes" 1>&6
4850     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4851   cat >> confdefs.h <<EOF
4852 #define $ac_tr_hdr 1
4853 EOF
4854  
4855 else
4856   echo "$ac_t""no" 1>&6
4857 fi
4858 done
4859
4860
4861     for ac_hdr in readline.h readline/readline.h
4862 do
4863 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4864 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4865 echo "configure:4866: checking for $ac_hdr" >&5
4866 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4867   echo $ac_n "(cached) $ac_c" 1>&6
4868 else
4869   cat > conftest.$ac_ext <<EOF
4870 #line 4871 "configure"
4871 #include "confdefs.h"
4872 #include <$ac_hdr>
4873 EOF
4874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4875 { (eval echo configure:4876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4877 if test -z "$ac_err"; then
4878   rm -rf conftest*
4879   eval "ac_cv_header_$ac_safe=yes"
4880 else
4881   echo "$ac_err" >&5
4882   echo "configure: failed program was:" >&5
4883   cat conftest.$ac_ext >&5
4884   rm -rf conftest*
4885   eval "ac_cv_header_$ac_safe=no"
4886 fi
4887 rm -f conftest*
4888 fi
4889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4890   echo "$ac_t""yes" 1>&6
4891     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4892   cat >> confdefs.h <<EOF
4893 #define $ac_tr_hdr 1
4894 EOF
4895  
4896       for termlib in ncurses curses termcap terminfo termlib; do
4897        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4898 echo "configure:4899: checking for tgetent in -l${termlib}" >&5
4899 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4900 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4901   echo $ac_n "(cached) $ac_c" 1>&6
4902 else
4903   ac_save_LIBS="$LIBS"
4904 LIBS="-l${termlib}  $LIBS"
4905 cat > conftest.$ac_ext <<EOF
4906 #line 4907 "configure"
4907 #include "confdefs.h"
4908 /* Override any gcc2 internal prototype to avoid an error.  */
4909 /* We use char because int might match the return type of a gcc2
4910     builtin and then its argument prototype would still apply.  */
4911 char tgetent();
4912
4913 int main() {
4914 tgetent()
4915 ; return 0; }
4916 EOF
4917 if { (eval echo configure:4918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4918   rm -rf conftest*
4919   eval "ac_cv_lib_$ac_lib_var=yes"
4920 else
4921   echo "configure: failed program was:" >&5
4922   cat conftest.$ac_ext >&5
4923   rm -rf conftest*
4924   eval "ac_cv_lib_$ac_lib_var=no"
4925 fi
4926 rm -f conftest*
4927 LIBS="$ac_save_LIBS"
4928
4929 fi
4930 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4931   echo "$ac_t""yes" 1>&6
4932   TERMLIBS="-l${termlib}"; break
4933 else
4934   echo "$ac_t""no" 1>&6
4935 fi
4936
4937       done
4938       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4939 echo "configure:4940: checking for rl_callback_handler_install in -lreadline" >&5
4940 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4941 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4942   echo $ac_n "(cached) $ac_c" 1>&6
4943 else
4944   ac_save_LIBS="$LIBS"
4945 LIBS="-lreadline $TERMLIBS $LIBS"
4946 cat > conftest.$ac_ext <<EOF
4947 #line 4948 "configure"
4948 #include "confdefs.h"
4949 /* Override any gcc2 internal prototype to avoid an error.  */
4950 /* We use char because int might match the return type of a gcc2
4951     builtin and then its argument prototype would still apply.  */
4952 char rl_callback_handler_install();
4953
4954 int main() {
4955 rl_callback_handler_install()
4956 ; return 0; }
4957 EOF
4958 if { (eval echo configure:4959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4959   rm -rf conftest*
4960   eval "ac_cv_lib_$ac_lib_var=yes"
4961 else
4962   echo "configure: failed program was:" >&5
4963   cat conftest.$ac_ext >&5
4964   rm -rf conftest*
4965   eval "ac_cv_lib_$ac_lib_var=no"
4966 fi
4967 rm -f conftest*
4968 LIBS="$ac_save_LIBS"
4969
4970 fi
4971 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4972   echo "$ac_t""yes" 1>&6
4973   TERMLDFLAGS="-L$with_readline/lib"
4974        TERMCPPFLAGS="-I$with_readline/include"
4975        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4976        TERMLIBS="-lreadline $TERMLIBS"
4977        cat >> confdefs.h <<\EOF
4978 #define HAVE_LIBREADLINE 1
4979 EOF
4980
4981        break
4982 else
4983   echo "$ac_t""no" 1>&6
4984 TERMLIBS= CPPFLAGS=$_cppflags
4985 fi
4986
4987 else
4988   echo "$ac_t""no" 1>&6
4989 fi
4990 done
4991
4992
4993     LDFLAGS=$_ldflags
4994     ;;
4995   esac
4996 else
4997   echo "$ac_t""no" 1>&6
4998
4999 fi
5000
5001
5002
5003
5004 # The readline API changed slightly from readline3 to readline4, so
5005 # code will generate warnings on one of them unless we have a few
5006 # special cases.
5007 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
5008 echo "configure:5009: checking for rl_completion_matches in -lreadline" >&5
5009 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
5010 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5011   echo $ac_n "(cached) $ac_c" 1>&6
5012 else
5013   ac_save_LIBS="$LIBS"
5014 LIBS="-lreadline $TERMLIBS $LIBS"
5015 cat > conftest.$ac_ext <<EOF
5016 #line 5017 "configure"
5017 #include "confdefs.h"
5018 /* Override any gcc2 internal prototype to avoid an error.  */
5019 /* We use char because int might match the return type of a gcc2
5020     builtin and then its argument prototype would still apply.  */
5021 char rl_completion_matches();
5022
5023 int main() {
5024 rl_completion_matches()
5025 ; return 0; }
5026 EOF
5027 if { (eval echo configure:5028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5028   rm -rf conftest*
5029   eval "ac_cv_lib_$ac_lib_var=yes"
5030 else
5031   echo "configure: failed program was:" >&5
5032   cat conftest.$ac_ext >&5
5033   rm -rf conftest*
5034   eval "ac_cv_lib_$ac_lib_var=no"
5035 fi
5036 rm -f conftest*
5037 LIBS="$ac_save_LIBS"
5038
5039 fi
5040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5041   echo "$ac_t""yes" 1>&6
5042   cat >> confdefs.h <<\EOF
5043 #define HAVE_NEW_LIBREADLINE 1
5044 EOF
5045
5046 else
5047   echo "$ac_t""no" 1>&6
5048 fi
5049
5050
5051 # The following test taken from the cvs sources
5052 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5053 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5054 # libsocket.so which has a bad implementation of gethostbyname (it
5055 # only looks in /etc/hosts), so we only look for -lsocket if we need
5056 # it.
5057 for ac_func in connect
5058 do
5059 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5060 echo "configure:5061: checking for $ac_func" >&5
5061 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5062   echo $ac_n "(cached) $ac_c" 1>&6
5063 else
5064   cat > conftest.$ac_ext <<EOF
5065 #line 5066 "configure"
5066 #include "confdefs.h"
5067 /* System header to define __stub macros and hopefully few prototypes,
5068     which can conflict with char $ac_func(); below.  */
5069 #include <assert.h>
5070 /* Override any gcc2 internal prototype to avoid an error.  */
5071 /* We use char because int might match the return type of a gcc2
5072     builtin and then its argument prototype would still apply.  */
5073 char $ac_func();
5074
5075 int main() {
5076
5077 /* The GNU C library defines this for functions which it implements
5078     to always fail with ENOSYS.  Some functions are actually named
5079     something starting with __ and the normal name is an alias.  */
5080 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5081 choke me
5082 #else
5083 $ac_func();
5084 #endif
5085
5086 ; return 0; }
5087 EOF
5088 if { (eval echo configure:5089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5089   rm -rf conftest*
5090   eval "ac_cv_func_$ac_func=yes"
5091 else
5092   echo "configure: failed program was:" >&5
5093   cat conftest.$ac_ext >&5
5094   rm -rf conftest*
5095   eval "ac_cv_func_$ac_func=no"
5096 fi
5097 rm -f conftest*
5098 fi
5099
5100 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5101   echo "$ac_t""yes" 1>&6
5102     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5103   cat >> confdefs.h <<EOF
5104 #define $ac_tr_func 1
5105 EOF
5106  
5107 else
5108   echo "$ac_t""no" 1>&6
5109 fi
5110 done
5111
5112 if test x"$ac_cv_func_connect" = x"no"; then
5113     case "$LIBS" in
5114     *-lnsl*) ;;
5115     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5116 echo "configure:5117: checking for printf in -lnsl_s" >&5
5117 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5118 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5119   echo $ac_n "(cached) $ac_c" 1>&6
5120 else
5121   ac_save_LIBS="$LIBS"
5122 LIBS="-lnsl_s  $LIBS"
5123 cat > conftest.$ac_ext <<EOF
5124 #line 5125 "configure"
5125 #include "confdefs.h"
5126 /* Override any gcc2 internal prototype to avoid an error.  */
5127 /* We use char because int might match the return type of a gcc2
5128     builtin and then its argument prototype would still apply.  */
5129 char printf();
5130
5131 int main() {
5132 printf()
5133 ; return 0; }
5134 EOF
5135 if { (eval echo configure:5136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5136   rm -rf conftest*
5137   eval "ac_cv_lib_$ac_lib_var=yes"
5138 else
5139   echo "configure: failed program was:" >&5
5140   cat conftest.$ac_ext >&5
5141   rm -rf conftest*
5142   eval "ac_cv_lib_$ac_lib_var=no"
5143 fi
5144 rm -f conftest*
5145 LIBS="$ac_save_LIBS"
5146
5147 fi
5148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5149   echo "$ac_t""yes" 1>&6
5150     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5151     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5152   cat >> confdefs.h <<EOF
5153 #define $ac_tr_lib 1
5154 EOF
5155
5156   LIBS="-lnsl_s $LIBS"
5157
5158 else
5159   echo "$ac_t""no" 1>&6
5160 fi
5161  ;;
5162     esac
5163     case "$LIBS" in
5164     *-lnsl*) ;;
5165     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5166 echo "configure:5167: checking for printf in -lnsl" >&5
5167 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5168 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5169   echo $ac_n "(cached) $ac_c" 1>&6
5170 else
5171   ac_save_LIBS="$LIBS"
5172 LIBS="-lnsl  $LIBS"
5173 cat > conftest.$ac_ext <<EOF
5174 #line 5175 "configure"
5175 #include "confdefs.h"
5176 /* Override any gcc2 internal prototype to avoid an error.  */
5177 /* We use char because int might match the return type of a gcc2
5178     builtin and then its argument prototype would still apply.  */
5179 char printf();
5180
5181 int main() {
5182 printf()
5183 ; return 0; }
5184 EOF
5185 if { (eval echo configure:5186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5186   rm -rf conftest*
5187   eval "ac_cv_lib_$ac_lib_var=yes"
5188 else
5189   echo "configure: failed program was:" >&5
5190   cat conftest.$ac_ext >&5
5191   rm -rf conftest*
5192   eval "ac_cv_lib_$ac_lib_var=no"
5193 fi
5194 rm -f conftest*
5195 LIBS="$ac_save_LIBS"
5196
5197 fi
5198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5199   echo "$ac_t""yes" 1>&6
5200     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5201     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5202   cat >> confdefs.h <<EOF
5203 #define $ac_tr_lib 1
5204 EOF
5205
5206   LIBS="-lnsl $LIBS"
5207
5208 else
5209   echo "$ac_t""no" 1>&6
5210 fi
5211  ;;
5212     esac
5213     case "$LIBS" in
5214     *-lsocket*) ;;
5215     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5216 echo "configure:5217: checking for connect in -lsocket" >&5
5217 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5218 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5219   echo $ac_n "(cached) $ac_c" 1>&6
5220 else
5221   ac_save_LIBS="$LIBS"
5222 LIBS="-lsocket  $LIBS"
5223 cat > conftest.$ac_ext <<EOF
5224 #line 5225 "configure"
5225 #include "confdefs.h"
5226 /* Override any gcc2 internal prototype to avoid an error.  */
5227 /* We use char because int might match the return type of a gcc2
5228     builtin and then its argument prototype would still apply.  */
5229 char connect();
5230
5231 int main() {
5232 connect()
5233 ; return 0; }
5234 EOF
5235 if { (eval echo configure:5236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5236   rm -rf conftest*
5237   eval "ac_cv_lib_$ac_lib_var=yes"
5238 else
5239   echo "configure: failed program was:" >&5
5240   cat conftest.$ac_ext >&5
5241   rm -rf conftest*
5242   eval "ac_cv_lib_$ac_lib_var=no"
5243 fi
5244 rm -f conftest*
5245 LIBS="$ac_save_LIBS"
5246
5247 fi
5248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5249   echo "$ac_t""yes" 1>&6
5250     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5251     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5252   cat >> confdefs.h <<EOF
5253 #define $ac_tr_lib 1
5254 EOF
5255
5256   LIBS="-lsocket $LIBS"
5257
5258 else
5259   echo "$ac_t""no" 1>&6
5260 fi
5261  ;;
5262     esac
5263     case "$LIBS" in
5264     *-linet*) ;;
5265     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5266 echo "configure:5267: checking for connect in -linet" >&5
5267 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5268 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5269   echo $ac_n "(cached) $ac_c" 1>&6
5270 else
5271   ac_save_LIBS="$LIBS"
5272 LIBS="-linet  $LIBS"
5273 cat > conftest.$ac_ext <<EOF
5274 #line 5275 "configure"
5275 #include "confdefs.h"
5276 /* Override any gcc2 internal prototype to avoid an error.  */
5277 /* We use char because int might match the return type of a gcc2
5278     builtin and then its argument prototype would still apply.  */
5279 char connect();
5280
5281 int main() {
5282 connect()
5283 ; return 0; }
5284 EOF
5285 if { (eval echo configure:5286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5286   rm -rf conftest*
5287   eval "ac_cv_lib_$ac_lib_var=yes"
5288 else
5289   echo "configure: failed program was:" >&5
5290   cat conftest.$ac_ext >&5
5291   rm -rf conftest*
5292   eval "ac_cv_lib_$ac_lib_var=no"
5293 fi
5294 rm -f conftest*
5295 LIBS="$ac_save_LIBS"
5296
5297 fi
5298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5299   echo "$ac_t""yes" 1>&6
5300     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5301     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5302   cat >> confdefs.h <<EOF
5303 #define $ac_tr_lib 1
5304 EOF
5305
5306   LIBS="-linet $LIBS"
5307
5308 else
5309   echo "$ac_t""no" 1>&6
5310 fi
5311  ;;
5312     esac
5313             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5314        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5315         # ac_cv_func_connect=yes
5316         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5317         cat >> confdefs.h <<\EOF
5318 #define HAVE_CONNECT 1
5319 EOF
5320
5321     fi
5322 fi
5323
5324 ###############################################
5325 # test for where we get get_yp_default_domain() from
5326 for ac_func in yp_get_default_domain
5327 do
5328 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5329 echo "configure:5330: checking for $ac_func" >&5
5330 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5331   echo $ac_n "(cached) $ac_c" 1>&6
5332 else
5333   cat > conftest.$ac_ext <<EOF
5334 #line 5335 "configure"
5335 #include "confdefs.h"
5336 /* System header to define __stub macros and hopefully few prototypes,
5337     which can conflict with char $ac_func(); below.  */
5338 #include <assert.h>
5339 /* Override any gcc2 internal prototype to avoid an error.  */
5340 /* We use char because int might match the return type of a gcc2
5341     builtin and then its argument prototype would still apply.  */
5342 char $ac_func();
5343
5344 int main() {
5345
5346 /* The GNU C library defines this for functions which it implements
5347     to always fail with ENOSYS.  Some functions are actually named
5348     something starting with __ and the normal name is an alias.  */
5349 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5350 choke me
5351 #else
5352 $ac_func();
5353 #endif
5354
5355 ; return 0; }
5356 EOF
5357 if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5358   rm -rf conftest*
5359   eval "ac_cv_func_$ac_func=yes"
5360 else
5361   echo "configure: failed program was:" >&5
5362   cat conftest.$ac_ext >&5
5363   rm -rf conftest*
5364   eval "ac_cv_func_$ac_func=no"
5365 fi
5366 rm -f conftest*
5367 fi
5368
5369 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5370   echo "$ac_t""yes" 1>&6
5371     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5372   cat >> confdefs.h <<EOF
5373 #define $ac_tr_func 1
5374 EOF
5375  
5376 else
5377   echo "$ac_t""no" 1>&6
5378 fi
5379 done
5380
5381 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5382         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5383 echo "configure:5384: checking for yp_get_default_domain in -lnsl" >&5
5384 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5385 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5386   echo $ac_n "(cached) $ac_c" 1>&6
5387 else
5388   ac_save_LIBS="$LIBS"
5389 LIBS="-lnsl  $LIBS"
5390 cat > conftest.$ac_ext <<EOF
5391 #line 5392 "configure"
5392 #include "confdefs.h"
5393 /* Override any gcc2 internal prototype to avoid an error.  */
5394 /* We use char because int might match the return type of a gcc2
5395     builtin and then its argument prototype would still apply.  */
5396 char yp_get_default_domain();
5397
5398 int main() {
5399 yp_get_default_domain()
5400 ; return 0; }
5401 EOF
5402 if { (eval echo configure:5403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5403   rm -rf conftest*
5404   eval "ac_cv_lib_$ac_lib_var=yes"
5405 else
5406   echo "configure: failed program was:" >&5
5407   cat conftest.$ac_ext >&5
5408   rm -rf conftest*
5409   eval "ac_cv_lib_$ac_lib_var=no"
5410 fi
5411 rm -f conftest*
5412 LIBS="$ac_save_LIBS"
5413
5414 fi
5415 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5416   echo "$ac_t""yes" 1>&6
5417   LIBS="$LIBS -lnsl";
5418         cat >> confdefs.h <<\EOF
5419 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5420 EOF
5421
5422 else
5423   echo "$ac_t""no" 1>&6
5424 fi
5425  
5426 fi
5427
5428 # Check if we have execl, if not we need to compile smbrun.
5429 for ac_func in execl
5430 do
5431 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5432 echo "configure:5433: checking for $ac_func" >&5
5433 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5434   echo $ac_n "(cached) $ac_c" 1>&6
5435 else
5436   cat > conftest.$ac_ext <<EOF
5437 #line 5438 "configure"
5438 #include "confdefs.h"
5439 /* System header to define __stub macros and hopefully few prototypes,
5440     which can conflict with char $ac_func(); below.  */
5441 #include <assert.h>
5442 /* Override any gcc2 internal prototype to avoid an error.  */
5443 /* We use char because int might match the return type of a gcc2
5444     builtin and then its argument prototype would still apply.  */
5445 char $ac_func();
5446
5447 int main() {
5448
5449 /* The GNU C library defines this for functions which it implements
5450     to always fail with ENOSYS.  Some functions are actually named
5451     something starting with __ and the normal name is an alias.  */
5452 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5453 choke me
5454 #else
5455 $ac_func();
5456 #endif
5457
5458 ; return 0; }
5459 EOF
5460 if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5461   rm -rf conftest*
5462   eval "ac_cv_func_$ac_func=yes"
5463 else
5464   echo "configure: failed program was:" >&5
5465   cat conftest.$ac_ext >&5
5466   rm -rf conftest*
5467   eval "ac_cv_func_$ac_func=no"
5468 fi
5469 rm -f conftest*
5470 fi
5471
5472 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5473   echo "$ac_t""yes" 1>&6
5474     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5475   cat >> confdefs.h <<EOF
5476 #define $ac_tr_func 1
5477 EOF
5478  
5479 else
5480   echo "$ac_t""no" 1>&6
5481 fi
5482 done
5483
5484 if test x"$ac_cv_func_execl" = x"no"; then
5485     RUNPROG="bin/smbrun"
5486 else
5487     RUNPROG=""
5488 fi
5489
5490 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5491 do
5492 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5493 echo "configure:5494: checking for $ac_func" >&5
5494 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5495   echo $ac_n "(cached) $ac_c" 1>&6
5496 else
5497   cat > conftest.$ac_ext <<EOF
5498 #line 5499 "configure"
5499 #include "confdefs.h"
5500 /* System header to define __stub macros and hopefully few prototypes,
5501     which can conflict with char $ac_func(); below.  */
5502 #include <assert.h>
5503 /* Override any gcc2 internal prototype to avoid an error.  */
5504 /* We use char because int might match the return type of a gcc2
5505     builtin and then its argument prototype would still apply.  */
5506 char $ac_func();
5507
5508 int main() {
5509
5510 /* The GNU C library defines this for functions which it implements
5511     to always fail with ENOSYS.  Some functions are actually named
5512     something starting with __ and the normal name is an alias.  */
5513 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5514 choke me
5515 #else
5516 $ac_func();
5517 #endif
5518
5519 ; return 0; }
5520 EOF
5521 if { (eval echo configure:5522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5522   rm -rf conftest*
5523   eval "ac_cv_func_$ac_func=yes"
5524 else
5525   echo "configure: failed program was:" >&5
5526   cat conftest.$ac_ext >&5
5527   rm -rf conftest*
5528   eval "ac_cv_func_$ac_func=no"
5529 fi
5530 rm -f conftest*
5531 fi
5532
5533 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5534   echo "$ac_t""yes" 1>&6
5535     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5536   cat >> confdefs.h <<EOF
5537 #define $ac_tr_func 1
5538 EOF
5539  
5540 else
5541   echo "$ac_t""no" 1>&6
5542 fi
5543 done
5544
5545 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5546 do
5547 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5548 echo "configure:5549: checking for $ac_func" >&5
5549 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5550   echo $ac_n "(cached) $ac_c" 1>&6
5551 else
5552   cat > conftest.$ac_ext <<EOF
5553 #line 5554 "configure"
5554 #include "confdefs.h"
5555 /* System header to define __stub macros and hopefully few prototypes,
5556     which can conflict with char $ac_func(); below.  */
5557 #include <assert.h>
5558 /* Override any gcc2 internal prototype to avoid an error.  */
5559 /* We use char because int might match the return type of a gcc2
5560     builtin and then its argument prototype would still apply.  */
5561 char $ac_func();
5562
5563 int main() {
5564
5565 /* The GNU C library defines this for functions which it implements
5566     to always fail with ENOSYS.  Some functions are actually named
5567     something starting with __ and the normal name is an alias.  */
5568 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5569 choke me
5570 #else
5571 $ac_func();
5572 #endif
5573
5574 ; return 0; }
5575 EOF
5576 if { (eval echo configure:5577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5577   rm -rf conftest*
5578   eval "ac_cv_func_$ac_func=yes"
5579 else
5580   echo "configure: failed program was:" >&5
5581   cat conftest.$ac_ext >&5
5582   rm -rf conftest*
5583   eval "ac_cv_func_$ac_func=no"
5584 fi
5585 rm -f conftest*
5586 fi
5587
5588 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5589   echo "$ac_t""yes" 1>&6
5590     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5591   cat >> confdefs.h <<EOF
5592 #define $ac_tr_func 1
5593 EOF
5594  
5595 else
5596   echo "$ac_t""no" 1>&6
5597 fi
5598 done
5599
5600 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5601 do
5602 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5603 echo "configure:5604: checking for $ac_func" >&5
5604 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5605   echo $ac_n "(cached) $ac_c" 1>&6
5606 else
5607   cat > conftest.$ac_ext <<EOF
5608 #line 5609 "configure"
5609 #include "confdefs.h"
5610 /* System header to define __stub macros and hopefully few prototypes,
5611     which can conflict with char $ac_func(); below.  */
5612 #include <assert.h>
5613 /* Override any gcc2 internal prototype to avoid an error.  */
5614 /* We use char because int might match the return type of a gcc2
5615     builtin and then its argument prototype would still apply.  */
5616 char $ac_func();
5617
5618 int main() {
5619
5620 /* The GNU C library defines this for functions which it implements
5621     to always fail with ENOSYS.  Some functions are actually named
5622     something starting with __ and the normal name is an alias.  */
5623 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5624 choke me
5625 #else
5626 $ac_func();
5627 #endif
5628
5629 ; return 0; }
5630 EOF
5631 if { (eval echo configure:5632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5632   rm -rf conftest*
5633   eval "ac_cv_func_$ac_func=yes"
5634 else
5635   echo "configure: failed program was:" >&5
5636   cat conftest.$ac_ext >&5
5637   rm -rf conftest*
5638   eval "ac_cv_func_$ac_func=no"
5639 fi
5640 rm -f conftest*
5641 fi
5642
5643 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5644   echo "$ac_t""yes" 1>&6
5645     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5646   cat >> confdefs.h <<EOF
5647 #define $ac_tr_func 1
5648 EOF
5649  
5650 else
5651   echo "$ac_t""no" 1>&6
5652 fi
5653 done
5654
5655 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5656 do
5657 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5658 echo "configure:5659: checking for $ac_func" >&5
5659 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5660   echo $ac_n "(cached) $ac_c" 1>&6
5661 else
5662   cat > conftest.$ac_ext <<EOF
5663 #line 5664 "configure"
5664 #include "confdefs.h"
5665 /* System header to define __stub macros and hopefully few prototypes,
5666     which can conflict with char $ac_func(); below.  */
5667 #include <assert.h>
5668 /* Override any gcc2 internal prototype to avoid an error.  */
5669 /* We use char because int might match the return type of a gcc2
5670     builtin and then its argument prototype would still apply.  */
5671 char $ac_func();
5672
5673 int main() {
5674
5675 /* The GNU C library defines this for functions which it implements
5676     to always fail with ENOSYS.  Some functions are actually named
5677     something starting with __ and the normal name is an alias.  */
5678 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5679 choke me
5680 #else
5681 $ac_func();
5682 #endif
5683
5684 ; return 0; }
5685 EOF
5686 if { (eval echo configure:5687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5687   rm -rf conftest*
5688   eval "ac_cv_func_$ac_func=yes"
5689 else
5690   echo "configure: failed program was:" >&5
5691   cat conftest.$ac_ext >&5
5692   rm -rf conftest*
5693   eval "ac_cv_func_$ac_func=no"
5694 fi
5695 rm -f conftest*
5696 fi
5697
5698 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5699   echo "$ac_t""yes" 1>&6
5700     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5701   cat >> confdefs.h <<EOF
5702 #define $ac_tr_func 1
5703 EOF
5704  
5705 else
5706   echo "$ac_t""no" 1>&6
5707 fi
5708 done
5709
5710 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5711 do
5712 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5713 echo "configure:5714: checking for $ac_func" >&5
5714 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5715   echo $ac_n "(cached) $ac_c" 1>&6
5716 else
5717   cat > conftest.$ac_ext <<EOF
5718 #line 5719 "configure"
5719 #include "confdefs.h"
5720 /* System header to define __stub macros and hopefully few prototypes,
5721     which can conflict with char $ac_func(); below.  */
5722 #include <assert.h>
5723 /* Override any gcc2 internal prototype to avoid an error.  */
5724 /* We use char because int might match the return type of a gcc2
5725     builtin and then its argument prototype would still apply.  */
5726 char $ac_func();
5727
5728 int main() {
5729
5730 /* The GNU C library defines this for functions which it implements
5731     to always fail with ENOSYS.  Some functions are actually named
5732     something starting with __ and the normal name is an alias.  */
5733 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5734 choke me
5735 #else
5736 $ac_func();
5737 #endif
5738
5739 ; return 0; }
5740 EOF
5741 if { (eval echo configure:5742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5742   rm -rf conftest*
5743   eval "ac_cv_func_$ac_func=yes"
5744 else
5745   echo "configure: failed program was:" >&5
5746   cat conftest.$ac_ext >&5
5747   rm -rf conftest*
5748   eval "ac_cv_func_$ac_func=no"
5749 fi
5750 rm -f conftest*
5751 fi
5752
5753 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5754   echo "$ac_t""yes" 1>&6
5755     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5756   cat >> confdefs.h <<EOF
5757 #define $ac_tr_func 1
5758 EOF
5759  
5760 else
5761   echo "$ac_t""no" 1>&6
5762 fi
5763 done
5764
5765 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5766 do
5767 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5768 echo "configure:5769: checking for $ac_func" >&5
5769 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5770   echo $ac_n "(cached) $ac_c" 1>&6
5771 else
5772   cat > conftest.$ac_ext <<EOF
5773 #line 5774 "configure"
5774 #include "confdefs.h"
5775 /* System header to define __stub macros and hopefully few prototypes,
5776     which can conflict with char $ac_func(); below.  */
5777 #include <assert.h>
5778 /* Override any gcc2 internal prototype to avoid an error.  */
5779 /* We use char because int might match the return type of a gcc2
5780     builtin and then its argument prototype would still apply.  */
5781 char $ac_func();
5782
5783 int main() {
5784
5785 /* The GNU C library defines this for functions which it implements
5786     to always fail with ENOSYS.  Some functions are actually named
5787     something starting with __ and the normal name is an alias.  */
5788 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5789 choke me
5790 #else
5791 $ac_func();
5792 #endif
5793
5794 ; return 0; }
5795 EOF
5796 if { (eval echo configure:5797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5797   rm -rf conftest*
5798   eval "ac_cv_func_$ac_func=yes"
5799 else
5800   echo "configure: failed program was:" >&5
5801   cat conftest.$ac_ext >&5
5802   rm -rf conftest*
5803   eval "ac_cv_func_$ac_func=no"
5804 fi
5805 rm -f conftest*
5806 fi
5807
5808 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5809   echo "$ac_t""yes" 1>&6
5810     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5811   cat >> confdefs.h <<EOF
5812 #define $ac_tr_func 1
5813 EOF
5814  
5815 else
5816   echo "$ac_t""no" 1>&6
5817 fi
5818 done
5819
5820 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5821 do
5822 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5823 echo "configure:5824: checking for $ac_func" >&5
5824 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5825   echo $ac_n "(cached) $ac_c" 1>&6
5826 else
5827   cat > conftest.$ac_ext <<EOF
5828 #line 5829 "configure"
5829 #include "confdefs.h"
5830 /* System header to define __stub macros and hopefully few prototypes,
5831     which can conflict with char $ac_func(); below.  */
5832 #include <assert.h>
5833 /* Override any gcc2 internal prototype to avoid an error.  */
5834 /* We use char because int might match the return type of a gcc2
5835     builtin and then its argument prototype would still apply.  */
5836 char $ac_func();
5837
5838 int main() {
5839
5840 /* The GNU C library defines this for functions which it implements
5841     to always fail with ENOSYS.  Some functions are actually named
5842     something starting with __ and the normal name is an alias.  */
5843 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5844 choke me
5845 #else
5846 $ac_func();
5847 #endif
5848
5849 ; return 0; }
5850 EOF
5851 if { (eval echo configure:5852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5852   rm -rf conftest*
5853   eval "ac_cv_func_$ac_func=yes"
5854 else
5855   echo "configure: failed program was:" >&5
5856   cat conftest.$ac_ext >&5
5857   rm -rf conftest*
5858   eval "ac_cv_func_$ac_func=no"
5859 fi
5860 rm -f conftest*
5861 fi
5862
5863 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5864   echo "$ac_t""yes" 1>&6
5865     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5866   cat >> confdefs.h <<EOF
5867 #define $ac_tr_func 1
5868 EOF
5869  
5870 else
5871   echo "$ac_t""no" 1>&6
5872 fi
5873 done
5874
5875 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5876 do
5877 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5878 echo "configure:5879: checking for $ac_func" >&5
5879 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5880   echo $ac_n "(cached) $ac_c" 1>&6
5881 else
5882   cat > conftest.$ac_ext <<EOF
5883 #line 5884 "configure"
5884 #include "confdefs.h"
5885 /* System header to define __stub macros and hopefully few prototypes,
5886     which can conflict with char $ac_func(); below.  */
5887 #include <assert.h>
5888 /* Override any gcc2 internal prototype to avoid an error.  */
5889 /* We use char because int might match the return type of a gcc2
5890     builtin and then its argument prototype would still apply.  */
5891 char $ac_func();
5892
5893 int main() {
5894
5895 /* The GNU C library defines this for functions which it implements
5896     to always fail with ENOSYS.  Some functions are actually named
5897     something starting with __ and the normal name is an alias.  */
5898 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5899 choke me
5900 #else
5901 $ac_func();
5902 #endif
5903
5904 ; return 0; }
5905 EOF
5906 if { (eval echo configure:5907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5907   rm -rf conftest*
5908   eval "ac_cv_func_$ac_func=yes"
5909 else
5910   echo "configure: failed program was:" >&5
5911   cat conftest.$ac_ext >&5
5912   rm -rf conftest*
5913   eval "ac_cv_func_$ac_func=no"
5914 fi
5915 rm -f conftest*
5916 fi
5917
5918 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5919   echo "$ac_t""yes" 1>&6
5920     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5921   cat >> confdefs.h <<EOF
5922 #define $ac_tr_func 1
5923 EOF
5924  
5925 else
5926   echo "$ac_t""no" 1>&6
5927 fi
5928 done
5929
5930 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5931 do
5932 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5933 echo "configure:5934: checking for $ac_func" >&5
5934 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5935   echo $ac_n "(cached) $ac_c" 1>&6
5936 else
5937   cat > conftest.$ac_ext <<EOF
5938 #line 5939 "configure"
5939 #include "confdefs.h"
5940 /* System header to define __stub macros and hopefully few prototypes,
5941     which can conflict with char $ac_func(); below.  */
5942 #include <assert.h>
5943 /* Override any gcc2 internal prototype to avoid an error.  */
5944 /* We use char because int might match the return type of a gcc2
5945     builtin and then its argument prototype would still apply.  */
5946 char $ac_func();
5947
5948 int main() {
5949
5950 /* The GNU C library defines this for functions which it implements
5951     to always fail with ENOSYS.  Some functions are actually named
5952     something starting with __ and the normal name is an alias.  */
5953 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5954 choke me
5955 #else
5956 $ac_func();
5957 #endif
5958
5959 ; return 0; }
5960 EOF
5961 if { (eval echo configure:5962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5962   rm -rf conftest*
5963   eval "ac_cv_func_$ac_func=yes"
5964 else
5965   echo "configure: failed program was:" >&5
5966   cat conftest.$ac_ext >&5
5967   rm -rf conftest*
5968   eval "ac_cv_func_$ac_func=no"
5969 fi
5970 rm -f conftest*
5971 fi
5972
5973 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5974   echo "$ac_t""yes" 1>&6
5975     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5976   cat >> confdefs.h <<EOF
5977 #define $ac_tr_func 1
5978 EOF
5979  
5980 else
5981   echo "$ac_t""no" 1>&6
5982 fi
5983 done
5984
5985 for ac_func in syslog vsyslog getgrouplist
5986 do
5987 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5988 echo "configure:5989: checking for $ac_func" >&5
5989 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5990   echo $ac_n "(cached) $ac_c" 1>&6
5991 else
5992   cat > conftest.$ac_ext <<EOF
5993 #line 5994 "configure"
5994 #include "confdefs.h"
5995 /* System header to define __stub macros and hopefully few prototypes,
5996     which can conflict with char $ac_func(); below.  */
5997 #include <assert.h>
5998 /* Override any gcc2 internal prototype to avoid an error.  */
5999 /* We use char because int might match the return type of a gcc2
6000     builtin and then its argument prototype would still apply.  */
6001 char $ac_func();
6002
6003 int main() {
6004
6005 /* The GNU C library defines this for functions which it implements
6006     to always fail with ENOSYS.  Some functions are actually named
6007     something starting with __ and the normal name is an alias.  */
6008 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6009 choke me
6010 #else
6011 $ac_func();
6012 #endif
6013
6014 ; return 0; }
6015 EOF
6016 if { (eval echo configure:6017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6017   rm -rf conftest*
6018   eval "ac_cv_func_$ac_func=yes"
6019 else
6020   echo "configure: failed program was:" >&5
6021   cat conftest.$ac_ext >&5
6022   rm -rf conftest*
6023   eval "ac_cv_func_$ac_func=no"
6024 fi
6025 rm -f conftest*
6026 fi
6027
6028 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6029   echo "$ac_t""yes" 1>&6
6030     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6031   cat >> confdefs.h <<EOF
6032 #define $ac_tr_func 1
6033 EOF
6034  
6035 else
6036   echo "$ac_t""no" 1>&6
6037 fi
6038 done
6039
6040 # setbuffer is needed for smbtorture
6041 for ac_func in setbuffer
6042 do
6043 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6044 echo "configure:6045: checking for $ac_func" >&5
6045 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6046   echo $ac_n "(cached) $ac_c" 1>&6
6047 else
6048   cat > conftest.$ac_ext <<EOF
6049 #line 6050 "configure"
6050 #include "confdefs.h"
6051 /* System header to define __stub macros and hopefully few prototypes,
6052     which can conflict with char $ac_func(); below.  */
6053 #include <assert.h>
6054 /* Override any gcc2 internal prototype to avoid an error.  */
6055 /* We use char because int might match the return type of a gcc2
6056     builtin and then its argument prototype would still apply.  */
6057 char $ac_func();
6058
6059 int main() {
6060
6061 /* The GNU C library defines this for functions which it implements
6062     to always fail with ENOSYS.  Some functions are actually named
6063     something starting with __ and the normal name is an alias.  */
6064 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6065 choke me
6066 #else
6067 $ac_func();
6068 #endif
6069
6070 ; return 0; }
6071 EOF
6072 if { (eval echo configure:6073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6073   rm -rf conftest*
6074   eval "ac_cv_func_$ac_func=yes"
6075 else
6076   echo "configure: failed program was:" >&5
6077   cat conftest.$ac_ext >&5
6078   rm -rf conftest*
6079   eval "ac_cv_func_$ac_func=no"
6080 fi
6081 rm -f conftest*
6082 fi
6083
6084 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6085   echo "$ac_t""yes" 1>&6
6086     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6087   cat >> confdefs.h <<EOF
6088 #define $ac_tr_func 1
6089 EOF
6090  
6091 else
6092   echo "$ac_t""no" 1>&6
6093 fi
6094 done
6095
6096
6097 # syscall() is needed for smbwrapper.
6098 for ac_func in syscall
6099 do
6100 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6101 echo "configure:6102: checking for $ac_func" >&5
6102 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6103   echo $ac_n "(cached) $ac_c" 1>&6
6104 else
6105   cat > conftest.$ac_ext <<EOF
6106 #line 6107 "configure"
6107 #include "confdefs.h"
6108 /* System header to define __stub macros and hopefully few prototypes,
6109     which can conflict with char $ac_func(); below.  */
6110 #include <assert.h>
6111 /* Override any gcc2 internal prototype to avoid an error.  */
6112 /* We use char because int might match the return type of a gcc2
6113     builtin and then its argument prototype would still apply.  */
6114 char $ac_func();
6115
6116 int main() {
6117
6118 /* The GNU C library defines this for functions which it implements
6119     to always fail with ENOSYS.  Some functions are actually named
6120     something starting with __ and the normal name is an alias.  */
6121 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6122 choke me
6123 #else
6124 $ac_func();
6125 #endif
6126
6127 ; return 0; }
6128 EOF
6129 if { (eval echo configure:6130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6130   rm -rf conftest*
6131   eval "ac_cv_func_$ac_func=yes"
6132 else
6133   echo "configure: failed program was:" >&5
6134   cat conftest.$ac_ext >&5
6135   rm -rf conftest*
6136   eval "ac_cv_func_$ac_func=no"
6137 fi
6138 rm -f conftest*
6139 fi
6140
6141 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6142   echo "$ac_t""yes" 1>&6
6143     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6144   cat >> confdefs.h <<EOF
6145 #define $ac_tr_func 1
6146 EOF
6147  
6148 else
6149   echo "$ac_t""no" 1>&6
6150 fi
6151 done
6152
6153
6154 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6155 do
6156 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6157 echo "configure:6158: checking for $ac_func" >&5
6158 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6159   echo $ac_n "(cached) $ac_c" 1>&6
6160 else
6161   cat > conftest.$ac_ext <<EOF
6162 #line 6163 "configure"
6163 #include "confdefs.h"
6164 /* System header to define __stub macros and hopefully few prototypes,
6165     which can conflict with char $ac_func(); below.  */
6166 #include <assert.h>
6167 /* Override any gcc2 internal prototype to avoid an error.  */
6168 /* We use char because int might match the return type of a gcc2
6169     builtin and then its argument prototype would still apply.  */
6170 char $ac_func();
6171
6172 int main() {
6173
6174 /* The GNU C library defines this for functions which it implements
6175     to always fail with ENOSYS.  Some functions are actually named
6176     something starting with __ and the normal name is an alias.  */
6177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6178 choke me
6179 #else
6180 $ac_func();
6181 #endif
6182
6183 ; return 0; }
6184 EOF
6185 if { (eval echo configure:6186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6186   rm -rf conftest*
6187   eval "ac_cv_func_$ac_func=yes"
6188 else
6189   echo "configure: failed program was:" >&5
6190   cat conftest.$ac_ext >&5
6191   rm -rf conftest*
6192   eval "ac_cv_func_$ac_func=no"
6193 fi
6194 rm -f conftest*
6195 fi
6196
6197 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6198   echo "$ac_t""yes" 1>&6
6199     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6200   cat >> confdefs.h <<EOF
6201 #define $ac_tr_func 1
6202 EOF
6203  
6204 else
6205   echo "$ac_t""no" 1>&6
6206 fi
6207 done
6208
6209 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6210 do
6211 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6212 echo "configure:6213: checking for $ac_func" >&5
6213 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6214   echo $ac_n "(cached) $ac_c" 1>&6
6215 else
6216   cat > conftest.$ac_ext <<EOF
6217 #line 6218 "configure"
6218 #include "confdefs.h"
6219 /* System header to define __stub macros and hopefully few prototypes,
6220     which can conflict with char $ac_func(); below.  */
6221 #include <assert.h>
6222 /* Override any gcc2 internal prototype to avoid an error.  */
6223 /* We use char because int might match the return type of a gcc2
6224     builtin and then its argument prototype would still apply.  */
6225 char $ac_func();
6226
6227 int main() {
6228
6229 /* The GNU C library defines this for functions which it implements
6230     to always fail with ENOSYS.  Some functions are actually named
6231     something starting with __ and the normal name is an alias.  */
6232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6233 choke me
6234 #else
6235 $ac_func();
6236 #endif
6237
6238 ; return 0; }
6239 EOF
6240 if { (eval echo configure:6241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6241   rm -rf conftest*
6242   eval "ac_cv_func_$ac_func=yes"
6243 else
6244   echo "configure: failed program was:" >&5
6245   cat conftest.$ac_ext >&5
6246   rm -rf conftest*
6247   eval "ac_cv_func_$ac_func=no"
6248 fi
6249 rm -f conftest*
6250 fi
6251
6252 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6253   echo "$ac_t""yes" 1>&6
6254     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6255   cat >> confdefs.h <<EOF
6256 #define $ac_tr_func 1
6257 EOF
6258  
6259 else
6260   echo "$ac_t""no" 1>&6
6261 fi
6262 done
6263
6264 for ac_func in __getcwd _getcwd
6265 do
6266 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6267 echo "configure:6268: checking for $ac_func" >&5
6268 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6269   echo $ac_n "(cached) $ac_c" 1>&6
6270 else
6271   cat > conftest.$ac_ext <<EOF
6272 #line 6273 "configure"
6273 #include "confdefs.h"
6274 /* System header to define __stub macros and hopefully few prototypes,
6275     which can conflict with char $ac_func(); below.  */
6276 #include <assert.h>
6277 /* Override any gcc2 internal prototype to avoid an error.  */
6278 /* We use char because int might match the return type of a gcc2
6279     builtin and then its argument prototype would still apply.  */
6280 char $ac_func();
6281
6282 int main() {
6283
6284 /* The GNU C library defines this for functions which it implements
6285     to always fail with ENOSYS.  Some functions are actually named
6286     something starting with __ and the normal name is an alias.  */
6287 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6288 choke me
6289 #else
6290 $ac_func();
6291 #endif
6292
6293 ; return 0; }
6294 EOF
6295 if { (eval echo configure:6296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6296   rm -rf conftest*
6297   eval "ac_cv_func_$ac_func=yes"
6298 else
6299   echo "configure: failed program was:" >&5
6300   cat conftest.$ac_ext >&5
6301   rm -rf conftest*
6302   eval "ac_cv_func_$ac_func=no"
6303 fi
6304 rm -f conftest*
6305 fi
6306
6307 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6308   echo "$ac_t""yes" 1>&6
6309     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6310   cat >> confdefs.h <<EOF
6311 #define $ac_tr_func 1
6312 EOF
6313  
6314 else
6315   echo "$ac_t""no" 1>&6
6316 fi
6317 done
6318
6319 for ac_func in __xstat __fxstat __lxstat
6320 do
6321 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6322 echo "configure:6323: checking for $ac_func" >&5
6323 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6324   echo $ac_n "(cached) $ac_c" 1>&6
6325 else
6326   cat > conftest.$ac_ext <<EOF
6327 #line 6328 "configure"
6328 #include "confdefs.h"
6329 /* System header to define __stub macros and hopefully few prototypes,
6330     which can conflict with char $ac_func(); below.  */
6331 #include <assert.h>
6332 /* Override any gcc2 internal prototype to avoid an error.  */
6333 /* We use char because int might match the return type of a gcc2
6334     builtin and then its argument prototype would still apply.  */
6335 char $ac_func();
6336
6337 int main() {
6338
6339 /* The GNU C library defines this for functions which it implements
6340     to always fail with ENOSYS.  Some functions are actually named
6341     something starting with __ and the normal name is an alias.  */
6342 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6343 choke me
6344 #else
6345 $ac_func();
6346 #endif
6347
6348 ; return 0; }
6349 EOF
6350 if { (eval echo configure:6351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6351   rm -rf conftest*
6352   eval "ac_cv_func_$ac_func=yes"
6353 else
6354   echo "configure: failed program was:" >&5
6355   cat conftest.$ac_ext >&5
6356   rm -rf conftest*
6357   eval "ac_cv_func_$ac_func=no"
6358 fi
6359 rm -f conftest*
6360 fi
6361
6362 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6363   echo "$ac_t""yes" 1>&6
6364     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6365   cat >> confdefs.h <<EOF
6366 #define $ac_tr_func 1
6367 EOF
6368  
6369 else
6370   echo "$ac_t""no" 1>&6
6371 fi
6372 done
6373
6374 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6375 do
6376 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6377 echo "configure:6378: checking for $ac_func" >&5
6378 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6379   echo $ac_n "(cached) $ac_c" 1>&6
6380 else
6381   cat > conftest.$ac_ext <<EOF
6382 #line 6383 "configure"
6383 #include "confdefs.h"
6384 /* System header to define __stub macros and hopefully few prototypes,
6385     which can conflict with char $ac_func(); below.  */
6386 #include <assert.h>
6387 /* Override any gcc2 internal prototype to avoid an error.  */
6388 /* We use char because int might match the return type of a gcc2
6389     builtin and then its argument prototype would still apply.  */
6390 char $ac_func();
6391
6392 int main() {
6393
6394 /* The GNU C library defines this for functions which it implements
6395     to always fail with ENOSYS.  Some functions are actually named
6396     something starting with __ and the normal name is an alias.  */
6397 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6398 choke me
6399 #else
6400 $ac_func();
6401 #endif
6402
6403 ; return 0; }
6404 EOF
6405 if { (eval echo configure:6406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6406   rm -rf conftest*
6407   eval "ac_cv_func_$ac_func=yes"
6408 else
6409   echo "configure: failed program was:" >&5
6410   cat conftest.$ac_ext >&5
6411   rm -rf conftest*
6412   eval "ac_cv_func_$ac_func=no"
6413 fi
6414 rm -f conftest*
6415 fi
6416
6417 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6418   echo "$ac_t""yes" 1>&6
6419     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6420   cat >> confdefs.h <<EOF
6421 #define $ac_tr_func 1
6422 EOF
6423  
6424 else
6425   echo "$ac_t""no" 1>&6
6426 fi
6427 done
6428
6429 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6430 do
6431 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6432 echo "configure:6433: checking for $ac_func" >&5
6433 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6434   echo $ac_n "(cached) $ac_c" 1>&6
6435 else
6436   cat > conftest.$ac_ext <<EOF
6437 #line 6438 "configure"
6438 #include "confdefs.h"
6439 /* System header to define __stub macros and hopefully few prototypes,
6440     which can conflict with char $ac_func(); below.  */
6441 #include <assert.h>
6442 /* Override any gcc2 internal prototype to avoid an error.  */
6443 /* We use char because int might match the return type of a gcc2
6444     builtin and then its argument prototype would still apply.  */
6445 char $ac_func();
6446
6447 int main() {
6448
6449 /* The GNU C library defines this for functions which it implements
6450     to always fail with ENOSYS.  Some functions are actually named
6451     something starting with __ and the normal name is an alias.  */
6452 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6453 choke me
6454 #else
6455 $ac_func();
6456 #endif
6457
6458 ; return 0; }
6459 EOF
6460 if { (eval echo configure:6461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6461   rm -rf conftest*
6462   eval "ac_cv_func_$ac_func=yes"
6463 else
6464   echo "configure: failed program was:" >&5
6465   cat conftest.$ac_ext >&5
6466   rm -rf conftest*
6467   eval "ac_cv_func_$ac_func=no"
6468 fi
6469 rm -f conftest*
6470 fi
6471
6472 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6473   echo "$ac_t""yes" 1>&6
6474     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6475   cat >> confdefs.h <<EOF
6476 #define $ac_tr_func 1
6477 EOF
6478  
6479 else
6480   echo "$ac_t""no" 1>&6
6481 fi
6482 done
6483
6484 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6485 do
6486 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6487 echo "configure:6488: checking for $ac_func" >&5
6488 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6489   echo $ac_n "(cached) $ac_c" 1>&6
6490 else
6491   cat > conftest.$ac_ext <<EOF
6492 #line 6493 "configure"
6493 #include "confdefs.h"
6494 /* System header to define __stub macros and hopefully few prototypes,
6495     which can conflict with char $ac_func(); below.  */
6496 #include <assert.h>
6497 /* Override any gcc2 internal prototype to avoid an error.  */
6498 /* We use char because int might match the return type of a gcc2
6499     builtin and then its argument prototype would still apply.  */
6500 char $ac_func();
6501
6502 int main() {
6503
6504 /* The GNU C library defines this for functions which it implements
6505     to always fail with ENOSYS.  Some functions are actually named
6506     something starting with __ and the normal name is an alias.  */
6507 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6508 choke me
6509 #else
6510 $ac_func();
6511 #endif
6512
6513 ; return 0; }
6514 EOF
6515 if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6516   rm -rf conftest*
6517   eval "ac_cv_func_$ac_func=yes"
6518 else
6519   echo "configure: failed program was:" >&5
6520   cat conftest.$ac_ext >&5
6521   rm -rf conftest*
6522   eval "ac_cv_func_$ac_func=no"
6523 fi
6524 rm -f conftest*
6525 fi
6526
6527 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6528   echo "$ac_t""yes" 1>&6
6529     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6530   cat >> confdefs.h <<EOF
6531 #define $ac_tr_func 1
6532 EOF
6533  
6534 else
6535   echo "$ac_t""no" 1>&6
6536 fi
6537 done
6538
6539 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6540 do
6541 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6542 echo "configure:6543: checking for $ac_func" >&5
6543 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6544   echo $ac_n "(cached) $ac_c" 1>&6
6545 else
6546   cat > conftest.$ac_ext <<EOF
6547 #line 6548 "configure"
6548 #include "confdefs.h"
6549 /* System header to define __stub macros and hopefully few prototypes,
6550     which can conflict with char $ac_func(); below.  */
6551 #include <assert.h>
6552 /* Override any gcc2 internal prototype to avoid an error.  */
6553 /* We use char because int might match the return type of a gcc2
6554     builtin and then its argument prototype would still apply.  */
6555 char $ac_func();
6556
6557 int main() {
6558
6559 /* The GNU C library defines this for functions which it implements
6560     to always fail with ENOSYS.  Some functions are actually named
6561     something starting with __ and the normal name is an alias.  */
6562 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6563 choke me
6564 #else
6565 $ac_func();
6566 #endif
6567
6568 ; return 0; }
6569 EOF
6570 if { (eval echo configure:6571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6571   rm -rf conftest*
6572   eval "ac_cv_func_$ac_func=yes"
6573 else
6574   echo "configure: failed program was:" >&5
6575   cat conftest.$ac_ext >&5
6576   rm -rf conftest*
6577   eval "ac_cv_func_$ac_func=no"
6578 fi
6579 rm -f conftest*
6580 fi
6581
6582 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6583   echo "$ac_t""yes" 1>&6
6584     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6585   cat >> confdefs.h <<EOF
6586 #define $ac_tr_func 1
6587 EOF
6588  
6589 else
6590   echo "$ac_t""no" 1>&6
6591 fi
6592 done
6593
6594 for ac_func in _write __write _fork __fork
6595 do
6596 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6597 echo "configure:6598: checking for $ac_func" >&5
6598 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6599   echo $ac_n "(cached) $ac_c" 1>&6
6600 else
6601   cat > conftest.$ac_ext <<EOF
6602 #line 6603 "configure"
6603 #include "confdefs.h"
6604 /* System header to define __stub macros and hopefully few prototypes,
6605     which can conflict with char $ac_func(); below.  */
6606 #include <assert.h>
6607 /* Override any gcc2 internal prototype to avoid an error.  */
6608 /* We use char because int might match the return type of a gcc2
6609     builtin and then its argument prototype would still apply.  */
6610 char $ac_func();
6611
6612 int main() {
6613
6614 /* The GNU C library defines this for functions which it implements
6615     to always fail with ENOSYS.  Some functions are actually named
6616     something starting with __ and the normal name is an alias.  */
6617 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6618 choke me
6619 #else
6620 $ac_func();
6621 #endif
6622
6623 ; return 0; }
6624 EOF
6625 if { (eval echo configure:6626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6626   rm -rf conftest*
6627   eval "ac_cv_func_$ac_func=yes"
6628 else
6629   echo "configure: failed program was:" >&5
6630   cat conftest.$ac_ext >&5
6631   rm -rf conftest*
6632   eval "ac_cv_func_$ac_func=no"
6633 fi
6634 rm -f conftest*
6635 fi
6636
6637 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6638   echo "$ac_t""yes" 1>&6
6639     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6640   cat >> confdefs.h <<EOF
6641 #define $ac_tr_func 1
6642 EOF
6643  
6644 else
6645   echo "$ac_t""no" 1>&6
6646 fi
6647 done
6648
6649 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6650 do
6651 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6652 echo "configure:6653: checking for $ac_func" >&5
6653 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6654   echo $ac_n "(cached) $ac_c" 1>&6
6655 else
6656   cat > conftest.$ac_ext <<EOF
6657 #line 6658 "configure"
6658 #include "confdefs.h"
6659 /* System header to define __stub macros and hopefully few prototypes,
6660     which can conflict with char $ac_func(); below.  */
6661 #include <assert.h>
6662 /* Override any gcc2 internal prototype to avoid an error.  */
6663 /* We use char because int might match the return type of a gcc2
6664     builtin and then its argument prototype would still apply.  */
6665 char $ac_func();
6666
6667 int main() {
6668
6669 /* The GNU C library defines this for functions which it implements
6670     to always fail with ENOSYS.  Some functions are actually named
6671     something starting with __ and the normal name is an alias.  */
6672 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6673 choke me
6674 #else
6675 $ac_func();
6676 #endif
6677
6678 ; return 0; }
6679 EOF
6680 if { (eval echo configure:6681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6681   rm -rf conftest*
6682   eval "ac_cv_func_$ac_func=yes"
6683 else
6684   echo "configure: failed program was:" >&5
6685   cat conftest.$ac_ext >&5
6686   rm -rf conftest*
6687   eval "ac_cv_func_$ac_func=no"
6688 fi
6689 rm -f conftest*
6690 fi
6691
6692 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6693   echo "$ac_t""yes" 1>&6
6694     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6695   cat >> confdefs.h <<EOF
6696 #define $ac_tr_func 1
6697 EOF
6698  
6699 else
6700   echo "$ac_t""no" 1>&6
6701 fi
6702 done
6703
6704 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6705 do
6706 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6707 echo "configure:6708: checking for $ac_func" >&5
6708 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6709   echo $ac_n "(cached) $ac_c" 1>&6
6710 else
6711   cat > conftest.$ac_ext <<EOF
6712 #line 6713 "configure"
6713 #include "confdefs.h"
6714 /* System header to define __stub macros and hopefully few prototypes,
6715     which can conflict with char $ac_func(); below.  */
6716 #include <assert.h>
6717 /* Override any gcc2 internal prototype to avoid an error.  */
6718 /* We use char because int might match the return type of a gcc2
6719     builtin and then its argument prototype would still apply.  */
6720 char $ac_func();
6721
6722 int main() {
6723
6724 /* The GNU C library defines this for functions which it implements
6725     to always fail with ENOSYS.  Some functions are actually named
6726     something starting with __ and the normal name is an alias.  */
6727 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6728 choke me
6729 #else
6730 $ac_func();
6731 #endif
6732
6733 ; return 0; }
6734 EOF
6735 if { (eval echo configure:6736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6736   rm -rf conftest*
6737   eval "ac_cv_func_$ac_func=yes"
6738 else
6739   echo "configure: failed program was:" >&5
6740   cat conftest.$ac_ext >&5
6741   rm -rf conftest*
6742   eval "ac_cv_func_$ac_func=no"
6743 fi
6744 rm -f conftest*
6745 fi
6746
6747 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6748   echo "$ac_t""yes" 1>&6
6749     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6750   cat >> confdefs.h <<EOF
6751 #define $ac_tr_func 1
6752 EOF
6753  
6754 else
6755   echo "$ac_t""no" 1>&6
6756 fi
6757 done
6758
6759 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6760 do
6761 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6762 echo "configure:6763: checking for $ac_func" >&5
6763 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6764   echo $ac_n "(cached) $ac_c" 1>&6
6765 else
6766   cat > conftest.$ac_ext <<EOF
6767 #line 6768 "configure"
6768 #include "confdefs.h"
6769 /* System header to define __stub macros and hopefully few prototypes,
6770     which can conflict with char $ac_func(); below.  */
6771 #include <assert.h>
6772 /* Override any gcc2 internal prototype to avoid an error.  */
6773 /* We use char because int might match the return type of a gcc2
6774     builtin and then its argument prototype would still apply.  */
6775 char $ac_func();
6776
6777 int main() {
6778
6779 /* The GNU C library defines this for functions which it implements
6780     to always fail with ENOSYS.  Some functions are actually named
6781     something starting with __ and the normal name is an alias.  */
6782 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6783 choke me
6784 #else
6785 $ac_func();
6786 #endif
6787
6788 ; return 0; }
6789 EOF
6790 if { (eval echo configure:6791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6791   rm -rf conftest*
6792   eval "ac_cv_func_$ac_func=yes"
6793 else
6794   echo "configure: failed program was:" >&5
6795   cat conftest.$ac_ext >&5
6796   rm -rf conftest*
6797   eval "ac_cv_func_$ac_func=no"
6798 fi
6799 rm -f conftest*
6800 fi
6801
6802 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6803   echo "$ac_t""yes" 1>&6
6804     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6805   cat >> confdefs.h <<EOF
6806 #define $ac_tr_func 1
6807 EOF
6808  
6809 else
6810   echo "$ac_t""no" 1>&6
6811 fi
6812 done
6813
6814 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6815 do
6816 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6817 echo "configure:6818: checking for $ac_func" >&5
6818 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6819   echo $ac_n "(cached) $ac_c" 1>&6
6820 else
6821   cat > conftest.$ac_ext <<EOF
6822 #line 6823 "configure"
6823 #include "confdefs.h"
6824 /* System header to define __stub macros and hopefully few prototypes,
6825     which can conflict with char $ac_func(); below.  */
6826 #include <assert.h>
6827 /* Override any gcc2 internal prototype to avoid an error.  */
6828 /* We use char because int might match the return type of a gcc2
6829     builtin and then its argument prototype would still apply.  */
6830 char $ac_func();
6831
6832 int main() {
6833
6834 /* The GNU C library defines this for functions which it implements
6835     to always fail with ENOSYS.  Some functions are actually named
6836     something starting with __ and the normal name is an alias.  */
6837 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6838 choke me
6839 #else
6840 $ac_func();
6841 #endif
6842
6843 ; return 0; }
6844 EOF
6845 if { (eval echo configure:6846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6846   rm -rf conftest*
6847   eval "ac_cv_func_$ac_func=yes"
6848 else
6849   echo "configure: failed program was:" >&5
6850   cat conftest.$ac_ext >&5
6851   rm -rf conftest*
6852   eval "ac_cv_func_$ac_func=no"
6853 fi
6854 rm -f conftest*
6855 fi
6856
6857 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6858   echo "$ac_t""yes" 1>&6
6859     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6860   cat >> confdefs.h <<EOF
6861 #define $ac_tr_func 1
6862 EOF
6863  
6864 else
6865   echo "$ac_t""no" 1>&6
6866 fi
6867 done
6868
6869 for ac_func in open64 _open64 __open64 creat64
6870 do
6871 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6872 echo "configure:6873: checking for $ac_func" >&5
6873 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6874   echo $ac_n "(cached) $ac_c" 1>&6
6875 else
6876   cat > conftest.$ac_ext <<EOF
6877 #line 6878 "configure"
6878 #include "confdefs.h"
6879 /* System header to define __stub macros and hopefully few prototypes,
6880     which can conflict with char $ac_func(); below.  */
6881 #include <assert.h>
6882 /* Override any gcc2 internal prototype to avoid an error.  */
6883 /* We use char because int might match the return type of a gcc2
6884     builtin and then its argument prototype would still apply.  */
6885 char $ac_func();
6886
6887 int main() {
6888
6889 /* The GNU C library defines this for functions which it implements
6890     to always fail with ENOSYS.  Some functions are actually named
6891     something starting with __ and the normal name is an alias.  */
6892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6893 choke me
6894 #else
6895 $ac_func();
6896 #endif
6897
6898 ; return 0; }
6899 EOF
6900 if { (eval echo configure:6901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6901   rm -rf conftest*
6902   eval "ac_cv_func_$ac_func=yes"
6903 else
6904   echo "configure: failed program was:" >&5
6905   cat conftest.$ac_ext >&5
6906   rm -rf conftest*
6907   eval "ac_cv_func_$ac_func=no"
6908 fi
6909 rm -f conftest*
6910 fi
6911
6912 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6913   echo "$ac_t""yes" 1>&6
6914     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6915   cat >> confdefs.h <<EOF
6916 #define $ac_tr_func 1
6917 EOF
6918  
6919 else
6920   echo "$ac_t""no" 1>&6
6921 fi
6922 done
6923
6924
6925 #
6926 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6927 #
6928
6929 if test x$ac_cv_func_stat64 = xno ; then
6930   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6931 echo "configure:6932: checking for stat64 in <sys/stat.h>" >&5
6932   cat > conftest.$ac_ext <<EOF
6933 #line 6934 "configure"
6934 #include "confdefs.h"
6935
6936 #if defined(HAVE_UNISTD_H)
6937 #include <unistd.h>
6938 #endif
6939 #include <sys/stat.h>
6940
6941 int main() {
6942 struct stat64 st64; exit(stat64(".",&st64));
6943 ; return 0; }
6944 EOF
6945 if { (eval echo configure:6946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6946   rm -rf conftest*
6947   ac_cv_func_stat64=yes
6948 else
6949   echo "configure: failed program was:" >&5
6950   cat conftest.$ac_ext >&5
6951 fi
6952 rm -f conftest*
6953   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6954   if test x$ac_cv_func_stat64 = xyes ; then
6955     cat >> confdefs.h <<\EOF
6956 #define HAVE_STAT64 1
6957 EOF
6958
6959   fi
6960 fi
6961
6962 if test x$ac_cv_func_lstat64 = xno ; then
6963   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6964 echo "configure:6965: checking for lstat64 in <sys/stat.h>" >&5
6965   cat > conftest.$ac_ext <<EOF
6966 #line 6967 "configure"
6967 #include "confdefs.h"
6968
6969 #if defined(HAVE_UNISTD_H)
6970 #include <unistd.h>
6971 #endif
6972 #include <sys/stat.h>
6973
6974 int main() {
6975 struct stat64 st64; exit(lstat64(".",&st64));
6976 ; return 0; }
6977 EOF
6978 if { (eval echo configure:6979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6979   rm -rf conftest*
6980   ac_cv_func_lstat64=yes
6981 else
6982   echo "configure: failed program was:" >&5
6983   cat conftest.$ac_ext >&5
6984 fi
6985 rm -f conftest*
6986   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6987   if test x$ac_cv_func_lstat64 = xyes ; then
6988     cat >> confdefs.h <<\EOF
6989 #define HAVE_LSTAT64 1
6990 EOF
6991
6992   fi
6993 fi
6994
6995 if test x$ac_cv_func_fstat64 = xno ; then
6996   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6997 echo "configure:6998: checking for fstat64 in <sys/stat.h>" >&5
6998   cat > conftest.$ac_ext <<EOF
6999 #line 7000 "configure"
7000 #include "confdefs.h"
7001
7002 #if defined(HAVE_UNISTD_H)
7003 #include <unistd.h>
7004 #endif
7005 #include <sys/stat.h>
7006
7007 int main() {
7008 struct stat64 st64; exit(fstat64(0,&st64));
7009 ; return 0; }
7010 EOF
7011 if { (eval echo configure:7012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7012   rm -rf conftest*
7013   ac_cv_func_fstat64=yes
7014 else
7015   echo "configure: failed program was:" >&5
7016   cat conftest.$ac_ext >&5
7017 fi
7018 rm -f conftest*
7019   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
7020   if test x$ac_cv_func_fstat64 = xyes ; then
7021     cat >> confdefs.h <<\EOF
7022 #define HAVE_FSTAT64 1
7023 EOF
7024
7025   fi
7026 fi
7027
7028 #####################################
7029 # we might need the resolv library on some systems
7030 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
7031 echo "configure:7032: checking for dn_expand in -lresolv" >&5
7032 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
7033 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7034   echo $ac_n "(cached) $ac_c" 1>&6
7035 else
7036   ac_save_LIBS="$LIBS"
7037 LIBS="-lresolv  $LIBS"
7038 cat > conftest.$ac_ext <<EOF
7039 #line 7040 "configure"
7040 #include "confdefs.h"
7041 /* Override any gcc2 internal prototype to avoid an error.  */
7042 /* We use char because int might match the return type of a gcc2
7043     builtin and then its argument prototype would still apply.  */
7044 char dn_expand();
7045
7046 int main() {
7047 dn_expand()
7048 ; return 0; }
7049 EOF
7050 if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7051   rm -rf conftest*
7052   eval "ac_cv_lib_$ac_lib_var=yes"
7053 else
7054   echo "configure: failed program was:" >&5
7055   cat conftest.$ac_ext >&5
7056   rm -rf conftest*
7057   eval "ac_cv_lib_$ac_lib_var=no"
7058 fi
7059 rm -f conftest*
7060 LIBS="$ac_save_LIBS"
7061
7062 fi
7063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7064   echo "$ac_t""yes" 1>&6
7065     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7066     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7067   cat >> confdefs.h <<EOF
7068 #define $ac_tr_lib 1
7069 EOF
7070
7071   LIBS="-lresolv $LIBS"
7072
7073 else
7074   echo "$ac_t""no" 1>&6
7075 fi
7076
7077
7078 #
7079 # Check for the functions putprpwnam, set_auth_parameters,
7080 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7081 # Needed for OSF1 and HPUX.
7082 #
7083
7084 case "$LIBS" in
7085   *-lsecurity*) for ac_func in putprpwnam
7086 do
7087 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7088 echo "configure:7089: checking for $ac_func" >&5
7089 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7090   echo $ac_n "(cached) $ac_c" 1>&6
7091 else
7092   cat > conftest.$ac_ext <<EOF
7093 #line 7094 "configure"
7094 #include "confdefs.h"
7095 /* System header to define __stub macros and hopefully few prototypes,
7096     which can conflict with char $ac_func(); below.  */
7097 #include <assert.h>
7098 /* Override any gcc2 internal prototype to avoid an error.  */
7099 /* We use char because int might match the return type of a gcc2
7100     builtin and then its argument prototype would still apply.  */
7101 char $ac_func();
7102
7103 int main() {
7104
7105 /* The GNU C library defines this for functions which it implements
7106     to always fail with ENOSYS.  Some functions are actually named
7107     something starting with __ and the normal name is an alias.  */
7108 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7109 choke me
7110 #else
7111 $ac_func();
7112 #endif
7113
7114 ; return 0; }
7115 EOF
7116 if { (eval echo configure:7117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7117   rm -rf conftest*
7118   eval "ac_cv_func_$ac_func=yes"
7119 else
7120   echo "configure: failed program was:" >&5
7121   cat conftest.$ac_ext >&5
7122   rm -rf conftest*
7123   eval "ac_cv_func_$ac_func=no"
7124 fi
7125 rm -f conftest*
7126 fi
7127
7128 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7129   echo "$ac_t""yes" 1>&6
7130     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7131   cat >> confdefs.h <<EOF
7132 #define $ac_tr_func 1
7133 EOF
7134  
7135 else
7136   echo "$ac_t""no" 1>&6
7137 fi
7138 done
7139  ;;
7140   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7141 echo "configure:7142: checking for putprpwnam in -lsecurity" >&5
7142 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7143 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7144   echo $ac_n "(cached) $ac_c" 1>&6
7145 else
7146   ac_save_LIBS="$LIBS"
7147 LIBS="-lsecurity  $LIBS"
7148 cat > conftest.$ac_ext <<EOF
7149 #line 7150 "configure"
7150 #include "confdefs.h"
7151 /* Override any gcc2 internal prototype to avoid an error.  */
7152 /* We use char because int might match the return type of a gcc2
7153     builtin and then its argument prototype would still apply.  */
7154 char putprpwnam();
7155
7156 int main() {
7157 putprpwnam()
7158 ; return 0; }
7159 EOF
7160 if { (eval echo configure:7161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7161   rm -rf conftest*
7162   eval "ac_cv_lib_$ac_lib_var=yes"
7163 else
7164   echo "configure: failed program was:" >&5
7165   cat conftest.$ac_ext >&5
7166   rm -rf conftest*
7167   eval "ac_cv_lib_$ac_lib_var=no"
7168 fi
7169 rm -f conftest*
7170 LIBS="$ac_save_LIBS"
7171
7172 fi
7173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7174   echo "$ac_t""yes" 1>&6
7175     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7176     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7177   cat >> confdefs.h <<EOF
7178 #define $ac_tr_lib 1
7179 EOF
7180
7181   LIBS="-lsecurity $LIBS"
7182
7183 else
7184   echo "$ac_t""no" 1>&6
7185 fi
7186  
7187      for ac_func in putprpwnam
7188 do
7189 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7190 echo "configure:7191: checking for $ac_func" >&5
7191 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7192   echo $ac_n "(cached) $ac_c" 1>&6
7193 else
7194   cat > conftest.$ac_ext <<EOF
7195 #line 7196 "configure"
7196 #include "confdefs.h"
7197 /* System header to define __stub macros and hopefully few prototypes,
7198     which can conflict with char $ac_func(); below.  */
7199 #include <assert.h>
7200 /* Override any gcc2 internal prototype to avoid an error.  */
7201 /* We use char because int might match the return type of a gcc2
7202     builtin and then its argument prototype would still apply.  */
7203 char $ac_func();
7204
7205 int main() {
7206
7207 /* The GNU C library defines this for functions which it implements
7208     to always fail with ENOSYS.  Some functions are actually named
7209     something starting with __ and the normal name is an alias.  */
7210 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7211 choke me
7212 #else
7213 $ac_func();
7214 #endif
7215
7216 ; return 0; }
7217 EOF
7218 if { (eval echo configure:7219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7219   rm -rf conftest*
7220   eval "ac_cv_func_$ac_func=yes"
7221 else
7222   echo "configure: failed program was:" >&5
7223   cat conftest.$ac_ext >&5
7224   rm -rf conftest*
7225   eval "ac_cv_func_$ac_func=no"
7226 fi
7227 rm -f conftest*
7228 fi
7229
7230 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7231   echo "$ac_t""yes" 1>&6
7232     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7233   cat >> confdefs.h <<EOF
7234 #define $ac_tr_func 1
7235 EOF
7236  
7237 else
7238   echo "$ac_t""no" 1>&6
7239 fi
7240 done
7241
7242   ;;
7243   esac
7244
7245 case "$LIBS" in
7246   *-lsec*) for ac_func in putprpwnam
7247 do
7248 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7249 echo "configure:7250: checking for $ac_func" >&5
7250 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7251   echo $ac_n "(cached) $ac_c" 1>&6
7252 else
7253   cat > conftest.$ac_ext <<EOF
7254 #line 7255 "configure"
7255 #include "confdefs.h"
7256 /* System header to define __stub macros and hopefully few prototypes,
7257     which can conflict with char $ac_func(); below.  */
7258 #include <assert.h>
7259 /* Override any gcc2 internal prototype to avoid an error.  */
7260 /* We use char because int might match the return type of a gcc2
7261     builtin and then its argument prototype would still apply.  */
7262 char $ac_func();
7263
7264 int main() {
7265
7266 /* The GNU C library defines this for functions which it implements
7267     to always fail with ENOSYS.  Some functions are actually named
7268     something starting with __ and the normal name is an alias.  */
7269 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7270 choke me
7271 #else
7272 $ac_func();
7273 #endif
7274
7275 ; return 0; }
7276 EOF
7277 if { (eval echo configure:7278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7278   rm -rf conftest*
7279   eval "ac_cv_func_$ac_func=yes"
7280 else
7281   echo "configure: failed program was:" >&5
7282   cat conftest.$ac_ext >&5
7283   rm -rf conftest*
7284   eval "ac_cv_func_$ac_func=no"
7285 fi
7286 rm -f conftest*
7287 fi
7288
7289 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7290   echo "$ac_t""yes" 1>&6
7291     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7292   cat >> confdefs.h <<EOF
7293 #define $ac_tr_func 1
7294 EOF
7295  
7296 else
7297   echo "$ac_t""no" 1>&6
7298 fi
7299 done
7300  ;;
7301   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7302 echo "configure:7303: checking for putprpwnam in -lsec" >&5
7303 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7304 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7305   echo $ac_n "(cached) $ac_c" 1>&6
7306 else
7307   ac_save_LIBS="$LIBS"
7308 LIBS="-lsec  $LIBS"
7309 cat > conftest.$ac_ext <<EOF
7310 #line 7311 "configure"
7311 #include "confdefs.h"
7312 /* Override any gcc2 internal prototype to avoid an error.  */
7313 /* We use char because int might match the return type of a gcc2
7314     builtin and then its argument prototype would still apply.  */
7315 char putprpwnam();
7316
7317 int main() {
7318 putprpwnam()
7319 ; return 0; }
7320 EOF
7321 if { (eval echo configure:7322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7322   rm -rf conftest*
7323   eval "ac_cv_lib_$ac_lib_var=yes"
7324 else
7325   echo "configure: failed program was:" >&5
7326   cat conftest.$ac_ext >&5
7327   rm -rf conftest*
7328   eval "ac_cv_lib_$ac_lib_var=no"
7329 fi
7330 rm -f conftest*
7331 LIBS="$ac_save_LIBS"
7332
7333 fi
7334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7335   echo "$ac_t""yes" 1>&6
7336     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7337     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7338   cat >> confdefs.h <<EOF
7339 #define $ac_tr_lib 1
7340 EOF
7341
7342   LIBS="-lsec $LIBS"
7343
7344 else
7345   echo "$ac_t""no" 1>&6
7346 fi
7347  
7348      for ac_func in putprpwnam
7349 do
7350 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7351 echo "configure:7352: checking for $ac_func" >&5
7352 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7353   echo $ac_n "(cached) $ac_c" 1>&6
7354 else
7355   cat > conftest.$ac_ext <<EOF
7356 #line 7357 "configure"
7357 #include "confdefs.h"
7358 /* System header to define __stub macros and hopefully few prototypes,
7359     which can conflict with char $ac_func(); below.  */
7360 #include <assert.h>
7361 /* Override any gcc2 internal prototype to avoid an error.  */
7362 /* We use char because int might match the return type of a gcc2
7363     builtin and then its argument prototype would still apply.  */
7364 char $ac_func();
7365
7366 int main() {
7367
7368 /* The GNU C library defines this for functions which it implements
7369     to always fail with ENOSYS.  Some functions are actually named
7370     something starting with __ and the normal name is an alias.  */
7371 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7372 choke me
7373 #else
7374 $ac_func();
7375 #endif
7376
7377 ; return 0; }
7378 EOF
7379 if { (eval echo configure:7380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7380   rm -rf conftest*
7381   eval "ac_cv_func_$ac_func=yes"
7382 else
7383   echo "configure: failed program was:" >&5
7384   cat conftest.$ac_ext >&5
7385   rm -rf conftest*
7386   eval "ac_cv_func_$ac_func=no"
7387 fi
7388 rm -f conftest*
7389 fi
7390
7391 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7392   echo "$ac_t""yes" 1>&6
7393     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7394   cat >> confdefs.h <<EOF
7395 #define $ac_tr_func 1
7396 EOF
7397  
7398 else
7399   echo "$ac_t""no" 1>&6
7400 fi
7401 done
7402
7403   ;;
7404   esac
7405
7406
7407 case "$LIBS" in
7408   *-lsecurity*) for ac_func in set_auth_parameters
7409 do
7410 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7411 echo "configure:7412: checking for $ac_func" >&5
7412 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7413   echo $ac_n "(cached) $ac_c" 1>&6
7414 else
7415   cat > conftest.$ac_ext <<EOF
7416 #line 7417 "configure"
7417 #include "confdefs.h"
7418 /* System header to define __stub macros and hopefully few prototypes,
7419     which can conflict with char $ac_func(); below.  */
7420 #include <assert.h>
7421 /* Override any gcc2 internal prototype to avoid an error.  */
7422 /* We use char because int might match the return type of a gcc2
7423     builtin and then its argument prototype would still apply.  */
7424 char $ac_func();
7425
7426 int main() {
7427
7428 /* The GNU C library defines this for functions which it implements
7429     to always fail with ENOSYS.  Some functions are actually named
7430     something starting with __ and the normal name is an alias.  */
7431 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7432 choke me
7433 #else
7434 $ac_func();
7435 #endif
7436
7437 ; return 0; }
7438 EOF
7439 if { (eval echo configure:7440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7440   rm -rf conftest*
7441   eval "ac_cv_func_$ac_func=yes"
7442 else
7443   echo "configure: failed program was:" >&5
7444   cat conftest.$ac_ext >&5
7445   rm -rf conftest*
7446   eval "ac_cv_func_$ac_func=no"
7447 fi
7448 rm -f conftest*
7449 fi
7450
7451 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7452   echo "$ac_t""yes" 1>&6
7453     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7454   cat >> confdefs.h <<EOF
7455 #define $ac_tr_func 1
7456 EOF
7457  
7458 else
7459   echo "$ac_t""no" 1>&6
7460 fi
7461 done
7462  ;;
7463   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7464 echo "configure:7465: checking for set_auth_parameters in -lsecurity" >&5
7465 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7466 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7467   echo $ac_n "(cached) $ac_c" 1>&6
7468 else
7469   ac_save_LIBS="$LIBS"
7470 LIBS="-lsecurity  $LIBS"
7471 cat > conftest.$ac_ext <<EOF
7472 #line 7473 "configure"
7473 #include "confdefs.h"
7474 /* Override any gcc2 internal prototype to avoid an error.  */
7475 /* We use char because int might match the return type of a gcc2
7476     builtin and then its argument prototype would still apply.  */
7477 char set_auth_parameters();
7478
7479 int main() {
7480 set_auth_parameters()
7481 ; return 0; }
7482 EOF
7483 if { (eval echo configure:7484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7484   rm -rf conftest*
7485   eval "ac_cv_lib_$ac_lib_var=yes"
7486 else
7487   echo "configure: failed program was:" >&5
7488   cat conftest.$ac_ext >&5
7489   rm -rf conftest*
7490   eval "ac_cv_lib_$ac_lib_var=no"
7491 fi
7492 rm -f conftest*
7493 LIBS="$ac_save_LIBS"
7494
7495 fi
7496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7497   echo "$ac_t""yes" 1>&6
7498     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7499     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7500   cat >> confdefs.h <<EOF
7501 #define $ac_tr_lib 1
7502 EOF
7503
7504   LIBS="-lsecurity $LIBS"
7505
7506 else
7507   echo "$ac_t""no" 1>&6
7508 fi
7509  
7510      for ac_func in set_auth_parameters
7511 do
7512 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7513 echo "configure:7514: checking for $ac_func" >&5
7514 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7515   echo $ac_n "(cached) $ac_c" 1>&6
7516 else
7517   cat > conftest.$ac_ext <<EOF
7518 #line 7519 "configure"
7519 #include "confdefs.h"
7520 /* System header to define __stub macros and hopefully few prototypes,
7521     which can conflict with char $ac_func(); below.  */
7522 #include <assert.h>
7523 /* Override any gcc2 internal prototype to avoid an error.  */
7524 /* We use char because int might match the return type of a gcc2
7525     builtin and then its argument prototype would still apply.  */
7526 char $ac_func();
7527
7528 int main() {
7529
7530 /* The GNU C library defines this for functions which it implements
7531     to always fail with ENOSYS.  Some functions are actually named
7532     something starting with __ and the normal name is an alias.  */
7533 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7534 choke me
7535 #else
7536 $ac_func();
7537 #endif
7538
7539 ; return 0; }
7540 EOF
7541 if { (eval echo configure:7542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7542   rm -rf conftest*
7543   eval "ac_cv_func_$ac_func=yes"
7544 else
7545   echo "configure: failed program was:" >&5
7546   cat conftest.$ac_ext >&5
7547   rm -rf conftest*
7548   eval "ac_cv_func_$ac_func=no"
7549 fi
7550 rm -f conftest*
7551 fi
7552
7553 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7554   echo "$ac_t""yes" 1>&6
7555     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7556   cat >> confdefs.h <<EOF
7557 #define $ac_tr_func 1
7558 EOF
7559  
7560 else
7561   echo "$ac_t""no" 1>&6
7562 fi
7563 done
7564
7565   ;;
7566   esac
7567
7568 case "$LIBS" in
7569   *-lsec*) for ac_func in set_auth_parameters
7570 do
7571 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7572 echo "configure:7573: checking for $ac_func" >&5
7573 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7574   echo $ac_n "(cached) $ac_c" 1>&6
7575 else
7576   cat > conftest.$ac_ext <<EOF
7577 #line 7578 "configure"
7578 #include "confdefs.h"
7579 /* System header to define __stub macros and hopefully few prototypes,
7580     which can conflict with char $ac_func(); below.  */
7581 #include <assert.h>
7582 /* Override any gcc2 internal prototype to avoid an error.  */
7583 /* We use char because int might match the return type of a gcc2
7584     builtin and then its argument prototype would still apply.  */
7585 char $ac_func();
7586
7587 int main() {
7588
7589 /* The GNU C library defines this for functions which it implements
7590     to always fail with ENOSYS.  Some functions are actually named
7591     something starting with __ and the normal name is an alias.  */
7592 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7593 choke me
7594 #else
7595 $ac_func();
7596 #endif
7597
7598 ; return 0; }
7599 EOF
7600 if { (eval echo configure:7601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7601   rm -rf conftest*
7602   eval "ac_cv_func_$ac_func=yes"
7603 else
7604   echo "configure: failed program was:" >&5
7605   cat conftest.$ac_ext >&5
7606   rm -rf conftest*
7607   eval "ac_cv_func_$ac_func=no"
7608 fi
7609 rm -f conftest*
7610 fi
7611
7612 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7613   echo "$ac_t""yes" 1>&6
7614     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7615   cat >> confdefs.h <<EOF
7616 #define $ac_tr_func 1
7617 EOF
7618  
7619 else
7620   echo "$ac_t""no" 1>&6
7621 fi
7622 done
7623  ;;
7624   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7625 echo "configure:7626: checking for set_auth_parameters in -lsec" >&5
7626 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7627 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7628   echo $ac_n "(cached) $ac_c" 1>&6
7629 else
7630   ac_save_LIBS="$LIBS"
7631 LIBS="-lsec  $LIBS"
7632 cat > conftest.$ac_ext <<EOF
7633 #line 7634 "configure"
7634 #include "confdefs.h"
7635 /* Override any gcc2 internal prototype to avoid an error.  */
7636 /* We use char because int might match the return type of a gcc2
7637     builtin and then its argument prototype would still apply.  */
7638 char set_auth_parameters();
7639
7640 int main() {
7641 set_auth_parameters()
7642 ; return 0; }
7643 EOF
7644 if { (eval echo configure:7645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7645   rm -rf conftest*
7646   eval "ac_cv_lib_$ac_lib_var=yes"
7647 else
7648   echo "configure: failed program was:" >&5
7649   cat conftest.$ac_ext >&5
7650   rm -rf conftest*
7651   eval "ac_cv_lib_$ac_lib_var=no"
7652 fi
7653 rm -f conftest*
7654 LIBS="$ac_save_LIBS"
7655
7656 fi
7657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7658   echo "$ac_t""yes" 1>&6
7659     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7660     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7661   cat >> confdefs.h <<EOF
7662 #define $ac_tr_lib 1
7663 EOF
7664
7665   LIBS="-lsec $LIBS"
7666
7667 else
7668   echo "$ac_t""no" 1>&6
7669 fi
7670  
7671      for ac_func in set_auth_parameters
7672 do
7673 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7674 echo "configure:7675: checking for $ac_func" >&5
7675 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7676   echo $ac_n "(cached) $ac_c" 1>&6
7677 else
7678   cat > conftest.$ac_ext <<EOF
7679 #line 7680 "configure"
7680 #include "confdefs.h"
7681 /* System header to define __stub macros and hopefully few prototypes,
7682     which can conflict with char $ac_func(); below.  */
7683 #include <assert.h>
7684 /* Override any gcc2 internal prototype to avoid an error.  */
7685 /* We use char because int might match the return type of a gcc2
7686     builtin and then its argument prototype would still apply.  */
7687 char $ac_func();
7688
7689 int main() {
7690
7691 /* The GNU C library defines this for functions which it implements
7692     to always fail with ENOSYS.  Some functions are actually named
7693     something starting with __ and the normal name is an alias.  */
7694 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7695 choke me
7696 #else
7697 $ac_func();
7698 #endif
7699
7700 ; return 0; }
7701 EOF
7702 if { (eval echo configure:7703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7703   rm -rf conftest*
7704   eval "ac_cv_func_$ac_func=yes"
7705 else
7706   echo "configure: failed program was:" >&5
7707   cat conftest.$ac_ext >&5
7708   rm -rf conftest*
7709   eval "ac_cv_func_$ac_func=no"
7710 fi
7711 rm -f conftest*
7712 fi
7713
7714 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7715   echo "$ac_t""yes" 1>&6
7716     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7717   cat >> confdefs.h <<EOF
7718 #define $ac_tr_func 1
7719 EOF
7720  
7721 else
7722   echo "$ac_t""no" 1>&6
7723 fi
7724 done
7725
7726   ;;
7727   esac
7728
7729
7730 # UnixWare 7.x has its getspnam in -lgen
7731 case "$LIBS" in
7732   *-lgen*) for ac_func in getspnam
7733 do
7734 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7735 echo "configure:7736: checking for $ac_func" >&5
7736 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7737   echo $ac_n "(cached) $ac_c" 1>&6
7738 else
7739   cat > conftest.$ac_ext <<EOF
7740 #line 7741 "configure"
7741 #include "confdefs.h"
7742 /* System header to define __stub macros and hopefully few prototypes,
7743     which can conflict with char $ac_func(); below.  */
7744 #include <assert.h>
7745 /* Override any gcc2 internal prototype to avoid an error.  */
7746 /* We use char because int might match the return type of a gcc2
7747     builtin and then its argument prototype would still apply.  */
7748 char $ac_func();
7749
7750 int main() {
7751
7752 /* The GNU C library defines this for functions which it implements
7753     to always fail with ENOSYS.  Some functions are actually named
7754     something starting with __ and the normal name is an alias.  */
7755 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7756 choke me
7757 #else
7758 $ac_func();
7759 #endif
7760
7761 ; return 0; }
7762 EOF
7763 if { (eval echo configure:7764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7764   rm -rf conftest*
7765   eval "ac_cv_func_$ac_func=yes"
7766 else
7767   echo "configure: failed program was:" >&5
7768   cat conftest.$ac_ext >&5
7769   rm -rf conftest*
7770   eval "ac_cv_func_$ac_func=no"
7771 fi
7772 rm -f conftest*
7773 fi
7774
7775 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7776   echo "$ac_t""yes" 1>&6
7777     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7778   cat >> confdefs.h <<EOF
7779 #define $ac_tr_func 1
7780 EOF
7781  
7782 else
7783   echo "$ac_t""no" 1>&6
7784 fi
7785 done
7786  ;;
7787   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7788 echo "configure:7789: checking for getspnam in -lgen" >&5
7789 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7790 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7791   echo $ac_n "(cached) $ac_c" 1>&6
7792 else
7793   ac_save_LIBS="$LIBS"
7794 LIBS="-lgen  $LIBS"
7795 cat > conftest.$ac_ext <<EOF
7796 #line 7797 "configure"
7797 #include "confdefs.h"
7798 /* Override any gcc2 internal prototype to avoid an error.  */
7799 /* We use char because int might match the return type of a gcc2
7800     builtin and then its argument prototype would still apply.  */
7801 char getspnam();
7802
7803 int main() {
7804 getspnam()
7805 ; return 0; }
7806 EOF
7807 if { (eval echo configure:7808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7808   rm -rf conftest*
7809   eval "ac_cv_lib_$ac_lib_var=yes"
7810 else
7811   echo "configure: failed program was:" >&5
7812   cat conftest.$ac_ext >&5
7813   rm -rf conftest*
7814   eval "ac_cv_lib_$ac_lib_var=no"
7815 fi
7816 rm -f conftest*
7817 LIBS="$ac_save_LIBS"
7818
7819 fi
7820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7821   echo "$ac_t""yes" 1>&6
7822     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7823     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7824   cat >> confdefs.h <<EOF
7825 #define $ac_tr_lib 1
7826 EOF
7827
7828   LIBS="-lgen $LIBS"
7829
7830 else
7831   echo "$ac_t""no" 1>&6
7832 fi
7833  
7834      for ac_func in getspnam
7835 do
7836 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7837 echo "configure:7838: checking for $ac_func" >&5
7838 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7839   echo $ac_n "(cached) $ac_c" 1>&6
7840 else
7841   cat > conftest.$ac_ext <<EOF
7842 #line 7843 "configure"
7843 #include "confdefs.h"
7844 /* System header to define __stub macros and hopefully few prototypes,
7845     which can conflict with char $ac_func(); below.  */
7846 #include <assert.h>
7847 /* Override any gcc2 internal prototype to avoid an error.  */
7848 /* We use char because int might match the return type of a gcc2
7849     builtin and then its argument prototype would still apply.  */
7850 char $ac_func();
7851
7852 int main() {
7853
7854 /* The GNU C library defines this for functions which it implements
7855     to always fail with ENOSYS.  Some functions are actually named
7856     something starting with __ and the normal name is an alias.  */
7857 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7858 choke me
7859 #else
7860 $ac_func();
7861 #endif
7862
7863 ; return 0; }
7864 EOF
7865 if { (eval echo configure:7866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7866   rm -rf conftest*
7867   eval "ac_cv_func_$ac_func=yes"
7868 else
7869   echo "configure: failed program was:" >&5
7870   cat conftest.$ac_ext >&5
7871   rm -rf conftest*
7872   eval "ac_cv_func_$ac_func=no"
7873 fi
7874 rm -f conftest*
7875 fi
7876
7877 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7878   echo "$ac_t""yes" 1>&6
7879     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7880   cat >> confdefs.h <<EOF
7881 #define $ac_tr_func 1
7882 EOF
7883  
7884 else
7885   echo "$ac_t""no" 1>&6
7886 fi
7887 done
7888
7889   ;;
7890   esac
7891
7892
7893 case "$LIBS" in
7894   *-lsecurity*) for ac_func in getspnam
7895 do
7896 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7897 echo "configure:7898: checking for $ac_func" >&5
7898 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7899   echo $ac_n "(cached) $ac_c" 1>&6
7900 else
7901   cat > conftest.$ac_ext <<EOF
7902 #line 7903 "configure"
7903 #include "confdefs.h"
7904 /* System header to define __stub macros and hopefully few prototypes,
7905     which can conflict with char $ac_func(); below.  */
7906 #include <assert.h>
7907 /* Override any gcc2 internal prototype to avoid an error.  */
7908 /* We use char because int might match the return type of a gcc2
7909     builtin and then its argument prototype would still apply.  */
7910 char $ac_func();
7911
7912 int main() {
7913
7914 /* The GNU C library defines this for functions which it implements
7915     to always fail with ENOSYS.  Some functions are actually named
7916     something starting with __ and the normal name is an alias.  */
7917 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7918 choke me
7919 #else
7920 $ac_func();
7921 #endif
7922
7923 ; return 0; }
7924 EOF
7925 if { (eval echo configure:7926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7926   rm -rf conftest*
7927   eval "ac_cv_func_$ac_func=yes"
7928 else
7929   echo "configure: failed program was:" >&5
7930   cat conftest.$ac_ext >&5
7931   rm -rf conftest*
7932   eval "ac_cv_func_$ac_func=no"
7933 fi
7934 rm -f conftest*
7935 fi
7936
7937 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7938   echo "$ac_t""yes" 1>&6
7939     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7940   cat >> confdefs.h <<EOF
7941 #define $ac_tr_func 1
7942 EOF
7943  
7944 else
7945   echo "$ac_t""no" 1>&6
7946 fi
7947 done
7948  ;;
7949   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7950 echo "configure:7951: checking for getspnam in -lsecurity" >&5
7951 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7952 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7953   echo $ac_n "(cached) $ac_c" 1>&6
7954 else
7955   ac_save_LIBS="$LIBS"
7956 LIBS="-lsecurity  $LIBS"
7957 cat > conftest.$ac_ext <<EOF
7958 #line 7959 "configure"
7959 #include "confdefs.h"
7960 /* Override any gcc2 internal prototype to avoid an error.  */
7961 /* We use char because int might match the return type of a gcc2
7962     builtin and then its argument prototype would still apply.  */
7963 char getspnam();
7964
7965 int main() {
7966 getspnam()
7967 ; return 0; }
7968 EOF
7969 if { (eval echo configure:7970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7970   rm -rf conftest*
7971   eval "ac_cv_lib_$ac_lib_var=yes"
7972 else
7973   echo "configure: failed program was:" >&5
7974   cat conftest.$ac_ext >&5
7975   rm -rf conftest*
7976   eval "ac_cv_lib_$ac_lib_var=no"
7977 fi
7978 rm -f conftest*
7979 LIBS="$ac_save_LIBS"
7980
7981 fi
7982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7983   echo "$ac_t""yes" 1>&6
7984     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7985     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7986   cat >> confdefs.h <<EOF
7987 #define $ac_tr_lib 1
7988 EOF
7989
7990   LIBS="-lsecurity $LIBS"
7991
7992 else
7993   echo "$ac_t""no" 1>&6
7994 fi
7995  
7996      for ac_func in getspnam
7997 do
7998 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7999 echo "configure:8000: checking for $ac_func" >&5
8000 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8001   echo $ac_n "(cached) $ac_c" 1>&6
8002 else
8003   cat > conftest.$ac_ext <<EOF
8004 #line 8005 "configure"
8005 #include "confdefs.h"
8006 /* System header to define __stub macros and hopefully few prototypes,
8007     which can conflict with char $ac_func(); below.  */
8008 #include <assert.h>
8009 /* Override any gcc2 internal prototype to avoid an error.  */
8010 /* We use char because int might match the return type of a gcc2
8011     builtin and then its argument prototype would still apply.  */
8012 char $ac_func();
8013
8014 int main() {
8015
8016 /* The GNU C library defines this for functions which it implements
8017     to always fail with ENOSYS.  Some functions are actually named
8018     something starting with __ and the normal name is an alias.  */
8019 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8020 choke me
8021 #else
8022 $ac_func();
8023 #endif
8024
8025 ; return 0; }
8026 EOF
8027 if { (eval echo configure:8028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8028   rm -rf conftest*
8029   eval "ac_cv_func_$ac_func=yes"
8030 else
8031   echo "configure: failed program was:" >&5
8032   cat conftest.$ac_ext >&5
8033   rm -rf conftest*
8034   eval "ac_cv_func_$ac_func=no"
8035 fi
8036 rm -f conftest*
8037 fi
8038
8039 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8040   echo "$ac_t""yes" 1>&6
8041     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8042   cat >> confdefs.h <<EOF
8043 #define $ac_tr_func 1
8044 EOF
8045  
8046 else
8047   echo "$ac_t""no" 1>&6
8048 fi
8049 done
8050
8051   ;;
8052   esac
8053
8054 case "$LIBS" in
8055   *-lsec*) for ac_func in getspnam
8056 do
8057 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8058 echo "configure:8059: checking for $ac_func" >&5
8059 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8060   echo $ac_n "(cached) $ac_c" 1>&6
8061 else
8062   cat > conftest.$ac_ext <<EOF
8063 #line 8064 "configure"
8064 #include "confdefs.h"
8065 /* System header to define __stub macros and hopefully few prototypes,
8066     which can conflict with char $ac_func(); below.  */
8067 #include <assert.h>
8068 /* Override any gcc2 internal prototype to avoid an error.  */
8069 /* We use char because int might match the return type of a gcc2
8070     builtin and then its argument prototype would still apply.  */
8071 char $ac_func();
8072
8073 int main() {
8074
8075 /* The GNU C library defines this for functions which it implements
8076     to always fail with ENOSYS.  Some functions are actually named
8077     something starting with __ and the normal name is an alias.  */
8078 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8079 choke me
8080 #else
8081 $ac_func();
8082 #endif
8083
8084 ; return 0; }
8085 EOF
8086 if { (eval echo configure:8087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8087   rm -rf conftest*
8088   eval "ac_cv_func_$ac_func=yes"
8089 else
8090   echo "configure: failed program was:" >&5
8091   cat conftest.$ac_ext >&5
8092   rm -rf conftest*
8093   eval "ac_cv_func_$ac_func=no"
8094 fi
8095 rm -f conftest*
8096 fi
8097
8098 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8099   echo "$ac_t""yes" 1>&6
8100     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8101   cat >> confdefs.h <<EOF
8102 #define $ac_tr_func 1
8103 EOF
8104  
8105 else
8106   echo "$ac_t""no" 1>&6
8107 fi
8108 done
8109  ;;
8110   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8111 echo "configure:8112: checking for getspnam in -lsec" >&5
8112 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8113 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8114   echo $ac_n "(cached) $ac_c" 1>&6
8115 else
8116   ac_save_LIBS="$LIBS"
8117 LIBS="-lsec  $LIBS"
8118 cat > conftest.$ac_ext <<EOF
8119 #line 8120 "configure"
8120 #include "confdefs.h"
8121 /* Override any gcc2 internal prototype to avoid an error.  */
8122 /* We use char because int might match the return type of a gcc2
8123     builtin and then its argument prototype would still apply.  */
8124 char getspnam();
8125
8126 int main() {
8127 getspnam()
8128 ; return 0; }
8129 EOF
8130 if { (eval echo configure:8131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8131   rm -rf conftest*
8132   eval "ac_cv_lib_$ac_lib_var=yes"
8133 else
8134   echo "configure: failed program was:" >&5
8135   cat conftest.$ac_ext >&5
8136   rm -rf conftest*
8137   eval "ac_cv_lib_$ac_lib_var=no"
8138 fi
8139 rm -f conftest*
8140 LIBS="$ac_save_LIBS"
8141
8142 fi
8143 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8144   echo "$ac_t""yes" 1>&6
8145     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8146     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8147   cat >> confdefs.h <<EOF
8148 #define $ac_tr_lib 1
8149 EOF
8150
8151   LIBS="-lsec $LIBS"
8152
8153 else
8154   echo "$ac_t""no" 1>&6
8155 fi
8156  
8157      for ac_func in getspnam
8158 do
8159 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8160 echo "configure:8161: checking for $ac_func" >&5
8161 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8162   echo $ac_n "(cached) $ac_c" 1>&6
8163 else
8164   cat > conftest.$ac_ext <<EOF
8165 #line 8166 "configure"
8166 #include "confdefs.h"
8167 /* System header to define __stub macros and hopefully few prototypes,
8168     which can conflict with char $ac_func(); below.  */
8169 #include <assert.h>
8170 /* Override any gcc2 internal prototype to avoid an error.  */
8171 /* We use char because int might match the return type of a gcc2
8172     builtin and then its argument prototype would still apply.  */
8173 char $ac_func();
8174
8175 int main() {
8176
8177 /* The GNU C library defines this for functions which it implements
8178     to always fail with ENOSYS.  Some functions are actually named
8179     something starting with __ and the normal name is an alias.  */
8180 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8181 choke me
8182 #else
8183 $ac_func();
8184 #endif
8185
8186 ; return 0; }
8187 EOF
8188 if { (eval echo configure:8189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8189   rm -rf conftest*
8190   eval "ac_cv_func_$ac_func=yes"
8191 else
8192   echo "configure: failed program was:" >&5
8193   cat conftest.$ac_ext >&5
8194   rm -rf conftest*
8195   eval "ac_cv_func_$ac_func=no"
8196 fi
8197 rm -f conftest*
8198 fi
8199
8200 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8201   echo "$ac_t""yes" 1>&6
8202     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8203   cat >> confdefs.h <<EOF
8204 #define $ac_tr_func 1
8205 EOF
8206  
8207 else
8208   echo "$ac_t""no" 1>&6
8209 fi
8210 done
8211
8212   ;;
8213   esac
8214
8215
8216 case "$LIBS" in
8217   *-lsecurity*) for ac_func in bigcrypt
8218 do
8219 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8220 echo "configure:8221: checking for $ac_func" >&5
8221 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8222   echo $ac_n "(cached) $ac_c" 1>&6
8223 else
8224   cat > conftest.$ac_ext <<EOF
8225 #line 8226 "configure"
8226 #include "confdefs.h"
8227 /* System header to define __stub macros and hopefully few prototypes,
8228     which can conflict with char $ac_func(); below.  */
8229 #include <assert.h>
8230 /* Override any gcc2 internal prototype to avoid an error.  */
8231 /* We use char because int might match the return type of a gcc2
8232     builtin and then its argument prototype would still apply.  */
8233 char $ac_func();
8234
8235 int main() {
8236
8237 /* The GNU C library defines this for functions which it implements
8238     to always fail with ENOSYS.  Some functions are actually named
8239     something starting with __ and the normal name is an alias.  */
8240 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8241 choke me
8242 #else
8243 $ac_func();
8244 #endif
8245
8246 ; return 0; }
8247 EOF
8248 if { (eval echo configure:8249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8249   rm -rf conftest*
8250   eval "ac_cv_func_$ac_func=yes"
8251 else
8252   echo "configure: failed program was:" >&5
8253   cat conftest.$ac_ext >&5
8254   rm -rf conftest*
8255   eval "ac_cv_func_$ac_func=no"
8256 fi
8257 rm -f conftest*
8258 fi
8259
8260 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8261   echo "$ac_t""yes" 1>&6
8262     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8263   cat >> confdefs.h <<EOF
8264 #define $ac_tr_func 1
8265 EOF
8266  
8267 else
8268   echo "$ac_t""no" 1>&6
8269 fi
8270 done
8271  ;;
8272   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8273 echo "configure:8274: checking for bigcrypt in -lsecurity" >&5
8274 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8275 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8276   echo $ac_n "(cached) $ac_c" 1>&6
8277 else
8278   ac_save_LIBS="$LIBS"
8279 LIBS="-lsecurity  $LIBS"
8280 cat > conftest.$ac_ext <<EOF
8281 #line 8282 "configure"
8282 #include "confdefs.h"
8283 /* Override any gcc2 internal prototype to avoid an error.  */
8284 /* We use char because int might match the return type of a gcc2
8285     builtin and then its argument prototype would still apply.  */
8286 char bigcrypt();
8287
8288 int main() {
8289 bigcrypt()
8290 ; return 0; }
8291 EOF
8292 if { (eval echo configure:8293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8293   rm -rf conftest*
8294   eval "ac_cv_lib_$ac_lib_var=yes"
8295 else
8296   echo "configure: failed program was:" >&5
8297   cat conftest.$ac_ext >&5
8298   rm -rf conftest*
8299   eval "ac_cv_lib_$ac_lib_var=no"
8300 fi
8301 rm -f conftest*
8302 LIBS="$ac_save_LIBS"
8303
8304 fi
8305 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8306   echo "$ac_t""yes" 1>&6
8307     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8308     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8309   cat >> confdefs.h <<EOF
8310 #define $ac_tr_lib 1
8311 EOF
8312
8313   LIBS="-lsecurity $LIBS"
8314
8315 else
8316   echo "$ac_t""no" 1>&6
8317 fi
8318  
8319      for ac_func in bigcrypt
8320 do
8321 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8322 echo "configure:8323: checking for $ac_func" >&5
8323 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8324   echo $ac_n "(cached) $ac_c" 1>&6
8325 else
8326   cat > conftest.$ac_ext <<EOF
8327 #line 8328 "configure"
8328 #include "confdefs.h"
8329 /* System header to define __stub macros and hopefully few prototypes,
8330     which can conflict with char $ac_func(); below.  */
8331 #include <assert.h>
8332 /* Override any gcc2 internal prototype to avoid an error.  */
8333 /* We use char because int might match the return type of a gcc2
8334     builtin and then its argument prototype would still apply.  */
8335 char $ac_func();
8336
8337 int main() {
8338
8339 /* The GNU C library defines this for functions which it implements
8340     to always fail with ENOSYS.  Some functions are actually named
8341     something starting with __ and the normal name is an alias.  */
8342 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8343 choke me
8344 #else
8345 $ac_func();
8346 #endif
8347
8348 ; return 0; }
8349 EOF
8350 if { (eval echo configure:8351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8351   rm -rf conftest*
8352   eval "ac_cv_func_$ac_func=yes"
8353 else
8354   echo "configure: failed program was:" >&5
8355   cat conftest.$ac_ext >&5
8356   rm -rf conftest*
8357   eval "ac_cv_func_$ac_func=no"
8358 fi
8359 rm -f conftest*
8360 fi
8361
8362 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8363   echo "$ac_t""yes" 1>&6
8364     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8365   cat >> confdefs.h <<EOF
8366 #define $ac_tr_func 1
8367 EOF
8368  
8369 else
8370   echo "$ac_t""no" 1>&6
8371 fi
8372 done
8373
8374   ;;
8375   esac
8376
8377 case "$LIBS" in
8378   *-lsec*) for ac_func in bigcrypt
8379 do
8380 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8381 echo "configure:8382: checking for $ac_func" >&5
8382 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8383   echo $ac_n "(cached) $ac_c" 1>&6
8384 else
8385   cat > conftest.$ac_ext <<EOF
8386 #line 8387 "configure"
8387 #include "confdefs.h"
8388 /* System header to define __stub macros and hopefully few prototypes,
8389     which can conflict with char $ac_func(); below.  */
8390 #include <assert.h>
8391 /* Override any gcc2 internal prototype to avoid an error.  */
8392 /* We use char because int might match the return type of a gcc2
8393     builtin and then its argument prototype would still apply.  */
8394 char $ac_func();
8395
8396 int main() {
8397
8398 /* The GNU C library defines this for functions which it implements
8399     to always fail with ENOSYS.  Some functions are actually named
8400     something starting with __ and the normal name is an alias.  */
8401 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8402 choke me
8403 #else
8404 $ac_func();
8405 #endif
8406
8407 ; return 0; }
8408 EOF
8409 if { (eval echo configure:8410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8410   rm -rf conftest*
8411   eval "ac_cv_func_$ac_func=yes"
8412 else
8413   echo "configure: failed program was:" >&5
8414   cat conftest.$ac_ext >&5
8415   rm -rf conftest*
8416   eval "ac_cv_func_$ac_func=no"
8417 fi
8418 rm -f conftest*
8419 fi
8420
8421 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8422   echo "$ac_t""yes" 1>&6
8423     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8424   cat >> confdefs.h <<EOF
8425 #define $ac_tr_func 1
8426 EOF
8427  
8428 else
8429   echo "$ac_t""no" 1>&6
8430 fi
8431 done
8432  ;;
8433   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8434 echo "configure:8435: checking for bigcrypt in -lsec" >&5
8435 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8436 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8437   echo $ac_n "(cached) $ac_c" 1>&6
8438 else
8439   ac_save_LIBS="$LIBS"
8440 LIBS="-lsec  $LIBS"
8441 cat > conftest.$ac_ext <<EOF
8442 #line 8443 "configure"
8443 #include "confdefs.h"
8444 /* Override any gcc2 internal prototype to avoid an error.  */
8445 /* We use char because int might match the return type of a gcc2
8446     builtin and then its argument prototype would still apply.  */
8447 char bigcrypt();
8448
8449 int main() {
8450 bigcrypt()
8451 ; return 0; }
8452 EOF
8453 if { (eval echo configure:8454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8454   rm -rf conftest*
8455   eval "ac_cv_lib_$ac_lib_var=yes"
8456 else
8457   echo "configure: failed program was:" >&5
8458   cat conftest.$ac_ext >&5
8459   rm -rf conftest*
8460   eval "ac_cv_lib_$ac_lib_var=no"
8461 fi
8462 rm -f conftest*
8463 LIBS="$ac_save_LIBS"
8464
8465 fi
8466 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8467   echo "$ac_t""yes" 1>&6
8468     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8469     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8470   cat >> confdefs.h <<EOF
8471 #define $ac_tr_lib 1
8472 EOF
8473
8474   LIBS="-lsec $LIBS"
8475
8476 else
8477   echo "$ac_t""no" 1>&6
8478 fi
8479  
8480      for ac_func in bigcrypt
8481 do
8482 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8483 echo "configure:8484: checking for $ac_func" >&5
8484 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8485   echo $ac_n "(cached) $ac_c" 1>&6
8486 else
8487   cat > conftest.$ac_ext <<EOF
8488 #line 8489 "configure"
8489 #include "confdefs.h"
8490 /* System header to define __stub macros and hopefully few prototypes,
8491     which can conflict with char $ac_func(); below.  */
8492 #include <assert.h>
8493 /* Override any gcc2 internal prototype to avoid an error.  */
8494 /* We use char because int might match the return type of a gcc2
8495     builtin and then its argument prototype would still apply.  */
8496 char $ac_func();
8497
8498 int main() {
8499
8500 /* The GNU C library defines this for functions which it implements
8501     to always fail with ENOSYS.  Some functions are actually named
8502     something starting with __ and the normal name is an alias.  */
8503 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8504 choke me
8505 #else
8506 $ac_func();
8507 #endif
8508
8509 ; return 0; }
8510 EOF
8511 if { (eval echo configure:8512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8512   rm -rf conftest*
8513   eval "ac_cv_func_$ac_func=yes"
8514 else
8515   echo "configure: failed program was:" >&5
8516   cat conftest.$ac_ext >&5
8517   rm -rf conftest*
8518   eval "ac_cv_func_$ac_func=no"
8519 fi
8520 rm -f conftest*
8521 fi
8522
8523 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8524   echo "$ac_t""yes" 1>&6
8525     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8526   cat >> confdefs.h <<EOF
8527 #define $ac_tr_func 1
8528 EOF
8529  
8530 else
8531   echo "$ac_t""no" 1>&6
8532 fi
8533 done
8534
8535   ;;
8536   esac
8537
8538
8539 case "$LIBS" in
8540   *-lsecurity*) for ac_func in getprpwnam
8541 do
8542 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8543 echo "configure:8544: checking for $ac_func" >&5
8544 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8545   echo $ac_n "(cached) $ac_c" 1>&6
8546 else
8547   cat > conftest.$ac_ext <<EOF
8548 #line 8549 "configure"
8549 #include "confdefs.h"
8550 /* System header to define __stub macros and hopefully few prototypes,
8551     which can conflict with char $ac_func(); below.  */
8552 #include <assert.h>
8553 /* Override any gcc2 internal prototype to avoid an error.  */
8554 /* We use char because int might match the return type of a gcc2
8555     builtin and then its argument prototype would still apply.  */
8556 char $ac_func();
8557
8558 int main() {
8559
8560 /* The GNU C library defines this for functions which it implements
8561     to always fail with ENOSYS.  Some functions are actually named
8562     something starting with __ and the normal name is an alias.  */
8563 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8564 choke me
8565 #else
8566 $ac_func();
8567 #endif
8568
8569 ; return 0; }
8570 EOF
8571 if { (eval echo configure:8572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8572   rm -rf conftest*
8573   eval "ac_cv_func_$ac_func=yes"
8574 else
8575   echo "configure: failed program was:" >&5
8576   cat conftest.$ac_ext >&5
8577   rm -rf conftest*
8578   eval "ac_cv_func_$ac_func=no"
8579 fi
8580 rm -f conftest*
8581 fi
8582
8583 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8584   echo "$ac_t""yes" 1>&6
8585     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8586   cat >> confdefs.h <<EOF
8587 #define $ac_tr_func 1
8588 EOF
8589  
8590 else
8591   echo "$ac_t""no" 1>&6
8592 fi
8593 done
8594  ;;
8595   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8596 echo "configure:8597: checking for getprpwnam in -lsecurity" >&5
8597 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8598 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8599   echo $ac_n "(cached) $ac_c" 1>&6
8600 else
8601   ac_save_LIBS="$LIBS"
8602 LIBS="-lsecurity  $LIBS"
8603 cat > conftest.$ac_ext <<EOF
8604 #line 8605 "configure"
8605 #include "confdefs.h"
8606 /* Override any gcc2 internal prototype to avoid an error.  */
8607 /* We use char because int might match the return type of a gcc2
8608     builtin and then its argument prototype would still apply.  */
8609 char getprpwnam();
8610
8611 int main() {
8612 getprpwnam()
8613 ; return 0; }
8614 EOF
8615 if { (eval echo configure:8616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8616   rm -rf conftest*
8617   eval "ac_cv_lib_$ac_lib_var=yes"
8618 else
8619   echo "configure: failed program was:" >&5
8620   cat conftest.$ac_ext >&5
8621   rm -rf conftest*
8622   eval "ac_cv_lib_$ac_lib_var=no"
8623 fi
8624 rm -f conftest*
8625 LIBS="$ac_save_LIBS"
8626
8627 fi
8628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8629   echo "$ac_t""yes" 1>&6
8630     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8631     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8632   cat >> confdefs.h <<EOF
8633 #define $ac_tr_lib 1
8634 EOF
8635
8636   LIBS="-lsecurity $LIBS"
8637
8638 else
8639   echo "$ac_t""no" 1>&6
8640 fi
8641  
8642      for ac_func in getprpwnam
8643 do
8644 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8645 echo "configure:8646: checking for $ac_func" >&5
8646 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8647   echo $ac_n "(cached) $ac_c" 1>&6
8648 else
8649   cat > conftest.$ac_ext <<EOF
8650 #line 8651 "configure"
8651 #include "confdefs.h"
8652 /* System header to define __stub macros and hopefully few prototypes,
8653     which can conflict with char $ac_func(); below.  */
8654 #include <assert.h>
8655 /* Override any gcc2 internal prototype to avoid an error.  */
8656 /* We use char because int might match the return type of a gcc2
8657     builtin and then its argument prototype would still apply.  */
8658 char $ac_func();
8659
8660 int main() {
8661
8662 /* The GNU C library defines this for functions which it implements
8663     to always fail with ENOSYS.  Some functions are actually named
8664     something starting with __ and the normal name is an alias.  */
8665 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8666 choke me
8667 #else
8668 $ac_func();
8669 #endif
8670
8671 ; return 0; }
8672 EOF
8673 if { (eval echo configure:8674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8674   rm -rf conftest*
8675   eval "ac_cv_func_$ac_func=yes"
8676 else
8677   echo "configure: failed program was:" >&5
8678   cat conftest.$ac_ext >&5
8679   rm -rf conftest*
8680   eval "ac_cv_func_$ac_func=no"
8681 fi
8682 rm -f conftest*
8683 fi
8684
8685 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8686   echo "$ac_t""yes" 1>&6
8687     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8688   cat >> confdefs.h <<EOF
8689 #define $ac_tr_func 1
8690 EOF
8691  
8692 else
8693   echo "$ac_t""no" 1>&6
8694 fi
8695 done
8696
8697   ;;
8698   esac
8699
8700 case "$LIBS" in
8701   *-lsec*) for ac_func in getprpwnam
8702 do
8703 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8704 echo "configure:8705: checking for $ac_func" >&5
8705 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8706   echo $ac_n "(cached) $ac_c" 1>&6
8707 else
8708   cat > conftest.$ac_ext <<EOF
8709 #line 8710 "configure"
8710 #include "confdefs.h"
8711 /* System header to define __stub macros and hopefully few prototypes,
8712     which can conflict with char $ac_func(); below.  */
8713 #include <assert.h>
8714 /* Override any gcc2 internal prototype to avoid an error.  */
8715 /* We use char because int might match the return type of a gcc2
8716     builtin and then its argument prototype would still apply.  */
8717 char $ac_func();
8718
8719 int main() {
8720
8721 /* The GNU C library defines this for functions which it implements
8722     to always fail with ENOSYS.  Some functions are actually named
8723     something starting with __ and the normal name is an alias.  */
8724 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8725 choke me
8726 #else
8727 $ac_func();
8728 #endif
8729
8730 ; return 0; }
8731 EOF
8732 if { (eval echo configure:8733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8733   rm -rf conftest*
8734   eval "ac_cv_func_$ac_func=yes"
8735 else
8736   echo "configure: failed program was:" >&5
8737   cat conftest.$ac_ext >&5
8738   rm -rf conftest*
8739   eval "ac_cv_func_$ac_func=no"
8740 fi
8741 rm -f conftest*
8742 fi
8743
8744 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8745   echo "$ac_t""yes" 1>&6
8746     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8747   cat >> confdefs.h <<EOF
8748 #define $ac_tr_func 1
8749 EOF
8750  
8751 else
8752   echo "$ac_t""no" 1>&6
8753 fi
8754 done
8755  ;;
8756   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8757 echo "configure:8758: checking for getprpwnam in -lsec" >&5
8758 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8759 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8760   echo $ac_n "(cached) $ac_c" 1>&6
8761 else
8762   ac_save_LIBS="$LIBS"
8763 LIBS="-lsec  $LIBS"
8764 cat > conftest.$ac_ext <<EOF
8765 #line 8766 "configure"
8766 #include "confdefs.h"
8767 /* Override any gcc2 internal prototype to avoid an error.  */
8768 /* We use char because int might match the return type of a gcc2
8769     builtin and then its argument prototype would still apply.  */
8770 char getprpwnam();
8771
8772 int main() {
8773 getprpwnam()
8774 ; return 0; }
8775 EOF
8776 if { (eval echo configure:8777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8777   rm -rf conftest*
8778   eval "ac_cv_lib_$ac_lib_var=yes"
8779 else
8780   echo "configure: failed program was:" >&5
8781   cat conftest.$ac_ext >&5
8782   rm -rf conftest*
8783   eval "ac_cv_lib_$ac_lib_var=no"
8784 fi
8785 rm -f conftest*
8786 LIBS="$ac_save_LIBS"
8787
8788 fi
8789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8790   echo "$ac_t""yes" 1>&6
8791     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8792     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8793   cat >> confdefs.h <<EOF
8794 #define $ac_tr_lib 1
8795 EOF
8796
8797   LIBS="-lsec $LIBS"
8798
8799 else
8800   echo "$ac_t""no" 1>&6
8801 fi
8802  
8803      for ac_func in getprpwnam
8804 do
8805 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8806 echo "configure:8807: checking for $ac_func" >&5
8807 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8808   echo $ac_n "(cached) $ac_c" 1>&6
8809 else
8810   cat > conftest.$ac_ext <<EOF
8811 #line 8812 "configure"
8812 #include "confdefs.h"
8813 /* System header to define __stub macros and hopefully few prototypes,
8814     which can conflict with char $ac_func(); below.  */
8815 #include <assert.h>
8816 /* Override any gcc2 internal prototype to avoid an error.  */
8817 /* We use char because int might match the return type of a gcc2
8818     builtin and then its argument prototype would still apply.  */
8819 char $ac_func();
8820
8821 int main() {
8822
8823 /* The GNU C library defines this for functions which it implements
8824     to always fail with ENOSYS.  Some functions are actually named
8825     something starting with __ and the normal name is an alias.  */
8826 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8827 choke me
8828 #else
8829 $ac_func();
8830 #endif
8831
8832 ; return 0; }
8833 EOF
8834 if { (eval echo configure:8835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8835   rm -rf conftest*
8836   eval "ac_cv_func_$ac_func=yes"
8837 else
8838   echo "configure: failed program was:" >&5
8839   cat conftest.$ac_ext >&5
8840   rm -rf conftest*
8841   eval "ac_cv_func_$ac_func=no"
8842 fi
8843 rm -f conftest*
8844 fi
8845
8846 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8847   echo "$ac_t""yes" 1>&6
8848     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8849   cat >> confdefs.h <<EOF
8850 #define $ac_tr_func 1
8851 EOF
8852  
8853 else
8854   echo "$ac_t""no" 1>&6
8855 fi
8856 done
8857
8858   ;;
8859   esac
8860
8861
8862 # this bit needs to be modified for each OS that is suported by
8863 # smbwrapper. You need to specify how to created a shared library and
8864 # how to compile C code to produce PIC object files
8865
8866 # these are the defaults, good for lots of systems
8867 HOST_OS="$host_os"
8868 LDSHFLAGS="-shared"
8869 SONAMEFLAG="#"
8870 SHLD="\${CC}"
8871 PICFLAG=""
8872 PICSUFFIX="po"
8873 POBAD_CC="#"
8874 SHLIBEXT="so"
8875 # Assume non-shared by default and override below
8876 BLDSHARED="false"
8877 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8878 echo "configure:8879: checking ability to build shared libraries" >&5
8879
8880 # and these are for particular systems
8881 case "$host_os" in
8882                 *linux*)   cat >> confdefs.h <<\EOF
8883 #define LINUX 1
8884 EOF
8885
8886                         BLDSHARED="true"
8887                         LDSHFLAGS="-shared" 
8888                         DYNEXP="-Wl,--export-dynamic"
8889                         PICFLAG="-fPIC"
8890                         SONAMEFLAG="-Wl,-soname="
8891                         cat >> confdefs.h <<\EOF
8892 #define STAT_ST_BLOCKSIZE 512
8893 EOF
8894
8895                 ;;
8896                 *solaris*) cat >> confdefs.h <<\EOF
8897 #define SUNOS5 1
8898 EOF
8899
8900                         BLDSHARED="true"
8901                         LDSHFLAGS="-G"
8902                         SONAMEFLAG="-h "
8903                         if test "${GCC}" = "yes"; then
8904                                 PICFLAG="-fPIC"
8905                                 if test "${ac_cv_prog_gnu_ld}" = "yes"; then
8906                                         DYNEXP="-Wl,-E"
8907                                 fi
8908                         else
8909                                 PICFLAG="-KPIC"
8910                                 ## ${CFLAGS} added for building 64-bit shared 
8911                                 ## libs using Sun's Compiler
8912                                 LDSHFLAGS="-G \${CFLAGS}"
8913                                 POBAD_CC=""
8914                                 PICSUFFIX="po.o"
8915                         fi
8916                         cat >> confdefs.h <<\EOF
8917 #define STAT_ST_BLOCKSIZE 512
8918 EOF
8919
8920                 ;;
8921                 *sunos*) cat >> confdefs.h <<\EOF
8922 #define SUNOS4 1
8923 EOF
8924
8925                         BLDSHARED="true"
8926                         LDSHFLAGS="-G"
8927                         SONAMEFLAG="-Wl,-h,"
8928                         PICFLAG="-KPIC"   # Is this correct for SunOS
8929                 ;;
8930                 *bsd*)  BLDSHARED="true"
8931                         LDSHFLAGS="-shared"
8932                         DYNEXP="-Wl,-Bdynamic"
8933                         SONAMEFLAG="-Wl,-soname,"
8934                         PICFLAG="-fPIC"
8935                         cat >> confdefs.h <<\EOF
8936 #define STAT_ST_BLOCKSIZE 512
8937 EOF
8938
8939                 ;;
8940                 *irix*) cat >> confdefs.h <<\EOF
8941 #define IRIX 1
8942 EOF
8943
8944                         case "$host_os" in
8945                         *irix6*) cat >> confdefs.h <<\EOF
8946 #define IRIX6 1
8947 EOF
8948
8949                         ;;
8950                         esac
8951                         ATTEMPT_WRAP32_BUILD=yes
8952                         BLDSHARED="true"
8953                         LDSHFLAGS="-set_version sgi1.0 -shared"
8954                         SONAMEFLAG="-soname "
8955                         SHLD="\${LD}"
8956                         if test "${GCC}" = "yes"; then
8957                                 PICFLAG="-fPIC"
8958                         else 
8959                                 PICFLAG="-KPIC"
8960                         fi
8961                         cat >> confdefs.h <<\EOF
8962 #define STAT_ST_BLOCKSIZE 512
8963 EOF
8964
8965                 ;;
8966                 *aix*) cat >> confdefs.h <<\EOF
8967 #define AIX 1
8968 EOF
8969
8970                         BLDSHARED="true"
8971                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8972                         DYNEXP="-Wl,-brtl,-bexpall"
8973                         if test "${GCC}" = "yes"; then
8974                                 PICFLAG="-O2"
8975                         else
8976                         PICFLAG="-O2 -qmaxmem=6000"
8977                                 ## for funky AIX compiler using strncpy()
8978                                 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT"
8979                         fi
8980
8981                         cat >> confdefs.h <<\EOF
8982 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8983 EOF
8984
8985                 ;;
8986                 *hpux*) cat >> confdefs.h <<\EOF
8987 #define HPUX 1
8988 EOF
8989
8990                         SHLIBEXT="sl"
8991                         # Use special PIC flags for the native HP-UX compiler.
8992                         if test $ac_cv_prog_cc_Ae = yes; then
8993                                 BLDSHARED="true"
8994                                 SHLD="/usr/bin/ld"
8995                                 LDSHFLAGS="-B symbolic -b -z"
8996                                 SONAMEFLAG="+h "
8997                                 PICFLAG="+z"
8998                         fi
8999                         DYNEXP="-Wl,-E"
9000                         cat >> confdefs.h <<\EOF
9001 #define STAT_ST_BLOCKSIZE 8192
9002 EOF
9003
9004                 ;;
9005                 *qnx*) cat >> confdefs.h <<\EOF
9006 #define QNX 1
9007 EOF
9008 ;;
9009                 *osf*) cat >> confdefs.h <<\EOF
9010 #define OSF1 1
9011 EOF
9012
9013                         BLDSHARED="true"
9014                         LDSHFLAGS="-shared"
9015                         SONAMEFLAG="-Wl,-soname,"
9016                         PICFLAG="-fPIC"
9017                 ;;
9018                 *sco*) cat >> confdefs.h <<\EOF
9019 #define SCO 1
9020 EOF
9021 ;;
9022                 *unixware*) cat >> confdefs.h <<\EOF
9023 #define UNIXWARE 1
9024 EOF
9025
9026                         BLDSHARED="true"
9027                         LDSHFLAGS="-shared"
9028                         SONAMEFLAG="-Wl,-soname,"
9029                         PICFLAG="-KPIC"
9030                 ;;
9031                 *next2*) cat >> confdefs.h <<\EOF
9032 #define NEXT2 1
9033 EOF
9034 ;;
9035                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
9036 set dummy groff; ac_word=$2
9037 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9038 echo "configure:9039: checking for $ac_word" >&5
9039 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
9040   echo $ac_n "(cached) $ac_c" 1>&6
9041 else
9042   if test -n "$ROFF"; then
9043   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
9044 else
9045   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
9046   ac_dummy="$PATH"
9047   for ac_dir in $ac_dummy; do
9048     test -z "$ac_dir" && ac_dir=.
9049     if test -f $ac_dir/$ac_word; then
9050       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9051       break
9052     fi
9053   done
9054   IFS="$ac_save_ifs"
9055 fi
9056 fi
9057 ROFF="$ac_cv_prog_ROFF"
9058 if test -n "$ROFF"; then
9059   echo "$ac_t""$ROFF" 1>&6
9060 else
9061   echo "$ac_t""no" 1>&6
9062 fi
9063 ;;
9064                 *sysv4*)
9065                         case "$host" in
9066                                 *-univel-*)     if  test "$GCC" != yes ; then
9067                                                 cat >> confdefs.h <<\EOF
9068 #define HAVE_MEMSET 1
9069 EOF
9070
9071                                         fi
9072                                         LDSHFLAGS="-G"
9073                                         DYNEXP="-Bexport"
9074                                 ;;
9075                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
9076 #define RELIANTUNIX 1
9077 EOF
9078 ;;
9079                         esac
9080                 ;;
9081
9082                 *sysv5*)
9083                         if  test "$GCC" != yes ; then
9084                                 cat >> confdefs.h <<\EOF
9085 #define HAVE_MEMSET 1
9086 EOF
9087
9088                         fi
9089                         LDSHFLAGS="-G"
9090                 ;;
9091 esac
9092
9093 echo "$ac_t""$BLDSHARED" 1>&6
9094 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9095 echo "configure:9096: checking linker flags for shared libraries" >&5
9096 echo "$ac_t""$LDSHFLAGS" 1>&6
9097 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9098 echo "configure:9099: checking compiler flags for position-independent code" >&5
9099 echo "$ac_t""$PICFLAGS" 1>&6
9100
9101 #######################################################
9102 # test whether building a shared library actually works
9103 if test $BLDSHARED = true; then
9104 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9105 echo "configure:9106: checking whether building shared libraries actually works" >&5
9106 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9107   echo $ac_n "(cached) $ac_c" 1>&6
9108 else
9109   
9110    ac_cv_shlib_works=no
9111    # try building a trivial shared library
9112    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9113      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
9114      ac_cv_shlib_works=yes
9115    rm -f shlib.so shlib.po
9116
9117 fi
9118
9119 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9120 if test $ac_cv_shlib_works = no; then
9121    BLDSHARED=false
9122 fi
9123 fi
9124
9125
9126 # this updates our target list if we can build shared libs
9127 if test $BLDSHARED = true; then
9128    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9129 else
9130    LIBSMBCLIENT_SHARED=
9131 fi
9132
9133 ################
9134
9135 echo $ac_n "checking for long long""... $ac_c" 1>&6
9136 echo "configure:9137: checking for long long" >&5
9137 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9138   echo $ac_n "(cached) $ac_c" 1>&6
9139 else
9140   
9141 if test "$cross_compiling" = yes; then
9142   samba_cv_have_longlong=cross
9143 else
9144   cat > conftest.$ac_ext <<EOF
9145 #line 9146 "configure"
9146 #include "confdefs.h"
9147 #include <stdio.h>
9148 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9149 EOF
9150 if { (eval echo configure:9151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9151 then
9152   samba_cv_have_longlong=yes
9153 else
9154   echo "configure: failed program was:" >&5
9155   cat conftest.$ac_ext >&5
9156   rm -fr conftest*
9157   samba_cv_have_longlong=no
9158 fi
9159 rm -fr conftest*
9160 fi
9161
9162 fi
9163
9164 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9165 if test x"$samba_cv_have_longlong" = x"yes"; then
9166     cat >> confdefs.h <<\EOF
9167 #define HAVE_LONGLONG 1
9168 EOF
9169
9170 fi
9171
9172 #
9173 # Check if the compiler supports the LL prefix on long long integers.
9174 # AIX needs this.
9175
9176 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9177 echo "configure:9178: checking for LL suffix on long long integers" >&5
9178 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9179   echo $ac_n "(cached) $ac_c" 1>&6
9180 else
9181   
9182     cat > conftest.$ac_ext <<EOF
9183 #line 9184 "configure"
9184 #include "confdefs.h"
9185 #include <stdio.h>
9186 int main() {
9187 long long i = 0x8000000000LL
9188 ; return 0; }
9189 EOF
9190 if { (eval echo configure:9191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9191   rm -rf conftest*
9192   samba_cv_compiler_supports_ll=yes
9193 else
9194   echo "configure: failed program was:" >&5
9195   cat conftest.$ac_ext >&5
9196   rm -rf conftest*
9197   samba_cv_compiler_supports_ll=no
9198 fi
9199 rm -f conftest*
9200 fi
9201
9202 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9203 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9204    cat >> confdefs.h <<\EOF
9205 #define COMPILER_SUPPORTS_LL 1
9206 EOF
9207
9208 fi
9209
9210   
9211 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9212 echo "configure:9213: checking for 64 bit off_t" >&5
9213 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9214   echo $ac_n "(cached) $ac_c" 1>&6
9215 else
9216   
9217 if test "$cross_compiling" = yes; then
9218   samba_cv_SIZEOF_OFF_T=cross
9219 else
9220   cat > conftest.$ac_ext <<EOF
9221 #line 9222 "configure"
9222 #include "confdefs.h"
9223 #include <stdio.h>
9224 #include <sys/stat.h>
9225 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9226 EOF
9227 if { (eval echo configure:9228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9228 then
9229   samba_cv_SIZEOF_OFF_T=yes
9230 else
9231   echo "configure: failed program was:" >&5
9232   cat conftest.$ac_ext >&5
9233   rm -fr conftest*
9234   samba_cv_SIZEOF_OFF_T=no
9235 fi
9236 rm -fr conftest*
9237 fi
9238
9239 fi
9240
9241 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9242 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9243     cat >> confdefs.h <<\EOF
9244 #define SIZEOF_OFF_T 8
9245 EOF
9246
9247 fi
9248
9249 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9250 echo "configure:9251: checking for off64_t" >&5
9251 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9252   echo $ac_n "(cached) $ac_c" 1>&6
9253 else
9254   
9255 if test "$cross_compiling" = yes; then
9256   samba_cv_HAVE_OFF64_T=cross
9257 else
9258   cat > conftest.$ac_ext <<EOF
9259 #line 9260 "configure"
9260 #include "confdefs.h"
9261
9262 #if defined(HAVE_UNISTD_H)
9263 #include <unistd.h>
9264 #endif
9265 #include <stdio.h>
9266 #include <sys/stat.h>
9267 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9268 EOF
9269 if { (eval echo configure:9270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9270 then
9271   samba_cv_HAVE_OFF64_T=yes
9272 else
9273   echo "configure: failed program was:" >&5
9274   cat conftest.$ac_ext >&5
9275   rm -fr conftest*
9276   samba_cv_HAVE_OFF64_T=no
9277 fi
9278 rm -fr conftest*
9279 fi
9280
9281 fi
9282
9283 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9284 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9285     cat >> confdefs.h <<\EOF
9286 #define HAVE_OFF64_T 1
9287 EOF
9288
9289 fi
9290
9291 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9292 echo "configure:9293: checking for 64 bit ino_t" >&5
9293 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9294   echo $ac_n "(cached) $ac_c" 1>&6
9295 else
9296   
9297 if test "$cross_compiling" = yes; then
9298   samba_cv_SIZEOF_INO_T=cross
9299 else
9300   cat > conftest.$ac_ext <<EOF
9301 #line 9302 "configure"
9302 #include "confdefs.h"
9303 #include <stdio.h>
9304 #include <sys/stat.h>
9305 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9306 EOF
9307 if { (eval echo configure:9308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9308 then
9309   samba_cv_SIZEOF_INO_T=yes
9310 else
9311   echo "configure: failed program was:" >&5
9312   cat conftest.$ac_ext >&5
9313   rm -fr conftest*
9314   samba_cv_SIZEOF_INO_T=no
9315 fi
9316 rm -fr conftest*
9317 fi
9318
9319 fi
9320
9321 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9322 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9323     cat >> confdefs.h <<\EOF
9324 #define SIZEOF_INO_T 8
9325 EOF
9326
9327 fi
9328
9329 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9330 echo "configure:9331: checking for ino64_t" >&5
9331 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9332   echo $ac_n "(cached) $ac_c" 1>&6
9333 else
9334   
9335 if test "$cross_compiling" = yes; then
9336   samba_cv_HAVE_INO64_T=cross
9337 else
9338   cat > conftest.$ac_ext <<EOF
9339 #line 9340 "configure"
9340 #include "confdefs.h"
9341
9342 #if defined(HAVE_UNISTD_H)
9343 #include <unistd.h>
9344 #endif
9345 #include <stdio.h>
9346 #include <sys/stat.h>
9347 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9348 EOF
9349 if { (eval echo configure:9350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9350 then
9351   samba_cv_HAVE_INO64_T=yes
9352 else
9353   echo "configure: failed program was:" >&5
9354   cat conftest.$ac_ext >&5
9355   rm -fr conftest*
9356   samba_cv_HAVE_INO64_T=no
9357 fi
9358 rm -fr conftest*
9359 fi
9360
9361 fi
9362
9363 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9364 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9365     cat >> confdefs.h <<\EOF
9366 #define HAVE_INO64_T 1
9367 EOF
9368
9369 fi
9370
9371 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9372 echo "configure:9373: checking for dev64_t" >&5
9373 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9374   echo $ac_n "(cached) $ac_c" 1>&6
9375 else
9376   
9377 if test "$cross_compiling" = yes; then
9378   samba_cv_HAVE_DEV64_T=cross
9379 else
9380   cat > conftest.$ac_ext <<EOF
9381 #line 9382 "configure"
9382 #include "confdefs.h"
9383
9384 #if defined(HAVE_UNISTD_H)
9385 #include <unistd.h>
9386 #endif
9387 #include <stdio.h>
9388 #include <sys/stat.h>
9389 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9390 EOF
9391 if { (eval echo configure:9392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9392 then
9393   samba_cv_HAVE_DEV64_T=yes
9394 else
9395   echo "configure: failed program was:" >&5
9396   cat conftest.$ac_ext >&5
9397   rm -fr conftest*
9398   samba_cv_HAVE_DEV64_T=no
9399 fi
9400 rm -fr conftest*
9401 fi
9402
9403 fi
9404
9405 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9406 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9407     cat >> confdefs.h <<\EOF
9408 #define HAVE_DEV64_T 1
9409 EOF
9410
9411 fi
9412
9413 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9414 echo "configure:9415: checking for struct dirent64" >&5
9415 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9416   echo $ac_n "(cached) $ac_c" 1>&6
9417 else
9418   
9419 cat > conftest.$ac_ext <<EOF
9420 #line 9421 "configure"
9421 #include "confdefs.h"
9422
9423 #if defined(HAVE_UNISTD_H)
9424 #include <unistd.h>
9425 #endif
9426 #include <sys/types.h>
9427 #include <dirent.h>
9428 int main() {
9429 struct dirent64 de;
9430 ; return 0; }
9431 EOF
9432 if { (eval echo configure:9433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9433   rm -rf conftest*
9434   samba_cv_HAVE_STRUCT_DIRENT64=yes
9435 else
9436   echo "configure: failed program was:" >&5
9437   cat conftest.$ac_ext >&5
9438   rm -rf conftest*
9439   samba_cv_HAVE_STRUCT_DIRENT64=no
9440 fi
9441 rm -f conftest*
9442 fi
9443
9444 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9445 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
9446     cat >> confdefs.h <<\EOF
9447 #define HAVE_STRUCT_DIRENT64 1
9448 EOF
9449
9450 fi
9451
9452 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9453 echo "configure:9454: checking for major macro" >&5
9454 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9455   echo $ac_n "(cached) $ac_c" 1>&6
9456 else
9457   
9458 if test "$cross_compiling" = yes; then
9459   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9460 else
9461   cat > conftest.$ac_ext <<EOF
9462 #line 9463 "configure"
9463 #include "confdefs.h"
9464
9465 #if defined(HAVE_UNISTD_H)
9466 #include <unistd.h>
9467 #endif
9468 #include <sys/types.h>
9469 main() { dev_t dev; int i = major(dev); return 0; }
9470 EOF
9471 if { (eval echo configure:9472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9472 then
9473   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9474 else
9475   echo "configure: failed program was:" >&5
9476   cat conftest.$ac_ext >&5
9477   rm -fr conftest*
9478   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9479 fi
9480 rm -fr conftest*
9481 fi
9482
9483 fi
9484
9485 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9486 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9487     cat >> confdefs.h <<\EOF
9488 #define HAVE_DEVICE_MAJOR_FN 1
9489 EOF
9490
9491 fi
9492
9493 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9494 echo "configure:9495: checking for minor macro" >&5
9495 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9496   echo $ac_n "(cached) $ac_c" 1>&6
9497 else
9498   
9499 if test "$cross_compiling" = yes; then
9500   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9501 else
9502   cat > conftest.$ac_ext <<EOF
9503 #line 9504 "configure"
9504 #include "confdefs.h"
9505
9506 #if defined(HAVE_UNISTD_H)
9507 #include <unistd.h>
9508 #endif
9509 #include <sys/types.h>
9510 main() { dev_t dev; int i = minor(dev); return 0; }
9511 EOF
9512 if { (eval echo configure:9513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9513 then
9514   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9515 else
9516   echo "configure: failed program was:" >&5
9517   cat conftest.$ac_ext >&5
9518   rm -fr conftest*
9519   samba_cv_HAVE_DEVICE_MINOR_FN=no
9520 fi
9521 rm -fr conftest*
9522 fi
9523
9524 fi
9525
9526 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9527 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9528     cat >> confdefs.h <<\EOF
9529 #define HAVE_DEVICE_MINOR_FN 1
9530 EOF
9531
9532 fi
9533
9534 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9535 echo "configure:9536: checking for unsigned char" >&5
9536 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9537   echo $ac_n "(cached) $ac_c" 1>&6
9538 else
9539   
9540 if test "$cross_compiling" = yes; then
9541   samba_cv_HAVE_UNSIGNED_CHAR=cross
9542 else
9543   cat > conftest.$ac_ext <<EOF
9544 #line 9545 "configure"
9545 #include "confdefs.h"
9546 #include <stdio.h>
9547 main() { char c; c=250; exit((c > 0)?0:1); }
9548 EOF
9549 if { (eval echo configure:9550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9550 then
9551   samba_cv_HAVE_UNSIGNED_CHAR=yes
9552 else
9553   echo "configure: failed program was:" >&5
9554   cat conftest.$ac_ext >&5
9555   rm -fr conftest*
9556   samba_cv_HAVE_UNSIGNED_CHAR=no
9557 fi
9558 rm -fr conftest*
9559 fi
9560
9561 fi
9562
9563 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9564 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9565     cat >> confdefs.h <<\EOF
9566 #define HAVE_UNSIGNED_CHAR 1
9567 EOF
9568
9569 fi
9570
9571 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9572 echo "configure:9573: checking for sin_len in sock" >&5
9573 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9574   echo $ac_n "(cached) $ac_c" 1>&6
9575 else
9576   
9577 cat > conftest.$ac_ext <<EOF
9578 #line 9579 "configure"
9579 #include "confdefs.h"
9580 #include <sys/types.h>
9581 #include <sys/socket.h>
9582 #include <netinet/in.h>
9583 int main() {
9584 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9585 ; return 0; }
9586 EOF
9587 if { (eval echo configure:9588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9588   rm -rf conftest*
9589   samba_cv_HAVE_SOCK_SIN_LEN=yes
9590 else
9591   echo "configure: failed program was:" >&5
9592   cat conftest.$ac_ext >&5
9593   rm -rf conftest*
9594   samba_cv_HAVE_SOCK_SIN_LEN=no
9595 fi
9596 rm -f conftest*
9597 fi
9598
9599 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9600 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9601     cat >> confdefs.h <<\EOF
9602 #define HAVE_SOCK_SIN_LEN 1
9603 EOF
9604
9605 fi
9606
9607 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9608 echo "configure:9609: checking whether seekdir returns void" >&5
9609 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9610   echo $ac_n "(cached) $ac_c" 1>&6
9611 else
9612   
9613 cat > conftest.$ac_ext <<EOF
9614 #line 9615 "configure"
9615 #include "confdefs.h"
9616 #include <sys/types.h>
9617 #include <dirent.h>
9618 void seekdir(DIR *d, long loc) { return; }
9619 int main() {
9620 return 0;
9621 ; return 0; }
9622 EOF
9623 if { (eval echo configure:9624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9624   rm -rf conftest*
9625   samba_cv_SEEKDIR_RETURNS_VOID=yes
9626 else
9627   echo "configure: failed program was:" >&5
9628   cat conftest.$ac_ext >&5
9629   rm -rf conftest*
9630   samba_cv_SEEKDIR_RETURNS_VOID=no
9631 fi
9632 rm -f conftest*
9633 fi
9634
9635 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9636 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9637     cat >> confdefs.h <<\EOF
9638 #define SEEKDIR_RETURNS_VOID 1
9639 EOF
9640
9641 fi
9642
9643 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9644 echo "configure:9645: checking for __FILE__ macro" >&5
9645 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9646   echo $ac_n "(cached) $ac_c" 1>&6
9647 else
9648   
9649 cat > conftest.$ac_ext <<EOF
9650 #line 9651 "configure"
9651 #include "confdefs.h"
9652 #include <stdio.h>
9653 int main() {
9654 printf("%s\n", __FILE__);
9655 ; return 0; }
9656 EOF
9657 if { (eval echo configure:9658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9658   rm -rf conftest*
9659   samba_cv_HAVE_FILE_MACRO=yes
9660 else
9661   echo "configure: failed program was:" >&5
9662   cat conftest.$ac_ext >&5
9663   rm -rf conftest*
9664   samba_cv_HAVE_FILE_MACRO=no
9665 fi
9666 rm -f conftest*
9667 fi
9668
9669 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9670 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9671     cat >> confdefs.h <<\EOF
9672 #define HAVE_FILE_MACRO 1
9673 EOF
9674
9675 fi
9676
9677 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9678 echo "configure:9679: checking for __FUNCTION__ macro" >&5
9679 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9680   echo $ac_n "(cached) $ac_c" 1>&6
9681 else
9682   
9683 cat > conftest.$ac_ext <<EOF
9684 #line 9685 "configure"
9685 #include "confdefs.h"
9686 #include <stdio.h>
9687 int main() {
9688 printf("%s\n", __FUNCTION__);
9689 ; return 0; }
9690 EOF
9691 if { (eval echo configure:9692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9692   rm -rf conftest*
9693   samba_cv_HAVE_FUNCTION_MACRO=yes
9694 else
9695   echo "configure: failed program was:" >&5
9696   cat conftest.$ac_ext >&5
9697   rm -rf conftest*
9698   samba_cv_HAVE_FUNCTION_MACRO=no
9699 fi
9700 rm -f conftest*
9701 fi
9702
9703 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9704 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9705     cat >> confdefs.h <<\EOF
9706 #define HAVE_FUNCTION_MACRO 1
9707 EOF
9708
9709 fi
9710
9711 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9712 echo "configure:9713: checking if gettimeofday takes tz argument" >&5
9713 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9714   echo $ac_n "(cached) $ac_c" 1>&6
9715 else
9716   
9717 if test "$cross_compiling" = yes; then
9718   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9719 else
9720   cat > conftest.$ac_ext <<EOF
9721 #line 9722 "configure"
9722 #include "confdefs.h"
9723
9724 #include <sys/time.h>
9725 #include <unistd.h>
9726 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9727 EOF
9728 if { (eval echo configure:9729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9729 then
9730   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9731 else
9732   echo "configure: failed program was:" >&5
9733   cat conftest.$ac_ext >&5
9734   rm -fr conftest*
9735   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9736 fi
9737 rm -fr conftest*
9738 fi
9739
9740 fi
9741
9742 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9743 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9744     cat >> confdefs.h <<\EOF
9745 #define HAVE_GETTIMEOFDAY_TZ 1
9746 EOF
9747
9748 fi
9749
9750 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9751 echo "configure:9752: checking for __va_copy" >&5
9752 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9753   echo $ac_n "(cached) $ac_c" 1>&6
9754 else
9755   
9756 cat > conftest.$ac_ext <<EOF
9757 #line 9758 "configure"
9758 #include "confdefs.h"
9759 #include <stdarg.h>
9760 va_list ap1,ap2;
9761 int main() {
9762 __va_copy(ap1,ap2);
9763 ; return 0; }
9764 EOF
9765 if { (eval echo configure:9766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9766   rm -rf conftest*
9767   samba_cv_HAVE_VA_COPY=yes
9768 else
9769   echo "configure: failed program was:" >&5
9770   cat conftest.$ac_ext >&5
9771   rm -rf conftest*
9772   samba_cv_HAVE_VA_COPY=no
9773 fi
9774 rm -f conftest*
9775 fi
9776
9777 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9778 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9779     cat >> confdefs.h <<\EOF
9780 #define HAVE_VA_COPY 1
9781 EOF
9782
9783 fi
9784
9785 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9786 echo "configure:9787: checking for C99 vsnprintf" >&5
9787 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9788   echo $ac_n "(cached) $ac_c" 1>&6
9789 else
9790   
9791 if test "$cross_compiling" = yes; then
9792   samba_cv_HAVE_C99_VSNPRINTF=cross
9793 else
9794   cat > conftest.$ac_ext <<EOF
9795 #line 9796 "configure"
9796 #include "confdefs.h"
9797
9798 #include <sys/types.h>
9799 #include <stdarg.h>
9800 void foo(const char *format, ...) { 
9801        va_list ap;
9802        int len;
9803        char buf[5];
9804
9805        va_start(ap, format);
9806        len = vsnprintf(buf, 0, format, ap);
9807        va_end(ap);
9808        if (len != 5) exit(1);
9809
9810        va_start(ap, format);
9811        len = vsnprintf(0, 0, format, ap);
9812        va_end(ap);
9813        if (len != 5) exit(1);
9814
9815        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9816
9817        exit(0);
9818 }
9819 main() { foo("hello"); }
9820
9821 EOF
9822 if { (eval echo configure:9823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9823 then
9824   samba_cv_HAVE_C99_VSNPRINTF=yes
9825 else
9826   echo "configure: failed program was:" >&5
9827   cat conftest.$ac_ext >&5
9828   rm -fr conftest*
9829   samba_cv_HAVE_C99_VSNPRINTF=no
9830 fi
9831 rm -fr conftest*
9832 fi
9833
9834 fi
9835
9836 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9837 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9838     cat >> confdefs.h <<\EOF
9839 #define HAVE_C99_VSNPRINTF 1
9840 EOF
9841
9842 fi
9843
9844 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9845 echo "configure:9846: checking for broken readdir" >&5
9846 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9847   echo $ac_n "(cached) $ac_c" 1>&6
9848 else
9849   
9850 if test "$cross_compiling" = yes; then
9851   samba_cv_HAVE_BROKEN_READDIR=cross
9852 else
9853   cat > conftest.$ac_ext <<EOF
9854 #line 9855 "configure"
9855 #include "confdefs.h"
9856 #include <sys/types.h>
9857 #include <dirent.h>
9858 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9859 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9860 di->d_name[0] == 0) exit(0); exit(1);} 
9861 EOF
9862 if { (eval echo configure:9863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9863 then
9864   samba_cv_HAVE_BROKEN_READDIR=yes
9865 else
9866   echo "configure: failed program was:" >&5
9867   cat conftest.$ac_ext >&5
9868   rm -fr conftest*
9869   samba_cv_HAVE_BROKEN_READDIR=no
9870 fi
9871 rm -fr conftest*
9872 fi
9873
9874 fi
9875
9876 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9877 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9878     cat >> confdefs.h <<\EOF
9879 #define HAVE_BROKEN_READDIR 1
9880 EOF
9881
9882 fi
9883
9884 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9885 echo "configure:9886: checking for utimbuf" >&5
9886 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9887   echo $ac_n "(cached) $ac_c" 1>&6
9888 else
9889   
9890 cat > conftest.$ac_ext <<EOF
9891 #line 9892 "configure"
9892 #include "confdefs.h"
9893 #include <sys/types.h>
9894 #include <utime.h>
9895 int main() {
9896 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9897 ; return 0; }
9898 EOF
9899 if { (eval echo configure:9900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9900   rm -rf conftest*
9901   samba_cv_HAVE_UTIMBUF=yes
9902 else
9903   echo "configure: failed program was:" >&5
9904   cat conftest.$ac_ext >&5
9905   rm -rf conftest*
9906   samba_cv_HAVE_UTIMBUF=no
9907 fi
9908 rm -f conftest*
9909 fi
9910
9911 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9912 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9913     cat >> confdefs.h <<\EOF
9914 #define HAVE_UTIMBUF 1
9915 EOF
9916
9917 fi
9918
9919
9920 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9921 do
9922 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9923 echo "configure:9924: checking for $ac_func" >&5
9924 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9925   echo $ac_n "(cached) $ac_c" 1>&6
9926 else
9927   cat > conftest.$ac_ext <<EOF
9928 #line 9929 "configure"
9929 #include "confdefs.h"
9930 /* System header to define __stub macros and hopefully few prototypes,
9931     which can conflict with char $ac_func(); below.  */
9932 #include <assert.h>
9933 /* Override any gcc2 internal prototype to avoid an error.  */
9934 /* We use char because int might match the return type of a gcc2
9935     builtin and then its argument prototype would still apply.  */
9936 char $ac_func();
9937
9938 int main() {
9939
9940 /* The GNU C library defines this for functions which it implements
9941     to always fail with ENOSYS.  Some functions are actually named
9942     something starting with __ and the normal name is an alias.  */
9943 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9944 choke me
9945 #else
9946 $ac_func();
9947 #endif
9948
9949 ; return 0; }
9950 EOF
9951 if { (eval echo configure:9952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9952   rm -rf conftest*
9953   eval "ac_cv_func_$ac_func=yes"
9954 else
9955   echo "configure: failed program was:" >&5
9956   cat conftest.$ac_ext >&5
9957   rm -rf conftest*
9958   eval "ac_cv_func_$ac_func=no"
9959 fi
9960 rm -f conftest*
9961 fi
9962
9963 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9964   echo "$ac_t""yes" 1>&6
9965     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9966   cat >> confdefs.h <<EOF
9967 #define $ac_tr_func 1
9968 EOF
9969  
9970 else
9971   echo "$ac_t""no" 1>&6
9972 fi
9973 done
9974
9975
9976 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9977 echo "configure:9978: checking for ut_name in utmp" >&5
9978 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9979   echo $ac_n "(cached) $ac_c" 1>&6
9980 else
9981   
9982 cat > conftest.$ac_ext <<EOF
9983 #line 9984 "configure"
9984 #include "confdefs.h"
9985 #include <sys/types.h>
9986 #include <utmp.h>
9987 int main() {
9988 struct utmp ut;  ut.ut_name[0] = 'a';
9989 ; return 0; }
9990 EOF
9991 if { (eval echo configure:9992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9992   rm -rf conftest*
9993   samba_cv_HAVE_UT_UT_NAME=yes
9994 else
9995   echo "configure: failed program was:" >&5
9996   cat conftest.$ac_ext >&5
9997   rm -rf conftest*
9998   samba_cv_HAVE_UT_UT_NAME=no
9999 fi
10000 rm -f conftest*
10001 fi
10002
10003 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
10004 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
10005     cat >> confdefs.h <<\EOF
10006 #define HAVE_UT_UT_NAME 1
10007 EOF
10008
10009 fi 
10010
10011 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
10012 echo "configure:10013: checking for ut_user in utmp" >&5
10013 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
10014   echo $ac_n "(cached) $ac_c" 1>&6
10015 else
10016   
10017 cat > conftest.$ac_ext <<EOF
10018 #line 10019 "configure"
10019 #include "confdefs.h"
10020 #include <sys/types.h>
10021 #include <utmp.h>
10022 int main() {
10023 struct utmp ut;  ut.ut_user[0] = 'a';
10024 ; return 0; }
10025 EOF
10026 if { (eval echo configure:10027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10027   rm -rf conftest*
10028   samba_cv_HAVE_UT_UT_USER=yes
10029 else
10030   echo "configure: failed program was:" >&5
10031   cat conftest.$ac_ext >&5
10032   rm -rf conftest*
10033   samba_cv_HAVE_UT_UT_USER=no
10034 fi
10035 rm -f conftest*
10036 fi
10037
10038 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
10039 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
10040     cat >> confdefs.h <<\EOF
10041 #define HAVE_UT_UT_USER 1
10042 EOF
10043
10044 fi 
10045
10046 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
10047 echo "configure:10048: checking for ut_id in utmp" >&5
10048 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10049   echo $ac_n "(cached) $ac_c" 1>&6
10050 else
10051   
10052 cat > conftest.$ac_ext <<EOF
10053 #line 10054 "configure"
10054 #include "confdefs.h"
10055 #include <sys/types.h>
10056 #include <utmp.h>
10057 int main() {
10058 struct utmp ut;  ut.ut_id[0] = 'a';
10059 ; return 0; }
10060 EOF
10061 if { (eval echo configure:10062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10062   rm -rf conftest*
10063   samba_cv_HAVE_UT_UT_ID=yes
10064 else
10065   echo "configure: failed program was:" >&5
10066   cat conftest.$ac_ext >&5
10067   rm -rf conftest*
10068   samba_cv_HAVE_UT_UT_ID=no
10069 fi
10070 rm -f conftest*
10071 fi
10072
10073 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10074 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10075     cat >> confdefs.h <<\EOF
10076 #define HAVE_UT_UT_ID 1
10077 EOF
10078
10079 fi 
10080
10081 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10082 echo "configure:10083: checking for ut_host in utmp" >&5
10083 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10084   echo $ac_n "(cached) $ac_c" 1>&6
10085 else
10086   
10087 cat > conftest.$ac_ext <<EOF
10088 #line 10089 "configure"
10089 #include "confdefs.h"
10090 #include <sys/types.h>
10091 #include <utmp.h>
10092 int main() {
10093 struct utmp ut;  ut.ut_host[0] = 'a';
10094 ; return 0; }
10095 EOF
10096 if { (eval echo configure:10097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10097   rm -rf conftest*
10098   samba_cv_HAVE_UT_UT_HOST=yes
10099 else
10100   echo "configure: failed program was:" >&5
10101   cat conftest.$ac_ext >&5
10102   rm -rf conftest*
10103   samba_cv_HAVE_UT_UT_HOST=no
10104 fi
10105 rm -f conftest*
10106 fi
10107
10108 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10109 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10110     cat >> confdefs.h <<\EOF
10111 #define HAVE_UT_UT_HOST 1
10112 EOF
10113
10114 fi 
10115
10116 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10117 echo "configure:10118: checking for ut_time in utmp" >&5
10118 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10119   echo $ac_n "(cached) $ac_c" 1>&6
10120 else
10121   
10122 cat > conftest.$ac_ext <<EOF
10123 #line 10124 "configure"
10124 #include "confdefs.h"
10125 #include <sys/types.h>
10126 #include <utmp.h>
10127 int main() {
10128 struct utmp ut;  time_t t; ut.ut_time = t;
10129 ; return 0; }
10130 EOF
10131 if { (eval echo configure:10132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10132   rm -rf conftest*
10133   samba_cv_HAVE_UT_UT_TIME=yes
10134 else
10135   echo "configure: failed program was:" >&5
10136   cat conftest.$ac_ext >&5
10137   rm -rf conftest*
10138   samba_cv_HAVE_UT_UT_TIME=no
10139 fi
10140 rm -f conftest*
10141 fi
10142
10143 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10144 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10145     cat >> confdefs.h <<\EOF
10146 #define HAVE_UT_UT_TIME 1
10147 EOF
10148
10149 fi 
10150
10151 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10152 echo "configure:10153: checking for ut_tv in utmp" >&5
10153 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10154   echo $ac_n "(cached) $ac_c" 1>&6
10155 else
10156   
10157 cat > conftest.$ac_ext <<EOF
10158 #line 10159 "configure"
10159 #include "confdefs.h"
10160 #include <sys/types.h>
10161 #include <utmp.h>
10162 int main() {
10163 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10164 ; return 0; }
10165 EOF
10166 if { (eval echo configure:10167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10167   rm -rf conftest*
10168   samba_cv_HAVE_UT_UT_TV=yes
10169 else
10170   echo "configure: failed program was:" >&5
10171   cat conftest.$ac_ext >&5
10172   rm -rf conftest*
10173   samba_cv_HAVE_UT_UT_TV=no
10174 fi
10175 rm -f conftest*
10176 fi
10177
10178 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10179 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10180     cat >> confdefs.h <<\EOF
10181 #define HAVE_UT_UT_TV 1
10182 EOF
10183
10184 fi 
10185
10186 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10187 echo "configure:10188: checking for ut_type in utmp" >&5
10188 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10189   echo $ac_n "(cached) $ac_c" 1>&6
10190 else
10191   
10192 cat > conftest.$ac_ext <<EOF
10193 #line 10194 "configure"
10194 #include "confdefs.h"
10195 #include <sys/types.h>
10196 #include <utmp.h>
10197 int main() {
10198 struct utmp ut;  ut.ut_type = 0;
10199 ; return 0; }
10200 EOF
10201 if { (eval echo configure:10202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10202   rm -rf conftest*
10203   samba_cv_HAVE_UT_UT_TYPE=yes
10204 else
10205   echo "configure: failed program was:" >&5
10206   cat conftest.$ac_ext >&5
10207   rm -rf conftest*
10208   samba_cv_HAVE_UT_UT_TYPE=no
10209 fi
10210 rm -f conftest*
10211 fi
10212
10213 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10214 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10215     cat >> confdefs.h <<\EOF
10216 #define HAVE_UT_UT_TYPE 1
10217 EOF
10218
10219 fi 
10220
10221 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10222 echo "configure:10223: checking for ut_pid in utmp" >&5
10223 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10224   echo $ac_n "(cached) $ac_c" 1>&6
10225 else
10226   
10227 cat > conftest.$ac_ext <<EOF
10228 #line 10229 "configure"
10229 #include "confdefs.h"
10230 #include <sys/types.h>
10231 #include <utmp.h>
10232 int main() {
10233 struct utmp ut;  ut.ut_pid = 0;
10234 ; return 0; }
10235 EOF
10236 if { (eval echo configure:10237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10237   rm -rf conftest*
10238   samba_cv_HAVE_UT_UT_PID=yes
10239 else
10240   echo "configure: failed program was:" >&5
10241   cat conftest.$ac_ext >&5
10242   rm -rf conftest*
10243   samba_cv_HAVE_UT_UT_PID=no
10244 fi
10245 rm -f conftest*
10246 fi
10247
10248 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10249 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10250     cat >> confdefs.h <<\EOF
10251 #define HAVE_UT_UT_PID 1
10252 EOF
10253
10254 fi 
10255
10256 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10257 echo "configure:10258: checking for ut_exit in utmp" >&5
10258 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10259   echo $ac_n "(cached) $ac_c" 1>&6
10260 else
10261   
10262 cat > conftest.$ac_ext <<EOF
10263 #line 10264 "configure"
10264 #include "confdefs.h"
10265 #include <sys/types.h>
10266 #include <utmp.h>
10267 int main() {
10268 struct utmp ut;  ut.ut_exit.e_exit = 0;
10269 ; return 0; }
10270 EOF
10271 if { (eval echo configure:10272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10272   rm -rf conftest*
10273   samba_cv_HAVE_UT_UT_EXIT=yes
10274 else
10275   echo "configure: failed program was:" >&5
10276   cat conftest.$ac_ext >&5
10277   rm -rf conftest*
10278   samba_cv_HAVE_UT_UT_EXIT=no
10279 fi
10280 rm -f conftest*
10281 fi
10282
10283 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10284 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10285     cat >> confdefs.h <<\EOF
10286 #define HAVE_UT_UT_EXIT 1
10287 EOF
10288
10289 fi 
10290
10291 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10292 echo "configure:10293: checking for ut_addr in utmp" >&5
10293 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10294   echo $ac_n "(cached) $ac_c" 1>&6
10295 else
10296   
10297 cat > conftest.$ac_ext <<EOF
10298 #line 10299 "configure"
10299 #include "confdefs.h"
10300 #include <sys/types.h>
10301 #include <utmp.h>
10302 int main() {
10303 struct utmp ut;  ut.ut_addr = 0;
10304 ; return 0; }
10305 EOF
10306 if { (eval echo configure:10307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10307   rm -rf conftest*
10308   samba_cv_HAVE_UT_UT_ADDR=yes
10309 else
10310   echo "configure: failed program was:" >&5
10311   cat conftest.$ac_ext >&5
10312   rm -rf conftest*
10313   samba_cv_HAVE_UT_UT_ADDR=no
10314 fi
10315 rm -f conftest*
10316 fi
10317
10318 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10319 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10320     cat >> confdefs.h <<\EOF
10321 #define HAVE_UT_UT_ADDR 1
10322 EOF
10323
10324 fi 
10325
10326 if test x$ac_cv_func_pututline = xyes ; then
10327   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10328 echo "configure:10329: checking whether pututline returns pointer" >&5
10329 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10330   echo $ac_n "(cached) $ac_c" 1>&6
10331 else
10332   
10333   cat > conftest.$ac_ext <<EOF
10334 #line 10335 "configure"
10335 #include "confdefs.h"
10336 #include <sys/types.h>
10337 #include <utmp.h>
10338 int main() {
10339 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10340 ; return 0; }
10341 EOF
10342 if { (eval echo configure:10343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10343   rm -rf conftest*
10344   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10345 else
10346   echo "configure: failed program was:" >&5
10347   cat conftest.$ac_ext >&5
10348   rm -rf conftest*
10349   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10350 fi
10351 rm -f conftest*
10352 fi
10353
10354 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10355   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10356       cat >> confdefs.h <<\EOF
10357 #define PUTUTLINE_RETURNS_UTMP 1
10358 EOF
10359
10360   fi
10361 fi
10362
10363 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10364 echo "configure:10365: checking for ut_syslen in utmpx" >&5
10365 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10366   echo $ac_n "(cached) $ac_c" 1>&6
10367 else
10368   
10369 cat > conftest.$ac_ext <<EOF
10370 #line 10371 "configure"
10371 #include "confdefs.h"
10372 #include <sys/types.h>
10373 #include <utmpx.h>
10374 int main() {
10375 struct utmpx ux;  ux.ut_syslen = 0;
10376 ; return 0; }
10377 EOF
10378 if { (eval echo configure:10379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10379   rm -rf conftest*
10380   samba_cv_HAVE_UX_UT_SYSLEN=yes
10381 else
10382   echo "configure: failed program was:" >&5
10383   cat conftest.$ac_ext >&5
10384   rm -rf conftest*
10385   samba_cv_HAVE_UX_UT_SYSLEN=no
10386 fi
10387 rm -f conftest*
10388 fi
10389
10390 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10391 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10392     cat >> confdefs.h <<\EOF
10393 #define HAVE_UX_UT_SYSLEN 1
10394 EOF
10395
10396 fi 
10397
10398
10399 #################################################
10400 # check for libiconv support
10401 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10402 echo "configure:10403: checking whether to use libiconv" >&5
10403 # Check whether --with-libiconv or --without-libiconv was given.
10404 if test "${with_libiconv+set}" = set; then
10405   withval="$with_libiconv"
10406    case "$withval" in
10407   no)
10408     echo "$ac_t""no" 1>&6
10409     ;;
10410   *)
10411     echo "$ac_t""yes" 1>&6
10412     CFLAGS="$CFLAGS -I$withval/include"
10413     LDFLAGS="$LDFLAGS -L$withval/lib"
10414     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10415 echo "configure:10416: checking for iconv_open in -liconv" >&5
10416 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10417 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10418   echo $ac_n "(cached) $ac_c" 1>&6
10419 else
10420   ac_save_LIBS="$LIBS"
10421 LIBS="-liconv  $LIBS"
10422 cat > conftest.$ac_ext <<EOF
10423 #line 10424 "configure"
10424 #include "confdefs.h"
10425 /* Override any gcc2 internal prototype to avoid an error.  */
10426 /* We use char because int might match the return type of a gcc2
10427     builtin and then its argument prototype would still apply.  */
10428 char iconv_open();
10429
10430 int main() {
10431 iconv_open()
10432 ; return 0; }
10433 EOF
10434 if { (eval echo configure:10435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10435   rm -rf conftest*
10436   eval "ac_cv_lib_$ac_lib_var=yes"
10437 else
10438   echo "configure: failed program was:" >&5
10439   cat conftest.$ac_ext >&5
10440   rm -rf conftest*
10441   eval "ac_cv_lib_$ac_lib_var=no"
10442 fi
10443 rm -f conftest*
10444 LIBS="$ac_save_LIBS"
10445
10446 fi
10447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10448   echo "$ac_t""yes" 1>&6
10449     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10450     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10451   cat >> confdefs.h <<EOF
10452 #define $ac_tr_lib 1
10453 EOF
10454
10455   LIBS="-liconv $LIBS"
10456
10457 else
10458   echo "$ac_t""no" 1>&6
10459 fi
10460
10461     cat >> confdefs.h <<EOF
10462 #define WITH_LIBICONV "${withval}"
10463 EOF
10464
10465     ;;
10466   esac 
10467 else
10468   echo "$ac_t""no" 1>&6
10469
10470 fi
10471
10472
10473
10474 ############
10475 # check for iconv in libc
10476 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10477 echo "configure:10478: checking for working iconv" >&5
10478 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10479   echo $ac_n "(cached) $ac_c" 1>&6
10480 else
10481   
10482 if test "$cross_compiling" = yes; then
10483   samba_cv_HAVE_NATIVE_ICONV=cross
10484 else
10485   cat > conftest.$ac_ext <<EOF
10486 #line 10487 "configure"
10487 #include "confdefs.h"
10488
10489 #include <iconv.h>
10490 main() {
10491        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10492        if (cd == 0 || cd == (iconv_t)-1) return -1;
10493        return 0;
10494 }
10495
10496 EOF
10497 if { (eval echo configure:10498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10498 then
10499   samba_cv_HAVE_NATIVE_ICONV=yes
10500 else
10501   echo "configure: failed program was:" >&5
10502   cat conftest.$ac_ext >&5
10503   rm -fr conftest*
10504   samba_cv_HAVE_NATIVE_ICONV=no
10505 fi
10506 rm -fr conftest*
10507 fi
10508
10509 fi
10510
10511 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10512 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10513     cat >> confdefs.h <<\EOF
10514 #define HAVE_NATIVE_ICONV 1
10515 EOF
10516
10517 fi
10518
10519
10520 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10521 echo "configure:10522: checking for Linux kernel oplocks" >&5
10522 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10523   echo $ac_n "(cached) $ac_c" 1>&6
10524 else
10525   
10526 if test "$cross_compiling" = yes; then
10527   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10528 else
10529   cat > conftest.$ac_ext <<EOF
10530 #line 10531 "configure"
10531 #include "confdefs.h"
10532
10533 #include <sys/types.h>
10534 #include <fcntl.h>
10535 #ifndef F_GETLEASE
10536 #define F_GETLEASE      1025
10537 #endif
10538 main() {
10539        int fd = open("/dev/null", O_RDONLY);
10540        return fcntl(fd, F_GETLEASE, 0) == -1;
10541 }
10542
10543 EOF
10544 if { (eval echo configure:10545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10545 then
10546   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10547 else
10548   echo "configure: failed program was:" >&5
10549   cat conftest.$ac_ext >&5
10550   rm -fr conftest*
10551   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10552 fi
10553 rm -fr conftest*
10554 fi
10555
10556 fi
10557
10558 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10559 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10560     cat >> confdefs.h <<\EOF
10561 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10562 EOF
10563
10564 fi
10565
10566 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10567 echo "configure:10568: checking for kernel change notify support" >&5
10568 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10569   echo $ac_n "(cached) $ac_c" 1>&6
10570 else
10571   
10572 if test "$cross_compiling" = yes; then
10573   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10574 else
10575   cat > conftest.$ac_ext <<EOF
10576 #line 10577 "configure"
10577 #include "confdefs.h"
10578
10579 #include <sys/types.h>
10580 #include <fcntl.h>
10581 #include <signal.h>
10582 #ifndef F_NOTIFY
10583 #define F_NOTIFY 1026
10584 #endif
10585 main() {
10586         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10587 }
10588
10589 EOF
10590 if { (eval echo configure:10591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10591 then
10592   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10593 else
10594   echo "configure: failed program was:" >&5
10595   cat conftest.$ac_ext >&5
10596   rm -fr conftest*
10597   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10598 fi
10599 rm -fr conftest*
10600 fi
10601
10602 fi
10603
10604 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10605 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10606     cat >> confdefs.h <<\EOF
10607 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10608 EOF
10609
10610 fi
10611
10612 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10613 echo "configure:10614: checking for kernel share modes" >&5
10614 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10615   echo $ac_n "(cached) $ac_c" 1>&6
10616 else
10617   
10618 if test "$cross_compiling" = yes; then
10619   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10620 else
10621   cat > conftest.$ac_ext <<EOF
10622 #line 10623 "configure"
10623 #include "confdefs.h"
10624
10625 #include <sys/types.h>
10626 #include <fcntl.h>
10627 #include <signal.h>
10628 #include <sys/file.h>
10629 #ifndef LOCK_MAND
10630 #define LOCK_MAND       32
10631 #define LOCK_READ       64
10632 #endif
10633 main() {
10634         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10635 }
10636
10637 EOF
10638 if { (eval echo configure:10639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10639 then
10640   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10641 else
10642   echo "configure: failed program was:" >&5
10643   cat conftest.$ac_ext >&5
10644   rm -fr conftest*
10645   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10646 fi
10647 rm -fr conftest*
10648 fi
10649
10650 fi
10651
10652 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10653 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10654     cat >> confdefs.h <<\EOF
10655 #define HAVE_KERNEL_SHARE_MODES 1
10656 EOF
10657
10658 fi
10659
10660
10661
10662
10663 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10664 echo "configure:10665: checking for IRIX kernel oplock type definitions" >&5
10665 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10666   echo $ac_n "(cached) $ac_c" 1>&6
10667 else
10668   
10669 cat > conftest.$ac_ext <<EOF
10670 #line 10671 "configure"
10671 #include "confdefs.h"
10672 #include <sys/types.h>
10673 #include <fcntl.h>
10674 int main() {
10675 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10676 ; return 0; }
10677 EOF
10678 if { (eval echo configure:10679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10679   rm -rf conftest*
10680   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10681 else
10682   echo "configure: failed program was:" >&5
10683   cat conftest.$ac_ext >&5
10684   rm -rf conftest*
10685   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10686 fi
10687 rm -f conftest*
10688 fi
10689
10690 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10691 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10692     cat >> confdefs.h <<\EOF
10693 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10694 EOF
10695
10696 fi
10697
10698 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10699 echo "configure:10700: checking for irix specific capabilities" >&5
10700 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10701   echo $ac_n "(cached) $ac_c" 1>&6
10702 else
10703   
10704 if test "$cross_compiling" = yes; then
10705   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10706 else
10707   cat > conftest.$ac_ext <<EOF
10708 #line 10709 "configure"
10709 #include "confdefs.h"
10710 #include <sys/types.h>
10711 #include <sys/capability.h>
10712 main() {
10713  cap_t cap;
10714  if ((cap = cap_get_proc()) == NULL)
10715    exit(1);
10716  cap->cap_effective |= CAP_NETWORK_MGT;
10717  cap->cap_inheritable |= CAP_NETWORK_MGT;
10718  cap_set_proc(cap);
10719  exit(0);
10720 }
10721
10722 EOF
10723 if { (eval echo configure:10724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10724 then
10725   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10726 else
10727   echo "configure: failed program was:" >&5
10728   cat conftest.$ac_ext >&5
10729   rm -fr conftest*
10730   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10731 fi
10732 rm -fr conftest*
10733 fi
10734
10735 fi
10736
10737 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10738 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10739     cat >> confdefs.h <<\EOF
10740 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10741 EOF
10742
10743 fi
10744
10745 #
10746 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10747 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10748 #
10749
10750 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10751 echo "configure:10752: checking for int16 typedef included by rpc/rpc.h" >&5
10752 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10753   echo $ac_n "(cached) $ac_c" 1>&6
10754 else
10755   
10756 cat > conftest.$ac_ext <<EOF
10757 #line 10758 "configure"
10758 #include "confdefs.h"
10759 #include <sys/types.h>
10760 #if defined(HAVE_RPC_RPC_H)
10761 #include <rpc/rpc.h>
10762 #endif
10763 int main() {
10764 int16 testvar;
10765 ; return 0; }
10766 EOF
10767 if { (eval echo configure:10768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10768   rm -rf conftest*
10769   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10770 else
10771   echo "configure: failed program was:" >&5
10772   cat conftest.$ac_ext >&5
10773   rm -rf conftest*
10774   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10775 fi
10776 rm -f conftest*
10777 fi
10778
10779 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10780 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10781     cat >> confdefs.h <<\EOF
10782 #define HAVE_INT16_FROM_RPC_RPC_H 1
10783 EOF
10784
10785 fi
10786
10787 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10788 echo "configure:10789: checking for uint16 typedef included by rpc/rpc.h" >&5
10789 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10790   echo $ac_n "(cached) $ac_c" 1>&6
10791 else
10792   
10793 cat > conftest.$ac_ext <<EOF
10794 #line 10795 "configure"
10795 #include "confdefs.h"
10796 #include <sys/types.h>
10797 #if defined(HAVE_RPC_RPC_H)
10798 #include <rpc/rpc.h>
10799 #endif
10800 int main() {
10801 uint16 testvar;
10802 ; return 0; }
10803 EOF
10804 if { (eval echo configure:10805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10805   rm -rf conftest*
10806   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10807 else
10808   echo "configure: failed program was:" >&5
10809   cat conftest.$ac_ext >&5
10810   rm -rf conftest*
10811   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10812 fi
10813 rm -f conftest*
10814 fi
10815
10816 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10817 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10818     cat >> confdefs.h <<\EOF
10819 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10820 EOF
10821
10822 fi
10823
10824 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10825 echo "configure:10826: checking for int32 typedef included by rpc/rpc.h" >&5
10826 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10827   echo $ac_n "(cached) $ac_c" 1>&6
10828 else
10829   
10830 cat > conftest.$ac_ext <<EOF
10831 #line 10832 "configure"
10832 #include "confdefs.h"
10833 #include <sys/types.h>
10834 #if defined(HAVE_RPC_RPC_H)
10835 #include <rpc/rpc.h>
10836 #endif
10837 int main() {
10838 int32 testvar;
10839 ; return 0; }
10840 EOF
10841 if { (eval echo configure:10842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10842   rm -rf conftest*
10843   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10844 else
10845   echo "configure: failed program was:" >&5
10846   cat conftest.$ac_ext >&5
10847   rm -rf conftest*
10848   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10849 fi
10850 rm -f conftest*
10851 fi
10852
10853 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10854 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10855     cat >> confdefs.h <<\EOF
10856 #define HAVE_INT32_FROM_RPC_RPC_H 1
10857 EOF
10858
10859 fi
10860
10861 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10862 echo "configure:10863: checking for uint32 typedef included by rpc/rpc.h" >&5
10863 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10864   echo $ac_n "(cached) $ac_c" 1>&6
10865 else
10866   
10867 cat > conftest.$ac_ext <<EOF
10868 #line 10869 "configure"
10869 #include "confdefs.h"
10870 #include <sys/types.h>
10871 #if defined(HAVE_RPC_RPC_H)
10872 #include <rpc/rpc.h>
10873 #endif
10874 int main() {
10875 uint32 testvar;
10876 ; return 0; }
10877 EOF
10878 if { (eval echo configure:10879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10879   rm -rf conftest*
10880   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10881 else
10882   echo "configure: failed program was:" >&5
10883   cat conftest.$ac_ext >&5
10884   rm -rf conftest*
10885   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10886 fi
10887 rm -f conftest*
10888 fi
10889
10890 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10891 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10892     cat >> confdefs.h <<\EOF
10893 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10894 EOF
10895
10896 fi
10897
10898
10899 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10900 echo "configure:10901: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10901 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10902   echo $ac_n "(cached) $ac_c" 1>&6
10903 else
10904   
10905 cat > conftest.$ac_ext <<EOF
10906 #line 10907 "configure"
10907 #include "confdefs.h"
10908 #include <sys/types.h>
10909 #ifdef HAVE_SYS_SECURITY_H
10910 #include <sys/security.h>
10911 #include <prot.h>
10912 #endif  /* HAVE_SYS_SECURITY_H */
10913 #if defined(HAVE_RPC_RPC_H)
10914 #include <rpc/rpc.h>
10915 #endif
10916 int main() {
10917 int testvar;
10918 ; return 0; }
10919 EOF
10920 if { (eval echo configure:10921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10921   rm -rf conftest*
10922   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10923 else
10924   echo "configure: failed program was:" >&5
10925   cat conftest.$ac_ext >&5
10926   rm -rf conftest*
10927   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10928 fi
10929 rm -f conftest*
10930 fi
10931
10932 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10933 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10934     cat >> confdefs.h <<\EOF
10935 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10936 EOF
10937
10938 fi
10939
10940 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10941 echo "configure:10942: checking for test routines" >&5
10942 if test "$cross_compiling" = yes; then
10943   echo "configure: warning: cannot run when cross-compiling" 1>&2
10944 else
10945   cat > conftest.$ac_ext <<EOF
10946 #line 10947 "configure"
10947 #include "confdefs.h"
10948 #include "${srcdir-.}/tests/trivial.c"
10949 EOF
10950 if { (eval echo configure:10951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10951 then
10952   echo "$ac_t""yes" 1>&6
10953 else
10954   echo "configure: failed program was:" >&5
10955   cat conftest.$ac_ext >&5
10956   rm -fr conftest*
10957   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10958 fi
10959 rm -fr conftest*
10960 fi
10961
10962
10963 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10964 echo "configure:10965: checking for ftruncate extend" >&5
10965 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10966   echo $ac_n "(cached) $ac_c" 1>&6
10967 else
10968   
10969 if test "$cross_compiling" = yes; then
10970   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10971 else
10972   cat > conftest.$ac_ext <<EOF
10973 #line 10974 "configure"
10974 #include "confdefs.h"
10975 #include "${srcdir-.}/tests/ftruncate.c"
10976 EOF
10977 if { (eval echo configure:10978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10978 then
10979   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10980 else
10981   echo "configure: failed program was:" >&5
10982   cat conftest.$ac_ext >&5
10983   rm -fr conftest*
10984   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10985 fi
10986 rm -fr conftest*
10987 fi
10988
10989 fi
10990
10991 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10992 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10993     cat >> confdefs.h <<\EOF
10994 #define HAVE_FTRUNCATE_EXTEND 1
10995 EOF
10996
10997 fi
10998
10999 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
11000 echo "configure:11001: checking for AF_LOCAL socket support" >&5
11001 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
11002   echo $ac_n "(cached) $ac_c" 1>&6
11003 else
11004   
11005 if test "$cross_compiling" = yes; then
11006   samba_cv_HAVE_WORKING_AF_LOCAL=cross
11007 else
11008   cat > conftest.$ac_ext <<EOF
11009 #line 11010 "configure"
11010 #include "confdefs.h"
11011 #include "${srcdir-.}/tests/unixsock.c"
11012 EOF
11013 if { (eval echo configure:11014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11014 then
11015   samba_cv_HAVE_WORKING_AF_LOCAL=yes
11016 else
11017   echo "configure: failed program was:" >&5
11018   cat conftest.$ac_ext >&5
11019   rm -fr conftest*
11020   samba_cv_HAVE_WORKING_AF_LOCAL=no
11021 fi
11022 rm -fr conftest*
11023 fi
11024
11025 fi
11026
11027 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
11028 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
11029 then
11030     cat >> confdefs.h <<\EOF
11031 #define HAVE_WORKING_AF_LOCAL 1
11032 EOF
11033
11034 fi
11035
11036 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
11037 echo "configure:11038: checking for broken getgroups" >&5
11038 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
11039   echo $ac_n "(cached) $ac_c" 1>&6
11040 else
11041   
11042 if test "$cross_compiling" = yes; then
11043   samba_cv_HAVE_BROKEN_GETGROUPS=cross
11044 else
11045   cat > conftest.$ac_ext <<EOF
11046 #line 11047 "configure"
11047 #include "confdefs.h"
11048 #include "${srcdir-.}/tests/getgroups.c"
11049 EOF
11050 if { (eval echo configure:11051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11051 then
11052   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11053 else
11054   echo "configure: failed program was:" >&5
11055   cat conftest.$ac_ext >&5
11056   rm -fr conftest*
11057   samba_cv_HAVE_BROKEN_GETGROUPS=no
11058 fi
11059 rm -fr conftest*
11060 fi
11061
11062 fi
11063
11064 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11065 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11066     cat >> confdefs.h <<\EOF
11067 #define HAVE_BROKEN_GETGROUPS 1
11068 EOF
11069
11070 fi
11071
11072 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11073 echo "configure:11074: checking whether getpass should be replaced" >&5
11074 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11075   echo $ac_n "(cached) $ac_c" 1>&6
11076 else
11077   
11078 SAVE_CPPFLAGS="$CPPFLAGS"
11079 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt  -I${srcdir-.}/smbwrapper"
11080 cat > conftest.$ac_ext <<EOF
11081 #line 11082 "configure"
11082 #include "confdefs.h"
11083
11084 #define REPLACE_GETPASS 1
11085 #define NO_CONFIG_H 1
11086 #define main dont_declare_main
11087 #include "${srcdir-.}/lib/getsmbpass.c"
11088 #undef main
11089
11090 int main() {
11091
11092 ; return 0; }
11093 EOF
11094 if { (eval echo configure:11095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11095   rm -rf conftest*
11096   samba_cv_REPLACE_GETPASS=yes
11097 else
11098   echo "configure: failed program was:" >&5
11099   cat conftest.$ac_ext >&5
11100   rm -rf conftest*
11101   samba_cv_REPLACE_GETPASS=no
11102 fi
11103 rm -f conftest*
11104 CPPFLAGS="$SAVE_CPPFLAGS"
11105
11106 fi
11107
11108 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11109 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11110         cat >> confdefs.h <<\EOF
11111 #define REPLACE_GETPASS 1
11112 EOF
11113
11114 fi
11115
11116 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11117 echo "configure:11118: checking for broken inet_ntoa" >&5
11118 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11119   echo $ac_n "(cached) $ac_c" 1>&6
11120 else
11121   
11122 if test "$cross_compiling" = yes; then
11123   samba_cv_REPLACE_INET_NTOA=cross
11124 else
11125   cat > conftest.$ac_ext <<EOF
11126 #line 11127 "configure"
11127 #include "confdefs.h"
11128
11129 #include <stdio.h>
11130 #include <sys/types.h>
11131 #include <netinet/in.h>
11132 #ifdef HAVE_ARPA_INET_H
11133 #include <arpa/inet.h>
11134 #endif
11135 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11136 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11137     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11138 exit(1);}
11139 EOF
11140 if { (eval echo configure:11141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11141 then
11142   samba_cv_REPLACE_INET_NTOA=yes
11143 else
11144   echo "configure: failed program was:" >&5
11145   cat conftest.$ac_ext >&5
11146   rm -fr conftest*
11147   samba_cv_REPLACE_INET_NTOA=no
11148 fi
11149 rm -fr conftest*
11150 fi
11151
11152 fi
11153
11154 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11155 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11156     cat >> confdefs.h <<\EOF
11157 #define REPLACE_INET_NTOA 1
11158 EOF
11159
11160 fi
11161
11162 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11163 echo "configure:11164: checking for secure mkstemp" >&5
11164 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11165   echo $ac_n "(cached) $ac_c" 1>&6
11166 else
11167   
11168 if test "$cross_compiling" = yes; then
11169   samba_cv_HAVE_SECURE_MKSTEMP=cross
11170 else
11171   cat > conftest.$ac_ext <<EOF
11172 #line 11173 "configure"
11173 #include "confdefs.h"
11174 #include <stdlib.h>
11175 #include <sys/types.h>
11176 #include <sys/stat.h>
11177 #include <unistd.h>
11178 main() { 
11179   struct stat st;
11180   char tpl[20]="/tmp/test.XXXXXX"; 
11181   int fd = mkstemp(tpl); 
11182   if (fd == -1) exit(1);
11183   unlink(tpl);
11184   if (fstat(fd, &st) != 0) exit(1);
11185   if ((st.st_mode & 0777) != 0600) exit(1);
11186   exit(0);
11187 }
11188 EOF
11189 if { (eval echo configure:11190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11190 then
11191   samba_cv_HAVE_SECURE_MKSTEMP=yes
11192 else
11193   echo "configure: failed program was:" >&5
11194   cat conftest.$ac_ext >&5
11195   rm -fr conftest*
11196   samba_cv_HAVE_SECURE_MKSTEMP=no
11197 fi
11198 rm -fr conftest*
11199 fi
11200
11201 fi
11202
11203 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11204 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11205     cat >> confdefs.h <<\EOF
11206 #define HAVE_SECURE_MKSTEMP 1
11207 EOF
11208
11209 fi
11210
11211 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11212 echo "configure:11213: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11213 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11214   echo $ac_n "(cached) $ac_c" 1>&6
11215 else
11216   
11217 if test "$cross_compiling" = yes; then
11218   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11219 else
11220   cat > conftest.$ac_ext <<EOF
11221 #line 11222 "configure"
11222 #include "confdefs.h"
11223 #include <unistd.h>
11224 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11225 EOF
11226 if { (eval echo configure:11227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11227 then
11228   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11229 else
11230   echo "configure: failed program was:" >&5
11231   cat conftest.$ac_ext >&5
11232   rm -fr conftest*
11233   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11234 fi
11235 rm -fr conftest*
11236 fi
11237
11238 fi
11239
11240 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11241 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11242     cat >> confdefs.h <<\EOF
11243 #define SYSCONF_SC_NGROUPS_MAX 1
11244 EOF
11245
11246 fi
11247
11248 echo $ac_n "checking for root""... $ac_c" 1>&6
11249 echo "configure:11250: checking for root" >&5
11250 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11251   echo $ac_n "(cached) $ac_c" 1>&6
11252 else
11253   
11254 if test "$cross_compiling" = yes; then
11255   samba_cv_HAVE_ROOT=cross
11256 else
11257   cat > conftest.$ac_ext <<EOF
11258 #line 11259 "configure"
11259 #include "confdefs.h"
11260 main() { exit(getuid() != 0); }
11261 EOF
11262 if { (eval echo configure:11263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11263 then
11264   samba_cv_HAVE_ROOT=yes
11265 else
11266   echo "configure: failed program was:" >&5
11267   cat conftest.$ac_ext >&5
11268   rm -fr conftest*
11269   samba_cv_HAVE_ROOT=no
11270 fi
11271 rm -fr conftest*
11272 fi
11273
11274 fi
11275
11276 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11277 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11278     cat >> confdefs.h <<\EOF
11279 #define HAVE_ROOT 1
11280 EOF
11281
11282 else
11283     echo "configure: warning: running as non-root will disable some tests" 1>&2
11284 fi
11285
11286 ##################
11287 # look for a method of finding the list of network interfaces
11288 iface=no;
11289 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11290 echo "configure:11291: checking for iface AIX" >&5
11291 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11292   echo $ac_n "(cached) $ac_c" 1>&6
11293 else
11294   
11295 if test "$cross_compiling" = yes; then
11296   samba_cv_HAVE_IFACE_AIX=cross
11297 else
11298   cat > conftest.$ac_ext <<EOF
11299 #line 11300 "configure"
11300 #include "confdefs.h"
11301
11302 #define HAVE_IFACE_AIX 1
11303 #define AUTOCONF_TEST 1
11304 #include "confdefs.h"
11305 #include "${srcdir-.}/lib/interfaces.c"
11306 EOF
11307 if { (eval echo configure:11308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11308 then
11309   samba_cv_HAVE_IFACE_AIX=yes
11310 else
11311   echo "configure: failed program was:" >&5
11312   cat conftest.$ac_ext >&5
11313   rm -fr conftest*
11314   samba_cv_HAVE_IFACE_AIX=no
11315 fi
11316 rm -fr conftest*
11317 fi
11318
11319 fi
11320
11321 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11322 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11323     iface=yes;cat >> confdefs.h <<\EOF
11324 #define HAVE_IFACE_AIX 1
11325 EOF
11326
11327 fi
11328
11329 if test $iface = no; then
11330 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11331 echo "configure:11332: checking for iface ifconf" >&5
11332 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11333   echo $ac_n "(cached) $ac_c" 1>&6
11334 else
11335   
11336 if test "$cross_compiling" = yes; then
11337   samba_cv_HAVE_IFACE_IFCONF=cross
11338 else
11339   cat > conftest.$ac_ext <<EOF
11340 #line 11341 "configure"
11341 #include "confdefs.h"
11342
11343 #define HAVE_IFACE_IFCONF 1
11344 #define AUTOCONF_TEST 1
11345 #include "confdefs.h"
11346 #include "${srcdir-.}/lib/interfaces.c"
11347 EOF
11348 if { (eval echo configure:11349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11349 then
11350   samba_cv_HAVE_IFACE_IFCONF=yes
11351 else
11352   echo "configure: failed program was:" >&5
11353   cat conftest.$ac_ext >&5
11354   rm -fr conftest*
11355   samba_cv_HAVE_IFACE_IFCONF=no
11356 fi
11357 rm -fr conftest*
11358 fi
11359
11360 fi
11361
11362 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11363 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11364     iface=yes;cat >> confdefs.h <<\EOF
11365 #define HAVE_IFACE_IFCONF 1
11366 EOF
11367
11368 fi
11369 fi
11370
11371 if test $iface = no; then
11372 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11373 echo "configure:11374: checking for iface ifreq" >&5
11374 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11375   echo $ac_n "(cached) $ac_c" 1>&6
11376 else
11377   
11378 if test "$cross_compiling" = yes; then
11379   samba_cv_HAVE_IFACE_IFREQ=cross
11380 else
11381   cat > conftest.$ac_ext <<EOF
11382 #line 11383 "configure"
11383 #include "confdefs.h"
11384
11385 #define HAVE_IFACE_IFREQ 1
11386 #define AUTOCONF_TEST 1
11387 #include "confdefs.h"
11388 #include "${srcdir-.}/lib/interfaces.c"
11389 EOF
11390 if { (eval echo configure:11391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11391 then
11392   samba_cv_HAVE_IFACE_IFREQ=yes
11393 else
11394   echo "configure: failed program was:" >&5
11395   cat conftest.$ac_ext >&5
11396   rm -fr conftest*
11397   samba_cv_HAVE_IFACE_IFREQ=no
11398 fi
11399 rm -fr conftest*
11400 fi
11401
11402 fi
11403
11404 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11405 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11406     iface=yes;cat >> confdefs.h <<\EOF
11407 #define HAVE_IFACE_IFREQ 1
11408 EOF
11409
11410 fi
11411 fi
11412
11413
11414 ################################################
11415 # look for a method of setting the effective uid
11416 seteuid=no;
11417 if test $seteuid = no; then
11418 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11419 echo "configure:11420: checking for setresuid" >&5
11420 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11421   echo $ac_n "(cached) $ac_c" 1>&6
11422 else
11423   
11424 if test "$cross_compiling" = yes; then
11425   samba_cv_USE_SETRESUID=cross
11426 else
11427   cat > conftest.$ac_ext <<EOF
11428 #line 11429 "configure"
11429 #include "confdefs.h"
11430
11431 #define AUTOCONF_TEST 1
11432 #define USE_SETRESUID 1
11433 #include "confdefs.h"
11434 #include "${srcdir-.}/lib/util_sec.c"
11435 EOF
11436 if { (eval echo configure:11437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11437 then
11438   samba_cv_USE_SETRESUID=yes
11439 else
11440   echo "configure: failed program was:" >&5
11441   cat conftest.$ac_ext >&5
11442   rm -fr conftest*
11443   samba_cv_USE_SETRESUID=no
11444 fi
11445 rm -fr conftest*
11446 fi
11447
11448 fi
11449
11450 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11451 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11452     seteuid=yes;cat >> confdefs.h <<\EOF
11453 #define USE_SETRESUID 1
11454 EOF
11455
11456 fi
11457 fi
11458
11459
11460 if test $seteuid = no; then
11461 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11462 echo "configure:11463: checking for setreuid" >&5
11463 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11464   echo $ac_n "(cached) $ac_c" 1>&6
11465 else
11466   
11467 if test "$cross_compiling" = yes; then
11468   samba_cv_USE_SETREUID=cross
11469 else
11470   cat > conftest.$ac_ext <<EOF
11471 #line 11472 "configure"
11472 #include "confdefs.h"
11473
11474 #define AUTOCONF_TEST 1
11475 #define USE_SETREUID 1
11476 #include "confdefs.h"
11477 #include "${srcdir-.}/lib/util_sec.c"
11478 EOF
11479 if { (eval echo configure:11480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11480 then
11481   samba_cv_USE_SETREUID=yes
11482 else
11483   echo "configure: failed program was:" >&5
11484   cat conftest.$ac_ext >&5
11485   rm -fr conftest*
11486   samba_cv_USE_SETREUID=no
11487 fi
11488 rm -fr conftest*
11489 fi
11490
11491 fi
11492
11493 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11494 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11495     seteuid=yes;cat >> confdefs.h <<\EOF
11496 #define USE_SETREUID 1
11497 EOF
11498
11499 fi
11500 fi
11501
11502 if test $seteuid = no; then
11503 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11504 echo "configure:11505: checking for seteuid" >&5
11505 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11506   echo $ac_n "(cached) $ac_c" 1>&6
11507 else
11508   
11509 if test "$cross_compiling" = yes; then
11510   samba_cv_USE_SETEUID=cross
11511 else
11512   cat > conftest.$ac_ext <<EOF
11513 #line 11514 "configure"
11514 #include "confdefs.h"
11515
11516 #define AUTOCONF_TEST 1
11517 #define USE_SETEUID 1
11518 #include "confdefs.h"
11519 #include "${srcdir-.}/lib/util_sec.c"
11520 EOF
11521 if { (eval echo configure:11522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11522 then
11523   samba_cv_USE_SETEUID=yes
11524 else
11525   echo "configure: failed program was:" >&5
11526   cat conftest.$ac_ext >&5
11527   rm -fr conftest*
11528   samba_cv_USE_SETEUID=no
11529 fi
11530 rm -fr conftest*
11531 fi
11532
11533 fi
11534
11535 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11536 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11537     seteuid=yes;cat >> confdefs.h <<\EOF
11538 #define USE_SETEUID 1
11539 EOF
11540
11541 fi
11542 fi
11543
11544 if test $seteuid = no; then
11545 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11546 echo "configure:11547: checking for setuidx" >&5
11547 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11548   echo $ac_n "(cached) $ac_c" 1>&6
11549 else
11550   
11551 if test "$cross_compiling" = yes; then
11552   samba_cv_USE_SETUIDX=cross
11553 else
11554   cat > conftest.$ac_ext <<EOF
11555 #line 11556 "configure"
11556 #include "confdefs.h"
11557
11558 #define AUTOCONF_TEST 1
11559 #define USE_SETUIDX 1
11560 #include "confdefs.h"
11561 #include "${srcdir-.}/lib/util_sec.c"
11562 EOF
11563 if { (eval echo configure:11564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11564 then
11565   samba_cv_USE_SETUIDX=yes
11566 else
11567   echo "configure: failed program was:" >&5
11568   cat conftest.$ac_ext >&5
11569   rm -fr conftest*
11570   samba_cv_USE_SETUIDX=no
11571 fi
11572 rm -fr conftest*
11573 fi
11574
11575 fi
11576
11577 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11578 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11579     seteuid=yes;cat >> confdefs.h <<\EOF
11580 #define USE_SETUIDX 1
11581 EOF
11582
11583 fi
11584 fi
11585
11586
11587 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11588 echo "configure:11589: checking for working mmap" >&5
11589 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11590   echo $ac_n "(cached) $ac_c" 1>&6
11591 else
11592   
11593 if test "$cross_compiling" = yes; then
11594   samba_cv_HAVE_MMAP=cross
11595 else
11596   cat > conftest.$ac_ext <<EOF
11597 #line 11598 "configure"
11598 #include "confdefs.h"
11599 #include "${srcdir-.}/tests/shared_mmap.c"
11600 EOF
11601 if { (eval echo configure:11602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11602 then
11603   samba_cv_HAVE_MMAP=yes
11604 else
11605   echo "configure: failed program was:" >&5
11606   cat conftest.$ac_ext >&5
11607   rm -fr conftest*
11608   samba_cv_HAVE_MMAP=no
11609 fi
11610 rm -fr conftest*
11611 fi
11612
11613 fi
11614
11615 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11616 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11617     cat >> confdefs.h <<\EOF
11618 #define HAVE_MMAP 1
11619 EOF
11620
11621 fi
11622
11623 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11624 echo "configure:11625: checking for ftruncate needs root" >&5
11625 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11626   echo $ac_n "(cached) $ac_c" 1>&6
11627 else
11628   
11629 if test "$cross_compiling" = yes; then
11630   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11631 else
11632   cat > conftest.$ac_ext <<EOF
11633 #line 11634 "configure"
11634 #include "confdefs.h"
11635 #include "${srcdir-.}/tests/ftruncroot.c"
11636 EOF
11637 if { (eval echo configure:11638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11638 then
11639   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11640 else
11641   echo "configure: failed program was:" >&5
11642   cat conftest.$ac_ext >&5
11643   rm -fr conftest*
11644   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11645 fi
11646 rm -fr conftest*
11647 fi
11648
11649 fi
11650
11651 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11652 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11653     cat >> confdefs.h <<\EOF
11654 #define FTRUNCATE_NEEDS_ROOT 1
11655 EOF
11656
11657 fi
11658
11659 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11660 echo "configure:11661: checking for fcntl locking" >&5
11661 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11662   echo $ac_n "(cached) $ac_c" 1>&6
11663 else
11664   
11665 if test "$cross_compiling" = yes; then
11666   samba_cv_HAVE_FCNTL_LOCK=cross
11667 else
11668   cat > conftest.$ac_ext <<EOF
11669 #line 11670 "configure"
11670 #include "confdefs.h"
11671 #include "${srcdir-.}/tests/fcntl_lock.c"
11672 EOF
11673 if { (eval echo configure:11674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11674 then
11675   samba_cv_HAVE_FCNTL_LOCK=yes
11676 else
11677   echo "configure: failed program was:" >&5
11678   cat conftest.$ac_ext >&5
11679   rm -fr conftest*
11680   samba_cv_HAVE_FCNTL_LOCK=no
11681 fi
11682 rm -fr conftest*
11683 fi
11684
11685 fi
11686
11687 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11688 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11689     cat >> confdefs.h <<\EOF
11690 #define HAVE_FCNTL_LOCK 1
11691 EOF
11692
11693 fi
11694
11695 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11696 echo "configure:11697: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11697 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11698   echo $ac_n "(cached) $ac_c" 1>&6
11699 else
11700   
11701 if test "$cross_compiling" = yes; then
11702   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11703 else
11704   cat > conftest.$ac_ext <<EOF
11705 #line 11706 "configure"
11706 #include "confdefs.h"
11707 #include "${srcdir-.}/tests/fcntl_lock64.c"
11708 EOF
11709 if { (eval echo configure:11710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11710 then
11711   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11712 else
11713   echo "configure: failed program was:" >&5
11714   cat conftest.$ac_ext >&5
11715   rm -fr conftest*
11716   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11717 fi
11718 rm -fr conftest*
11719 fi
11720
11721 fi
11722
11723 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11724 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11725     cat >> confdefs.h <<\EOF
11726 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11727 EOF
11728
11729
11730 else
11731
11732
11733   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11734 echo "configure:11735: checking for 64 bit fcntl locking" >&5
11735 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11736   echo $ac_n "(cached) $ac_c" 1>&6
11737 else
11738   
11739   if test "$cross_compiling" = yes; then
11740   samba_cv_HAVE_STRUCT_FLOCK64=cross
11741 else
11742   cat > conftest.$ac_ext <<EOF
11743 #line 11744 "configure"
11744 #include "confdefs.h"
11745
11746 #if defined(HAVE_UNISTD_H)
11747 #include <unistd.h>
11748 #endif
11749 #include <stdio.h>
11750 #include <stdlib.h>
11751
11752 #ifdef HAVE_FCNTL_H
11753 #include <fcntl.h>
11754 #endif
11755
11756 #ifdef HAVE_SYS_FCNTL_H
11757 #include <sys/fcntl.h>
11758 #endif
11759 main() { struct flock64 fl64;
11760 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11761 exit(0);
11762 #else
11763 exit(1);
11764 #endif
11765 }
11766 EOF
11767 if { (eval echo configure:11768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11768 then
11769   samba_cv_HAVE_STRUCT_FLOCK64=yes
11770 else
11771   echo "configure: failed program was:" >&5
11772   cat conftest.$ac_ext >&5
11773   rm -fr conftest*
11774   samba_cv_HAVE_STRUCT_FLOCK64=no
11775 fi
11776 rm -fr conftest*
11777 fi
11778
11779 fi
11780
11781 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11782
11783   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11784       cat >> confdefs.h <<\EOF
11785 #define HAVE_STRUCT_FLOCK64 1
11786 EOF
11787
11788   fi
11789 fi
11790
11791 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11792 echo "configure:11793: checking for st_blocks in struct stat" >&5
11793 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11794   echo $ac_n "(cached) $ac_c" 1>&6
11795 else
11796   
11797 cat > conftest.$ac_ext <<EOF
11798 #line 11799 "configure"
11799 #include "confdefs.h"
11800 #include <sys/types.h>
11801 #include <sys/stat.h>
11802 #include <unistd.h>
11803 int main() {
11804 struct stat st;  st.st_blocks = 0;
11805 ; return 0; }
11806 EOF
11807 if { (eval echo configure:11808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11808   rm -rf conftest*
11809   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11810 else
11811   echo "configure: failed program was:" >&5
11812   cat conftest.$ac_ext >&5
11813   rm -rf conftest*
11814   samba_cv_HAVE_STAT_ST_BLOCKS=no
11815 fi
11816 rm -f conftest*
11817 fi
11818
11819 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11820 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11821     cat >> confdefs.h <<\EOF
11822 #define HAVE_STAT_ST_BLOCKS 1
11823 EOF
11824
11825 fi 
11826
11827 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
11828 echo "configure:11829: checking for st_blksize in struct stat" >&5
11829 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLKSIZE'+set}'`\" = set"; then
11830   echo $ac_n "(cached) $ac_c" 1>&6
11831 else
11832   
11833 cat > conftest.$ac_ext <<EOF
11834 #line 11835 "configure"
11835 #include "confdefs.h"
11836 #include <sys/types.h>
11837 #include <sys/stat.h>
11838 #include <unistd.h>
11839 int main() {
11840 struct stat st;  st.st_blksize = 0;
11841 ; return 0; }
11842 EOF
11843 if { (eval echo configure:11844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11844   rm -rf conftest*
11845   samba_cv_HAVE_STAT_ST_BLKSIZE=yes
11846 else
11847   echo "configure: failed program was:" >&5
11848   cat conftest.$ac_ext >&5
11849   rm -rf conftest*
11850   samba_cv_HAVE_STAT_ST_BLKSIZE=no
11851 fi
11852 rm -f conftest*
11853 fi
11854
11855 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLKSIZE" 1>&6
11856 if test x"$samba_cv_HAVE_STAT_ST_BLKSIZE" = x"yes"; then
11857     cat >> confdefs.h <<\EOF
11858 #define HAVE_STAT_ST_BLKSIZE 1
11859 EOF
11860
11861 fi
11862
11863 case "$host_os" in
11864 *linux*)
11865 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11866 echo "configure:11867: checking for broken RedHat 7.2 system header files" >&5
11867 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11868   echo $ac_n "(cached) $ac_c" 1>&6
11869 else
11870   
11871 cat > conftest.$ac_ext <<EOF
11872 #line 11873 "configure"
11873 #include "confdefs.h"
11874
11875 #ifdef HAVE_SYS_VFS_H
11876 #include <sys/vfs.h>
11877 #endif
11878 #ifdef HAVE_SYS_CAPABILITY_H
11879 #include <sys/capability.h>
11880 #endif
11881
11882 int main() {
11883 int i;
11884 ; return 0; }
11885 EOF
11886 if { (eval echo configure:11887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11887   rm -rf conftest*
11888   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11889 else
11890   echo "configure: failed program was:" >&5
11891   cat conftest.$ac_ext >&5
11892   rm -rf conftest*
11893   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11894 fi
11895 rm -f conftest*
11896 fi
11897
11898 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11899 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11900    cat >> confdefs.h <<\EOF
11901 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11902 EOF
11903
11904 fi
11905 ;;
11906 esac
11907
11908 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11909 echo "configure:11910: checking for broken nisplus include files" >&5
11910 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11911   echo $ac_n "(cached) $ac_c" 1>&6
11912 else
11913   
11914 cat > conftest.$ac_ext <<EOF
11915 #line 11916 "configure"
11916 #include "confdefs.h"
11917 #include <sys/acl.h>
11918 #if defined(HAVE_RPCSVC_NIS_H)
11919 #include <rpcsvc/nis.h>
11920 #endif
11921 int main() {
11922 int i;
11923 ; return 0; }
11924 EOF
11925 if { (eval echo configure:11926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11926   rm -rf conftest*
11927   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11928 else
11929   echo "configure: failed program was:" >&5
11930   cat conftest.$ac_ext >&5
11931   rm -rf conftest*
11932   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11933 fi
11934 rm -f conftest*
11935 fi
11936
11937 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11938 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11939     cat >> confdefs.h <<\EOF
11940 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11941 EOF
11942
11943 fi
11944
11945
11946 #################################################
11947 # check for smbwrapper support
11948 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11949 echo "configure:11950: checking whether to use smbwrapper" >&5
11950 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11951 if test "${with_smbwrapper+set}" = set; then
11952   withval="$with_smbwrapper"
11953    case "$withval" in
11954   yes)
11955     echo "$ac_t""yes" 1>&6
11956     cat >> confdefs.h <<\EOF
11957 #define WITH_SMBWRAPPER 1
11958 EOF
11959
11960         WRAPPROG="bin/smbsh"
11961         WRAP="bin/smbwrapper.$SHLIBEXT"
11962
11963         if test x$ATTEMPT_WRAP32_BUILD = x; then
11964                 WRAP32=""
11965         else
11966                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11967         fi
11968
11969 # Conditions under which smbwrapper should not be built.
11970
11971         if test x$PICFLAG = x; then
11972            echo No support for PIC code - disabling smbwrapper and smbsh
11973            WRAPPROG=""
11974            WRAP=""
11975            WRAP32=""
11976         elif test x$ac_cv_func_syscall = xno; then
11977            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11978            WRAPPROG=""
11979            WRAP=""
11980            WRAP32=""
11981         fi
11982     ;;
11983   *)
11984     echo "$ac_t""no" 1>&6
11985     ;;
11986   esac 
11987 else
11988   echo "$ac_t""no" 1>&6
11989
11990 fi
11991
11992
11993 #################################################
11994 # check for AFS clear-text auth support
11995 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11996 echo "configure:11997: checking whether to use AFS clear-text auth" >&5
11997 # Check whether --with-afs or --without-afs was given.
11998 if test "${with_afs+set}" = set; then
11999   withval="$with_afs"
12000    case "$withval" in
12001   yes)
12002     echo "$ac_t""yes" 1>&6
12003     cat >> confdefs.h <<\EOF
12004 #define WITH_AFS 1
12005 EOF
12006
12007     ;;
12008   *)
12009     echo "$ac_t""no" 1>&6
12010     ;;
12011   esac 
12012 else
12013   echo "$ac_t""no" 1>&6
12014
12015 fi
12016
12017
12018
12019 #################################################
12020 # check for the DFS clear-text auth system
12021 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
12022 echo "configure:12023: checking whether to use DFS clear-text auth" >&5
12023 # Check whether --with-dfs or --without-dfs was given.
12024 if test "${with_dfs+set}" = set; then
12025   withval="$with_dfs"
12026    case "$withval" in
12027   yes)
12028     echo "$ac_t""yes" 1>&6
12029     cat >> confdefs.h <<\EOF
12030 #define WITH_DFS 1
12031 EOF
12032
12033     ;;
12034   *)
12035     echo "$ac_t""no" 1>&6
12036     ;;
12037   esac 
12038 else
12039   echo "$ac_t""no" 1>&6
12040
12041 fi
12042
12043
12044
12045 #################################################
12046 # see if this box has the RedHat location for kerberos
12047 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
12048 echo "configure:12049: checking for /usr/kerberos" >&5
12049 if test -d /usr/kerberos; then
12050     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
12051     CFLAGS="$CFLAGS -I/usr/kerberos/include"
12052     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
12053     echo "$ac_t""yes" 1>&6
12054 else
12055     echo "$ac_t""no" 1>&6
12056 fi
12057
12058 #################################################
12059 # check for location of Kerberos 5 install
12060 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
12061 echo "configure:12062: checking for kerberos 5 install path" >&5
12062 # Check whether --with-krb5 or --without-krb5 was given.
12063 if test "${with_krb5+set}" = set; then
12064   withval="$with_krb5"
12065    case "$withval" in
12066   no)
12067     echo "$ac_t""no" 1>&6
12068     ;;
12069   *)
12070     echo "$ac_t""yes" 1>&6
12071     LIBS="$LIBS -lkrb5"
12072     CFLAGS="$CFLAGS -I$withval/include"
12073     CPPFLAGS="$CPPFLAGS -I$withval/include"
12074     LDFLAGS="$LDFLAGS -L$withval/lib"
12075     ;;
12076   esac 
12077 else
12078   echo "$ac_t""no" 1>&6
12079
12080 fi
12081
12082
12083 # now check for krb5.h. Some systems have the libraries without the headers!
12084 # note that this check is done here to allow for different kerberos
12085 # include paths
12086 for ac_hdr in krb5.h
12087 do
12088 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12089 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12090 echo "configure:12091: checking for $ac_hdr" >&5
12091 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12092   echo $ac_n "(cached) $ac_c" 1>&6
12093 else
12094   cat > conftest.$ac_ext <<EOF
12095 #line 12096 "configure"
12096 #include "confdefs.h"
12097 #include <$ac_hdr>
12098 EOF
12099 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12100 { (eval echo configure:12101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12101 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12102 if test -z "$ac_err"; then
12103   rm -rf conftest*
12104   eval "ac_cv_header_$ac_safe=yes"
12105 else
12106   echo "$ac_err" >&5
12107   echo "configure: failed program was:" >&5
12108   cat conftest.$ac_ext >&5
12109   rm -rf conftest*
12110   eval "ac_cv_header_$ac_safe=no"
12111 fi
12112 rm -f conftest*
12113 fi
12114 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12115   echo "$ac_t""yes" 1>&6
12116     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12117   cat >> confdefs.h <<EOF
12118 #define $ac_tr_hdr 1
12119 EOF
12120  
12121 else
12122   echo "$ac_t""no" 1>&6
12123 fi
12124 done
12125
12126
12127 # now check for gssapi headers.  This is also done here to allow for
12128 # different kerberos include paths
12129 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12130 do
12131 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12132 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12133 echo "configure:12134: checking for $ac_hdr" >&5
12134 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12135   echo $ac_n "(cached) $ac_c" 1>&6
12136 else
12137   cat > conftest.$ac_ext <<EOF
12138 #line 12139 "configure"
12139 #include "confdefs.h"
12140 #include <$ac_hdr>
12141 EOF
12142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12143 { (eval echo configure:12144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12144 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12145 if test -z "$ac_err"; then
12146   rm -rf conftest*
12147   eval "ac_cv_header_$ac_safe=yes"
12148 else
12149   echo "$ac_err" >&5
12150   echo "configure: failed program was:" >&5
12151   cat conftest.$ac_ext >&5
12152   rm -rf conftest*
12153   eval "ac_cv_header_$ac_safe=no"
12154 fi
12155 rm -f conftest*
12156 fi
12157 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12158   echo "$ac_t""yes" 1>&6
12159     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12160   cat >> confdefs.h <<EOF
12161 #define $ac_tr_hdr 1
12162 EOF
12163  
12164 else
12165   echo "$ac_t""no" 1>&6
12166 fi
12167 done
12168
12169
12170 ##################################################################
12171 # we might need the k5crypto and com_err libraries on some systems
12172 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12173 echo "configure:12174: checking for _et_list in -lcom_err" >&5
12174 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12175 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12176   echo $ac_n "(cached) $ac_c" 1>&6
12177 else
12178   ac_save_LIBS="$LIBS"
12179 LIBS="-lcom_err  $LIBS"
12180 cat > conftest.$ac_ext <<EOF
12181 #line 12182 "configure"
12182 #include "confdefs.h"
12183 /* Override any gcc2 internal prototype to avoid an error.  */
12184 /* We use char because int might match the return type of a gcc2
12185     builtin and then its argument prototype would still apply.  */
12186 char _et_list();
12187
12188 int main() {
12189 _et_list()
12190 ; return 0; }
12191 EOF
12192 if { (eval echo configure:12193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12193   rm -rf conftest*
12194   eval "ac_cv_lib_$ac_lib_var=yes"
12195 else
12196   echo "configure: failed program was:" >&5
12197   cat conftest.$ac_ext >&5
12198   rm -rf conftest*
12199   eval "ac_cv_lib_$ac_lib_var=no"
12200 fi
12201 rm -f conftest*
12202 LIBS="$ac_save_LIBS"
12203
12204 fi
12205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12206   echo "$ac_t""yes" 1>&6
12207   LIBS="$LIBS -lcom_err"
12208 else
12209   echo "$ac_t""no" 1>&6
12210 fi
12211
12212 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12213 echo "configure:12214: checking for krb5_encrypt_data in -lk5crypto" >&5
12214 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12215 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12216   echo $ac_n "(cached) $ac_c" 1>&6
12217 else
12218   ac_save_LIBS="$LIBS"
12219 LIBS="-lk5crypto  $LIBS"
12220 cat > conftest.$ac_ext <<EOF
12221 #line 12222 "configure"
12222 #include "confdefs.h"
12223 /* Override any gcc2 internal prototype to avoid an error.  */
12224 /* We use char because int might match the return type of a gcc2
12225     builtin and then its argument prototype would still apply.  */
12226 char krb5_encrypt_data();
12227
12228 int main() {
12229 krb5_encrypt_data()
12230 ; return 0; }
12231 EOF
12232 if { (eval echo configure:12233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12233   rm -rf conftest*
12234   eval "ac_cv_lib_$ac_lib_var=yes"
12235 else
12236   echo "configure: failed program was:" >&5
12237   cat conftest.$ac_ext >&5
12238   rm -rf conftest*
12239   eval "ac_cv_lib_$ac_lib_var=no"
12240 fi
12241 rm -f conftest*
12242 LIBS="$ac_save_LIBS"
12243
12244 fi
12245 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12246   echo "$ac_t""yes" 1>&6
12247   LIBS="$LIBS -lk5crypto"
12248 else
12249   echo "$ac_t""no" 1>&6
12250 fi
12251
12252
12253 ########################################################
12254 # now see if we can find the krb5 libs in standard paths
12255 # or as specified above
12256 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12257 echo "configure:12258: checking for krb5_mk_req_extended in -lkrb5" >&5
12258 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12259 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12260   echo $ac_n "(cached) $ac_c" 1>&6
12261 else
12262   ac_save_LIBS="$LIBS"
12263 LIBS="-lkrb5  $LIBS"
12264 cat > conftest.$ac_ext <<EOF
12265 #line 12266 "configure"
12266 #include "confdefs.h"
12267 /* Override any gcc2 internal prototype to avoid an error.  */
12268 /* We use char because int might match the return type of a gcc2
12269     builtin and then its argument prototype would still apply.  */
12270 char krb5_mk_req_extended();
12271
12272 int main() {
12273 krb5_mk_req_extended()
12274 ; return 0; }
12275 EOF
12276 if { (eval echo configure:12277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12277   rm -rf conftest*
12278   eval "ac_cv_lib_$ac_lib_var=yes"
12279 else
12280   echo "configure: failed program was:" >&5
12281   cat conftest.$ac_ext >&5
12282   rm -rf conftest*
12283   eval "ac_cv_lib_$ac_lib_var=no"
12284 fi
12285 rm -f conftest*
12286 LIBS="$ac_save_LIBS"
12287
12288 fi
12289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12290   echo "$ac_t""yes" 1>&6
12291   LIBS="$LIBS -lkrb5";
12292         cat >> confdefs.h <<\EOF
12293 #define HAVE_KRB5 1
12294 EOF
12295
12296 else
12297   echo "$ac_t""no" 1>&6
12298 fi
12299
12300
12301 ########################################################
12302 # now see if we can find the gssapi libs in standard paths
12303 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12304 echo "configure:12305: checking for gss_display_status in -lgssapi_krb5" >&5
12305 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12306 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12307   echo $ac_n "(cached) $ac_c" 1>&6
12308 else
12309   ac_save_LIBS="$LIBS"
12310 LIBS="-lgssapi_krb5  $LIBS"
12311 cat > conftest.$ac_ext <<EOF
12312 #line 12313 "configure"
12313 #include "confdefs.h"
12314 /* Override any gcc2 internal prototype to avoid an error.  */
12315 /* We use char because int might match the return type of a gcc2
12316     builtin and then its argument prototype would still apply.  */
12317 char gss_display_status();
12318
12319 int main() {
12320 gss_display_status()
12321 ; return 0; }
12322 EOF
12323 if { (eval echo configure:12324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12324   rm -rf conftest*
12325   eval "ac_cv_lib_$ac_lib_var=yes"
12326 else
12327   echo "configure: failed program was:" >&5
12328   cat conftest.$ac_ext >&5
12329   rm -rf conftest*
12330   eval "ac_cv_lib_$ac_lib_var=no"
12331 fi
12332 rm -f conftest*
12333 LIBS="$ac_save_LIBS"
12334
12335 fi
12336 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12337   echo "$ac_t""yes" 1>&6
12338   LIBS="$LIBS -lgssapi_krb5";
12339         cat >> confdefs.h <<\EOF
12340 #define HAVE_GSSAPI 1
12341 EOF
12342
12343 else
12344   echo "$ac_t""no" 1>&6
12345 fi
12346
12347
12348 ##################################################################
12349 # we might need the lber lib on some systems. To avoid link errors
12350 # this test must be before the libldap test
12351 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12352 echo "configure:12353: checking for ber_scanf in -llber" >&5
12353 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12354 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12355   echo $ac_n "(cached) $ac_c" 1>&6
12356 else
12357   ac_save_LIBS="$LIBS"
12358 LIBS="-llber  $LIBS"
12359 cat > conftest.$ac_ext <<EOF
12360 #line 12361 "configure"
12361 #include "confdefs.h"
12362 /* Override any gcc2 internal prototype to avoid an error.  */
12363 /* We use char because int might match the return type of a gcc2
12364     builtin and then its argument prototype would still apply.  */
12365 char ber_scanf();
12366
12367 int main() {
12368 ber_scanf()
12369 ; return 0; }
12370 EOF
12371 if { (eval echo configure:12372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12372   rm -rf conftest*
12373   eval "ac_cv_lib_$ac_lib_var=yes"
12374 else
12375   echo "configure: failed program was:" >&5
12376   cat conftest.$ac_ext >&5
12377   rm -rf conftest*
12378   eval "ac_cv_lib_$ac_lib_var=no"
12379 fi
12380 rm -f conftest*
12381 LIBS="$ac_save_LIBS"
12382
12383 fi
12384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12385   echo "$ac_t""yes" 1>&6
12386   LIBS="$LIBS -llber"
12387 else
12388   echo "$ac_t""no" 1>&6
12389 fi
12390
12391
12392 ########################################################
12393 # now see if we can find the ldap libs in standard paths
12394 if test x$have_ldap != xyes; then
12395 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12396 echo "configure:12397: checking for ldap_domain2hostlist in -lldap" >&5
12397 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12398 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12399   echo $ac_n "(cached) $ac_c" 1>&6
12400 else
12401   ac_save_LIBS="$LIBS"
12402 LIBS="-lldap  $LIBS"
12403 cat > conftest.$ac_ext <<EOF
12404 #line 12405 "configure"
12405 #include "confdefs.h"
12406 /* Override any gcc2 internal prototype to avoid an error.  */
12407 /* We use char because int might match the return type of a gcc2
12408     builtin and then its argument prototype would still apply.  */
12409 char ldap_domain2hostlist();
12410
12411 int main() {
12412 ldap_domain2hostlist()
12413 ; return 0; }
12414 EOF
12415 if { (eval echo configure:12416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12416   rm -rf conftest*
12417   eval "ac_cv_lib_$ac_lib_var=yes"
12418 else
12419   echo "configure: failed program was:" >&5
12420   cat conftest.$ac_ext >&5
12421   rm -rf conftest*
12422   eval "ac_cv_lib_$ac_lib_var=no"
12423 fi
12424 rm -f conftest*
12425 LIBS="$ac_save_LIBS"
12426
12427 fi
12428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12429   echo "$ac_t""yes" 1>&6
12430   LIBS="$LIBS -lldap";
12431         cat >> confdefs.h <<\EOF
12432 #define HAVE_LDAP 1
12433 EOF
12434
12435 else
12436   echo "$ac_t""no" 1>&6
12437 fi
12438
12439
12440         ########################################################
12441         # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
12442         # Check found in pam_ldap 145.
12443         for ac_func in ldap_set_rebind_proc
12444 do
12445 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12446 echo "configure:12447: checking for $ac_func" >&5
12447 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12448   echo $ac_n "(cached) $ac_c" 1>&6
12449 else
12450   cat > conftest.$ac_ext <<EOF
12451 #line 12452 "configure"
12452 #include "confdefs.h"
12453 /* System header to define __stub macros and hopefully few prototypes,
12454     which can conflict with char $ac_func(); below.  */
12455 #include <assert.h>
12456 /* Override any gcc2 internal prototype to avoid an error.  */
12457 /* We use char because int might match the return type of a gcc2
12458     builtin and then its argument prototype would still apply.  */
12459 char $ac_func();
12460
12461 int main() {
12462
12463 /* The GNU C library defines this for functions which it implements
12464     to always fail with ENOSYS.  Some functions are actually named
12465     something starting with __ and the normal name is an alias.  */
12466 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12467 choke me
12468 #else
12469 $ac_func();
12470 #endif
12471
12472 ; return 0; }
12473 EOF
12474 if { (eval echo configure:12475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12475   rm -rf conftest*
12476   eval "ac_cv_func_$ac_func=yes"
12477 else
12478   echo "configure: failed program was:" >&5
12479   cat conftest.$ac_ext >&5
12480   rm -rf conftest*
12481   eval "ac_cv_func_$ac_func=no"
12482 fi
12483 rm -f conftest*
12484 fi
12485
12486 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12487   echo "$ac_t""yes" 1>&6
12488     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12489   cat >> confdefs.h <<EOF
12490 #define $ac_tr_func 1
12491 EOF
12492  
12493 else
12494   echo "$ac_t""no" 1>&6
12495 fi
12496 done
12497
12498         echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6
12499 echo "configure:12500: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
12500 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then
12501   echo $ac_n "(cached) $ac_c" 1>&6
12502 else
12503   
12504         cat > conftest.$ac_ext <<EOF
12505 #line 12506 "configure"
12506 #include "confdefs.h"
12507
12508         #include <lber.h>
12509         #include <ldap.h>
12510 int main() {
12511 ldap_set_rebind_proc(0, 0, 0);
12512 ; return 0; }
12513 EOF
12514 if { (eval echo configure:12515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12515   rm -rf conftest*
12516   pam_ldap_cv_ldap_set_rebind_proc=3
12517 else
12518   echo "configure: failed program was:" >&5
12519   cat conftest.$ac_ext >&5
12520   rm -rf conftest*
12521   pam_ldap_cv_ldap_set_rebind_proc=2
12522 fi
12523 rm -f conftest* 
12524 fi
12525
12526 echo "$ac_t""$pam_ldap_cv_ldap_set_rebind_proc" 1>&6
12527         cat >> confdefs.h <<EOF
12528 #define LDAP_SET_REBIND_PROC_ARGS $pam_ldap_cv_ldap_set_rebind_proc
12529 EOF
12530
12531 fi
12532
12533 #################################################
12534 # check for automount support
12535 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12536 echo "configure:12537: checking whether to use AUTOMOUNT" >&5
12537 # Check whether --with-automount or --without-automount was given.
12538 if test "${with_automount+set}" = set; then
12539   withval="$with_automount"
12540    case "$withval" in
12541   yes)
12542     echo "$ac_t""yes" 1>&6
12543     cat >> confdefs.h <<\EOF
12544 #define WITH_AUTOMOUNT 1
12545 EOF
12546
12547     ;;
12548   *)
12549     echo "$ac_t""no" 1>&6
12550     ;;
12551   esac 
12552 else
12553   echo "$ac_t""no" 1>&6
12554
12555 fi
12556
12557
12558 #################################################
12559 # check for smbmount support
12560 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12561 echo "configure:12562: checking whether to use SMBMOUNT" >&5
12562 # Check whether --with-smbmount or --without-smbmount was given.
12563 if test "${with_smbmount+set}" = set; then
12564   withval="$with_smbmount"
12565    case "$withval" in
12566   yes)
12567         case "$host_os" in
12568         *linux*)
12569                 echo "$ac_t""yes" 1>&6
12570                 cat >> confdefs.h <<\EOF
12571 #define WITH_SMBMOUNT 1
12572 EOF
12573
12574                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12575                 ;;
12576         *)
12577                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12578                 ;;
12579         esac
12580     ;;
12581   *)
12582     echo "$ac_t""no" 1>&6
12583     MPROGS=
12584     ;;
12585   esac 
12586 else
12587   echo "$ac_t""no" 1>&6
12588   MPROGS=
12589
12590 fi
12591
12592
12593
12594 #################################################
12595 # check for a PAM clear-text auth, accounts, password and session support
12596 with_pam_for_crypt=no
12597 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12598 echo "configure:12599: checking whether to use PAM" >&5
12599 # Check whether --with-pam or --without-pam was given.
12600 if test "${with_pam+set}" = set; then
12601   withval="$with_pam"
12602    case "$withval" in
12603   yes)
12604     echo "$ac_t""yes" 1>&6
12605     cat >> confdefs.h <<\EOF
12606 #define WITH_PAM 1
12607 EOF
12608
12609     LIBS="$LIBS -lpam"
12610     with_pam_for_crypt=yes
12611     ;;
12612   *)
12613     echo "$ac_t""no" 1>&6
12614     ;;
12615   esac 
12616 else
12617   echo "$ac_t""no" 1>&6
12618
12619 fi
12620
12621
12622 # we can't build a pam module if we don't have pam.
12623 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12624 echo "configure:12625: checking for pam_get_data in -lpam" >&5
12625 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12626 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12627   echo $ac_n "(cached) $ac_c" 1>&6
12628 else
12629   ac_save_LIBS="$LIBS"
12630 LIBS="-lpam  $LIBS"
12631 cat > conftest.$ac_ext <<EOF
12632 #line 12633 "configure"
12633 #include "confdefs.h"
12634 /* Override any gcc2 internal prototype to avoid an error.  */
12635 /* We use char because int might match the return type of a gcc2
12636     builtin and then its argument prototype would still apply.  */
12637 char pam_get_data();
12638
12639 int main() {
12640 pam_get_data()
12641 ; return 0; }
12642 EOF
12643 if { (eval echo configure:12644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12644   rm -rf conftest*
12645   eval "ac_cv_lib_$ac_lib_var=yes"
12646 else
12647   echo "configure: failed program was:" >&5
12648   cat conftest.$ac_ext >&5
12649   rm -rf conftest*
12650   eval "ac_cv_lib_$ac_lib_var=no"
12651 fi
12652 rm -f conftest*
12653 LIBS="$ac_save_LIBS"
12654
12655 fi
12656 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12657   echo "$ac_t""yes" 1>&6
12658   cat >> confdefs.h <<\EOF
12659 #define HAVE_LIBPAM 1
12660 EOF
12661
12662 else
12663   echo "$ac_t""no" 1>&6
12664 fi
12665
12666
12667 #################################################
12668 # check for pam_smbpass support
12669 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12670 echo "configure:12671: checking whether to use pam_smbpass" >&5
12671 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12672 if test "${with_pam_smbpass+set}" = set; then
12673   withval="$with_pam_smbpass"
12674    case "$withval" in
12675   yes)
12676     echo "$ac_t""yes" 1>&6
12677
12678 # Conditions under which pam_smbpass should not be built.
12679
12680        if test x$PICFLAG = x; then
12681           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12682           PAM_MOD=""
12683        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12684           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12685           PAM_MOD=""
12686        else
12687           PAM_MOD="bin/pam_smbpass.so"
12688        fi
12689     ;;
12690   *)
12691     echo "$ac_t""no" 1>&6
12692     ;;
12693   esac 
12694 else
12695   echo "$ac_t""no" 1>&6
12696
12697 fi
12698
12699
12700
12701 ###############################################
12702 # test for where we get crypt() from, but only
12703 # if not using PAM
12704 if test $with_pam_for_crypt = no; then
12705 for ac_func in crypt
12706 do
12707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12708 echo "configure:12709: checking for $ac_func" >&5
12709 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12710   echo $ac_n "(cached) $ac_c" 1>&6
12711 else
12712   cat > conftest.$ac_ext <<EOF
12713 #line 12714 "configure"
12714 #include "confdefs.h"
12715 /* System header to define __stub macros and hopefully few prototypes,
12716     which can conflict with char $ac_func(); below.  */
12717 #include <assert.h>
12718 /* Override any gcc2 internal prototype to avoid an error.  */
12719 /* We use char because int might match the return type of a gcc2
12720     builtin and then its argument prototype would still apply.  */
12721 char $ac_func();
12722
12723 int main() {
12724
12725 /* The GNU C library defines this for functions which it implements
12726     to always fail with ENOSYS.  Some functions are actually named
12727     something starting with __ and the normal name is an alias.  */
12728 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12729 choke me
12730 #else
12731 $ac_func();
12732 #endif
12733
12734 ; return 0; }
12735 EOF
12736 if { (eval echo configure:12737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12737   rm -rf conftest*
12738   eval "ac_cv_func_$ac_func=yes"
12739 else
12740   echo "configure: failed program was:" >&5
12741   cat conftest.$ac_ext >&5
12742   rm -rf conftest*
12743   eval "ac_cv_func_$ac_func=no"
12744 fi
12745 rm -f conftest*
12746 fi
12747
12748 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12749   echo "$ac_t""yes" 1>&6
12750     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12751   cat >> confdefs.h <<EOF
12752 #define $ac_tr_func 1
12753 EOF
12754  
12755 else
12756   echo "$ac_t""no" 1>&6
12757 fi
12758 done
12759
12760 if test x"$ac_cv_func_crypt" = x"no"; then
12761     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12762 echo "configure:12763: checking for crypt in -lcrypt" >&5
12763 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12764 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12765   echo $ac_n "(cached) $ac_c" 1>&6
12766 else
12767   ac_save_LIBS="$LIBS"
12768 LIBS="-lcrypt  $LIBS"
12769 cat > conftest.$ac_ext <<EOF
12770 #line 12771 "configure"
12771 #include "confdefs.h"
12772 /* Override any gcc2 internal prototype to avoid an error.  */
12773 /* We use char because int might match the return type of a gcc2
12774     builtin and then its argument prototype would still apply.  */
12775 char crypt();
12776
12777 int main() {
12778 crypt()
12779 ; return 0; }
12780 EOF
12781 if { (eval echo configure:12782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12782   rm -rf conftest*
12783   eval "ac_cv_lib_$ac_lib_var=yes"
12784 else
12785   echo "configure: failed program was:" >&5
12786   cat conftest.$ac_ext >&5
12787   rm -rf conftest*
12788   eval "ac_cv_lib_$ac_lib_var=no"
12789 fi
12790 rm -f conftest*
12791 LIBS="$ac_save_LIBS"
12792
12793 fi
12794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12795   echo "$ac_t""yes" 1>&6
12796   LIBS="$LIBS -lcrypt";
12797         cat >> confdefs.h <<\EOF
12798 #define HAVE_CRYPT 1
12799 EOF
12800
12801 else
12802   echo "$ac_t""no" 1>&6
12803 fi
12804
12805 fi
12806 fi
12807
12808 ##
12809 ## moved after the check for -lcrypt in order to
12810 ## ensure that the necessary libraries are included
12811 ## check checking for truncated salt.  Wrapped by the
12812 ## $with_pam_for_crypt variable as above   --jerry
12813 ##
12814 if test $with_pam_for_crypt = no; then
12815 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12816 echo "configure:12817: checking for a crypt that needs truncated salt" >&5
12817 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12818   echo $ac_n "(cached) $ac_c" 1>&6
12819 else
12820   
12821 if test "$cross_compiling" = yes; then
12822   samba_cv_HAVE_TRUNCATED_SALT=cross
12823 else
12824   cat > conftest.$ac_ext <<EOF
12825 #line 12826 "configure"
12826 #include "confdefs.h"
12827 #include "${srcdir-.}/tests/crypttest.c"
12828 EOF
12829 if { (eval echo configure:12830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12830 then
12831   samba_cv_HAVE_TRUNCATED_SALT=no
12832 else
12833   echo "configure: failed program was:" >&5
12834   cat conftest.$ac_ext >&5
12835   rm -fr conftest*
12836   samba_cv_HAVE_TRUNCATED_SALT=yes
12837 fi
12838 rm -fr conftest*
12839 fi
12840
12841 fi
12842
12843 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12844 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12845         cat >> confdefs.h <<\EOF
12846 #define HAVE_TRUNCATED_SALT 1
12847 EOF
12848
12849 fi
12850 fi
12851
12852 # New experimental SAM system
12853
12854 echo $ac_n "checking whether to build the new (experimental) SAM database""... $ac_c" 1>&6
12855 echo "configure:12856: checking whether to build the new (experimental) SAM database" >&5
12856 # Check whether --with-sam or --without-sam was given.
12857 if test "${with_sam+set}" = set; then
12858   withval="$with_sam"
12859    case "$withval" in
12860   yes)
12861     echo "$ac_t""yes" 1>&6
12862     cat >> confdefs.h <<\EOF
12863 #define WITH_SAM 1
12864 EOF
12865
12866     ;;
12867   *)
12868     echo "$ac_t""no" 1>&6
12869     ;;
12870   esac 
12871 else
12872   echo "$ac_t""no" 1>&6
12873
12874 fi
12875
12876
12877
12878 ########################################################################################
12879 ##
12880 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12881 ##
12882 ########################################################################################
12883
12884 #################################################
12885 # check for a TDB password database
12886 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12887 echo "configure:12888: checking whether to use TDB SAM database" >&5
12888 # Check whether --with-tdbsam or --without-tdbsam was given.
12889 if test "${with_tdbsam+set}" = set; then
12890   withval="$with_tdbsam"
12891    case "$withval" in
12892   yes)
12893     echo "$ac_t""yes" 1>&6
12894     cat >> confdefs.h <<\EOF
12895 #define WITH_TDB_SAM 1
12896 EOF
12897
12898     ;;
12899   *)
12900     echo "$ac_t""no" 1>&6
12901     ;;
12902   esac 
12903 else
12904   echo "$ac_t""no" 1>&6
12905
12906 fi
12907
12908
12909 #################################################
12910 # check for a NISPLUS password database
12911 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12912 echo "configure:12913: checking whether to use NISPLUS SAM database" >&5
12913 # Check whether --with-nisplussam or --without-nisplussam was given.
12914 if test "${with_nisplussam+set}" = set; then
12915   withval="$with_nisplussam"
12916    case "$withval" in
12917   yes)
12918     echo "$ac_t""yes" 1>&6
12919     cat >> confdefs.h <<\EOF
12920 #define WITH_NISPLUS_SAM 1
12921 EOF
12922
12923     ;;
12924   *)
12925     echo "$ac_t""no" 1>&6
12926     ;;
12927   esac 
12928 else
12929   echo "$ac_t""no" 1>&6
12930
12931 fi
12932
12933
12934 ########################################################################################
12935 ##
12936 ## END OF TESTS FOR SAM BACKENDS.  
12937 ##
12938 ########################################################################################
12939
12940 #################################################
12941 # check for a NISPLUS_HOME support 
12942 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12943 echo "configure:12944: checking whether to use NISPLUS_HOME" >&5
12944 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12945 if test "${with_nisplus_home+set}" = set; then
12946   withval="$with_nisplus_home"
12947    case "$withval" in
12948   yes)
12949     echo "$ac_t""yes" 1>&6
12950     cat >> confdefs.h <<\EOF
12951 #define WITH_NISPLUS_HOME 1
12952 EOF
12953
12954     ;;
12955   *)
12956     echo "$ac_t""no" 1>&6
12957     ;;
12958   esac 
12959 else
12960   echo "$ac_t""no" 1>&6
12961
12962 fi
12963
12964
12965 #################################################
12966 # check for syslog logging
12967 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12968 echo "configure:12969: checking whether to use syslog logging" >&5
12969 # Check whether --with-syslog or --without-syslog was given.
12970 if test "${with_syslog+set}" = set; then
12971   withval="$with_syslog"
12972    case "$withval" in
12973   yes)
12974     echo "$ac_t""yes" 1>&6
12975     cat >> confdefs.h <<\EOF
12976 #define WITH_SYSLOG 1
12977 EOF
12978
12979     ;;
12980   *)
12981     echo "$ac_t""no" 1>&6
12982     ;;
12983   esac 
12984 else
12985   echo "$ac_t""no" 1>&6
12986
12987 fi
12988
12989
12990 #################################################
12991 # check for a shared memory profiling support
12992 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12993 echo "configure:12994: checking whether to use profiling" >&5
12994 # Check whether --with-profiling-data or --without-profiling-data was given.
12995 if test "${with_profiling_data+set}" = set; then
12996   withval="$with_profiling_data"
12997    case "$withval" in
12998   yes)
12999     echo "$ac_t""yes" 1>&6
13000     cat >> confdefs.h <<\EOF
13001 #define WITH_PROFILE 1
13002 EOF
13003
13004     ;;
13005   *)
13006     echo "$ac_t""no" 1>&6
13007     ;;
13008   esac 
13009 else
13010   echo "$ac_t""no" 1>&6
13011
13012 fi
13013
13014
13015
13016 #################################################
13017 # check for experimental disk-quotas support
13018 QUOTAOBJS=smbd/noquotas.o
13019
13020 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
13021 echo "configure:13022: checking whether to support disk-quotas" >&5
13022 # Check whether --with-quotas or --without-quotas was given.
13023 if test "${with_quotas+set}" = set; then
13024   withval="$with_quotas"
13025    case "$withval" in
13026   yes)
13027     echo "$ac_t""yes" 1>&6
13028     case "$host_os" in
13029       *linux*)
13030         # Check for kernel 2.4.x quota braindamage...
13031         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
13032 echo "configure:13033: checking for linux 2.4.x quota braindamage.." >&5
13033 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
13034   echo $ac_n "(cached) $ac_c" 1>&6
13035 else
13036   
13037         cat > conftest.$ac_ext <<EOF
13038 #line 13039 "configure"
13039 #include "confdefs.h"
13040 #include <stdio.h>
13041 #include <sys/types.h>
13042 #include <asm/types.h>
13043 #include <linux/quota.h>
13044 #include <mntent.h>
13045 #include <linux/unistd.h>
13046 int main() {
13047 struct mem_dqblk D;
13048 ; return 0; }
13049 EOF
13050 if { (eval echo configure:13051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13051   rm -rf conftest*
13052   samba_cv_linux_2_4_quota_braindamage=yes
13053 else
13054   echo "configure: failed program was:" >&5
13055   cat conftest.$ac_ext >&5
13056   rm -rf conftest*
13057   samba_cv_linux_2_4_quota_braindamage=no
13058 fi
13059 rm -f conftest*
13060 fi
13061
13062 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
13063 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
13064         cat >> confdefs.h <<\EOF
13065 #define LINUX_QUOTAS_2 1
13066 EOF
13067
13068 else
13069         cat >> confdefs.h <<\EOF
13070 #define LINUX_QUOTAS_1 1
13071 EOF
13072
13073 fi
13074         ;;
13075       *)
13076         ;;
13077     esac
13078     QUOTAOBJS=smbd/quotas.o
13079     cat >> confdefs.h <<\EOF
13080 #define WITH_QUOTAS 1
13081 EOF
13082
13083     ;;
13084   *)
13085     echo "$ac_t""no" 1>&6
13086     ;;
13087   esac 
13088 else
13089   echo "$ac_t""no" 1>&6
13090
13091 fi
13092
13093
13094
13095 #################################################
13096 # check for experimental utmp accounting
13097
13098 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
13099 echo "configure:13100: checking whether to support utmp accounting" >&5
13100 # Check whether --with-utmp or --without-utmp was given.
13101 if test "${with_utmp+set}" = set; then
13102   withval="$with_utmp"
13103    case "$withval" in
13104   yes)
13105     echo "$ac_t""yes" 1>&6
13106     cat >> confdefs.h <<\EOF
13107 #define WITH_UTMP 1
13108 EOF
13109
13110     ;;
13111   *)
13112     echo "$ac_t""no" 1>&6
13113     ;;
13114   esac 
13115 else
13116   echo "$ac_t""no" 1>&6
13117
13118 fi
13119
13120
13121 #################################################
13122 # choose native language(s) of man pages
13123 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13124 echo "configure:13125: checking chosen man pages' language(s)" >&5
13125 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13126 if test "${with_manpages_langs+set}" = set; then
13127   withval="$with_manpages_langs"
13128    case "$withval" in
13129   yes|no)
13130     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13131     manlangs="en"
13132   ;;
13133   *)
13134     manlangs="$withval"
13135   ;;
13136   esac
13137
13138   echo "$ac_t""$manlangs" 1>&6
13139   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
13140   
13141 else
13142   manlangs="en"
13143   echo "$ac_t""$manlangs" 1>&6
13144   
13145
13146 fi
13147
13148
13149 #################################################
13150 # should we build libsmbclient?
13151
13152 LIBSMBCLIENT_SHARED=
13153 LIBSMBCLIENT=
13154 echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
13155 echo "configure:13156: checking whether to build the libsmbclient shared library" >&5
13156 # Check whether --with-libsmbclient or --without-libsmbclient was given.
13157 if test "${with_libsmbclient+set}" = set; then
13158   withval="$with_libsmbclient"
13159    case "$withval" in
13160   no) 
13161      echo "$ac_t""no" 1>&6
13162      ;;
13163   *)
13164      if test $BLDSHARED = true; then
13165         LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
13166         LIBSMBCLIENT=libsmbclient
13167         echo "$ac_t""yes" 1>&6
13168      else
13169         echo "$ac_t""no shared library support" 1>&6
13170      fi
13171      ;;
13172   esac 
13173 else
13174   echo "$ac_t""yes" 1>&6
13175
13176 fi
13177
13178
13179
13180 #################################################
13181 # these tests are taken from the GNU fileutils package
13182 echo "checking how to get filesystem space usage" 1>&6
13183 echo "configure:13184: checking how to get filesystem space usage" >&5
13184 space=no
13185
13186 # Test for statvfs64.
13187 if test $space = no; then
13188   # SVR4
13189   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13190 echo "configure:13191: checking statvfs64 function (SVR4)" >&5
13191 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13192   echo $ac_n "(cached) $ac_c" 1>&6
13193 else
13194   if test "$cross_compiling" = yes; then
13195   fu_cv_sys_stat_statvfs64=cross
13196 else
13197   cat > conftest.$ac_ext <<EOF
13198 #line 13199 "configure"
13199 #include "confdefs.h"
13200
13201 #if defined(HAVE_UNISTD_H)
13202 #include <unistd.h>
13203 #endif
13204 #include <sys/types.h>
13205 #include <sys/statvfs.h>
13206   main ()
13207   {
13208     struct statvfs64 fsd;
13209     exit (statvfs64 (".", &fsd));
13210   }
13211 EOF
13212 if { (eval echo configure:13213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13213 then
13214   fu_cv_sys_stat_statvfs64=yes
13215 else
13216   echo "configure: failed program was:" >&5
13217   cat conftest.$ac_ext >&5
13218   rm -fr conftest*
13219   fu_cv_sys_stat_statvfs64=no
13220 fi
13221 rm -fr conftest*
13222 fi
13223
13224 fi
13225
13226 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13227   if test $fu_cv_sys_stat_statvfs64 = yes; then
13228     space=yes
13229     cat >> confdefs.h <<\EOF
13230 #define STAT_STATVFS64 1
13231 EOF
13232
13233   fi
13234 fi
13235
13236 # Perform only the link test since it seems there are no variants of the
13237 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13238 # because that got a false positive on SCO OSR5.  Adding the declaration
13239 # of a `struct statvfs' causes this test to fail (as it should) on such
13240 # systems.  That system is reported to work fine with STAT_STATFS4 which
13241 # is what it gets when this test fails.
13242 if test $space = no; then
13243   # SVR4
13244   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13245 echo "configure:13246: checking statvfs function (SVR4)" >&5
13246 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13247   echo $ac_n "(cached) $ac_c" 1>&6
13248 else
13249   cat > conftest.$ac_ext <<EOF
13250 #line 13251 "configure"
13251 #include "confdefs.h"
13252 #include <sys/types.h>
13253 #include <sys/statvfs.h>
13254 int main() {
13255 struct statvfs fsd; statvfs (0, &fsd);
13256 ; return 0; }
13257 EOF
13258 if { (eval echo configure:13259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13259   rm -rf conftest*
13260   fu_cv_sys_stat_statvfs=yes
13261 else
13262   echo "configure: failed program was:" >&5
13263   cat conftest.$ac_ext >&5
13264   rm -rf conftest*
13265   fu_cv_sys_stat_statvfs=no
13266 fi
13267 rm -f conftest*
13268 fi
13269
13270 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13271   if test $fu_cv_sys_stat_statvfs = yes; then
13272     space=yes
13273     cat >> confdefs.h <<\EOF
13274 #define STAT_STATVFS 1
13275 EOF
13276
13277   fi
13278 fi
13279
13280 if test $space = no; then
13281   # DEC Alpha running OSF/1
13282   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13283 echo "configure:13284: checking for 3-argument statfs function (DEC OSF/1)" >&5
13284   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13285   echo $ac_n "(cached) $ac_c" 1>&6
13286 else
13287   if test "$cross_compiling" = yes; then
13288   fu_cv_sys_stat_statfs3_osf1=no
13289 else
13290   cat > conftest.$ac_ext <<EOF
13291 #line 13292 "configure"
13292 #include "confdefs.h"
13293
13294 #include <sys/param.h>
13295 #include <sys/types.h>
13296 #include <sys/mount.h>
13297   main ()
13298   {
13299     struct statfs fsd;
13300     fsd.f_fsize = 0;
13301     exit (statfs (".", &fsd, sizeof (struct statfs)));
13302   }
13303 EOF
13304 if { (eval echo configure:13305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13305 then
13306   fu_cv_sys_stat_statfs3_osf1=yes
13307 else
13308   echo "configure: failed program was:" >&5
13309   cat conftest.$ac_ext >&5
13310   rm -fr conftest*
13311   fu_cv_sys_stat_statfs3_osf1=no
13312 fi
13313 rm -fr conftest*
13314 fi
13315
13316 fi
13317
13318   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13319   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13320     space=yes
13321     cat >> confdefs.h <<\EOF
13322 #define STAT_STATFS3_OSF1 1
13323 EOF
13324
13325   fi
13326 fi
13327
13328 if test $space = no; then
13329 # AIX
13330   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13331 echo "configure:13332: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13332   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13333   echo $ac_n "(cached) $ac_c" 1>&6
13334 else
13335   if test "$cross_compiling" = yes; then
13336   fu_cv_sys_stat_statfs2_bsize=no
13337 else
13338   cat > conftest.$ac_ext <<EOF
13339 #line 13340 "configure"
13340 #include "confdefs.h"
13341
13342 #ifdef HAVE_SYS_PARAM_H
13343 #include <sys/param.h>
13344 #endif
13345 #ifdef HAVE_SYS_MOUNT_H
13346 #include <sys/mount.h>
13347 #endif
13348 #ifdef HAVE_SYS_VFS_H
13349 #include <sys/vfs.h>
13350 #endif
13351   main ()
13352   {
13353   struct statfs fsd;
13354   fsd.f_bsize = 0;
13355   exit (statfs (".", &fsd));
13356   }
13357 EOF
13358 if { (eval echo configure:13359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13359 then
13360   fu_cv_sys_stat_statfs2_bsize=yes
13361 else
13362   echo "configure: failed program was:" >&5
13363   cat conftest.$ac_ext >&5
13364   rm -fr conftest*
13365   fu_cv_sys_stat_statfs2_bsize=no
13366 fi
13367 rm -fr conftest*
13368 fi
13369
13370 fi
13371
13372   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13373   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13374     space=yes
13375     cat >> confdefs.h <<\EOF
13376 #define STAT_STATFS2_BSIZE 1
13377 EOF
13378
13379   fi
13380 fi
13381
13382 if test $space = no; then
13383 # SVR3
13384   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13385 echo "configure:13386: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13386   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13387   echo $ac_n "(cached) $ac_c" 1>&6
13388 else
13389   if test "$cross_compiling" = yes; then
13390   fu_cv_sys_stat_statfs4=no
13391 else
13392   cat > conftest.$ac_ext <<EOF
13393 #line 13394 "configure"
13394 #include "confdefs.h"
13395 #include <sys/types.h>
13396 #include <sys/statfs.h>
13397   main ()
13398   {
13399   struct statfs fsd;
13400   exit (statfs (".", &fsd, sizeof fsd, 0));
13401   }
13402 EOF
13403 if { (eval echo configure:13404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13404 then
13405   fu_cv_sys_stat_statfs4=yes
13406 else
13407   echo "configure: failed program was:" >&5
13408   cat conftest.$ac_ext >&5
13409   rm -fr conftest*
13410   fu_cv_sys_stat_statfs4=no
13411 fi
13412 rm -fr conftest*
13413 fi
13414
13415 fi
13416
13417   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13418   if test $fu_cv_sys_stat_statfs4 = yes; then
13419     space=yes
13420     cat >> confdefs.h <<\EOF
13421 #define STAT_STATFS4 1
13422 EOF
13423
13424   fi
13425 fi
13426
13427 if test $space = no; then
13428 # 4.4BSD and NetBSD
13429   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13430 echo "configure:13431: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13431   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13432   echo $ac_n "(cached) $ac_c" 1>&6
13433 else
13434   if test "$cross_compiling" = yes; then
13435   fu_cv_sys_stat_statfs2_fsize=no
13436 else
13437   cat > conftest.$ac_ext <<EOF
13438 #line 13439 "configure"
13439 #include "confdefs.h"
13440 #include <sys/types.h>
13441 #ifdef HAVE_SYS_PARAM_H
13442 #include <sys/param.h>
13443 #endif
13444 #ifdef HAVE_SYS_MOUNT_H
13445 #include <sys/mount.h>
13446 #endif
13447   main ()
13448   {
13449   struct statfs fsd;
13450   fsd.f_fsize = 0;
13451   exit (statfs (".", &fsd));
13452   }
13453 EOF
13454 if { (eval echo configure:13455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13455 then
13456   fu_cv_sys_stat_statfs2_fsize=yes
13457 else
13458   echo "configure: failed program was:" >&5
13459   cat conftest.$ac_ext >&5
13460   rm -fr conftest*
13461   fu_cv_sys_stat_statfs2_fsize=no
13462 fi
13463 rm -fr conftest*
13464 fi
13465
13466 fi
13467
13468   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13469   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13470     space=yes
13471     cat >> confdefs.h <<\EOF
13472 #define STAT_STATFS2_FSIZE 1
13473 EOF
13474
13475   fi
13476 fi
13477
13478 if test $space = no; then
13479   # Ultrix
13480   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13481 echo "configure:13482: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13482   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13483   echo $ac_n "(cached) $ac_c" 1>&6
13484 else
13485   if test "$cross_compiling" = yes; then
13486   fu_cv_sys_stat_fs_data=no
13487 else
13488   cat > conftest.$ac_ext <<EOF
13489 #line 13490 "configure"
13490 #include "confdefs.h"
13491 #include <sys/types.h>
13492 #ifdef HAVE_SYS_PARAM_H
13493 #include <sys/param.h>
13494 #endif
13495 #ifdef HAVE_SYS_MOUNT_H
13496 #include <sys/mount.h>
13497 #endif
13498 #ifdef HAVE_SYS_FS_TYPES_H
13499 #include <sys/fs_types.h>
13500 #endif
13501   main ()
13502   {
13503   struct fs_data fsd;
13504   /* Ultrix's statfs returns 1 for success,
13505      0 for not mounted, -1 for failure.  */
13506   exit (statfs (".", &fsd) != 1);
13507   }
13508 EOF
13509 if { (eval echo configure:13510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13510 then
13511   fu_cv_sys_stat_fs_data=yes
13512 else
13513   echo "configure: failed program was:" >&5
13514   cat conftest.$ac_ext >&5
13515   rm -fr conftest*
13516   fu_cv_sys_stat_fs_data=no
13517 fi
13518 rm -fr conftest*
13519 fi
13520
13521 fi
13522
13523   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13524   if test $fu_cv_sys_stat_fs_data = yes; then
13525     space=yes
13526     cat >> confdefs.h <<\EOF
13527 #define STAT_STATFS2_FS_DATA 1
13528 EOF
13529
13530   fi
13531 fi
13532
13533 #
13534 # As a gating factor for large file support, in order to
13535 # use <4GB files we must have the following minimal support
13536 # available.
13537 # long long, and a 64 bit off_t or off64_t.
13538 # If we don't have all of these then disable large
13539 # file support.
13540 #
13541 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13542 echo "configure:13543: checking if large file support can be enabled" >&5
13543 cat > conftest.$ac_ext <<EOF
13544 #line 13545 "configure"
13545 #include "confdefs.h"
13546
13547 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13548 #include <sys/types.h>
13549 #else
13550 __COMPILE_ERROR_
13551 #endif
13552
13553 int main() {
13554 int i
13555 ; return 0; }
13556 EOF
13557 if { (eval echo configure:13558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13558   rm -rf conftest*
13559   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13560 else
13561   echo "configure: failed program was:" >&5
13562   cat conftest.$ac_ext >&5
13563   rm -rf conftest*
13564   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13565 fi
13566 rm -f conftest*
13567 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13568     cat >> confdefs.h <<\EOF
13569 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13570 EOF
13571
13572 fi
13573 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13574
13575 # Check whether --with-spinlocks or --without-spinlocks was given.
13576 if test "${with_spinlocks+set}" = set; then
13577   withval="$with_spinlocks"
13578   :
13579 fi
13580
13581 if test "x$with_spinlocks" = "xyes"; then
13582     cat >> confdefs.h <<\EOF
13583 #define USE_SPINLOCKS 1
13584 EOF
13585
13586
13587     case "$host_cpu" in
13588         sparc)
13589             cat >> confdefs.h <<\EOF
13590 #define SPARC_SPINLOCKS 1
13591 EOF
13592
13593             ;;
13594
13595         i386|i486|i586|i686)
13596             cat >> confdefs.h <<\EOF
13597 #define INTEL_SPINLOCKS 1
13598 EOF
13599
13600             ;;
13601
13602         mips)
13603             cat >> confdefs.h <<\EOF
13604 #define MIPS_SPINLOCKS 1
13605 EOF
13606
13607             ;;
13608
13609         powerpc)
13610             cat >> confdefs.h <<\EOF
13611 #define POWERPC_SPINLOCKS 1
13612 EOF
13613
13614             ;;
13615     esac
13616 fi
13617
13618 #################################################
13619 # check for ACL support
13620
13621 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13622 echo "configure:13623: checking whether to support ACLs" >&5
13623 # Check whether --with-acl-support or --without-acl-support was given.
13624 if test "${with_acl_support+set}" = set; then
13625   withval="$with_acl_support"
13626    case "$withval" in
13627   yes)
13628
13629         case "$host_os" in
13630         *sysv5*)
13631                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13632                 cat >> confdefs.h <<\EOF
13633 #define HAVE_UNIXWARE_ACLS 1
13634 EOF
13635
13636                 ;;
13637         *solaris*)
13638                 echo "$ac_t""Using solaris ACLs" 1>&6
13639                 cat >> confdefs.h <<\EOF
13640 #define HAVE_SOLARIS_ACLS 1
13641 EOF
13642
13643                 ;;
13644         *hpux*)
13645                 echo "$ac_t""Using HPUX ACLs" 1>&6
13646                 cat >> confdefs.h <<\EOF
13647 #define HAVE_HPUX_ACLS 1
13648 EOF
13649
13650                 ;;
13651         *irix*)
13652                 echo "$ac_t""Using IRIX ACLs" 1>&6
13653                 cat >> confdefs.h <<\EOF
13654 #define HAVE_IRIX_ACLS 1
13655 EOF
13656
13657                 ;;
13658         *aix*)
13659                 echo "$ac_t""Using AIX ACLs" 1>&6
13660                 cat >> confdefs.h <<\EOF
13661 #define HAVE_AIX_ACLS 1
13662 EOF
13663
13664                 ;;
13665         *osf*)
13666                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13667                 cat >> confdefs.h <<\EOF
13668 #define HAVE_TRU64_ACLS 1
13669 EOF
13670
13671                 LIBS="$LIBS -lpacl"
13672                 ;;
13673         *)
13674                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13675 echo "configure:13676: checking for acl_get_file in -lacl" >&5
13676 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13677 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13678   echo $ac_n "(cached) $ac_c" 1>&6
13679 else
13680   ac_save_LIBS="$LIBS"
13681 LIBS="-lacl  $LIBS"
13682 cat > conftest.$ac_ext <<EOF
13683 #line 13684 "configure"
13684 #include "confdefs.h"
13685 /* Override any gcc2 internal prototype to avoid an error.  */
13686 /* We use char because int might match the return type of a gcc2
13687     builtin and then its argument prototype would still apply.  */
13688 char acl_get_file();
13689
13690 int main() {
13691 acl_get_file()
13692 ; return 0; }
13693 EOF
13694 if { (eval echo configure:13695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13695   rm -rf conftest*
13696   eval "ac_cv_lib_$ac_lib_var=yes"
13697 else
13698   echo "configure: failed program was:" >&5
13699   cat conftest.$ac_ext >&5
13700   rm -rf conftest*
13701   eval "ac_cv_lib_$ac_lib_var=no"
13702 fi
13703 rm -f conftest*
13704 LIBS="$ac_save_LIBS"
13705
13706 fi
13707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13708   echo "$ac_t""yes" 1>&6
13709     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13710     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13711   cat >> confdefs.h <<EOF
13712 #define $ac_tr_lib 1
13713 EOF
13714
13715   LIBS="-lacl $LIBS"
13716
13717 else
13718   echo "$ac_t""no" 1>&6
13719 fi
13720
13721                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13722 echo "configure:13723: checking for ACL support" >&5
13723 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13724   echo $ac_n "(cached) $ac_c" 1>&6
13725 else
13726   
13727                 cat > conftest.$ac_ext <<EOF
13728 #line 13729 "configure"
13729 #include "confdefs.h"
13730 #include <sys/types.h>
13731 #include <sys/acl.h>
13732 int main() {
13733  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13734 ; return 0; }
13735 EOF
13736 if { (eval echo configure:13737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13737   rm -rf conftest*
13738   samba_cv_HAVE_POSIX_ACLS=yes
13739 else
13740   echo "configure: failed program was:" >&5
13741   cat conftest.$ac_ext >&5
13742   rm -rf conftest*
13743   samba_cv_HAVE_POSIX_ACLS=no
13744 fi
13745 rm -f conftest*
13746 fi
13747
13748 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13749                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13750                                 echo "$ac_t""Using posix ACLs" 1>&6
13751                                 cat >> confdefs.h <<\EOF
13752 #define HAVE_POSIX_ACLS 1
13753 EOF
13754
13755                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13756 echo "configure:13757: checking for acl_get_perm_np" >&5
13757 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13758   echo $ac_n "(cached) $ac_c" 1>&6
13759 else
13760   
13761                                 cat > conftest.$ac_ext <<EOF
13762 #line 13763 "configure"
13763 #include "confdefs.h"
13764 #include <sys/types.h>
13765 #include <sys/acl.h>
13766 int main() {
13767  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13768 ; return 0; }
13769 EOF
13770 if { (eval echo configure:13771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13771   rm -rf conftest*
13772   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13773 else
13774   echo "configure: failed program was:" >&5
13775   cat conftest.$ac_ext >&5
13776   rm -rf conftest*
13777   samba_cv_HAVE_ACL_GET_PERM_NP=no
13778 fi
13779 rm -f conftest*
13780 fi
13781
13782 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13783                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13784                                         cat >> confdefs.h <<\EOF
13785 #define HAVE_ACL_GET_PERM_NP 1
13786 EOF
13787
13788                                 fi
13789                         fi
13790             ;;
13791         esac
13792         ;;
13793   *)
13794     echo "$ac_t""no" 1>&6
13795     cat >> confdefs.h <<\EOF
13796 #define HAVE_NO_ACLS 1
13797 EOF
13798
13799     ;;
13800   esac 
13801 else
13802   cat >> confdefs.h <<\EOF
13803 #define HAVE_NO_ACLS 1
13804 EOF
13805
13806   echo "$ac_t""no" 1>&6
13807
13808 fi
13809
13810
13811 #################################################
13812 # check for sendfile support
13813
13814 echo $ac_n "checking whether to support sendfile""... $ac_c" 1>&6
13815 echo "configure:13816: checking whether to support sendfile" >&5
13816 # Check whether --with-sendfile-support or --without-sendfile-support was given.
13817 if test "${with_sendfile_support+set}" = set; then
13818   withval="$with_sendfile_support"
13819    case "$withval" in
13820   yes)
13821
13822         case "$host_os" in
13823         *linux*)
13824                 echo $ac_n "checking for linux sendfile64 support""... $ac_c" 1>&6
13825 echo "configure:13826: checking for linux sendfile64 support" >&5
13826 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then
13827   echo $ac_n "(cached) $ac_c" 1>&6
13828 else
13829   
13830                 cat > conftest.$ac_ext <<EOF
13831 #line 13832 "configure"
13832 #include "confdefs.h"
13833 #include <sys/sendfile.h>
13834 int main() {
13835 \
13836 int tofd, fromfd;
13837 off64_t offset;
13838 size_t total;
13839 ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total);
13840
13841 ; return 0; }
13842 EOF
13843 if { (eval echo configure:13844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13844   rm -rf conftest*
13845   samba_cv_HAVE_SENDFILE64=yes
13846 else
13847   echo "configure: failed program was:" >&5
13848   cat conftest.$ac_ext >&5
13849   rm -rf conftest*
13850   samba_cv_HAVE_SENDFILE64=no
13851 fi
13852 rm -f conftest*
13853 fi
13854
13855 echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6
13856
13857                 echo $ac_n "checking for linux sendfile support""... $ac_c" 1>&6
13858 echo "configure:13859: checking for linux sendfile support" >&5
13859 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
13860   echo $ac_n "(cached) $ac_c" 1>&6
13861 else
13862   
13863                 cat > conftest.$ac_ext <<EOF
13864 #line 13865 "configure"
13865 #include "confdefs.h"
13866 #include <sys/sendfile.h>
13867 int main() {
13868 \
13869 int tofd, fromfd;
13870 off_t offset;
13871 size_t total;
13872 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
13873
13874 ; return 0; }
13875 EOF
13876 if { (eval echo configure:13877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13877   rm -rf conftest*
13878   samba_cv_HAVE_SENDFILE=yes
13879 else
13880   echo "configure: failed program was:" >&5
13881   cat conftest.$ac_ext >&5
13882   rm -rf conftest*
13883   samba_cv_HAVE_SENDFILE=no
13884 fi
13885 rm -f conftest*
13886 fi
13887
13888 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
13889
13890 # Try and cope with broken Linux sendfile....
13891                 echo $ac_n "checking for broken linux sendfile support""... $ac_c" 1>&6
13892 echo "configure:13893: checking for broken linux sendfile support" >&5
13893 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_LINUX_SENDFILE'+set}'`\" = set"; then
13894   echo $ac_n "(cached) $ac_c" 1>&6
13895 else
13896   
13897                 cat > conftest.$ac_ext <<EOF
13898 #line 13899 "configure"
13899 #include "confdefs.h"
13900 \
13901 #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
13902 #undef _FILE_OFFSET_BITS
13903 #endif
13904 #include <sys/sendfile.h>
13905 int main() {
13906 \
13907 int tofd, fromfd;
13908 off_t offset;
13909 size_t total;
13910 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
13911
13912 ; return 0; }
13913 EOF
13914 if { (eval echo configure:13915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13915   rm -rf conftest*
13916   samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes
13917 else
13918   echo "configure: failed program was:" >&5
13919   cat conftest.$ac_ext >&5
13920   rm -rf conftest*
13921   samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no
13922 fi
13923 rm -f conftest*
13924 fi
13925
13926 echo "$ac_t""$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" 1>&6
13927
13928         if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then
13929                 cat >> confdefs.h <<\EOF
13930 #define HAVE_SENDFILE64 1
13931 EOF
13932
13933                 cat >> confdefs.h <<\EOF
13934 #define LINUX_SENDFILE_API 1
13935 EOF
13936
13937                 cat >> confdefs.h <<\EOF
13938 #define WITH_SENDFILE 1
13939 EOF
13940
13941         elif test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
13942                 cat >> confdefs.h <<\EOF
13943 #define HAVE_SENDFILE 1
13944 EOF
13945
13946                 cat >> confdefs.h <<\EOF
13947 #define LINUX_SENDFILE_API 1
13948 EOF
13949
13950                 cat >> confdefs.h <<\EOF
13951 #define WITH_SENDFILE 1
13952 EOF
13953
13954         elif test x"$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" = x"yes"; then
13955                 cat >> confdefs.h <<\EOF
13956 #define LINUX_BROKEN_SENDFILE_API 1
13957 EOF
13958
13959                 cat >> confdefs.h <<\EOF
13960 #define WITH_SENDFILE 1
13961 EOF
13962
13963         else
13964                 echo "$ac_t""no" 1>&6;
13965         fi
13966
13967         ;;
13968         *freebsd*)
13969                 echo $ac_n "checking for freebsd sendfile support""... $ac_c" 1>&6
13970 echo "configure:13971: checking for freebsd sendfile support" >&5
13971 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
13972   echo $ac_n "(cached) $ac_c" 1>&6
13973 else
13974   
13975                 cat > conftest.$ac_ext <<EOF
13976 #line 13977 "configure"
13977 #include "confdefs.h"
13978 \
13979 #include <sys/types.h>
13980 #include <sys/socket.h>
13981 #include <sys/uio.h>
13982 int main() {
13983 \
13984         int fromfd, tofd;
13985         off_t offset, nwritten;
13986         struct sf_hdtr hdr;
13987         struct iovec hdtrl;
13988         hdr->headers = &hdtrl;
13989         hdr->hdr_cnt = 1;
13990         hdr->trailers = NULL;
13991         hdr->trl_cnt = 0;
13992         hdtrl.iov_base = NULL;
13993         hdtrl.iov_len = 0;
13994         int ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
13995
13996 ; return 0; }
13997 EOF
13998 if { (eval echo configure:13999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13999   rm -rf conftest*
14000   samba_cv_HAVE_SENDFILE=yes
14001 else
14002   echo "configure: failed program was:" >&5
14003   cat conftest.$ac_ext >&5
14004   rm -rf conftest*
14005   samba_cv_HAVE_SENDFILE=no
14006 fi
14007 rm -f conftest*
14008 fi
14009
14010 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
14011
14012         if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
14013                 cat >> confdefs.h <<\EOF
14014 #define HAVE_SENDFILE 1
14015 EOF
14016
14017                 cat >> confdefs.h <<\EOF
14018 #define FREEBSD_SENDFILE_API 1
14019 EOF
14020
14021                 cat >> confdefs.h <<\EOF
14022 #define WITH_SENDFILE 1
14023 EOF
14024
14025         else
14026                 echo "$ac_t""no" 1>&6;
14027         fi
14028         ;;
14029         *)
14030         ;;
14031         esac
14032         ;;
14033   *)
14034     echo "$ac_t""no" 1>&6
14035     ;;
14036   esac 
14037 else
14038   echo "$ac_t""no" 1>&6
14039
14040 fi
14041
14042
14043
14044 #################################################
14045 # Check whether winbind is supported on this platform.  If so we need to
14046 # build and install client programs (WINBIND_TARGETS), sbin programs
14047 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
14048
14049 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
14050 echo "configure:14051: checking whether to build winbind" >&5
14051
14052 # Initially, the value of $host_os decides whether winbind is supported
14053
14054 case "$host_os" in
14055         *linux*|*irix*)
14056                 HAVE_WINBIND=yes
14057                 ;;
14058         *solaris*)
14059                 HAVE_WINBIND=yes
14060                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
14061                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
14062                 ;;
14063         *hpux11*)
14064                 HAVE_WINBIND=yes
14065                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
14066                 ;;
14067         *)
14068                 HAVE_WINBIND=no
14069                 winbind_no_reason=", unsupported on $host_os"
14070                 ;;
14071 esac
14072
14073 # Check the setting of --with-winbindd
14074
14075 # Check whether --with-winbind or --without-winbind was given.
14076 if test "${with_winbind+set}" = set; then
14077   withval="$with_winbind"
14078    
14079   case "$withval" in
14080         yes)
14081                 HAVE_WINBIND=yes
14082                 ;;
14083         no)
14084                 HAVE_WINBIND=no
14085                 winbind_reason=""
14086                 ;;
14087   esac 
14088 fi
14089
14090
14091 # We need unix domain sockets for winbind
14092
14093 if test x"$HAVE_WINBIND" = x"yes"; then
14094         if test x"$samba_cv_unixsocket" = x"no"; then
14095                 winbind_no_reason=", no unix domain socket support on $host_os"
14096                 HAVE_WINBIND=no
14097         fi
14098 fi
14099
14100 # Display test results
14101
14102 WINBIND_TARGETS=""
14103 WINBIND_STARGETS=""
14104 WINBIND_LTARGETS=""
14105 WINBIND_PAM_PROGS=""
14106
14107 if test x"$HAVE_WINBIND" = x"yes"; then
14108         echo "$ac_t""yes" 1>&6
14109         cat >> confdefs.h <<\EOF
14110 #define WITH_WINBIND 1
14111 EOF
14112
14113
14114         WINBIND_TARGETS="bin/wbinfo"
14115         WINBIND_STARGETS="bin/winbindd"
14116         if test x"$BLDSHARED" = x"true"; then
14117                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
14118                 if test x"$with_pam" = x"yes"; then
14119                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
14120                 fi
14121         fi
14122 else
14123         echo "$ac_t""no$winbind_no_reason" 1>&6
14124 fi
14125
14126
14127 # Substitution time!
14128
14129
14130
14131
14132
14133
14134
14135
14136 # Solaris has some extra fields in struct passwd that need to be
14137 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
14138 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
14139 # this. 
14140
14141 #AC_CHECK_MEMBER(struct passwd.pw_comment,
14142 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
14143 #               [#include <pwd.h>])
14144
14145 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
14146 echo "configure:14147: checking whether struct passwd has pw_comment" >&5
14147 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
14148   echo $ac_n "(cached) $ac_c" 1>&6
14149 else
14150   
14151     cat > conftest.$ac_ext <<EOF
14152 #line 14153 "configure"
14153 #include "confdefs.h"
14154 #include <pwd.h>
14155 int main() {
14156 struct passwd p; p.pw_comment;
14157 ; return 0; }
14158 EOF
14159 if { (eval echo configure:14160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14160   rm -rf conftest*
14161   samba_cv_passwd_pw_comment=yes
14162 else
14163   echo "configure: failed program was:" >&5
14164   cat conftest.$ac_ext >&5
14165   rm -rf conftest*
14166   samba_cv_passwd_pw_comment=no
14167 fi
14168 rm -f conftest*
14169 fi
14170
14171 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
14172 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
14173    cat >> confdefs.h <<\EOF
14174 #define HAVE_PASSWD_PW_COMMENT 1
14175 EOF
14176
14177 fi
14178
14179 #AC_CHECK_MEMBER(struct passwd.pw_age,
14180 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
14181 #               [#include <pwd.h>])
14182
14183 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
14184 echo "configure:14185: checking whether struct passwd has pw_age" >&5
14185 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
14186   echo $ac_n "(cached) $ac_c" 1>&6
14187 else
14188   
14189     cat > conftest.$ac_ext <<EOF
14190 #line 14191 "configure"
14191 #include "confdefs.h"
14192 #include <pwd.h>
14193 int main() {
14194 struct passwd p; p.pw_age;
14195 ; return 0; }
14196 EOF
14197 if { (eval echo configure:14198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14198   rm -rf conftest*
14199   samba_cv_passwd_pw_age=yes
14200 else
14201   echo "configure: failed program was:" >&5
14202   cat conftest.$ac_ext >&5
14203   rm -rf conftest*
14204   samba_cv_passwd_pw_age=no
14205 fi
14206 rm -f conftest*
14207 fi
14208
14209 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
14210 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
14211    cat >> confdefs.h <<\EOF
14212 #define HAVE_PASSWD_PW_AGE 1
14213 EOF
14214
14215 fi
14216
14217 #################################################
14218 # Check to see if we should use the included popt 
14219
14220 # Check whether --with-included-popt or --without-included-popt was given.
14221 if test "${with_included_popt+set}" = set; then
14222   withval="$with_included_popt"
14223    
14224   case "$withval" in
14225         yes)
14226                 INCLUDED_POPT=yes
14227                 ;;
14228         no)
14229                 INCLUDED_POPT=no
14230                 ;;
14231   esac 
14232 fi
14233
14234 if test x"$INCLUDED_POPT" != x"yes"; then
14235     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
14236 echo "configure:14237: checking for poptGetContext in -lpopt" >&5
14237 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
14238 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14239   echo $ac_n "(cached) $ac_c" 1>&6
14240 else
14241   ac_save_LIBS="$LIBS"
14242 LIBS="-lpopt  $LIBS"
14243 cat > conftest.$ac_ext <<EOF
14244 #line 14245 "configure"
14245 #include "confdefs.h"
14246 /* Override any gcc2 internal prototype to avoid an error.  */
14247 /* We use char because int might match the return type of a gcc2
14248     builtin and then its argument prototype would still apply.  */
14249 char poptGetContext();
14250
14251 int main() {
14252 poptGetContext()
14253 ; return 0; }
14254 EOF
14255 if { (eval echo configure:14256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14256   rm -rf conftest*
14257   eval "ac_cv_lib_$ac_lib_var=yes"
14258 else
14259   echo "configure: failed program was:" >&5
14260   cat conftest.$ac_ext >&5
14261   rm -rf conftest*
14262   eval "ac_cv_lib_$ac_lib_var=no"
14263 fi
14264 rm -f conftest*
14265 LIBS="$ac_save_LIBS"
14266
14267 fi
14268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14269   echo "$ac_t""yes" 1>&6
14270   INCLUDED_POPT=no
14271 else
14272   echo "$ac_t""no" 1>&6
14273 INCLUDED_POPT=yes
14274 fi
14275
14276 fi
14277
14278 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
14279 echo "configure:14280: checking whether to use included popt" >&5
14280 if test x"$INCLUDED_POPT" = x"yes"; then
14281     echo "$ac_t""yes" 1>&6
14282     BUILD_POPT='$(POPT_OBJS)'
14283     FLAGS1="-I$srcdir/popt"
14284 else
14285     echo "$ac_t""no" 1>&6
14286     LIBS="$LIBS -lpopt"
14287 fi
14288
14289
14290
14291 #################################################
14292 # Check if the user wants Python
14293
14294 # At the moment, you can use this to set which Python binary to link
14295 # against.  (Libraries built for Python2.2 can't be used by 2.1,
14296 # though they can coexist in different directories.)  In the future
14297 # this might make the Python stuff be built by default.
14298
14299 # Check whether --with-python or --without-python was given.
14300 if test "${with_python+set}" = set; then
14301   withval="$with_python"
14302    case "${withval-python}" in
14303   yes)
14304         PYTHON=python
14305         ;;
14306   *)
14307         PYTHON=${withval-python}
14308         ;;
14309   esac 
14310 fi
14311
14312
14313
14314 #################################################
14315 # do extra things if we are running insure
14316
14317 if test "${ac_cv_prog_CC}" = "insure"; then
14318         CPPFLAGS="$CPPFLAGS -D__INSURE__"
14319 fi
14320
14321 #################################################
14322 # final configure stuff
14323
14324 echo $ac_n "checking configure summary""... $ac_c" 1>&6
14325 echo "configure:14326: checking configure summary" >&5
14326 if test "$cross_compiling" = yes; then
14327   echo "configure: warning: cannot run when cross-compiling" 1>&2
14328 else
14329   cat > conftest.$ac_ext <<EOF
14330 #line 14331 "configure"
14331 #include "confdefs.h"
14332 #include "${srcdir-.}/tests/summary.c"
14333 EOF
14334 if { (eval echo configure:14335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14335 then
14336   echo "$ac_t""yes" 1>&6
14337 else
14338   echo "configure: failed program was:" >&5
14339   cat conftest.$ac_ext >&5
14340   rm -fr conftest*
14341   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
14342 fi
14343 rm -fr conftest*
14344 fi
14345
14346
14347 builddir=`pwd`
14348
14349
14350 # I added make files that are outside /source directory.
14351 # I know this is not a good solution, will work out a better
14352 # solution soon.                        --simo
14353 trap '' 1 2 15
14354 cat > confcache <<\EOF
14355 # This file is a shell script that caches the results of configure
14356 # tests run on this system so they can be shared between configure
14357 # scripts and configure runs.  It is not useful on other systems.
14358 # If it contains results you don't want to keep, you may remove or edit it.
14359 #
14360 # By default, configure uses ./config.cache as the cache file,
14361 # creating it if it does not exist already.  You can give configure
14362 # the --cache-file=FILE option to use a different cache file; that is
14363 # what configure does when it calls configure scripts in
14364 # subdirectories, so they share the cache.
14365 # Giving --cache-file=/dev/null disables caching, for debugging configure.
14366 # config.status only pays attention to the cache file if you give it the
14367 # --recheck option to rerun configure.
14368 #
14369 EOF
14370 # The following way of writing the cache mishandles newlines in values,
14371 # but we know of no workaround that is simple, portable, and efficient.
14372 # So, don't put newlines in cache variables' values.
14373 # Ultrix sh set writes to stderr and can't be redirected directly,
14374 # and sets the high bit in the cache file unless we assign to the vars.
14375 (set) 2>&1 |
14376   case `(ac_space=' '; set | grep ac_space) 2>&1` in
14377   *ac_space=\ *)
14378     # `set' does not quote correctly, so add quotes (double-quote substitution
14379     # turns \\\\ into \\, and sed turns \\ into \).
14380     sed -n \
14381       -e "s/'/'\\\\''/g" \
14382       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
14383     ;;
14384   *)
14385     # `set' quotes correctly as required by POSIX, so do not add quotes.
14386     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
14387     ;;
14388   esac >> confcache
14389 if cmp -s $cache_file confcache; then
14390   :
14391 else
14392   if test -w $cache_file; then
14393     echo "updating cache $cache_file"
14394     cat confcache > $cache_file
14395   else
14396     echo "not updating unwritable cache $cache_file"
14397   fi
14398 fi
14399 rm -f confcache
14400
14401 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14402
14403 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14404 # Let make expand exec_prefix.
14405 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14406
14407 # Any assignment to VPATH causes Sun make to only execute
14408 # the first set of double-colon rules, so remove it if not needed.
14409 # If there is a colon in the path, we need to keep it.
14410 if test "x$srcdir" = x.; then
14411   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14412 fi
14413
14414 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14415
14416 DEFS=-DHAVE_CONFIG_H
14417
14418 # Without the "./", some shells look in PATH for config.status.
14419 : ${CONFIG_STATUS=./config.status}
14420
14421 echo creating $CONFIG_STATUS
14422 rm -f $CONFIG_STATUS
14423 cat > $CONFIG_STATUS <<EOF
14424 #! /bin/sh
14425 # Generated automatically by configure.
14426 # Run this file to recreate the current configuration.
14427 # This directory was configured as follows,
14428 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14429 #
14430 # $0 $ac_configure_args
14431 #
14432 # Compiler output produced by configure, useful for debugging
14433 # configure, is in ./config.log if it exists.
14434
14435 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14436 for ac_option
14437 do
14438   case "\$ac_option" in
14439   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14440     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14441     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14442   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14443     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14444     exit 0 ;;
14445   -help | --help | --hel | --he | --h)
14446     echo "\$ac_cs_usage"; exit 0 ;;
14447   *) echo "\$ac_cs_usage"; exit 1 ;;
14448   esac
14449 done
14450
14451 ac_given_srcdir=$srcdir
14452 ac_given_INSTALL="$INSTALL"
14453
14454 trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/pdb/mysql/Makefile ../examples/pdb/xml/Makefile ../examples/sam/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14455 EOF
14456 cat >> $CONFIG_STATUS <<EOF
14457
14458 # Protect against being on the right side of a sed subst in config.status.
14459 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14460  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14461 $ac_vpsub
14462 $extrasub
14463 s%@SHELL@%$SHELL%g
14464 s%@CFLAGS@%$CFLAGS%g
14465 s%@CPPFLAGS@%$CPPFLAGS%g
14466 s%@CXXFLAGS@%$CXXFLAGS%g
14467 s%@FFLAGS@%$FFLAGS%g
14468 s%@DEFS@%$DEFS%g
14469 s%@LDFLAGS@%$LDFLAGS%g
14470 s%@LIBS@%$LIBS%g
14471 s%@exec_prefix@%$exec_prefix%g
14472 s%@prefix@%$prefix%g
14473 s%@program_transform_name@%$program_transform_name%g
14474 s%@bindir@%$bindir%g
14475 s%@sbindir@%$sbindir%g
14476 s%@libexecdir@%$libexecdir%g
14477 s%@datadir@%$datadir%g
14478 s%@sysconfdir@%$sysconfdir%g
14479 s%@sharedstatedir@%$sharedstatedir%g
14480 s%@localstatedir@%$localstatedir%g
14481 s%@libdir@%$libdir%g
14482 s%@includedir@%$includedir%g
14483 s%@oldincludedir@%$oldincludedir%g
14484 s%@infodir@%$infodir%g
14485 s%@mandir@%$mandir%g
14486 s%@configdir@%$configdir%g
14487 s%@lockdir@%$lockdir%g
14488 s%@piddir@%$piddir%g
14489 s%@logfilebase@%$logfilebase%g
14490 s%@privatedir@%$privatedir%g
14491 s%@swatdir@%$swatdir%g
14492 s%@RUNPROG@%$RUNPROG%g
14493 s%@MPROGS@%$MPROGS%g
14494 s%@LDSHFLAGS@%$LDSHFLAGS%g
14495 s%@SONAMEFLAG@%$SONAMEFLAG%g
14496 s%@SHLD@%$SHLD%g
14497 s%@HOST_OS@%$HOST_OS%g
14498 s%@PAM_MOD@%$PAM_MOD%g
14499 s%@WRAP@%$WRAP%g
14500 s%@WRAP32@%$WRAP32%g
14501 s%@WRAPPROG@%$WRAPPROG%g
14502 s%@PICFLAG@%$PICFLAG%g
14503 s%@PICSUFFIX@%$PICSUFFIX%g
14504 s%@POBAD_CC@%$POBAD_CC%g
14505 s%@SHLIBEXT@%$SHLIBEXT%g
14506 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14507 s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g
14508 s%@PRINTLIBS@%$PRINTLIBS%g
14509 s%@CC@%$CC%g
14510 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14511 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14512 s%@INSTALL_DATA@%$INSTALL_DATA%g
14513 s%@AWK@%$AWK%g
14514 s%@BROKEN_CC@%$BROKEN_CC%g
14515 s%@host@%$host%g
14516 s%@host_alias@%$host_alias%g
14517 s%@host_cpu@%$host_cpu%g
14518 s%@host_vendor@%$host_vendor%g
14519 s%@host_os@%$host_os%g
14520 s%@target@%$target%g
14521 s%@target_alias@%$target_alias%g
14522 s%@target_cpu@%$target_cpu%g
14523 s%@target_vendor@%$target_vendor%g
14524 s%@target_os@%$target_os%g
14525 s%@build@%$build%g
14526 s%@build_alias@%$build_alias%g
14527 s%@build_cpu@%$build_cpu%g
14528 s%@build_vendor@%$build_vendor%g
14529 s%@build_os@%$build_os%g
14530 s%@CPP@%$CPP%g
14531 s%@CUPS_CONFIG@%$CUPS_CONFIG%g
14532 s%@LIBOBJS@%$LIBOBJS%g
14533 s%@TERMLIBS@%$TERMLIBS%g
14534 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14535 s%@ROFF@%$ROFF%g
14536 s%@DYNEXP@%$DYNEXP%g
14537 s%@QUOTAOBJS@%$QUOTAOBJS%g
14538 s%@manlangs@%$manlangs%g
14539 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14540 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14541 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14542 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
14543 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
14544 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
14545 s%@BUILD_POPT@%$BUILD_POPT%g
14546 s%@FLAGS1@%$FLAGS1%g
14547 s%@PYTHON@%$PYTHON%g
14548 s%@builddir@%$builddir%g
14549
14550 CEOF
14551 EOF
14552
14553 cat >> $CONFIG_STATUS <<\EOF
14554
14555 # Split the substitutions into bite-sized pieces for seds with
14556 # small command number limits, like on Digital OSF/1 and HP-UX.
14557 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14558 ac_file=1 # Number of current file.
14559 ac_beg=1 # First line for current file.
14560 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14561 ac_more_lines=:
14562 ac_sed_cmds=""
14563 while $ac_more_lines; do
14564   if test $ac_beg -gt 1; then
14565     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14566   else
14567     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14568   fi
14569   if test ! -s conftest.s$ac_file; then
14570     ac_more_lines=false
14571     rm -f conftest.s$ac_file
14572   else
14573     if test -z "$ac_sed_cmds"; then
14574       ac_sed_cmds="sed -f conftest.s$ac_file"
14575     else
14576       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14577     fi
14578     ac_file=`expr $ac_file + 1`
14579     ac_beg=$ac_end
14580     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14581   fi
14582 done
14583 if test -z "$ac_sed_cmds"; then
14584   ac_sed_cmds=cat
14585 fi
14586 EOF
14587
14588 cat >> $CONFIG_STATUS <<EOF
14589
14590 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/pdb/mysql/Makefile ../examples/pdb/xml/Makefile ../examples/sam/Makefile"}
14591 EOF
14592 cat >> $CONFIG_STATUS <<\EOF
14593 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14594   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14595   case "$ac_file" in
14596   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14597        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14598   *) ac_file_in="${ac_file}.in" ;;
14599   esac
14600
14601   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14602
14603   # Remove last slash and all that follows it.  Not all systems have dirname.
14604   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14605   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14606     # The file is in a subdirectory.
14607     test ! -d "$ac_dir" && mkdir "$ac_dir"
14608     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14609     # A "../" for each directory in $ac_dir_suffix.
14610     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14611   else
14612     ac_dir_suffix= ac_dots=
14613   fi
14614
14615   case "$ac_given_srcdir" in
14616   .)  srcdir=.
14617       if test -z "$ac_dots"; then top_srcdir=.
14618       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14619   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14620   *) # Relative path.
14621     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14622     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14623   esac
14624
14625   case "$ac_given_INSTALL" in
14626   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14627   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14628   esac
14629
14630   echo creating "$ac_file"
14631   rm -f "$ac_file"
14632   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14633   case "$ac_file" in
14634   *Makefile*) ac_comsub="1i\\
14635 # $configure_input" ;;
14636   *) ac_comsub= ;;
14637   esac
14638
14639   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14640   sed -e "$ac_comsub
14641 s%@configure_input@%$configure_input%g
14642 s%@srcdir@%$srcdir%g
14643 s%@top_srcdir@%$top_srcdir%g
14644 s%@INSTALL@%$INSTALL%g
14645 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14646 fi; done
14647 rm -f conftest.s*
14648
14649 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14650 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14651 #
14652 # ac_d sets the value in "#define NAME VALUE" lines.
14653 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14654 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14655 ac_dC='\3'
14656 ac_dD='%g'
14657 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14658 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14659 ac_uB='\([      ]\)%\1#\2define\3'
14660 ac_uC=' '
14661 ac_uD='\4%g'
14662 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14663 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14664 ac_eB='$%\1#\2define\3'
14665 ac_eC=' '
14666 ac_eD='%g'
14667
14668 if test "${CONFIG_HEADERS+set}" != set; then
14669 EOF
14670 cat >> $CONFIG_STATUS <<EOF
14671   CONFIG_HEADERS="include/config.h"
14672 EOF
14673 cat >> $CONFIG_STATUS <<\EOF
14674 fi
14675 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14676   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14677   case "$ac_file" in
14678   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14679        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14680   *) ac_file_in="${ac_file}.in" ;;
14681   esac
14682
14683   echo creating $ac_file
14684
14685   rm -f conftest.frag conftest.in conftest.out
14686   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14687   cat $ac_file_inputs > conftest.in
14688
14689 EOF
14690
14691 # Transform confdefs.h into a sed script conftest.vals that substitutes
14692 # the proper values into config.h.in to produce config.h.  And first:
14693 # Protect against being on the right side of a sed subst in config.status.
14694 # Protect against being in an unquoted here document in config.status.
14695 rm -f conftest.vals
14696 cat > conftest.hdr <<\EOF
14697 s/[\\&%]/\\&/g
14698 s%[\\$`]%\\&%g
14699 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14700 s%ac_d%ac_u%gp
14701 s%ac_u%ac_e%gp
14702 EOF
14703 sed -n -f conftest.hdr confdefs.h > conftest.vals
14704 rm -f conftest.hdr
14705
14706 # This sed command replaces #undef with comments.  This is necessary, for
14707 # example, in the case of _POSIX_SOURCE, which is predefined and required
14708 # on some systems where configure will not decide to define it.
14709 cat >> conftest.vals <<\EOF
14710 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14711 EOF
14712
14713 # Break up conftest.vals because some shells have a limit on
14714 # the size of here documents, and old seds have small limits too.
14715
14716 rm -f conftest.tail
14717 while :
14718 do
14719   ac_lines=`grep -c . conftest.vals`
14720   # grep -c gives empty output for an empty file on some AIX systems.
14721   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14722   # Write a limited-size here document to conftest.frag.
14723   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14724   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14725   echo 'CEOF
14726   sed -f conftest.frag conftest.in > conftest.out
14727   rm -f conftest.in
14728   mv conftest.out conftest.in
14729 ' >> $CONFIG_STATUS
14730   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14731   rm -f conftest.vals
14732   mv conftest.tail conftest.vals
14733 done
14734 rm -f conftest.vals
14735
14736 cat >> $CONFIG_STATUS <<\EOF
14737   rm -f conftest.frag conftest.h
14738   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14739   cat conftest.in >> conftest.h
14740   rm -f conftest.in
14741   if cmp -s $ac_file conftest.h 2>/dev/null; then
14742     echo "$ac_file is unchanged"
14743     rm -f conftest.h
14744   else
14745     # Remove last slash and all that follows it.  Not all systems have dirname.
14746       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14747       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14748       # The file is in a subdirectory.
14749       test ! -d "$ac_dir" && mkdir "$ac_dir"
14750     fi
14751     rm -f $ac_file
14752     mv conftest.h $ac_file
14753   fi
14754 fi; done
14755
14756 EOF
14757 cat >> $CONFIG_STATUS <<EOF
14758
14759 EOF
14760 cat >> $CONFIG_STATUS <<\EOF
14761
14762 exit 0
14763 EOF
14764 chmod +x $CONFIG_STATUS
14765 rm -fr confdefs* $ac_clean_files
14766 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14767
14768
14769 #################################################
14770 # Print very concise instructions on building/use
14771 if test "x$enable_dmalloc" = xyes
14772 then
14773         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14774         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14775 fi