Attempt to make broken Linux sendfile work.... Still in progress.
[sfrench/samba-autobuild/.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 gawk mawk 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 int main()
2918 {
2919   FILE *f=fopen("conftestval", "w");
2920   if (!f) return(1);
2921   fprintf(f, "%d\n", sizeof(int));
2922   return(0);
2923 }
2924 EOF
2925 if { (eval echo configure:2926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2926 then
2927   ac_cv_sizeof_int=`cat conftestval`
2928 else
2929   echo "configure: failed program was:" >&5
2930   cat conftest.$ac_ext >&5
2931   rm -fr conftest*
2932   ac_cv_sizeof_int=0
2933 fi
2934 rm -fr conftest*
2935 fi
2936
2937 fi
2938 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2939 cat >> confdefs.h <<EOF
2940 #define SIZEOF_INT $ac_cv_sizeof_int
2941 EOF
2942
2943
2944 echo $ac_n "checking size of long""... $ac_c" 1>&6
2945 echo "configure:2946: checking size of long" >&5
2946 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2947   echo $ac_n "(cached) $ac_c" 1>&6
2948 else
2949   if test "$cross_compiling" = yes; then
2950   ac_cv_sizeof_long=cross
2951 else
2952   cat > conftest.$ac_ext <<EOF
2953 #line 2954 "configure"
2954 #include "confdefs.h"
2955 #include <stdio.h>
2956 int main()
2957 {
2958   FILE *f=fopen("conftestval", "w");
2959   if (!f) return(1);
2960   fprintf(f, "%d\n", sizeof(long));
2961   return(0);
2962 }
2963 EOF
2964 if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2965 then
2966   ac_cv_sizeof_long=`cat conftestval`
2967 else
2968   echo "configure: failed program was:" >&5
2969   cat conftest.$ac_ext >&5
2970   rm -fr conftest*
2971   ac_cv_sizeof_long=0
2972 fi
2973 rm -fr conftest*
2974 fi
2975
2976 fi
2977 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2978 cat >> confdefs.h <<EOF
2979 #define SIZEOF_LONG $ac_cv_sizeof_long
2980 EOF
2981
2982
2983 echo $ac_n "checking size of short""... $ac_c" 1>&6
2984 echo "configure:2985: checking size of short" >&5
2985 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2986   echo $ac_n "(cached) $ac_c" 1>&6
2987 else
2988   if test "$cross_compiling" = yes; then
2989   ac_cv_sizeof_short=cross
2990 else
2991   cat > conftest.$ac_ext <<EOF
2992 #line 2993 "configure"
2993 #include "confdefs.h"
2994 #include <stdio.h>
2995 int main()
2996 {
2997   FILE *f=fopen("conftestval", "w");
2998   if (!f) return(1);
2999   fprintf(f, "%d\n", sizeof(short));
3000   return(0);
3001 }
3002 EOF
3003 if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3004 then
3005   ac_cv_sizeof_short=`cat conftestval`
3006 else
3007   echo "configure: failed program was:" >&5
3008   cat conftest.$ac_ext >&5
3009   rm -fr conftest*
3010   ac_cv_sizeof_short=0
3011 fi
3012 rm -fr conftest*
3013 fi
3014
3015 fi
3016 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3017 cat >> confdefs.h <<EOF
3018 #define SIZEOF_SHORT $ac_cv_sizeof_short
3019 EOF
3020
3021
3022
3023 echo $ac_n "checking for working const""... $ac_c" 1>&6
3024 echo "configure:3025: checking for working const" >&5
3025 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3026   echo $ac_n "(cached) $ac_c" 1>&6
3027 else
3028   cat > conftest.$ac_ext <<EOF
3029 #line 3030 "configure"
3030 #include "confdefs.h"
3031
3032 int main() {
3033
3034 /* Ultrix mips cc rejects this.  */
3035 typedef int charset[2]; const charset x;
3036 /* SunOS 4.1.1 cc rejects this.  */
3037 char const *const *ccp;
3038 char **p;
3039 /* NEC SVR4.0.2 mips cc rejects this.  */
3040 struct point {int x, y;};
3041 static struct point const zero = {0,0};
3042 /* AIX XL C 1.02.0.0 rejects this.
3043    It does not let you subtract one const X* pointer from another in an arm
3044    of an if-expression whose if-part is not a constant expression */
3045 const char *g = "string";
3046 ccp = &g + (g ? g-g : 0);
3047 /* HPUX 7.0 cc rejects these. */
3048 ++ccp;
3049 p = (char**) ccp;
3050 ccp = (char const *const *) p;
3051 { /* SCO 3.2v4 cc rejects this.  */
3052   char *t;
3053   char const *s = 0 ? (char *) 0 : (char const *) 0;
3054
3055   *t++ = 0;
3056 }
3057 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3058   int x[] = {25, 17};
3059   const int *foo = &x[0];
3060   ++foo;
3061 }
3062 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3063   typedef const int *iptr;
3064   iptr p = 0;
3065   ++p;
3066 }
3067 { /* AIX XL C 1.02.0.0 rejects this saying
3068      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3069   struct s { int j; const int *ap[3]; };
3070   struct s *b; b->j = 5;
3071 }
3072 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3073   const int foo = 10;
3074 }
3075
3076 ; return 0; }
3077 EOF
3078 if { (eval echo configure:3079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3079   rm -rf conftest*
3080   ac_cv_c_const=yes
3081 else
3082   echo "configure: failed program was:" >&5
3083   cat conftest.$ac_ext >&5
3084   rm -rf conftest*
3085   ac_cv_c_const=no
3086 fi
3087 rm -f conftest*
3088 fi
3089
3090 echo "$ac_t""$ac_cv_c_const" 1>&6
3091 if test $ac_cv_c_const = no; then
3092   cat >> confdefs.h <<\EOF
3093 #define const 
3094 EOF
3095
3096 fi
3097
3098 echo $ac_n "checking for inline""... $ac_c" 1>&6
3099 echo "configure:3100: checking for inline" >&5
3100 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3101   echo $ac_n "(cached) $ac_c" 1>&6
3102 else
3103   ac_cv_c_inline=no
3104 for ac_kw in inline __inline__ __inline; do
3105   cat > conftest.$ac_ext <<EOF
3106 #line 3107 "configure"
3107 #include "confdefs.h"
3108
3109 int main() {
3110 } $ac_kw foo() {
3111 ; return 0; }
3112 EOF
3113 if { (eval echo configure:3114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3114   rm -rf conftest*
3115   ac_cv_c_inline=$ac_kw; break
3116 else
3117   echo "configure: failed program was:" >&5
3118   cat conftest.$ac_ext >&5
3119 fi
3120 rm -f conftest*
3121 done
3122
3123 fi
3124
3125 echo "$ac_t""$ac_cv_c_inline" 1>&6
3126 case "$ac_cv_c_inline" in
3127   inline | yes) ;;
3128   no) cat >> confdefs.h <<\EOF
3129 #define inline 
3130 EOF
3131  ;;
3132   *)  cat >> confdefs.h <<EOF
3133 #define inline $ac_cv_c_inline
3134 EOF
3135  ;;
3136 esac
3137
3138 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3139 echo "configure:3140: checking whether byte ordering is bigendian" >&5
3140 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3141   echo $ac_n "(cached) $ac_c" 1>&6
3142 else
3143   ac_cv_c_bigendian=unknown
3144 # See if sys/param.h defines the BYTE_ORDER macro.
3145 cat > conftest.$ac_ext <<EOF
3146 #line 3147 "configure"
3147 #include "confdefs.h"
3148 #include <sys/types.h>
3149 #include <sys/param.h>
3150 int main() {
3151
3152 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3153  bogus endian macros
3154 #endif
3155 ; return 0; }
3156 EOF
3157 if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3158   rm -rf conftest*
3159   # It does; now see whether it defined to BIG_ENDIAN or not.
3160 cat > conftest.$ac_ext <<EOF
3161 #line 3162 "configure"
3162 #include "confdefs.h"
3163 #include <sys/types.h>
3164 #include <sys/param.h>
3165 int main() {
3166
3167 #if BYTE_ORDER != BIG_ENDIAN
3168  not big endian
3169 #endif
3170 ; return 0; }
3171 EOF
3172 if { (eval echo configure:3173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3173   rm -rf conftest*
3174   ac_cv_c_bigendian=yes
3175 else
3176   echo "configure: failed program was:" >&5
3177   cat conftest.$ac_ext >&5
3178   rm -rf conftest*
3179   ac_cv_c_bigendian=no
3180 fi
3181 rm -f conftest*
3182 else
3183   echo "configure: failed program was:" >&5
3184   cat conftest.$ac_ext >&5
3185 fi
3186 rm -f conftest*
3187 if test $ac_cv_c_bigendian = unknown; then
3188 if test "$cross_compiling" = yes; then
3189     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3190 else
3191   cat > conftest.$ac_ext <<EOF
3192 #line 3193 "configure"
3193 #include "confdefs.h"
3194 main () {
3195   /* Are we little or big endian?  From Harbison&Steele.  */
3196   union
3197   {
3198     long l;
3199     char c[sizeof (long)];
3200   } u;
3201   u.l = 1;
3202   exit (u.c[sizeof (long) - 1] == 1);
3203 }
3204 EOF
3205 if { (eval echo configure:3206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3206 then
3207   ac_cv_c_bigendian=no
3208 else
3209   echo "configure: failed program was:" >&5
3210   cat conftest.$ac_ext >&5
3211   rm -fr conftest*
3212   ac_cv_c_bigendian=yes
3213 fi
3214 rm -fr conftest*
3215 fi
3216
3217 fi
3218 fi
3219
3220 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3221 if test $ac_cv_c_bigendian = yes; then
3222   cat >> confdefs.h <<\EOF
3223 #define WORDS_BIGENDIAN 1
3224 EOF
3225
3226 fi
3227
3228 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3229 echo "configure:3230: checking whether char is unsigned" >&5
3230 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3231   echo $ac_n "(cached) $ac_c" 1>&6
3232 else
3233   if test "$GCC" = yes; then
3234   # GCC predefines this symbol on systems where it applies.
3235 cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238 #ifdef __CHAR_UNSIGNED__
3239   yes
3240 #endif
3241
3242 EOF
3243 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3244   egrep "yes" >/dev/null 2>&1; then
3245   rm -rf conftest*
3246   ac_cv_c_char_unsigned=yes
3247 else
3248   rm -rf conftest*
3249   ac_cv_c_char_unsigned=no
3250 fi
3251 rm -f conftest*
3252
3253 else
3254 if test "$cross_compiling" = yes; then
3255     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3256 else
3257   cat > conftest.$ac_ext <<EOF
3258 #line 3259 "configure"
3259 #include "confdefs.h"
3260 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3261 #if !defined(__STDC__) || __STDC__ != 1
3262 #define volatile
3263 #endif
3264 main() {
3265   volatile char c = 255; exit(c < 0);
3266 }
3267 EOF
3268 if { (eval echo configure:3269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3269 then
3270   ac_cv_c_char_unsigned=yes
3271 else
3272   echo "configure: failed program was:" >&5
3273   cat conftest.$ac_ext >&5
3274   rm -fr conftest*
3275   ac_cv_c_char_unsigned=no
3276 fi
3277 rm -fr conftest*
3278 fi
3279
3280 fi
3281 fi
3282
3283 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3284 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3285   cat >> confdefs.h <<\EOF
3286 #define __CHAR_UNSIGNED__ 1
3287 EOF
3288
3289 fi
3290
3291
3292 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3293 echo "configure:3294: checking return type of signal handlers" >&5
3294 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3295   echo $ac_n "(cached) $ac_c" 1>&6
3296 else
3297   cat > conftest.$ac_ext <<EOF
3298 #line 3299 "configure"
3299 #include "confdefs.h"
3300 #include <sys/types.h>
3301 #include <signal.h>
3302 #ifdef signal
3303 #undef signal
3304 #endif
3305 #ifdef __cplusplus
3306 extern "C" void (*signal (int, void (*)(int)))(int);
3307 #else
3308 void (*signal ()) ();
3309 #endif
3310
3311 int main() {
3312 int i;
3313 ; return 0; }
3314 EOF
3315 if { (eval echo configure:3316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3316   rm -rf conftest*
3317   ac_cv_type_signal=void
3318 else
3319   echo "configure: failed program was:" >&5
3320   cat conftest.$ac_ext >&5
3321   rm -rf conftest*
3322   ac_cv_type_signal=int
3323 fi
3324 rm -f conftest*
3325 fi
3326
3327 echo "$ac_t""$ac_cv_type_signal" 1>&6
3328 cat >> confdefs.h <<EOF
3329 #define RETSIGTYPE $ac_cv_type_signal
3330 EOF
3331
3332
3333 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3334 echo "configure:3335: checking for uid_t in sys/types.h" >&5
3335 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3336   echo $ac_n "(cached) $ac_c" 1>&6
3337 else
3338   cat > conftest.$ac_ext <<EOF
3339 #line 3340 "configure"
3340 #include "confdefs.h"
3341 #include <sys/types.h>
3342 EOF
3343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3344   egrep "uid_t" >/dev/null 2>&1; then
3345   rm -rf conftest*
3346   ac_cv_type_uid_t=yes
3347 else
3348   rm -rf conftest*
3349   ac_cv_type_uid_t=no
3350 fi
3351 rm -f conftest*
3352
3353 fi
3354
3355 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3356 if test $ac_cv_type_uid_t = no; then
3357   cat >> confdefs.h <<\EOF
3358 #define uid_t int
3359 EOF
3360
3361   cat >> confdefs.h <<\EOF
3362 #define gid_t int
3363 EOF
3364
3365 fi
3366
3367 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3368 echo "configure:3369: checking for mode_t" >&5
3369 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3370   echo $ac_n "(cached) $ac_c" 1>&6
3371 else
3372   cat > conftest.$ac_ext <<EOF
3373 #line 3374 "configure"
3374 #include "confdefs.h"
3375 #include <sys/types.h>
3376 #if STDC_HEADERS
3377 #include <stdlib.h>
3378 #include <stddef.h>
3379 #endif
3380 EOF
3381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3382   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3383   rm -rf conftest*
3384   ac_cv_type_mode_t=yes
3385 else
3386   rm -rf conftest*
3387   ac_cv_type_mode_t=no
3388 fi
3389 rm -f conftest*
3390
3391 fi
3392 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3393 if test $ac_cv_type_mode_t = no; then
3394   cat >> confdefs.h <<\EOF
3395 #define mode_t int
3396 EOF
3397
3398 fi
3399
3400 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3401 echo "configure:3402: checking for off_t" >&5
3402 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3403   echo $ac_n "(cached) $ac_c" 1>&6
3404 else
3405   cat > conftest.$ac_ext <<EOF
3406 #line 3407 "configure"
3407 #include "confdefs.h"
3408 #include <sys/types.h>
3409 #if STDC_HEADERS
3410 #include <stdlib.h>
3411 #include <stddef.h>
3412 #endif
3413 EOF
3414 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3415   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3416   rm -rf conftest*
3417   ac_cv_type_off_t=yes
3418 else
3419   rm -rf conftest*
3420   ac_cv_type_off_t=no
3421 fi
3422 rm -f conftest*
3423
3424 fi
3425 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3426 if test $ac_cv_type_off_t = no; then
3427   cat >> confdefs.h <<\EOF
3428 #define off_t long
3429 EOF
3430
3431 fi
3432
3433 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3434 echo "configure:3435: checking for size_t" >&5
3435 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3436   echo $ac_n "(cached) $ac_c" 1>&6
3437 else
3438   cat > conftest.$ac_ext <<EOF
3439 #line 3440 "configure"
3440 #include "confdefs.h"
3441 #include <sys/types.h>
3442 #if STDC_HEADERS
3443 #include <stdlib.h>
3444 #include <stddef.h>
3445 #endif
3446 EOF
3447 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3448   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3449   rm -rf conftest*
3450   ac_cv_type_size_t=yes
3451 else
3452   rm -rf conftest*
3453   ac_cv_type_size_t=no
3454 fi
3455 rm -f conftest*
3456
3457 fi
3458 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3459 if test $ac_cv_type_size_t = no; then
3460   cat >> confdefs.h <<\EOF
3461 #define size_t unsigned
3462 EOF
3463
3464 fi
3465
3466 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3467 echo "configure:3468: checking for pid_t" >&5
3468 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3469   echo $ac_n "(cached) $ac_c" 1>&6
3470 else
3471   cat > conftest.$ac_ext <<EOF
3472 #line 3473 "configure"
3473 #include "confdefs.h"
3474 #include <sys/types.h>
3475 #if STDC_HEADERS
3476 #include <stdlib.h>
3477 #include <stddef.h>
3478 #endif
3479 EOF
3480 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3481   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3482   rm -rf conftest*
3483   ac_cv_type_pid_t=yes
3484 else
3485   rm -rf conftest*
3486   ac_cv_type_pid_t=no
3487 fi
3488 rm -f conftest*
3489
3490 fi
3491 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3492 if test $ac_cv_type_pid_t = no; then
3493   cat >> confdefs.h <<\EOF
3494 #define pid_t int
3495 EOF
3496
3497 fi
3498
3499 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3500 echo "configure:3501: checking for st_rdev in struct stat" >&5
3501 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3502   echo $ac_n "(cached) $ac_c" 1>&6
3503 else
3504   cat > conftest.$ac_ext <<EOF
3505 #line 3506 "configure"
3506 #include "confdefs.h"
3507 #include <sys/types.h>
3508 #include <sys/stat.h>
3509 int main() {
3510 struct stat s; s.st_rdev;
3511 ; return 0; }
3512 EOF
3513 if { (eval echo configure:3514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3514   rm -rf conftest*
3515   ac_cv_struct_st_rdev=yes
3516 else
3517   echo "configure: failed program was:" >&5
3518   cat conftest.$ac_ext >&5
3519   rm -rf conftest*
3520   ac_cv_struct_st_rdev=no
3521 fi
3522 rm -f conftest*
3523 fi
3524
3525 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3526 if test $ac_cv_struct_st_rdev = yes; then
3527   cat >> confdefs.h <<\EOF
3528 #define HAVE_ST_RDEV 1
3529 EOF
3530
3531 fi
3532
3533 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3534 echo "configure:3535: checking for d_off in dirent" >&5
3535 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3536   echo $ac_n "(cached) $ac_c" 1>&6
3537 else
3538   cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3541
3542 #include <unistd.h>
3543 #include <sys/types.h>
3544 #include <dirent.h>
3545 int main() {
3546 struct dirent d; d.d_off;
3547 ; return 0; }
3548 EOF
3549 if { (eval echo configure:3550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3550   rm -rf conftest*
3551   ac_cv_dirent_d_off=yes
3552 else
3553   echo "configure: failed program was:" >&5
3554   cat conftest.$ac_ext >&5
3555   rm -rf conftest*
3556   ac_cv_dirent_d_off=no
3557 fi
3558 rm -f conftest*
3559 fi
3560
3561 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3562 if test $ac_cv_dirent_d_off = yes; then
3563   cat >> confdefs.h <<\EOF
3564 #define HAVE_DIRENT_D_OFF 1
3565 EOF
3566
3567 fi
3568
3569 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3570 echo "configure:3571: checking for ino_t" >&5
3571 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3572   echo $ac_n "(cached) $ac_c" 1>&6
3573 else
3574   cat > conftest.$ac_ext <<EOF
3575 #line 3576 "configure"
3576 #include "confdefs.h"
3577 #include <sys/types.h>
3578 #if STDC_HEADERS
3579 #include <stdlib.h>
3580 #include <stddef.h>
3581 #endif
3582 EOF
3583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3584   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3585   rm -rf conftest*
3586   ac_cv_type_ino_t=yes
3587 else
3588   rm -rf conftest*
3589   ac_cv_type_ino_t=no
3590 fi
3591 rm -f conftest*
3592
3593 fi
3594 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3595 if test $ac_cv_type_ino_t = no; then
3596   cat >> confdefs.h <<\EOF
3597 #define ino_t unsigned
3598 EOF
3599
3600 fi
3601
3602 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3603 echo "configure:3604: checking for loff_t" >&5
3604 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   cat > conftest.$ac_ext <<EOF
3608 #line 3609 "configure"
3609 #include "confdefs.h"
3610 #include <sys/types.h>
3611 #if STDC_HEADERS
3612 #include <stdlib.h>
3613 #include <stddef.h>
3614 #endif
3615 EOF
3616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3617   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3618   rm -rf conftest*
3619   ac_cv_type_loff_t=yes
3620 else
3621   rm -rf conftest*
3622   ac_cv_type_loff_t=no
3623 fi
3624 rm -f conftest*
3625
3626 fi
3627 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3628 if test $ac_cv_type_loff_t = no; then
3629   cat >> confdefs.h <<\EOF
3630 #define loff_t off_t
3631 EOF
3632
3633 fi
3634
3635 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3636 echo "configure:3637: checking for offset_t" >&5
3637 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3638   echo $ac_n "(cached) $ac_c" 1>&6
3639 else
3640   cat > conftest.$ac_ext <<EOF
3641 #line 3642 "configure"
3642 #include "confdefs.h"
3643 #include <sys/types.h>
3644 #if STDC_HEADERS
3645 #include <stdlib.h>
3646 #include <stddef.h>
3647 #endif
3648 EOF
3649 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3650   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3651   rm -rf conftest*
3652   ac_cv_type_offset_t=yes
3653 else
3654   rm -rf conftest*
3655   ac_cv_type_offset_t=no
3656 fi
3657 rm -f conftest*
3658
3659 fi
3660 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3661 if test $ac_cv_type_offset_t = no; then
3662   cat >> confdefs.h <<\EOF
3663 #define offset_t loff_t
3664 EOF
3665
3666 fi
3667
3668 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3669 echo "configure:3670: checking for ssize_t" >&5
3670 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3671   echo $ac_n "(cached) $ac_c" 1>&6
3672 else
3673   cat > conftest.$ac_ext <<EOF
3674 #line 3675 "configure"
3675 #include "confdefs.h"
3676 #include <sys/types.h>
3677 #if STDC_HEADERS
3678 #include <stdlib.h>
3679 #include <stddef.h>
3680 #endif
3681 EOF
3682 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3683   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3684   rm -rf conftest*
3685   ac_cv_type_ssize_t=yes
3686 else
3687   rm -rf conftest*
3688   ac_cv_type_ssize_t=no
3689 fi
3690 rm -f conftest*
3691
3692 fi
3693 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3694 if test $ac_cv_type_ssize_t = no; then
3695   cat >> confdefs.h <<\EOF
3696 #define ssize_t int
3697 EOF
3698
3699 fi
3700
3701 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3702 echo "configure:3703: checking for wchar_t" >&5
3703 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3704   echo $ac_n "(cached) $ac_c" 1>&6
3705 else
3706   cat > conftest.$ac_ext <<EOF
3707 #line 3708 "configure"
3708 #include "confdefs.h"
3709 #include <sys/types.h>
3710 #if STDC_HEADERS
3711 #include <stdlib.h>
3712 #include <stddef.h>
3713 #endif
3714 EOF
3715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3716   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3717   rm -rf conftest*
3718   ac_cv_type_wchar_t=yes
3719 else
3720   rm -rf conftest*
3721   ac_cv_type_wchar_t=no
3722 fi
3723 rm -f conftest*
3724
3725 fi
3726 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3727 if test $ac_cv_type_wchar_t = no; then
3728   cat >> confdefs.h <<\EOF
3729 #define wchar_t unsigned short
3730 EOF
3731
3732 fi
3733
3734
3735 ############################################
3736 # for cups support we need libcups, and a handful of header files
3737
3738 # Check whether --enable-cups or --disable-cups was given.
3739 if test "${enable_cups+set}" = set; then
3740   enableval="$enable_cups"
3741   :
3742 fi
3743
3744
3745 if test x$enable_cups != xno; then
3746         # Extract the first word of "cups-config", so it can be a program name with args.
3747 set dummy cups-config; ac_word=$2
3748 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3749 echo "configure:3750: checking for $ac_word" >&5
3750 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
3751   echo $ac_n "(cached) $ac_c" 1>&6
3752 else
3753   case "$CUPS_CONFIG" in
3754   /*)
3755   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
3756   ;;
3757   ?:/*)                  
3758   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path.
3759   ;;
3760   *)
3761   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3762   ac_dummy="$PATH"
3763   for ac_dir in $ac_dummy; do 
3764     test -z "$ac_dir" && ac_dir=.
3765     if test -f $ac_dir/$ac_word; then
3766       ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word"
3767       break
3768     fi
3769   done
3770   IFS="$ac_save_ifs"
3771   ;;
3772 esac
3773 fi
3774 CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG"
3775 if test -n "$CUPS_CONFIG"; then
3776   echo "$ac_t""$CUPS_CONFIG" 1>&6
3777 else
3778   echo "$ac_t""no" 1>&6
3779 fi
3780
3781
3782         if test "x$CUPS_CONFIG" != x; then
3783                         cat >> confdefs.h <<\EOF
3784 #define HAVE_CUPS 1
3785 EOF
3786
3787                 CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
3788                 LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
3789                 PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`"
3790         fi
3791 fi
3792
3793 ############################################
3794 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3795 for ac_func in dlopen
3796 do
3797 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3798 echo "configure:3799: checking for $ac_func" >&5
3799 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3800   echo $ac_n "(cached) $ac_c" 1>&6
3801 else
3802   cat > conftest.$ac_ext <<EOF
3803 #line 3804 "configure"
3804 #include "confdefs.h"
3805 /* System header to define __stub macros and hopefully few prototypes,
3806     which can conflict with char $ac_func(); below.  */
3807 #include <assert.h>
3808 /* Override any gcc2 internal prototype to avoid an error.  */
3809 /* We use char because int might match the return type of a gcc2
3810     builtin and then its argument prototype would still apply.  */
3811 char $ac_func();
3812
3813 int main() {
3814
3815 /* The GNU C library defines this for functions which it implements
3816     to always fail with ENOSYS.  Some functions are actually named
3817     something starting with __ and the normal name is an alias.  */
3818 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3819 choke me
3820 #else
3821 $ac_func();
3822 #endif
3823
3824 ; return 0; }
3825 EOF
3826 if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3827   rm -rf conftest*
3828   eval "ac_cv_func_$ac_func=yes"
3829 else
3830   echo "configure: failed program was:" >&5
3831   cat conftest.$ac_ext >&5
3832   rm -rf conftest*
3833   eval "ac_cv_func_$ac_func=no"
3834 fi
3835 rm -f conftest*
3836 fi
3837
3838 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3839   echo "$ac_t""yes" 1>&6
3840     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3841   cat >> confdefs.h <<EOF
3842 #define $ac_tr_func 1
3843 EOF
3844  
3845 else
3846   echo "$ac_t""no" 1>&6
3847 fi
3848 done
3849
3850 if test x"$ac_cv_func_dlopen" = x"no"; then
3851     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3852 echo "configure:3853: checking for dlopen in -ldl" >&5
3853 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3854 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3855   echo $ac_n "(cached) $ac_c" 1>&6
3856 else
3857   ac_save_LIBS="$LIBS"
3858 LIBS="-ldl  $LIBS"
3859 cat > conftest.$ac_ext <<EOF
3860 #line 3861 "configure"
3861 #include "confdefs.h"
3862 /* Override any gcc2 internal prototype to avoid an error.  */
3863 /* We use char because int might match the return type of a gcc2
3864     builtin and then its argument prototype would still apply.  */
3865 char dlopen();
3866
3867 int main() {
3868 dlopen()
3869 ; return 0; }
3870 EOF
3871 if { (eval echo configure:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3872   rm -rf conftest*
3873   eval "ac_cv_lib_$ac_lib_var=yes"
3874 else
3875   echo "configure: failed program was:" >&5
3876   cat conftest.$ac_ext >&5
3877   rm -rf conftest*
3878   eval "ac_cv_lib_$ac_lib_var=no"
3879 fi
3880 rm -f conftest*
3881 LIBS="$ac_save_LIBS"
3882
3883 fi
3884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3885   echo "$ac_t""yes" 1>&6
3886   LIBS="$LIBS -ldl";
3887         cat >> confdefs.h <<\EOF
3888 #define HAVE_DLOPEN 1
3889 EOF
3890
3891 else
3892   echo "$ac_t""no" 1>&6
3893 fi
3894
3895 fi
3896 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3897
3898 ############################################
3899 # check if the compiler can do immediate structures
3900 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3901 echo "configure:3902: checking for immediate structures" >&5
3902 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3903   echo $ac_n "(cached) $ac_c" 1>&6
3904 else
3905   
3906     cat > conftest.$ac_ext <<EOF
3907 #line 3908 "configure"
3908 #include "confdefs.h"
3909
3910 #include <stdio.h>
3911 int main() {
3912
3913    typedef struct {unsigned x;} FOOBAR;
3914    #define X_FOOBAR(x) ((FOOBAR) { x })
3915    #define FOO_ONE X_FOOBAR(1)
3916    FOOBAR f = FOO_ONE;   
3917    static struct {
3918         FOOBAR y; 
3919         } f2[] = {
3920                 {FOO_ONE}
3921         };   
3922
3923 ; return 0; }
3924 EOF
3925 if { (eval echo configure:3926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3926   rm -rf conftest*
3927   samba_cv_immediate_structures=yes
3928 else
3929   echo "configure: failed program was:" >&5
3930   cat conftest.$ac_ext >&5
3931   rm -rf conftest*
3932   samba_cv_immediate_structures=no
3933 fi
3934 rm -f conftest*
3935 fi
3936
3937 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3938 if test x"$samba_cv_immediate_structures" = x"yes"; then
3939    cat >> confdefs.h <<\EOF
3940 #define HAVE_IMMEDIATE_STRUCTURES 1
3941 EOF
3942
3943 fi
3944
3945 ############################################
3946 # check for unix domain sockets
3947 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3948 echo "configure:3949: checking for unix domain sockets" >&5
3949 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3950   echo $ac_n "(cached) $ac_c" 1>&6
3951 else
3952   
3953     cat > conftest.$ac_ext <<EOF
3954 #line 3955 "configure"
3955 #include "confdefs.h"
3956
3957 #include <sys/types.h>
3958 #include <stdlib.h>
3959 #include <stddef.h>
3960 #include <sys/socket.h>
3961 #include <sys/un.h>
3962 int main() {
3963
3964   struct sockaddr_un sunaddr; 
3965   sunaddr.sun_family = AF_UNIX;
3966
3967 ; return 0; }
3968 EOF
3969 if { (eval echo configure:3970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3970   rm -rf conftest*
3971   samba_cv_unixsocket=yes
3972 else
3973   echo "configure: failed program was:" >&5
3974   cat conftest.$ac_ext >&5
3975   rm -rf conftest*
3976   samba_cv_unixsocket=no
3977 fi
3978 rm -f conftest*
3979 fi
3980
3981 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3982 if test x"$samba_cv_unixsocket" = x"yes"; then
3983    cat >> confdefs.h <<\EOF
3984 #define HAVE_UNIXSOCKET 1
3985 EOF
3986
3987 fi
3988
3989
3990 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3991 echo "configure:3992: checking for socklen_t type" >&5
3992 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3993   echo $ac_n "(cached) $ac_c" 1>&6
3994 else
3995   
3996     cat > conftest.$ac_ext <<EOF
3997 #line 3998 "configure"
3998 #include "confdefs.h"
3999
4000 #include <sys/types.h>
4001 #if STDC_HEADERS
4002 #include <stdlib.h>
4003 #include <stddef.h>
4004 #endif
4005 #include <sys/socket.h>
4006 int main() {
4007 socklen_t i = 0
4008 ; return 0; }
4009 EOF
4010 if { (eval echo configure:4011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4011   rm -rf conftest*
4012   samba_cv_socklen_t=yes
4013 else
4014   echo "configure: failed program was:" >&5
4015   cat conftest.$ac_ext >&5
4016   rm -rf conftest*
4017   samba_cv_socklen_t=no
4018 fi
4019 rm -f conftest*
4020 fi
4021
4022 echo "$ac_t""$samba_cv_socklen_t" 1>&6
4023 if test x"$samba_cv_socklen_t" = x"yes"; then
4024    cat >> confdefs.h <<\EOF
4025 #define HAVE_SOCKLEN_T_TYPE 1
4026 EOF
4027
4028 fi
4029
4030 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
4031 echo "configure:4032: checking for sig_atomic_t type" >&5
4032 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
4033   echo $ac_n "(cached) $ac_c" 1>&6
4034 else
4035   
4036     cat > conftest.$ac_ext <<EOF
4037 #line 4038 "configure"
4038 #include "confdefs.h"
4039
4040 #include <sys/types.h>
4041 #if STDC_HEADERS
4042 #include <stdlib.h>
4043 #include <stddef.h>
4044 #endif
4045 #include <signal.h>
4046 int main() {
4047 sig_atomic_t i = 0
4048 ; return 0; }
4049 EOF
4050 if { (eval echo configure:4051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4051   rm -rf conftest*
4052   samba_cv_sig_atomic_t=yes
4053 else
4054   echo "configure: failed program was:" >&5
4055   cat conftest.$ac_ext >&5
4056   rm -rf conftest*
4057   samba_cv_sig_atomic_t=no
4058 fi
4059 rm -f conftest*
4060 fi
4061
4062 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4063 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4064    cat >> confdefs.h <<\EOF
4065 #define HAVE_SIG_ATOMIC_T_TYPE 1
4066 EOF
4067
4068 fi
4069
4070 # stupid headers have the functions but no declaration. grrrr.
4071
4072  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4073 echo "configure:4074: checking for errno declaration" >&5
4074 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4075   echo $ac_n "(cached) $ac_c" 1>&6
4076 else
4077   
4078     cat > conftest.$ac_ext <<EOF
4079 #line 4080 "configure"
4080 #include "confdefs.h"
4081 #include <errno.h>
4082 int main() {
4083 int i = (int)errno
4084 ; return 0; }
4085 EOF
4086 if { (eval echo configure:4087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4087   rm -rf conftest*
4088   ac_cv_have_errno_decl=yes
4089 else
4090   echo "configure: failed program was:" >&5
4091   cat conftest.$ac_ext >&5
4092   rm -rf conftest*
4093   ac_cv_have_errno_decl=no
4094 fi
4095 rm -f conftest*
4096 fi
4097
4098 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4099  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4100     cat >> confdefs.h <<\EOF
4101 #define HAVE_ERRNO_DECL 1
4102 EOF
4103
4104  fi
4105
4106
4107  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4108 echo "configure:4109: checking for setresuid declaration" >&5
4109 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4110   echo $ac_n "(cached) $ac_c" 1>&6
4111 else
4112   
4113     cat > conftest.$ac_ext <<EOF
4114 #line 4115 "configure"
4115 #include "confdefs.h"
4116 #include <unistd.h>
4117 int main() {
4118 int i = (int)setresuid
4119 ; return 0; }
4120 EOF
4121 if { (eval echo configure:4122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4122   rm -rf conftest*
4123   ac_cv_have_setresuid_decl=yes
4124 else
4125   echo "configure: failed program was:" >&5
4126   cat conftest.$ac_ext >&5
4127   rm -rf conftest*
4128   ac_cv_have_setresuid_decl=no
4129 fi
4130 rm -f conftest*
4131 fi
4132
4133 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4134  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4135     cat >> confdefs.h <<\EOF
4136 #define HAVE_SETRESUID_DECL 1
4137 EOF
4138
4139  fi
4140
4141
4142  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4143 echo "configure:4144: checking for setresgid declaration" >&5
4144 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4145   echo $ac_n "(cached) $ac_c" 1>&6
4146 else
4147   
4148     cat > conftest.$ac_ext <<EOF
4149 #line 4150 "configure"
4150 #include "confdefs.h"
4151 #include <unistd.h>
4152 int main() {
4153 int i = (int)setresgid
4154 ; return 0; }
4155 EOF
4156 if { (eval echo configure:4157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4157   rm -rf conftest*
4158   ac_cv_have_setresgid_decl=yes
4159 else
4160   echo "configure: failed program was:" >&5
4161   cat conftest.$ac_ext >&5
4162   rm -rf conftest*
4163   ac_cv_have_setresgid_decl=no
4164 fi
4165 rm -f conftest*
4166 fi
4167
4168 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4169  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4170     cat >> confdefs.h <<\EOF
4171 #define HAVE_SETRESGID_DECL 1
4172 EOF
4173
4174  fi
4175
4176
4177  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4178 echo "configure:4179: checking for asprintf declaration" >&5
4179 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4180   echo $ac_n "(cached) $ac_c" 1>&6
4181 else
4182   
4183     cat > conftest.$ac_ext <<EOF
4184 #line 4185 "configure"
4185 #include "confdefs.h"
4186 #include <stdio.h>
4187 int main() {
4188 int i = (int)asprintf
4189 ; return 0; }
4190 EOF
4191 if { (eval echo configure:4192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4192   rm -rf conftest*
4193   ac_cv_have_asprintf_decl=yes
4194 else
4195   echo "configure: failed program was:" >&5
4196   cat conftest.$ac_ext >&5
4197   rm -rf conftest*
4198   ac_cv_have_asprintf_decl=no
4199 fi
4200 rm -f conftest*
4201 fi
4202
4203 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4204  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4205     cat >> confdefs.h <<\EOF
4206 #define HAVE_ASPRINTF_DECL 1
4207 EOF
4208
4209  fi
4210
4211
4212  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4213 echo "configure:4214: checking for vasprintf declaration" >&5
4214 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4215   echo $ac_n "(cached) $ac_c" 1>&6
4216 else
4217   
4218     cat > conftest.$ac_ext <<EOF
4219 #line 4220 "configure"
4220 #include "confdefs.h"
4221 #include <stdio.h>
4222 int main() {
4223 int i = (int)vasprintf
4224 ; return 0; }
4225 EOF
4226 if { (eval echo configure:4227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4227   rm -rf conftest*
4228   ac_cv_have_vasprintf_decl=yes
4229 else
4230   echo "configure: failed program was:" >&5
4231   cat conftest.$ac_ext >&5
4232   rm -rf conftest*
4233   ac_cv_have_vasprintf_decl=no
4234 fi
4235 rm -f conftest*
4236 fi
4237
4238 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4239  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4240     cat >> confdefs.h <<\EOF
4241 #define HAVE_VASPRINTF_DECL 1
4242 EOF
4243
4244  fi
4245
4246
4247  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4248 echo "configure:4249: checking for vsnprintf declaration" >&5
4249 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4250   echo $ac_n "(cached) $ac_c" 1>&6
4251 else
4252   
4253     cat > conftest.$ac_ext <<EOF
4254 #line 4255 "configure"
4255 #include "confdefs.h"
4256 #include <stdio.h>
4257 int main() {
4258 int i = (int)vsnprintf
4259 ; return 0; }
4260 EOF
4261 if { (eval echo configure:4262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4262   rm -rf conftest*
4263   ac_cv_have_vsnprintf_decl=yes
4264 else
4265   echo "configure: failed program was:" >&5
4266   cat conftest.$ac_ext >&5
4267   rm -rf conftest*
4268   ac_cv_have_vsnprintf_decl=no
4269 fi
4270 rm -f conftest*
4271 fi
4272
4273 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4274  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4275     cat >> confdefs.h <<\EOF
4276 #define HAVE_VSNPRINTF_DECL 1
4277 EOF
4278
4279  fi
4280
4281
4282  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4283 echo "configure:4284: checking for snprintf declaration" >&5
4284 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4285   echo $ac_n "(cached) $ac_c" 1>&6
4286 else
4287   
4288     cat > conftest.$ac_ext <<EOF
4289 #line 4290 "configure"
4290 #include "confdefs.h"
4291 #include <stdio.h>
4292 int main() {
4293 int i = (int)snprintf
4294 ; return 0; }
4295 EOF
4296 if { (eval echo configure:4297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4297   rm -rf conftest*
4298   ac_cv_have_snprintf_decl=yes
4299 else
4300   echo "configure: failed program was:" >&5
4301   cat conftest.$ac_ext >&5
4302   rm -rf conftest*
4303   ac_cv_have_snprintf_decl=no
4304 fi
4305 rm -f conftest*
4306 fi
4307
4308 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4309  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4310     cat >> confdefs.h <<\EOF
4311 #define HAVE_SNPRINTF_DECL 1
4312 EOF
4313
4314  fi
4315
4316
4317 # and glibc has setresuid under linux but the function does
4318 # nothing until kernel 2.1.44! very dumb.
4319 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4320 echo "configure:4321: checking for real setresuid" >&5
4321 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4322   echo $ac_n "(cached) $ac_c" 1>&6
4323 else
4324   
4325     if test "$cross_compiling" = yes; then
4326   samba_cv_have_setresuid=cross
4327 else
4328   cat > conftest.$ac_ext <<EOF
4329 #line 4330 "configure"
4330 #include "confdefs.h"
4331 #include <errno.h>
4332 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4333 EOF
4334 if { (eval echo configure:4335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4335 then
4336   samba_cv_have_setresuid=yes
4337 else
4338   echo "configure: failed program was:" >&5
4339   cat conftest.$ac_ext >&5
4340   rm -fr conftest*
4341   samba_cv_have_setresuid=no
4342 fi
4343 rm -fr conftest*
4344 fi
4345
4346 fi
4347
4348 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4349 if test x"$samba_cv_have_setresuid" = x"yes"; then
4350     cat >> confdefs.h <<\EOF
4351 #define HAVE_SETRESUID 1
4352 EOF
4353
4354 fi
4355
4356 # Do the same check for setresguid...
4357 #
4358 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4359 echo "configure:4360: checking for real setresgid" >&5
4360 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4361   echo $ac_n "(cached) $ac_c" 1>&6
4362 else
4363   
4364     if test "$cross_compiling" = yes; then
4365   samba_cv_have_setresgid=cross
4366 else
4367   cat > conftest.$ac_ext <<EOF
4368 #line 4369 "configure"
4369 #include "confdefs.h"
4370 #include <unistd.h>
4371 #include <errno.h>
4372 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4373 EOF
4374 if { (eval echo configure:4375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4375 then
4376   samba_cv_have_setresgid=yes
4377 else
4378   echo "configure: failed program was:" >&5
4379   cat conftest.$ac_ext >&5
4380   rm -fr conftest*
4381   samba_cv_have_setresgid=no
4382 fi
4383 rm -fr conftest*
4384 fi
4385
4386 fi
4387
4388 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4389 if test x"$samba_cv_have_setresgid" = x"yes"; then
4390     cat >> confdefs.h <<\EOF
4391 #define HAVE_SETRESGID 1
4392 EOF
4393
4394 fi
4395
4396 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4397 echo "configure:4398: checking for 8-bit clean memcmp" >&5
4398 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4399   echo $ac_n "(cached) $ac_c" 1>&6
4400 else
4401   if test "$cross_compiling" = yes; then
4402   ac_cv_func_memcmp_clean=no
4403 else
4404   cat > conftest.$ac_ext <<EOF
4405 #line 4406 "configure"
4406 #include "confdefs.h"
4407
4408 main()
4409 {
4410   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4411   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4412 }
4413
4414 EOF
4415 if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4416 then
4417   ac_cv_func_memcmp_clean=yes
4418 else
4419   echo "configure: failed program was:" >&5
4420   cat conftest.$ac_ext >&5
4421   rm -fr conftest*
4422   ac_cv_func_memcmp_clean=no
4423 fi
4424 rm -fr conftest*
4425 fi
4426
4427 fi
4428
4429 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4430 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4431
4432
4433 ###############################################
4434 # test for where we get crypt() from
4435 for ac_func in crypt
4436 do
4437 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4438 echo "configure:4439: checking for $ac_func" >&5
4439 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4440   echo $ac_n "(cached) $ac_c" 1>&6
4441 else
4442   cat > conftest.$ac_ext <<EOF
4443 #line 4444 "configure"
4444 #include "confdefs.h"
4445 /* System header to define __stub macros and hopefully few prototypes,
4446     which can conflict with char $ac_func(); below.  */
4447 #include <assert.h>
4448 /* Override any gcc2 internal prototype to avoid an error.  */
4449 /* We use char because int might match the return type of a gcc2
4450     builtin and then its argument prototype would still apply.  */
4451 char $ac_func();
4452
4453 int main() {
4454
4455 /* The GNU C library defines this for functions which it implements
4456     to always fail with ENOSYS.  Some functions are actually named
4457     something starting with __ and the normal name is an alias.  */
4458 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4459 choke me
4460 #else
4461 $ac_func();
4462 #endif
4463
4464 ; return 0; }
4465 EOF
4466 if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4467   rm -rf conftest*
4468   eval "ac_cv_func_$ac_func=yes"
4469 else
4470   echo "configure: failed program was:" >&5
4471   cat conftest.$ac_ext >&5
4472   rm -rf conftest*
4473   eval "ac_cv_func_$ac_func=no"
4474 fi
4475 rm -f conftest*
4476 fi
4477
4478 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4479   echo "$ac_t""yes" 1>&6
4480     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4481   cat >> confdefs.h <<EOF
4482 #define $ac_tr_func 1
4483 EOF
4484  
4485 else
4486   echo "$ac_t""no" 1>&6
4487 fi
4488 done
4489
4490 if test x"$ac_cv_func_crypt" = x"no"; then
4491     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4492 echo "configure:4493: checking for crypt in -lcrypt" >&5
4493 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4494 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4495   echo $ac_n "(cached) $ac_c" 1>&6
4496 else
4497   ac_save_LIBS="$LIBS"
4498 LIBS="-lcrypt  $LIBS"
4499 cat > conftest.$ac_ext <<EOF
4500 #line 4501 "configure"
4501 #include "confdefs.h"
4502 /* Override any gcc2 internal prototype to avoid an error.  */
4503 /* We use char because int might match the return type of a gcc2
4504     builtin and then its argument prototype would still apply.  */
4505 char crypt();
4506
4507 int main() {
4508 crypt()
4509 ; return 0; }
4510 EOF
4511 if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4512   rm -rf conftest*
4513   eval "ac_cv_lib_$ac_lib_var=yes"
4514 else
4515   echo "configure: failed program was:" >&5
4516   cat conftest.$ac_ext >&5
4517   rm -rf conftest*
4518   eval "ac_cv_lib_$ac_lib_var=no"
4519 fi
4520 rm -f conftest*
4521 LIBS="$ac_save_LIBS"
4522
4523 fi
4524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4525   echo "$ac_t""yes" 1>&6
4526   LIBS="$LIBS -lcrypt";
4527         cat >> confdefs.h <<\EOF
4528 #define HAVE_CRYPT 1
4529 EOF
4530
4531 else
4532   echo "$ac_t""no" 1>&6
4533 fi
4534
4535 fi
4536
4537
4538 ###############################################
4539 # Readline included by default unless explicitly asked not to
4540 test "${with_readline+set}" != "set" && with_readline=yes
4541
4542 # test for where we get readline() from
4543 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4544 echo "configure:4545: checking whether to use readline" >&5
4545 # Check whether --with-readline or --without-readline was given.
4546 if test "${with_readline+set}" = set; then
4547   withval="$with_readline"
4548     case "$with_readline" in
4549   yes)
4550     echo "$ac_t""yes" 1>&6
4551
4552     for ac_hdr in readline.h history.h readline/readline.h
4553 do
4554 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4555 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4556 echo "configure:4557: checking for $ac_hdr" >&5
4557 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4558   echo $ac_n "(cached) $ac_c" 1>&6
4559 else
4560   cat > conftest.$ac_ext <<EOF
4561 #line 4562 "configure"
4562 #include "confdefs.h"
4563 #include <$ac_hdr>
4564 EOF
4565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4566 { (eval echo configure:4567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4568 if test -z "$ac_err"; then
4569   rm -rf conftest*
4570   eval "ac_cv_header_$ac_safe=yes"
4571 else
4572   echo "$ac_err" >&5
4573   echo "configure: failed program was:" >&5
4574   cat conftest.$ac_ext >&5
4575   rm -rf conftest*
4576   eval "ac_cv_header_$ac_safe=no"
4577 fi
4578 rm -f conftest*
4579 fi
4580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4581   echo "$ac_t""yes" 1>&6
4582     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4583   cat >> confdefs.h <<EOF
4584 #define $ac_tr_hdr 1
4585 EOF
4586  
4587 else
4588   echo "$ac_t""no" 1>&6
4589 fi
4590 done
4591
4592     for ac_hdr in readline/history.h
4593 do
4594 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4595 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4596 echo "configure:4597: checking for $ac_hdr" >&5
4597 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4598   echo $ac_n "(cached) $ac_c" 1>&6
4599 else
4600   cat > conftest.$ac_ext <<EOF
4601 #line 4602 "configure"
4602 #include "confdefs.h"
4603 #include <$ac_hdr>
4604 EOF
4605 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4606 { (eval echo configure:4607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4607 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4608 if test -z "$ac_err"; then
4609   rm -rf conftest*
4610   eval "ac_cv_header_$ac_safe=yes"
4611 else
4612   echo "$ac_err" >&5
4613   echo "configure: failed program was:" >&5
4614   cat conftest.$ac_ext >&5
4615   rm -rf conftest*
4616   eval "ac_cv_header_$ac_safe=no"
4617 fi
4618 rm -f conftest*
4619 fi
4620 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4621   echo "$ac_t""yes" 1>&6
4622     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4623   cat >> confdefs.h <<EOF
4624 #define $ac_tr_hdr 1
4625 EOF
4626  
4627 else
4628   echo "$ac_t""no" 1>&6
4629 fi
4630 done
4631
4632
4633     for ac_hdr in readline.h readline/readline.h
4634 do
4635 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4636 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4637 echo "configure:4638: checking for $ac_hdr" >&5
4638 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4639   echo $ac_n "(cached) $ac_c" 1>&6
4640 else
4641   cat > conftest.$ac_ext <<EOF
4642 #line 4643 "configure"
4643 #include "confdefs.h"
4644 #include <$ac_hdr>
4645 EOF
4646 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4647 { (eval echo configure:4648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4648 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4649 if test -z "$ac_err"; then
4650   rm -rf conftest*
4651   eval "ac_cv_header_$ac_safe=yes"
4652 else
4653   echo "$ac_err" >&5
4654   echo "configure: failed program was:" >&5
4655   cat conftest.$ac_ext >&5
4656   rm -rf conftest*
4657   eval "ac_cv_header_$ac_safe=no"
4658 fi
4659 rm -f conftest*
4660 fi
4661 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4662   echo "$ac_t""yes" 1>&6
4663     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4664   cat >> confdefs.h <<EOF
4665 #define $ac_tr_hdr 1
4666 EOF
4667  
4668       for termlib in ncurses curses termcap terminfo termlib; do
4669        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4670 echo "configure:4671: checking for tgetent in -l${termlib}" >&5
4671 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4672 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4673   echo $ac_n "(cached) $ac_c" 1>&6
4674 else
4675   ac_save_LIBS="$LIBS"
4676 LIBS="-l${termlib}  $LIBS"
4677 cat > conftest.$ac_ext <<EOF
4678 #line 4679 "configure"
4679 #include "confdefs.h"
4680 /* Override any gcc2 internal prototype to avoid an error.  */
4681 /* We use char because int might match the return type of a gcc2
4682     builtin and then its argument prototype would still apply.  */
4683 char tgetent();
4684
4685 int main() {
4686 tgetent()
4687 ; return 0; }
4688 EOF
4689 if { (eval echo configure:4690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4690   rm -rf conftest*
4691   eval "ac_cv_lib_$ac_lib_var=yes"
4692 else
4693   echo "configure: failed program was:" >&5
4694   cat conftest.$ac_ext >&5
4695   rm -rf conftest*
4696   eval "ac_cv_lib_$ac_lib_var=no"
4697 fi
4698 rm -f conftest*
4699 LIBS="$ac_save_LIBS"
4700
4701 fi
4702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4703   echo "$ac_t""yes" 1>&6
4704   TERMLIBS="-l${termlib}"; break
4705 else
4706   echo "$ac_t""no" 1>&6
4707 fi
4708
4709       done
4710       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4711 echo "configure:4712: checking for rl_callback_handler_install in -lreadline" >&5
4712 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4713 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4714   echo $ac_n "(cached) $ac_c" 1>&6
4715 else
4716   ac_save_LIBS="$LIBS"
4717 LIBS="-lreadline $TERMLIBS $LIBS"
4718 cat > conftest.$ac_ext <<EOF
4719 #line 4720 "configure"
4720 #include "confdefs.h"
4721 /* Override any gcc2 internal prototype to avoid an error.  */
4722 /* We use char because int might match the return type of a gcc2
4723     builtin and then its argument prototype would still apply.  */
4724 char rl_callback_handler_install();
4725
4726 int main() {
4727 rl_callback_handler_install()
4728 ; return 0; }
4729 EOF
4730 if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4731   rm -rf conftest*
4732   eval "ac_cv_lib_$ac_lib_var=yes"
4733 else
4734   echo "configure: failed program was:" >&5
4735   cat conftest.$ac_ext >&5
4736   rm -rf conftest*
4737   eval "ac_cv_lib_$ac_lib_var=no"
4738 fi
4739 rm -f conftest*
4740 LIBS="$ac_save_LIBS"
4741
4742 fi
4743 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4744   echo "$ac_t""yes" 1>&6
4745   TERMLIBS="-lreadline $TERMLIBS"
4746        cat >> confdefs.h <<\EOF
4747 #define HAVE_LIBREADLINE 1
4748 EOF
4749
4750        break
4751 else
4752   echo "$ac_t""no" 1>&6
4753 TERMLIBS=
4754 fi
4755
4756 else
4757   echo "$ac_t""no" 1>&6
4758 fi
4759 done
4760
4761     ;;
4762   no)
4763     echo "$ac_t""no" 1>&6
4764     ;;
4765   *)
4766     echo "$ac_t""yes" 1>&6
4767
4768     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4769     # alternate readline path
4770     _ldflags=${LDFLAGS}
4771     _cppflags=${CPPFLAGS}
4772
4773     # Add additional search path
4774     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4775     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4776
4777     for ac_hdr in readline.h history.h readline/readline.h
4778 do
4779 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4780 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4781 echo "configure:4782: checking for $ac_hdr" >&5
4782 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4783   echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785   cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4788 #include <$ac_hdr>
4789 EOF
4790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4791 { (eval echo configure:4792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4792 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4793 if test -z "$ac_err"; then
4794   rm -rf conftest*
4795   eval "ac_cv_header_$ac_safe=yes"
4796 else
4797   echo "$ac_err" >&5
4798   echo "configure: failed program was:" >&5
4799   cat conftest.$ac_ext >&5
4800   rm -rf conftest*
4801   eval "ac_cv_header_$ac_safe=no"
4802 fi
4803 rm -f conftest*
4804 fi
4805 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4806   echo "$ac_t""yes" 1>&6
4807     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4808   cat >> confdefs.h <<EOF
4809 #define $ac_tr_hdr 1
4810 EOF
4811  
4812 else
4813   echo "$ac_t""no" 1>&6
4814 fi
4815 done
4816
4817     for ac_hdr in readline/history.h
4818 do
4819 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4820 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4821 echo "configure:4822: checking for $ac_hdr" >&5
4822 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4823   echo $ac_n "(cached) $ac_c" 1>&6
4824 else
4825   cat > conftest.$ac_ext <<EOF
4826 #line 4827 "configure"
4827 #include "confdefs.h"
4828 #include <$ac_hdr>
4829 EOF
4830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4831 { (eval echo configure:4832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4833 if test -z "$ac_err"; then
4834   rm -rf conftest*
4835   eval "ac_cv_header_$ac_safe=yes"
4836 else
4837   echo "$ac_err" >&5
4838   echo "configure: failed program was:" >&5
4839   cat conftest.$ac_ext >&5
4840   rm -rf conftest*
4841   eval "ac_cv_header_$ac_safe=no"
4842 fi
4843 rm -f conftest*
4844 fi
4845 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4846   echo "$ac_t""yes" 1>&6
4847     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4848   cat >> confdefs.h <<EOF
4849 #define $ac_tr_hdr 1
4850 EOF
4851  
4852 else
4853   echo "$ac_t""no" 1>&6
4854 fi
4855 done
4856
4857
4858     for ac_hdr in readline.h readline/readline.h
4859 do
4860 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4861 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4862 echo "configure:4863: checking for $ac_hdr" >&5
4863 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4864   echo $ac_n "(cached) $ac_c" 1>&6
4865 else
4866   cat > conftest.$ac_ext <<EOF
4867 #line 4868 "configure"
4868 #include "confdefs.h"
4869 #include <$ac_hdr>
4870 EOF
4871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4872 { (eval echo configure:4873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4874 if test -z "$ac_err"; then
4875   rm -rf conftest*
4876   eval "ac_cv_header_$ac_safe=yes"
4877 else
4878   echo "$ac_err" >&5
4879   echo "configure: failed program was:" >&5
4880   cat conftest.$ac_ext >&5
4881   rm -rf conftest*
4882   eval "ac_cv_header_$ac_safe=no"
4883 fi
4884 rm -f conftest*
4885 fi
4886 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4887   echo "$ac_t""yes" 1>&6
4888     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4889   cat >> confdefs.h <<EOF
4890 #define $ac_tr_hdr 1
4891 EOF
4892  
4893       for termlib in ncurses curses termcap terminfo termlib; do
4894        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4895 echo "configure:4896: checking for tgetent in -l${termlib}" >&5
4896 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4897 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4898   echo $ac_n "(cached) $ac_c" 1>&6
4899 else
4900   ac_save_LIBS="$LIBS"
4901 LIBS="-l${termlib}  $LIBS"
4902 cat > conftest.$ac_ext <<EOF
4903 #line 4904 "configure"
4904 #include "confdefs.h"
4905 /* Override any gcc2 internal prototype to avoid an error.  */
4906 /* We use char because int might match the return type of a gcc2
4907     builtin and then its argument prototype would still apply.  */
4908 char tgetent();
4909
4910 int main() {
4911 tgetent()
4912 ; return 0; }
4913 EOF
4914 if { (eval echo configure:4915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4915   rm -rf conftest*
4916   eval "ac_cv_lib_$ac_lib_var=yes"
4917 else
4918   echo "configure: failed program was:" >&5
4919   cat conftest.$ac_ext >&5
4920   rm -rf conftest*
4921   eval "ac_cv_lib_$ac_lib_var=no"
4922 fi
4923 rm -f conftest*
4924 LIBS="$ac_save_LIBS"
4925
4926 fi
4927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4928   echo "$ac_t""yes" 1>&6
4929   TERMLIBS="-l${termlib}"; break
4930 else
4931   echo "$ac_t""no" 1>&6
4932 fi
4933
4934       done
4935       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4936 echo "configure:4937: checking for rl_callback_handler_install in -lreadline" >&5
4937 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4938 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4939   echo $ac_n "(cached) $ac_c" 1>&6
4940 else
4941   ac_save_LIBS="$LIBS"
4942 LIBS="-lreadline $TERMLIBS $LIBS"
4943 cat > conftest.$ac_ext <<EOF
4944 #line 4945 "configure"
4945 #include "confdefs.h"
4946 /* Override any gcc2 internal prototype to avoid an error.  */
4947 /* We use char because int might match the return type of a gcc2
4948     builtin and then its argument prototype would still apply.  */
4949 char rl_callback_handler_install();
4950
4951 int main() {
4952 rl_callback_handler_install()
4953 ; return 0; }
4954 EOF
4955 if { (eval echo configure:4956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4956   rm -rf conftest*
4957   eval "ac_cv_lib_$ac_lib_var=yes"
4958 else
4959   echo "configure: failed program was:" >&5
4960   cat conftest.$ac_ext >&5
4961   rm -rf conftest*
4962   eval "ac_cv_lib_$ac_lib_var=no"
4963 fi
4964 rm -f conftest*
4965 LIBS="$ac_save_LIBS"
4966
4967 fi
4968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4969   echo "$ac_t""yes" 1>&6
4970   TERMLDFLAGS="-L$with_readline/lib"
4971        TERMCPPFLAGS="-I$with_readline/include"
4972        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4973        TERMLIBS="-lreadline $TERMLIBS"
4974        cat >> confdefs.h <<\EOF
4975 #define HAVE_LIBREADLINE 1
4976 EOF
4977
4978        break
4979 else
4980   echo "$ac_t""no" 1>&6
4981 TERMLIBS= CPPFLAGS=$_cppflags
4982 fi
4983
4984 else
4985   echo "$ac_t""no" 1>&6
4986 fi
4987 done
4988
4989
4990     LDFLAGS=$_ldflags
4991     ;;
4992   esac
4993 else
4994   echo "$ac_t""no" 1>&6
4995
4996 fi
4997
4998
4999
5000
5001 # The readline API changed slightly from readline3 to readline4, so
5002 # code will generate warnings on one of them unless we have a few
5003 # special cases.
5004 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
5005 echo "configure:5006: checking for rl_completion_matches in -lreadline" >&5
5006 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
5007 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5008   echo $ac_n "(cached) $ac_c" 1>&6
5009 else
5010   ac_save_LIBS="$LIBS"
5011 LIBS="-lreadline $TERMLIBS $LIBS"
5012 cat > conftest.$ac_ext <<EOF
5013 #line 5014 "configure"
5014 #include "confdefs.h"
5015 /* Override any gcc2 internal prototype to avoid an error.  */
5016 /* We use char because int might match the return type of a gcc2
5017     builtin and then its argument prototype would still apply.  */
5018 char rl_completion_matches();
5019
5020 int main() {
5021 rl_completion_matches()
5022 ; return 0; }
5023 EOF
5024 if { (eval echo configure:5025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5025   rm -rf conftest*
5026   eval "ac_cv_lib_$ac_lib_var=yes"
5027 else
5028   echo "configure: failed program was:" >&5
5029   cat conftest.$ac_ext >&5
5030   rm -rf conftest*
5031   eval "ac_cv_lib_$ac_lib_var=no"
5032 fi
5033 rm -f conftest*
5034 LIBS="$ac_save_LIBS"
5035
5036 fi
5037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5038   echo "$ac_t""yes" 1>&6
5039   cat >> confdefs.h <<\EOF
5040 #define HAVE_NEW_LIBREADLINE 1
5041 EOF
5042
5043 else
5044   echo "$ac_t""no" 1>&6
5045 fi
5046
5047
5048 # The following test taken from the cvs sources
5049 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5050 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5051 # libsocket.so which has a bad implementation of gethostbyname (it
5052 # only looks in /etc/hosts), so we only look for -lsocket if we need
5053 # it.
5054 for ac_func in connect
5055 do
5056 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5057 echo "configure:5058: checking for $ac_func" >&5
5058 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5059   echo $ac_n "(cached) $ac_c" 1>&6
5060 else
5061   cat > conftest.$ac_ext <<EOF
5062 #line 5063 "configure"
5063 #include "confdefs.h"
5064 /* System header to define __stub macros and hopefully few prototypes,
5065     which can conflict with char $ac_func(); below.  */
5066 #include <assert.h>
5067 /* Override any gcc2 internal prototype to avoid an error.  */
5068 /* We use char because int might match the return type of a gcc2
5069     builtin and then its argument prototype would still apply.  */
5070 char $ac_func();
5071
5072 int main() {
5073
5074 /* The GNU C library defines this for functions which it implements
5075     to always fail with ENOSYS.  Some functions are actually named
5076     something starting with __ and the normal name is an alias.  */
5077 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5078 choke me
5079 #else
5080 $ac_func();
5081 #endif
5082
5083 ; return 0; }
5084 EOF
5085 if { (eval echo configure:5086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5086   rm -rf conftest*
5087   eval "ac_cv_func_$ac_func=yes"
5088 else
5089   echo "configure: failed program was:" >&5
5090   cat conftest.$ac_ext >&5
5091   rm -rf conftest*
5092   eval "ac_cv_func_$ac_func=no"
5093 fi
5094 rm -f conftest*
5095 fi
5096
5097 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5098   echo "$ac_t""yes" 1>&6
5099     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5100   cat >> confdefs.h <<EOF
5101 #define $ac_tr_func 1
5102 EOF
5103  
5104 else
5105   echo "$ac_t""no" 1>&6
5106 fi
5107 done
5108
5109 if test x"$ac_cv_func_connect" = x"no"; then
5110     case "$LIBS" in
5111     *-lnsl*) ;;
5112     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5113 echo "configure:5114: checking for printf in -lnsl_s" >&5
5114 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5115 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5116   echo $ac_n "(cached) $ac_c" 1>&6
5117 else
5118   ac_save_LIBS="$LIBS"
5119 LIBS="-lnsl_s  $LIBS"
5120 cat > conftest.$ac_ext <<EOF
5121 #line 5122 "configure"
5122 #include "confdefs.h"
5123 /* Override any gcc2 internal prototype to avoid an error.  */
5124 /* We use char because int might match the return type of a gcc2
5125     builtin and then its argument prototype would still apply.  */
5126 char printf();
5127
5128 int main() {
5129 printf()
5130 ; return 0; }
5131 EOF
5132 if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5133   rm -rf conftest*
5134   eval "ac_cv_lib_$ac_lib_var=yes"
5135 else
5136   echo "configure: failed program was:" >&5
5137   cat conftest.$ac_ext >&5
5138   rm -rf conftest*
5139   eval "ac_cv_lib_$ac_lib_var=no"
5140 fi
5141 rm -f conftest*
5142 LIBS="$ac_save_LIBS"
5143
5144 fi
5145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5146   echo "$ac_t""yes" 1>&6
5147     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5148     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5149   cat >> confdefs.h <<EOF
5150 #define $ac_tr_lib 1
5151 EOF
5152
5153   LIBS="-lnsl_s $LIBS"
5154
5155 else
5156   echo "$ac_t""no" 1>&6
5157 fi
5158  ;;
5159     esac
5160     case "$LIBS" in
5161     *-lnsl*) ;;
5162     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5163 echo "configure:5164: checking for printf in -lnsl" >&5
5164 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5165 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5166   echo $ac_n "(cached) $ac_c" 1>&6
5167 else
5168   ac_save_LIBS="$LIBS"
5169 LIBS="-lnsl  $LIBS"
5170 cat > conftest.$ac_ext <<EOF
5171 #line 5172 "configure"
5172 #include "confdefs.h"
5173 /* Override any gcc2 internal prototype to avoid an error.  */
5174 /* We use char because int might match the return type of a gcc2
5175     builtin and then its argument prototype would still apply.  */
5176 char printf();
5177
5178 int main() {
5179 printf()
5180 ; return 0; }
5181 EOF
5182 if { (eval echo configure:5183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5183   rm -rf conftest*
5184   eval "ac_cv_lib_$ac_lib_var=yes"
5185 else
5186   echo "configure: failed program was:" >&5
5187   cat conftest.$ac_ext >&5
5188   rm -rf conftest*
5189   eval "ac_cv_lib_$ac_lib_var=no"
5190 fi
5191 rm -f conftest*
5192 LIBS="$ac_save_LIBS"
5193
5194 fi
5195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5196   echo "$ac_t""yes" 1>&6
5197     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5198     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5199   cat >> confdefs.h <<EOF
5200 #define $ac_tr_lib 1
5201 EOF
5202
5203   LIBS="-lnsl $LIBS"
5204
5205 else
5206   echo "$ac_t""no" 1>&6
5207 fi
5208  ;;
5209     esac
5210     case "$LIBS" in
5211     *-lsocket*) ;;
5212     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5213 echo "configure:5214: checking for connect in -lsocket" >&5
5214 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5215 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5216   echo $ac_n "(cached) $ac_c" 1>&6
5217 else
5218   ac_save_LIBS="$LIBS"
5219 LIBS="-lsocket  $LIBS"
5220 cat > conftest.$ac_ext <<EOF
5221 #line 5222 "configure"
5222 #include "confdefs.h"
5223 /* Override any gcc2 internal prototype to avoid an error.  */
5224 /* We use char because int might match the return type of a gcc2
5225     builtin and then its argument prototype would still apply.  */
5226 char connect();
5227
5228 int main() {
5229 connect()
5230 ; return 0; }
5231 EOF
5232 if { (eval echo configure:5233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5233   rm -rf conftest*
5234   eval "ac_cv_lib_$ac_lib_var=yes"
5235 else
5236   echo "configure: failed program was:" >&5
5237   cat conftest.$ac_ext >&5
5238   rm -rf conftest*
5239   eval "ac_cv_lib_$ac_lib_var=no"
5240 fi
5241 rm -f conftest*
5242 LIBS="$ac_save_LIBS"
5243
5244 fi
5245 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5246   echo "$ac_t""yes" 1>&6
5247     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5248     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5249   cat >> confdefs.h <<EOF
5250 #define $ac_tr_lib 1
5251 EOF
5252
5253   LIBS="-lsocket $LIBS"
5254
5255 else
5256   echo "$ac_t""no" 1>&6
5257 fi
5258  ;;
5259     esac
5260     case "$LIBS" in
5261     *-linet*) ;;
5262     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5263 echo "configure:5264: checking for connect in -linet" >&5
5264 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5265 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5266   echo $ac_n "(cached) $ac_c" 1>&6
5267 else
5268   ac_save_LIBS="$LIBS"
5269 LIBS="-linet  $LIBS"
5270 cat > conftest.$ac_ext <<EOF
5271 #line 5272 "configure"
5272 #include "confdefs.h"
5273 /* Override any gcc2 internal prototype to avoid an error.  */
5274 /* We use char because int might match the return type of a gcc2
5275     builtin and then its argument prototype would still apply.  */
5276 char connect();
5277
5278 int main() {
5279 connect()
5280 ; return 0; }
5281 EOF
5282 if { (eval echo configure:5283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5283   rm -rf conftest*
5284   eval "ac_cv_lib_$ac_lib_var=yes"
5285 else
5286   echo "configure: failed program was:" >&5
5287   cat conftest.$ac_ext >&5
5288   rm -rf conftest*
5289   eval "ac_cv_lib_$ac_lib_var=no"
5290 fi
5291 rm -f conftest*
5292 LIBS="$ac_save_LIBS"
5293
5294 fi
5295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5296   echo "$ac_t""yes" 1>&6
5297     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5298     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5299   cat >> confdefs.h <<EOF
5300 #define $ac_tr_lib 1
5301 EOF
5302
5303   LIBS="-linet $LIBS"
5304
5305 else
5306   echo "$ac_t""no" 1>&6
5307 fi
5308  ;;
5309     esac
5310             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5311        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5312         # ac_cv_func_connect=yes
5313         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5314         cat >> confdefs.h <<\EOF
5315 #define HAVE_CONNECT 1
5316 EOF
5317
5318     fi
5319 fi
5320
5321 ###############################################
5322 # test for where we get get_yp_default_domain() from
5323 for ac_func in yp_get_default_domain
5324 do
5325 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5326 echo "configure:5327: checking for $ac_func" >&5
5327 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5328   echo $ac_n "(cached) $ac_c" 1>&6
5329 else
5330   cat > conftest.$ac_ext <<EOF
5331 #line 5332 "configure"
5332 #include "confdefs.h"
5333 /* System header to define __stub macros and hopefully few prototypes,
5334     which can conflict with char $ac_func(); below.  */
5335 #include <assert.h>
5336 /* Override any gcc2 internal prototype to avoid an error.  */
5337 /* We use char because int might match the return type of a gcc2
5338     builtin and then its argument prototype would still apply.  */
5339 char $ac_func();
5340
5341 int main() {
5342
5343 /* The GNU C library defines this for functions which it implements
5344     to always fail with ENOSYS.  Some functions are actually named
5345     something starting with __ and the normal name is an alias.  */
5346 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5347 choke me
5348 #else
5349 $ac_func();
5350 #endif
5351
5352 ; return 0; }
5353 EOF
5354 if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5355   rm -rf conftest*
5356   eval "ac_cv_func_$ac_func=yes"
5357 else
5358   echo "configure: failed program was:" >&5
5359   cat conftest.$ac_ext >&5
5360   rm -rf conftest*
5361   eval "ac_cv_func_$ac_func=no"
5362 fi
5363 rm -f conftest*
5364 fi
5365
5366 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5367   echo "$ac_t""yes" 1>&6
5368     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5369   cat >> confdefs.h <<EOF
5370 #define $ac_tr_func 1
5371 EOF
5372  
5373 else
5374   echo "$ac_t""no" 1>&6
5375 fi
5376 done
5377
5378 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5379         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5380 echo "configure:5381: checking for yp_get_default_domain in -lnsl" >&5
5381 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5382 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5383   echo $ac_n "(cached) $ac_c" 1>&6
5384 else
5385   ac_save_LIBS="$LIBS"
5386 LIBS="-lnsl  $LIBS"
5387 cat > conftest.$ac_ext <<EOF
5388 #line 5389 "configure"
5389 #include "confdefs.h"
5390 /* Override any gcc2 internal prototype to avoid an error.  */
5391 /* We use char because int might match the return type of a gcc2
5392     builtin and then its argument prototype would still apply.  */
5393 char yp_get_default_domain();
5394
5395 int main() {
5396 yp_get_default_domain()
5397 ; return 0; }
5398 EOF
5399 if { (eval echo configure:5400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5400   rm -rf conftest*
5401   eval "ac_cv_lib_$ac_lib_var=yes"
5402 else
5403   echo "configure: failed program was:" >&5
5404   cat conftest.$ac_ext >&5
5405   rm -rf conftest*
5406   eval "ac_cv_lib_$ac_lib_var=no"
5407 fi
5408 rm -f conftest*
5409 LIBS="$ac_save_LIBS"
5410
5411 fi
5412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5413   echo "$ac_t""yes" 1>&6
5414   LIBS="$LIBS -lnsl";
5415         cat >> confdefs.h <<\EOF
5416 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5417 EOF
5418
5419 else
5420   echo "$ac_t""no" 1>&6
5421 fi
5422  
5423 fi
5424
5425 # Check if we have execl, if not we need to compile smbrun.
5426 for ac_func in execl
5427 do
5428 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5429 echo "configure:5430: checking for $ac_func" >&5
5430 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5431   echo $ac_n "(cached) $ac_c" 1>&6
5432 else
5433   cat > conftest.$ac_ext <<EOF
5434 #line 5435 "configure"
5435 #include "confdefs.h"
5436 /* System header to define __stub macros and hopefully few prototypes,
5437     which can conflict with char $ac_func(); below.  */
5438 #include <assert.h>
5439 /* Override any gcc2 internal prototype to avoid an error.  */
5440 /* We use char because int might match the return type of a gcc2
5441     builtin and then its argument prototype would still apply.  */
5442 char $ac_func();
5443
5444 int main() {
5445
5446 /* The GNU C library defines this for functions which it implements
5447     to always fail with ENOSYS.  Some functions are actually named
5448     something starting with __ and the normal name is an alias.  */
5449 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5450 choke me
5451 #else
5452 $ac_func();
5453 #endif
5454
5455 ; return 0; }
5456 EOF
5457 if { (eval echo configure:5458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5458   rm -rf conftest*
5459   eval "ac_cv_func_$ac_func=yes"
5460 else
5461   echo "configure: failed program was:" >&5
5462   cat conftest.$ac_ext >&5
5463   rm -rf conftest*
5464   eval "ac_cv_func_$ac_func=no"
5465 fi
5466 rm -f conftest*
5467 fi
5468
5469 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5470   echo "$ac_t""yes" 1>&6
5471     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5472   cat >> confdefs.h <<EOF
5473 #define $ac_tr_func 1
5474 EOF
5475  
5476 else
5477   echo "$ac_t""no" 1>&6
5478 fi
5479 done
5480
5481 if test x"$ac_cv_func_execl" = x"no"; then
5482     RUNPROG="bin/smbrun"
5483 else
5484     RUNPROG=""
5485 fi
5486
5487 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5488 do
5489 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5490 echo "configure:5491: checking for $ac_func" >&5
5491 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5492   echo $ac_n "(cached) $ac_c" 1>&6
5493 else
5494   cat > conftest.$ac_ext <<EOF
5495 #line 5496 "configure"
5496 #include "confdefs.h"
5497 /* System header to define __stub macros and hopefully few prototypes,
5498     which can conflict with char $ac_func(); below.  */
5499 #include <assert.h>
5500 /* Override any gcc2 internal prototype to avoid an error.  */
5501 /* We use char because int might match the return type of a gcc2
5502     builtin and then its argument prototype would still apply.  */
5503 char $ac_func();
5504
5505 int main() {
5506
5507 /* The GNU C library defines this for functions which it implements
5508     to always fail with ENOSYS.  Some functions are actually named
5509     something starting with __ and the normal name is an alias.  */
5510 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5511 choke me
5512 #else
5513 $ac_func();
5514 #endif
5515
5516 ; return 0; }
5517 EOF
5518 if { (eval echo configure:5519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5519   rm -rf conftest*
5520   eval "ac_cv_func_$ac_func=yes"
5521 else
5522   echo "configure: failed program was:" >&5
5523   cat conftest.$ac_ext >&5
5524   rm -rf conftest*
5525   eval "ac_cv_func_$ac_func=no"
5526 fi
5527 rm -f conftest*
5528 fi
5529
5530 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5531   echo "$ac_t""yes" 1>&6
5532     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5533   cat >> confdefs.h <<EOF
5534 #define $ac_tr_func 1
5535 EOF
5536  
5537 else
5538   echo "$ac_t""no" 1>&6
5539 fi
5540 done
5541
5542 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5543 do
5544 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5545 echo "configure:5546: checking for $ac_func" >&5
5546 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5547   echo $ac_n "(cached) $ac_c" 1>&6
5548 else
5549   cat > conftest.$ac_ext <<EOF
5550 #line 5551 "configure"
5551 #include "confdefs.h"
5552 /* System header to define __stub macros and hopefully few prototypes,
5553     which can conflict with char $ac_func(); below.  */
5554 #include <assert.h>
5555 /* Override any gcc2 internal prototype to avoid an error.  */
5556 /* We use char because int might match the return type of a gcc2
5557     builtin and then its argument prototype would still apply.  */
5558 char $ac_func();
5559
5560 int main() {
5561
5562 /* The GNU C library defines this for functions which it implements
5563     to always fail with ENOSYS.  Some functions are actually named
5564     something starting with __ and the normal name is an alias.  */
5565 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5566 choke me
5567 #else
5568 $ac_func();
5569 #endif
5570
5571 ; return 0; }
5572 EOF
5573 if { (eval echo configure:5574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5574   rm -rf conftest*
5575   eval "ac_cv_func_$ac_func=yes"
5576 else
5577   echo "configure: failed program was:" >&5
5578   cat conftest.$ac_ext >&5
5579   rm -rf conftest*
5580   eval "ac_cv_func_$ac_func=no"
5581 fi
5582 rm -f conftest*
5583 fi
5584
5585 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5586   echo "$ac_t""yes" 1>&6
5587     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5588   cat >> confdefs.h <<EOF
5589 #define $ac_tr_func 1
5590 EOF
5591  
5592 else
5593   echo "$ac_t""no" 1>&6
5594 fi
5595 done
5596
5597 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5598 do
5599 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5600 echo "configure:5601: checking for $ac_func" >&5
5601 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5602   echo $ac_n "(cached) $ac_c" 1>&6
5603 else
5604   cat > conftest.$ac_ext <<EOF
5605 #line 5606 "configure"
5606 #include "confdefs.h"
5607 /* System header to define __stub macros and hopefully few prototypes,
5608     which can conflict with char $ac_func(); below.  */
5609 #include <assert.h>
5610 /* Override any gcc2 internal prototype to avoid an error.  */
5611 /* We use char because int might match the return type of a gcc2
5612     builtin and then its argument prototype would still apply.  */
5613 char $ac_func();
5614
5615 int main() {
5616
5617 /* The GNU C library defines this for functions which it implements
5618     to always fail with ENOSYS.  Some functions are actually named
5619     something starting with __ and the normal name is an alias.  */
5620 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5621 choke me
5622 #else
5623 $ac_func();
5624 #endif
5625
5626 ; return 0; }
5627 EOF
5628 if { (eval echo configure:5629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5629   rm -rf conftest*
5630   eval "ac_cv_func_$ac_func=yes"
5631 else
5632   echo "configure: failed program was:" >&5
5633   cat conftest.$ac_ext >&5
5634   rm -rf conftest*
5635   eval "ac_cv_func_$ac_func=no"
5636 fi
5637 rm -f conftest*
5638 fi
5639
5640 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5641   echo "$ac_t""yes" 1>&6
5642     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5643   cat >> confdefs.h <<EOF
5644 #define $ac_tr_func 1
5645 EOF
5646  
5647 else
5648   echo "$ac_t""no" 1>&6
5649 fi
5650 done
5651
5652 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5653 do
5654 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5655 echo "configure:5656: checking for $ac_func" >&5
5656 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5657   echo $ac_n "(cached) $ac_c" 1>&6
5658 else
5659   cat > conftest.$ac_ext <<EOF
5660 #line 5661 "configure"
5661 #include "confdefs.h"
5662 /* System header to define __stub macros and hopefully few prototypes,
5663     which can conflict with char $ac_func(); below.  */
5664 #include <assert.h>
5665 /* Override any gcc2 internal prototype to avoid an error.  */
5666 /* We use char because int might match the return type of a gcc2
5667     builtin and then its argument prototype would still apply.  */
5668 char $ac_func();
5669
5670 int main() {
5671
5672 /* The GNU C library defines this for functions which it implements
5673     to always fail with ENOSYS.  Some functions are actually named
5674     something starting with __ and the normal name is an alias.  */
5675 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5676 choke me
5677 #else
5678 $ac_func();
5679 #endif
5680
5681 ; return 0; }
5682 EOF
5683 if { (eval echo configure:5684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5684   rm -rf conftest*
5685   eval "ac_cv_func_$ac_func=yes"
5686 else
5687   echo "configure: failed program was:" >&5
5688   cat conftest.$ac_ext >&5
5689   rm -rf conftest*
5690   eval "ac_cv_func_$ac_func=no"
5691 fi
5692 rm -f conftest*
5693 fi
5694
5695 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5696   echo "$ac_t""yes" 1>&6
5697     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5698   cat >> confdefs.h <<EOF
5699 #define $ac_tr_func 1
5700 EOF
5701  
5702 else
5703   echo "$ac_t""no" 1>&6
5704 fi
5705 done
5706
5707 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5708 do
5709 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5710 echo "configure:5711: checking for $ac_func" >&5
5711 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5712   echo $ac_n "(cached) $ac_c" 1>&6
5713 else
5714   cat > conftest.$ac_ext <<EOF
5715 #line 5716 "configure"
5716 #include "confdefs.h"
5717 /* System header to define __stub macros and hopefully few prototypes,
5718     which can conflict with char $ac_func(); below.  */
5719 #include <assert.h>
5720 /* Override any gcc2 internal prototype to avoid an error.  */
5721 /* We use char because int might match the return type of a gcc2
5722     builtin and then its argument prototype would still apply.  */
5723 char $ac_func();
5724
5725 int main() {
5726
5727 /* The GNU C library defines this for functions which it implements
5728     to always fail with ENOSYS.  Some functions are actually named
5729     something starting with __ and the normal name is an alias.  */
5730 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5731 choke me
5732 #else
5733 $ac_func();
5734 #endif
5735
5736 ; return 0; }
5737 EOF
5738 if { (eval echo configure:5739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5739   rm -rf conftest*
5740   eval "ac_cv_func_$ac_func=yes"
5741 else
5742   echo "configure: failed program was:" >&5
5743   cat conftest.$ac_ext >&5
5744   rm -rf conftest*
5745   eval "ac_cv_func_$ac_func=no"
5746 fi
5747 rm -f conftest*
5748 fi
5749
5750 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5751   echo "$ac_t""yes" 1>&6
5752     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5753   cat >> confdefs.h <<EOF
5754 #define $ac_tr_func 1
5755 EOF
5756  
5757 else
5758   echo "$ac_t""no" 1>&6
5759 fi
5760 done
5761
5762 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5763 do
5764 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5765 echo "configure:5766: checking for $ac_func" >&5
5766 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5767   echo $ac_n "(cached) $ac_c" 1>&6
5768 else
5769   cat > conftest.$ac_ext <<EOF
5770 #line 5771 "configure"
5771 #include "confdefs.h"
5772 /* System header to define __stub macros and hopefully few prototypes,
5773     which can conflict with char $ac_func(); below.  */
5774 #include <assert.h>
5775 /* Override any gcc2 internal prototype to avoid an error.  */
5776 /* We use char because int might match the return type of a gcc2
5777     builtin and then its argument prototype would still apply.  */
5778 char $ac_func();
5779
5780 int main() {
5781
5782 /* The GNU C library defines this for functions which it implements
5783     to always fail with ENOSYS.  Some functions are actually named
5784     something starting with __ and the normal name is an alias.  */
5785 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5786 choke me
5787 #else
5788 $ac_func();
5789 #endif
5790
5791 ; return 0; }
5792 EOF
5793 if { (eval echo configure:5794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5794   rm -rf conftest*
5795   eval "ac_cv_func_$ac_func=yes"
5796 else
5797   echo "configure: failed program was:" >&5
5798   cat conftest.$ac_ext >&5
5799   rm -rf conftest*
5800   eval "ac_cv_func_$ac_func=no"
5801 fi
5802 rm -f conftest*
5803 fi
5804
5805 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5806   echo "$ac_t""yes" 1>&6
5807     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5808   cat >> confdefs.h <<EOF
5809 #define $ac_tr_func 1
5810 EOF
5811  
5812 else
5813   echo "$ac_t""no" 1>&6
5814 fi
5815 done
5816
5817 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5818 do
5819 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5820 echo "configure:5821: checking for $ac_func" >&5
5821 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5822   echo $ac_n "(cached) $ac_c" 1>&6
5823 else
5824   cat > conftest.$ac_ext <<EOF
5825 #line 5826 "configure"
5826 #include "confdefs.h"
5827 /* System header to define __stub macros and hopefully few prototypes,
5828     which can conflict with char $ac_func(); below.  */
5829 #include <assert.h>
5830 /* Override any gcc2 internal prototype to avoid an error.  */
5831 /* We use char because int might match the return type of a gcc2
5832     builtin and then its argument prototype would still apply.  */
5833 char $ac_func();
5834
5835 int main() {
5836
5837 /* The GNU C library defines this for functions which it implements
5838     to always fail with ENOSYS.  Some functions are actually named
5839     something starting with __ and the normal name is an alias.  */
5840 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5841 choke me
5842 #else
5843 $ac_func();
5844 #endif
5845
5846 ; return 0; }
5847 EOF
5848 if { (eval echo configure:5849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5849   rm -rf conftest*
5850   eval "ac_cv_func_$ac_func=yes"
5851 else
5852   echo "configure: failed program was:" >&5
5853   cat conftest.$ac_ext >&5
5854   rm -rf conftest*
5855   eval "ac_cv_func_$ac_func=no"
5856 fi
5857 rm -f conftest*
5858 fi
5859
5860 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5861   echo "$ac_t""yes" 1>&6
5862     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5863   cat >> confdefs.h <<EOF
5864 #define $ac_tr_func 1
5865 EOF
5866  
5867 else
5868   echo "$ac_t""no" 1>&6
5869 fi
5870 done
5871
5872 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5873 do
5874 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5875 echo "configure:5876: checking for $ac_func" >&5
5876 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5877   echo $ac_n "(cached) $ac_c" 1>&6
5878 else
5879   cat > conftest.$ac_ext <<EOF
5880 #line 5881 "configure"
5881 #include "confdefs.h"
5882 /* System header to define __stub macros and hopefully few prototypes,
5883     which can conflict with char $ac_func(); below.  */
5884 #include <assert.h>
5885 /* Override any gcc2 internal prototype to avoid an error.  */
5886 /* We use char because int might match the return type of a gcc2
5887     builtin and then its argument prototype would still apply.  */
5888 char $ac_func();
5889
5890 int main() {
5891
5892 /* The GNU C library defines this for functions which it implements
5893     to always fail with ENOSYS.  Some functions are actually named
5894     something starting with __ and the normal name is an alias.  */
5895 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5896 choke me
5897 #else
5898 $ac_func();
5899 #endif
5900
5901 ; return 0; }
5902 EOF
5903 if { (eval echo configure:5904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5904   rm -rf conftest*
5905   eval "ac_cv_func_$ac_func=yes"
5906 else
5907   echo "configure: failed program was:" >&5
5908   cat conftest.$ac_ext >&5
5909   rm -rf conftest*
5910   eval "ac_cv_func_$ac_func=no"
5911 fi
5912 rm -f conftest*
5913 fi
5914
5915 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5916   echo "$ac_t""yes" 1>&6
5917     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5918   cat >> confdefs.h <<EOF
5919 #define $ac_tr_func 1
5920 EOF
5921  
5922 else
5923   echo "$ac_t""no" 1>&6
5924 fi
5925 done
5926
5927 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5928 do
5929 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5930 echo "configure:5931: checking for $ac_func" >&5
5931 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5932   echo $ac_n "(cached) $ac_c" 1>&6
5933 else
5934   cat > conftest.$ac_ext <<EOF
5935 #line 5936 "configure"
5936 #include "confdefs.h"
5937 /* System header to define __stub macros and hopefully few prototypes,
5938     which can conflict with char $ac_func(); below.  */
5939 #include <assert.h>
5940 /* Override any gcc2 internal prototype to avoid an error.  */
5941 /* We use char because int might match the return type of a gcc2
5942     builtin and then its argument prototype would still apply.  */
5943 char $ac_func();
5944
5945 int main() {
5946
5947 /* The GNU C library defines this for functions which it implements
5948     to always fail with ENOSYS.  Some functions are actually named
5949     something starting with __ and the normal name is an alias.  */
5950 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5951 choke me
5952 #else
5953 $ac_func();
5954 #endif
5955
5956 ; return 0; }
5957 EOF
5958 if { (eval echo configure:5959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5959   rm -rf conftest*
5960   eval "ac_cv_func_$ac_func=yes"
5961 else
5962   echo "configure: failed program was:" >&5
5963   cat conftest.$ac_ext >&5
5964   rm -rf conftest*
5965   eval "ac_cv_func_$ac_func=no"
5966 fi
5967 rm -f conftest*
5968 fi
5969
5970 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5971   echo "$ac_t""yes" 1>&6
5972     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5973   cat >> confdefs.h <<EOF
5974 #define $ac_tr_func 1
5975 EOF
5976  
5977 else
5978   echo "$ac_t""no" 1>&6
5979 fi
5980 done
5981
5982 for ac_func in syslog vsyslog getgrouplist
5983 do
5984 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5985 echo "configure:5986: checking for $ac_func" >&5
5986 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5987   echo $ac_n "(cached) $ac_c" 1>&6
5988 else
5989   cat > conftest.$ac_ext <<EOF
5990 #line 5991 "configure"
5991 #include "confdefs.h"
5992 /* System header to define __stub macros and hopefully few prototypes,
5993     which can conflict with char $ac_func(); below.  */
5994 #include <assert.h>
5995 /* Override any gcc2 internal prototype to avoid an error.  */
5996 /* We use char because int might match the return type of a gcc2
5997     builtin and then its argument prototype would still apply.  */
5998 char $ac_func();
5999
6000 int main() {
6001
6002 /* The GNU C library defines this for functions which it implements
6003     to always fail with ENOSYS.  Some functions are actually named
6004     something starting with __ and the normal name is an alias.  */
6005 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6006 choke me
6007 #else
6008 $ac_func();
6009 #endif
6010
6011 ; return 0; }
6012 EOF
6013 if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6014   rm -rf conftest*
6015   eval "ac_cv_func_$ac_func=yes"
6016 else
6017   echo "configure: failed program was:" >&5
6018   cat conftest.$ac_ext >&5
6019   rm -rf conftest*
6020   eval "ac_cv_func_$ac_func=no"
6021 fi
6022 rm -f conftest*
6023 fi
6024
6025 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6026   echo "$ac_t""yes" 1>&6
6027     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6028   cat >> confdefs.h <<EOF
6029 #define $ac_tr_func 1
6030 EOF
6031  
6032 else
6033   echo "$ac_t""no" 1>&6
6034 fi
6035 done
6036
6037 # setbuffer is needed for smbtorture
6038 for ac_func in setbuffer
6039 do
6040 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6041 echo "configure:6042: checking for $ac_func" >&5
6042 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6043   echo $ac_n "(cached) $ac_c" 1>&6
6044 else
6045   cat > conftest.$ac_ext <<EOF
6046 #line 6047 "configure"
6047 #include "confdefs.h"
6048 /* System header to define __stub macros and hopefully few prototypes,
6049     which can conflict with char $ac_func(); below.  */
6050 #include <assert.h>
6051 /* Override any gcc2 internal prototype to avoid an error.  */
6052 /* We use char because int might match the return type of a gcc2
6053     builtin and then its argument prototype would still apply.  */
6054 char $ac_func();
6055
6056 int main() {
6057
6058 /* The GNU C library defines this for functions which it implements
6059     to always fail with ENOSYS.  Some functions are actually named
6060     something starting with __ and the normal name is an alias.  */
6061 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6062 choke me
6063 #else
6064 $ac_func();
6065 #endif
6066
6067 ; return 0; }
6068 EOF
6069 if { (eval echo configure:6070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6070   rm -rf conftest*
6071   eval "ac_cv_func_$ac_func=yes"
6072 else
6073   echo "configure: failed program was:" >&5
6074   cat conftest.$ac_ext >&5
6075   rm -rf conftest*
6076   eval "ac_cv_func_$ac_func=no"
6077 fi
6078 rm -f conftest*
6079 fi
6080
6081 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6082   echo "$ac_t""yes" 1>&6
6083     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6084   cat >> confdefs.h <<EOF
6085 #define $ac_tr_func 1
6086 EOF
6087  
6088 else
6089   echo "$ac_t""no" 1>&6
6090 fi
6091 done
6092
6093
6094 # syscall() is needed for smbwrapper.
6095 for ac_func in syscall
6096 do
6097 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6098 echo "configure:6099: checking for $ac_func" >&5
6099 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6100   echo $ac_n "(cached) $ac_c" 1>&6
6101 else
6102   cat > conftest.$ac_ext <<EOF
6103 #line 6104 "configure"
6104 #include "confdefs.h"
6105 /* System header to define __stub macros and hopefully few prototypes,
6106     which can conflict with char $ac_func(); below.  */
6107 #include <assert.h>
6108 /* Override any gcc2 internal prototype to avoid an error.  */
6109 /* We use char because int might match the return type of a gcc2
6110     builtin and then its argument prototype would still apply.  */
6111 char $ac_func();
6112
6113 int main() {
6114
6115 /* The GNU C library defines this for functions which it implements
6116     to always fail with ENOSYS.  Some functions are actually named
6117     something starting with __ and the normal name is an alias.  */
6118 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6119 choke me
6120 #else
6121 $ac_func();
6122 #endif
6123
6124 ; return 0; }
6125 EOF
6126 if { (eval echo configure:6127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6127   rm -rf conftest*
6128   eval "ac_cv_func_$ac_func=yes"
6129 else
6130   echo "configure: failed program was:" >&5
6131   cat conftest.$ac_ext >&5
6132   rm -rf conftest*
6133   eval "ac_cv_func_$ac_func=no"
6134 fi
6135 rm -f conftest*
6136 fi
6137
6138 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6139   echo "$ac_t""yes" 1>&6
6140     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6141   cat >> confdefs.h <<EOF
6142 #define $ac_tr_func 1
6143 EOF
6144  
6145 else
6146   echo "$ac_t""no" 1>&6
6147 fi
6148 done
6149
6150
6151 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6152 do
6153 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6154 echo "configure:6155: checking for $ac_func" >&5
6155 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6156   echo $ac_n "(cached) $ac_c" 1>&6
6157 else
6158   cat > conftest.$ac_ext <<EOF
6159 #line 6160 "configure"
6160 #include "confdefs.h"
6161 /* System header to define __stub macros and hopefully few prototypes,
6162     which can conflict with char $ac_func(); below.  */
6163 #include <assert.h>
6164 /* Override any gcc2 internal prototype to avoid an error.  */
6165 /* We use char because int might match the return type of a gcc2
6166     builtin and then its argument prototype would still apply.  */
6167 char $ac_func();
6168
6169 int main() {
6170
6171 /* The GNU C library defines this for functions which it implements
6172     to always fail with ENOSYS.  Some functions are actually named
6173     something starting with __ and the normal name is an alias.  */
6174 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6175 choke me
6176 #else
6177 $ac_func();
6178 #endif
6179
6180 ; return 0; }
6181 EOF
6182 if { (eval echo configure:6183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6183   rm -rf conftest*
6184   eval "ac_cv_func_$ac_func=yes"
6185 else
6186   echo "configure: failed program was:" >&5
6187   cat conftest.$ac_ext >&5
6188   rm -rf conftest*
6189   eval "ac_cv_func_$ac_func=no"
6190 fi
6191 rm -f conftest*
6192 fi
6193
6194 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6195   echo "$ac_t""yes" 1>&6
6196     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6197   cat >> confdefs.h <<EOF
6198 #define $ac_tr_func 1
6199 EOF
6200  
6201 else
6202   echo "$ac_t""no" 1>&6
6203 fi
6204 done
6205
6206 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6207 do
6208 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6209 echo "configure:6210: checking for $ac_func" >&5
6210 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6211   echo $ac_n "(cached) $ac_c" 1>&6
6212 else
6213   cat > conftest.$ac_ext <<EOF
6214 #line 6215 "configure"
6215 #include "confdefs.h"
6216 /* System header to define __stub macros and hopefully few prototypes,
6217     which can conflict with char $ac_func(); below.  */
6218 #include <assert.h>
6219 /* Override any gcc2 internal prototype to avoid an error.  */
6220 /* We use char because int might match the return type of a gcc2
6221     builtin and then its argument prototype would still apply.  */
6222 char $ac_func();
6223
6224 int main() {
6225
6226 /* The GNU C library defines this for functions which it implements
6227     to always fail with ENOSYS.  Some functions are actually named
6228     something starting with __ and the normal name is an alias.  */
6229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6230 choke me
6231 #else
6232 $ac_func();
6233 #endif
6234
6235 ; return 0; }
6236 EOF
6237 if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6238   rm -rf conftest*
6239   eval "ac_cv_func_$ac_func=yes"
6240 else
6241   echo "configure: failed program was:" >&5
6242   cat conftest.$ac_ext >&5
6243   rm -rf conftest*
6244   eval "ac_cv_func_$ac_func=no"
6245 fi
6246 rm -f conftest*
6247 fi
6248
6249 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6250   echo "$ac_t""yes" 1>&6
6251     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6252   cat >> confdefs.h <<EOF
6253 #define $ac_tr_func 1
6254 EOF
6255  
6256 else
6257   echo "$ac_t""no" 1>&6
6258 fi
6259 done
6260
6261 for ac_func in __getcwd _getcwd
6262 do
6263 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6264 echo "configure:6265: checking for $ac_func" >&5
6265 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6266   echo $ac_n "(cached) $ac_c" 1>&6
6267 else
6268   cat > conftest.$ac_ext <<EOF
6269 #line 6270 "configure"
6270 #include "confdefs.h"
6271 /* System header to define __stub macros and hopefully few prototypes,
6272     which can conflict with char $ac_func(); below.  */
6273 #include <assert.h>
6274 /* Override any gcc2 internal prototype to avoid an error.  */
6275 /* We use char because int might match the return type of a gcc2
6276     builtin and then its argument prototype would still apply.  */
6277 char $ac_func();
6278
6279 int main() {
6280
6281 /* The GNU C library defines this for functions which it implements
6282     to always fail with ENOSYS.  Some functions are actually named
6283     something starting with __ and the normal name is an alias.  */
6284 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6285 choke me
6286 #else
6287 $ac_func();
6288 #endif
6289
6290 ; return 0; }
6291 EOF
6292 if { (eval echo configure:6293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6293   rm -rf conftest*
6294   eval "ac_cv_func_$ac_func=yes"
6295 else
6296   echo "configure: failed program was:" >&5
6297   cat conftest.$ac_ext >&5
6298   rm -rf conftest*
6299   eval "ac_cv_func_$ac_func=no"
6300 fi
6301 rm -f conftest*
6302 fi
6303
6304 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6305   echo "$ac_t""yes" 1>&6
6306     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6307   cat >> confdefs.h <<EOF
6308 #define $ac_tr_func 1
6309 EOF
6310  
6311 else
6312   echo "$ac_t""no" 1>&6
6313 fi
6314 done
6315
6316 for ac_func in __xstat __fxstat __lxstat
6317 do
6318 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6319 echo "configure:6320: checking for $ac_func" >&5
6320 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6321   echo $ac_n "(cached) $ac_c" 1>&6
6322 else
6323   cat > conftest.$ac_ext <<EOF
6324 #line 6325 "configure"
6325 #include "confdefs.h"
6326 /* System header to define __stub macros and hopefully few prototypes,
6327     which can conflict with char $ac_func(); below.  */
6328 #include <assert.h>
6329 /* Override any gcc2 internal prototype to avoid an error.  */
6330 /* We use char because int might match the return type of a gcc2
6331     builtin and then its argument prototype would still apply.  */
6332 char $ac_func();
6333
6334 int main() {
6335
6336 /* The GNU C library defines this for functions which it implements
6337     to always fail with ENOSYS.  Some functions are actually named
6338     something starting with __ and the normal name is an alias.  */
6339 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6340 choke me
6341 #else
6342 $ac_func();
6343 #endif
6344
6345 ; return 0; }
6346 EOF
6347 if { (eval echo configure:6348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6348   rm -rf conftest*
6349   eval "ac_cv_func_$ac_func=yes"
6350 else
6351   echo "configure: failed program was:" >&5
6352   cat conftest.$ac_ext >&5
6353   rm -rf conftest*
6354   eval "ac_cv_func_$ac_func=no"
6355 fi
6356 rm -f conftest*
6357 fi
6358
6359 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6360   echo "$ac_t""yes" 1>&6
6361     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6362   cat >> confdefs.h <<EOF
6363 #define $ac_tr_func 1
6364 EOF
6365  
6366 else
6367   echo "$ac_t""no" 1>&6
6368 fi
6369 done
6370
6371 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6372 do
6373 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6374 echo "configure:6375: checking for $ac_func" >&5
6375 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6376   echo $ac_n "(cached) $ac_c" 1>&6
6377 else
6378   cat > conftest.$ac_ext <<EOF
6379 #line 6380 "configure"
6380 #include "confdefs.h"
6381 /* System header to define __stub macros and hopefully few prototypes,
6382     which can conflict with char $ac_func(); below.  */
6383 #include <assert.h>
6384 /* Override any gcc2 internal prototype to avoid an error.  */
6385 /* We use char because int might match the return type of a gcc2
6386     builtin and then its argument prototype would still apply.  */
6387 char $ac_func();
6388
6389 int main() {
6390
6391 /* The GNU C library defines this for functions which it implements
6392     to always fail with ENOSYS.  Some functions are actually named
6393     something starting with __ and the normal name is an alias.  */
6394 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6395 choke me
6396 #else
6397 $ac_func();
6398 #endif
6399
6400 ; return 0; }
6401 EOF
6402 if { (eval echo configure:6403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6403   rm -rf conftest*
6404   eval "ac_cv_func_$ac_func=yes"
6405 else
6406   echo "configure: failed program was:" >&5
6407   cat conftest.$ac_ext >&5
6408   rm -rf conftest*
6409   eval "ac_cv_func_$ac_func=no"
6410 fi
6411 rm -f conftest*
6412 fi
6413
6414 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6415   echo "$ac_t""yes" 1>&6
6416     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6417   cat >> confdefs.h <<EOF
6418 #define $ac_tr_func 1
6419 EOF
6420  
6421 else
6422   echo "$ac_t""no" 1>&6
6423 fi
6424 done
6425
6426 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6427 do
6428 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6429 echo "configure:6430: checking for $ac_func" >&5
6430 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6431   echo $ac_n "(cached) $ac_c" 1>&6
6432 else
6433   cat > conftest.$ac_ext <<EOF
6434 #line 6435 "configure"
6435 #include "confdefs.h"
6436 /* System header to define __stub macros and hopefully few prototypes,
6437     which can conflict with char $ac_func(); below.  */
6438 #include <assert.h>
6439 /* Override any gcc2 internal prototype to avoid an error.  */
6440 /* We use char because int might match the return type of a gcc2
6441     builtin and then its argument prototype would still apply.  */
6442 char $ac_func();
6443
6444 int main() {
6445
6446 /* The GNU C library defines this for functions which it implements
6447     to always fail with ENOSYS.  Some functions are actually named
6448     something starting with __ and the normal name is an alias.  */
6449 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6450 choke me
6451 #else
6452 $ac_func();
6453 #endif
6454
6455 ; return 0; }
6456 EOF
6457 if { (eval echo configure:6458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6458   rm -rf conftest*
6459   eval "ac_cv_func_$ac_func=yes"
6460 else
6461   echo "configure: failed program was:" >&5
6462   cat conftest.$ac_ext >&5
6463   rm -rf conftest*
6464   eval "ac_cv_func_$ac_func=no"
6465 fi
6466 rm -f conftest*
6467 fi
6468
6469 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6470   echo "$ac_t""yes" 1>&6
6471     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6472   cat >> confdefs.h <<EOF
6473 #define $ac_tr_func 1
6474 EOF
6475  
6476 else
6477   echo "$ac_t""no" 1>&6
6478 fi
6479 done
6480
6481 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6482 do
6483 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6484 echo "configure:6485: checking for $ac_func" >&5
6485 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6486   echo $ac_n "(cached) $ac_c" 1>&6
6487 else
6488   cat > conftest.$ac_ext <<EOF
6489 #line 6490 "configure"
6490 #include "confdefs.h"
6491 /* System header to define __stub macros and hopefully few prototypes,
6492     which can conflict with char $ac_func(); below.  */
6493 #include <assert.h>
6494 /* Override any gcc2 internal prototype to avoid an error.  */
6495 /* We use char because int might match the return type of a gcc2
6496     builtin and then its argument prototype would still apply.  */
6497 char $ac_func();
6498
6499 int main() {
6500
6501 /* The GNU C library defines this for functions which it implements
6502     to always fail with ENOSYS.  Some functions are actually named
6503     something starting with __ and the normal name is an alias.  */
6504 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6505 choke me
6506 #else
6507 $ac_func();
6508 #endif
6509
6510 ; return 0; }
6511 EOF
6512 if { (eval echo configure:6513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6513   rm -rf conftest*
6514   eval "ac_cv_func_$ac_func=yes"
6515 else
6516   echo "configure: failed program was:" >&5
6517   cat conftest.$ac_ext >&5
6518   rm -rf conftest*
6519   eval "ac_cv_func_$ac_func=no"
6520 fi
6521 rm -f conftest*
6522 fi
6523
6524 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6525   echo "$ac_t""yes" 1>&6
6526     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6527   cat >> confdefs.h <<EOF
6528 #define $ac_tr_func 1
6529 EOF
6530  
6531 else
6532   echo "$ac_t""no" 1>&6
6533 fi
6534 done
6535
6536 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6537 do
6538 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6539 echo "configure:6540: checking for $ac_func" >&5
6540 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6541   echo $ac_n "(cached) $ac_c" 1>&6
6542 else
6543   cat > conftest.$ac_ext <<EOF
6544 #line 6545 "configure"
6545 #include "confdefs.h"
6546 /* System header to define __stub macros and hopefully few prototypes,
6547     which can conflict with char $ac_func(); below.  */
6548 #include <assert.h>
6549 /* Override any gcc2 internal prototype to avoid an error.  */
6550 /* We use char because int might match the return type of a gcc2
6551     builtin and then its argument prototype would still apply.  */
6552 char $ac_func();
6553
6554 int main() {
6555
6556 /* The GNU C library defines this for functions which it implements
6557     to always fail with ENOSYS.  Some functions are actually named
6558     something starting with __ and the normal name is an alias.  */
6559 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6560 choke me
6561 #else
6562 $ac_func();
6563 #endif
6564
6565 ; return 0; }
6566 EOF
6567 if { (eval echo configure:6568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6568   rm -rf conftest*
6569   eval "ac_cv_func_$ac_func=yes"
6570 else
6571   echo "configure: failed program was:" >&5
6572   cat conftest.$ac_ext >&5
6573   rm -rf conftest*
6574   eval "ac_cv_func_$ac_func=no"
6575 fi
6576 rm -f conftest*
6577 fi
6578
6579 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6580   echo "$ac_t""yes" 1>&6
6581     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6582   cat >> confdefs.h <<EOF
6583 #define $ac_tr_func 1
6584 EOF
6585  
6586 else
6587   echo "$ac_t""no" 1>&6
6588 fi
6589 done
6590
6591 for ac_func in _write __write _fork __fork
6592 do
6593 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6594 echo "configure:6595: checking for $ac_func" >&5
6595 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6596   echo $ac_n "(cached) $ac_c" 1>&6
6597 else
6598   cat > conftest.$ac_ext <<EOF
6599 #line 6600 "configure"
6600 #include "confdefs.h"
6601 /* System header to define __stub macros and hopefully few prototypes,
6602     which can conflict with char $ac_func(); below.  */
6603 #include <assert.h>
6604 /* Override any gcc2 internal prototype to avoid an error.  */
6605 /* We use char because int might match the return type of a gcc2
6606     builtin and then its argument prototype would still apply.  */
6607 char $ac_func();
6608
6609 int main() {
6610
6611 /* The GNU C library defines this for functions which it implements
6612     to always fail with ENOSYS.  Some functions are actually named
6613     something starting with __ and the normal name is an alias.  */
6614 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6615 choke me
6616 #else
6617 $ac_func();
6618 #endif
6619
6620 ; return 0; }
6621 EOF
6622 if { (eval echo configure:6623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6623   rm -rf conftest*
6624   eval "ac_cv_func_$ac_func=yes"
6625 else
6626   echo "configure: failed program was:" >&5
6627   cat conftest.$ac_ext >&5
6628   rm -rf conftest*
6629   eval "ac_cv_func_$ac_func=no"
6630 fi
6631 rm -f conftest*
6632 fi
6633
6634 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6635   echo "$ac_t""yes" 1>&6
6636     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6637   cat >> confdefs.h <<EOF
6638 #define $ac_tr_func 1
6639 EOF
6640  
6641 else
6642   echo "$ac_t""no" 1>&6
6643 fi
6644 done
6645
6646 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6647 do
6648 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6649 echo "configure:6650: checking for $ac_func" >&5
6650 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6651   echo $ac_n "(cached) $ac_c" 1>&6
6652 else
6653   cat > conftest.$ac_ext <<EOF
6654 #line 6655 "configure"
6655 #include "confdefs.h"
6656 /* System header to define __stub macros and hopefully few prototypes,
6657     which can conflict with char $ac_func(); below.  */
6658 #include <assert.h>
6659 /* Override any gcc2 internal prototype to avoid an error.  */
6660 /* We use char because int might match the return type of a gcc2
6661     builtin and then its argument prototype would still apply.  */
6662 char $ac_func();
6663
6664 int main() {
6665
6666 /* The GNU C library defines this for functions which it implements
6667     to always fail with ENOSYS.  Some functions are actually named
6668     something starting with __ and the normal name is an alias.  */
6669 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6670 choke me
6671 #else
6672 $ac_func();
6673 #endif
6674
6675 ; return 0; }
6676 EOF
6677 if { (eval echo configure:6678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6678   rm -rf conftest*
6679   eval "ac_cv_func_$ac_func=yes"
6680 else
6681   echo "configure: failed program was:" >&5
6682   cat conftest.$ac_ext >&5
6683   rm -rf conftest*
6684   eval "ac_cv_func_$ac_func=no"
6685 fi
6686 rm -f conftest*
6687 fi
6688
6689 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6690   echo "$ac_t""yes" 1>&6
6691     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6692   cat >> confdefs.h <<EOF
6693 #define $ac_tr_func 1
6694 EOF
6695  
6696 else
6697   echo "$ac_t""no" 1>&6
6698 fi
6699 done
6700
6701 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6702 do
6703 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6704 echo "configure:6705: checking for $ac_func" >&5
6705 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6706   echo $ac_n "(cached) $ac_c" 1>&6
6707 else
6708   cat > conftest.$ac_ext <<EOF
6709 #line 6710 "configure"
6710 #include "confdefs.h"
6711 /* System header to define __stub macros and hopefully few prototypes,
6712     which can conflict with char $ac_func(); below.  */
6713 #include <assert.h>
6714 /* Override any gcc2 internal prototype to avoid an error.  */
6715 /* We use char because int might match the return type of a gcc2
6716     builtin and then its argument prototype would still apply.  */
6717 char $ac_func();
6718
6719 int main() {
6720
6721 /* The GNU C library defines this for functions which it implements
6722     to always fail with ENOSYS.  Some functions are actually named
6723     something starting with __ and the normal name is an alias.  */
6724 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6725 choke me
6726 #else
6727 $ac_func();
6728 #endif
6729
6730 ; return 0; }
6731 EOF
6732 if { (eval echo configure:6733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6733   rm -rf conftest*
6734   eval "ac_cv_func_$ac_func=yes"
6735 else
6736   echo "configure: failed program was:" >&5
6737   cat conftest.$ac_ext >&5
6738   rm -rf conftest*
6739   eval "ac_cv_func_$ac_func=no"
6740 fi
6741 rm -f conftest*
6742 fi
6743
6744 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6745   echo "$ac_t""yes" 1>&6
6746     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6747   cat >> confdefs.h <<EOF
6748 #define $ac_tr_func 1
6749 EOF
6750  
6751 else
6752   echo "$ac_t""no" 1>&6
6753 fi
6754 done
6755
6756 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6757 do
6758 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6759 echo "configure:6760: checking for $ac_func" >&5
6760 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6761   echo $ac_n "(cached) $ac_c" 1>&6
6762 else
6763   cat > conftest.$ac_ext <<EOF
6764 #line 6765 "configure"
6765 #include "confdefs.h"
6766 /* System header to define __stub macros and hopefully few prototypes,
6767     which can conflict with char $ac_func(); below.  */
6768 #include <assert.h>
6769 /* Override any gcc2 internal prototype to avoid an error.  */
6770 /* We use char because int might match the return type of a gcc2
6771     builtin and then its argument prototype would still apply.  */
6772 char $ac_func();
6773
6774 int main() {
6775
6776 /* The GNU C library defines this for functions which it implements
6777     to always fail with ENOSYS.  Some functions are actually named
6778     something starting with __ and the normal name is an alias.  */
6779 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6780 choke me
6781 #else
6782 $ac_func();
6783 #endif
6784
6785 ; return 0; }
6786 EOF
6787 if { (eval echo configure:6788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6788   rm -rf conftest*
6789   eval "ac_cv_func_$ac_func=yes"
6790 else
6791   echo "configure: failed program was:" >&5
6792   cat conftest.$ac_ext >&5
6793   rm -rf conftest*
6794   eval "ac_cv_func_$ac_func=no"
6795 fi
6796 rm -f conftest*
6797 fi
6798
6799 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6800   echo "$ac_t""yes" 1>&6
6801     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6802   cat >> confdefs.h <<EOF
6803 #define $ac_tr_func 1
6804 EOF
6805  
6806 else
6807   echo "$ac_t""no" 1>&6
6808 fi
6809 done
6810
6811 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6812 do
6813 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6814 echo "configure:6815: checking for $ac_func" >&5
6815 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6816   echo $ac_n "(cached) $ac_c" 1>&6
6817 else
6818   cat > conftest.$ac_ext <<EOF
6819 #line 6820 "configure"
6820 #include "confdefs.h"
6821 /* System header to define __stub macros and hopefully few prototypes,
6822     which can conflict with char $ac_func(); below.  */
6823 #include <assert.h>
6824 /* Override any gcc2 internal prototype to avoid an error.  */
6825 /* We use char because int might match the return type of a gcc2
6826     builtin and then its argument prototype would still apply.  */
6827 char $ac_func();
6828
6829 int main() {
6830
6831 /* The GNU C library defines this for functions which it implements
6832     to always fail with ENOSYS.  Some functions are actually named
6833     something starting with __ and the normal name is an alias.  */
6834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6835 choke me
6836 #else
6837 $ac_func();
6838 #endif
6839
6840 ; return 0; }
6841 EOF
6842 if { (eval echo configure:6843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6843   rm -rf conftest*
6844   eval "ac_cv_func_$ac_func=yes"
6845 else
6846   echo "configure: failed program was:" >&5
6847   cat conftest.$ac_ext >&5
6848   rm -rf conftest*
6849   eval "ac_cv_func_$ac_func=no"
6850 fi
6851 rm -f conftest*
6852 fi
6853
6854 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6855   echo "$ac_t""yes" 1>&6
6856     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6857   cat >> confdefs.h <<EOF
6858 #define $ac_tr_func 1
6859 EOF
6860  
6861 else
6862   echo "$ac_t""no" 1>&6
6863 fi
6864 done
6865
6866 for ac_func in open64 _open64 __open64 creat64
6867 do
6868 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6869 echo "configure:6870: checking for $ac_func" >&5
6870 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6871   echo $ac_n "(cached) $ac_c" 1>&6
6872 else
6873   cat > conftest.$ac_ext <<EOF
6874 #line 6875 "configure"
6875 #include "confdefs.h"
6876 /* System header to define __stub macros and hopefully few prototypes,
6877     which can conflict with char $ac_func(); below.  */
6878 #include <assert.h>
6879 /* Override any gcc2 internal prototype to avoid an error.  */
6880 /* We use char because int might match the return type of a gcc2
6881     builtin and then its argument prototype would still apply.  */
6882 char $ac_func();
6883
6884 int main() {
6885
6886 /* The GNU C library defines this for functions which it implements
6887     to always fail with ENOSYS.  Some functions are actually named
6888     something starting with __ and the normal name is an alias.  */
6889 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6890 choke me
6891 #else
6892 $ac_func();
6893 #endif
6894
6895 ; return 0; }
6896 EOF
6897 if { (eval echo configure:6898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6898   rm -rf conftest*
6899   eval "ac_cv_func_$ac_func=yes"
6900 else
6901   echo "configure: failed program was:" >&5
6902   cat conftest.$ac_ext >&5
6903   rm -rf conftest*
6904   eval "ac_cv_func_$ac_func=no"
6905 fi
6906 rm -f conftest*
6907 fi
6908
6909 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6910   echo "$ac_t""yes" 1>&6
6911     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6912   cat >> confdefs.h <<EOF
6913 #define $ac_tr_func 1
6914 EOF
6915  
6916 else
6917   echo "$ac_t""no" 1>&6
6918 fi
6919 done
6920
6921
6922 #
6923 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6924 #
6925
6926 if test x$ac_cv_func_stat64 = xno ; then
6927   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6928 echo "configure:6929: checking for stat64 in <sys/stat.h>" >&5
6929   cat > conftest.$ac_ext <<EOF
6930 #line 6931 "configure"
6931 #include "confdefs.h"
6932
6933 #if defined(HAVE_UNISTD_H)
6934 #include <unistd.h>
6935 #endif
6936 #include <sys/stat.h>
6937
6938 int main() {
6939 struct stat64 st64; exit(stat64(".",&st64));
6940 ; return 0; }
6941 EOF
6942 if { (eval echo configure:6943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6943   rm -rf conftest*
6944   ac_cv_func_stat64=yes
6945 else
6946   echo "configure: failed program was:" >&5
6947   cat conftest.$ac_ext >&5
6948 fi
6949 rm -f conftest*
6950   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6951   if test x$ac_cv_func_stat64 = xyes ; then
6952     cat >> confdefs.h <<\EOF
6953 #define HAVE_STAT64 1
6954 EOF
6955
6956   fi
6957 fi
6958
6959 if test x$ac_cv_func_lstat64 = xno ; then
6960   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6961 echo "configure:6962: checking for lstat64 in <sys/stat.h>" >&5
6962   cat > conftest.$ac_ext <<EOF
6963 #line 6964 "configure"
6964 #include "confdefs.h"
6965
6966 #if defined(HAVE_UNISTD_H)
6967 #include <unistd.h>
6968 #endif
6969 #include <sys/stat.h>
6970
6971 int main() {
6972 struct stat64 st64; exit(lstat64(".",&st64));
6973 ; return 0; }
6974 EOF
6975 if { (eval echo configure:6976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6976   rm -rf conftest*
6977   ac_cv_func_lstat64=yes
6978 else
6979   echo "configure: failed program was:" >&5
6980   cat conftest.$ac_ext >&5
6981 fi
6982 rm -f conftest*
6983   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6984   if test x$ac_cv_func_lstat64 = xyes ; then
6985     cat >> confdefs.h <<\EOF
6986 #define HAVE_LSTAT64 1
6987 EOF
6988
6989   fi
6990 fi
6991
6992 if test x$ac_cv_func_fstat64 = xno ; then
6993   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6994 echo "configure:6995: checking for fstat64 in <sys/stat.h>" >&5
6995   cat > conftest.$ac_ext <<EOF
6996 #line 6997 "configure"
6997 #include "confdefs.h"
6998
6999 #if defined(HAVE_UNISTD_H)
7000 #include <unistd.h>
7001 #endif
7002 #include <sys/stat.h>
7003
7004 int main() {
7005 struct stat64 st64; exit(fstat64(0,&st64));
7006 ; return 0; }
7007 EOF
7008 if { (eval echo configure:7009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7009   rm -rf conftest*
7010   ac_cv_func_fstat64=yes
7011 else
7012   echo "configure: failed program was:" >&5
7013   cat conftest.$ac_ext >&5
7014 fi
7015 rm -f conftest*
7016   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
7017   if test x$ac_cv_func_fstat64 = xyes ; then
7018     cat >> confdefs.h <<\EOF
7019 #define HAVE_FSTAT64 1
7020 EOF
7021
7022   fi
7023 fi
7024
7025 #####################################
7026 # we might need the resolv library on some systems
7027 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
7028 echo "configure:7029: checking for dn_expand in -lresolv" >&5
7029 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
7030 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7031   echo $ac_n "(cached) $ac_c" 1>&6
7032 else
7033   ac_save_LIBS="$LIBS"
7034 LIBS="-lresolv  $LIBS"
7035 cat > conftest.$ac_ext <<EOF
7036 #line 7037 "configure"
7037 #include "confdefs.h"
7038 /* Override any gcc2 internal prototype to avoid an error.  */
7039 /* We use char because int might match the return type of a gcc2
7040     builtin and then its argument prototype would still apply.  */
7041 char dn_expand();
7042
7043 int main() {
7044 dn_expand()
7045 ; return 0; }
7046 EOF
7047 if { (eval echo configure:7048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7048   rm -rf conftest*
7049   eval "ac_cv_lib_$ac_lib_var=yes"
7050 else
7051   echo "configure: failed program was:" >&5
7052   cat conftest.$ac_ext >&5
7053   rm -rf conftest*
7054   eval "ac_cv_lib_$ac_lib_var=no"
7055 fi
7056 rm -f conftest*
7057 LIBS="$ac_save_LIBS"
7058
7059 fi
7060 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7061   echo "$ac_t""yes" 1>&6
7062     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7063     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7064   cat >> confdefs.h <<EOF
7065 #define $ac_tr_lib 1
7066 EOF
7067
7068   LIBS="-lresolv $LIBS"
7069
7070 else
7071   echo "$ac_t""no" 1>&6
7072 fi
7073
7074
7075 #
7076 # Check for the functions putprpwnam, set_auth_parameters,
7077 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7078 # Needed for OSF1 and HPUX.
7079 #
7080
7081 case "$LIBS" in
7082   *-lsecurity*) for ac_func in putprpwnam
7083 do
7084 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7085 echo "configure:7086: checking for $ac_func" >&5
7086 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7087   echo $ac_n "(cached) $ac_c" 1>&6
7088 else
7089   cat > conftest.$ac_ext <<EOF
7090 #line 7091 "configure"
7091 #include "confdefs.h"
7092 /* System header to define __stub macros and hopefully few prototypes,
7093     which can conflict with char $ac_func(); below.  */
7094 #include <assert.h>
7095 /* Override any gcc2 internal prototype to avoid an error.  */
7096 /* We use char because int might match the return type of a gcc2
7097     builtin and then its argument prototype would still apply.  */
7098 char $ac_func();
7099
7100 int main() {
7101
7102 /* The GNU C library defines this for functions which it implements
7103     to always fail with ENOSYS.  Some functions are actually named
7104     something starting with __ and the normal name is an alias.  */
7105 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7106 choke me
7107 #else
7108 $ac_func();
7109 #endif
7110
7111 ; return 0; }
7112 EOF
7113 if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7114   rm -rf conftest*
7115   eval "ac_cv_func_$ac_func=yes"
7116 else
7117   echo "configure: failed program was:" >&5
7118   cat conftest.$ac_ext >&5
7119   rm -rf conftest*
7120   eval "ac_cv_func_$ac_func=no"
7121 fi
7122 rm -f conftest*
7123 fi
7124
7125 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7126   echo "$ac_t""yes" 1>&6
7127     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7128   cat >> confdefs.h <<EOF
7129 #define $ac_tr_func 1
7130 EOF
7131  
7132 else
7133   echo "$ac_t""no" 1>&6
7134 fi
7135 done
7136  ;;
7137   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7138 echo "configure:7139: checking for putprpwnam in -lsecurity" >&5
7139 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7140 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7141   echo $ac_n "(cached) $ac_c" 1>&6
7142 else
7143   ac_save_LIBS="$LIBS"
7144 LIBS="-lsecurity  $LIBS"
7145 cat > conftest.$ac_ext <<EOF
7146 #line 7147 "configure"
7147 #include "confdefs.h"
7148 /* Override any gcc2 internal prototype to avoid an error.  */
7149 /* We use char because int might match the return type of a gcc2
7150     builtin and then its argument prototype would still apply.  */
7151 char putprpwnam();
7152
7153 int main() {
7154 putprpwnam()
7155 ; return 0; }
7156 EOF
7157 if { (eval echo configure:7158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7158   rm -rf conftest*
7159   eval "ac_cv_lib_$ac_lib_var=yes"
7160 else
7161   echo "configure: failed program was:" >&5
7162   cat conftest.$ac_ext >&5
7163   rm -rf conftest*
7164   eval "ac_cv_lib_$ac_lib_var=no"
7165 fi
7166 rm -f conftest*
7167 LIBS="$ac_save_LIBS"
7168
7169 fi
7170 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7171   echo "$ac_t""yes" 1>&6
7172     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7173     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7174   cat >> confdefs.h <<EOF
7175 #define $ac_tr_lib 1
7176 EOF
7177
7178   LIBS="-lsecurity $LIBS"
7179
7180 else
7181   echo "$ac_t""no" 1>&6
7182 fi
7183  
7184      for ac_func in putprpwnam
7185 do
7186 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7187 echo "configure:7188: checking for $ac_func" >&5
7188 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7189   echo $ac_n "(cached) $ac_c" 1>&6
7190 else
7191   cat > conftest.$ac_ext <<EOF
7192 #line 7193 "configure"
7193 #include "confdefs.h"
7194 /* System header to define __stub macros and hopefully few prototypes,
7195     which can conflict with char $ac_func(); below.  */
7196 #include <assert.h>
7197 /* Override any gcc2 internal prototype to avoid an error.  */
7198 /* We use char because int might match the return type of a gcc2
7199     builtin and then its argument prototype would still apply.  */
7200 char $ac_func();
7201
7202 int main() {
7203
7204 /* The GNU C library defines this for functions which it implements
7205     to always fail with ENOSYS.  Some functions are actually named
7206     something starting with __ and the normal name is an alias.  */
7207 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7208 choke me
7209 #else
7210 $ac_func();
7211 #endif
7212
7213 ; return 0; }
7214 EOF
7215 if { (eval echo configure:7216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7216   rm -rf conftest*
7217   eval "ac_cv_func_$ac_func=yes"
7218 else
7219   echo "configure: failed program was:" >&5
7220   cat conftest.$ac_ext >&5
7221   rm -rf conftest*
7222   eval "ac_cv_func_$ac_func=no"
7223 fi
7224 rm -f conftest*
7225 fi
7226
7227 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7228   echo "$ac_t""yes" 1>&6
7229     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7230   cat >> confdefs.h <<EOF
7231 #define $ac_tr_func 1
7232 EOF
7233  
7234 else
7235   echo "$ac_t""no" 1>&6
7236 fi
7237 done
7238
7239   ;;
7240   esac
7241
7242 case "$LIBS" in
7243   *-lsec*) for ac_func in putprpwnam
7244 do
7245 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7246 echo "configure:7247: checking for $ac_func" >&5
7247 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7248   echo $ac_n "(cached) $ac_c" 1>&6
7249 else
7250   cat > conftest.$ac_ext <<EOF
7251 #line 7252 "configure"
7252 #include "confdefs.h"
7253 /* System header to define __stub macros and hopefully few prototypes,
7254     which can conflict with char $ac_func(); below.  */
7255 #include <assert.h>
7256 /* Override any gcc2 internal prototype to avoid an error.  */
7257 /* We use char because int might match the return type of a gcc2
7258     builtin and then its argument prototype would still apply.  */
7259 char $ac_func();
7260
7261 int main() {
7262
7263 /* The GNU C library defines this for functions which it implements
7264     to always fail with ENOSYS.  Some functions are actually named
7265     something starting with __ and the normal name is an alias.  */
7266 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7267 choke me
7268 #else
7269 $ac_func();
7270 #endif
7271
7272 ; return 0; }
7273 EOF
7274 if { (eval echo configure:7275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7275   rm -rf conftest*
7276   eval "ac_cv_func_$ac_func=yes"
7277 else
7278   echo "configure: failed program was:" >&5
7279   cat conftest.$ac_ext >&5
7280   rm -rf conftest*
7281   eval "ac_cv_func_$ac_func=no"
7282 fi
7283 rm -f conftest*
7284 fi
7285
7286 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7287   echo "$ac_t""yes" 1>&6
7288     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7289   cat >> confdefs.h <<EOF
7290 #define $ac_tr_func 1
7291 EOF
7292  
7293 else
7294   echo "$ac_t""no" 1>&6
7295 fi
7296 done
7297  ;;
7298   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7299 echo "configure:7300: checking for putprpwnam in -lsec" >&5
7300 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7301 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7302   echo $ac_n "(cached) $ac_c" 1>&6
7303 else
7304   ac_save_LIBS="$LIBS"
7305 LIBS="-lsec  $LIBS"
7306 cat > conftest.$ac_ext <<EOF
7307 #line 7308 "configure"
7308 #include "confdefs.h"
7309 /* Override any gcc2 internal prototype to avoid an error.  */
7310 /* We use char because int might match the return type of a gcc2
7311     builtin and then its argument prototype would still apply.  */
7312 char putprpwnam();
7313
7314 int main() {
7315 putprpwnam()
7316 ; return 0; }
7317 EOF
7318 if { (eval echo configure:7319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7319   rm -rf conftest*
7320   eval "ac_cv_lib_$ac_lib_var=yes"
7321 else
7322   echo "configure: failed program was:" >&5
7323   cat conftest.$ac_ext >&5
7324   rm -rf conftest*
7325   eval "ac_cv_lib_$ac_lib_var=no"
7326 fi
7327 rm -f conftest*
7328 LIBS="$ac_save_LIBS"
7329
7330 fi
7331 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7332   echo "$ac_t""yes" 1>&6
7333     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7334     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7335   cat >> confdefs.h <<EOF
7336 #define $ac_tr_lib 1
7337 EOF
7338
7339   LIBS="-lsec $LIBS"
7340
7341 else
7342   echo "$ac_t""no" 1>&6
7343 fi
7344  
7345      for ac_func in putprpwnam
7346 do
7347 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7348 echo "configure:7349: checking for $ac_func" >&5
7349 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7350   echo $ac_n "(cached) $ac_c" 1>&6
7351 else
7352   cat > conftest.$ac_ext <<EOF
7353 #line 7354 "configure"
7354 #include "confdefs.h"
7355 /* System header to define __stub macros and hopefully few prototypes,
7356     which can conflict with char $ac_func(); below.  */
7357 #include <assert.h>
7358 /* Override any gcc2 internal prototype to avoid an error.  */
7359 /* We use char because int might match the return type of a gcc2
7360     builtin and then its argument prototype would still apply.  */
7361 char $ac_func();
7362
7363 int main() {
7364
7365 /* The GNU C library defines this for functions which it implements
7366     to always fail with ENOSYS.  Some functions are actually named
7367     something starting with __ and the normal name is an alias.  */
7368 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7369 choke me
7370 #else
7371 $ac_func();
7372 #endif
7373
7374 ; return 0; }
7375 EOF
7376 if { (eval echo configure:7377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7377   rm -rf conftest*
7378   eval "ac_cv_func_$ac_func=yes"
7379 else
7380   echo "configure: failed program was:" >&5
7381   cat conftest.$ac_ext >&5
7382   rm -rf conftest*
7383   eval "ac_cv_func_$ac_func=no"
7384 fi
7385 rm -f conftest*
7386 fi
7387
7388 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7389   echo "$ac_t""yes" 1>&6
7390     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7391   cat >> confdefs.h <<EOF
7392 #define $ac_tr_func 1
7393 EOF
7394  
7395 else
7396   echo "$ac_t""no" 1>&6
7397 fi
7398 done
7399
7400   ;;
7401   esac
7402
7403
7404 case "$LIBS" in
7405   *-lsecurity*) for ac_func in set_auth_parameters
7406 do
7407 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7408 echo "configure:7409: checking for $ac_func" >&5
7409 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7410   echo $ac_n "(cached) $ac_c" 1>&6
7411 else
7412   cat > conftest.$ac_ext <<EOF
7413 #line 7414 "configure"
7414 #include "confdefs.h"
7415 /* System header to define __stub macros and hopefully few prototypes,
7416     which can conflict with char $ac_func(); below.  */
7417 #include <assert.h>
7418 /* Override any gcc2 internal prototype to avoid an error.  */
7419 /* We use char because int might match the return type of a gcc2
7420     builtin and then its argument prototype would still apply.  */
7421 char $ac_func();
7422
7423 int main() {
7424
7425 /* The GNU C library defines this for functions which it implements
7426     to always fail with ENOSYS.  Some functions are actually named
7427     something starting with __ and the normal name is an alias.  */
7428 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7429 choke me
7430 #else
7431 $ac_func();
7432 #endif
7433
7434 ; return 0; }
7435 EOF
7436 if { (eval echo configure:7437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7437   rm -rf conftest*
7438   eval "ac_cv_func_$ac_func=yes"
7439 else
7440   echo "configure: failed program was:" >&5
7441   cat conftest.$ac_ext >&5
7442   rm -rf conftest*
7443   eval "ac_cv_func_$ac_func=no"
7444 fi
7445 rm -f conftest*
7446 fi
7447
7448 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7449   echo "$ac_t""yes" 1>&6
7450     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7451   cat >> confdefs.h <<EOF
7452 #define $ac_tr_func 1
7453 EOF
7454  
7455 else
7456   echo "$ac_t""no" 1>&6
7457 fi
7458 done
7459  ;;
7460   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7461 echo "configure:7462: checking for set_auth_parameters in -lsecurity" >&5
7462 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7463 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7464   echo $ac_n "(cached) $ac_c" 1>&6
7465 else
7466   ac_save_LIBS="$LIBS"
7467 LIBS="-lsecurity  $LIBS"
7468 cat > conftest.$ac_ext <<EOF
7469 #line 7470 "configure"
7470 #include "confdefs.h"
7471 /* Override any gcc2 internal prototype to avoid an error.  */
7472 /* We use char because int might match the return type of a gcc2
7473     builtin and then its argument prototype would still apply.  */
7474 char set_auth_parameters();
7475
7476 int main() {
7477 set_auth_parameters()
7478 ; return 0; }
7479 EOF
7480 if { (eval echo configure:7481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7481   rm -rf conftest*
7482   eval "ac_cv_lib_$ac_lib_var=yes"
7483 else
7484   echo "configure: failed program was:" >&5
7485   cat conftest.$ac_ext >&5
7486   rm -rf conftest*
7487   eval "ac_cv_lib_$ac_lib_var=no"
7488 fi
7489 rm -f conftest*
7490 LIBS="$ac_save_LIBS"
7491
7492 fi
7493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7494   echo "$ac_t""yes" 1>&6
7495     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7496     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7497   cat >> confdefs.h <<EOF
7498 #define $ac_tr_lib 1
7499 EOF
7500
7501   LIBS="-lsecurity $LIBS"
7502
7503 else
7504   echo "$ac_t""no" 1>&6
7505 fi
7506  
7507      for ac_func in set_auth_parameters
7508 do
7509 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7510 echo "configure:7511: checking for $ac_func" >&5
7511 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7512   echo $ac_n "(cached) $ac_c" 1>&6
7513 else
7514   cat > conftest.$ac_ext <<EOF
7515 #line 7516 "configure"
7516 #include "confdefs.h"
7517 /* System header to define __stub macros and hopefully few prototypes,
7518     which can conflict with char $ac_func(); below.  */
7519 #include <assert.h>
7520 /* Override any gcc2 internal prototype to avoid an error.  */
7521 /* We use char because int might match the return type of a gcc2
7522     builtin and then its argument prototype would still apply.  */
7523 char $ac_func();
7524
7525 int main() {
7526
7527 /* The GNU C library defines this for functions which it implements
7528     to always fail with ENOSYS.  Some functions are actually named
7529     something starting with __ and the normal name is an alias.  */
7530 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7531 choke me
7532 #else
7533 $ac_func();
7534 #endif
7535
7536 ; return 0; }
7537 EOF
7538 if { (eval echo configure:7539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7539   rm -rf conftest*
7540   eval "ac_cv_func_$ac_func=yes"
7541 else
7542   echo "configure: failed program was:" >&5
7543   cat conftest.$ac_ext >&5
7544   rm -rf conftest*
7545   eval "ac_cv_func_$ac_func=no"
7546 fi
7547 rm -f conftest*
7548 fi
7549
7550 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7551   echo "$ac_t""yes" 1>&6
7552     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7553   cat >> confdefs.h <<EOF
7554 #define $ac_tr_func 1
7555 EOF
7556  
7557 else
7558   echo "$ac_t""no" 1>&6
7559 fi
7560 done
7561
7562   ;;
7563   esac
7564
7565 case "$LIBS" in
7566   *-lsec*) for ac_func in set_auth_parameters
7567 do
7568 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7569 echo "configure:7570: checking for $ac_func" >&5
7570 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7571   echo $ac_n "(cached) $ac_c" 1>&6
7572 else
7573   cat > conftest.$ac_ext <<EOF
7574 #line 7575 "configure"
7575 #include "confdefs.h"
7576 /* System header to define __stub macros and hopefully few prototypes,
7577     which can conflict with char $ac_func(); below.  */
7578 #include <assert.h>
7579 /* Override any gcc2 internal prototype to avoid an error.  */
7580 /* We use char because int might match the return type of a gcc2
7581     builtin and then its argument prototype would still apply.  */
7582 char $ac_func();
7583
7584 int main() {
7585
7586 /* The GNU C library defines this for functions which it implements
7587     to always fail with ENOSYS.  Some functions are actually named
7588     something starting with __ and the normal name is an alias.  */
7589 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7590 choke me
7591 #else
7592 $ac_func();
7593 #endif
7594
7595 ; return 0; }
7596 EOF
7597 if { (eval echo configure:7598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7598   rm -rf conftest*
7599   eval "ac_cv_func_$ac_func=yes"
7600 else
7601   echo "configure: failed program was:" >&5
7602   cat conftest.$ac_ext >&5
7603   rm -rf conftest*
7604   eval "ac_cv_func_$ac_func=no"
7605 fi
7606 rm -f conftest*
7607 fi
7608
7609 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7610   echo "$ac_t""yes" 1>&6
7611     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7612   cat >> confdefs.h <<EOF
7613 #define $ac_tr_func 1
7614 EOF
7615  
7616 else
7617   echo "$ac_t""no" 1>&6
7618 fi
7619 done
7620  ;;
7621   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7622 echo "configure:7623: checking for set_auth_parameters in -lsec" >&5
7623 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7624 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7625   echo $ac_n "(cached) $ac_c" 1>&6
7626 else
7627   ac_save_LIBS="$LIBS"
7628 LIBS="-lsec  $LIBS"
7629 cat > conftest.$ac_ext <<EOF
7630 #line 7631 "configure"
7631 #include "confdefs.h"
7632 /* Override any gcc2 internal prototype to avoid an error.  */
7633 /* We use char because int might match the return type of a gcc2
7634     builtin and then its argument prototype would still apply.  */
7635 char set_auth_parameters();
7636
7637 int main() {
7638 set_auth_parameters()
7639 ; return 0; }
7640 EOF
7641 if { (eval echo configure:7642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7642   rm -rf conftest*
7643   eval "ac_cv_lib_$ac_lib_var=yes"
7644 else
7645   echo "configure: failed program was:" >&5
7646   cat conftest.$ac_ext >&5
7647   rm -rf conftest*
7648   eval "ac_cv_lib_$ac_lib_var=no"
7649 fi
7650 rm -f conftest*
7651 LIBS="$ac_save_LIBS"
7652
7653 fi
7654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7655   echo "$ac_t""yes" 1>&6
7656     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7657     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7658   cat >> confdefs.h <<EOF
7659 #define $ac_tr_lib 1
7660 EOF
7661
7662   LIBS="-lsec $LIBS"
7663
7664 else
7665   echo "$ac_t""no" 1>&6
7666 fi
7667  
7668      for ac_func in set_auth_parameters
7669 do
7670 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7671 echo "configure:7672: checking for $ac_func" >&5
7672 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7673   echo $ac_n "(cached) $ac_c" 1>&6
7674 else
7675   cat > conftest.$ac_ext <<EOF
7676 #line 7677 "configure"
7677 #include "confdefs.h"
7678 /* System header to define __stub macros and hopefully few prototypes,
7679     which can conflict with char $ac_func(); below.  */
7680 #include <assert.h>
7681 /* Override any gcc2 internal prototype to avoid an error.  */
7682 /* We use char because int might match the return type of a gcc2
7683     builtin and then its argument prototype would still apply.  */
7684 char $ac_func();
7685
7686 int main() {
7687
7688 /* The GNU C library defines this for functions which it implements
7689     to always fail with ENOSYS.  Some functions are actually named
7690     something starting with __ and the normal name is an alias.  */
7691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7692 choke me
7693 #else
7694 $ac_func();
7695 #endif
7696
7697 ; return 0; }
7698 EOF
7699 if { (eval echo configure:7700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7700   rm -rf conftest*
7701   eval "ac_cv_func_$ac_func=yes"
7702 else
7703   echo "configure: failed program was:" >&5
7704   cat conftest.$ac_ext >&5
7705   rm -rf conftest*
7706   eval "ac_cv_func_$ac_func=no"
7707 fi
7708 rm -f conftest*
7709 fi
7710
7711 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7712   echo "$ac_t""yes" 1>&6
7713     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7714   cat >> confdefs.h <<EOF
7715 #define $ac_tr_func 1
7716 EOF
7717  
7718 else
7719   echo "$ac_t""no" 1>&6
7720 fi
7721 done
7722
7723   ;;
7724   esac
7725
7726
7727 # UnixWare 7.x has its getspnam in -lgen
7728 case "$LIBS" in
7729   *-lgen*) for ac_func in getspnam
7730 do
7731 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7732 echo "configure:7733: checking for $ac_func" >&5
7733 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7734   echo $ac_n "(cached) $ac_c" 1>&6
7735 else
7736   cat > conftest.$ac_ext <<EOF
7737 #line 7738 "configure"
7738 #include "confdefs.h"
7739 /* System header to define __stub macros and hopefully few prototypes,
7740     which can conflict with char $ac_func(); below.  */
7741 #include <assert.h>
7742 /* Override any gcc2 internal prototype to avoid an error.  */
7743 /* We use char because int might match the return type of a gcc2
7744     builtin and then its argument prototype would still apply.  */
7745 char $ac_func();
7746
7747 int main() {
7748
7749 /* The GNU C library defines this for functions which it implements
7750     to always fail with ENOSYS.  Some functions are actually named
7751     something starting with __ and the normal name is an alias.  */
7752 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7753 choke me
7754 #else
7755 $ac_func();
7756 #endif
7757
7758 ; return 0; }
7759 EOF
7760 if { (eval echo configure:7761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7761   rm -rf conftest*
7762   eval "ac_cv_func_$ac_func=yes"
7763 else
7764   echo "configure: failed program was:" >&5
7765   cat conftest.$ac_ext >&5
7766   rm -rf conftest*
7767   eval "ac_cv_func_$ac_func=no"
7768 fi
7769 rm -f conftest*
7770 fi
7771
7772 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7773   echo "$ac_t""yes" 1>&6
7774     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7775   cat >> confdefs.h <<EOF
7776 #define $ac_tr_func 1
7777 EOF
7778  
7779 else
7780   echo "$ac_t""no" 1>&6
7781 fi
7782 done
7783  ;;
7784   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7785 echo "configure:7786: checking for getspnam in -lgen" >&5
7786 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7787 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7788   echo $ac_n "(cached) $ac_c" 1>&6
7789 else
7790   ac_save_LIBS="$LIBS"
7791 LIBS="-lgen  $LIBS"
7792 cat > conftest.$ac_ext <<EOF
7793 #line 7794 "configure"
7794 #include "confdefs.h"
7795 /* Override any gcc2 internal prototype to avoid an error.  */
7796 /* We use char because int might match the return type of a gcc2
7797     builtin and then its argument prototype would still apply.  */
7798 char getspnam();
7799
7800 int main() {
7801 getspnam()
7802 ; return 0; }
7803 EOF
7804 if { (eval echo configure:7805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7805   rm -rf conftest*
7806   eval "ac_cv_lib_$ac_lib_var=yes"
7807 else
7808   echo "configure: failed program was:" >&5
7809   cat conftest.$ac_ext >&5
7810   rm -rf conftest*
7811   eval "ac_cv_lib_$ac_lib_var=no"
7812 fi
7813 rm -f conftest*
7814 LIBS="$ac_save_LIBS"
7815
7816 fi
7817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7818   echo "$ac_t""yes" 1>&6
7819     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7820     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7821   cat >> confdefs.h <<EOF
7822 #define $ac_tr_lib 1
7823 EOF
7824
7825   LIBS="-lgen $LIBS"
7826
7827 else
7828   echo "$ac_t""no" 1>&6
7829 fi
7830  
7831      for ac_func in getspnam
7832 do
7833 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7834 echo "configure:7835: checking for $ac_func" >&5
7835 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7836   echo $ac_n "(cached) $ac_c" 1>&6
7837 else
7838   cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 /* System header to define __stub macros and hopefully few prototypes,
7842     which can conflict with char $ac_func(); below.  */
7843 #include <assert.h>
7844 /* Override any gcc2 internal prototype to avoid an error.  */
7845 /* We use char because int might match the return type of a gcc2
7846     builtin and then its argument prototype would still apply.  */
7847 char $ac_func();
7848
7849 int main() {
7850
7851 /* The GNU C library defines this for functions which it implements
7852     to always fail with ENOSYS.  Some functions are actually named
7853     something starting with __ and the normal name is an alias.  */
7854 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7855 choke me
7856 #else
7857 $ac_func();
7858 #endif
7859
7860 ; return 0; }
7861 EOF
7862 if { (eval echo configure:7863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7863   rm -rf conftest*
7864   eval "ac_cv_func_$ac_func=yes"
7865 else
7866   echo "configure: failed program was:" >&5
7867   cat conftest.$ac_ext >&5
7868   rm -rf conftest*
7869   eval "ac_cv_func_$ac_func=no"
7870 fi
7871 rm -f conftest*
7872 fi
7873
7874 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7875   echo "$ac_t""yes" 1>&6
7876     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7877   cat >> confdefs.h <<EOF
7878 #define $ac_tr_func 1
7879 EOF
7880  
7881 else
7882   echo "$ac_t""no" 1>&6
7883 fi
7884 done
7885
7886   ;;
7887   esac
7888
7889
7890 case "$LIBS" in
7891   *-lsecurity*) for ac_func in getspnam
7892 do
7893 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7894 echo "configure:7895: checking for $ac_func" >&5
7895 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7896   echo $ac_n "(cached) $ac_c" 1>&6
7897 else
7898   cat > conftest.$ac_ext <<EOF
7899 #line 7900 "configure"
7900 #include "confdefs.h"
7901 /* System header to define __stub macros and hopefully few prototypes,
7902     which can conflict with char $ac_func(); below.  */
7903 #include <assert.h>
7904 /* Override any gcc2 internal prototype to avoid an error.  */
7905 /* We use char because int might match the return type of a gcc2
7906     builtin and then its argument prototype would still apply.  */
7907 char $ac_func();
7908
7909 int main() {
7910
7911 /* The GNU C library defines this for functions which it implements
7912     to always fail with ENOSYS.  Some functions are actually named
7913     something starting with __ and the normal name is an alias.  */
7914 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7915 choke me
7916 #else
7917 $ac_func();
7918 #endif
7919
7920 ; return 0; }
7921 EOF
7922 if { (eval echo configure:7923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7923   rm -rf conftest*
7924   eval "ac_cv_func_$ac_func=yes"
7925 else
7926   echo "configure: failed program was:" >&5
7927   cat conftest.$ac_ext >&5
7928   rm -rf conftest*
7929   eval "ac_cv_func_$ac_func=no"
7930 fi
7931 rm -f conftest*
7932 fi
7933
7934 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7935   echo "$ac_t""yes" 1>&6
7936     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7937   cat >> confdefs.h <<EOF
7938 #define $ac_tr_func 1
7939 EOF
7940  
7941 else
7942   echo "$ac_t""no" 1>&6
7943 fi
7944 done
7945  ;;
7946   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7947 echo "configure:7948: checking for getspnam in -lsecurity" >&5
7948 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7949 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7950   echo $ac_n "(cached) $ac_c" 1>&6
7951 else
7952   ac_save_LIBS="$LIBS"
7953 LIBS="-lsecurity  $LIBS"
7954 cat > conftest.$ac_ext <<EOF
7955 #line 7956 "configure"
7956 #include "confdefs.h"
7957 /* Override any gcc2 internal prototype to avoid an error.  */
7958 /* We use char because int might match the return type of a gcc2
7959     builtin and then its argument prototype would still apply.  */
7960 char getspnam();
7961
7962 int main() {
7963 getspnam()
7964 ; return 0; }
7965 EOF
7966 if { (eval echo configure:7967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7967   rm -rf conftest*
7968   eval "ac_cv_lib_$ac_lib_var=yes"
7969 else
7970   echo "configure: failed program was:" >&5
7971   cat conftest.$ac_ext >&5
7972   rm -rf conftest*
7973   eval "ac_cv_lib_$ac_lib_var=no"
7974 fi
7975 rm -f conftest*
7976 LIBS="$ac_save_LIBS"
7977
7978 fi
7979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7980   echo "$ac_t""yes" 1>&6
7981     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7982     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7983   cat >> confdefs.h <<EOF
7984 #define $ac_tr_lib 1
7985 EOF
7986
7987   LIBS="-lsecurity $LIBS"
7988
7989 else
7990   echo "$ac_t""no" 1>&6
7991 fi
7992  
7993      for ac_func in getspnam
7994 do
7995 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7996 echo "configure:7997: checking for $ac_func" >&5
7997 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7998   echo $ac_n "(cached) $ac_c" 1>&6
7999 else
8000   cat > conftest.$ac_ext <<EOF
8001 #line 8002 "configure"
8002 #include "confdefs.h"
8003 /* System header to define __stub macros and hopefully few prototypes,
8004     which can conflict with char $ac_func(); below.  */
8005 #include <assert.h>
8006 /* Override any gcc2 internal prototype to avoid an error.  */
8007 /* We use char because int might match the return type of a gcc2
8008     builtin and then its argument prototype would still apply.  */
8009 char $ac_func();
8010
8011 int main() {
8012
8013 /* The GNU C library defines this for functions which it implements
8014     to always fail with ENOSYS.  Some functions are actually named
8015     something starting with __ and the normal name is an alias.  */
8016 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8017 choke me
8018 #else
8019 $ac_func();
8020 #endif
8021
8022 ; return 0; }
8023 EOF
8024 if { (eval echo configure:8025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8025   rm -rf conftest*
8026   eval "ac_cv_func_$ac_func=yes"
8027 else
8028   echo "configure: failed program was:" >&5
8029   cat conftest.$ac_ext >&5
8030   rm -rf conftest*
8031   eval "ac_cv_func_$ac_func=no"
8032 fi
8033 rm -f conftest*
8034 fi
8035
8036 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8037   echo "$ac_t""yes" 1>&6
8038     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8039   cat >> confdefs.h <<EOF
8040 #define $ac_tr_func 1
8041 EOF
8042  
8043 else
8044   echo "$ac_t""no" 1>&6
8045 fi
8046 done
8047
8048   ;;
8049   esac
8050
8051 case "$LIBS" in
8052   *-lsec*) for ac_func in getspnam
8053 do
8054 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8055 echo "configure:8056: checking for $ac_func" >&5
8056 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8057   echo $ac_n "(cached) $ac_c" 1>&6
8058 else
8059   cat > conftest.$ac_ext <<EOF
8060 #line 8061 "configure"
8061 #include "confdefs.h"
8062 /* System header to define __stub macros and hopefully few prototypes,
8063     which can conflict with char $ac_func(); below.  */
8064 #include <assert.h>
8065 /* Override any gcc2 internal prototype to avoid an error.  */
8066 /* We use char because int might match the return type of a gcc2
8067     builtin and then its argument prototype would still apply.  */
8068 char $ac_func();
8069
8070 int main() {
8071
8072 /* The GNU C library defines this for functions which it implements
8073     to always fail with ENOSYS.  Some functions are actually named
8074     something starting with __ and the normal name is an alias.  */
8075 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8076 choke me
8077 #else
8078 $ac_func();
8079 #endif
8080
8081 ; return 0; }
8082 EOF
8083 if { (eval echo configure:8084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8084   rm -rf conftest*
8085   eval "ac_cv_func_$ac_func=yes"
8086 else
8087   echo "configure: failed program was:" >&5
8088   cat conftest.$ac_ext >&5
8089   rm -rf conftest*
8090   eval "ac_cv_func_$ac_func=no"
8091 fi
8092 rm -f conftest*
8093 fi
8094
8095 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8096   echo "$ac_t""yes" 1>&6
8097     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8098   cat >> confdefs.h <<EOF
8099 #define $ac_tr_func 1
8100 EOF
8101  
8102 else
8103   echo "$ac_t""no" 1>&6
8104 fi
8105 done
8106  ;;
8107   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8108 echo "configure:8109: checking for getspnam in -lsec" >&5
8109 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8110 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8111   echo $ac_n "(cached) $ac_c" 1>&6
8112 else
8113   ac_save_LIBS="$LIBS"
8114 LIBS="-lsec  $LIBS"
8115 cat > conftest.$ac_ext <<EOF
8116 #line 8117 "configure"
8117 #include "confdefs.h"
8118 /* Override any gcc2 internal prototype to avoid an error.  */
8119 /* We use char because int might match the return type of a gcc2
8120     builtin and then its argument prototype would still apply.  */
8121 char getspnam();
8122
8123 int main() {
8124 getspnam()
8125 ; return 0; }
8126 EOF
8127 if { (eval echo configure:8128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8128   rm -rf conftest*
8129   eval "ac_cv_lib_$ac_lib_var=yes"
8130 else
8131   echo "configure: failed program was:" >&5
8132   cat conftest.$ac_ext >&5
8133   rm -rf conftest*
8134   eval "ac_cv_lib_$ac_lib_var=no"
8135 fi
8136 rm -f conftest*
8137 LIBS="$ac_save_LIBS"
8138
8139 fi
8140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8141   echo "$ac_t""yes" 1>&6
8142     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8143     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8144   cat >> confdefs.h <<EOF
8145 #define $ac_tr_lib 1
8146 EOF
8147
8148   LIBS="-lsec $LIBS"
8149
8150 else
8151   echo "$ac_t""no" 1>&6
8152 fi
8153  
8154      for ac_func in getspnam
8155 do
8156 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8157 echo "configure:8158: checking for $ac_func" >&5
8158 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8159   echo $ac_n "(cached) $ac_c" 1>&6
8160 else
8161   cat > conftest.$ac_ext <<EOF
8162 #line 8163 "configure"
8163 #include "confdefs.h"
8164 /* System header to define __stub macros and hopefully few prototypes,
8165     which can conflict with char $ac_func(); below.  */
8166 #include <assert.h>
8167 /* Override any gcc2 internal prototype to avoid an error.  */
8168 /* We use char because int might match the return type of a gcc2
8169     builtin and then its argument prototype would still apply.  */
8170 char $ac_func();
8171
8172 int main() {
8173
8174 /* The GNU C library defines this for functions which it implements
8175     to always fail with ENOSYS.  Some functions are actually named
8176     something starting with __ and the normal name is an alias.  */
8177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8178 choke me
8179 #else
8180 $ac_func();
8181 #endif
8182
8183 ; return 0; }
8184 EOF
8185 if { (eval echo configure:8186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8186   rm -rf conftest*
8187   eval "ac_cv_func_$ac_func=yes"
8188 else
8189   echo "configure: failed program was:" >&5
8190   cat conftest.$ac_ext >&5
8191   rm -rf conftest*
8192   eval "ac_cv_func_$ac_func=no"
8193 fi
8194 rm -f conftest*
8195 fi
8196
8197 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8198   echo "$ac_t""yes" 1>&6
8199     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8200   cat >> confdefs.h <<EOF
8201 #define $ac_tr_func 1
8202 EOF
8203  
8204 else
8205   echo "$ac_t""no" 1>&6
8206 fi
8207 done
8208
8209   ;;
8210   esac
8211
8212
8213 case "$LIBS" in
8214   *-lsecurity*) for ac_func in bigcrypt
8215 do
8216 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8217 echo "configure:8218: checking for $ac_func" >&5
8218 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8219   echo $ac_n "(cached) $ac_c" 1>&6
8220 else
8221   cat > conftest.$ac_ext <<EOF
8222 #line 8223 "configure"
8223 #include "confdefs.h"
8224 /* System header to define __stub macros and hopefully few prototypes,
8225     which can conflict with char $ac_func(); below.  */
8226 #include <assert.h>
8227 /* Override any gcc2 internal prototype to avoid an error.  */
8228 /* We use char because int might match the return type of a gcc2
8229     builtin and then its argument prototype would still apply.  */
8230 char $ac_func();
8231
8232 int main() {
8233
8234 /* The GNU C library defines this for functions which it implements
8235     to always fail with ENOSYS.  Some functions are actually named
8236     something starting with __ and the normal name is an alias.  */
8237 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8238 choke me
8239 #else
8240 $ac_func();
8241 #endif
8242
8243 ; return 0; }
8244 EOF
8245 if { (eval echo configure:8246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8246   rm -rf conftest*
8247   eval "ac_cv_func_$ac_func=yes"
8248 else
8249   echo "configure: failed program was:" >&5
8250   cat conftest.$ac_ext >&5
8251   rm -rf conftest*
8252   eval "ac_cv_func_$ac_func=no"
8253 fi
8254 rm -f conftest*
8255 fi
8256
8257 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8258   echo "$ac_t""yes" 1>&6
8259     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8260   cat >> confdefs.h <<EOF
8261 #define $ac_tr_func 1
8262 EOF
8263  
8264 else
8265   echo "$ac_t""no" 1>&6
8266 fi
8267 done
8268  ;;
8269   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8270 echo "configure:8271: checking for bigcrypt in -lsecurity" >&5
8271 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8272 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8273   echo $ac_n "(cached) $ac_c" 1>&6
8274 else
8275   ac_save_LIBS="$LIBS"
8276 LIBS="-lsecurity  $LIBS"
8277 cat > conftest.$ac_ext <<EOF
8278 #line 8279 "configure"
8279 #include "confdefs.h"
8280 /* Override any gcc2 internal prototype to avoid an error.  */
8281 /* We use char because int might match the return type of a gcc2
8282     builtin and then its argument prototype would still apply.  */
8283 char bigcrypt();
8284
8285 int main() {
8286 bigcrypt()
8287 ; return 0; }
8288 EOF
8289 if { (eval echo configure:8290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8290   rm -rf conftest*
8291   eval "ac_cv_lib_$ac_lib_var=yes"
8292 else
8293   echo "configure: failed program was:" >&5
8294   cat conftest.$ac_ext >&5
8295   rm -rf conftest*
8296   eval "ac_cv_lib_$ac_lib_var=no"
8297 fi
8298 rm -f conftest*
8299 LIBS="$ac_save_LIBS"
8300
8301 fi
8302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8303   echo "$ac_t""yes" 1>&6
8304     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8305     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8306   cat >> confdefs.h <<EOF
8307 #define $ac_tr_lib 1
8308 EOF
8309
8310   LIBS="-lsecurity $LIBS"
8311
8312 else
8313   echo "$ac_t""no" 1>&6
8314 fi
8315  
8316      for ac_func in bigcrypt
8317 do
8318 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8319 echo "configure:8320: checking for $ac_func" >&5
8320 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8321   echo $ac_n "(cached) $ac_c" 1>&6
8322 else
8323   cat > conftest.$ac_ext <<EOF
8324 #line 8325 "configure"
8325 #include "confdefs.h"
8326 /* System header to define __stub macros and hopefully few prototypes,
8327     which can conflict with char $ac_func(); below.  */
8328 #include <assert.h>
8329 /* Override any gcc2 internal prototype to avoid an error.  */
8330 /* We use char because int might match the return type of a gcc2
8331     builtin and then its argument prototype would still apply.  */
8332 char $ac_func();
8333
8334 int main() {
8335
8336 /* The GNU C library defines this for functions which it implements
8337     to always fail with ENOSYS.  Some functions are actually named
8338     something starting with __ and the normal name is an alias.  */
8339 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8340 choke me
8341 #else
8342 $ac_func();
8343 #endif
8344
8345 ; return 0; }
8346 EOF
8347 if { (eval echo configure:8348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8348   rm -rf conftest*
8349   eval "ac_cv_func_$ac_func=yes"
8350 else
8351   echo "configure: failed program was:" >&5
8352   cat conftest.$ac_ext >&5
8353   rm -rf conftest*
8354   eval "ac_cv_func_$ac_func=no"
8355 fi
8356 rm -f conftest*
8357 fi
8358
8359 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8360   echo "$ac_t""yes" 1>&6
8361     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8362   cat >> confdefs.h <<EOF
8363 #define $ac_tr_func 1
8364 EOF
8365  
8366 else
8367   echo "$ac_t""no" 1>&6
8368 fi
8369 done
8370
8371   ;;
8372   esac
8373
8374 case "$LIBS" in
8375   *-lsec*) for ac_func in bigcrypt
8376 do
8377 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8378 echo "configure:8379: checking for $ac_func" >&5
8379 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8380   echo $ac_n "(cached) $ac_c" 1>&6
8381 else
8382   cat > conftest.$ac_ext <<EOF
8383 #line 8384 "configure"
8384 #include "confdefs.h"
8385 /* System header to define __stub macros and hopefully few prototypes,
8386     which can conflict with char $ac_func(); below.  */
8387 #include <assert.h>
8388 /* Override any gcc2 internal prototype to avoid an error.  */
8389 /* We use char because int might match the return type of a gcc2
8390     builtin and then its argument prototype would still apply.  */
8391 char $ac_func();
8392
8393 int main() {
8394
8395 /* The GNU C library defines this for functions which it implements
8396     to always fail with ENOSYS.  Some functions are actually named
8397     something starting with __ and the normal name is an alias.  */
8398 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8399 choke me
8400 #else
8401 $ac_func();
8402 #endif
8403
8404 ; return 0; }
8405 EOF
8406 if { (eval echo configure:8407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8407   rm -rf conftest*
8408   eval "ac_cv_func_$ac_func=yes"
8409 else
8410   echo "configure: failed program was:" >&5
8411   cat conftest.$ac_ext >&5
8412   rm -rf conftest*
8413   eval "ac_cv_func_$ac_func=no"
8414 fi
8415 rm -f conftest*
8416 fi
8417
8418 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8419   echo "$ac_t""yes" 1>&6
8420     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8421   cat >> confdefs.h <<EOF
8422 #define $ac_tr_func 1
8423 EOF
8424  
8425 else
8426   echo "$ac_t""no" 1>&6
8427 fi
8428 done
8429  ;;
8430   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8431 echo "configure:8432: checking for bigcrypt in -lsec" >&5
8432 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8433 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8434   echo $ac_n "(cached) $ac_c" 1>&6
8435 else
8436   ac_save_LIBS="$LIBS"
8437 LIBS="-lsec  $LIBS"
8438 cat > conftest.$ac_ext <<EOF
8439 #line 8440 "configure"
8440 #include "confdefs.h"
8441 /* Override any gcc2 internal prototype to avoid an error.  */
8442 /* We use char because int might match the return type of a gcc2
8443     builtin and then its argument prototype would still apply.  */
8444 char bigcrypt();
8445
8446 int main() {
8447 bigcrypt()
8448 ; return 0; }
8449 EOF
8450 if { (eval echo configure:8451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8451   rm -rf conftest*
8452   eval "ac_cv_lib_$ac_lib_var=yes"
8453 else
8454   echo "configure: failed program was:" >&5
8455   cat conftest.$ac_ext >&5
8456   rm -rf conftest*
8457   eval "ac_cv_lib_$ac_lib_var=no"
8458 fi
8459 rm -f conftest*
8460 LIBS="$ac_save_LIBS"
8461
8462 fi
8463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8464   echo "$ac_t""yes" 1>&6
8465     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8466     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8467   cat >> confdefs.h <<EOF
8468 #define $ac_tr_lib 1
8469 EOF
8470
8471   LIBS="-lsec $LIBS"
8472
8473 else
8474   echo "$ac_t""no" 1>&6
8475 fi
8476  
8477      for ac_func in bigcrypt
8478 do
8479 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8480 echo "configure:8481: checking for $ac_func" >&5
8481 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8482   echo $ac_n "(cached) $ac_c" 1>&6
8483 else
8484   cat > conftest.$ac_ext <<EOF
8485 #line 8486 "configure"
8486 #include "confdefs.h"
8487 /* System header to define __stub macros and hopefully few prototypes,
8488     which can conflict with char $ac_func(); below.  */
8489 #include <assert.h>
8490 /* Override any gcc2 internal prototype to avoid an error.  */
8491 /* We use char because int might match the return type of a gcc2
8492     builtin and then its argument prototype would still apply.  */
8493 char $ac_func();
8494
8495 int main() {
8496
8497 /* The GNU C library defines this for functions which it implements
8498     to always fail with ENOSYS.  Some functions are actually named
8499     something starting with __ and the normal name is an alias.  */
8500 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8501 choke me
8502 #else
8503 $ac_func();
8504 #endif
8505
8506 ; return 0; }
8507 EOF
8508 if { (eval echo configure:8509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8509   rm -rf conftest*
8510   eval "ac_cv_func_$ac_func=yes"
8511 else
8512   echo "configure: failed program was:" >&5
8513   cat conftest.$ac_ext >&5
8514   rm -rf conftest*
8515   eval "ac_cv_func_$ac_func=no"
8516 fi
8517 rm -f conftest*
8518 fi
8519
8520 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8521   echo "$ac_t""yes" 1>&6
8522     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8523   cat >> confdefs.h <<EOF
8524 #define $ac_tr_func 1
8525 EOF
8526  
8527 else
8528   echo "$ac_t""no" 1>&6
8529 fi
8530 done
8531
8532   ;;
8533   esac
8534
8535
8536 case "$LIBS" in
8537   *-lsecurity*) for ac_func in getprpwnam
8538 do
8539 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8540 echo "configure:8541: checking for $ac_func" >&5
8541 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8542   echo $ac_n "(cached) $ac_c" 1>&6
8543 else
8544   cat > conftest.$ac_ext <<EOF
8545 #line 8546 "configure"
8546 #include "confdefs.h"
8547 /* System header to define __stub macros and hopefully few prototypes,
8548     which can conflict with char $ac_func(); below.  */
8549 #include <assert.h>
8550 /* Override any gcc2 internal prototype to avoid an error.  */
8551 /* We use char because int might match the return type of a gcc2
8552     builtin and then its argument prototype would still apply.  */
8553 char $ac_func();
8554
8555 int main() {
8556
8557 /* The GNU C library defines this for functions which it implements
8558     to always fail with ENOSYS.  Some functions are actually named
8559     something starting with __ and the normal name is an alias.  */
8560 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8561 choke me
8562 #else
8563 $ac_func();
8564 #endif
8565
8566 ; return 0; }
8567 EOF
8568 if { (eval echo configure:8569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8569   rm -rf conftest*
8570   eval "ac_cv_func_$ac_func=yes"
8571 else
8572   echo "configure: failed program was:" >&5
8573   cat conftest.$ac_ext >&5
8574   rm -rf conftest*
8575   eval "ac_cv_func_$ac_func=no"
8576 fi
8577 rm -f conftest*
8578 fi
8579
8580 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8581   echo "$ac_t""yes" 1>&6
8582     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8583   cat >> confdefs.h <<EOF
8584 #define $ac_tr_func 1
8585 EOF
8586  
8587 else
8588   echo "$ac_t""no" 1>&6
8589 fi
8590 done
8591  ;;
8592   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8593 echo "configure:8594: checking for getprpwnam in -lsecurity" >&5
8594 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8595 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8596   echo $ac_n "(cached) $ac_c" 1>&6
8597 else
8598   ac_save_LIBS="$LIBS"
8599 LIBS="-lsecurity  $LIBS"
8600 cat > conftest.$ac_ext <<EOF
8601 #line 8602 "configure"
8602 #include "confdefs.h"
8603 /* Override any gcc2 internal prototype to avoid an error.  */
8604 /* We use char because int might match the return type of a gcc2
8605     builtin and then its argument prototype would still apply.  */
8606 char getprpwnam();
8607
8608 int main() {
8609 getprpwnam()
8610 ; return 0; }
8611 EOF
8612 if { (eval echo configure:8613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8613   rm -rf conftest*
8614   eval "ac_cv_lib_$ac_lib_var=yes"
8615 else
8616   echo "configure: failed program was:" >&5
8617   cat conftest.$ac_ext >&5
8618   rm -rf conftest*
8619   eval "ac_cv_lib_$ac_lib_var=no"
8620 fi
8621 rm -f conftest*
8622 LIBS="$ac_save_LIBS"
8623
8624 fi
8625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8626   echo "$ac_t""yes" 1>&6
8627     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8628     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8629   cat >> confdefs.h <<EOF
8630 #define $ac_tr_lib 1
8631 EOF
8632
8633   LIBS="-lsecurity $LIBS"
8634
8635 else
8636   echo "$ac_t""no" 1>&6
8637 fi
8638  
8639      for ac_func in getprpwnam
8640 do
8641 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8642 echo "configure:8643: checking for $ac_func" >&5
8643 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8644   echo $ac_n "(cached) $ac_c" 1>&6
8645 else
8646   cat > conftest.$ac_ext <<EOF
8647 #line 8648 "configure"
8648 #include "confdefs.h"
8649 /* System header to define __stub macros and hopefully few prototypes,
8650     which can conflict with char $ac_func(); below.  */
8651 #include <assert.h>
8652 /* Override any gcc2 internal prototype to avoid an error.  */
8653 /* We use char because int might match the return type of a gcc2
8654     builtin and then its argument prototype would still apply.  */
8655 char $ac_func();
8656
8657 int main() {
8658
8659 /* The GNU C library defines this for functions which it implements
8660     to always fail with ENOSYS.  Some functions are actually named
8661     something starting with __ and the normal name is an alias.  */
8662 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8663 choke me
8664 #else
8665 $ac_func();
8666 #endif
8667
8668 ; return 0; }
8669 EOF
8670 if { (eval echo configure:8671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8671   rm -rf conftest*
8672   eval "ac_cv_func_$ac_func=yes"
8673 else
8674   echo "configure: failed program was:" >&5
8675   cat conftest.$ac_ext >&5
8676   rm -rf conftest*
8677   eval "ac_cv_func_$ac_func=no"
8678 fi
8679 rm -f conftest*
8680 fi
8681
8682 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8683   echo "$ac_t""yes" 1>&6
8684     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8685   cat >> confdefs.h <<EOF
8686 #define $ac_tr_func 1
8687 EOF
8688  
8689 else
8690   echo "$ac_t""no" 1>&6
8691 fi
8692 done
8693
8694   ;;
8695   esac
8696
8697 case "$LIBS" in
8698   *-lsec*) for ac_func in getprpwnam
8699 do
8700 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8701 echo "configure:8702: checking for $ac_func" >&5
8702 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8703   echo $ac_n "(cached) $ac_c" 1>&6
8704 else
8705   cat > conftest.$ac_ext <<EOF
8706 #line 8707 "configure"
8707 #include "confdefs.h"
8708 /* System header to define __stub macros and hopefully few prototypes,
8709     which can conflict with char $ac_func(); below.  */
8710 #include <assert.h>
8711 /* Override any gcc2 internal prototype to avoid an error.  */
8712 /* We use char because int might match the return type of a gcc2
8713     builtin and then its argument prototype would still apply.  */
8714 char $ac_func();
8715
8716 int main() {
8717
8718 /* The GNU C library defines this for functions which it implements
8719     to always fail with ENOSYS.  Some functions are actually named
8720     something starting with __ and the normal name is an alias.  */
8721 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8722 choke me
8723 #else
8724 $ac_func();
8725 #endif
8726
8727 ; return 0; }
8728 EOF
8729 if { (eval echo configure:8730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8730   rm -rf conftest*
8731   eval "ac_cv_func_$ac_func=yes"
8732 else
8733   echo "configure: failed program was:" >&5
8734   cat conftest.$ac_ext >&5
8735   rm -rf conftest*
8736   eval "ac_cv_func_$ac_func=no"
8737 fi
8738 rm -f conftest*
8739 fi
8740
8741 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8742   echo "$ac_t""yes" 1>&6
8743     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8744   cat >> confdefs.h <<EOF
8745 #define $ac_tr_func 1
8746 EOF
8747  
8748 else
8749   echo "$ac_t""no" 1>&6
8750 fi
8751 done
8752  ;;
8753   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8754 echo "configure:8755: checking for getprpwnam in -lsec" >&5
8755 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8756 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8757   echo $ac_n "(cached) $ac_c" 1>&6
8758 else
8759   ac_save_LIBS="$LIBS"
8760 LIBS="-lsec  $LIBS"
8761 cat > conftest.$ac_ext <<EOF
8762 #line 8763 "configure"
8763 #include "confdefs.h"
8764 /* Override any gcc2 internal prototype to avoid an error.  */
8765 /* We use char because int might match the return type of a gcc2
8766     builtin and then its argument prototype would still apply.  */
8767 char getprpwnam();
8768
8769 int main() {
8770 getprpwnam()
8771 ; return 0; }
8772 EOF
8773 if { (eval echo configure:8774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8774   rm -rf conftest*
8775   eval "ac_cv_lib_$ac_lib_var=yes"
8776 else
8777   echo "configure: failed program was:" >&5
8778   cat conftest.$ac_ext >&5
8779   rm -rf conftest*
8780   eval "ac_cv_lib_$ac_lib_var=no"
8781 fi
8782 rm -f conftest*
8783 LIBS="$ac_save_LIBS"
8784
8785 fi
8786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8787   echo "$ac_t""yes" 1>&6
8788     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8789     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8790   cat >> confdefs.h <<EOF
8791 #define $ac_tr_lib 1
8792 EOF
8793
8794   LIBS="-lsec $LIBS"
8795
8796 else
8797   echo "$ac_t""no" 1>&6
8798 fi
8799  
8800      for ac_func in getprpwnam
8801 do
8802 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8803 echo "configure:8804: checking for $ac_func" >&5
8804 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8805   echo $ac_n "(cached) $ac_c" 1>&6
8806 else
8807   cat > conftest.$ac_ext <<EOF
8808 #line 8809 "configure"
8809 #include "confdefs.h"
8810 /* System header to define __stub macros and hopefully few prototypes,
8811     which can conflict with char $ac_func(); below.  */
8812 #include <assert.h>
8813 /* Override any gcc2 internal prototype to avoid an error.  */
8814 /* We use char because int might match the return type of a gcc2
8815     builtin and then its argument prototype would still apply.  */
8816 char $ac_func();
8817
8818 int main() {
8819
8820 /* The GNU C library defines this for functions which it implements
8821     to always fail with ENOSYS.  Some functions are actually named
8822     something starting with __ and the normal name is an alias.  */
8823 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8824 choke me
8825 #else
8826 $ac_func();
8827 #endif
8828
8829 ; return 0; }
8830 EOF
8831 if { (eval echo configure:8832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8832   rm -rf conftest*
8833   eval "ac_cv_func_$ac_func=yes"
8834 else
8835   echo "configure: failed program was:" >&5
8836   cat conftest.$ac_ext >&5
8837   rm -rf conftest*
8838   eval "ac_cv_func_$ac_func=no"
8839 fi
8840 rm -f conftest*
8841 fi
8842
8843 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8844   echo "$ac_t""yes" 1>&6
8845     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8846   cat >> confdefs.h <<EOF
8847 #define $ac_tr_func 1
8848 EOF
8849  
8850 else
8851   echo "$ac_t""no" 1>&6
8852 fi
8853 done
8854
8855   ;;
8856   esac
8857
8858
8859 # this bit needs to be modified for each OS that is suported by
8860 # smbwrapper. You need to specify how to created a shared library and
8861 # how to compile C code to produce PIC object files
8862
8863 # these are the defaults, good for lots of systems
8864 HOST_OS="$host_os"
8865 LDSHFLAGS="-shared"
8866 SONAMEFLAG="#"
8867 SHLD="\${CC}"
8868 PICFLAG=""
8869 PICSUFFIX="po"
8870 POBAD_CC="#"
8871 SHLIBEXT="so"
8872 # Assume non-shared by default and override below
8873 BLDSHARED="false"
8874 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8875 echo "configure:8876: checking ability to build shared libraries" >&5
8876
8877 # and these are for particular systems
8878 case "$host_os" in
8879                 *linux*)   cat >> confdefs.h <<\EOF
8880 #define LINUX 1
8881 EOF
8882
8883                         BLDSHARED="true"
8884                         LDSHFLAGS="-shared" 
8885                         DYNEXP="-Wl,--export-dynamic"
8886                         PICFLAG="-fPIC"
8887                         SONAMEFLAG="-Wl,-soname="
8888                         cat >> confdefs.h <<\EOF
8889 #define STAT_ST_BLOCKSIZE 512
8890 EOF
8891
8892                 ;;
8893                 *solaris*) cat >> confdefs.h <<\EOF
8894 #define SUNOS5 1
8895 EOF
8896
8897                         BLDSHARED="true"
8898                         LDSHFLAGS="-G"
8899                         SONAMEFLAG="-h "
8900                         if test "${GCC}" = "yes"; then
8901                                 PICFLAG="-fPIC"
8902                                 if test "${ac_cv_prog_gnu_ld}" = "yes"; then
8903                                         DYNEXP="-Wl,-E"
8904                                 fi
8905                         else
8906                                 PICFLAG="-KPIC"
8907                                 ## ${CFLAGS} added for building 64-bit shared 
8908                                 ## libs using Sun's Compiler
8909                                 LDSHFLAGS="-G \${CFLAGS}"
8910                                 POBAD_CC=""
8911                                 PICSUFFIX="po.o"
8912                         fi
8913                         cat >> confdefs.h <<\EOF
8914 #define STAT_ST_BLOCKSIZE 512
8915 EOF
8916
8917                 ;;
8918                 *sunos*) cat >> confdefs.h <<\EOF
8919 #define SUNOS4 1
8920 EOF
8921
8922                         BLDSHARED="true"
8923                         LDSHFLAGS="-G"
8924                         SONAMEFLAG="-Wl,-h,"
8925                         PICFLAG="-KPIC"   # Is this correct for SunOS
8926                 ;;
8927                 *bsd*)  BLDSHARED="true"
8928                         LDSHFLAGS="-shared"
8929                         DYNEXP="-Wl,-Bdynamic"
8930                         SONAMEFLAG="-Wl,-soname,"
8931                         PICFLAG="-fPIC"
8932                         cat >> confdefs.h <<\EOF
8933 #define STAT_ST_BLOCKSIZE 512
8934 EOF
8935
8936                 ;;
8937                 *irix*) cat >> confdefs.h <<\EOF
8938 #define IRIX 1
8939 EOF
8940
8941                         case "$host_os" in
8942                         *irix6*) cat >> confdefs.h <<\EOF
8943 #define IRIX6 1
8944 EOF
8945
8946                         ;;
8947                         esac
8948                         ATTEMPT_WRAP32_BUILD=yes
8949                         BLDSHARED="true"
8950                         LDSHFLAGS="-set_version sgi1.0 -shared"
8951                         SONAMEFLAG="-soname "
8952                         SHLD="\${LD}"
8953                         if test "${GCC}" = "yes"; then
8954                                 PICFLAG="-fPIC"
8955                         else 
8956                                 PICFLAG="-KPIC"
8957                         fi
8958                         cat >> confdefs.h <<\EOF
8959 #define STAT_ST_BLOCKSIZE 512
8960 EOF
8961
8962                 ;;
8963                 *aix*) cat >> confdefs.h <<\EOF
8964 #define AIX 1
8965 EOF
8966
8967                         BLDSHARED="true"
8968                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8969                         DYNEXP="-Wl,-brtl,-bexpall"
8970                         if test "${GCC}" = "yes"; then
8971                                 PICFLAG="-O2"
8972                         else
8973                         PICFLAG="-O2 -qmaxmem=6000"
8974                                 ## for funky AIX compiler using strncpy()
8975                                 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT"
8976                         fi
8977
8978                         cat >> confdefs.h <<\EOF
8979 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8980 EOF
8981
8982                 ;;
8983                 *hpux*) cat >> confdefs.h <<\EOF
8984 #define HPUX 1
8985 EOF
8986
8987                         SHLIBEXT="sl"
8988                         # Use special PIC flags for the native HP-UX compiler.
8989                         if test $ac_cv_prog_cc_Ae = yes; then
8990                                 BLDSHARED="true"
8991                                 SHLD="/usr/bin/ld"
8992                                 LDSHFLAGS="-B symbolic -b -z"
8993                                 SONAMEFLAG="+h "
8994                                 PICFLAG="+z"
8995                         fi
8996                         DYNEXP="-Wl,-E"
8997                         cat >> confdefs.h <<\EOF
8998 #define STAT_ST_BLOCKSIZE 8192
8999 EOF
9000
9001                 ;;
9002                 *qnx*) cat >> confdefs.h <<\EOF
9003 #define QNX 1
9004 EOF
9005 ;;
9006                 *osf*) cat >> confdefs.h <<\EOF
9007 #define OSF1 1
9008 EOF
9009
9010                         BLDSHARED="true"
9011                         LDSHFLAGS="-shared"
9012                         SONAMEFLAG="-Wl,-soname,"
9013                         PICFLAG="-fPIC"
9014                 ;;
9015                 *sco*) cat >> confdefs.h <<\EOF
9016 #define SCO 1
9017 EOF
9018 ;;
9019                 *unixware*) cat >> confdefs.h <<\EOF
9020 #define UNIXWARE 1
9021 EOF
9022
9023                         BLDSHARED="true"
9024                         LDSHFLAGS="-shared"
9025                         SONAMEFLAG="-Wl,-soname,"
9026                         PICFLAG="-KPIC"
9027                 ;;
9028                 *next2*) cat >> confdefs.h <<\EOF
9029 #define NEXT2 1
9030 EOF
9031 ;;
9032                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
9033 set dummy groff; ac_word=$2
9034 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9035 echo "configure:9036: checking for $ac_word" >&5
9036 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
9037   echo $ac_n "(cached) $ac_c" 1>&6
9038 else
9039   if test -n "$ROFF"; then
9040   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
9041 else
9042   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
9043   ac_dummy="$PATH"
9044   for ac_dir in $ac_dummy; do
9045     test -z "$ac_dir" && ac_dir=.
9046     if test -f $ac_dir/$ac_word; then
9047       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9048       break
9049     fi
9050   done
9051   IFS="$ac_save_ifs"
9052 fi
9053 fi
9054 ROFF="$ac_cv_prog_ROFF"
9055 if test -n "$ROFF"; then
9056   echo "$ac_t""$ROFF" 1>&6
9057 else
9058   echo "$ac_t""no" 1>&6
9059 fi
9060 ;;
9061                 *sysv4*)
9062                         case "$host" in
9063                                 *-univel-*)     if  test "$GCC" != yes ; then
9064                                                 cat >> confdefs.h <<\EOF
9065 #define HAVE_MEMSET 1
9066 EOF
9067
9068                                         fi
9069                                         LDSHFLAGS="-G"
9070                                         DYNEXP="-Bexport"
9071                                 ;;
9072                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
9073 #define RELIANTUNIX 1
9074 EOF
9075 ;;
9076                         esac
9077                 ;;
9078
9079                 *sysv5*)
9080                         if  test "$GCC" != yes ; then
9081                                 cat >> confdefs.h <<\EOF
9082 #define HAVE_MEMSET 1
9083 EOF
9084
9085                         fi
9086                         LDSHFLAGS="-G"
9087                 ;;
9088 esac
9089
9090 echo "$ac_t""$BLDSHARED" 1>&6
9091 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9092 echo "configure:9093: checking linker flags for shared libraries" >&5
9093 echo "$ac_t""$LDSHFLAGS" 1>&6
9094 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9095 echo "configure:9096: checking compiler flags for position-independent code" >&5
9096 echo "$ac_t""$PICFLAGS" 1>&6
9097
9098 #######################################################
9099 # test whether building a shared library actually works
9100 if test $BLDSHARED = true; then
9101 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9102 echo "configure:9103: checking whether building shared libraries actually works" >&5
9103 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9104   echo $ac_n "(cached) $ac_c" 1>&6
9105 else
9106   
9107    ac_cv_shlib_works=no
9108    # try building a trivial shared library
9109    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9110      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
9111      ac_cv_shlib_works=yes
9112    rm -f shlib.so shlib.po
9113
9114 fi
9115
9116 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9117 if test $ac_cv_shlib_works = no; then
9118    BLDSHARED=false
9119 fi
9120 fi
9121
9122
9123 # this updates our target list if we can build shared libs
9124 if test $BLDSHARED = true; then
9125    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9126 else
9127    LIBSMBCLIENT_SHARED=
9128 fi
9129
9130 ################
9131
9132 echo $ac_n "checking for long long""... $ac_c" 1>&6
9133 echo "configure:9134: checking for long long" >&5
9134 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9135   echo $ac_n "(cached) $ac_c" 1>&6
9136 else
9137   
9138 if test "$cross_compiling" = yes; then
9139   samba_cv_have_longlong=cross
9140 else
9141   cat > conftest.$ac_ext <<EOF
9142 #line 9143 "configure"
9143 #include "confdefs.h"
9144 #include <stdio.h>
9145 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9146 EOF
9147 if { (eval echo configure:9148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9148 then
9149   samba_cv_have_longlong=yes
9150 else
9151   echo "configure: failed program was:" >&5
9152   cat conftest.$ac_ext >&5
9153   rm -fr conftest*
9154   samba_cv_have_longlong=no
9155 fi
9156 rm -fr conftest*
9157 fi
9158
9159 fi
9160
9161 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9162 if test x"$samba_cv_have_longlong" = x"yes"; then
9163     cat >> confdefs.h <<\EOF
9164 #define HAVE_LONGLONG 1
9165 EOF
9166
9167 fi
9168
9169 #
9170 # Check if the compiler supports the LL prefix on long long integers.
9171 # AIX needs this.
9172
9173 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9174 echo "configure:9175: checking for LL suffix on long long integers" >&5
9175 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9176   echo $ac_n "(cached) $ac_c" 1>&6
9177 else
9178   
9179     cat > conftest.$ac_ext <<EOF
9180 #line 9181 "configure"
9181 #include "confdefs.h"
9182 #include <stdio.h>
9183 int main() {
9184 long long i = 0x8000000000LL
9185 ; return 0; }
9186 EOF
9187 if { (eval echo configure:9188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9188   rm -rf conftest*
9189   samba_cv_compiler_supports_ll=yes
9190 else
9191   echo "configure: failed program was:" >&5
9192   cat conftest.$ac_ext >&5
9193   rm -rf conftest*
9194   samba_cv_compiler_supports_ll=no
9195 fi
9196 rm -f conftest*
9197 fi
9198
9199 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9200 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9201    cat >> confdefs.h <<\EOF
9202 #define COMPILER_SUPPORTS_LL 1
9203 EOF
9204
9205 fi
9206
9207   
9208 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9209 echo "configure:9210: checking for 64 bit off_t" >&5
9210 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9211   echo $ac_n "(cached) $ac_c" 1>&6
9212 else
9213   
9214 if test "$cross_compiling" = yes; then
9215   samba_cv_SIZEOF_OFF_T=cross
9216 else
9217   cat > conftest.$ac_ext <<EOF
9218 #line 9219 "configure"
9219 #include "confdefs.h"
9220 #include <stdio.h>
9221 #include <sys/stat.h>
9222 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9223 EOF
9224 if { (eval echo configure:9225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9225 then
9226   samba_cv_SIZEOF_OFF_T=yes
9227 else
9228   echo "configure: failed program was:" >&5
9229   cat conftest.$ac_ext >&5
9230   rm -fr conftest*
9231   samba_cv_SIZEOF_OFF_T=no
9232 fi
9233 rm -fr conftest*
9234 fi
9235
9236 fi
9237
9238 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9239 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9240     cat >> confdefs.h <<\EOF
9241 #define SIZEOF_OFF_T 8
9242 EOF
9243
9244 fi
9245
9246 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9247 echo "configure:9248: checking for off64_t" >&5
9248 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9249   echo $ac_n "(cached) $ac_c" 1>&6
9250 else
9251   
9252 if test "$cross_compiling" = yes; then
9253   samba_cv_HAVE_OFF64_T=cross
9254 else
9255   cat > conftest.$ac_ext <<EOF
9256 #line 9257 "configure"
9257 #include "confdefs.h"
9258
9259 #if defined(HAVE_UNISTD_H)
9260 #include <unistd.h>
9261 #endif
9262 #include <stdio.h>
9263 #include <sys/stat.h>
9264 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9265 EOF
9266 if { (eval echo configure:9267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9267 then
9268   samba_cv_HAVE_OFF64_T=yes
9269 else
9270   echo "configure: failed program was:" >&5
9271   cat conftest.$ac_ext >&5
9272   rm -fr conftest*
9273   samba_cv_HAVE_OFF64_T=no
9274 fi
9275 rm -fr conftest*
9276 fi
9277
9278 fi
9279
9280 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9281 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9282     cat >> confdefs.h <<\EOF
9283 #define HAVE_OFF64_T 1
9284 EOF
9285
9286 fi
9287
9288 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9289 echo "configure:9290: checking for 64 bit ino_t" >&5
9290 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9291   echo $ac_n "(cached) $ac_c" 1>&6
9292 else
9293   
9294 if test "$cross_compiling" = yes; then
9295   samba_cv_SIZEOF_INO_T=cross
9296 else
9297   cat > conftest.$ac_ext <<EOF
9298 #line 9299 "configure"
9299 #include "confdefs.h"
9300 #include <stdio.h>
9301 #include <sys/stat.h>
9302 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9303 EOF
9304 if { (eval echo configure:9305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9305 then
9306   samba_cv_SIZEOF_INO_T=yes
9307 else
9308   echo "configure: failed program was:" >&5
9309   cat conftest.$ac_ext >&5
9310   rm -fr conftest*
9311   samba_cv_SIZEOF_INO_T=no
9312 fi
9313 rm -fr conftest*
9314 fi
9315
9316 fi
9317
9318 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9319 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9320     cat >> confdefs.h <<\EOF
9321 #define SIZEOF_INO_T 8
9322 EOF
9323
9324 fi
9325
9326 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9327 echo "configure:9328: checking for ino64_t" >&5
9328 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9329   echo $ac_n "(cached) $ac_c" 1>&6
9330 else
9331   
9332 if test "$cross_compiling" = yes; then
9333   samba_cv_HAVE_INO64_T=cross
9334 else
9335   cat > conftest.$ac_ext <<EOF
9336 #line 9337 "configure"
9337 #include "confdefs.h"
9338
9339 #if defined(HAVE_UNISTD_H)
9340 #include <unistd.h>
9341 #endif
9342 #include <stdio.h>
9343 #include <sys/stat.h>
9344 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9345 EOF
9346 if { (eval echo configure:9347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9347 then
9348   samba_cv_HAVE_INO64_T=yes
9349 else
9350   echo "configure: failed program was:" >&5
9351   cat conftest.$ac_ext >&5
9352   rm -fr conftest*
9353   samba_cv_HAVE_INO64_T=no
9354 fi
9355 rm -fr conftest*
9356 fi
9357
9358 fi
9359
9360 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9361 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9362     cat >> confdefs.h <<\EOF
9363 #define HAVE_INO64_T 1
9364 EOF
9365
9366 fi
9367
9368 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9369 echo "configure:9370: checking for dev64_t" >&5
9370 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9371   echo $ac_n "(cached) $ac_c" 1>&6
9372 else
9373   
9374 if test "$cross_compiling" = yes; then
9375   samba_cv_HAVE_DEV64_T=cross
9376 else
9377   cat > conftest.$ac_ext <<EOF
9378 #line 9379 "configure"
9379 #include "confdefs.h"
9380
9381 #if defined(HAVE_UNISTD_H)
9382 #include <unistd.h>
9383 #endif
9384 #include <stdio.h>
9385 #include <sys/stat.h>
9386 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9387 EOF
9388 if { (eval echo configure:9389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9389 then
9390   samba_cv_HAVE_DEV64_T=yes
9391 else
9392   echo "configure: failed program was:" >&5
9393   cat conftest.$ac_ext >&5
9394   rm -fr conftest*
9395   samba_cv_HAVE_DEV64_T=no
9396 fi
9397 rm -fr conftest*
9398 fi
9399
9400 fi
9401
9402 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9403 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9404     cat >> confdefs.h <<\EOF
9405 #define HAVE_DEV64_T 1
9406 EOF
9407
9408 fi
9409
9410 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9411 echo "configure:9412: checking for struct dirent64" >&5
9412 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9413   echo $ac_n "(cached) $ac_c" 1>&6
9414 else
9415   
9416 cat > conftest.$ac_ext <<EOF
9417 #line 9418 "configure"
9418 #include "confdefs.h"
9419
9420 #if defined(HAVE_UNISTD_H)
9421 #include <unistd.h>
9422 #endif
9423 #include <sys/types.h>
9424 #include <dirent.h>
9425 int main() {
9426 struct dirent64 de;
9427 ; return 0; }
9428 EOF
9429 if { (eval echo configure:9430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9430   rm -rf conftest*
9431   samba_cv_HAVE_STRUCT_DIRENT64=yes
9432 else
9433   echo "configure: failed program was:" >&5
9434   cat conftest.$ac_ext >&5
9435   rm -rf conftest*
9436   samba_cv_HAVE_STRUCT_DIRENT64=no
9437 fi
9438 rm -f conftest*
9439 fi
9440
9441 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9442 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
9443     cat >> confdefs.h <<\EOF
9444 #define HAVE_STRUCT_DIRENT64 1
9445 EOF
9446
9447 fi
9448
9449 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9450 echo "configure:9451: checking for major macro" >&5
9451 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9452   echo $ac_n "(cached) $ac_c" 1>&6
9453 else
9454   
9455 if test "$cross_compiling" = yes; then
9456   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9457 else
9458   cat > conftest.$ac_ext <<EOF
9459 #line 9460 "configure"
9460 #include "confdefs.h"
9461
9462 #if defined(HAVE_UNISTD_H)
9463 #include <unistd.h>
9464 #endif
9465 #include <sys/types.h>
9466 main() { dev_t dev; int i = major(dev); return 0; }
9467 EOF
9468 if { (eval echo configure:9469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9469 then
9470   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9471 else
9472   echo "configure: failed program was:" >&5
9473   cat conftest.$ac_ext >&5
9474   rm -fr conftest*
9475   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9476 fi
9477 rm -fr conftest*
9478 fi
9479
9480 fi
9481
9482 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9483 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9484     cat >> confdefs.h <<\EOF
9485 #define HAVE_DEVICE_MAJOR_FN 1
9486 EOF
9487
9488 fi
9489
9490 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9491 echo "configure:9492: checking for minor macro" >&5
9492 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9493   echo $ac_n "(cached) $ac_c" 1>&6
9494 else
9495   
9496 if test "$cross_compiling" = yes; then
9497   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9498 else
9499   cat > conftest.$ac_ext <<EOF
9500 #line 9501 "configure"
9501 #include "confdefs.h"
9502
9503 #if defined(HAVE_UNISTD_H)
9504 #include <unistd.h>
9505 #endif
9506 #include <sys/types.h>
9507 main() { dev_t dev; int i = minor(dev); return 0; }
9508 EOF
9509 if { (eval echo configure:9510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9510 then
9511   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9512 else
9513   echo "configure: failed program was:" >&5
9514   cat conftest.$ac_ext >&5
9515   rm -fr conftest*
9516   samba_cv_HAVE_DEVICE_MINOR_FN=no
9517 fi
9518 rm -fr conftest*
9519 fi
9520
9521 fi
9522
9523 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9524 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9525     cat >> confdefs.h <<\EOF
9526 #define HAVE_DEVICE_MINOR_FN 1
9527 EOF
9528
9529 fi
9530
9531 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9532 echo "configure:9533: checking for unsigned char" >&5
9533 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9534   echo $ac_n "(cached) $ac_c" 1>&6
9535 else
9536   
9537 if test "$cross_compiling" = yes; then
9538   samba_cv_HAVE_UNSIGNED_CHAR=cross
9539 else
9540   cat > conftest.$ac_ext <<EOF
9541 #line 9542 "configure"
9542 #include "confdefs.h"
9543 #include <stdio.h>
9544 main() { char c; c=250; exit((c > 0)?0:1); }
9545 EOF
9546 if { (eval echo configure:9547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9547 then
9548   samba_cv_HAVE_UNSIGNED_CHAR=yes
9549 else
9550   echo "configure: failed program was:" >&5
9551   cat conftest.$ac_ext >&5
9552   rm -fr conftest*
9553   samba_cv_HAVE_UNSIGNED_CHAR=no
9554 fi
9555 rm -fr conftest*
9556 fi
9557
9558 fi
9559
9560 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9561 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9562     cat >> confdefs.h <<\EOF
9563 #define HAVE_UNSIGNED_CHAR 1
9564 EOF
9565
9566 fi
9567
9568 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9569 echo "configure:9570: checking for sin_len in sock" >&5
9570 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9571   echo $ac_n "(cached) $ac_c" 1>&6
9572 else
9573   
9574 cat > conftest.$ac_ext <<EOF
9575 #line 9576 "configure"
9576 #include "confdefs.h"
9577 #include <sys/types.h>
9578 #include <sys/socket.h>
9579 #include <netinet/in.h>
9580 int main() {
9581 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9582 ; return 0; }
9583 EOF
9584 if { (eval echo configure:9585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9585   rm -rf conftest*
9586   samba_cv_HAVE_SOCK_SIN_LEN=yes
9587 else
9588   echo "configure: failed program was:" >&5
9589   cat conftest.$ac_ext >&5
9590   rm -rf conftest*
9591   samba_cv_HAVE_SOCK_SIN_LEN=no
9592 fi
9593 rm -f conftest*
9594 fi
9595
9596 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9597 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9598     cat >> confdefs.h <<\EOF
9599 #define HAVE_SOCK_SIN_LEN 1
9600 EOF
9601
9602 fi
9603
9604 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9605 echo "configure:9606: checking whether seekdir returns void" >&5
9606 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9607   echo $ac_n "(cached) $ac_c" 1>&6
9608 else
9609   
9610 cat > conftest.$ac_ext <<EOF
9611 #line 9612 "configure"
9612 #include "confdefs.h"
9613 #include <sys/types.h>
9614 #include <dirent.h>
9615 void seekdir(DIR *d, long loc) { return; }
9616 int main() {
9617 return 0;
9618 ; return 0; }
9619 EOF
9620 if { (eval echo configure:9621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9621   rm -rf conftest*
9622   samba_cv_SEEKDIR_RETURNS_VOID=yes
9623 else
9624   echo "configure: failed program was:" >&5
9625   cat conftest.$ac_ext >&5
9626   rm -rf conftest*
9627   samba_cv_SEEKDIR_RETURNS_VOID=no
9628 fi
9629 rm -f conftest*
9630 fi
9631
9632 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9633 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9634     cat >> confdefs.h <<\EOF
9635 #define SEEKDIR_RETURNS_VOID 1
9636 EOF
9637
9638 fi
9639
9640 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9641 echo "configure:9642: checking for __FILE__ macro" >&5
9642 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9643   echo $ac_n "(cached) $ac_c" 1>&6
9644 else
9645   
9646 cat > conftest.$ac_ext <<EOF
9647 #line 9648 "configure"
9648 #include "confdefs.h"
9649 #include <stdio.h>
9650 int main() {
9651 printf("%s\n", __FILE__);
9652 ; return 0; }
9653 EOF
9654 if { (eval echo configure:9655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9655   rm -rf conftest*
9656   samba_cv_HAVE_FILE_MACRO=yes
9657 else
9658   echo "configure: failed program was:" >&5
9659   cat conftest.$ac_ext >&5
9660   rm -rf conftest*
9661   samba_cv_HAVE_FILE_MACRO=no
9662 fi
9663 rm -f conftest*
9664 fi
9665
9666 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9667 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9668     cat >> confdefs.h <<\EOF
9669 #define HAVE_FILE_MACRO 1
9670 EOF
9671
9672 fi
9673
9674 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9675 echo "configure:9676: checking for __FUNCTION__ macro" >&5
9676 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9677   echo $ac_n "(cached) $ac_c" 1>&6
9678 else
9679   
9680 cat > conftest.$ac_ext <<EOF
9681 #line 9682 "configure"
9682 #include "confdefs.h"
9683 #include <stdio.h>
9684 int main() {
9685 printf("%s\n", __FUNCTION__);
9686 ; return 0; }
9687 EOF
9688 if { (eval echo configure:9689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9689   rm -rf conftest*
9690   samba_cv_HAVE_FUNCTION_MACRO=yes
9691 else
9692   echo "configure: failed program was:" >&5
9693   cat conftest.$ac_ext >&5
9694   rm -rf conftest*
9695   samba_cv_HAVE_FUNCTION_MACRO=no
9696 fi
9697 rm -f conftest*
9698 fi
9699
9700 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9701 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9702     cat >> confdefs.h <<\EOF
9703 #define HAVE_FUNCTION_MACRO 1
9704 EOF
9705
9706 fi
9707
9708 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9709 echo "configure:9710: checking if gettimeofday takes tz argument" >&5
9710 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9711   echo $ac_n "(cached) $ac_c" 1>&6
9712 else
9713   
9714 if test "$cross_compiling" = yes; then
9715   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9716 else
9717   cat > conftest.$ac_ext <<EOF
9718 #line 9719 "configure"
9719 #include "confdefs.h"
9720
9721 #include <sys/time.h>
9722 #include <unistd.h>
9723 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9724 EOF
9725 if { (eval echo configure:9726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9726 then
9727   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9728 else
9729   echo "configure: failed program was:" >&5
9730   cat conftest.$ac_ext >&5
9731   rm -fr conftest*
9732   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9733 fi
9734 rm -fr conftest*
9735 fi
9736
9737 fi
9738
9739 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9740 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9741     cat >> confdefs.h <<\EOF
9742 #define HAVE_GETTIMEOFDAY_TZ 1
9743 EOF
9744
9745 fi
9746
9747 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9748 echo "configure:9749: checking for __va_copy" >&5
9749 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9750   echo $ac_n "(cached) $ac_c" 1>&6
9751 else
9752   
9753 cat > conftest.$ac_ext <<EOF
9754 #line 9755 "configure"
9755 #include "confdefs.h"
9756 #include <stdarg.h>
9757 va_list ap1,ap2;
9758 int main() {
9759 __va_copy(ap1,ap2);
9760 ; return 0; }
9761 EOF
9762 if { (eval echo configure:9763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9763   rm -rf conftest*
9764   samba_cv_HAVE_VA_COPY=yes
9765 else
9766   echo "configure: failed program was:" >&5
9767   cat conftest.$ac_ext >&5
9768   rm -rf conftest*
9769   samba_cv_HAVE_VA_COPY=no
9770 fi
9771 rm -f conftest*
9772 fi
9773
9774 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9775 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9776     cat >> confdefs.h <<\EOF
9777 #define HAVE_VA_COPY 1
9778 EOF
9779
9780 fi
9781
9782 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9783 echo "configure:9784: checking for C99 vsnprintf" >&5
9784 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9785   echo $ac_n "(cached) $ac_c" 1>&6
9786 else
9787   
9788 if test "$cross_compiling" = yes; then
9789   samba_cv_HAVE_C99_VSNPRINTF=cross
9790 else
9791   cat > conftest.$ac_ext <<EOF
9792 #line 9793 "configure"
9793 #include "confdefs.h"
9794
9795 #include <sys/types.h>
9796 #include <stdarg.h>
9797 void foo(const char *format, ...) { 
9798        va_list ap;
9799        int len;
9800        char buf[5];
9801
9802        va_start(ap, format);
9803        len = vsnprintf(buf, 0, format, ap);
9804        va_end(ap);
9805        if (len != 5) exit(1);
9806
9807        va_start(ap, format);
9808        len = vsnprintf(0, 0, format, ap);
9809        va_end(ap);
9810        if (len != 5) exit(1);
9811
9812        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9813
9814        exit(0);
9815 }
9816 main() { foo("hello"); }
9817
9818 EOF
9819 if { (eval echo configure:9820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9820 then
9821   samba_cv_HAVE_C99_VSNPRINTF=yes
9822 else
9823   echo "configure: failed program was:" >&5
9824   cat conftest.$ac_ext >&5
9825   rm -fr conftest*
9826   samba_cv_HAVE_C99_VSNPRINTF=no
9827 fi
9828 rm -fr conftest*
9829 fi
9830
9831 fi
9832
9833 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9834 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9835     cat >> confdefs.h <<\EOF
9836 #define HAVE_C99_VSNPRINTF 1
9837 EOF
9838
9839 fi
9840
9841 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9842 echo "configure:9843: checking for broken readdir" >&5
9843 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9844   echo $ac_n "(cached) $ac_c" 1>&6
9845 else
9846   
9847 if test "$cross_compiling" = yes; then
9848   samba_cv_HAVE_BROKEN_READDIR=cross
9849 else
9850   cat > conftest.$ac_ext <<EOF
9851 #line 9852 "configure"
9852 #include "confdefs.h"
9853 #include <sys/types.h>
9854 #include <dirent.h>
9855 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9856 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9857 di->d_name[0] == 0) exit(0); exit(1);} 
9858 EOF
9859 if { (eval echo configure:9860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9860 then
9861   samba_cv_HAVE_BROKEN_READDIR=yes
9862 else
9863   echo "configure: failed program was:" >&5
9864   cat conftest.$ac_ext >&5
9865   rm -fr conftest*
9866   samba_cv_HAVE_BROKEN_READDIR=no
9867 fi
9868 rm -fr conftest*
9869 fi
9870
9871 fi
9872
9873 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9874 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9875     cat >> confdefs.h <<\EOF
9876 #define HAVE_BROKEN_READDIR 1
9877 EOF
9878
9879 fi
9880
9881 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9882 echo "configure:9883: checking for utimbuf" >&5
9883 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9884   echo $ac_n "(cached) $ac_c" 1>&6
9885 else
9886   
9887 cat > conftest.$ac_ext <<EOF
9888 #line 9889 "configure"
9889 #include "confdefs.h"
9890 #include <sys/types.h>
9891 #include <utime.h>
9892 int main() {
9893 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9894 ; return 0; }
9895 EOF
9896 if { (eval echo configure:9897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9897   rm -rf conftest*
9898   samba_cv_HAVE_UTIMBUF=yes
9899 else
9900   echo "configure: failed program was:" >&5
9901   cat conftest.$ac_ext >&5
9902   rm -rf conftest*
9903   samba_cv_HAVE_UTIMBUF=no
9904 fi
9905 rm -f conftest*
9906 fi
9907
9908 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9909 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9910     cat >> confdefs.h <<\EOF
9911 #define HAVE_UTIMBUF 1
9912 EOF
9913
9914 fi
9915
9916
9917 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9918 do
9919 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9920 echo "configure:9921: checking for $ac_func" >&5
9921 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9922   echo $ac_n "(cached) $ac_c" 1>&6
9923 else
9924   cat > conftest.$ac_ext <<EOF
9925 #line 9926 "configure"
9926 #include "confdefs.h"
9927 /* System header to define __stub macros and hopefully few prototypes,
9928     which can conflict with char $ac_func(); below.  */
9929 #include <assert.h>
9930 /* Override any gcc2 internal prototype to avoid an error.  */
9931 /* We use char because int might match the return type of a gcc2
9932     builtin and then its argument prototype would still apply.  */
9933 char $ac_func();
9934
9935 int main() {
9936
9937 /* The GNU C library defines this for functions which it implements
9938     to always fail with ENOSYS.  Some functions are actually named
9939     something starting with __ and the normal name is an alias.  */
9940 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9941 choke me
9942 #else
9943 $ac_func();
9944 #endif
9945
9946 ; return 0; }
9947 EOF
9948 if { (eval echo configure:9949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9949   rm -rf conftest*
9950   eval "ac_cv_func_$ac_func=yes"
9951 else
9952   echo "configure: failed program was:" >&5
9953   cat conftest.$ac_ext >&5
9954   rm -rf conftest*
9955   eval "ac_cv_func_$ac_func=no"
9956 fi
9957 rm -f conftest*
9958 fi
9959
9960 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9961   echo "$ac_t""yes" 1>&6
9962     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9963   cat >> confdefs.h <<EOF
9964 #define $ac_tr_func 1
9965 EOF
9966  
9967 else
9968   echo "$ac_t""no" 1>&6
9969 fi
9970 done
9971
9972
9973 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9974 echo "configure:9975: checking for ut_name in utmp" >&5
9975 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9976   echo $ac_n "(cached) $ac_c" 1>&6
9977 else
9978   
9979 cat > conftest.$ac_ext <<EOF
9980 #line 9981 "configure"
9981 #include "confdefs.h"
9982 #include <sys/types.h>
9983 #include <utmp.h>
9984 int main() {
9985 struct utmp ut;  ut.ut_name[0] = 'a';
9986 ; return 0; }
9987 EOF
9988 if { (eval echo configure:9989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9989   rm -rf conftest*
9990   samba_cv_HAVE_UT_UT_NAME=yes
9991 else
9992   echo "configure: failed program was:" >&5
9993   cat conftest.$ac_ext >&5
9994   rm -rf conftest*
9995   samba_cv_HAVE_UT_UT_NAME=no
9996 fi
9997 rm -f conftest*
9998 fi
9999
10000 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
10001 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
10002     cat >> confdefs.h <<\EOF
10003 #define HAVE_UT_UT_NAME 1
10004 EOF
10005
10006 fi 
10007
10008 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
10009 echo "configure:10010: checking for ut_user in utmp" >&5
10010 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
10011   echo $ac_n "(cached) $ac_c" 1>&6
10012 else
10013   
10014 cat > conftest.$ac_ext <<EOF
10015 #line 10016 "configure"
10016 #include "confdefs.h"
10017 #include <sys/types.h>
10018 #include <utmp.h>
10019 int main() {
10020 struct utmp ut;  ut.ut_user[0] = 'a';
10021 ; return 0; }
10022 EOF
10023 if { (eval echo configure:10024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10024   rm -rf conftest*
10025   samba_cv_HAVE_UT_UT_USER=yes
10026 else
10027   echo "configure: failed program was:" >&5
10028   cat conftest.$ac_ext >&5
10029   rm -rf conftest*
10030   samba_cv_HAVE_UT_UT_USER=no
10031 fi
10032 rm -f conftest*
10033 fi
10034
10035 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
10036 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
10037     cat >> confdefs.h <<\EOF
10038 #define HAVE_UT_UT_USER 1
10039 EOF
10040
10041 fi 
10042
10043 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
10044 echo "configure:10045: checking for ut_id in utmp" >&5
10045 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10046   echo $ac_n "(cached) $ac_c" 1>&6
10047 else
10048   
10049 cat > conftest.$ac_ext <<EOF
10050 #line 10051 "configure"
10051 #include "confdefs.h"
10052 #include <sys/types.h>
10053 #include <utmp.h>
10054 int main() {
10055 struct utmp ut;  ut.ut_id[0] = 'a';
10056 ; return 0; }
10057 EOF
10058 if { (eval echo configure:10059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10059   rm -rf conftest*
10060   samba_cv_HAVE_UT_UT_ID=yes
10061 else
10062   echo "configure: failed program was:" >&5
10063   cat conftest.$ac_ext >&5
10064   rm -rf conftest*
10065   samba_cv_HAVE_UT_UT_ID=no
10066 fi
10067 rm -f conftest*
10068 fi
10069
10070 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10071 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10072     cat >> confdefs.h <<\EOF
10073 #define HAVE_UT_UT_ID 1
10074 EOF
10075
10076 fi 
10077
10078 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10079 echo "configure:10080: checking for ut_host in utmp" >&5
10080 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10081   echo $ac_n "(cached) $ac_c" 1>&6
10082 else
10083   
10084 cat > conftest.$ac_ext <<EOF
10085 #line 10086 "configure"
10086 #include "confdefs.h"
10087 #include <sys/types.h>
10088 #include <utmp.h>
10089 int main() {
10090 struct utmp ut;  ut.ut_host[0] = 'a';
10091 ; return 0; }
10092 EOF
10093 if { (eval echo configure:10094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10094   rm -rf conftest*
10095   samba_cv_HAVE_UT_UT_HOST=yes
10096 else
10097   echo "configure: failed program was:" >&5
10098   cat conftest.$ac_ext >&5
10099   rm -rf conftest*
10100   samba_cv_HAVE_UT_UT_HOST=no
10101 fi
10102 rm -f conftest*
10103 fi
10104
10105 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10106 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10107     cat >> confdefs.h <<\EOF
10108 #define HAVE_UT_UT_HOST 1
10109 EOF
10110
10111 fi 
10112
10113 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10114 echo "configure:10115: checking for ut_time in utmp" >&5
10115 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10116   echo $ac_n "(cached) $ac_c" 1>&6
10117 else
10118   
10119 cat > conftest.$ac_ext <<EOF
10120 #line 10121 "configure"
10121 #include "confdefs.h"
10122 #include <sys/types.h>
10123 #include <utmp.h>
10124 int main() {
10125 struct utmp ut;  time_t t; ut.ut_time = t;
10126 ; return 0; }
10127 EOF
10128 if { (eval echo configure:10129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10129   rm -rf conftest*
10130   samba_cv_HAVE_UT_UT_TIME=yes
10131 else
10132   echo "configure: failed program was:" >&5
10133   cat conftest.$ac_ext >&5
10134   rm -rf conftest*
10135   samba_cv_HAVE_UT_UT_TIME=no
10136 fi
10137 rm -f conftest*
10138 fi
10139
10140 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10141 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10142     cat >> confdefs.h <<\EOF
10143 #define HAVE_UT_UT_TIME 1
10144 EOF
10145
10146 fi 
10147
10148 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10149 echo "configure:10150: checking for ut_tv in utmp" >&5
10150 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10151   echo $ac_n "(cached) $ac_c" 1>&6
10152 else
10153   
10154 cat > conftest.$ac_ext <<EOF
10155 #line 10156 "configure"
10156 #include "confdefs.h"
10157 #include <sys/types.h>
10158 #include <utmp.h>
10159 int main() {
10160 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10161 ; return 0; }
10162 EOF
10163 if { (eval echo configure:10164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10164   rm -rf conftest*
10165   samba_cv_HAVE_UT_UT_TV=yes
10166 else
10167   echo "configure: failed program was:" >&5
10168   cat conftest.$ac_ext >&5
10169   rm -rf conftest*
10170   samba_cv_HAVE_UT_UT_TV=no
10171 fi
10172 rm -f conftest*
10173 fi
10174
10175 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10176 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10177     cat >> confdefs.h <<\EOF
10178 #define HAVE_UT_UT_TV 1
10179 EOF
10180
10181 fi 
10182
10183 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10184 echo "configure:10185: checking for ut_type in utmp" >&5
10185 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10186   echo $ac_n "(cached) $ac_c" 1>&6
10187 else
10188   
10189 cat > conftest.$ac_ext <<EOF
10190 #line 10191 "configure"
10191 #include "confdefs.h"
10192 #include <sys/types.h>
10193 #include <utmp.h>
10194 int main() {
10195 struct utmp ut;  ut.ut_type = 0;
10196 ; return 0; }
10197 EOF
10198 if { (eval echo configure:10199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10199   rm -rf conftest*
10200   samba_cv_HAVE_UT_UT_TYPE=yes
10201 else
10202   echo "configure: failed program was:" >&5
10203   cat conftest.$ac_ext >&5
10204   rm -rf conftest*
10205   samba_cv_HAVE_UT_UT_TYPE=no
10206 fi
10207 rm -f conftest*
10208 fi
10209
10210 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10211 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10212     cat >> confdefs.h <<\EOF
10213 #define HAVE_UT_UT_TYPE 1
10214 EOF
10215
10216 fi 
10217
10218 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10219 echo "configure:10220: checking for ut_pid in utmp" >&5
10220 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10221   echo $ac_n "(cached) $ac_c" 1>&6
10222 else
10223   
10224 cat > conftest.$ac_ext <<EOF
10225 #line 10226 "configure"
10226 #include "confdefs.h"
10227 #include <sys/types.h>
10228 #include <utmp.h>
10229 int main() {
10230 struct utmp ut;  ut.ut_pid = 0;
10231 ; return 0; }
10232 EOF
10233 if { (eval echo configure:10234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10234   rm -rf conftest*
10235   samba_cv_HAVE_UT_UT_PID=yes
10236 else
10237   echo "configure: failed program was:" >&5
10238   cat conftest.$ac_ext >&5
10239   rm -rf conftest*
10240   samba_cv_HAVE_UT_UT_PID=no
10241 fi
10242 rm -f conftest*
10243 fi
10244
10245 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10246 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10247     cat >> confdefs.h <<\EOF
10248 #define HAVE_UT_UT_PID 1
10249 EOF
10250
10251 fi 
10252
10253 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10254 echo "configure:10255: checking for ut_exit in utmp" >&5
10255 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10256   echo $ac_n "(cached) $ac_c" 1>&6
10257 else
10258   
10259 cat > conftest.$ac_ext <<EOF
10260 #line 10261 "configure"
10261 #include "confdefs.h"
10262 #include <sys/types.h>
10263 #include <utmp.h>
10264 int main() {
10265 struct utmp ut;  ut.ut_exit.e_exit = 0;
10266 ; return 0; }
10267 EOF
10268 if { (eval echo configure:10269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10269   rm -rf conftest*
10270   samba_cv_HAVE_UT_UT_EXIT=yes
10271 else
10272   echo "configure: failed program was:" >&5
10273   cat conftest.$ac_ext >&5
10274   rm -rf conftest*
10275   samba_cv_HAVE_UT_UT_EXIT=no
10276 fi
10277 rm -f conftest*
10278 fi
10279
10280 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10281 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10282     cat >> confdefs.h <<\EOF
10283 #define HAVE_UT_UT_EXIT 1
10284 EOF
10285
10286 fi 
10287
10288 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10289 echo "configure:10290: checking for ut_addr in utmp" >&5
10290 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10291   echo $ac_n "(cached) $ac_c" 1>&6
10292 else
10293   
10294 cat > conftest.$ac_ext <<EOF
10295 #line 10296 "configure"
10296 #include "confdefs.h"
10297 #include <sys/types.h>
10298 #include <utmp.h>
10299 int main() {
10300 struct utmp ut;  ut.ut_addr = 0;
10301 ; return 0; }
10302 EOF
10303 if { (eval echo configure:10304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10304   rm -rf conftest*
10305   samba_cv_HAVE_UT_UT_ADDR=yes
10306 else
10307   echo "configure: failed program was:" >&5
10308   cat conftest.$ac_ext >&5
10309   rm -rf conftest*
10310   samba_cv_HAVE_UT_UT_ADDR=no
10311 fi
10312 rm -f conftest*
10313 fi
10314
10315 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10316 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10317     cat >> confdefs.h <<\EOF
10318 #define HAVE_UT_UT_ADDR 1
10319 EOF
10320
10321 fi 
10322
10323 if test x$ac_cv_func_pututline = xyes ; then
10324   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10325 echo "configure:10326: checking whether pututline returns pointer" >&5
10326 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10327   echo $ac_n "(cached) $ac_c" 1>&6
10328 else
10329   
10330   cat > conftest.$ac_ext <<EOF
10331 #line 10332 "configure"
10332 #include "confdefs.h"
10333 #include <sys/types.h>
10334 #include <utmp.h>
10335 int main() {
10336 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10337 ; return 0; }
10338 EOF
10339 if { (eval echo configure:10340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10340   rm -rf conftest*
10341   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10342 else
10343   echo "configure: failed program was:" >&5
10344   cat conftest.$ac_ext >&5
10345   rm -rf conftest*
10346   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10347 fi
10348 rm -f conftest*
10349 fi
10350
10351 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10352   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10353       cat >> confdefs.h <<\EOF
10354 #define PUTUTLINE_RETURNS_UTMP 1
10355 EOF
10356
10357   fi
10358 fi
10359
10360 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10361 echo "configure:10362: checking for ut_syslen in utmpx" >&5
10362 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10363   echo $ac_n "(cached) $ac_c" 1>&6
10364 else
10365   
10366 cat > conftest.$ac_ext <<EOF
10367 #line 10368 "configure"
10368 #include "confdefs.h"
10369 #include <sys/types.h>
10370 #include <utmpx.h>
10371 int main() {
10372 struct utmpx ux;  ux.ut_syslen = 0;
10373 ; return 0; }
10374 EOF
10375 if { (eval echo configure:10376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10376   rm -rf conftest*
10377   samba_cv_HAVE_UX_UT_SYSLEN=yes
10378 else
10379   echo "configure: failed program was:" >&5
10380   cat conftest.$ac_ext >&5
10381   rm -rf conftest*
10382   samba_cv_HAVE_UX_UT_SYSLEN=no
10383 fi
10384 rm -f conftest*
10385 fi
10386
10387 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10388 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10389     cat >> confdefs.h <<\EOF
10390 #define HAVE_UX_UT_SYSLEN 1
10391 EOF
10392
10393 fi 
10394
10395
10396 #################################################
10397 # check for libiconv support
10398 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10399 echo "configure:10400: checking whether to use libiconv" >&5
10400 # Check whether --with-libiconv or --without-libiconv was given.
10401 if test "${with_libiconv+set}" = set; then
10402   withval="$with_libiconv"
10403    case "$withval" in
10404   no)
10405     echo "$ac_t""no" 1>&6
10406     ;;
10407   *)
10408     echo "$ac_t""yes" 1>&6
10409     CFLAGS="$CFLAGS -I$withval/include"
10410     LDFLAGS="$LDFLAGS -L$withval/lib"
10411     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10412 echo "configure:10413: checking for iconv_open in -liconv" >&5
10413 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10414 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10415   echo $ac_n "(cached) $ac_c" 1>&6
10416 else
10417   ac_save_LIBS="$LIBS"
10418 LIBS="-liconv  $LIBS"
10419 cat > conftest.$ac_ext <<EOF
10420 #line 10421 "configure"
10421 #include "confdefs.h"
10422 /* Override any gcc2 internal prototype to avoid an error.  */
10423 /* We use char because int might match the return type of a gcc2
10424     builtin and then its argument prototype would still apply.  */
10425 char iconv_open();
10426
10427 int main() {
10428 iconv_open()
10429 ; return 0; }
10430 EOF
10431 if { (eval echo configure:10432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10432   rm -rf conftest*
10433   eval "ac_cv_lib_$ac_lib_var=yes"
10434 else
10435   echo "configure: failed program was:" >&5
10436   cat conftest.$ac_ext >&5
10437   rm -rf conftest*
10438   eval "ac_cv_lib_$ac_lib_var=no"
10439 fi
10440 rm -f conftest*
10441 LIBS="$ac_save_LIBS"
10442
10443 fi
10444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10445   echo "$ac_t""yes" 1>&6
10446     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10447     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10448   cat >> confdefs.h <<EOF
10449 #define $ac_tr_lib 1
10450 EOF
10451
10452   LIBS="-liconv $LIBS"
10453
10454 else
10455   echo "$ac_t""no" 1>&6
10456 fi
10457
10458     cat >> confdefs.h <<EOF
10459 #define WITH_LIBICONV "${withval}"
10460 EOF
10461
10462     ;;
10463   esac 
10464 else
10465   echo "$ac_t""no" 1>&6
10466
10467 fi
10468
10469
10470
10471 ############
10472 # check for iconv in libc
10473 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10474 echo "configure:10475: checking for working iconv" >&5
10475 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10476   echo $ac_n "(cached) $ac_c" 1>&6
10477 else
10478   
10479 if test "$cross_compiling" = yes; then
10480   samba_cv_HAVE_NATIVE_ICONV=cross
10481 else
10482   cat > conftest.$ac_ext <<EOF
10483 #line 10484 "configure"
10484 #include "confdefs.h"
10485
10486 #include <iconv.h>
10487 main() {
10488        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10489        if (cd == 0 || cd == (iconv_t)-1) return -1;
10490        return 0;
10491 }
10492
10493 EOF
10494 if { (eval echo configure:10495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10495 then
10496   samba_cv_HAVE_NATIVE_ICONV=yes
10497 else
10498   echo "configure: failed program was:" >&5
10499   cat conftest.$ac_ext >&5
10500   rm -fr conftest*
10501   samba_cv_HAVE_NATIVE_ICONV=no
10502 fi
10503 rm -fr conftest*
10504 fi
10505
10506 fi
10507
10508 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10509 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10510     cat >> confdefs.h <<\EOF
10511 #define HAVE_NATIVE_ICONV 1
10512 EOF
10513
10514 fi
10515
10516
10517 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10518 echo "configure:10519: checking for Linux kernel oplocks" >&5
10519 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10520   echo $ac_n "(cached) $ac_c" 1>&6
10521 else
10522   
10523 if test "$cross_compiling" = yes; then
10524   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10525 else
10526   cat > conftest.$ac_ext <<EOF
10527 #line 10528 "configure"
10528 #include "confdefs.h"
10529
10530 #include <sys/types.h>
10531 #include <fcntl.h>
10532 #ifndef F_GETLEASE
10533 #define F_GETLEASE      1025
10534 #endif
10535 main() {
10536        int fd = open("/dev/null", O_RDONLY);
10537        return fcntl(fd, F_GETLEASE, 0) == -1;
10538 }
10539
10540 EOF
10541 if { (eval echo configure:10542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10542 then
10543   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10544 else
10545   echo "configure: failed program was:" >&5
10546   cat conftest.$ac_ext >&5
10547   rm -fr conftest*
10548   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10549 fi
10550 rm -fr conftest*
10551 fi
10552
10553 fi
10554
10555 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10556 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10557     cat >> confdefs.h <<\EOF
10558 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10559 EOF
10560
10561 fi
10562
10563 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10564 echo "configure:10565: checking for kernel change notify support" >&5
10565 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10566   echo $ac_n "(cached) $ac_c" 1>&6
10567 else
10568   
10569 if test "$cross_compiling" = yes; then
10570   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10571 else
10572   cat > conftest.$ac_ext <<EOF
10573 #line 10574 "configure"
10574 #include "confdefs.h"
10575
10576 #include <sys/types.h>
10577 #include <fcntl.h>
10578 #include <signal.h>
10579 #ifndef F_NOTIFY
10580 #define F_NOTIFY 1026
10581 #endif
10582 main() {
10583         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10584 }
10585
10586 EOF
10587 if { (eval echo configure:10588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10588 then
10589   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10590 else
10591   echo "configure: failed program was:" >&5
10592   cat conftest.$ac_ext >&5
10593   rm -fr conftest*
10594   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10595 fi
10596 rm -fr conftest*
10597 fi
10598
10599 fi
10600
10601 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10602 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10603     cat >> confdefs.h <<\EOF
10604 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10605 EOF
10606
10607 fi
10608
10609 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10610 echo "configure:10611: checking for kernel share modes" >&5
10611 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10612   echo $ac_n "(cached) $ac_c" 1>&6
10613 else
10614   
10615 if test "$cross_compiling" = yes; then
10616   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10617 else
10618   cat > conftest.$ac_ext <<EOF
10619 #line 10620 "configure"
10620 #include "confdefs.h"
10621
10622 #include <sys/types.h>
10623 #include <fcntl.h>
10624 #include <signal.h>
10625 #include <sys/file.h>
10626 #ifndef LOCK_MAND
10627 #define LOCK_MAND       32
10628 #define LOCK_READ       64
10629 #endif
10630 main() {
10631         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10632 }
10633
10634 EOF
10635 if { (eval echo configure:10636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10636 then
10637   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10638 else
10639   echo "configure: failed program was:" >&5
10640   cat conftest.$ac_ext >&5
10641   rm -fr conftest*
10642   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10643 fi
10644 rm -fr conftest*
10645 fi
10646
10647 fi
10648
10649 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10650 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10651     cat >> confdefs.h <<\EOF
10652 #define HAVE_KERNEL_SHARE_MODES 1
10653 EOF
10654
10655 fi
10656
10657
10658
10659
10660 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10661 echo "configure:10662: checking for IRIX kernel oplock type definitions" >&5
10662 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10663   echo $ac_n "(cached) $ac_c" 1>&6
10664 else
10665   
10666 cat > conftest.$ac_ext <<EOF
10667 #line 10668 "configure"
10668 #include "confdefs.h"
10669 #include <sys/types.h>
10670 #include <fcntl.h>
10671 int main() {
10672 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10673 ; return 0; }
10674 EOF
10675 if { (eval echo configure:10676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10676   rm -rf conftest*
10677   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10678 else
10679   echo "configure: failed program was:" >&5
10680   cat conftest.$ac_ext >&5
10681   rm -rf conftest*
10682   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10683 fi
10684 rm -f conftest*
10685 fi
10686
10687 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10688 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10689     cat >> confdefs.h <<\EOF
10690 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10691 EOF
10692
10693 fi
10694
10695 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10696 echo "configure:10697: checking for irix specific capabilities" >&5
10697 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10698   echo $ac_n "(cached) $ac_c" 1>&6
10699 else
10700   
10701 if test "$cross_compiling" = yes; then
10702   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10703 else
10704   cat > conftest.$ac_ext <<EOF
10705 #line 10706 "configure"
10706 #include "confdefs.h"
10707 #include <sys/types.h>
10708 #include <sys/capability.h>
10709 main() {
10710  cap_t cap;
10711  if ((cap = cap_get_proc()) == NULL)
10712    exit(1);
10713  cap->cap_effective |= CAP_NETWORK_MGT;
10714  cap->cap_inheritable |= CAP_NETWORK_MGT;
10715  cap_set_proc(cap);
10716  exit(0);
10717 }
10718
10719 EOF
10720 if { (eval echo configure:10721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10721 then
10722   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10723 else
10724   echo "configure: failed program was:" >&5
10725   cat conftest.$ac_ext >&5
10726   rm -fr conftest*
10727   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10728 fi
10729 rm -fr conftest*
10730 fi
10731
10732 fi
10733
10734 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10735 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10736     cat >> confdefs.h <<\EOF
10737 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10738 EOF
10739
10740 fi
10741
10742 #
10743 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10744 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10745 #
10746
10747 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10748 echo "configure:10749: checking for int16 typedef included by rpc/rpc.h" >&5
10749 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10750   echo $ac_n "(cached) $ac_c" 1>&6
10751 else
10752   
10753 cat > conftest.$ac_ext <<EOF
10754 #line 10755 "configure"
10755 #include "confdefs.h"
10756 #include <sys/types.h>
10757 #if defined(HAVE_RPC_RPC_H)
10758 #include <rpc/rpc.h>
10759 #endif
10760 int main() {
10761 int16 testvar;
10762 ; return 0; }
10763 EOF
10764 if { (eval echo configure:10765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10765   rm -rf conftest*
10766   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10767 else
10768   echo "configure: failed program was:" >&5
10769   cat conftest.$ac_ext >&5
10770   rm -rf conftest*
10771   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10772 fi
10773 rm -f conftest*
10774 fi
10775
10776 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10777 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10778     cat >> confdefs.h <<\EOF
10779 #define HAVE_INT16_FROM_RPC_RPC_H 1
10780 EOF
10781
10782 fi
10783
10784 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10785 echo "configure:10786: checking for uint16 typedef included by rpc/rpc.h" >&5
10786 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10787   echo $ac_n "(cached) $ac_c" 1>&6
10788 else
10789   
10790 cat > conftest.$ac_ext <<EOF
10791 #line 10792 "configure"
10792 #include "confdefs.h"
10793 #include <sys/types.h>
10794 #if defined(HAVE_RPC_RPC_H)
10795 #include <rpc/rpc.h>
10796 #endif
10797 int main() {
10798 uint16 testvar;
10799 ; return 0; }
10800 EOF
10801 if { (eval echo configure:10802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10802   rm -rf conftest*
10803   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10804 else
10805   echo "configure: failed program was:" >&5
10806   cat conftest.$ac_ext >&5
10807   rm -rf conftest*
10808   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10809 fi
10810 rm -f conftest*
10811 fi
10812
10813 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10814 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10815     cat >> confdefs.h <<\EOF
10816 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10817 EOF
10818
10819 fi
10820
10821 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10822 echo "configure:10823: checking for int32 typedef included by rpc/rpc.h" >&5
10823 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10824   echo $ac_n "(cached) $ac_c" 1>&6
10825 else
10826   
10827 cat > conftest.$ac_ext <<EOF
10828 #line 10829 "configure"
10829 #include "confdefs.h"
10830 #include <sys/types.h>
10831 #if defined(HAVE_RPC_RPC_H)
10832 #include <rpc/rpc.h>
10833 #endif
10834 int main() {
10835 int32 testvar;
10836 ; return 0; }
10837 EOF
10838 if { (eval echo configure:10839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10839   rm -rf conftest*
10840   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10841 else
10842   echo "configure: failed program was:" >&5
10843   cat conftest.$ac_ext >&5
10844   rm -rf conftest*
10845   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10846 fi
10847 rm -f conftest*
10848 fi
10849
10850 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10851 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10852     cat >> confdefs.h <<\EOF
10853 #define HAVE_INT32_FROM_RPC_RPC_H 1
10854 EOF
10855
10856 fi
10857
10858 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10859 echo "configure:10860: checking for uint32 typedef included by rpc/rpc.h" >&5
10860 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10861   echo $ac_n "(cached) $ac_c" 1>&6
10862 else
10863   
10864 cat > conftest.$ac_ext <<EOF
10865 #line 10866 "configure"
10866 #include "confdefs.h"
10867 #include <sys/types.h>
10868 #if defined(HAVE_RPC_RPC_H)
10869 #include <rpc/rpc.h>
10870 #endif
10871 int main() {
10872 uint32 testvar;
10873 ; return 0; }
10874 EOF
10875 if { (eval echo configure:10876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10876   rm -rf conftest*
10877   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10878 else
10879   echo "configure: failed program was:" >&5
10880   cat conftest.$ac_ext >&5
10881   rm -rf conftest*
10882   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10883 fi
10884 rm -f conftest*
10885 fi
10886
10887 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10888 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10889     cat >> confdefs.h <<\EOF
10890 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10891 EOF
10892
10893 fi
10894
10895
10896 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10897 echo "configure:10898: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10898 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10899   echo $ac_n "(cached) $ac_c" 1>&6
10900 else
10901   
10902 cat > conftest.$ac_ext <<EOF
10903 #line 10904 "configure"
10904 #include "confdefs.h"
10905 #include <sys/types.h>
10906 #ifdef HAVE_SYS_SECURITY_H
10907 #include <sys/security.h>
10908 #include <prot.h>
10909 #endif  /* HAVE_SYS_SECURITY_H */
10910 #if defined(HAVE_RPC_RPC_H)
10911 #include <rpc/rpc.h>
10912 #endif
10913 int main() {
10914 int testvar;
10915 ; return 0; }
10916 EOF
10917 if { (eval echo configure:10918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10918   rm -rf conftest*
10919   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10920 else
10921   echo "configure: failed program was:" >&5
10922   cat conftest.$ac_ext >&5
10923   rm -rf conftest*
10924   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10925 fi
10926 rm -f conftest*
10927 fi
10928
10929 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10930 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10931     cat >> confdefs.h <<\EOF
10932 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10933 EOF
10934
10935 fi
10936
10937 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10938 echo "configure:10939: checking for test routines" >&5
10939 if test "$cross_compiling" = yes; then
10940   echo "configure: warning: cannot run when cross-compiling" 1>&2
10941 else
10942   cat > conftest.$ac_ext <<EOF
10943 #line 10944 "configure"
10944 #include "confdefs.h"
10945 #include "${srcdir-.}/tests/trivial.c"
10946 EOF
10947 if { (eval echo configure:10948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10948 then
10949   echo "$ac_t""yes" 1>&6
10950 else
10951   echo "configure: failed program was:" >&5
10952   cat conftest.$ac_ext >&5
10953   rm -fr conftest*
10954   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10955 fi
10956 rm -fr conftest*
10957 fi
10958
10959
10960 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10961 echo "configure:10962: checking for ftruncate extend" >&5
10962 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10963   echo $ac_n "(cached) $ac_c" 1>&6
10964 else
10965   
10966 if test "$cross_compiling" = yes; then
10967   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10968 else
10969   cat > conftest.$ac_ext <<EOF
10970 #line 10971 "configure"
10971 #include "confdefs.h"
10972 #include "${srcdir-.}/tests/ftruncate.c"
10973 EOF
10974 if { (eval echo configure:10975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10975 then
10976   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10977 else
10978   echo "configure: failed program was:" >&5
10979   cat conftest.$ac_ext >&5
10980   rm -fr conftest*
10981   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10982 fi
10983 rm -fr conftest*
10984 fi
10985
10986 fi
10987
10988 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10989 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10990     cat >> confdefs.h <<\EOF
10991 #define HAVE_FTRUNCATE_EXTEND 1
10992 EOF
10993
10994 fi
10995
10996 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10997 echo "configure:10998: checking for AF_LOCAL socket support" >&5
10998 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10999   echo $ac_n "(cached) $ac_c" 1>&6
11000 else
11001   
11002 if test "$cross_compiling" = yes; then
11003   samba_cv_HAVE_WORKING_AF_LOCAL=cross
11004 else
11005   cat > conftest.$ac_ext <<EOF
11006 #line 11007 "configure"
11007 #include "confdefs.h"
11008 #include "${srcdir-.}/tests/unixsock.c"
11009 EOF
11010 if { (eval echo configure:11011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11011 then
11012   samba_cv_HAVE_WORKING_AF_LOCAL=yes
11013 else
11014   echo "configure: failed program was:" >&5
11015   cat conftest.$ac_ext >&5
11016   rm -fr conftest*
11017   samba_cv_HAVE_WORKING_AF_LOCAL=no
11018 fi
11019 rm -fr conftest*
11020 fi
11021
11022 fi
11023
11024 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
11025 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
11026 then
11027     cat >> confdefs.h <<\EOF
11028 #define HAVE_WORKING_AF_LOCAL 1
11029 EOF
11030
11031 fi
11032
11033 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
11034 echo "configure:11035: checking for broken getgroups" >&5
11035 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
11036   echo $ac_n "(cached) $ac_c" 1>&6
11037 else
11038   
11039 if test "$cross_compiling" = yes; then
11040   samba_cv_HAVE_BROKEN_GETGROUPS=cross
11041 else
11042   cat > conftest.$ac_ext <<EOF
11043 #line 11044 "configure"
11044 #include "confdefs.h"
11045 #include "${srcdir-.}/tests/getgroups.c"
11046 EOF
11047 if { (eval echo configure:11048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11048 then
11049   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11050 else
11051   echo "configure: failed program was:" >&5
11052   cat conftest.$ac_ext >&5
11053   rm -fr conftest*
11054   samba_cv_HAVE_BROKEN_GETGROUPS=no
11055 fi
11056 rm -fr conftest*
11057 fi
11058
11059 fi
11060
11061 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11062 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11063     cat >> confdefs.h <<\EOF
11064 #define HAVE_BROKEN_GETGROUPS 1
11065 EOF
11066
11067 fi
11068
11069 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11070 echo "configure:11071: checking whether getpass should be replaced" >&5
11071 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11072   echo $ac_n "(cached) $ac_c" 1>&6
11073 else
11074   
11075 SAVE_CPPFLAGS="$CPPFLAGS"
11076 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt  -I${srcdir-.}/smbwrapper"
11077 cat > conftest.$ac_ext <<EOF
11078 #line 11079 "configure"
11079 #include "confdefs.h"
11080
11081 #define REPLACE_GETPASS 1
11082 #define NO_CONFIG_H 1
11083 #define main dont_declare_main
11084 #include "${srcdir-.}/lib/getsmbpass.c"
11085 #undef main
11086
11087 int main() {
11088
11089 ; return 0; }
11090 EOF
11091 if { (eval echo configure:11092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11092   rm -rf conftest*
11093   samba_cv_REPLACE_GETPASS=yes
11094 else
11095   echo "configure: failed program was:" >&5
11096   cat conftest.$ac_ext >&5
11097   rm -rf conftest*
11098   samba_cv_REPLACE_GETPASS=no
11099 fi
11100 rm -f conftest*
11101 CPPFLAGS="$SAVE_CPPFLAGS"
11102
11103 fi
11104
11105 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11106 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11107         cat >> confdefs.h <<\EOF
11108 #define REPLACE_GETPASS 1
11109 EOF
11110
11111 fi
11112
11113 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11114 echo "configure:11115: checking for broken inet_ntoa" >&5
11115 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11116   echo $ac_n "(cached) $ac_c" 1>&6
11117 else
11118   
11119 if test "$cross_compiling" = yes; then
11120   samba_cv_REPLACE_INET_NTOA=cross
11121 else
11122   cat > conftest.$ac_ext <<EOF
11123 #line 11124 "configure"
11124 #include "confdefs.h"
11125
11126 #include <stdio.h>
11127 #include <sys/types.h>
11128 #include <netinet/in.h>
11129 #ifdef HAVE_ARPA_INET_H
11130 #include <arpa/inet.h>
11131 #endif
11132 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11133 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11134     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11135 exit(1);}
11136 EOF
11137 if { (eval echo configure:11138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11138 then
11139   samba_cv_REPLACE_INET_NTOA=yes
11140 else
11141   echo "configure: failed program was:" >&5
11142   cat conftest.$ac_ext >&5
11143   rm -fr conftest*
11144   samba_cv_REPLACE_INET_NTOA=no
11145 fi
11146 rm -fr conftest*
11147 fi
11148
11149 fi
11150
11151 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11152 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11153     cat >> confdefs.h <<\EOF
11154 #define REPLACE_INET_NTOA 1
11155 EOF
11156
11157 fi
11158
11159 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11160 echo "configure:11161: checking for secure mkstemp" >&5
11161 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11162   echo $ac_n "(cached) $ac_c" 1>&6
11163 else
11164   
11165 if test "$cross_compiling" = yes; then
11166   samba_cv_HAVE_SECURE_MKSTEMP=cross
11167 else
11168   cat > conftest.$ac_ext <<EOF
11169 #line 11170 "configure"
11170 #include "confdefs.h"
11171 #include <stdlib.h>
11172 #include <sys/types.h>
11173 #include <sys/stat.h>
11174 #include <unistd.h>
11175 main() { 
11176   struct stat st;
11177   char tpl[20]="/tmp/test.XXXXXX"; 
11178   int fd = mkstemp(tpl); 
11179   if (fd == -1) exit(1);
11180   unlink(tpl);
11181   if (fstat(fd, &st) != 0) exit(1);
11182   if ((st.st_mode & 0777) != 0600) exit(1);
11183   exit(0);
11184 }
11185 EOF
11186 if { (eval echo configure:11187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11187 then
11188   samba_cv_HAVE_SECURE_MKSTEMP=yes
11189 else
11190   echo "configure: failed program was:" >&5
11191   cat conftest.$ac_ext >&5
11192   rm -fr conftest*
11193   samba_cv_HAVE_SECURE_MKSTEMP=no
11194 fi
11195 rm -fr conftest*
11196 fi
11197
11198 fi
11199
11200 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11201 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11202     cat >> confdefs.h <<\EOF
11203 #define HAVE_SECURE_MKSTEMP 1
11204 EOF
11205
11206 fi
11207
11208 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11209 echo "configure:11210: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11210 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11211   echo $ac_n "(cached) $ac_c" 1>&6
11212 else
11213   
11214 if test "$cross_compiling" = yes; then
11215   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11216 else
11217   cat > conftest.$ac_ext <<EOF
11218 #line 11219 "configure"
11219 #include "confdefs.h"
11220 #include <unistd.h>
11221 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11222 EOF
11223 if { (eval echo configure:11224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11224 then
11225   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11226 else
11227   echo "configure: failed program was:" >&5
11228   cat conftest.$ac_ext >&5
11229   rm -fr conftest*
11230   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11231 fi
11232 rm -fr conftest*
11233 fi
11234
11235 fi
11236
11237 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11238 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11239     cat >> confdefs.h <<\EOF
11240 #define SYSCONF_SC_NGROUPS_MAX 1
11241 EOF
11242
11243 fi
11244
11245 echo $ac_n "checking for root""... $ac_c" 1>&6
11246 echo "configure:11247: checking for root" >&5
11247 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11248   echo $ac_n "(cached) $ac_c" 1>&6
11249 else
11250   
11251 if test "$cross_compiling" = yes; then
11252   samba_cv_HAVE_ROOT=cross
11253 else
11254   cat > conftest.$ac_ext <<EOF
11255 #line 11256 "configure"
11256 #include "confdefs.h"
11257 main() { exit(getuid() != 0); }
11258 EOF
11259 if { (eval echo configure:11260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11260 then
11261   samba_cv_HAVE_ROOT=yes
11262 else
11263   echo "configure: failed program was:" >&5
11264   cat conftest.$ac_ext >&5
11265   rm -fr conftest*
11266   samba_cv_HAVE_ROOT=no
11267 fi
11268 rm -fr conftest*
11269 fi
11270
11271 fi
11272
11273 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11274 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11275     cat >> confdefs.h <<\EOF
11276 #define HAVE_ROOT 1
11277 EOF
11278
11279 else
11280     echo "configure: warning: running as non-root will disable some tests" 1>&2
11281 fi
11282
11283 ##################
11284 # look for a method of finding the list of network interfaces
11285 iface=no;
11286 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11287 echo "configure:11288: checking for iface AIX" >&5
11288 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11289   echo $ac_n "(cached) $ac_c" 1>&6
11290 else
11291   
11292 if test "$cross_compiling" = yes; then
11293   samba_cv_HAVE_IFACE_AIX=cross
11294 else
11295   cat > conftest.$ac_ext <<EOF
11296 #line 11297 "configure"
11297 #include "confdefs.h"
11298
11299 #define HAVE_IFACE_AIX 1
11300 #define AUTOCONF_TEST 1
11301 #include "confdefs.h"
11302 #include "${srcdir-.}/lib/interfaces.c"
11303 EOF
11304 if { (eval echo configure:11305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11305 then
11306   samba_cv_HAVE_IFACE_AIX=yes
11307 else
11308   echo "configure: failed program was:" >&5
11309   cat conftest.$ac_ext >&5
11310   rm -fr conftest*
11311   samba_cv_HAVE_IFACE_AIX=no
11312 fi
11313 rm -fr conftest*
11314 fi
11315
11316 fi
11317
11318 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11319 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11320     iface=yes;cat >> confdefs.h <<\EOF
11321 #define HAVE_IFACE_AIX 1
11322 EOF
11323
11324 fi
11325
11326 if test $iface = no; then
11327 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11328 echo "configure:11329: checking for iface ifconf" >&5
11329 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11330   echo $ac_n "(cached) $ac_c" 1>&6
11331 else
11332   
11333 if test "$cross_compiling" = yes; then
11334   samba_cv_HAVE_IFACE_IFCONF=cross
11335 else
11336   cat > conftest.$ac_ext <<EOF
11337 #line 11338 "configure"
11338 #include "confdefs.h"
11339
11340 #define HAVE_IFACE_IFCONF 1
11341 #define AUTOCONF_TEST 1
11342 #include "confdefs.h"
11343 #include "${srcdir-.}/lib/interfaces.c"
11344 EOF
11345 if { (eval echo configure:11346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11346 then
11347   samba_cv_HAVE_IFACE_IFCONF=yes
11348 else
11349   echo "configure: failed program was:" >&5
11350   cat conftest.$ac_ext >&5
11351   rm -fr conftest*
11352   samba_cv_HAVE_IFACE_IFCONF=no
11353 fi
11354 rm -fr conftest*
11355 fi
11356
11357 fi
11358
11359 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11360 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11361     iface=yes;cat >> confdefs.h <<\EOF
11362 #define HAVE_IFACE_IFCONF 1
11363 EOF
11364
11365 fi
11366 fi
11367
11368 if test $iface = no; then
11369 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11370 echo "configure:11371: checking for iface ifreq" >&5
11371 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11372   echo $ac_n "(cached) $ac_c" 1>&6
11373 else
11374   
11375 if test "$cross_compiling" = yes; then
11376   samba_cv_HAVE_IFACE_IFREQ=cross
11377 else
11378   cat > conftest.$ac_ext <<EOF
11379 #line 11380 "configure"
11380 #include "confdefs.h"
11381
11382 #define HAVE_IFACE_IFREQ 1
11383 #define AUTOCONF_TEST 1
11384 #include "confdefs.h"
11385 #include "${srcdir-.}/lib/interfaces.c"
11386 EOF
11387 if { (eval echo configure:11388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11388 then
11389   samba_cv_HAVE_IFACE_IFREQ=yes
11390 else
11391   echo "configure: failed program was:" >&5
11392   cat conftest.$ac_ext >&5
11393   rm -fr conftest*
11394   samba_cv_HAVE_IFACE_IFREQ=no
11395 fi
11396 rm -fr conftest*
11397 fi
11398
11399 fi
11400
11401 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11402 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11403     iface=yes;cat >> confdefs.h <<\EOF
11404 #define HAVE_IFACE_IFREQ 1
11405 EOF
11406
11407 fi
11408 fi
11409
11410
11411 ################################################
11412 # look for a method of setting the effective uid
11413 seteuid=no;
11414 if test $seteuid = no; then
11415 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11416 echo "configure:11417: checking for setresuid" >&5
11417 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11418   echo $ac_n "(cached) $ac_c" 1>&6
11419 else
11420   
11421 if test "$cross_compiling" = yes; then
11422   samba_cv_USE_SETRESUID=cross
11423 else
11424   cat > conftest.$ac_ext <<EOF
11425 #line 11426 "configure"
11426 #include "confdefs.h"
11427
11428 #define AUTOCONF_TEST 1
11429 #define USE_SETRESUID 1
11430 #include "confdefs.h"
11431 #include "${srcdir-.}/lib/util_sec.c"
11432 EOF
11433 if { (eval echo configure:11434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11434 then
11435   samba_cv_USE_SETRESUID=yes
11436 else
11437   echo "configure: failed program was:" >&5
11438   cat conftest.$ac_ext >&5
11439   rm -fr conftest*
11440   samba_cv_USE_SETRESUID=no
11441 fi
11442 rm -fr conftest*
11443 fi
11444
11445 fi
11446
11447 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11448 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11449     seteuid=yes;cat >> confdefs.h <<\EOF
11450 #define USE_SETRESUID 1
11451 EOF
11452
11453 fi
11454 fi
11455
11456
11457 if test $seteuid = no; then
11458 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11459 echo "configure:11460: checking for setreuid" >&5
11460 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11461   echo $ac_n "(cached) $ac_c" 1>&6
11462 else
11463   
11464 if test "$cross_compiling" = yes; then
11465   samba_cv_USE_SETREUID=cross
11466 else
11467   cat > conftest.$ac_ext <<EOF
11468 #line 11469 "configure"
11469 #include "confdefs.h"
11470
11471 #define AUTOCONF_TEST 1
11472 #define USE_SETREUID 1
11473 #include "confdefs.h"
11474 #include "${srcdir-.}/lib/util_sec.c"
11475 EOF
11476 if { (eval echo configure:11477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11477 then
11478   samba_cv_USE_SETREUID=yes
11479 else
11480   echo "configure: failed program was:" >&5
11481   cat conftest.$ac_ext >&5
11482   rm -fr conftest*
11483   samba_cv_USE_SETREUID=no
11484 fi
11485 rm -fr conftest*
11486 fi
11487
11488 fi
11489
11490 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11491 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11492     seteuid=yes;cat >> confdefs.h <<\EOF
11493 #define USE_SETREUID 1
11494 EOF
11495
11496 fi
11497 fi
11498
11499 if test $seteuid = no; then
11500 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11501 echo "configure:11502: checking for seteuid" >&5
11502 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11503   echo $ac_n "(cached) $ac_c" 1>&6
11504 else
11505   
11506 if test "$cross_compiling" = yes; then
11507   samba_cv_USE_SETEUID=cross
11508 else
11509   cat > conftest.$ac_ext <<EOF
11510 #line 11511 "configure"
11511 #include "confdefs.h"
11512
11513 #define AUTOCONF_TEST 1
11514 #define USE_SETEUID 1
11515 #include "confdefs.h"
11516 #include "${srcdir-.}/lib/util_sec.c"
11517 EOF
11518 if { (eval echo configure:11519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11519 then
11520   samba_cv_USE_SETEUID=yes
11521 else
11522   echo "configure: failed program was:" >&5
11523   cat conftest.$ac_ext >&5
11524   rm -fr conftest*
11525   samba_cv_USE_SETEUID=no
11526 fi
11527 rm -fr conftest*
11528 fi
11529
11530 fi
11531
11532 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11533 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11534     seteuid=yes;cat >> confdefs.h <<\EOF
11535 #define USE_SETEUID 1
11536 EOF
11537
11538 fi
11539 fi
11540
11541 if test $seteuid = no; then
11542 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11543 echo "configure:11544: checking for setuidx" >&5
11544 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11545   echo $ac_n "(cached) $ac_c" 1>&6
11546 else
11547   
11548 if test "$cross_compiling" = yes; then
11549   samba_cv_USE_SETUIDX=cross
11550 else
11551   cat > conftest.$ac_ext <<EOF
11552 #line 11553 "configure"
11553 #include "confdefs.h"
11554
11555 #define AUTOCONF_TEST 1
11556 #define USE_SETUIDX 1
11557 #include "confdefs.h"
11558 #include "${srcdir-.}/lib/util_sec.c"
11559 EOF
11560 if { (eval echo configure:11561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11561 then
11562   samba_cv_USE_SETUIDX=yes
11563 else
11564   echo "configure: failed program was:" >&5
11565   cat conftest.$ac_ext >&5
11566   rm -fr conftest*
11567   samba_cv_USE_SETUIDX=no
11568 fi
11569 rm -fr conftest*
11570 fi
11571
11572 fi
11573
11574 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11575 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11576     seteuid=yes;cat >> confdefs.h <<\EOF
11577 #define USE_SETUIDX 1
11578 EOF
11579
11580 fi
11581 fi
11582
11583
11584 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11585 echo "configure:11586: checking for working mmap" >&5
11586 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11587   echo $ac_n "(cached) $ac_c" 1>&6
11588 else
11589   
11590 if test "$cross_compiling" = yes; then
11591   samba_cv_HAVE_MMAP=cross
11592 else
11593   cat > conftest.$ac_ext <<EOF
11594 #line 11595 "configure"
11595 #include "confdefs.h"
11596 #include "${srcdir-.}/tests/shared_mmap.c"
11597 EOF
11598 if { (eval echo configure:11599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11599 then
11600   samba_cv_HAVE_MMAP=yes
11601 else
11602   echo "configure: failed program was:" >&5
11603   cat conftest.$ac_ext >&5
11604   rm -fr conftest*
11605   samba_cv_HAVE_MMAP=no
11606 fi
11607 rm -fr conftest*
11608 fi
11609
11610 fi
11611
11612 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11613 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11614     cat >> confdefs.h <<\EOF
11615 #define HAVE_MMAP 1
11616 EOF
11617
11618 fi
11619
11620 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11621 echo "configure:11622: checking for ftruncate needs root" >&5
11622 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11623   echo $ac_n "(cached) $ac_c" 1>&6
11624 else
11625   
11626 if test "$cross_compiling" = yes; then
11627   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11628 else
11629   cat > conftest.$ac_ext <<EOF
11630 #line 11631 "configure"
11631 #include "confdefs.h"
11632 #include "${srcdir-.}/tests/ftruncroot.c"
11633 EOF
11634 if { (eval echo configure:11635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11635 then
11636   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11637 else
11638   echo "configure: failed program was:" >&5
11639   cat conftest.$ac_ext >&5
11640   rm -fr conftest*
11641   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11642 fi
11643 rm -fr conftest*
11644 fi
11645
11646 fi
11647
11648 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11649 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11650     cat >> confdefs.h <<\EOF
11651 #define FTRUNCATE_NEEDS_ROOT 1
11652 EOF
11653
11654 fi
11655
11656 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11657 echo "configure:11658: checking for fcntl locking" >&5
11658 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11659   echo $ac_n "(cached) $ac_c" 1>&6
11660 else
11661   
11662 if test "$cross_compiling" = yes; then
11663   samba_cv_HAVE_FCNTL_LOCK=cross
11664 else
11665   cat > conftest.$ac_ext <<EOF
11666 #line 11667 "configure"
11667 #include "confdefs.h"
11668 #include "${srcdir-.}/tests/fcntl_lock.c"
11669 EOF
11670 if { (eval echo configure:11671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11671 then
11672   samba_cv_HAVE_FCNTL_LOCK=yes
11673 else
11674   echo "configure: failed program was:" >&5
11675   cat conftest.$ac_ext >&5
11676   rm -fr conftest*
11677   samba_cv_HAVE_FCNTL_LOCK=no
11678 fi
11679 rm -fr conftest*
11680 fi
11681
11682 fi
11683
11684 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11685 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11686     cat >> confdefs.h <<\EOF
11687 #define HAVE_FCNTL_LOCK 1
11688 EOF
11689
11690 fi
11691
11692 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11693 echo "configure:11694: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11694 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11695   echo $ac_n "(cached) $ac_c" 1>&6
11696 else
11697   
11698 if test "$cross_compiling" = yes; then
11699   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11700 else
11701   cat > conftest.$ac_ext <<EOF
11702 #line 11703 "configure"
11703 #include "confdefs.h"
11704 #include "${srcdir-.}/tests/fcntl_lock64.c"
11705 EOF
11706 if { (eval echo configure:11707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11707 then
11708   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11709 else
11710   echo "configure: failed program was:" >&5
11711   cat conftest.$ac_ext >&5
11712   rm -fr conftest*
11713   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11714 fi
11715 rm -fr conftest*
11716 fi
11717
11718 fi
11719
11720 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11721 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11722     cat >> confdefs.h <<\EOF
11723 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11724 EOF
11725
11726
11727 else
11728
11729
11730   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11731 echo "configure:11732: checking for 64 bit fcntl locking" >&5
11732 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11733   echo $ac_n "(cached) $ac_c" 1>&6
11734 else
11735   
11736   if test "$cross_compiling" = yes; then
11737   samba_cv_HAVE_STRUCT_FLOCK64=cross
11738 else
11739   cat > conftest.$ac_ext <<EOF
11740 #line 11741 "configure"
11741 #include "confdefs.h"
11742
11743 #if defined(HAVE_UNISTD_H)
11744 #include <unistd.h>
11745 #endif
11746 #include <stdio.h>
11747 #include <stdlib.h>
11748
11749 #ifdef HAVE_FCNTL_H
11750 #include <fcntl.h>
11751 #endif
11752
11753 #ifdef HAVE_SYS_FCNTL_H
11754 #include <sys/fcntl.h>
11755 #endif
11756 main() { struct flock64 fl64;
11757 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11758 exit(0);
11759 #else
11760 exit(1);
11761 #endif
11762 }
11763 EOF
11764 if { (eval echo configure:11765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11765 then
11766   samba_cv_HAVE_STRUCT_FLOCK64=yes
11767 else
11768   echo "configure: failed program was:" >&5
11769   cat conftest.$ac_ext >&5
11770   rm -fr conftest*
11771   samba_cv_HAVE_STRUCT_FLOCK64=no
11772 fi
11773 rm -fr conftest*
11774 fi
11775
11776 fi
11777
11778 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11779
11780   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11781       cat >> confdefs.h <<\EOF
11782 #define HAVE_STRUCT_FLOCK64 1
11783 EOF
11784
11785   fi
11786 fi
11787
11788 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11789 echo "configure:11790: checking for st_blocks in struct stat" >&5
11790 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11791   echo $ac_n "(cached) $ac_c" 1>&6
11792 else
11793   
11794 cat > conftest.$ac_ext <<EOF
11795 #line 11796 "configure"
11796 #include "confdefs.h"
11797 #include <sys/types.h>
11798 #include <sys/stat.h>
11799 #include <unistd.h>
11800 int main() {
11801 struct stat st;  st.st_blocks = 0;
11802 ; return 0; }
11803 EOF
11804 if { (eval echo configure:11805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11805   rm -rf conftest*
11806   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11807 else
11808   echo "configure: failed program was:" >&5
11809   cat conftest.$ac_ext >&5
11810   rm -rf conftest*
11811   samba_cv_HAVE_STAT_ST_BLOCKS=no
11812 fi
11813 rm -f conftest*
11814 fi
11815
11816 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11817 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11818     cat >> confdefs.h <<\EOF
11819 #define HAVE_STAT_ST_BLOCKS 1
11820 EOF
11821
11822 fi 
11823
11824 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
11825 echo "configure:11826: checking for st_blksize in struct stat" >&5
11826 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLKSIZE'+set}'`\" = set"; then
11827   echo $ac_n "(cached) $ac_c" 1>&6
11828 else
11829   
11830 cat > conftest.$ac_ext <<EOF
11831 #line 11832 "configure"
11832 #include "confdefs.h"
11833 #include <sys/types.h>
11834 #include <sys/stat.h>
11835 #include <unistd.h>
11836 int main() {
11837 struct stat st;  st.st_blksize = 0;
11838 ; return 0; }
11839 EOF
11840 if { (eval echo configure:11841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11841   rm -rf conftest*
11842   samba_cv_HAVE_STAT_ST_BLKSIZE=yes
11843 else
11844   echo "configure: failed program was:" >&5
11845   cat conftest.$ac_ext >&5
11846   rm -rf conftest*
11847   samba_cv_HAVE_STAT_ST_BLKSIZE=no
11848 fi
11849 rm -f conftest*
11850 fi
11851
11852 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLKSIZE" 1>&6
11853 if test x"$samba_cv_HAVE_STAT_ST_BLKSIZE" = x"yes"; then
11854     cat >> confdefs.h <<\EOF
11855 #define HAVE_STAT_ST_BLKSIZE 1
11856 EOF
11857
11858 fi
11859
11860 case "$host_os" in
11861 *linux*)
11862 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11863 echo "configure:11864: checking for broken RedHat 7.2 system header files" >&5
11864 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11865   echo $ac_n "(cached) $ac_c" 1>&6
11866 else
11867   
11868 cat > conftest.$ac_ext <<EOF
11869 #line 11870 "configure"
11870 #include "confdefs.h"
11871
11872 #ifdef HAVE_SYS_VFS_H
11873 #include <sys/vfs.h>
11874 #endif
11875 #ifdef HAVE_SYS_CAPABILITY_H
11876 #include <sys/capability.h>
11877 #endif
11878
11879 int main() {
11880 int i;
11881 ; return 0; }
11882 EOF
11883 if { (eval echo configure:11884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11884   rm -rf conftest*
11885   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11886 else
11887   echo "configure: failed program was:" >&5
11888   cat conftest.$ac_ext >&5
11889   rm -rf conftest*
11890   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11891 fi
11892 rm -f conftest*
11893 fi
11894
11895 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11896 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11897    cat >> confdefs.h <<\EOF
11898 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11899 EOF
11900
11901 fi
11902 ;;
11903 esac
11904
11905 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11906 echo "configure:11907: checking for broken nisplus include files" >&5
11907 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11908   echo $ac_n "(cached) $ac_c" 1>&6
11909 else
11910   
11911 cat > conftest.$ac_ext <<EOF
11912 #line 11913 "configure"
11913 #include "confdefs.h"
11914 #include <sys/acl.h>
11915 #if defined(HAVE_RPCSVC_NIS_H)
11916 #include <rpcsvc/nis.h>
11917 #endif
11918 int main() {
11919 int i;
11920 ; return 0; }
11921 EOF
11922 if { (eval echo configure:11923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11923   rm -rf conftest*
11924   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11925 else
11926   echo "configure: failed program was:" >&5
11927   cat conftest.$ac_ext >&5
11928   rm -rf conftest*
11929   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11930 fi
11931 rm -f conftest*
11932 fi
11933
11934 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11935 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11936     cat >> confdefs.h <<\EOF
11937 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11938 EOF
11939
11940 fi
11941
11942
11943 #################################################
11944 # check for smbwrapper support
11945 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11946 echo "configure:11947: checking whether to use smbwrapper" >&5
11947 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11948 if test "${with_smbwrapper+set}" = set; then
11949   withval="$with_smbwrapper"
11950    case "$withval" in
11951   yes)
11952     echo "$ac_t""yes" 1>&6
11953     cat >> confdefs.h <<\EOF
11954 #define WITH_SMBWRAPPER 1
11955 EOF
11956
11957         WRAPPROG="bin/smbsh"
11958         WRAP="bin/smbwrapper.$SHLIBEXT"
11959
11960         if test x$ATTEMPT_WRAP32_BUILD = x; then
11961                 WRAP32=""
11962         else
11963                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11964         fi
11965
11966 # Conditions under which smbwrapper should not be built.
11967
11968         if test x$PICFLAG = x; then
11969            echo No support for PIC code - disabling smbwrapper and smbsh
11970            WRAPPROG=""
11971            WRAP=""
11972            WRAP32=""
11973         elif test x$ac_cv_func_syscall = xno; then
11974            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11975            WRAPPROG=""
11976            WRAP=""
11977            WRAP32=""
11978         fi
11979     ;;
11980   *)
11981     echo "$ac_t""no" 1>&6
11982     ;;
11983   esac 
11984 else
11985   echo "$ac_t""no" 1>&6
11986
11987 fi
11988
11989
11990 #################################################
11991 # check for AFS clear-text auth support
11992 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11993 echo "configure:11994: checking whether to use AFS clear-text auth" >&5
11994 # Check whether --with-afs or --without-afs was given.
11995 if test "${with_afs+set}" = set; then
11996   withval="$with_afs"
11997    case "$withval" in
11998   yes)
11999     echo "$ac_t""yes" 1>&6
12000     cat >> confdefs.h <<\EOF
12001 #define WITH_AFS 1
12002 EOF
12003
12004     ;;
12005   *)
12006     echo "$ac_t""no" 1>&6
12007     ;;
12008   esac 
12009 else
12010   echo "$ac_t""no" 1>&6
12011
12012 fi
12013
12014
12015
12016 #################################################
12017 # check for the DFS clear-text auth system
12018 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
12019 echo "configure:12020: checking whether to use DFS clear-text auth" >&5
12020 # Check whether --with-dfs or --without-dfs was given.
12021 if test "${with_dfs+set}" = set; then
12022   withval="$with_dfs"
12023    case "$withval" in
12024   yes)
12025     echo "$ac_t""yes" 1>&6
12026     cat >> confdefs.h <<\EOF
12027 #define WITH_DFS 1
12028 EOF
12029
12030     ;;
12031   *)
12032     echo "$ac_t""no" 1>&6
12033     ;;
12034   esac 
12035 else
12036   echo "$ac_t""no" 1>&6
12037
12038 fi
12039
12040
12041
12042 #################################################
12043 # see if this box has the RedHat location for kerberos
12044 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
12045 echo "configure:12046: checking for /usr/kerberos" >&5
12046 if test -d /usr/kerberos; then
12047     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
12048     CFLAGS="$CFLAGS -I/usr/kerberos/include"
12049     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
12050     echo "$ac_t""yes" 1>&6
12051 else
12052     echo "$ac_t""no" 1>&6
12053 fi
12054
12055 #################################################
12056 # check for location of Kerberos 5 install
12057 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
12058 echo "configure:12059: checking for kerberos 5 install path" >&5
12059 # Check whether --with-krb5 or --without-krb5 was given.
12060 if test "${with_krb5+set}" = set; then
12061   withval="$with_krb5"
12062    case "$withval" in
12063   no)
12064     echo "$ac_t""no" 1>&6
12065     ;;
12066   *)
12067     echo "$ac_t""yes" 1>&6
12068     LIBS="$LIBS -lkrb5"
12069     CFLAGS="$CFLAGS -I$withval/include"
12070     CPPFLAGS="$CPPFLAGS -I$withval/include"
12071     LDFLAGS="$LDFLAGS -L$withval/lib"
12072     ;;
12073   esac 
12074 else
12075   echo "$ac_t""no" 1>&6
12076
12077 fi
12078
12079
12080 # now check for krb5.h. Some systems have the libraries without the headers!
12081 # note that this check is done here to allow for different kerberos
12082 # include paths
12083 for ac_hdr in krb5.h
12084 do
12085 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12086 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12087 echo "configure:12088: checking for $ac_hdr" >&5
12088 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12089   echo $ac_n "(cached) $ac_c" 1>&6
12090 else
12091   cat > conftest.$ac_ext <<EOF
12092 #line 12093 "configure"
12093 #include "confdefs.h"
12094 #include <$ac_hdr>
12095 EOF
12096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12097 { (eval echo configure:12098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12098 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12099 if test -z "$ac_err"; then
12100   rm -rf conftest*
12101   eval "ac_cv_header_$ac_safe=yes"
12102 else
12103   echo "$ac_err" >&5
12104   echo "configure: failed program was:" >&5
12105   cat conftest.$ac_ext >&5
12106   rm -rf conftest*
12107   eval "ac_cv_header_$ac_safe=no"
12108 fi
12109 rm -f conftest*
12110 fi
12111 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12112   echo "$ac_t""yes" 1>&6
12113     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12114   cat >> confdefs.h <<EOF
12115 #define $ac_tr_hdr 1
12116 EOF
12117  
12118 else
12119   echo "$ac_t""no" 1>&6
12120 fi
12121 done
12122
12123
12124 # now check for gssapi headers.  This is also done here to allow for
12125 # different kerberos include paths
12126 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12127 do
12128 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12129 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12130 echo "configure:12131: checking for $ac_hdr" >&5
12131 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12132   echo $ac_n "(cached) $ac_c" 1>&6
12133 else
12134   cat > conftest.$ac_ext <<EOF
12135 #line 12136 "configure"
12136 #include "confdefs.h"
12137 #include <$ac_hdr>
12138 EOF
12139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12140 { (eval echo configure:12141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12142 if test -z "$ac_err"; then
12143   rm -rf conftest*
12144   eval "ac_cv_header_$ac_safe=yes"
12145 else
12146   echo "$ac_err" >&5
12147   echo "configure: failed program was:" >&5
12148   cat conftest.$ac_ext >&5
12149   rm -rf conftest*
12150   eval "ac_cv_header_$ac_safe=no"
12151 fi
12152 rm -f conftest*
12153 fi
12154 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12155   echo "$ac_t""yes" 1>&6
12156     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12157   cat >> confdefs.h <<EOF
12158 #define $ac_tr_hdr 1
12159 EOF
12160  
12161 else
12162   echo "$ac_t""no" 1>&6
12163 fi
12164 done
12165
12166
12167 ##################################################################
12168 # we might need the k5crypto and com_err libraries on some systems
12169 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12170 echo "configure:12171: checking for _et_list in -lcom_err" >&5
12171 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12172 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12173   echo $ac_n "(cached) $ac_c" 1>&6
12174 else
12175   ac_save_LIBS="$LIBS"
12176 LIBS="-lcom_err  $LIBS"
12177 cat > conftest.$ac_ext <<EOF
12178 #line 12179 "configure"
12179 #include "confdefs.h"
12180 /* Override any gcc2 internal prototype to avoid an error.  */
12181 /* We use char because int might match the return type of a gcc2
12182     builtin and then its argument prototype would still apply.  */
12183 char _et_list();
12184
12185 int main() {
12186 _et_list()
12187 ; return 0; }
12188 EOF
12189 if { (eval echo configure:12190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12190   rm -rf conftest*
12191   eval "ac_cv_lib_$ac_lib_var=yes"
12192 else
12193   echo "configure: failed program was:" >&5
12194   cat conftest.$ac_ext >&5
12195   rm -rf conftest*
12196   eval "ac_cv_lib_$ac_lib_var=no"
12197 fi
12198 rm -f conftest*
12199 LIBS="$ac_save_LIBS"
12200
12201 fi
12202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12203   echo "$ac_t""yes" 1>&6
12204   LIBS="$LIBS -lcom_err"
12205 else
12206   echo "$ac_t""no" 1>&6
12207 fi
12208
12209 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12210 echo "configure:12211: checking for krb5_encrypt_data in -lk5crypto" >&5
12211 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12212 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12213   echo $ac_n "(cached) $ac_c" 1>&6
12214 else
12215   ac_save_LIBS="$LIBS"
12216 LIBS="-lk5crypto  $LIBS"
12217 cat > conftest.$ac_ext <<EOF
12218 #line 12219 "configure"
12219 #include "confdefs.h"
12220 /* Override any gcc2 internal prototype to avoid an error.  */
12221 /* We use char because int might match the return type of a gcc2
12222     builtin and then its argument prototype would still apply.  */
12223 char krb5_encrypt_data();
12224
12225 int main() {
12226 krb5_encrypt_data()
12227 ; return 0; }
12228 EOF
12229 if { (eval echo configure:12230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12230   rm -rf conftest*
12231   eval "ac_cv_lib_$ac_lib_var=yes"
12232 else
12233   echo "configure: failed program was:" >&5
12234   cat conftest.$ac_ext >&5
12235   rm -rf conftest*
12236   eval "ac_cv_lib_$ac_lib_var=no"
12237 fi
12238 rm -f conftest*
12239 LIBS="$ac_save_LIBS"
12240
12241 fi
12242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12243   echo "$ac_t""yes" 1>&6
12244   LIBS="$LIBS -lk5crypto"
12245 else
12246   echo "$ac_t""no" 1>&6
12247 fi
12248
12249
12250 ########################################################
12251 # now see if we can find the krb5 libs in standard paths
12252 # or as specified above
12253 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12254 echo "configure:12255: checking for krb5_mk_req_extended in -lkrb5" >&5
12255 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12256 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12257   echo $ac_n "(cached) $ac_c" 1>&6
12258 else
12259   ac_save_LIBS="$LIBS"
12260 LIBS="-lkrb5  $LIBS"
12261 cat > conftest.$ac_ext <<EOF
12262 #line 12263 "configure"
12263 #include "confdefs.h"
12264 /* Override any gcc2 internal prototype to avoid an error.  */
12265 /* We use char because int might match the return type of a gcc2
12266     builtin and then its argument prototype would still apply.  */
12267 char krb5_mk_req_extended();
12268
12269 int main() {
12270 krb5_mk_req_extended()
12271 ; return 0; }
12272 EOF
12273 if { (eval echo configure:12274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12274   rm -rf conftest*
12275   eval "ac_cv_lib_$ac_lib_var=yes"
12276 else
12277   echo "configure: failed program was:" >&5
12278   cat conftest.$ac_ext >&5
12279   rm -rf conftest*
12280   eval "ac_cv_lib_$ac_lib_var=no"
12281 fi
12282 rm -f conftest*
12283 LIBS="$ac_save_LIBS"
12284
12285 fi
12286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12287   echo "$ac_t""yes" 1>&6
12288   LIBS="$LIBS -lkrb5";
12289         cat >> confdefs.h <<\EOF
12290 #define HAVE_KRB5 1
12291 EOF
12292
12293 else
12294   echo "$ac_t""no" 1>&6
12295 fi
12296
12297
12298 ########################################################
12299 # now see if we can find the gssapi libs in standard paths
12300 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12301 echo "configure:12302: checking for gss_display_status in -lgssapi_krb5" >&5
12302 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12303 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12304   echo $ac_n "(cached) $ac_c" 1>&6
12305 else
12306   ac_save_LIBS="$LIBS"
12307 LIBS="-lgssapi_krb5  $LIBS"
12308 cat > conftest.$ac_ext <<EOF
12309 #line 12310 "configure"
12310 #include "confdefs.h"
12311 /* Override any gcc2 internal prototype to avoid an error.  */
12312 /* We use char because int might match the return type of a gcc2
12313     builtin and then its argument prototype would still apply.  */
12314 char gss_display_status();
12315
12316 int main() {
12317 gss_display_status()
12318 ; return 0; }
12319 EOF
12320 if { (eval echo configure:12321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12321   rm -rf conftest*
12322   eval "ac_cv_lib_$ac_lib_var=yes"
12323 else
12324   echo "configure: failed program was:" >&5
12325   cat conftest.$ac_ext >&5
12326   rm -rf conftest*
12327   eval "ac_cv_lib_$ac_lib_var=no"
12328 fi
12329 rm -f conftest*
12330 LIBS="$ac_save_LIBS"
12331
12332 fi
12333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12334   echo "$ac_t""yes" 1>&6
12335   LIBS="$LIBS -lgssapi_krb5";
12336         cat >> confdefs.h <<\EOF
12337 #define HAVE_GSSAPI 1
12338 EOF
12339
12340 else
12341   echo "$ac_t""no" 1>&6
12342 fi
12343
12344
12345 ##################################################################
12346 # we might need the lber lib on some systems. To avoid link errors
12347 # this test must be before the libldap test
12348 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12349 echo "configure:12350: checking for ber_scanf in -llber" >&5
12350 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12351 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12352   echo $ac_n "(cached) $ac_c" 1>&6
12353 else
12354   ac_save_LIBS="$LIBS"
12355 LIBS="-llber  $LIBS"
12356 cat > conftest.$ac_ext <<EOF
12357 #line 12358 "configure"
12358 #include "confdefs.h"
12359 /* Override any gcc2 internal prototype to avoid an error.  */
12360 /* We use char because int might match the return type of a gcc2
12361     builtin and then its argument prototype would still apply.  */
12362 char ber_scanf();
12363
12364 int main() {
12365 ber_scanf()
12366 ; return 0; }
12367 EOF
12368 if { (eval echo configure:12369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12369   rm -rf conftest*
12370   eval "ac_cv_lib_$ac_lib_var=yes"
12371 else
12372   echo "configure: failed program was:" >&5
12373   cat conftest.$ac_ext >&5
12374   rm -rf conftest*
12375   eval "ac_cv_lib_$ac_lib_var=no"
12376 fi
12377 rm -f conftest*
12378 LIBS="$ac_save_LIBS"
12379
12380 fi
12381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12382   echo "$ac_t""yes" 1>&6
12383   LIBS="$LIBS -llber"
12384 else
12385   echo "$ac_t""no" 1>&6
12386 fi
12387
12388
12389 ########################################################
12390 # now see if we can find the ldap libs in standard paths
12391 if test x$have_ldap != xyes; then
12392 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12393 echo "configure:12394: checking for ldap_domain2hostlist in -lldap" >&5
12394 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12395 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12396   echo $ac_n "(cached) $ac_c" 1>&6
12397 else
12398   ac_save_LIBS="$LIBS"
12399 LIBS="-lldap  $LIBS"
12400 cat > conftest.$ac_ext <<EOF
12401 #line 12402 "configure"
12402 #include "confdefs.h"
12403 /* Override any gcc2 internal prototype to avoid an error.  */
12404 /* We use char because int might match the return type of a gcc2
12405     builtin and then its argument prototype would still apply.  */
12406 char ldap_domain2hostlist();
12407
12408 int main() {
12409 ldap_domain2hostlist()
12410 ; return 0; }
12411 EOF
12412 if { (eval echo configure:12413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12413   rm -rf conftest*
12414   eval "ac_cv_lib_$ac_lib_var=yes"
12415 else
12416   echo "configure: failed program was:" >&5
12417   cat conftest.$ac_ext >&5
12418   rm -rf conftest*
12419   eval "ac_cv_lib_$ac_lib_var=no"
12420 fi
12421 rm -f conftest*
12422 LIBS="$ac_save_LIBS"
12423
12424 fi
12425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12426   echo "$ac_t""yes" 1>&6
12427   LIBS="$LIBS -lldap";
12428         cat >> confdefs.h <<\EOF
12429 #define HAVE_LDAP 1
12430 EOF
12431
12432 else
12433   echo "$ac_t""no" 1>&6
12434 fi
12435
12436
12437         ########################################################
12438         # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
12439         # Check found in pam_ldap 145.
12440         for ac_func in ldap_set_rebind_proc
12441 do
12442 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12443 echo "configure:12444: checking for $ac_func" >&5
12444 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12445   echo $ac_n "(cached) $ac_c" 1>&6
12446 else
12447   cat > conftest.$ac_ext <<EOF
12448 #line 12449 "configure"
12449 #include "confdefs.h"
12450 /* System header to define __stub macros and hopefully few prototypes,
12451     which can conflict with char $ac_func(); below.  */
12452 #include <assert.h>
12453 /* Override any gcc2 internal prototype to avoid an error.  */
12454 /* We use char because int might match the return type of a gcc2
12455     builtin and then its argument prototype would still apply.  */
12456 char $ac_func();
12457
12458 int main() {
12459
12460 /* The GNU C library defines this for functions which it implements
12461     to always fail with ENOSYS.  Some functions are actually named
12462     something starting with __ and the normal name is an alias.  */
12463 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12464 choke me
12465 #else
12466 $ac_func();
12467 #endif
12468
12469 ; return 0; }
12470 EOF
12471 if { (eval echo configure:12472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12472   rm -rf conftest*
12473   eval "ac_cv_func_$ac_func=yes"
12474 else
12475   echo "configure: failed program was:" >&5
12476   cat conftest.$ac_ext >&5
12477   rm -rf conftest*
12478   eval "ac_cv_func_$ac_func=no"
12479 fi
12480 rm -f conftest*
12481 fi
12482
12483 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12484   echo "$ac_t""yes" 1>&6
12485     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12486   cat >> confdefs.h <<EOF
12487 #define $ac_tr_func 1
12488 EOF
12489  
12490 else
12491   echo "$ac_t""no" 1>&6
12492 fi
12493 done
12494
12495         echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6
12496 echo "configure:12497: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
12497 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then
12498   echo $ac_n "(cached) $ac_c" 1>&6
12499 else
12500   
12501         cat > conftest.$ac_ext <<EOF
12502 #line 12503 "configure"
12503 #include "confdefs.h"
12504
12505         #include <lber.h>
12506         #include <ldap.h>
12507 int main() {
12508 ldap_set_rebind_proc(0, 0, 0);
12509 ; return 0; }
12510 EOF
12511 if { (eval echo configure:12512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12512   rm -rf conftest*
12513   pam_ldap_cv_ldap_set_rebind_proc=3
12514 else
12515   echo "configure: failed program was:" >&5
12516   cat conftest.$ac_ext >&5
12517   rm -rf conftest*
12518   pam_ldap_cv_ldap_set_rebind_proc=2
12519 fi
12520 rm -f conftest* 
12521 fi
12522
12523 echo "$ac_t""$pam_ldap_cv_ldap_set_rebind_proc" 1>&6
12524         cat >> confdefs.h <<EOF
12525 #define LDAP_SET_REBIND_PROC_ARGS $pam_ldap_cv_ldap_set_rebind_proc
12526 EOF
12527
12528 fi
12529
12530 #################################################
12531 # check for automount support
12532 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12533 echo "configure:12534: checking whether to use AUTOMOUNT" >&5
12534 # Check whether --with-automount or --without-automount was given.
12535 if test "${with_automount+set}" = set; then
12536   withval="$with_automount"
12537    case "$withval" in
12538   yes)
12539     echo "$ac_t""yes" 1>&6
12540     cat >> confdefs.h <<\EOF
12541 #define WITH_AUTOMOUNT 1
12542 EOF
12543
12544     ;;
12545   *)
12546     echo "$ac_t""no" 1>&6
12547     ;;
12548   esac 
12549 else
12550   echo "$ac_t""no" 1>&6
12551
12552 fi
12553
12554
12555 #################################################
12556 # check for smbmount support
12557 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12558 echo "configure:12559: checking whether to use SMBMOUNT" >&5
12559 # Check whether --with-smbmount or --without-smbmount was given.
12560 if test "${with_smbmount+set}" = set; then
12561   withval="$with_smbmount"
12562    case "$withval" in
12563   yes)
12564         case "$host_os" in
12565         *linux*)
12566                 echo "$ac_t""yes" 1>&6
12567                 cat >> confdefs.h <<\EOF
12568 #define WITH_SMBMOUNT 1
12569 EOF
12570
12571                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12572                 ;;
12573         *)
12574                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12575                 ;;
12576         esac
12577     ;;
12578   *)
12579     echo "$ac_t""no" 1>&6
12580     MPROGS=
12581     ;;
12582   esac 
12583 else
12584   echo "$ac_t""no" 1>&6
12585   MPROGS=
12586
12587 fi
12588
12589
12590
12591 #################################################
12592 # check for a PAM clear-text auth, accounts, password and session support
12593 with_pam_for_crypt=no
12594 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12595 echo "configure:12596: checking whether to use PAM" >&5
12596 # Check whether --with-pam or --without-pam was given.
12597 if test "${with_pam+set}" = set; then
12598   withval="$with_pam"
12599    case "$withval" in
12600   yes)
12601     echo "$ac_t""yes" 1>&6
12602     cat >> confdefs.h <<\EOF
12603 #define WITH_PAM 1
12604 EOF
12605
12606     LIBS="$LIBS -lpam"
12607     with_pam_for_crypt=yes
12608     ;;
12609   *)
12610     echo "$ac_t""no" 1>&6
12611     ;;
12612   esac 
12613 else
12614   echo "$ac_t""no" 1>&6
12615
12616 fi
12617
12618
12619 # we can't build a pam module if we don't have pam.
12620 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12621 echo "configure:12622: checking for pam_get_data in -lpam" >&5
12622 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12623 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12624   echo $ac_n "(cached) $ac_c" 1>&6
12625 else
12626   ac_save_LIBS="$LIBS"
12627 LIBS="-lpam  $LIBS"
12628 cat > conftest.$ac_ext <<EOF
12629 #line 12630 "configure"
12630 #include "confdefs.h"
12631 /* Override any gcc2 internal prototype to avoid an error.  */
12632 /* We use char because int might match the return type of a gcc2
12633     builtin and then its argument prototype would still apply.  */
12634 char pam_get_data();
12635
12636 int main() {
12637 pam_get_data()
12638 ; return 0; }
12639 EOF
12640 if { (eval echo configure:12641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12641   rm -rf conftest*
12642   eval "ac_cv_lib_$ac_lib_var=yes"
12643 else
12644   echo "configure: failed program was:" >&5
12645   cat conftest.$ac_ext >&5
12646   rm -rf conftest*
12647   eval "ac_cv_lib_$ac_lib_var=no"
12648 fi
12649 rm -f conftest*
12650 LIBS="$ac_save_LIBS"
12651
12652 fi
12653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12654   echo "$ac_t""yes" 1>&6
12655   cat >> confdefs.h <<\EOF
12656 #define HAVE_LIBPAM 1
12657 EOF
12658
12659 else
12660   echo "$ac_t""no" 1>&6
12661 fi
12662
12663
12664 #################################################
12665 # check for pam_smbpass support
12666 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12667 echo "configure:12668: checking whether to use pam_smbpass" >&5
12668 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12669 if test "${with_pam_smbpass+set}" = set; then
12670   withval="$with_pam_smbpass"
12671    case "$withval" in
12672   yes)
12673     echo "$ac_t""yes" 1>&6
12674
12675 # Conditions under which pam_smbpass should not be built.
12676
12677        if test x$PICFLAG = x; then
12678           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12679           PAM_MOD=""
12680        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12681           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12682           PAM_MOD=""
12683        else
12684           PAM_MOD="bin/pam_smbpass.so"
12685        fi
12686     ;;
12687   *)
12688     echo "$ac_t""no" 1>&6
12689     ;;
12690   esac 
12691 else
12692   echo "$ac_t""no" 1>&6
12693
12694 fi
12695
12696
12697
12698 ###############################################
12699 # test for where we get crypt() from, but only
12700 # if not using PAM
12701 if test $with_pam_for_crypt = no; then
12702 for ac_func in crypt
12703 do
12704 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12705 echo "configure:12706: checking for $ac_func" >&5
12706 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12707   echo $ac_n "(cached) $ac_c" 1>&6
12708 else
12709   cat > conftest.$ac_ext <<EOF
12710 #line 12711 "configure"
12711 #include "confdefs.h"
12712 /* System header to define __stub macros and hopefully few prototypes,
12713     which can conflict with char $ac_func(); below.  */
12714 #include <assert.h>
12715 /* Override any gcc2 internal prototype to avoid an error.  */
12716 /* We use char because int might match the return type of a gcc2
12717     builtin and then its argument prototype would still apply.  */
12718 char $ac_func();
12719
12720 int main() {
12721
12722 /* The GNU C library defines this for functions which it implements
12723     to always fail with ENOSYS.  Some functions are actually named
12724     something starting with __ and the normal name is an alias.  */
12725 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12726 choke me
12727 #else
12728 $ac_func();
12729 #endif
12730
12731 ; return 0; }
12732 EOF
12733 if { (eval echo configure:12734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12734   rm -rf conftest*
12735   eval "ac_cv_func_$ac_func=yes"
12736 else
12737   echo "configure: failed program was:" >&5
12738   cat conftest.$ac_ext >&5
12739   rm -rf conftest*
12740   eval "ac_cv_func_$ac_func=no"
12741 fi
12742 rm -f conftest*
12743 fi
12744
12745 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12746   echo "$ac_t""yes" 1>&6
12747     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12748   cat >> confdefs.h <<EOF
12749 #define $ac_tr_func 1
12750 EOF
12751  
12752 else
12753   echo "$ac_t""no" 1>&6
12754 fi
12755 done
12756
12757 if test x"$ac_cv_func_crypt" = x"no"; then
12758     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12759 echo "configure:12760: checking for crypt in -lcrypt" >&5
12760 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12761 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12762   echo $ac_n "(cached) $ac_c" 1>&6
12763 else
12764   ac_save_LIBS="$LIBS"
12765 LIBS="-lcrypt  $LIBS"
12766 cat > conftest.$ac_ext <<EOF
12767 #line 12768 "configure"
12768 #include "confdefs.h"
12769 /* Override any gcc2 internal prototype to avoid an error.  */
12770 /* We use char because int might match the return type of a gcc2
12771     builtin and then its argument prototype would still apply.  */
12772 char crypt();
12773
12774 int main() {
12775 crypt()
12776 ; return 0; }
12777 EOF
12778 if { (eval echo configure:12779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12779   rm -rf conftest*
12780   eval "ac_cv_lib_$ac_lib_var=yes"
12781 else
12782   echo "configure: failed program was:" >&5
12783   cat conftest.$ac_ext >&5
12784   rm -rf conftest*
12785   eval "ac_cv_lib_$ac_lib_var=no"
12786 fi
12787 rm -f conftest*
12788 LIBS="$ac_save_LIBS"
12789
12790 fi
12791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12792   echo "$ac_t""yes" 1>&6
12793   LIBS="$LIBS -lcrypt";
12794         cat >> confdefs.h <<\EOF
12795 #define HAVE_CRYPT 1
12796 EOF
12797
12798 else
12799   echo "$ac_t""no" 1>&6
12800 fi
12801
12802 fi
12803 fi
12804
12805 ##
12806 ## moved after the check for -lcrypt in order to
12807 ## ensure that the necessary libraries are included
12808 ## check checking for truncated salt.  Wrapped by the
12809 ## $with_pam_for_crypt variable as above   --jerry
12810 ##
12811 if test $with_pam_for_crypt = no; then
12812 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12813 echo "configure:12814: checking for a crypt that needs truncated salt" >&5
12814 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12815   echo $ac_n "(cached) $ac_c" 1>&6
12816 else
12817   
12818 if test "$cross_compiling" = yes; then
12819   samba_cv_HAVE_TRUNCATED_SALT=cross
12820 else
12821   cat > conftest.$ac_ext <<EOF
12822 #line 12823 "configure"
12823 #include "confdefs.h"
12824 #include "${srcdir-.}/tests/crypttest.c"
12825 EOF
12826 if { (eval echo configure:12827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12827 then
12828   samba_cv_HAVE_TRUNCATED_SALT=no
12829 else
12830   echo "configure: failed program was:" >&5
12831   cat conftest.$ac_ext >&5
12832   rm -fr conftest*
12833   samba_cv_HAVE_TRUNCATED_SALT=yes
12834 fi
12835 rm -fr conftest*
12836 fi
12837
12838 fi
12839
12840 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12841 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12842         cat >> confdefs.h <<\EOF
12843 #define HAVE_TRUNCATED_SALT 1
12844 EOF
12845
12846 fi
12847 fi
12848
12849 # New experimental SAM system
12850
12851 echo $ac_n "checking whether to build the new (experimental) SAM database""... $ac_c" 1>&6
12852 echo "configure:12853: checking whether to build the new (experimental) SAM database" >&5
12853 # Check whether --with-sam or --without-sam was given.
12854 if test "${with_sam+set}" = set; then
12855   withval="$with_sam"
12856    case "$withval" in
12857   yes)
12858     echo "$ac_t""yes" 1>&6
12859     cat >> confdefs.h <<\EOF
12860 #define WITH_SAM 1
12861 EOF
12862
12863     ;;
12864   *)
12865     echo "$ac_t""no" 1>&6
12866     ;;
12867   esac 
12868 else
12869   echo "$ac_t""no" 1>&6
12870
12871 fi
12872
12873
12874
12875 ########################################################################################
12876 ##
12877 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12878 ##
12879 ########################################################################################
12880
12881 #################################################
12882 # check for a TDB password database
12883 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12884 echo "configure:12885: checking whether to use TDB SAM database" >&5
12885 # Check whether --with-tdbsam or --without-tdbsam was given.
12886 if test "${with_tdbsam+set}" = set; then
12887   withval="$with_tdbsam"
12888    case "$withval" in
12889   yes)
12890     echo "$ac_t""yes" 1>&6
12891     cat >> confdefs.h <<\EOF
12892 #define WITH_TDB_SAM 1
12893 EOF
12894
12895     ;;
12896   *)
12897     echo "$ac_t""no" 1>&6
12898     ;;
12899   esac 
12900 else
12901   echo "$ac_t""no" 1>&6
12902
12903 fi
12904
12905
12906 #################################################
12907 # check for a NISPLUS password database
12908 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12909 echo "configure:12910: checking whether to use NISPLUS SAM database" >&5
12910 # Check whether --with-nisplussam or --without-nisplussam was given.
12911 if test "${with_nisplussam+set}" = set; then
12912   withval="$with_nisplussam"
12913    case "$withval" in
12914   yes)
12915     echo "$ac_t""yes" 1>&6
12916     cat >> confdefs.h <<\EOF
12917 #define WITH_NISPLUS_SAM 1
12918 EOF
12919
12920     ;;
12921   *)
12922     echo "$ac_t""no" 1>&6
12923     ;;
12924   esac 
12925 else
12926   echo "$ac_t""no" 1>&6
12927
12928 fi
12929
12930
12931 ########################################################################################
12932 ##
12933 ## END OF TESTS FOR SAM BACKENDS.  
12934 ##
12935 ########################################################################################
12936
12937 #################################################
12938 # check for a NISPLUS_HOME support 
12939 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12940 echo "configure:12941: checking whether to use NISPLUS_HOME" >&5
12941 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12942 if test "${with_nisplus_home+set}" = set; then
12943   withval="$with_nisplus_home"
12944    case "$withval" in
12945   yes)
12946     echo "$ac_t""yes" 1>&6
12947     cat >> confdefs.h <<\EOF
12948 #define WITH_NISPLUS_HOME 1
12949 EOF
12950
12951     ;;
12952   *)
12953     echo "$ac_t""no" 1>&6
12954     ;;
12955   esac 
12956 else
12957   echo "$ac_t""no" 1>&6
12958
12959 fi
12960
12961
12962 #################################################
12963 # check for syslog logging
12964 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12965 echo "configure:12966: checking whether to use syslog logging" >&5
12966 # Check whether --with-syslog or --without-syslog was given.
12967 if test "${with_syslog+set}" = set; then
12968   withval="$with_syslog"
12969    case "$withval" in
12970   yes)
12971     echo "$ac_t""yes" 1>&6
12972     cat >> confdefs.h <<\EOF
12973 #define WITH_SYSLOG 1
12974 EOF
12975
12976     ;;
12977   *)
12978     echo "$ac_t""no" 1>&6
12979     ;;
12980   esac 
12981 else
12982   echo "$ac_t""no" 1>&6
12983
12984 fi
12985
12986
12987 #################################################
12988 # check for a shared memory profiling support
12989 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12990 echo "configure:12991: checking whether to use profiling" >&5
12991 # Check whether --with-profiling-data or --without-profiling-data was given.
12992 if test "${with_profiling_data+set}" = set; then
12993   withval="$with_profiling_data"
12994    case "$withval" in
12995   yes)
12996     echo "$ac_t""yes" 1>&6
12997     cat >> confdefs.h <<\EOF
12998 #define WITH_PROFILE 1
12999 EOF
13000
13001     ;;
13002   *)
13003     echo "$ac_t""no" 1>&6
13004     ;;
13005   esac 
13006 else
13007   echo "$ac_t""no" 1>&6
13008
13009 fi
13010
13011
13012
13013 #################################################
13014 # check for experimental disk-quotas support
13015 QUOTAOBJS=smbd/noquotas.o
13016
13017 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
13018 echo "configure:13019: checking whether to support disk-quotas" >&5
13019 # Check whether --with-quotas or --without-quotas was given.
13020 if test "${with_quotas+set}" = set; then
13021   withval="$with_quotas"
13022    case "$withval" in
13023   yes)
13024     echo "$ac_t""yes" 1>&6
13025     case "$host_os" in
13026       *linux*)
13027         # Check for kernel 2.4.x quota braindamage...
13028         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
13029 echo "configure:13030: checking for linux 2.4.x quota braindamage.." >&5
13030 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
13031   echo $ac_n "(cached) $ac_c" 1>&6
13032 else
13033   
13034         cat > conftest.$ac_ext <<EOF
13035 #line 13036 "configure"
13036 #include "confdefs.h"
13037 #include <stdio.h>
13038 #include <sys/types.h>
13039 #include <asm/types.h>
13040 #include <linux/quota.h>
13041 #include <mntent.h>
13042 #include <linux/unistd.h>
13043 int main() {
13044 struct mem_dqblk D;
13045 ; return 0; }
13046 EOF
13047 if { (eval echo configure:13048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13048   rm -rf conftest*
13049   samba_cv_linux_2_4_quota_braindamage=yes
13050 else
13051   echo "configure: failed program was:" >&5
13052   cat conftest.$ac_ext >&5
13053   rm -rf conftest*
13054   samba_cv_linux_2_4_quota_braindamage=no
13055 fi
13056 rm -f conftest*
13057 fi
13058
13059 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
13060 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
13061         cat >> confdefs.h <<\EOF
13062 #define LINUX_QUOTAS_2 1
13063 EOF
13064
13065 else
13066         cat >> confdefs.h <<\EOF
13067 #define LINUX_QUOTAS_1 1
13068 EOF
13069
13070 fi
13071         ;;
13072       *)
13073         ;;
13074     esac
13075     QUOTAOBJS=smbd/quotas.o
13076     cat >> confdefs.h <<\EOF
13077 #define WITH_QUOTAS 1
13078 EOF
13079
13080     ;;
13081   *)
13082     echo "$ac_t""no" 1>&6
13083     ;;
13084   esac 
13085 else
13086   echo "$ac_t""no" 1>&6
13087
13088 fi
13089
13090
13091
13092 #################################################
13093 # check for experimental utmp accounting
13094
13095 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
13096 echo "configure:13097: checking whether to support utmp accounting" >&5
13097 # Check whether --with-utmp or --without-utmp was given.
13098 if test "${with_utmp+set}" = set; then
13099   withval="$with_utmp"
13100    case "$withval" in
13101   yes)
13102     echo "$ac_t""yes" 1>&6
13103     cat >> confdefs.h <<\EOF
13104 #define WITH_UTMP 1
13105 EOF
13106
13107     ;;
13108   *)
13109     echo "$ac_t""no" 1>&6
13110     ;;
13111   esac 
13112 else
13113   echo "$ac_t""no" 1>&6
13114
13115 fi
13116
13117
13118 #################################################
13119 # choose native language(s) of man pages
13120 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13121 echo "configure:13122: checking chosen man pages' language(s)" >&5
13122 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13123 if test "${with_manpages_langs+set}" = set; then
13124   withval="$with_manpages_langs"
13125    case "$withval" in
13126   yes|no)
13127     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13128     manlangs="en"
13129   ;;
13130   *)
13131     manlangs="$withval"
13132   ;;
13133   esac
13134
13135   echo "$ac_t""$manlangs" 1>&6
13136   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
13137   
13138 else
13139   manlangs="en"
13140   echo "$ac_t""$manlangs" 1>&6
13141   
13142
13143 fi
13144
13145
13146 #################################################
13147 # should we build libsmbclient?
13148
13149 LIBSMBCLIENT_SHARED=
13150 LIBSMBCLIENT=
13151 echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
13152 echo "configure:13153: checking whether to build the libsmbclient shared library" >&5
13153 # Check whether --with-libsmbclient or --without-libsmbclient was given.
13154 if test "${with_libsmbclient+set}" = set; then
13155   withval="$with_libsmbclient"
13156    case "$withval" in
13157   no) 
13158      echo "$ac_t""no" 1>&6
13159      ;;
13160   *)
13161      if test $BLDSHARED = true; then
13162         LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
13163         LIBSMBCLIENT=libsmbclient
13164         echo "$ac_t""yes" 1>&6
13165      else
13166         echo "$ac_t""no shared library support" 1>&6
13167      fi
13168      ;;
13169   esac 
13170 else
13171   echo "$ac_t""yes" 1>&6
13172
13173 fi
13174
13175
13176
13177 #################################################
13178 # these tests are taken from the GNU fileutils package
13179 echo "checking how to get filesystem space usage" 1>&6
13180 echo "configure:13181: checking how to get filesystem space usage" >&5
13181 space=no
13182
13183 # Test for statvfs64.
13184 if test $space = no; then
13185   # SVR4
13186   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13187 echo "configure:13188: checking statvfs64 function (SVR4)" >&5
13188 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13189   echo $ac_n "(cached) $ac_c" 1>&6
13190 else
13191   if test "$cross_compiling" = yes; then
13192   fu_cv_sys_stat_statvfs64=cross
13193 else
13194   cat > conftest.$ac_ext <<EOF
13195 #line 13196 "configure"
13196 #include "confdefs.h"
13197
13198 #if defined(HAVE_UNISTD_H)
13199 #include <unistd.h>
13200 #endif
13201 #include <sys/types.h>
13202 #include <sys/statvfs.h>
13203   main ()
13204   {
13205     struct statvfs64 fsd;
13206     exit (statvfs64 (".", &fsd));
13207   }
13208 EOF
13209 if { (eval echo configure:13210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13210 then
13211   fu_cv_sys_stat_statvfs64=yes
13212 else
13213   echo "configure: failed program was:" >&5
13214   cat conftest.$ac_ext >&5
13215   rm -fr conftest*
13216   fu_cv_sys_stat_statvfs64=no
13217 fi
13218 rm -fr conftest*
13219 fi
13220
13221 fi
13222
13223 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13224   if test $fu_cv_sys_stat_statvfs64 = yes; then
13225     space=yes
13226     cat >> confdefs.h <<\EOF
13227 #define STAT_STATVFS64 1
13228 EOF
13229
13230   fi
13231 fi
13232
13233 # Perform only the link test since it seems there are no variants of the
13234 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13235 # because that got a false positive on SCO OSR5.  Adding the declaration
13236 # of a `struct statvfs' causes this test to fail (as it should) on such
13237 # systems.  That system is reported to work fine with STAT_STATFS4 which
13238 # is what it gets when this test fails.
13239 if test $space = no; then
13240   # SVR4
13241   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13242 echo "configure:13243: checking statvfs function (SVR4)" >&5
13243 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13244   echo $ac_n "(cached) $ac_c" 1>&6
13245 else
13246   cat > conftest.$ac_ext <<EOF
13247 #line 13248 "configure"
13248 #include "confdefs.h"
13249 #include <sys/types.h>
13250 #include <sys/statvfs.h>
13251 int main() {
13252 struct statvfs fsd; statvfs (0, &fsd);
13253 ; return 0; }
13254 EOF
13255 if { (eval echo configure:13256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13256   rm -rf conftest*
13257   fu_cv_sys_stat_statvfs=yes
13258 else
13259   echo "configure: failed program was:" >&5
13260   cat conftest.$ac_ext >&5
13261   rm -rf conftest*
13262   fu_cv_sys_stat_statvfs=no
13263 fi
13264 rm -f conftest*
13265 fi
13266
13267 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13268   if test $fu_cv_sys_stat_statvfs = yes; then
13269     space=yes
13270     cat >> confdefs.h <<\EOF
13271 #define STAT_STATVFS 1
13272 EOF
13273
13274   fi
13275 fi
13276
13277 if test $space = no; then
13278   # DEC Alpha running OSF/1
13279   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13280 echo "configure:13281: checking for 3-argument statfs function (DEC OSF/1)" >&5
13281   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13282   echo $ac_n "(cached) $ac_c" 1>&6
13283 else
13284   if test "$cross_compiling" = yes; then
13285   fu_cv_sys_stat_statfs3_osf1=no
13286 else
13287   cat > conftest.$ac_ext <<EOF
13288 #line 13289 "configure"
13289 #include "confdefs.h"
13290
13291 #include <sys/param.h>
13292 #include <sys/types.h>
13293 #include <sys/mount.h>
13294   main ()
13295   {
13296     struct statfs fsd;
13297     fsd.f_fsize = 0;
13298     exit (statfs (".", &fsd, sizeof (struct statfs)));
13299   }
13300 EOF
13301 if { (eval echo configure:13302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13302 then
13303   fu_cv_sys_stat_statfs3_osf1=yes
13304 else
13305   echo "configure: failed program was:" >&5
13306   cat conftest.$ac_ext >&5
13307   rm -fr conftest*
13308   fu_cv_sys_stat_statfs3_osf1=no
13309 fi
13310 rm -fr conftest*
13311 fi
13312
13313 fi
13314
13315   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13316   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13317     space=yes
13318     cat >> confdefs.h <<\EOF
13319 #define STAT_STATFS3_OSF1 1
13320 EOF
13321
13322   fi
13323 fi
13324
13325 if test $space = no; then
13326 # AIX
13327   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13328 echo "configure:13329: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13329   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13330   echo $ac_n "(cached) $ac_c" 1>&6
13331 else
13332   if test "$cross_compiling" = yes; then
13333   fu_cv_sys_stat_statfs2_bsize=no
13334 else
13335   cat > conftest.$ac_ext <<EOF
13336 #line 13337 "configure"
13337 #include "confdefs.h"
13338
13339 #ifdef HAVE_SYS_PARAM_H
13340 #include <sys/param.h>
13341 #endif
13342 #ifdef HAVE_SYS_MOUNT_H
13343 #include <sys/mount.h>
13344 #endif
13345 #ifdef HAVE_SYS_VFS_H
13346 #include <sys/vfs.h>
13347 #endif
13348   main ()
13349   {
13350   struct statfs fsd;
13351   fsd.f_bsize = 0;
13352   exit (statfs (".", &fsd));
13353   }
13354 EOF
13355 if { (eval echo configure:13356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13356 then
13357   fu_cv_sys_stat_statfs2_bsize=yes
13358 else
13359   echo "configure: failed program was:" >&5
13360   cat conftest.$ac_ext >&5
13361   rm -fr conftest*
13362   fu_cv_sys_stat_statfs2_bsize=no
13363 fi
13364 rm -fr conftest*
13365 fi
13366
13367 fi
13368
13369   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13370   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13371     space=yes
13372     cat >> confdefs.h <<\EOF
13373 #define STAT_STATFS2_BSIZE 1
13374 EOF
13375
13376   fi
13377 fi
13378
13379 if test $space = no; then
13380 # SVR3
13381   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13382 echo "configure:13383: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13383   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13384   echo $ac_n "(cached) $ac_c" 1>&6
13385 else
13386   if test "$cross_compiling" = yes; then
13387   fu_cv_sys_stat_statfs4=no
13388 else
13389   cat > conftest.$ac_ext <<EOF
13390 #line 13391 "configure"
13391 #include "confdefs.h"
13392 #include <sys/types.h>
13393 #include <sys/statfs.h>
13394   main ()
13395   {
13396   struct statfs fsd;
13397   exit (statfs (".", &fsd, sizeof fsd, 0));
13398   }
13399 EOF
13400 if { (eval echo configure:13401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13401 then
13402   fu_cv_sys_stat_statfs4=yes
13403 else
13404   echo "configure: failed program was:" >&5
13405   cat conftest.$ac_ext >&5
13406   rm -fr conftest*
13407   fu_cv_sys_stat_statfs4=no
13408 fi
13409 rm -fr conftest*
13410 fi
13411
13412 fi
13413
13414   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13415   if test $fu_cv_sys_stat_statfs4 = yes; then
13416     space=yes
13417     cat >> confdefs.h <<\EOF
13418 #define STAT_STATFS4 1
13419 EOF
13420
13421   fi
13422 fi
13423
13424 if test $space = no; then
13425 # 4.4BSD and NetBSD
13426   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13427 echo "configure:13428: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13428   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13429   echo $ac_n "(cached) $ac_c" 1>&6
13430 else
13431   if test "$cross_compiling" = yes; then
13432   fu_cv_sys_stat_statfs2_fsize=no
13433 else
13434   cat > conftest.$ac_ext <<EOF
13435 #line 13436 "configure"
13436 #include "confdefs.h"
13437 #include <sys/types.h>
13438 #ifdef HAVE_SYS_PARAM_H
13439 #include <sys/param.h>
13440 #endif
13441 #ifdef HAVE_SYS_MOUNT_H
13442 #include <sys/mount.h>
13443 #endif
13444   main ()
13445   {
13446   struct statfs fsd;
13447   fsd.f_fsize = 0;
13448   exit (statfs (".", &fsd));
13449   }
13450 EOF
13451 if { (eval echo configure:13452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13452 then
13453   fu_cv_sys_stat_statfs2_fsize=yes
13454 else
13455   echo "configure: failed program was:" >&5
13456   cat conftest.$ac_ext >&5
13457   rm -fr conftest*
13458   fu_cv_sys_stat_statfs2_fsize=no
13459 fi
13460 rm -fr conftest*
13461 fi
13462
13463 fi
13464
13465   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13466   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13467     space=yes
13468     cat >> confdefs.h <<\EOF
13469 #define STAT_STATFS2_FSIZE 1
13470 EOF
13471
13472   fi
13473 fi
13474
13475 if test $space = no; then
13476   # Ultrix
13477   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13478 echo "configure:13479: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13479   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13480   echo $ac_n "(cached) $ac_c" 1>&6
13481 else
13482   if test "$cross_compiling" = yes; then
13483   fu_cv_sys_stat_fs_data=no
13484 else
13485   cat > conftest.$ac_ext <<EOF
13486 #line 13487 "configure"
13487 #include "confdefs.h"
13488 #include <sys/types.h>
13489 #ifdef HAVE_SYS_PARAM_H
13490 #include <sys/param.h>
13491 #endif
13492 #ifdef HAVE_SYS_MOUNT_H
13493 #include <sys/mount.h>
13494 #endif
13495 #ifdef HAVE_SYS_FS_TYPES_H
13496 #include <sys/fs_types.h>
13497 #endif
13498   main ()
13499   {
13500   struct fs_data fsd;
13501   /* Ultrix's statfs returns 1 for success,
13502      0 for not mounted, -1 for failure.  */
13503   exit (statfs (".", &fsd) != 1);
13504   }
13505 EOF
13506 if { (eval echo configure:13507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13507 then
13508   fu_cv_sys_stat_fs_data=yes
13509 else
13510   echo "configure: failed program was:" >&5
13511   cat conftest.$ac_ext >&5
13512   rm -fr conftest*
13513   fu_cv_sys_stat_fs_data=no
13514 fi
13515 rm -fr conftest*
13516 fi
13517
13518 fi
13519
13520   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13521   if test $fu_cv_sys_stat_fs_data = yes; then
13522     space=yes
13523     cat >> confdefs.h <<\EOF
13524 #define STAT_STATFS2_FS_DATA 1
13525 EOF
13526
13527   fi
13528 fi
13529
13530 #
13531 # As a gating factor for large file support, in order to
13532 # use <4GB files we must have the following minimal support
13533 # available.
13534 # long long, and a 64 bit off_t or off64_t.
13535 # If we don't have all of these then disable large
13536 # file support.
13537 #
13538 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13539 echo "configure:13540: checking if large file support can be enabled" >&5
13540 cat > conftest.$ac_ext <<EOF
13541 #line 13542 "configure"
13542 #include "confdefs.h"
13543
13544 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13545 #include <sys/types.h>
13546 #else
13547 __COMPILE_ERROR_
13548 #endif
13549
13550 int main() {
13551 int i
13552 ; return 0; }
13553 EOF
13554 if { (eval echo configure:13555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13555   rm -rf conftest*
13556   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13557 else
13558   echo "configure: failed program was:" >&5
13559   cat conftest.$ac_ext >&5
13560   rm -rf conftest*
13561   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13562 fi
13563 rm -f conftest*
13564 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13565     cat >> confdefs.h <<\EOF
13566 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13567 EOF
13568
13569 fi
13570 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13571
13572 # Check whether --with-spinlocks or --without-spinlocks was given.
13573 if test "${with_spinlocks+set}" = set; then
13574   withval="$with_spinlocks"
13575   :
13576 fi
13577
13578 if test "x$with_spinlocks" = "xyes"; then
13579     cat >> confdefs.h <<\EOF
13580 #define USE_SPINLOCKS 1
13581 EOF
13582
13583
13584     case "$host_cpu" in
13585         sparc)
13586             cat >> confdefs.h <<\EOF
13587 #define SPARC_SPINLOCKS 1
13588 EOF
13589
13590             ;;
13591
13592         i386|i486|i586|i686)
13593             cat >> confdefs.h <<\EOF
13594 #define INTEL_SPINLOCKS 1
13595 EOF
13596
13597             ;;
13598
13599         mips)
13600             cat >> confdefs.h <<\EOF
13601 #define MIPS_SPINLOCKS 1
13602 EOF
13603
13604             ;;
13605
13606         powerpc)
13607             cat >> confdefs.h <<\EOF
13608 #define POWERPC_SPINLOCKS 1
13609 EOF
13610
13611             ;;
13612     esac
13613 fi
13614
13615 #################################################
13616 # check for ACL support
13617
13618 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13619 echo "configure:13620: checking whether to support ACLs" >&5
13620 # Check whether --with-acl-support or --without-acl-support was given.
13621 if test "${with_acl_support+set}" = set; then
13622   withval="$with_acl_support"
13623    case "$withval" in
13624   yes)
13625
13626         case "$host_os" in
13627         *sysv5*)
13628                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13629                 cat >> confdefs.h <<\EOF
13630 #define HAVE_UNIXWARE_ACLS 1
13631 EOF
13632
13633                 ;;
13634         *solaris*)
13635                 echo "$ac_t""Using solaris ACLs" 1>&6
13636                 cat >> confdefs.h <<\EOF
13637 #define HAVE_SOLARIS_ACLS 1
13638 EOF
13639
13640                 ;;
13641         *hpux*)
13642                 echo "$ac_t""Using HPUX ACLs" 1>&6
13643                 cat >> confdefs.h <<\EOF
13644 #define HAVE_HPUX_ACLS 1
13645 EOF
13646
13647                 ;;
13648         *irix*)
13649                 echo "$ac_t""Using IRIX ACLs" 1>&6
13650                 cat >> confdefs.h <<\EOF
13651 #define HAVE_IRIX_ACLS 1
13652 EOF
13653
13654                 ;;
13655         *aix*)
13656                 echo "$ac_t""Using AIX ACLs" 1>&6
13657                 cat >> confdefs.h <<\EOF
13658 #define HAVE_AIX_ACLS 1
13659 EOF
13660
13661                 ;;
13662         *osf*)
13663                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13664                 cat >> confdefs.h <<\EOF
13665 #define HAVE_TRU64_ACLS 1
13666 EOF
13667
13668                 LIBS="$LIBS -lpacl"
13669                 ;;
13670         *)
13671                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13672 echo "configure:13673: checking for acl_get_file in -lacl" >&5
13673 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13674 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13675   echo $ac_n "(cached) $ac_c" 1>&6
13676 else
13677   ac_save_LIBS="$LIBS"
13678 LIBS="-lacl  $LIBS"
13679 cat > conftest.$ac_ext <<EOF
13680 #line 13681 "configure"
13681 #include "confdefs.h"
13682 /* Override any gcc2 internal prototype to avoid an error.  */
13683 /* We use char because int might match the return type of a gcc2
13684     builtin and then its argument prototype would still apply.  */
13685 char acl_get_file();
13686
13687 int main() {
13688 acl_get_file()
13689 ; return 0; }
13690 EOF
13691 if { (eval echo configure:13692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13692   rm -rf conftest*
13693   eval "ac_cv_lib_$ac_lib_var=yes"
13694 else
13695   echo "configure: failed program was:" >&5
13696   cat conftest.$ac_ext >&5
13697   rm -rf conftest*
13698   eval "ac_cv_lib_$ac_lib_var=no"
13699 fi
13700 rm -f conftest*
13701 LIBS="$ac_save_LIBS"
13702
13703 fi
13704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13705   echo "$ac_t""yes" 1>&6
13706     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13707     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13708   cat >> confdefs.h <<EOF
13709 #define $ac_tr_lib 1
13710 EOF
13711
13712   LIBS="-lacl $LIBS"
13713
13714 else
13715   echo "$ac_t""no" 1>&6
13716 fi
13717
13718                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13719 echo "configure:13720: checking for ACL support" >&5
13720 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13721   echo $ac_n "(cached) $ac_c" 1>&6
13722 else
13723   
13724                 cat > conftest.$ac_ext <<EOF
13725 #line 13726 "configure"
13726 #include "confdefs.h"
13727 #include <sys/types.h>
13728 #include <sys/acl.h>
13729 int main() {
13730  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13731 ; return 0; }
13732 EOF
13733 if { (eval echo configure:13734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13734   rm -rf conftest*
13735   samba_cv_HAVE_POSIX_ACLS=yes
13736 else
13737   echo "configure: failed program was:" >&5
13738   cat conftest.$ac_ext >&5
13739   rm -rf conftest*
13740   samba_cv_HAVE_POSIX_ACLS=no
13741 fi
13742 rm -f conftest*
13743 fi
13744
13745 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13746                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13747                                 echo "$ac_t""Using posix ACLs" 1>&6
13748                                 cat >> confdefs.h <<\EOF
13749 #define HAVE_POSIX_ACLS 1
13750 EOF
13751
13752                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13753 echo "configure:13754: checking for acl_get_perm_np" >&5
13754 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13755   echo $ac_n "(cached) $ac_c" 1>&6
13756 else
13757   
13758                                 cat > conftest.$ac_ext <<EOF
13759 #line 13760 "configure"
13760 #include "confdefs.h"
13761 #include <sys/types.h>
13762 #include <sys/acl.h>
13763 int main() {
13764  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13765 ; return 0; }
13766 EOF
13767 if { (eval echo configure:13768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13768   rm -rf conftest*
13769   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13770 else
13771   echo "configure: failed program was:" >&5
13772   cat conftest.$ac_ext >&5
13773   rm -rf conftest*
13774   samba_cv_HAVE_ACL_GET_PERM_NP=no
13775 fi
13776 rm -f conftest*
13777 fi
13778
13779 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13780                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13781                                         cat >> confdefs.h <<\EOF
13782 #define HAVE_ACL_GET_PERM_NP 1
13783 EOF
13784
13785                                 fi
13786                         fi
13787             ;;
13788         esac
13789         ;;
13790   *)
13791     echo "$ac_t""no" 1>&6
13792     cat >> confdefs.h <<\EOF
13793 #define HAVE_NO_ACLS 1
13794 EOF
13795
13796     ;;
13797   esac 
13798 else
13799   cat >> confdefs.h <<\EOF
13800 #define HAVE_NO_ACLS 1
13801 EOF
13802
13803   echo "$ac_t""no" 1>&6
13804
13805 fi
13806
13807
13808 #################################################
13809 # check for sendfile support
13810
13811 echo $ac_n "checking whether to support sendfile""... $ac_c" 1>&6
13812 echo "configure:13813: checking whether to support sendfile" >&5
13813 # Check whether --with-sendfile-support or --without-sendfile-support was given.
13814 if test "${with_sendfile_support+set}" = set; then
13815   withval="$with_sendfile_support"
13816    case "$withval" in
13817   yes)
13818
13819         case "$host_os" in
13820         *linux*)
13821                 echo $ac_n "checking for sendfile64 support""... $ac_c" 1>&6
13822 echo "configure:13823: checking for sendfile64 support" >&5
13823 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then
13824   echo $ac_n "(cached) $ac_c" 1>&6
13825 else
13826   
13827                 cat > conftest.$ac_ext <<EOF
13828 #line 13829 "configure"
13829 #include "confdefs.h"
13830 #include <sys/sendfile.h>
13831 int main() {
13832 \
13833 int tofd, fromfd;
13834 off64_t offset;
13835 size_t total;
13836 ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total);
13837
13838 ; return 0; }
13839 EOF
13840 if { (eval echo configure:13841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13841   rm -rf conftest*
13842   samba_cv_HAVE_SENDFILE64=yes
13843 else
13844   echo "configure: failed program was:" >&5
13845   cat conftest.$ac_ext >&5
13846   rm -rf conftest*
13847   samba_cv_HAVE_SENDFILE64=no
13848 fi
13849 rm -f conftest*
13850 fi
13851
13852 echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6
13853
13854                 echo $ac_n "checking for sendfile support""... $ac_c" 1>&6
13855 echo "configure:13856: checking for sendfile support" >&5
13856 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
13857   echo $ac_n "(cached) $ac_c" 1>&6
13858 else
13859   
13860                 cat > conftest.$ac_ext <<EOF
13861 #line 13862 "configure"
13862 #include "confdefs.h"
13863 #include <sys/sendfile.h>
13864 int main() {
13865 \
13866 int tofd, fromfd;
13867 off_t offset;
13868 size_t total;
13869 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
13870
13871 ; return 0; }
13872 EOF
13873 if { (eval echo configure:13874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13874   rm -rf conftest*
13875   samba_cv_HAVE_SENDFILE=yes
13876 else
13877   echo "configure: failed program was:" >&5
13878   cat conftest.$ac_ext >&5
13879   rm -rf conftest*
13880   samba_cv_HAVE_SENDFILE=no
13881 fi
13882 rm -f conftest*
13883 fi
13884
13885 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
13886
13887 # Try and cope with broken Linux sendfile....
13888                 echo $ac_n "checking for broken linux sendfile support""... $ac_c" 1>&6
13889 echo "configure:13890: checking for broken linux sendfile support" >&5
13890 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_LINUX_SENDFILE'+set}'`\" = set"; then
13891   echo $ac_n "(cached) $ac_c" 1>&6
13892 else
13893   
13894                 cat > conftest.$ac_ext <<EOF
13895 #line 13896 "configure"
13896 #include "confdefs.h"
13897 \
13898 #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
13899 #undef _FILE_OFFSET_BITS
13900 #endif
13901 #include <sys/sendfile.h>
13902 int main() {
13903 \
13904 int tofd, fromfd;
13905 off_t offset;
13906 size_t total;
13907 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
13908
13909 ; return 0; }
13910 EOF
13911 if { (eval echo configure:13912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13912   rm -rf conftest*
13913   samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes
13914 else
13915   echo "configure: failed program was:" >&5
13916   cat conftest.$ac_ext >&5
13917   rm -rf conftest*
13918   samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no
13919 fi
13920 rm -f conftest*
13921 fi
13922
13923 echo "$ac_t""$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" 1>&6
13924
13925         if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then
13926                 cat >> confdefs.h <<\EOF
13927 #define HAVE_SENDFILE64 1
13928 EOF
13929
13930                 cat >> confdefs.h <<\EOF
13931 #define LINUX_SENDFILE_API 1
13932 EOF
13933
13934                 cat >> confdefs.h <<\EOF
13935 #define WITH_SENDFILE 1
13936 EOF
13937
13938         elif test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
13939                 cat >> confdefs.h <<\EOF
13940 #define HAVE_SENDFILE 1
13941 EOF
13942
13943                 cat >> confdefs.h <<\EOF
13944 #define LINUX_SENDFILE_API 1
13945 EOF
13946
13947                 cat >> confdefs.h <<\EOF
13948 #define WITH_SENDFILE 1
13949 EOF
13950
13951         elif test x"$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" = x"yes"; then
13952                 cat >> confdefs.h <<\EOF
13953 #define LINUX_BROKEN_SENDFILE_API 1
13954 EOF
13955
13956                 cat >> confdefs.h <<\EOF
13957 #define WITH_SENDFILE 1
13958 EOF
13959
13960         else
13961                 echo "$ac_t""no" 1>&6;
13962         fi
13963
13964         ;;
13965         *)
13966         ;;
13967         esac
13968         ;;
13969   *)
13970     echo "$ac_t""no" 1>&6
13971     ;;
13972   esac 
13973 else
13974   echo "$ac_t""no" 1>&6
13975
13976 fi
13977
13978
13979
13980 #################################################
13981 # Check whether winbind is supported on this platform.  If so we need to
13982 # build and install client programs (WINBIND_TARGETS), sbin programs
13983 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13984
13985 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13986 echo "configure:13987: checking whether to build winbind" >&5
13987
13988 # Initially, the value of $host_os decides whether winbind is supported
13989
13990 case "$host_os" in
13991         *linux*|*irix*)
13992                 HAVE_WINBIND=yes
13993                 ;;
13994         *solaris*)
13995                 HAVE_WINBIND=yes
13996                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13997                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
13998                 ;;
13999         *hpux11*)
14000                 HAVE_WINBIND=yes
14001                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
14002                 ;;
14003         *)
14004                 HAVE_WINBIND=no
14005                 winbind_no_reason=", unsupported on $host_os"
14006                 ;;
14007 esac
14008
14009 # Check the setting of --with-winbindd
14010
14011 # Check whether --with-winbind or --without-winbind was given.
14012 if test "${with_winbind+set}" = set; then
14013   withval="$with_winbind"
14014    
14015   case "$withval" in
14016         yes)
14017                 HAVE_WINBIND=yes
14018                 ;;
14019         no)
14020                 HAVE_WINBIND=no
14021                 winbind_reason=""
14022                 ;;
14023   esac 
14024 fi
14025
14026
14027 # We need unix domain sockets for winbind
14028
14029 if test x"$HAVE_WINBIND" = x"yes"; then
14030         if test x"$samba_cv_unixsocket" = x"no"; then
14031                 winbind_no_reason=", no unix domain socket support on $host_os"
14032                 HAVE_WINBIND=no
14033         fi
14034 fi
14035
14036 # Display test results
14037
14038 WINBIND_TARGETS=""
14039 WINBIND_STARGETS=""
14040 WINBIND_LTARGETS=""
14041 WINBIND_PAM_PROGS=""
14042
14043 if test x"$HAVE_WINBIND" = x"yes"; then
14044         echo "$ac_t""yes" 1>&6
14045         cat >> confdefs.h <<\EOF
14046 #define WITH_WINBIND 1
14047 EOF
14048
14049
14050         WINBIND_TARGETS="bin/wbinfo"
14051         WINBIND_STARGETS="bin/winbindd"
14052         if test x"$BLDSHARED" = x"true"; then
14053                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
14054                 if test x"$with_pam" = x"yes"; then
14055                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
14056                 fi
14057         fi
14058 else
14059         echo "$ac_t""no$winbind_no_reason" 1>&6
14060 fi
14061
14062
14063 # Substitution time!
14064
14065
14066
14067
14068
14069
14070
14071
14072 # Solaris has some extra fields in struct passwd that need to be
14073 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
14074 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
14075 # this. 
14076
14077 #AC_CHECK_MEMBER(struct passwd.pw_comment,
14078 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
14079 #               [#include <pwd.h>])
14080
14081 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
14082 echo "configure:14083: checking whether struct passwd has pw_comment" >&5
14083 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
14084   echo $ac_n "(cached) $ac_c" 1>&6
14085 else
14086   
14087     cat > conftest.$ac_ext <<EOF
14088 #line 14089 "configure"
14089 #include "confdefs.h"
14090 #include <pwd.h>
14091 int main() {
14092 struct passwd p; p.pw_comment;
14093 ; return 0; }
14094 EOF
14095 if { (eval echo configure:14096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14096   rm -rf conftest*
14097   samba_cv_passwd_pw_comment=yes
14098 else
14099   echo "configure: failed program was:" >&5
14100   cat conftest.$ac_ext >&5
14101   rm -rf conftest*
14102   samba_cv_passwd_pw_comment=no
14103 fi
14104 rm -f conftest*
14105 fi
14106
14107 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
14108 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
14109    cat >> confdefs.h <<\EOF
14110 #define HAVE_PASSWD_PW_COMMENT 1
14111 EOF
14112
14113 fi
14114
14115 #AC_CHECK_MEMBER(struct passwd.pw_age,
14116 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
14117 #               [#include <pwd.h>])
14118
14119 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
14120 echo "configure:14121: checking whether struct passwd has pw_age" >&5
14121 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
14122   echo $ac_n "(cached) $ac_c" 1>&6
14123 else
14124   
14125     cat > conftest.$ac_ext <<EOF
14126 #line 14127 "configure"
14127 #include "confdefs.h"
14128 #include <pwd.h>
14129 int main() {
14130 struct passwd p; p.pw_age;
14131 ; return 0; }
14132 EOF
14133 if { (eval echo configure:14134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14134   rm -rf conftest*
14135   samba_cv_passwd_pw_age=yes
14136 else
14137   echo "configure: failed program was:" >&5
14138   cat conftest.$ac_ext >&5
14139   rm -rf conftest*
14140   samba_cv_passwd_pw_age=no
14141 fi
14142 rm -f conftest*
14143 fi
14144
14145 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
14146 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
14147    cat >> confdefs.h <<\EOF
14148 #define HAVE_PASSWD_PW_AGE 1
14149 EOF
14150
14151 fi
14152
14153 #################################################
14154 # Check to see if we should use the included popt 
14155
14156 # Check whether --with-included-popt or --without-included-popt was given.
14157 if test "${with_included_popt+set}" = set; then
14158   withval="$with_included_popt"
14159    
14160   case "$withval" in
14161         yes)
14162                 INCLUDED_POPT=yes
14163                 ;;
14164         no)
14165                 INCLUDED_POPT=no
14166                 ;;
14167   esac 
14168 fi
14169
14170 if test x"$INCLUDED_POPT" != x"yes"; then
14171     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
14172 echo "configure:14173: checking for poptGetContext in -lpopt" >&5
14173 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
14174 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14175   echo $ac_n "(cached) $ac_c" 1>&6
14176 else
14177   ac_save_LIBS="$LIBS"
14178 LIBS="-lpopt  $LIBS"
14179 cat > conftest.$ac_ext <<EOF
14180 #line 14181 "configure"
14181 #include "confdefs.h"
14182 /* Override any gcc2 internal prototype to avoid an error.  */
14183 /* We use char because int might match the return type of a gcc2
14184     builtin and then its argument prototype would still apply.  */
14185 char poptGetContext();
14186
14187 int main() {
14188 poptGetContext()
14189 ; return 0; }
14190 EOF
14191 if { (eval echo configure:14192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14192   rm -rf conftest*
14193   eval "ac_cv_lib_$ac_lib_var=yes"
14194 else
14195   echo "configure: failed program was:" >&5
14196   cat conftest.$ac_ext >&5
14197   rm -rf conftest*
14198   eval "ac_cv_lib_$ac_lib_var=no"
14199 fi
14200 rm -f conftest*
14201 LIBS="$ac_save_LIBS"
14202
14203 fi
14204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14205   echo "$ac_t""yes" 1>&6
14206   INCLUDED_POPT=no
14207 else
14208   echo "$ac_t""no" 1>&6
14209 INCLUDED_POPT=yes
14210 fi
14211
14212 fi
14213
14214 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
14215 echo "configure:14216: checking whether to use included popt" >&5
14216 if test x"$INCLUDED_POPT" = x"yes"; then
14217     echo "$ac_t""yes" 1>&6
14218     BUILD_POPT='$(POPT_OBJS)'
14219     FLAGS1="-I$srcdir/popt"
14220 else
14221     echo "$ac_t""no" 1>&6
14222     LIBS="$LIBS -lpopt"
14223 fi
14224
14225
14226
14227 #################################################
14228 # Check if the user wants Python
14229
14230 # At the moment, you can use this to set which Python binary to link
14231 # against.  (Libraries built for Python2.2 can't be used by 2.1,
14232 # though they can coexist in different directories.)  In the future
14233 # this might make the Python stuff be built by default.
14234
14235 # Check whether --with-python or --without-python was given.
14236 if test "${with_python+set}" = set; then
14237   withval="$with_python"
14238    PYTHON=${withval-python} 
14239 fi
14240
14241
14242
14243 #################################################
14244 # do extra things if we are running insure
14245
14246 if test "${ac_cv_prog_CC}" = "insure"; then
14247         CPPFLAGS="$CPPFLAGS -D__INSURE__"
14248 fi
14249
14250 #################################################
14251 # final configure stuff
14252
14253 echo $ac_n "checking configure summary""... $ac_c" 1>&6
14254 echo "configure:14255: checking configure summary" >&5
14255 if test "$cross_compiling" = yes; then
14256   echo "configure: warning: cannot run when cross-compiling" 1>&2
14257 else
14258   cat > conftest.$ac_ext <<EOF
14259 #line 14260 "configure"
14260 #include "confdefs.h"
14261 #include "${srcdir-.}/tests/summary.c"
14262 EOF
14263 if { (eval echo configure:14264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14264 then
14265   echo "$ac_t""yes" 1>&6
14266 else
14267   echo "configure: failed program was:" >&5
14268   cat conftest.$ac_ext >&5
14269   rm -fr conftest*
14270   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
14271 fi
14272 rm -fr conftest*
14273 fi
14274
14275
14276 builddir=`pwd`
14277
14278
14279 # I added make files that are outside /source directory.
14280 # I know this is not a good solution, will work out a better
14281 # solution soon.                        --simo
14282 trap '' 1 2 15
14283 cat > confcache <<\EOF
14284 # This file is a shell script that caches the results of configure
14285 # tests run on this system so they can be shared between configure
14286 # scripts and configure runs.  It is not useful on other systems.
14287 # If it contains results you don't want to keep, you may remove or edit it.
14288 #
14289 # By default, configure uses ./config.cache as the cache file,
14290 # creating it if it does not exist already.  You can give configure
14291 # the --cache-file=FILE option to use a different cache file; that is
14292 # what configure does when it calls configure scripts in
14293 # subdirectories, so they share the cache.
14294 # Giving --cache-file=/dev/null disables caching, for debugging configure.
14295 # config.status only pays attention to the cache file if you give it the
14296 # --recheck option to rerun configure.
14297 #
14298 EOF
14299 # The following way of writing the cache mishandles newlines in values,
14300 # but we know of no workaround that is simple, portable, and efficient.
14301 # So, don't put newlines in cache variables' values.
14302 # Ultrix sh set writes to stderr and can't be redirected directly,
14303 # and sets the high bit in the cache file unless we assign to the vars.
14304 (set) 2>&1 |
14305   case `(ac_space=' '; set | grep ac_space) 2>&1` in
14306   *ac_space=\ *)
14307     # `set' does not quote correctly, so add quotes (double-quote substitution
14308     # turns \\\\ into \\, and sed turns \\ into \).
14309     sed -n \
14310       -e "s/'/'\\\\''/g" \
14311       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
14312     ;;
14313   *)
14314     # `set' quotes correctly as required by POSIX, so do not add quotes.
14315     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
14316     ;;
14317   esac >> confcache
14318 if cmp -s $cache_file confcache; then
14319   :
14320 else
14321   if test -w $cache_file; then
14322     echo "updating cache $cache_file"
14323     cat confcache > $cache_file
14324   else
14325     echo "not updating unwritable cache $cache_file"
14326   fi
14327 fi
14328 rm -f confcache
14329
14330 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14331
14332 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14333 # Let make expand exec_prefix.
14334 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14335
14336 # Any assignment to VPATH causes Sun make to only execute
14337 # the first set of double-colon rules, so remove it if not needed.
14338 # If there is a colon in the path, we need to keep it.
14339 if test "x$srcdir" = x.; then
14340   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14341 fi
14342
14343 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14344
14345 DEFS=-DHAVE_CONFIG_H
14346
14347 # Without the "./", some shells look in PATH for config.status.
14348 : ${CONFIG_STATUS=./config.status}
14349
14350 echo creating $CONFIG_STATUS
14351 rm -f $CONFIG_STATUS
14352 cat > $CONFIG_STATUS <<EOF
14353 #! /bin/sh
14354 # Generated automatically by configure.
14355 # Run this file to recreate the current configuration.
14356 # This directory was configured as follows,
14357 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14358 #
14359 # $0 $ac_configure_args
14360 #
14361 # Compiler output produced by configure, useful for debugging
14362 # configure, is in ./config.log if it exists.
14363
14364 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14365 for ac_option
14366 do
14367   case "\$ac_option" in
14368   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14369     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14370     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14371   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14372     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14373     exit 0 ;;
14374   -help | --help | --hel | --he | --h)
14375     echo "\$ac_cs_usage"; exit 0 ;;
14376   *) echo "\$ac_cs_usage"; exit 1 ;;
14377   esac
14378 done
14379
14380 ac_given_srcdir=$srcdir
14381 ac_given_INSTALL="$INSTALL"
14382
14383 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
14384 EOF
14385 cat >> $CONFIG_STATUS <<EOF
14386
14387 # Protect against being on the right side of a sed subst in config.status.
14388 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14389  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14390 $ac_vpsub
14391 $extrasub
14392 s%@SHELL@%$SHELL%g
14393 s%@CFLAGS@%$CFLAGS%g
14394 s%@CPPFLAGS@%$CPPFLAGS%g
14395 s%@CXXFLAGS@%$CXXFLAGS%g
14396 s%@FFLAGS@%$FFLAGS%g
14397 s%@DEFS@%$DEFS%g
14398 s%@LDFLAGS@%$LDFLAGS%g
14399 s%@LIBS@%$LIBS%g
14400 s%@exec_prefix@%$exec_prefix%g
14401 s%@prefix@%$prefix%g
14402 s%@program_transform_name@%$program_transform_name%g
14403 s%@bindir@%$bindir%g
14404 s%@sbindir@%$sbindir%g
14405 s%@libexecdir@%$libexecdir%g
14406 s%@datadir@%$datadir%g
14407 s%@sysconfdir@%$sysconfdir%g
14408 s%@sharedstatedir@%$sharedstatedir%g
14409 s%@localstatedir@%$localstatedir%g
14410 s%@libdir@%$libdir%g
14411 s%@includedir@%$includedir%g
14412 s%@oldincludedir@%$oldincludedir%g
14413 s%@infodir@%$infodir%g
14414 s%@mandir@%$mandir%g
14415 s%@configdir@%$configdir%g
14416 s%@lockdir@%$lockdir%g
14417 s%@piddir@%$piddir%g
14418 s%@logfilebase@%$logfilebase%g
14419 s%@privatedir@%$privatedir%g
14420 s%@swatdir@%$swatdir%g
14421 s%@RUNPROG@%$RUNPROG%g
14422 s%@MPROGS@%$MPROGS%g
14423 s%@LDSHFLAGS@%$LDSHFLAGS%g
14424 s%@SONAMEFLAG@%$SONAMEFLAG%g
14425 s%@SHLD@%$SHLD%g
14426 s%@HOST_OS@%$HOST_OS%g
14427 s%@PAM_MOD@%$PAM_MOD%g
14428 s%@WRAP@%$WRAP%g
14429 s%@WRAP32@%$WRAP32%g
14430 s%@WRAPPROG@%$WRAPPROG%g
14431 s%@PICFLAG@%$PICFLAG%g
14432 s%@PICSUFFIX@%$PICSUFFIX%g
14433 s%@POBAD_CC@%$POBAD_CC%g
14434 s%@SHLIBEXT@%$SHLIBEXT%g
14435 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14436 s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g
14437 s%@PRINTLIBS@%$PRINTLIBS%g
14438 s%@CC@%$CC%g
14439 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14440 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14441 s%@INSTALL_DATA@%$INSTALL_DATA%g
14442 s%@AWK@%$AWK%g
14443 s%@BROKEN_CC@%$BROKEN_CC%g
14444 s%@host@%$host%g
14445 s%@host_alias@%$host_alias%g
14446 s%@host_cpu@%$host_cpu%g
14447 s%@host_vendor@%$host_vendor%g
14448 s%@host_os@%$host_os%g
14449 s%@target@%$target%g
14450 s%@target_alias@%$target_alias%g
14451 s%@target_cpu@%$target_cpu%g
14452 s%@target_vendor@%$target_vendor%g
14453 s%@target_os@%$target_os%g
14454 s%@build@%$build%g
14455 s%@build_alias@%$build_alias%g
14456 s%@build_cpu@%$build_cpu%g
14457 s%@build_vendor@%$build_vendor%g
14458 s%@build_os@%$build_os%g
14459 s%@CPP@%$CPP%g
14460 s%@CUPS_CONFIG@%$CUPS_CONFIG%g
14461 s%@LIBOBJS@%$LIBOBJS%g
14462 s%@TERMLIBS@%$TERMLIBS%g
14463 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14464 s%@ROFF@%$ROFF%g
14465 s%@DYNEXP@%$DYNEXP%g
14466 s%@QUOTAOBJS@%$QUOTAOBJS%g
14467 s%@manlangs@%$manlangs%g
14468 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14469 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14470 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14471 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
14472 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
14473 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
14474 s%@BUILD_POPT@%$BUILD_POPT%g
14475 s%@FLAGS1@%$FLAGS1%g
14476 s%@PYTHON@%$PYTHON%g
14477 s%@builddir@%$builddir%g
14478
14479 CEOF
14480 EOF
14481
14482 cat >> $CONFIG_STATUS <<\EOF
14483
14484 # Split the substitutions into bite-sized pieces for seds with
14485 # small command number limits, like on Digital OSF/1 and HP-UX.
14486 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14487 ac_file=1 # Number of current file.
14488 ac_beg=1 # First line for current file.
14489 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14490 ac_more_lines=:
14491 ac_sed_cmds=""
14492 while $ac_more_lines; do
14493   if test $ac_beg -gt 1; then
14494     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14495   else
14496     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14497   fi
14498   if test ! -s conftest.s$ac_file; then
14499     ac_more_lines=false
14500     rm -f conftest.s$ac_file
14501   else
14502     if test -z "$ac_sed_cmds"; then
14503       ac_sed_cmds="sed -f conftest.s$ac_file"
14504     else
14505       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14506     fi
14507     ac_file=`expr $ac_file + 1`
14508     ac_beg=$ac_end
14509     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14510   fi
14511 done
14512 if test -z "$ac_sed_cmds"; then
14513   ac_sed_cmds=cat
14514 fi
14515 EOF
14516
14517 cat >> $CONFIG_STATUS <<EOF
14518
14519 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/pdb/mysql/Makefile ../examples/pdb/xml/Makefile ../examples/sam/Makefile"}
14520 EOF
14521 cat >> $CONFIG_STATUS <<\EOF
14522 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14523   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14524   case "$ac_file" in
14525   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14526        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14527   *) ac_file_in="${ac_file}.in" ;;
14528   esac
14529
14530   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14531
14532   # Remove last slash and all that follows it.  Not all systems have dirname.
14533   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14534   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14535     # The file is in a subdirectory.
14536     test ! -d "$ac_dir" && mkdir "$ac_dir"
14537     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14538     # A "../" for each directory in $ac_dir_suffix.
14539     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14540   else
14541     ac_dir_suffix= ac_dots=
14542   fi
14543
14544   case "$ac_given_srcdir" in
14545   .)  srcdir=.
14546       if test -z "$ac_dots"; then top_srcdir=.
14547       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14548   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14549   *) # Relative path.
14550     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14551     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14552   esac
14553
14554   case "$ac_given_INSTALL" in
14555   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14556   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14557   esac
14558
14559   echo creating "$ac_file"
14560   rm -f "$ac_file"
14561   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14562   case "$ac_file" in
14563   *Makefile*) ac_comsub="1i\\
14564 # $configure_input" ;;
14565   *) ac_comsub= ;;
14566   esac
14567
14568   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14569   sed -e "$ac_comsub
14570 s%@configure_input@%$configure_input%g
14571 s%@srcdir@%$srcdir%g
14572 s%@top_srcdir@%$top_srcdir%g
14573 s%@INSTALL@%$INSTALL%g
14574 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14575 fi; done
14576 rm -f conftest.s*
14577
14578 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14579 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14580 #
14581 # ac_d sets the value in "#define NAME VALUE" lines.
14582 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14583 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14584 ac_dC='\3'
14585 ac_dD='%g'
14586 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14587 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14588 ac_uB='\([      ]\)%\1#\2define\3'
14589 ac_uC=' '
14590 ac_uD='\4%g'
14591 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14592 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14593 ac_eB='$%\1#\2define\3'
14594 ac_eC=' '
14595 ac_eD='%g'
14596
14597 if test "${CONFIG_HEADERS+set}" != set; then
14598 EOF
14599 cat >> $CONFIG_STATUS <<EOF
14600   CONFIG_HEADERS="include/config.h"
14601 EOF
14602 cat >> $CONFIG_STATUS <<\EOF
14603 fi
14604 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14605   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14606   case "$ac_file" in
14607   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14608        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14609   *) ac_file_in="${ac_file}.in" ;;
14610   esac
14611
14612   echo creating $ac_file
14613
14614   rm -f conftest.frag conftest.in conftest.out
14615   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14616   cat $ac_file_inputs > conftest.in
14617
14618 EOF
14619
14620 # Transform confdefs.h into a sed script conftest.vals that substitutes
14621 # the proper values into config.h.in to produce config.h.  And first:
14622 # Protect against being on the right side of a sed subst in config.status.
14623 # Protect against being in an unquoted here document in config.status.
14624 rm -f conftest.vals
14625 cat > conftest.hdr <<\EOF
14626 s/[\\&%]/\\&/g
14627 s%[\\$`]%\\&%g
14628 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14629 s%ac_d%ac_u%gp
14630 s%ac_u%ac_e%gp
14631 EOF
14632 sed -n -f conftest.hdr confdefs.h > conftest.vals
14633 rm -f conftest.hdr
14634
14635 # This sed command replaces #undef with comments.  This is necessary, for
14636 # example, in the case of _POSIX_SOURCE, which is predefined and required
14637 # on some systems where configure will not decide to define it.
14638 cat >> conftest.vals <<\EOF
14639 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14640 EOF
14641
14642 # Break up conftest.vals because some shells have a limit on
14643 # the size of here documents, and old seds have small limits too.
14644
14645 rm -f conftest.tail
14646 while :
14647 do
14648   ac_lines=`grep -c . conftest.vals`
14649   # grep -c gives empty output for an empty file on some AIX systems.
14650   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14651   # Write a limited-size here document to conftest.frag.
14652   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14653   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14654   echo 'CEOF
14655   sed -f conftest.frag conftest.in > conftest.out
14656   rm -f conftest.in
14657   mv conftest.out conftest.in
14658 ' >> $CONFIG_STATUS
14659   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14660   rm -f conftest.vals
14661   mv conftest.tail conftest.vals
14662 done
14663 rm -f conftest.vals
14664
14665 cat >> $CONFIG_STATUS <<\EOF
14666   rm -f conftest.frag conftest.h
14667   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14668   cat conftest.in >> conftest.h
14669   rm -f conftest.in
14670   if cmp -s $ac_file conftest.h 2>/dev/null; then
14671     echo "$ac_file is unchanged"
14672     rm -f conftest.h
14673   else
14674     # Remove last slash and all that follows it.  Not all systems have dirname.
14675       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14676       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14677       # The file is in a subdirectory.
14678       test ! -d "$ac_dir" && mkdir "$ac_dir"
14679     fi
14680     rm -f $ac_file
14681     mv conftest.h $ac_file
14682   fi
14683 fi; done
14684
14685 EOF
14686 cat >> $CONFIG_STATUS <<EOF
14687
14688 EOF
14689 cat >> $CONFIG_STATUS <<\EOF
14690
14691 exit 0
14692 EOF
14693 chmod +x $CONFIG_STATUS
14694 rm -fr confdefs* $ac_clean_files
14695 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14696
14697
14698 #################################################
14699 # Print very concise instructions on building/use
14700 if test "x$enable_dmalloc" = xyes
14701 then
14702         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14703         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14704 fi