Detect and use syslog.h or sys/syslog.h corretly. Fixes lack of prototype for
[ira/wip.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --with-fhs              Use FHS-compliant paths (default=no)"
17 ac_help="$ac_help
18   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
19 ac_help="$ac_help
20   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
21 ac_help="$ac_help
22   --with-piddir=DIR       Where to put pid files ($ac_default_prefix/var/locks)"
23 ac_help="$ac_help
24   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
25 ac_help="$ac_help
26   --with-configdir=DIR    Where to put configuration files (\$libdir)"
27 ac_help="$ac_help
28   --with-logfilebase=DIR  Where to put log files (\$(VARDIR))"
29 ac_help="$ac_help
30   --enable-debug          Turn on compiler debugging information (default=no)"
31 ac_help="$ac_help
32   --enable-developer      Turn on developer warnings and debugging (default=no)"
33 ac_help="$ac_help
34   --enable-krb5developer  Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)"
35 ac_help="$ac_help
36   --enable-dmalloc        Enable heap debugging [default=no]"
37 ac_help="$ac_help
38   --enable-cups           Turn on CUPS support (default=auto)"
39 ac_help="$ac_help
40   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
41 ac_help="$ac_help
42   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
43 ac_help="$ac_help
44   --with-smbwrapper       Include SMB wrapper support (default=no) "
45 ac_help="$ac_help
46   --with-afs              Include AFS clear-text auth support (default=no) "
47 ac_help="$ac_help
48   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
49 ac_help="$ac_help
50   --with-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-winbind          Build winbind (default, if supported by OS)"
85 ac_help="$ac_help
86   --with-included-popt    use bundled popt library, not from system"
87
88 # Initialize some variables set by options.
89 # The variables have the same names as the options, with
90 # dashes changed to underlines.
91 build=NONE
92 cache_file=./config.cache
93 exec_prefix=NONE
94 host=NONE
95 no_create=
96 nonopt=NONE
97 no_recursion=
98 prefix=NONE
99 program_prefix=NONE
100 program_suffix=NONE
101 program_transform_name=s,x,x,
102 silent=
103 site=
104 srcdir=
105 target=NONE
106 verbose=
107 x_includes=NONE
108 x_libraries=NONE
109 bindir='${exec_prefix}/bin'
110 sbindir='${exec_prefix}/sbin'
111 libexecdir='${exec_prefix}/libexec'
112 datadir='${prefix}/share'
113 sysconfdir='${prefix}/etc'
114 sharedstatedir='${prefix}/com'
115 localstatedir='${prefix}/var'
116 libdir='${exec_prefix}/lib'
117 includedir='${prefix}/include'
118 oldincludedir='/usr/include'
119 infodir='${prefix}/info'
120 mandir='${prefix}/man'
121
122 # Initialize some other variables.
123 subdirs=
124 MFLAGS= MAKEFLAGS=
125 SHELL=${CONFIG_SHELL-/bin/sh}
126 # Maximum number of lines to put in a shell here document.
127 ac_max_here_lines=12
128
129 ac_prev=
130 for ac_option
131 do
132
133   # If the previous option needs an argument, assign it.
134   if test -n "$ac_prev"; then
135     eval "$ac_prev=\$ac_option"
136     ac_prev=
137     continue
138   fi
139
140   case "$ac_option" in
141   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
142   *) ac_optarg= ;;
143   esac
144
145   # Accept the important Cygnus configure options, so we can diagnose typos.
146
147   case "$ac_option" in
148
149   -bindir | --bindir | --bindi | --bind | --bin | --bi)
150     ac_prev=bindir ;;
151   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
152     bindir="$ac_optarg" ;;
153
154   -build | --build | --buil | --bui | --bu)
155     ac_prev=build ;;
156   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
157     build="$ac_optarg" ;;
158
159   -cache-file | --cache-file | --cache-fil | --cache-fi \
160   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
161     ac_prev=cache_file ;;
162   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
163   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
164     cache_file="$ac_optarg" ;;
165
166   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
167     ac_prev=datadir ;;
168   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
169   | --da=*)
170     datadir="$ac_optarg" ;;
171
172   -disable-* | --disable-*)
173     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
174     # Reject names that are not valid shell variable names.
175     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
176       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
177     fi
178     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
179     eval "enable_${ac_feature}=no" ;;
180
181   -enable-* | --enable-*)
182     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
183     # Reject names that are not valid shell variable names.
184     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
185       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
186     fi
187     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
188     case "$ac_option" in
189       *=*) ;;
190       *) ac_optarg=yes ;;
191     esac
192     eval "enable_${ac_feature}='$ac_optarg'" ;;
193
194   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
195   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
196   | --exec | --exe | --ex)
197     ac_prev=exec_prefix ;;
198   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
199   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
200   | --exec=* | --exe=* | --ex=*)
201     exec_prefix="$ac_optarg" ;;
202
203   -gas | --gas | --ga | --g)
204     # Obsolete; use --with-gas.
205     with_gas=yes ;;
206
207   -help | --help | --hel | --he)
208     # Omit some internal or obsolete options to make the list less imposing.
209     # This message is too long to be a string in the A/UX 3.1 sh.
210     cat << EOF
211 Usage: configure [options] [host]
212 Options: [defaults in brackets after descriptions]
213 Configuration:
214   --cache-file=FILE       cache test results in FILE
215   --help                  print this message
216   --no-create             do not create output files
217   --quiet, --silent       do not print \`checking...' messages
218   --version               print the version of autoconf that created configure
219 Directory and file names:
220   --prefix=PREFIX         install architecture-independent files in PREFIX
221                           [$ac_default_prefix]
222   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
223                           [same as prefix]
224   --bindir=DIR            user executables in DIR [EPREFIX/bin]
225   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
226   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
227   --datadir=DIR           read-only architecture-independent data in DIR
228                           [PREFIX/share]
229   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
230   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
231                           [PREFIX/com]
232   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
233   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
234   --includedir=DIR        C header files in DIR [PREFIX/include]
235   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
236   --infodir=DIR           info documentation in DIR [PREFIX/info]
237   --mandir=DIR            man documentation in DIR [PREFIX/man]
238   --srcdir=DIR            find the sources in DIR [configure dir or ..]
239   --program-prefix=PREFIX prepend PREFIX to installed program names
240   --program-suffix=SUFFIX append SUFFIX to installed program names
241   --program-transform-name=PROGRAM
242                           run sed PROGRAM on installed program names
243 EOF
244     cat << EOF
245 Host type:
246   --build=BUILD           configure for building on BUILD [BUILD=HOST]
247   --host=HOST             configure for HOST [guessed]
248   --target=TARGET         configure for TARGET [TARGET=HOST]
249 Features and packages:
250   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
251   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
252   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
253   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
254   --x-includes=DIR        X include files are in DIR
255   --x-libraries=DIR       X library files are in DIR
256 EOF
257     if test -n "$ac_help"; then
258       echo "--enable and --with options recognized:$ac_help"
259     fi
260     exit 0 ;;
261
262   -host | --host | --hos | --ho)
263     ac_prev=host ;;
264   -host=* | --host=* | --hos=* | --ho=*)
265     host="$ac_optarg" ;;
266
267   -includedir | --includedir | --includedi | --included | --include \
268   | --includ | --inclu | --incl | --inc)
269     ac_prev=includedir ;;
270   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
271   | --includ=* | --inclu=* | --incl=* | --inc=*)
272     includedir="$ac_optarg" ;;
273
274   -infodir | --infodir | --infodi | --infod | --info | --inf)
275     ac_prev=infodir ;;
276   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
277     infodir="$ac_optarg" ;;
278
279   -libdir | --libdir | --libdi | --libd)
280     ac_prev=libdir ;;
281   -libdir=* | --libdir=* | --libdi=* | --libd=*)
282     libdir="$ac_optarg" ;;
283
284   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
285   | --libexe | --libex | --libe)
286     ac_prev=libexecdir ;;
287   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
288   | --libexe=* | --libex=* | --libe=*)
289     libexecdir="$ac_optarg" ;;
290
291   -localstatedir | --localstatedir | --localstatedi | --localstated \
292   | --localstate | --localstat | --localsta | --localst \
293   | --locals | --local | --loca | --loc | --lo)
294     ac_prev=localstatedir ;;
295   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
296   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
297   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
298     localstatedir="$ac_optarg" ;;
299
300   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
301     ac_prev=mandir ;;
302   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
303     mandir="$ac_optarg" ;;
304
305   -nfp | --nfp | --nf)
306     # Obsolete; use --without-fp.
307     with_fp=no ;;
308
309   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
310   | --no-cr | --no-c)
311     no_create=yes ;;
312
313   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
314   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
315     no_recursion=yes ;;
316
317   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
318   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
319   | --oldin | --oldi | --old | --ol | --o)
320     ac_prev=oldincludedir ;;
321   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
322   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
323   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
324     oldincludedir="$ac_optarg" ;;
325
326   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
327     ac_prev=prefix ;;
328   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
329     prefix="$ac_optarg" ;;
330
331   -program-prefix | --program-prefix | --program-prefi | --program-pref \
332   | --program-pre | --program-pr | --program-p)
333     ac_prev=program_prefix ;;
334   -program-prefix=* | --program-prefix=* | --program-prefi=* \
335   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
336     program_prefix="$ac_optarg" ;;
337
338   -program-suffix | --program-suffix | --program-suffi | --program-suff \
339   | --program-suf | --program-su | --program-s)
340     ac_prev=program_suffix ;;
341   -program-suffix=* | --program-suffix=* | --program-suffi=* \
342   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
343     program_suffix="$ac_optarg" ;;
344
345   -program-transform-name | --program-transform-name \
346   | --program-transform-nam | --program-transform-na \
347   | --program-transform-n | --program-transform- \
348   | --program-transform | --program-transfor \
349   | --program-transfo | --program-transf \
350   | --program-trans | --program-tran \
351   | --progr-tra | --program-tr | --program-t)
352     ac_prev=program_transform_name ;;
353   -program-transform-name=* | --program-transform-name=* \
354   | --program-transform-nam=* | --program-transform-na=* \
355   | --program-transform-n=* | --program-transform-=* \
356   | --program-transform=* | --program-transfor=* \
357   | --program-transfo=* | --program-transf=* \
358   | --program-trans=* | --program-tran=* \
359   | --progr-tra=* | --program-tr=* | --program-t=*)
360     program_transform_name="$ac_optarg" ;;
361
362   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
363   | -silent | --silent | --silen | --sile | --sil)
364     silent=yes ;;
365
366   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
367     ac_prev=sbindir ;;
368   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
369   | --sbi=* | --sb=*)
370     sbindir="$ac_optarg" ;;
371
372   -sharedstatedir | --sharedstatedir | --sharedstatedi \
373   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
374   | --sharedst | --shareds | --shared | --share | --shar \
375   | --sha | --sh)
376     ac_prev=sharedstatedir ;;
377   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
378   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
379   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
380   | --sha=* | --sh=*)
381     sharedstatedir="$ac_optarg" ;;
382
383   -site | --site | --sit)
384     ac_prev=site ;;
385   -site=* | --site=* | --sit=*)
386     site="$ac_optarg" ;;
387
388   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
389     ac_prev=srcdir ;;
390   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
391     srcdir="$ac_optarg" ;;
392
393   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
394   | --syscon | --sysco | --sysc | --sys | --sy)
395     ac_prev=sysconfdir ;;
396   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
397   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
398     sysconfdir="$ac_optarg" ;;
399
400   -target | --target | --targe | --targ | --tar | --ta | --t)
401     ac_prev=target ;;
402   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
403     target="$ac_optarg" ;;
404
405   -v | -verbose | --verbose | --verbos | --verbo | --verb)
406     verbose=yes ;;
407
408   -version | --version | --versio | --versi | --vers)
409     echo "configure generated by autoconf version 2.13"
410     exit 0 ;;
411
412   -with-* | --with-*)
413     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
414     # Reject names that are not valid shell variable names.
415     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
416       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
417     fi
418     ac_package=`echo $ac_package| sed 's/-/_/g'`
419     case "$ac_option" in
420       *=*) ;;
421       *) ac_optarg=yes ;;
422     esac
423     eval "with_${ac_package}='$ac_optarg'" ;;
424
425   -without-* | --without-*)
426     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
427     # Reject names that are not valid shell variable names.
428     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
429       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
430     fi
431     ac_package=`echo $ac_package| sed 's/-/_/g'`
432     eval "with_${ac_package}=no" ;;
433
434   --x)
435     # Obsolete; use --with-x.
436     with_x=yes ;;
437
438   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
439   | --x-incl | --x-inc | --x-in | --x-i)
440     ac_prev=x_includes ;;
441   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
442   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
443     x_includes="$ac_optarg" ;;
444
445   -x-libraries | --x-libraries | --x-librarie | --x-librari \
446   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
447     ac_prev=x_libraries ;;
448   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
449   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
450     x_libraries="$ac_optarg" ;;
451
452   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
453     ;;
454
455   *)
456     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
457       echo "configure: warning: $ac_option: invalid host type" 1>&2
458     fi
459     if test "x$nonopt" != xNONE; then
460       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
461     fi
462     nonopt="$ac_option"
463     ;;
464
465   esac
466 done
467
468 if test -n "$ac_prev"; then
469   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
470 fi
471
472 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
473
474 # File descriptor usage:
475 # 0 standard input
476 # 1 file creation
477 # 2 errors and warnings
478 # 3 some systems may open it to /dev/tty
479 # 4 used on the Kubota Titan
480 # 6 checking for... messages and results
481 # 5 compiler messages saved in config.log
482 if test "$silent" = yes; then
483   exec 6>/dev/null
484 else
485   exec 6>&1
486 fi
487 exec 5>./config.log
488
489 echo "\
490 This file contains any messages produced by compilers while
491 running configure, to aid debugging if configure makes a mistake.
492 " 1>&5
493
494 # Strip out --no-create and --no-recursion so they do not pile up.
495 # Also quote any args containing shell metacharacters.
496 ac_configure_args=
497 for ac_arg
498 do
499   case "$ac_arg" in
500   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
501   | --no-cr | --no-c) ;;
502   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
503   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
504   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
505   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
506   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
507   esac
508 done
509
510 # NLS nuisances.
511 # Only set these to C if already set.  These must not be set unconditionally
512 # because not all systems understand e.g. LANG=C (notably SCO).
513 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
514 # Non-C LC_CTYPE values break the ctype check.
515 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
516 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
517 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
518 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
519
520 # confdefs.h avoids OS command line length limits that DEFS can exceed.
521 rm -rf conftest* confdefs.h
522 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
523 echo > confdefs.h
524
525 # A filename unique to this package, relative to the directory that
526 # configure is in, which we can look for to find out if srcdir is correct.
527 ac_unique_file=include/includes.h
528
529 # Find the source files, if location was not specified.
530 if test -z "$srcdir"; then
531   ac_srcdir_defaulted=yes
532   # Try the directory containing this script, then its parent.
533   ac_prog=$0
534   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
535   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
536   srcdir=$ac_confdir
537   if test ! -r $srcdir/$ac_unique_file; then
538     srcdir=..
539   fi
540 else
541   ac_srcdir_defaulted=no
542 fi
543 if test ! -r $srcdir/$ac_unique_file; then
544   if test "$ac_srcdir_defaulted" = yes; then
545     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
546   else
547     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
548   fi
549 fi
550 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
551
552 # Prefer explicitly selected file to automatically selected ones.
553 if test -z "$CONFIG_SITE"; then
554   if test "x$prefix" != xNONE; then
555     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
556   else
557     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
558   fi
559 fi
560 for ac_site_file in $CONFIG_SITE; do
561   if test -r "$ac_site_file"; then
562     echo "loading site script $ac_site_file"
563     . "$ac_site_file"
564   fi
565 done
566
567 if test -r "$cache_file"; then
568   echo "loading cache $cache_file"
569   . $cache_file
570 else
571   echo "creating cache $cache_file"
572   > $cache_file
573 fi
574
575 ac_ext=c
576 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
577 ac_cpp='$CPP $CPPFLAGS'
578 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
579 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
580 cross_compiling=$ac_cv_prog_cc_cross
581
582 ac_exeext=
583 ac_objext=o
584 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
585   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
586   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
587     ac_n= ac_c='
588 ' ac_t='        '
589   else
590     ac_n=-n ac_c= ac_t=
591   fi
592 else
593   ac_n= ac_c='\c' ac_t=
594 fi
595
596
597
598
599 #################################################
600 # Directory handling stuff to support both the
601 # legacy SAMBA directories and FHS compliant
602 # ones...
603
604
605 # Check whether --with-fhs or --without-fhs was given.
606 if test "${with_fhs+set}" = set; then
607   withval="$with_fhs"
608   configdir="${sysconfdir}/samba"
609     lockdir="\${VARDIR}/cache/samba"
610     piddir="\$(VARDIR)/run/samba"
611     logfilebase="\${VARDIR}/log/samba"
612     privatedir="\${CONFIGDIR}/private"
613     swatdir="\${DATADIR}/samba/swat"
614 else
615   configdir="\$(LIBDIR)"
616     logfilebase="\$(VARDIR)"
617     lockdir="\${VARDIR}/locks"
618     piddir="\$(VARDIR)/locks"
619     privatedir="\${prefix}/private"
620     swatdir="\${prefix}/swat"
621 fi
622
623
624 #################################################
625 # set private directory location
626 # Check whether --with-privatedir or --without-privatedir was given.
627 if test "${with_privatedir+set}" = set; then
628   withval="$with_privatedir"
629    case "$withval" in
630   yes|no)
631   #
632   # Just in case anybody calls it without argument
633   #
634     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
635   ;;
636   * )
637     privatedir="$withval"
638     ;;
639   esac
640 fi
641
642
643 #################################################
644 # set lock directory location
645 # Check whether --with-lockdir or --without-lockdir was given.
646 if test "${with_lockdir+set}" = set; then
647   withval="$with_lockdir"
648    case "$withval" in
649   yes|no)
650   #
651   # Just in case anybody calls it without argument
652   #
653     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
654   ;;
655   * )
656     lockdir="$withval"
657     ;;
658   esac
659 fi
660
661
662 #################################################
663 # set pid directory location
664 # Check whether --with-piddir or --without-piddir was given.
665 if test "${with_piddir+set}" = set; then
666   withval="$with_piddir"
667    case "$withval" in
668   yes|no)
669   #
670   # Just in case anybody calls it without argument
671   #
672     echo "configure: warning: --with-piddir called without argument - will use default" 1>&2
673   ;;
674   * )
675     piddir="$withval"
676     ;;
677   esac
678 fi
679
680
681 #################################################
682 # set SWAT directory location
683 # Check whether --with-swatdir or --without-swatdir was given.
684 if test "${with_swatdir+set}" = set; then
685   withval="$with_swatdir"
686    case "$withval" in
687   yes|no)
688   #
689   # Just in case anybody does it
690   #
691     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
692   ;;
693   * )
694     swatdir="$withval"
695     ;;
696   esac
697 fi
698
699
700 #################################################
701 # set configuration directory location
702 # Check whether --with-configdir or --without-configdir was given.
703 if test "${with_configdir+set}" = set; then
704   withval="$with_configdir"
705    case "$withval" in
706   yes|no)
707   #
708   # Just in case anybody does it
709   #
710     echo "configure: warning: --with-configdir called without argument - will use default" 1>&2
711   ;;
712   * )
713     configdir="$withval"
714     ;;
715   esac
716 fi
717
718
719 #################################################
720 # set log directory location
721 # Check whether --with-logfilebase or --without-logfilebase was given.
722 if test "${with_logfilebase+set}" = set; then
723   withval="$with_logfilebase"
724    case "$withval" in
725   yes|no)
726   #
727   # Just in case anybody does it
728   #
729     echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2
730   ;;
731   * )
732     logfilebase="$withval"
733     ;;
734   esac
735 fi
736
737
738
739
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 # compile with optimization and without debugging by default
767 CFLAGS="-O ${CFLAGS}"
768
769 # Check whether --enable-debug or --disable-debug was given.
770 if test "${enable_debug+set}" = set; then
771   enableval="$enable_debug"
772   if eval "test x$enable_debug = xyes"; then
773         CFLAGS="${CFLAGS} -g"
774     fi
775 fi
776
777
778 # Check whether --enable-developer or --disable-developer was given.
779 if test "${enable_developer+set}" = set; then
780   enableval="$enable_developer"
781   if eval "test x$enable_developer = xyes"; then
782         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
783     fi
784 fi
785
786
787 # Check whether --enable-krb5developer or --disable-krb5developer was given.
788 if test "${enable_krb5developer+set}" = set; then
789   enableval="$enable_krb5developer"
790   if eval "test x$enable_krb5developer = xyes"; then
791         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
792     fi
793 fi
794
795
796 # Check whether --enable-dmalloc or --disable-dmalloc was given.
797 if test "${enable_dmalloc+set}" = set; then
798   enableval="$enable_dmalloc"
799   :
800 fi
801
802
803 if test "x$enable_dmalloc" = xyes
804 then
805         cat >> confdefs.h <<\EOF
806 #define ENABLE_DMALLOC 1
807 EOF
808
809         cat >> confdefs.h <<\EOF
810 #define DMALLOC_FUNC_CHECK 1
811 EOF
812
813         LIBS="$LIBS -ldmalloc"  
814 fi
815
816 # Extract the first word of "gcc", so it can be a program name with args.
817 set dummy gcc; ac_word=$2
818 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
819 echo "configure:820: checking for $ac_word" >&5
820 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
821   echo $ac_n "(cached) $ac_c" 1>&6
822 else
823   if test -n "$CC"; then
824   ac_cv_prog_CC="$CC" # Let the user override the test.
825 else
826   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
827   ac_dummy="$PATH"
828   for ac_dir in $ac_dummy; do
829     test -z "$ac_dir" && ac_dir=.
830     if test -f $ac_dir/$ac_word; then
831       ac_cv_prog_CC="gcc"
832       break
833     fi
834   done
835   IFS="$ac_save_ifs"
836 fi
837 fi
838 CC="$ac_cv_prog_CC"
839 if test -n "$CC"; then
840   echo "$ac_t""$CC" 1>&6
841 else
842   echo "$ac_t""no" 1>&6
843 fi
844
845 if test -z "$CC"; then
846   # Extract the first word of "cc", so it can be a program name with args.
847 set dummy cc; ac_word=$2
848 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
849 echo "configure:850: checking for $ac_word" >&5
850 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
851   echo $ac_n "(cached) $ac_c" 1>&6
852 else
853   if test -n "$CC"; then
854   ac_cv_prog_CC="$CC" # Let the user override the test.
855 else
856   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
857   ac_prog_rejected=no
858   ac_dummy="$PATH"
859   for ac_dir in $ac_dummy; do
860     test -z "$ac_dir" && ac_dir=.
861     if test -f $ac_dir/$ac_word; then
862       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
863         ac_prog_rejected=yes
864         continue
865       fi
866       ac_cv_prog_CC="cc"
867       break
868     fi
869   done
870   IFS="$ac_save_ifs"
871 if test $ac_prog_rejected = yes; then
872   # We found a bogon in the path, so make sure we never use it.
873   set dummy $ac_cv_prog_CC
874   shift
875   if test $# -gt 0; then
876     # We chose a different compiler from the bogus one.
877     # However, it has the same basename, so the bogon will be chosen
878     # first if we set CC to just the basename; use the full file name.
879     shift
880     set dummy "$ac_dir/$ac_word" "$@"
881     shift
882     ac_cv_prog_CC="$@"
883   fi
884 fi
885 fi
886 fi
887 CC="$ac_cv_prog_CC"
888 if test -n "$CC"; then
889   echo "$ac_t""$CC" 1>&6
890 else
891   echo "$ac_t""no" 1>&6
892 fi
893
894   if test -z "$CC"; then
895     case "`uname -s`" in
896     *win32* | *WIN32*)
897       # Extract the first word of "cl", so it can be a program name with args.
898 set dummy cl; ac_word=$2
899 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
900 echo "configure:901: checking for $ac_word" >&5
901 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
902   echo $ac_n "(cached) $ac_c" 1>&6
903 else
904   if test -n "$CC"; then
905   ac_cv_prog_CC="$CC" # Let the user override the test.
906 else
907   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
908   ac_dummy="$PATH"
909   for ac_dir in $ac_dummy; do
910     test -z "$ac_dir" && ac_dir=.
911     if test -f $ac_dir/$ac_word; then
912       ac_cv_prog_CC="cl"
913       break
914     fi
915   done
916   IFS="$ac_save_ifs"
917 fi
918 fi
919 CC="$ac_cv_prog_CC"
920 if test -n "$CC"; then
921   echo "$ac_t""$CC" 1>&6
922 else
923   echo "$ac_t""no" 1>&6
924 fi
925  ;;
926     esac
927   fi
928   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
929 fi
930
931 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
932 echo "configure:933: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
933
934 ac_ext=c
935 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
936 ac_cpp='$CPP $CPPFLAGS'
937 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
938 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
939 cross_compiling=$ac_cv_prog_cc_cross
940
941 cat > conftest.$ac_ext << EOF
942
943 #line 944 "configure"
944 #include "confdefs.h"
945
946 main(){return(0);}
947 EOF
948 if { (eval echo configure:949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
949   ac_cv_prog_cc_works=yes
950   # If we can't run a trivial program, we are probably using a cross compiler.
951   if (./conftest; exit) 2>/dev/null; then
952     ac_cv_prog_cc_cross=no
953   else
954     ac_cv_prog_cc_cross=yes
955   fi
956 else
957   echo "configure: failed program was:" >&5
958   cat conftest.$ac_ext >&5
959   ac_cv_prog_cc_works=no
960 fi
961 rm -fr conftest*
962 ac_ext=c
963 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
964 ac_cpp='$CPP $CPPFLAGS'
965 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
966 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
967 cross_compiling=$ac_cv_prog_cc_cross
968
969 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
970 if test $ac_cv_prog_cc_works = no; then
971   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
972 fi
973 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
974 echo "configure:975: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
975 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
976 cross_compiling=$ac_cv_prog_cc_cross
977
978 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
979 echo "configure:980: checking whether we are using GNU C" >&5
980 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
981   echo $ac_n "(cached) $ac_c" 1>&6
982 else
983   cat > conftest.c <<EOF
984 #ifdef __GNUC__
985   yes;
986 #endif
987 EOF
988 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
989   ac_cv_prog_gcc=yes
990 else
991   ac_cv_prog_gcc=no
992 fi
993 fi
994
995 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
996
997 if test $ac_cv_prog_gcc = yes; then
998   GCC=yes
999 else
1000   GCC=
1001 fi
1002
1003 ac_test_CFLAGS="${CFLAGS+set}"
1004 ac_save_CFLAGS="$CFLAGS"
1005 CFLAGS=
1006 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1007 echo "configure:1008: checking whether ${CC-cc} accepts -g" >&5
1008 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1009   echo $ac_n "(cached) $ac_c" 1>&6
1010 else
1011   echo 'void f(){}' > conftest.c
1012 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1013   ac_cv_prog_cc_g=yes
1014 else
1015   ac_cv_prog_cc_g=no
1016 fi
1017 rm -f conftest*
1018
1019 fi
1020
1021 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1022 if test "$ac_test_CFLAGS" = set; then
1023   CFLAGS="$ac_save_CFLAGS"
1024 elif test $ac_cv_prog_cc_g = yes; then
1025   if test "$GCC" = yes; then
1026     CFLAGS="-g -O2"
1027   else
1028     CFLAGS="-g"
1029   fi
1030 else
1031   if test "$GCC" = yes; then
1032     CFLAGS="-O2"
1033   else
1034     CFLAGS=
1035   fi
1036 fi
1037
1038 ac_aux_dir=
1039 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1040   if test -f $ac_dir/install-sh; then
1041     ac_aux_dir=$ac_dir
1042     ac_install_sh="$ac_aux_dir/install-sh -c"
1043     break
1044   elif 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   fi
1049 done
1050 if test -z "$ac_aux_dir"; then
1051   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1052 fi
1053 ac_config_guess=$ac_aux_dir/config.guess
1054 ac_config_sub=$ac_aux_dir/config.sub
1055 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1056
1057 # Find a good install program.  We prefer a C program (faster),
1058 # so one script is as good as another.  But avoid the broken or
1059 # incompatible versions:
1060 # SysV /etc/install, /usr/sbin/install
1061 # SunOS /usr/etc/install
1062 # IRIX /sbin/install
1063 # AIX /bin/install
1064 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1065 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1066 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1067 # ./install, which can be erroneously created by make from ./install.sh.
1068 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1069 echo "configure:1070: checking for a BSD compatible install" >&5
1070 if test -z "$INSTALL"; then
1071 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1072   echo $ac_n "(cached) $ac_c" 1>&6
1073 else
1074     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1075   for ac_dir in $PATH; do
1076     # Account for people who put trailing slashes in PATH elements.
1077     case "$ac_dir/" in
1078     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1079     *)
1080       # OSF1 and SCO ODT 3.0 have their own names for install.
1081       # Don't use installbsd from OSF since it installs stuff as root
1082       # by default.
1083       for ac_prog in ginstall scoinst install; do
1084         if test -f $ac_dir/$ac_prog; then
1085           if test $ac_prog = install &&
1086             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1087             # AIX install.  It has an incompatible calling convention.
1088             :
1089           else
1090             ac_cv_path_install="$ac_dir/$ac_prog -c"
1091             break 2
1092           fi
1093         fi
1094       done
1095       ;;
1096     esac
1097   done
1098   IFS="$ac_save_IFS"
1099
1100 fi
1101   if test "${ac_cv_path_install+set}" = set; then
1102     INSTALL="$ac_cv_path_install"
1103   else
1104     # As a last resort, use the slow shell script.  We don't cache a
1105     # path for INSTALL within a source directory, because that will
1106     # break other packages using the cache if that directory is
1107     # removed, or if the path is relative.
1108     INSTALL="$ac_install_sh"
1109   fi
1110 fi
1111 echo "$ac_t""$INSTALL" 1>&6
1112
1113 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1114 # It thinks the first close brace ends the variable substitution.
1115 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1116
1117 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1118
1119 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1120
1121 for ac_prog in gawk mawk nawk awk
1122 do
1123 # Extract the first word of "$ac_prog", so it can be a program name with args.
1124 set dummy $ac_prog; ac_word=$2
1125 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1126 echo "configure:1127: checking for $ac_word" >&5
1127 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1128   echo $ac_n "(cached) $ac_c" 1>&6
1129 else
1130   if test -n "$AWK"; then
1131   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1132 else
1133   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1134   ac_dummy="$PATH"
1135   for ac_dir in $ac_dummy; do
1136     test -z "$ac_dir" && ac_dir=.
1137     if test -f $ac_dir/$ac_word; then
1138       ac_cv_prog_AWK="$ac_prog"
1139       break
1140     fi
1141   done
1142   IFS="$ac_save_ifs"
1143 fi
1144 fi
1145 AWK="$ac_cv_prog_AWK"
1146 if test -n "$AWK"; then
1147   echo "$ac_t""$AWK" 1>&6
1148 else
1149   echo "$ac_t""no" 1>&6
1150 fi
1151
1152 test -n "$AWK" && break
1153 done
1154
1155
1156 LD=ld
1157 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1158 echo "configure:1159: checking if the linker ($LD) is GNU ld" >&5
1159 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1160   echo $ac_n "(cached) $ac_c" 1>&6
1161 else
1162   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1163 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1164   ac_cv_prog_gnu_ld=yes
1165 else
1166   ac_cv_prog_gnu_ld=no
1167 fi
1168 fi
1169
1170 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1171
1172
1173 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1174 echo "configure:1175: checking for POSIXized ISC" >&5
1175 if test -d /etc/conf/kconfig.d &&
1176   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1177 then
1178   echo "$ac_t""yes" 1>&6
1179   ISC=yes # If later tests want to check for ISC.
1180   cat >> confdefs.h <<\EOF
1181 #define _POSIX_SOURCE 1
1182 EOF
1183
1184   if test "$GCC" = yes; then
1185     CC="$CC -posix"
1186   else
1187     CC="$CC -Xp"
1188   fi
1189 else
1190   echo "$ac_t""no" 1>&6
1191   ISC=
1192 fi
1193
1194
1195 if test "x$CC" != xcc; then
1196   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1197 echo "configure:1198: checking whether $CC and cc understand -c and -o together" >&5
1198 else
1199   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1200 echo "configure:1201: checking whether cc understands -c and -o together" >&5
1201 fi
1202 set dummy $CC; ac_cc="`echo $2 |
1203                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1204 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1205   echo $ac_n "(cached) $ac_c" 1>&6
1206 else
1207   echo 'foo(){}' > conftest.c
1208 # Make sure it works both with $CC and with simple cc.
1209 # We do the test twice because some compilers refuse to overwrite an
1210 # existing .o file with -o, though they will create one.
1211 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1212 if { (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1213    test -f conftest.o && { (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1214 then
1215   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1216   if test "x$CC" != xcc; then
1217     # Test first that cc exists at all.
1218     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1219       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1220       if { (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1221          test -f conftest.o && { (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1222       then
1223         # cc works too.
1224         :
1225       else
1226         # cc exists but doesn't like -o.
1227         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1228       fi
1229     fi
1230   fi
1231 else
1232   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1233 fi
1234 rm -f conftest*
1235
1236 fi
1237 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1238   echo "$ac_t""yes" 1>&6
1239 else
1240   echo "$ac_t""no" 1>&6
1241   cat >> confdefs.h <<\EOF
1242 #define NO_MINUS_C_MINUS_O 1
1243 EOF
1244
1245 fi
1246
1247 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1248       BROKEN_CC=
1249 else
1250       BROKEN_CC=#
1251 fi
1252
1253
1254 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1255 echo "configure:1256: checking that the C compiler understands volatile" >&5
1256 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1257   echo $ac_n "(cached) $ac_c" 1>&6
1258 else
1259   
1260     cat > conftest.$ac_ext <<EOF
1261 #line 1262 "configure"
1262 #include "confdefs.h"
1263 #include <sys/types.h>
1264 int main() {
1265 volatile int i = 0
1266 ; return 0; }
1267 EOF
1268 if { (eval echo configure:1269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1269   rm -rf conftest*
1270   samba_cv_volatile=yes
1271 else
1272   echo "configure: failed program was:" >&5
1273   cat conftest.$ac_ext >&5
1274   rm -rf conftest*
1275   samba_cv_volatile=no
1276 fi
1277 rm -f conftest*
1278 fi
1279
1280 echo "$ac_t""$samba_cv_volatile" 1>&6
1281 if test x"$samba_cv_volatile" = x"yes"; then
1282    cat >> confdefs.h <<\EOF
1283 #define HAVE_VOLATILE 1
1284 EOF
1285
1286 fi
1287
1288
1289
1290 # Do some error checking and defaulting for the host and target type.
1291 # The inputs are:
1292 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1293 #
1294 # The rules are:
1295 # 1. You are not allowed to specify --host, --target, and nonopt at the
1296 #    same time.
1297 # 2. Host defaults to nonopt.
1298 # 3. If nonopt is not specified, then host defaults to the current host,
1299 #    as determined by config.guess.
1300 # 4. Target and build default to nonopt.
1301 # 5. If nonopt is not specified, then target and build default to host.
1302
1303 # The aliases save the names the user supplied, while $host etc.
1304 # will get canonicalized.
1305 case $host---$target---$nonopt in
1306 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1307 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1308 esac
1309
1310
1311 # Make sure we can run config.sub.
1312 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1313 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1314 fi
1315
1316 echo $ac_n "checking host system type""... $ac_c" 1>&6
1317 echo "configure:1318: checking host system type" >&5
1318
1319 host_alias=$host
1320 case "$host_alias" in
1321 NONE)
1322   case $nonopt in
1323   NONE)
1324     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1325     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1326     fi ;;
1327   *) host_alias=$nonopt ;;
1328   esac ;;
1329 esac
1330
1331 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1332 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1333 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1334 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1335 echo "$ac_t""$host" 1>&6
1336
1337 echo $ac_n "checking target system type""... $ac_c" 1>&6
1338 echo "configure:1339: checking target system type" >&5
1339
1340 target_alias=$target
1341 case "$target_alias" in
1342 NONE)
1343   case $nonopt in
1344   NONE) target_alias=$host_alias ;;
1345   *) target_alias=$nonopt ;;
1346   esac ;;
1347 esac
1348
1349 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1350 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1351 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1352 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1353 echo "$ac_t""$target" 1>&6
1354
1355 echo $ac_n "checking build system type""... $ac_c" 1>&6
1356 echo "configure:1357: checking build system type" >&5
1357
1358 build_alias=$build
1359 case "$build_alias" in
1360 NONE)
1361   case $nonopt in
1362   NONE) build_alias=$host_alias ;;
1363   *) build_alias=$nonopt ;;
1364   esac ;;
1365 esac
1366
1367 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1368 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1369 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1370 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1371 echo "$ac_t""$build" 1>&6
1372
1373 test "$host_alias" != "$target_alias" &&
1374   test "$program_prefix$program_suffix$program_transform_name" = \
1375     NONENONEs,x,x, &&
1376   program_prefix=${target_alias}-
1377
1378
1379   case "$host_os" in
1380         *irix6*) cat >> confdefs.h <<\EOF
1381 #include <standards.h>
1382 EOF
1383
1384         ;;
1385 esac
1386
1387
1388     
1389     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1390 echo "configure:1391: checking config.cache system type" >&5
1391     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1392          test x"$ac_cv_host_system_type" != x"$host"; } ||
1393        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1394          test x"$ac_cv_build_system_type" != x"$build"; } ||
1395        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1396          test x"$ac_cv_target_system_type" != x"$target"; }; then
1397         echo "$ac_t""different" 1>&6
1398         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1399     else
1400         echo "$ac_t""same" 1>&6
1401     fi
1402     ac_cv_host_system_type="$host"
1403     ac_cv_build_system_type="$build"
1404     ac_cv_target_system_type="$target"
1405
1406
1407 DYNEXP=
1408
1409 #
1410 # Config CPPFLAG settings for strange OS's that must be set
1411 # before other tests.
1412 #
1413 case "$host_os" in
1414 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1415     *hpux*)
1416     
1417       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1418 echo "configure:1419: checking whether ${CC-cc} accepts -Ae" >&5
1419 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1420   echo $ac_n "(cached) $ac_c" 1>&6
1421 else
1422   echo 'void f(){}' > conftest.c
1423 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1424   ac_cv_prog_cc_Ae=yes
1425 else
1426   ac_cv_prog_cc_Ae=no
1427 fi
1428 rm -f conftest*
1429
1430 fi
1431
1432 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1433       # mmap on HPUX is completely broken...
1434       cat >> confdefs.h <<\EOF
1435 #define MMAP_BLACKLIST 1
1436 EOF
1437
1438       if test $ac_cv_prog_cc_Ae = yes; then
1439         CPPFLAGS="$CPPFLAGS -Ae"
1440       fi
1441 #
1442 # Defines needed for HPUX support.
1443 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1444 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1445 #
1446       case `uname -r` in
1447                         *9*|*10*)
1448                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1449                                 cat >> confdefs.h <<\EOF
1450 #define USE_BOTH_CRYPT_CALLS 1
1451 EOF
1452
1453                                 cat >> confdefs.h <<\EOF
1454 #define _HPUX_SOURCE 1
1455 EOF
1456
1457                                 cat >> confdefs.h <<\EOF
1458 #define _POSIX_SOURCE 1
1459 EOF
1460
1461                                 cat >> confdefs.h <<\EOF
1462 #define _ALIGNMENT_REQUIRED 1
1463 EOF
1464
1465                                 cat >> confdefs.h <<\EOF
1466 #define _MAX_ALIGNMENT 4
1467 EOF
1468
1469                                 ;;
1470                         *11*)
1471                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1472                                 cat >> confdefs.h <<\EOF
1473 #define USE_BOTH_CRYPT_CALLS 1
1474 EOF
1475
1476                                 cat >> confdefs.h <<\EOF
1477 #define _HPUX_SOURCE 1
1478 EOF
1479
1480                                 cat >> confdefs.h <<\EOF
1481 #define _POSIX_SOURCE 1
1482 EOF
1483
1484                                 cat >> confdefs.h <<\EOF
1485 #define _LARGEFILE64_SOURCE 1
1486 EOF
1487
1488                                 cat >> confdefs.h <<\EOF
1489 #define _ALIGNMENT_REQUIRED 1
1490 EOF
1491
1492                                 cat >> confdefs.h <<\EOF
1493 #define _MAX_ALIGNMENT 4
1494 EOF
1495
1496                                 ;;
1497       esac
1498       DYNEXP="-Wl,-E"
1499       ;;
1500
1501 #
1502 # CRAY Unicos has broken const handling
1503        *unicos*)
1504           echo "$ac_t""disabling const" 1>&6
1505           CPPFLAGS="$CPPFLAGS -Dconst="
1506           ;;
1507         
1508 #
1509 # AIX4.x doesn't even admit to having large
1510 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1511 #
1512     *aix4*)
1513           echo "$ac_t""enabling large file support" 1>&6
1514       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1515       cat >> confdefs.h <<\EOF
1516 #define _LARGE_FILES 1
1517 EOF
1518
1519       ;;    
1520 #
1521 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1522 # to the existance of large files..
1523 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1524 # recommendations on large file support, however it makes the
1525 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1526 # recommendation makes the compile fail on gcc2.7. JRA.
1527 #
1528         *solaris*)
1529                 case `uname -r` in
1530                         5.0*|5.1*|5.2*|5.3*|5.5*)
1531                                 echo "$ac_t""no large file support" 1>&6
1532                                 ;;
1533                         5.*)
1534                         echo "$ac_t""enabling large file support" 1>&6
1535                         if test "$ac_cv_prog_gcc" = yes; then
1536                                 ${CC-cc} -v >conftest.c 2>&1
1537                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1538                                 rm -fr conftest.c
1539                                 case "$ac_cv_gcc_compiler_version_number" in
1540                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1541                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1542                                                 cat >> confdefs.h <<\EOF
1543 #define _LARGEFILE64_SOURCE 1
1544 EOF
1545
1546                                                 ;;
1547                                         *)
1548                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1549                                                 cat >> confdefs.h <<\EOF
1550 #define _LARGEFILE64_SOURCE 1
1551 EOF
1552
1553                                                 cat >> confdefs.h <<\EOF
1554 #define _FILE_OFFSET_BITS 64
1555 EOF
1556
1557                                                 ;;
1558                                 esac
1559                         else
1560                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1561                                 cat >> confdefs.h <<\EOF
1562 #define _LARGEFILE64_SOURCE 1
1563 EOF
1564
1565                                 cat >> confdefs.h <<\EOF
1566 #define _FILE_OFFSET_BITS 64
1567 EOF
1568
1569                         fi
1570                         ;;
1571                 esac
1572                 ;;
1573 #
1574 # Tests needed for SINIX large file support.
1575 #
1576     *sysv4*)
1577       if test $host = mips-sni-sysv4 ; then
1578         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1579 echo "configure:1580: checking for LFS support" >&5
1580         old_CPPFLAGS="$CPPFLAGS"
1581         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1582         if test "$cross_compiling" = yes; then
1583   SINIX_LFS_SUPPORT=cross
1584 else
1585   cat > conftest.$ac_ext <<EOF
1586 #line 1587 "configure"
1587 #include "confdefs.h"
1588
1589 #include <unistd.h>
1590 main () {
1591 #if _LFS64_LARGEFILE == 1
1592 exit(0);
1593 #else
1594 exit(1);
1595 #endif
1596 }
1597 EOF
1598 if { (eval echo configure:1599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1599 then
1600   SINIX_LFS_SUPPORT=yes
1601 else
1602   echo "configure: failed program was:" >&5
1603   cat conftest.$ac_ext >&5
1604   rm -fr conftest*
1605   SINIX_LFS_SUPPORT=no
1606 fi
1607 rm -fr conftest*
1608 fi
1609
1610         CPPFLAGS="$old_CPPFLAGS"
1611         if test x$SINIX_LFS_SUPPORT = xyes ; then
1612           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1613           cat >> confdefs.h <<\EOF
1614 #define _LARGEFILE64_SOURCE 1
1615 EOF
1616
1617           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1618           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1619           LIBS="`getconf LFS64_LIBS` $LIBS"
1620         fi
1621       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1622       fi
1623     ;;
1624
1625 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1626 #
1627     *linux*)
1628         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1629 echo "configure:1630: checking for LFS support" >&5
1630         old_CPPFLAGS="$CPPFLAGS"
1631         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1632        if test "$cross_compiling" = yes; then
1633   LINUX_LFS_SUPPORT=cross
1634 else
1635   cat > conftest.$ac_ext <<EOF
1636 #line 1637 "configure"
1637 #include "confdefs.h"
1638
1639 #include <unistd.h>
1640 #include <sys/utsname.h>
1641 main() {
1642 #if _LFS64_LARGEFILE == 1
1643        struct utsname uts;
1644        char *release;
1645        int major, minor;
1646
1647        /* Ensure this is glibc 2.2 or higher */
1648 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1649        int libc_major = __GLIBC__;
1650        int libc_minor = __GLIBC_MINOR__;
1651
1652        if (libc_major < 2)
1653               exit(1);
1654        if (libc_minor < 2)
1655               exit(1);
1656 #endif
1657
1658        /* Ensure this is kernel 2.4 or higher */
1659
1660        uname(&uts);
1661        release = uts.release;
1662        major = atoi(strsep(&release, "."));
1663        minor = atoi(strsep(&release, "."));
1664
1665        if (major > 2 || (major == 2 && minor > 3))
1666                exit(0);
1667        exit(1);
1668 #else
1669        exit(1);
1670 #endif
1671 }
1672
1673 EOF
1674 if { (eval echo configure:1675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1675 then
1676   LINUX_LFS_SUPPORT=yes
1677 else
1678   echo "configure: failed program was:" >&5
1679   cat conftest.$ac_ext >&5
1680   rm -fr conftest*
1681   LINUX_LFS_SUPPORT=no
1682 fi
1683 rm -fr conftest*
1684 fi
1685
1686         CPPFLAGS="$old_CPPFLAGS"
1687         if test x$LINUX_LFS_SUPPORT = xyes ; then
1688           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1689           cat >> confdefs.h <<\EOF
1690 #define _LARGEFILE64_SOURCE 1
1691 EOF
1692
1693           cat >> confdefs.h <<\EOF
1694 #define _FILE_OFFSET_BITS 64
1695 EOF
1696
1697           cat >> confdefs.h <<\EOF
1698 #define _GNU_SOURCE 1
1699 EOF
1700
1701         fi
1702        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1703                 ;;
1704
1705     *hurd*)
1706         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1707 echo "configure:1708: checking for LFS support" >&5
1708         old_CPPFLAGS="$CPPFLAGS"
1709         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1710         if test "$cross_compiling" = yes; then
1711   GLIBC_LFS_SUPPORT=cross
1712 else
1713   cat > conftest.$ac_ext <<EOF
1714 #line 1715 "configure"
1715 #include "confdefs.h"
1716
1717 #include <unistd.h>
1718 main () {
1719 #if _LFS64_LARGEFILE == 1
1720 exit(0);
1721 #else
1722 exit(1);
1723 #endif
1724 }
1725 EOF
1726 if { (eval echo configure:1727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1727 then
1728   GLIBC_LFS_SUPPORT=yes
1729 else
1730   echo "configure: failed program was:" >&5
1731   cat conftest.$ac_ext >&5
1732   rm -fr conftest*
1733   GLIBC_LFS_SUPPORT=no
1734 fi
1735 rm -fr conftest*
1736 fi
1737
1738         CPPFLAGS="$old_CPPFLAGS"
1739         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1740           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1741           cat >> confdefs.h <<\EOF
1742 #define _LARGEFILE64_SOURCE 1
1743 EOF
1744
1745           cat >> confdefs.h <<\EOF
1746 #define _GNU_SOURCE 1
1747 EOF
1748
1749         fi
1750       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1751     ;;
1752
1753 esac
1754
1755 echo $ac_n "checking for inline""... $ac_c" 1>&6
1756 echo "configure:1757: checking for inline" >&5
1757 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1758   echo $ac_n "(cached) $ac_c" 1>&6
1759 else
1760   ac_cv_c_inline=no
1761 for ac_kw in inline __inline__ __inline; do
1762   cat > conftest.$ac_ext <<EOF
1763 #line 1764 "configure"
1764 #include "confdefs.h"
1765
1766 int main() {
1767 } $ac_kw foo() {
1768 ; return 0; }
1769 EOF
1770 if { (eval echo configure:1771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1771   rm -rf conftest*
1772   ac_cv_c_inline=$ac_kw; break
1773 else
1774   echo "configure: failed program was:" >&5
1775   cat conftest.$ac_ext >&5
1776 fi
1777 rm -f conftest*
1778 done
1779
1780 fi
1781
1782 echo "$ac_t""$ac_cv_c_inline" 1>&6
1783 case "$ac_cv_c_inline" in
1784   inline | yes) ;;
1785   no) cat >> confdefs.h <<\EOF
1786 #define inline 
1787 EOF
1788  ;;
1789   *)  cat >> confdefs.h <<EOF
1790 #define inline $ac_cv_c_inline
1791 EOF
1792  ;;
1793 esac
1794
1795 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1796 echo "configure:1797: checking how to run the C preprocessor" >&5
1797 # On Suns, sometimes $CPP names a directory.
1798 if test -n "$CPP" && test -d "$CPP"; then
1799   CPP=
1800 fi
1801 if test -z "$CPP"; then
1802 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1803   echo $ac_n "(cached) $ac_c" 1>&6
1804 else
1805     # This must be in double quotes, not single quotes, because CPP may get
1806   # substituted into the Makefile and "${CC-cc}" will confuse make.
1807   CPP="${CC-cc} -E"
1808   # On the NeXT, cc -E runs the code through the compiler's parser,
1809   # not just through cpp.
1810   cat > conftest.$ac_ext <<EOF
1811 #line 1812 "configure"
1812 #include "confdefs.h"
1813 #include <assert.h>
1814 Syntax Error
1815 EOF
1816 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1817 { (eval echo configure:1818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1818 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1819 if test -z "$ac_err"; then
1820   :
1821 else
1822   echo "$ac_err" >&5
1823   echo "configure: failed program was:" >&5
1824   cat conftest.$ac_ext >&5
1825   rm -rf conftest*
1826   CPP="${CC-cc} -E -traditional-cpp"
1827   cat > conftest.$ac_ext <<EOF
1828 #line 1829 "configure"
1829 #include "confdefs.h"
1830 #include <assert.h>
1831 Syntax Error
1832 EOF
1833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1834 { (eval echo configure:1835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1836 if test -z "$ac_err"; then
1837   :
1838 else
1839   echo "$ac_err" >&5
1840   echo "configure: failed program was:" >&5
1841   cat conftest.$ac_ext >&5
1842   rm -rf conftest*
1843   CPP="${CC-cc} -nologo -E"
1844   cat > conftest.$ac_ext <<EOF
1845 #line 1846 "configure"
1846 #include "confdefs.h"
1847 #include <assert.h>
1848 Syntax Error
1849 EOF
1850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1851 { (eval echo configure:1852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1853 if test -z "$ac_err"; then
1854   :
1855 else
1856   echo "$ac_err" >&5
1857   echo "configure: failed program was:" >&5
1858   cat conftest.$ac_ext >&5
1859   rm -rf conftest*
1860   CPP=/lib/cpp
1861 fi
1862 rm -f conftest*
1863 fi
1864 rm -f conftest*
1865 fi
1866 rm -f conftest*
1867   ac_cv_prog_CPP="$CPP"
1868 fi
1869   CPP="$ac_cv_prog_CPP"
1870 else
1871   ac_cv_prog_CPP="$CPP"
1872 fi
1873 echo "$ac_t""$CPP" 1>&6
1874
1875 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1876 echo "configure:1877: checking for ANSI C header files" >&5
1877 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1878   echo $ac_n "(cached) $ac_c" 1>&6
1879 else
1880   cat > conftest.$ac_ext <<EOF
1881 #line 1882 "configure"
1882 #include "confdefs.h"
1883 #include <stdlib.h>
1884 #include <stdarg.h>
1885 #include <string.h>
1886 #include <float.h>
1887 EOF
1888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1889 { (eval echo configure:1890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1891 if test -z "$ac_err"; then
1892   rm -rf conftest*
1893   ac_cv_header_stdc=yes
1894 else
1895   echo "$ac_err" >&5
1896   echo "configure: failed program was:" >&5
1897   cat conftest.$ac_ext >&5
1898   rm -rf conftest*
1899   ac_cv_header_stdc=no
1900 fi
1901 rm -f conftest*
1902
1903 if test $ac_cv_header_stdc = yes; then
1904   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1905 cat > conftest.$ac_ext <<EOF
1906 #line 1907 "configure"
1907 #include "confdefs.h"
1908 #include <string.h>
1909 EOF
1910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1911   egrep "memchr" >/dev/null 2>&1; then
1912   :
1913 else
1914   rm -rf conftest*
1915   ac_cv_header_stdc=no
1916 fi
1917 rm -f conftest*
1918
1919 fi
1920
1921 if test $ac_cv_header_stdc = yes; then
1922   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1923 cat > conftest.$ac_ext <<EOF
1924 #line 1925 "configure"
1925 #include "confdefs.h"
1926 #include <stdlib.h>
1927 EOF
1928 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1929   egrep "free" >/dev/null 2>&1; then
1930   :
1931 else
1932   rm -rf conftest*
1933   ac_cv_header_stdc=no
1934 fi
1935 rm -f conftest*
1936
1937 fi
1938
1939 if test $ac_cv_header_stdc = yes; then
1940   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1941 if test "$cross_compiling" = yes; then
1942   :
1943 else
1944   cat > conftest.$ac_ext <<EOF
1945 #line 1946 "configure"
1946 #include "confdefs.h"
1947 #include <ctype.h>
1948 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1949 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1950 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1951 int main () { int i; for (i = 0; i < 256; i++)
1952 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1953 exit (0); }
1954
1955 EOF
1956 if { (eval echo configure:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1957 then
1958   :
1959 else
1960   echo "configure: failed program was:" >&5
1961   cat conftest.$ac_ext >&5
1962   rm -fr conftest*
1963   ac_cv_header_stdc=no
1964 fi
1965 rm -fr conftest*
1966 fi
1967
1968 fi
1969 fi
1970
1971 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1972 if test $ac_cv_header_stdc = yes; then
1973   cat >> confdefs.h <<\EOF
1974 #define STDC_HEADERS 1
1975 EOF
1976
1977 fi
1978
1979 ac_header_dirent=no
1980 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1981 do
1982 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1983 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1984 echo "configure:1985: checking for $ac_hdr that defines DIR" >&5
1985 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1986   echo $ac_n "(cached) $ac_c" 1>&6
1987 else
1988   cat > conftest.$ac_ext <<EOF
1989 #line 1990 "configure"
1990 #include "confdefs.h"
1991 #include <sys/types.h>
1992 #include <$ac_hdr>
1993 int main() {
1994 DIR *dirp = 0;
1995 ; return 0; }
1996 EOF
1997 if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1998   rm -rf conftest*
1999   eval "ac_cv_header_dirent_$ac_safe=yes"
2000 else
2001   echo "configure: failed program was:" >&5
2002   cat conftest.$ac_ext >&5
2003   rm -rf conftest*
2004   eval "ac_cv_header_dirent_$ac_safe=no"
2005 fi
2006 rm -f conftest*
2007 fi
2008 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2009   echo "$ac_t""yes" 1>&6
2010     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2011   cat >> confdefs.h <<EOF
2012 #define $ac_tr_hdr 1
2013 EOF
2014  ac_header_dirent=$ac_hdr; break
2015 else
2016   echo "$ac_t""no" 1>&6
2017 fi
2018 done
2019 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2020 if test $ac_header_dirent = dirent.h; then
2021 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2022 echo "configure:2023: checking for opendir in -ldir" >&5
2023 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2024 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2025   echo $ac_n "(cached) $ac_c" 1>&6
2026 else
2027   ac_save_LIBS="$LIBS"
2028 LIBS="-ldir  $LIBS"
2029 cat > conftest.$ac_ext <<EOF
2030 #line 2031 "configure"
2031 #include "confdefs.h"
2032 /* Override any gcc2 internal prototype to avoid an error.  */
2033 /* We use char because int might match the return type of a gcc2
2034     builtin and then its argument prototype would still apply.  */
2035 char opendir();
2036
2037 int main() {
2038 opendir()
2039 ; return 0; }
2040 EOF
2041 if { (eval echo configure:2042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2042   rm -rf conftest*
2043   eval "ac_cv_lib_$ac_lib_var=yes"
2044 else
2045   echo "configure: failed program was:" >&5
2046   cat conftest.$ac_ext >&5
2047   rm -rf conftest*
2048   eval "ac_cv_lib_$ac_lib_var=no"
2049 fi
2050 rm -f conftest*
2051 LIBS="$ac_save_LIBS"
2052
2053 fi
2054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2055   echo "$ac_t""yes" 1>&6
2056   LIBS="$LIBS -ldir"
2057 else
2058   echo "$ac_t""no" 1>&6
2059 fi
2060
2061 else
2062 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2063 echo "configure:2064: checking for opendir in -lx" >&5
2064 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2065 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2066   echo $ac_n "(cached) $ac_c" 1>&6
2067 else
2068   ac_save_LIBS="$LIBS"
2069 LIBS="-lx  $LIBS"
2070 cat > conftest.$ac_ext <<EOF
2071 #line 2072 "configure"
2072 #include "confdefs.h"
2073 /* Override any gcc2 internal prototype to avoid an error.  */
2074 /* We use char because int might match the return type of a gcc2
2075     builtin and then its argument prototype would still apply.  */
2076 char opendir();
2077
2078 int main() {
2079 opendir()
2080 ; return 0; }
2081 EOF
2082 if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2083   rm -rf conftest*
2084   eval "ac_cv_lib_$ac_lib_var=yes"
2085 else
2086   echo "configure: failed program was:" >&5
2087   cat conftest.$ac_ext >&5
2088   rm -rf conftest*
2089   eval "ac_cv_lib_$ac_lib_var=no"
2090 fi
2091 rm -f conftest*
2092 LIBS="$ac_save_LIBS"
2093
2094 fi
2095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2096   echo "$ac_t""yes" 1>&6
2097   LIBS="$LIBS -lx"
2098 else
2099   echo "$ac_t""no" 1>&6
2100 fi
2101
2102 fi
2103
2104 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2105 echo "configure:2106: checking whether time.h and sys/time.h may both be included" >&5
2106 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2107   echo $ac_n "(cached) $ac_c" 1>&6
2108 else
2109   cat > conftest.$ac_ext <<EOF
2110 #line 2111 "configure"
2111 #include "confdefs.h"
2112 #include <sys/types.h>
2113 #include <sys/time.h>
2114 #include <time.h>
2115 int main() {
2116 struct tm *tp;
2117 ; return 0; }
2118 EOF
2119 if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2120   rm -rf conftest*
2121   ac_cv_header_time=yes
2122 else
2123   echo "configure: failed program was:" >&5
2124   cat conftest.$ac_ext >&5
2125   rm -rf conftest*
2126   ac_cv_header_time=no
2127 fi
2128 rm -f conftest*
2129 fi
2130
2131 echo "$ac_t""$ac_cv_header_time" 1>&6
2132 if test $ac_cv_header_time = yes; then
2133   cat >> confdefs.h <<\EOF
2134 #define TIME_WITH_SYS_TIME 1
2135 EOF
2136
2137 fi
2138
2139 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2140 echo "configure:2141: checking for sys/wait.h that is POSIX.1 compatible" >&5
2141 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2142   echo $ac_n "(cached) $ac_c" 1>&6
2143 else
2144   cat > conftest.$ac_ext <<EOF
2145 #line 2146 "configure"
2146 #include "confdefs.h"
2147 #include <sys/types.h>
2148 #include <sys/wait.h>
2149 #ifndef WEXITSTATUS
2150 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2151 #endif
2152 #ifndef WIFEXITED
2153 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2154 #endif
2155 int main() {
2156 int s;
2157 wait (&s);
2158 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2159 ; return 0; }
2160 EOF
2161 if { (eval echo configure:2162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2162   rm -rf conftest*
2163   ac_cv_header_sys_wait_h=yes
2164 else
2165   echo "configure: failed program was:" >&5
2166   cat conftest.$ac_ext >&5
2167   rm -rf conftest*
2168   ac_cv_header_sys_wait_h=no
2169 fi
2170 rm -f conftest*
2171 fi
2172
2173 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2174 if test $ac_cv_header_sys_wait_h = yes; then
2175   cat >> confdefs.h <<\EOF
2176 #define HAVE_SYS_WAIT_H 1
2177 EOF
2178
2179 fi
2180
2181 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2182 do
2183 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2184 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2185 echo "configure:2186: checking for $ac_hdr" >&5
2186 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2187   echo $ac_n "(cached) $ac_c" 1>&6
2188 else
2189   cat > conftest.$ac_ext <<EOF
2190 #line 2191 "configure"
2191 #include "confdefs.h"
2192 #include <$ac_hdr>
2193 EOF
2194 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2195 { (eval echo configure:2196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2196 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2197 if test -z "$ac_err"; then
2198   rm -rf conftest*
2199   eval "ac_cv_header_$ac_safe=yes"
2200 else
2201   echo "$ac_err" >&5
2202   echo "configure: failed program was:" >&5
2203   cat conftest.$ac_ext >&5
2204   rm -rf conftest*
2205   eval "ac_cv_header_$ac_safe=no"
2206 fi
2207 rm -f conftest*
2208 fi
2209 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2210   echo "$ac_t""yes" 1>&6
2211     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2212   cat >> confdefs.h <<EOF
2213 #define $ac_tr_hdr 1
2214 EOF
2215  
2216 else
2217   echo "$ac_t""no" 1>&6
2218 fi
2219 done
2220
2221 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2222 do
2223 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2224 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2225 echo "configure:2226: checking for $ac_hdr" >&5
2226 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2227   echo $ac_n "(cached) $ac_c" 1>&6
2228 else
2229   cat > conftest.$ac_ext <<EOF
2230 #line 2231 "configure"
2231 #include "confdefs.h"
2232 #include <$ac_hdr>
2233 EOF
2234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2235 { (eval echo configure:2236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2237 if test -z "$ac_err"; then
2238   rm -rf conftest*
2239   eval "ac_cv_header_$ac_safe=yes"
2240 else
2241   echo "$ac_err" >&5
2242   echo "configure: failed program was:" >&5
2243   cat conftest.$ac_ext >&5
2244   rm -rf conftest*
2245   eval "ac_cv_header_$ac_safe=no"
2246 fi
2247 rm -f conftest*
2248 fi
2249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2250   echo "$ac_t""yes" 1>&6
2251     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2252   cat >> confdefs.h <<EOF
2253 #define $ac_tr_hdr 1
2254 EOF
2255  
2256 else
2257   echo "$ac_t""no" 1>&6
2258 fi
2259 done
2260
2261 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2262 do
2263 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2264 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2265 echo "configure:2266: checking for $ac_hdr" >&5
2266 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2267   echo $ac_n "(cached) $ac_c" 1>&6
2268 else
2269   cat > conftest.$ac_ext <<EOF
2270 #line 2271 "configure"
2271 #include "confdefs.h"
2272 #include <$ac_hdr>
2273 EOF
2274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2275 { (eval echo configure:2276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2277 if test -z "$ac_err"; then
2278   rm -rf conftest*
2279   eval "ac_cv_header_$ac_safe=yes"
2280 else
2281   echo "$ac_err" >&5
2282   echo "configure: failed program was:" >&5
2283   cat conftest.$ac_ext >&5
2284   rm -rf conftest*
2285   eval "ac_cv_header_$ac_safe=no"
2286 fi
2287 rm -f conftest*
2288 fi
2289 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2290   echo "$ac_t""yes" 1>&6
2291     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2292   cat >> confdefs.h <<EOF
2293 #define $ac_tr_hdr 1
2294 EOF
2295  
2296 else
2297   echo "$ac_t""no" 1>&6
2298 fi
2299 done
2300
2301 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2302 do
2303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2304 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2305 echo "configure:2306: checking for $ac_hdr" >&5
2306 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2307   echo $ac_n "(cached) $ac_c" 1>&6
2308 else
2309   cat > conftest.$ac_ext <<EOF
2310 #line 2311 "configure"
2311 #include "confdefs.h"
2312 #include <$ac_hdr>
2313 EOF
2314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2315 { (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2317 if test -z "$ac_err"; then
2318   rm -rf conftest*
2319   eval "ac_cv_header_$ac_safe=yes"
2320 else
2321   echo "$ac_err" >&5
2322   echo "configure: failed program was:" >&5
2323   cat conftest.$ac_ext >&5
2324   rm -rf conftest*
2325   eval "ac_cv_header_$ac_safe=no"
2326 fi
2327 rm -f conftest*
2328 fi
2329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2330   echo "$ac_t""yes" 1>&6
2331     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2332   cat >> confdefs.h <<EOF
2333 #define $ac_tr_hdr 1
2334 EOF
2335  
2336 else
2337   echo "$ac_t""no" 1>&6
2338 fi
2339 done
2340
2341 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
2342 do
2343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2345 echo "configure:2346: checking for $ac_hdr" >&5
2346 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2347   echo $ac_n "(cached) $ac_c" 1>&6
2348 else
2349   cat > conftest.$ac_ext <<EOF
2350 #line 2351 "configure"
2351 #include "confdefs.h"
2352 #include <$ac_hdr>
2353 EOF
2354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2355 { (eval echo configure:2356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2357 if test -z "$ac_err"; then
2358   rm -rf conftest*
2359   eval "ac_cv_header_$ac_safe=yes"
2360 else
2361   echo "$ac_err" >&5
2362   echo "configure: failed program was:" >&5
2363   cat conftest.$ac_ext >&5
2364   rm -rf conftest*
2365   eval "ac_cv_header_$ac_safe=no"
2366 fi
2367 rm -f conftest*
2368 fi
2369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2370   echo "$ac_t""yes" 1>&6
2371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2372   cat >> confdefs.h <<EOF
2373 #define $ac_tr_hdr 1
2374 EOF
2375  
2376 else
2377   echo "$ac_t""no" 1>&6
2378 fi
2379 done
2380
2381 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2382 do
2383 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2384 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2385 echo "configure:2386: checking for $ac_hdr" >&5
2386 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2387   echo $ac_n "(cached) $ac_c" 1>&6
2388 else
2389   cat > conftest.$ac_ext <<EOF
2390 #line 2391 "configure"
2391 #include "confdefs.h"
2392 #include <$ac_hdr>
2393 EOF
2394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2395 { (eval echo configure:2396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2397 if test -z "$ac_err"; then
2398   rm -rf conftest*
2399   eval "ac_cv_header_$ac_safe=yes"
2400 else
2401   echo "$ac_err" >&5
2402   echo "configure: failed program was:" >&5
2403   cat conftest.$ac_ext >&5
2404   rm -rf conftest*
2405   eval "ac_cv_header_$ac_safe=no"
2406 fi
2407 rm -f conftest*
2408 fi
2409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2410   echo "$ac_t""yes" 1>&6
2411     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2412   cat >> confdefs.h <<EOF
2413 #define $ac_tr_hdr 1
2414 EOF
2415  
2416 else
2417   echo "$ac_t""no" 1>&6
2418 fi
2419 done
2420
2421 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2422 do
2423 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2424 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2425 echo "configure:2426: checking for $ac_hdr" >&5
2426 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2427   echo $ac_n "(cached) $ac_c" 1>&6
2428 else
2429   cat > conftest.$ac_ext <<EOF
2430 #line 2431 "configure"
2431 #include "confdefs.h"
2432 #include <$ac_hdr>
2433 EOF
2434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2435 { (eval echo configure:2436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2437 if test -z "$ac_err"; then
2438   rm -rf conftest*
2439   eval "ac_cv_header_$ac_safe=yes"
2440 else
2441   echo "$ac_err" >&5
2442   echo "configure: failed program was:" >&5
2443   cat conftest.$ac_ext >&5
2444   rm -rf conftest*
2445   eval "ac_cv_header_$ac_safe=no"
2446 fi
2447 rm -f conftest*
2448 fi
2449 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2450   echo "$ac_t""yes" 1>&6
2451     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2452   cat >> confdefs.h <<EOF
2453 #define $ac_tr_hdr 1
2454 EOF
2455  
2456 else
2457   echo "$ac_t""no" 1>&6
2458 fi
2459 done
2460
2461 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
2462 do
2463 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2464 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2465 echo "configure:2466: checking for $ac_hdr" >&5
2466 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2467   echo $ac_n "(cached) $ac_c" 1>&6
2468 else
2469   cat > conftest.$ac_ext <<EOF
2470 #line 2471 "configure"
2471 #include "confdefs.h"
2472 #include <$ac_hdr>
2473 EOF
2474 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2475 { (eval echo configure:2476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2476 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2477 if test -z "$ac_err"; then
2478   rm -rf conftest*
2479   eval "ac_cv_header_$ac_safe=yes"
2480 else
2481   echo "$ac_err" >&5
2482   echo "configure: failed program was:" >&5
2483   cat conftest.$ac_ext >&5
2484   rm -rf conftest*
2485   eval "ac_cv_header_$ac_safe=no"
2486 fi
2487 rm -f conftest*
2488 fi
2489 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2490   echo "$ac_t""yes" 1>&6
2491     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2492   cat >> confdefs.h <<EOF
2493 #define $ac_tr_hdr 1
2494 EOF
2495  
2496 else
2497   echo "$ac_t""no" 1>&6
2498 fi
2499 done
2500
2501 for ac_hdr in sys/syslog.h syslog.h
2502 do
2503 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2504 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2505 echo "configure:2506: checking for $ac_hdr" >&5
2506 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2507   echo $ac_n "(cached) $ac_c" 1>&6
2508 else
2509   cat > conftest.$ac_ext <<EOF
2510 #line 2511 "configure"
2511 #include "confdefs.h"
2512 #include <$ac_hdr>
2513 EOF
2514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2515 { (eval echo configure:2516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2517 if test -z "$ac_err"; then
2518   rm -rf conftest*
2519   eval "ac_cv_header_$ac_safe=yes"
2520 else
2521   echo "$ac_err" >&5
2522   echo "configure: failed program was:" >&5
2523   cat conftest.$ac_ext >&5
2524   rm -rf conftest*
2525   eval "ac_cv_header_$ac_safe=no"
2526 fi
2527 rm -f conftest*
2528 fi
2529 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2530   echo "$ac_t""yes" 1>&6
2531     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2532   cat >> confdefs.h <<EOF
2533 #define $ac_tr_hdr 1
2534 EOF
2535  
2536 else
2537   echo "$ac_t""no" 1>&6
2538 fi
2539 done
2540
2541
2542 #
2543 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2544 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2545 #
2546 case "$host_os" in
2547     *hpux*)
2548                 cat > conftest.$ac_ext <<EOF
2549 #line 2550 "configure"
2550 #include "confdefs.h"
2551 #include <shadow.h>
2552 int main() {
2553 struct spwd testme
2554 ; return 0; }
2555 EOF
2556 if { (eval echo configure:2557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2557   rm -rf conftest*
2558   ac_cv_header_shadow_h=yes
2559 else
2560   echo "configure: failed program was:" >&5
2561   cat conftest.$ac_ext >&5
2562   rm -rf conftest*
2563   ac_cv_header_shadow_h=no
2564 fi
2565 rm -f conftest*
2566                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2567                    cat >> confdefs.h <<\EOF
2568 #define HAVE_SHADOW_H 1
2569 EOF
2570
2571                 fi
2572         ;;
2573 esac
2574 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2575 do
2576 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2577 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2578 echo "configure:2579: checking for $ac_hdr" >&5
2579 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2580   echo $ac_n "(cached) $ac_c" 1>&6
2581 else
2582   cat > conftest.$ac_ext <<EOF
2583 #line 2584 "configure"
2584 #include "confdefs.h"
2585 #include <$ac_hdr>
2586 EOF
2587 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2588 { (eval echo configure:2589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2589 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2590 if test -z "$ac_err"; then
2591   rm -rf conftest*
2592   eval "ac_cv_header_$ac_safe=yes"
2593 else
2594   echo "$ac_err" >&5
2595   echo "configure: failed program was:" >&5
2596   cat conftest.$ac_ext >&5
2597   rm -rf conftest*
2598   eval "ac_cv_header_$ac_safe=no"
2599 fi
2600 rm -f conftest*
2601 fi
2602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2603   echo "$ac_t""yes" 1>&6
2604     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2605   cat >> confdefs.h <<EOF
2606 #define $ac_tr_hdr 1
2607 EOF
2608  
2609 else
2610   echo "$ac_t""no" 1>&6
2611 fi
2612 done
2613
2614 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2615 do
2616 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2617 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2618 echo "configure:2619: checking for $ac_hdr" >&5
2619 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2620   echo $ac_n "(cached) $ac_c" 1>&6
2621 else
2622   cat > conftest.$ac_ext <<EOF
2623 #line 2624 "configure"
2624 #include "confdefs.h"
2625 #include <$ac_hdr>
2626 EOF
2627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2628 { (eval echo configure:2629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2630 if test -z "$ac_err"; then
2631   rm -rf conftest*
2632   eval "ac_cv_header_$ac_safe=yes"
2633 else
2634   echo "$ac_err" >&5
2635   echo "configure: failed program was:" >&5
2636   cat conftest.$ac_ext >&5
2637   rm -rf conftest*
2638   eval "ac_cv_header_$ac_safe=no"
2639 fi
2640 rm -f conftest*
2641 fi
2642 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2643   echo "$ac_t""yes" 1>&6
2644     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2645   cat >> confdefs.h <<EOF
2646 #define $ac_tr_hdr 1
2647 EOF
2648  
2649 else
2650   echo "$ac_t""no" 1>&6
2651 fi
2652 done
2653
2654 for ac_hdr in stropts.h poll.h
2655 do
2656 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2657 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2658 echo "configure:2659: checking for $ac_hdr" >&5
2659 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2660   echo $ac_n "(cached) $ac_c" 1>&6
2661 else
2662   cat > conftest.$ac_ext <<EOF
2663 #line 2664 "configure"
2664 #include "confdefs.h"
2665 #include <$ac_hdr>
2666 EOF
2667 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2668 { (eval echo configure:2669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2669 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2670 if test -z "$ac_err"; then
2671   rm -rf conftest*
2672   eval "ac_cv_header_$ac_safe=yes"
2673 else
2674   echo "$ac_err" >&5
2675   echo "configure: failed program was:" >&5
2676   cat conftest.$ac_ext >&5
2677   rm -rf conftest*
2678   eval "ac_cv_header_$ac_safe=no"
2679 fi
2680 rm -f conftest*
2681 fi
2682 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2683   echo "$ac_t""yes" 1>&6
2684     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2685   cat >> confdefs.h <<EOF
2686 #define $ac_tr_hdr 1
2687 EOF
2688  
2689 else
2690   echo "$ac_t""no" 1>&6
2691 fi
2692 done
2693
2694 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2695 do
2696 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2697 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2698 echo "configure:2699: checking for $ac_hdr" >&5
2699 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2700   echo $ac_n "(cached) $ac_c" 1>&6
2701 else
2702   cat > conftest.$ac_ext <<EOF
2703 #line 2704 "configure"
2704 #include "confdefs.h"
2705 #include <$ac_hdr>
2706 EOF
2707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2708 { (eval echo configure:2709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2710 if test -z "$ac_err"; then
2711   rm -rf conftest*
2712   eval "ac_cv_header_$ac_safe=yes"
2713 else
2714   echo "$ac_err" >&5
2715   echo "configure: failed program was:" >&5
2716   cat conftest.$ac_ext >&5
2717   rm -rf conftest*
2718   eval "ac_cv_header_$ac_safe=no"
2719 fi
2720 rm -f conftest*
2721 fi
2722 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2723   echo "$ac_t""yes" 1>&6
2724     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2725   cat >> confdefs.h <<EOF
2726 #define $ac_tr_hdr 1
2727 EOF
2728  
2729 else
2730   echo "$ac_t""no" 1>&6
2731 fi
2732 done
2733
2734 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2735 do
2736 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2737 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2738 echo "configure:2739: checking for $ac_hdr" >&5
2739 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2740   echo $ac_n "(cached) $ac_c" 1>&6
2741 else
2742   cat > conftest.$ac_ext <<EOF
2743 #line 2744 "configure"
2744 #include "confdefs.h"
2745 #include <$ac_hdr>
2746 EOF
2747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2748 { (eval echo configure:2749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2750 if test -z "$ac_err"; then
2751   rm -rf conftest*
2752   eval "ac_cv_header_$ac_safe=yes"
2753 else
2754   echo "$ac_err" >&5
2755   echo "configure: failed program was:" >&5
2756   cat conftest.$ac_ext >&5
2757   rm -rf conftest*
2758   eval "ac_cv_header_$ac_safe=no"
2759 fi
2760 rm -f conftest*
2761 fi
2762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2763   echo "$ac_t""yes" 1>&6
2764     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2765   cat >> confdefs.h <<EOF
2766 #define $ac_tr_hdr 1
2767 EOF
2768  
2769 else
2770   echo "$ac_t""no" 1>&6
2771 fi
2772 done
2773
2774
2775 # For experimental utmp support (lastlog on some BSD-like systems)
2776 for ac_hdr in utmp.h utmpx.h lastlog.h
2777 do
2778 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2779 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2780 echo "configure:2781: checking for $ac_hdr" >&5
2781 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2782   echo $ac_n "(cached) $ac_c" 1>&6
2783 else
2784   cat > conftest.$ac_ext <<EOF
2785 #line 2786 "configure"
2786 #include "confdefs.h"
2787 #include <$ac_hdr>
2788 EOF
2789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2790 { (eval echo configure:2791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2792 if test -z "$ac_err"; then
2793   rm -rf conftest*
2794   eval "ac_cv_header_$ac_safe=yes"
2795 else
2796   echo "$ac_err" >&5
2797   echo "configure: failed program was:" >&5
2798   cat conftest.$ac_ext >&5
2799   rm -rf conftest*
2800   eval "ac_cv_header_$ac_safe=no"
2801 fi
2802 rm -f conftest*
2803 fi
2804 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2805   echo "$ac_t""yes" 1>&6
2806     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2807   cat >> confdefs.h <<EOF
2808 #define $ac_tr_hdr 1
2809 EOF
2810  
2811 else
2812   echo "$ac_t""no" 1>&6
2813 fi
2814 done
2815
2816  
2817 # For quotas on Veritas VxFS filesystems
2818 for ac_hdr in sys/fs/vx_quota.h
2819 do
2820 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2821 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2822 echo "configure:2823: checking for $ac_hdr" >&5
2823 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2824   echo $ac_n "(cached) $ac_c" 1>&6
2825 else
2826   cat > conftest.$ac_ext <<EOF
2827 #line 2828 "configure"
2828 #include "confdefs.h"
2829 #include <$ac_hdr>
2830 EOF
2831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2832 { (eval echo configure:2833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2834 if test -z "$ac_err"; then
2835   rm -rf conftest*
2836   eval "ac_cv_header_$ac_safe=yes"
2837 else
2838   echo "$ac_err" >&5
2839   echo "configure: failed program was:" >&5
2840   cat conftest.$ac_ext >&5
2841   rm -rf conftest*
2842   eval "ac_cv_header_$ac_safe=no"
2843 fi
2844 rm -f conftest*
2845 fi
2846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2847   echo "$ac_t""yes" 1>&6
2848     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2849   cat >> confdefs.h <<EOF
2850 #define $ac_tr_hdr 1
2851 EOF
2852  
2853 else
2854   echo "$ac_t""no" 1>&6
2855 fi
2856 done
2857
2858
2859 # For quotas on Linux XFS filesystems
2860 for ac_hdr in linux/xqm.h
2861 do
2862 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2863 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2864 echo "configure:2865: checking for $ac_hdr" >&5
2865 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2866   echo $ac_n "(cached) $ac_c" 1>&6
2867 else
2868   cat > conftest.$ac_ext <<EOF
2869 #line 2870 "configure"
2870 #include "confdefs.h"
2871 #include <$ac_hdr>
2872 EOF
2873 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2874 { (eval echo configure:2875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2875 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2876 if test -z "$ac_err"; then
2877   rm -rf conftest*
2878   eval "ac_cv_header_$ac_safe=yes"
2879 else
2880   echo "$ac_err" >&5
2881   echo "configure: failed program was:" >&5
2882   cat conftest.$ac_ext >&5
2883   rm -rf conftest*
2884   eval "ac_cv_header_$ac_safe=no"
2885 fi
2886 rm -f conftest*
2887 fi
2888 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2889   echo "$ac_t""yes" 1>&6
2890     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2891   cat >> confdefs.h <<EOF
2892 #define $ac_tr_hdr 1
2893 EOF
2894  
2895 else
2896   echo "$ac_t""no" 1>&6
2897 fi
2898 done
2899
2900
2901 echo $ac_n "checking size of int""... $ac_c" 1>&6
2902 echo "configure:2903: checking size of int" >&5
2903 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2904   echo $ac_n "(cached) $ac_c" 1>&6
2905 else
2906   if test "$cross_compiling" = yes; then
2907   ac_cv_sizeof_int=cross
2908 else
2909   cat > conftest.$ac_ext <<EOF
2910 #line 2911 "configure"
2911 #include "confdefs.h"
2912 #include <stdio.h>
2913 int main()
2914 {
2915   FILE *f=fopen("conftestval", "w");
2916   if (!f) return(1);
2917   fprintf(f, "%d\n", sizeof(int));
2918   return(0);
2919 }
2920 EOF
2921 if { (eval echo configure:2922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2922 then
2923   ac_cv_sizeof_int=`cat conftestval`
2924 else
2925   echo "configure: failed program was:" >&5
2926   cat conftest.$ac_ext >&5
2927   rm -fr conftest*
2928   ac_cv_sizeof_int=0
2929 fi
2930 rm -fr conftest*
2931 fi
2932
2933 fi
2934 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2935 cat >> confdefs.h <<EOF
2936 #define SIZEOF_INT $ac_cv_sizeof_int
2937 EOF
2938
2939
2940 echo $ac_n "checking size of long""... $ac_c" 1>&6
2941 echo "configure:2942: checking size of long" >&5
2942 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2943   echo $ac_n "(cached) $ac_c" 1>&6
2944 else
2945   if test "$cross_compiling" = yes; then
2946   ac_cv_sizeof_long=cross
2947 else
2948   cat > conftest.$ac_ext <<EOF
2949 #line 2950 "configure"
2950 #include "confdefs.h"
2951 #include <stdio.h>
2952 int main()
2953 {
2954   FILE *f=fopen("conftestval", "w");
2955   if (!f) return(1);
2956   fprintf(f, "%d\n", sizeof(long));
2957   return(0);
2958 }
2959 EOF
2960 if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2961 then
2962   ac_cv_sizeof_long=`cat conftestval`
2963 else
2964   echo "configure: failed program was:" >&5
2965   cat conftest.$ac_ext >&5
2966   rm -fr conftest*
2967   ac_cv_sizeof_long=0
2968 fi
2969 rm -fr conftest*
2970 fi
2971
2972 fi
2973 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2974 cat >> confdefs.h <<EOF
2975 #define SIZEOF_LONG $ac_cv_sizeof_long
2976 EOF
2977
2978
2979 echo $ac_n "checking size of short""... $ac_c" 1>&6
2980 echo "configure:2981: checking size of short" >&5
2981 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2982   echo $ac_n "(cached) $ac_c" 1>&6
2983 else
2984   if test "$cross_compiling" = yes; then
2985   ac_cv_sizeof_short=cross
2986 else
2987   cat > conftest.$ac_ext <<EOF
2988 #line 2989 "configure"
2989 #include "confdefs.h"
2990 #include <stdio.h>
2991 int main()
2992 {
2993   FILE *f=fopen("conftestval", "w");
2994   if (!f) return(1);
2995   fprintf(f, "%d\n", sizeof(short));
2996   return(0);
2997 }
2998 EOF
2999 if { (eval echo configure:3000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3000 then
3001   ac_cv_sizeof_short=`cat conftestval`
3002 else
3003   echo "configure: failed program was:" >&5
3004   cat conftest.$ac_ext >&5
3005   rm -fr conftest*
3006   ac_cv_sizeof_short=0
3007 fi
3008 rm -fr conftest*
3009 fi
3010
3011 fi
3012 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3013 cat >> confdefs.h <<EOF
3014 #define SIZEOF_SHORT $ac_cv_sizeof_short
3015 EOF
3016
3017
3018
3019 echo $ac_n "checking for working const""... $ac_c" 1>&6
3020 echo "configure:3021: checking for working const" >&5
3021 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3022   echo $ac_n "(cached) $ac_c" 1>&6
3023 else
3024   cat > conftest.$ac_ext <<EOF
3025 #line 3026 "configure"
3026 #include "confdefs.h"
3027
3028 int main() {
3029
3030 /* Ultrix mips cc rejects this.  */
3031 typedef int charset[2]; const charset x;
3032 /* SunOS 4.1.1 cc rejects this.  */
3033 char const *const *ccp;
3034 char **p;
3035 /* NEC SVR4.0.2 mips cc rejects this.  */
3036 struct point {int x, y;};
3037 static struct point const zero = {0,0};
3038 /* AIX XL C 1.02.0.0 rejects this.
3039    It does not let you subtract one const X* pointer from another in an arm
3040    of an if-expression whose if-part is not a constant expression */
3041 const char *g = "string";
3042 ccp = &g + (g ? g-g : 0);
3043 /* HPUX 7.0 cc rejects these. */
3044 ++ccp;
3045 p = (char**) ccp;
3046 ccp = (char const *const *) p;
3047 { /* SCO 3.2v4 cc rejects this.  */
3048   char *t;
3049   char const *s = 0 ? (char *) 0 : (char const *) 0;
3050
3051   *t++ = 0;
3052 }
3053 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3054   int x[] = {25, 17};
3055   const int *foo = &x[0];
3056   ++foo;
3057 }
3058 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3059   typedef const int *iptr;
3060   iptr p = 0;
3061   ++p;
3062 }
3063 { /* AIX XL C 1.02.0.0 rejects this saying
3064      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3065   struct s { int j; const int *ap[3]; };
3066   struct s *b; b->j = 5;
3067 }
3068 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3069   const int foo = 10;
3070 }
3071
3072 ; return 0; }
3073 EOF
3074 if { (eval echo configure:3075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3075   rm -rf conftest*
3076   ac_cv_c_const=yes
3077 else
3078   echo "configure: failed program was:" >&5
3079   cat conftest.$ac_ext >&5
3080   rm -rf conftest*
3081   ac_cv_c_const=no
3082 fi
3083 rm -f conftest*
3084 fi
3085
3086 echo "$ac_t""$ac_cv_c_const" 1>&6
3087 if test $ac_cv_c_const = no; then
3088   cat >> confdefs.h <<\EOF
3089 #define const 
3090 EOF
3091
3092 fi
3093
3094 echo $ac_n "checking for inline""... $ac_c" 1>&6
3095 echo "configure:3096: checking for inline" >&5
3096 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3097   echo $ac_n "(cached) $ac_c" 1>&6
3098 else
3099   ac_cv_c_inline=no
3100 for ac_kw in inline __inline__ __inline; do
3101   cat > conftest.$ac_ext <<EOF
3102 #line 3103 "configure"
3103 #include "confdefs.h"
3104
3105 int main() {
3106 } $ac_kw foo() {
3107 ; return 0; }
3108 EOF
3109 if { (eval echo configure:3110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3110   rm -rf conftest*
3111   ac_cv_c_inline=$ac_kw; break
3112 else
3113   echo "configure: failed program was:" >&5
3114   cat conftest.$ac_ext >&5
3115 fi
3116 rm -f conftest*
3117 done
3118
3119 fi
3120
3121 echo "$ac_t""$ac_cv_c_inline" 1>&6
3122 case "$ac_cv_c_inline" in
3123   inline | yes) ;;
3124   no) cat >> confdefs.h <<\EOF
3125 #define inline 
3126 EOF
3127  ;;
3128   *)  cat >> confdefs.h <<EOF
3129 #define inline $ac_cv_c_inline
3130 EOF
3131  ;;
3132 esac
3133
3134 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3135 echo "configure:3136: checking whether byte ordering is bigendian" >&5
3136 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3137   echo $ac_n "(cached) $ac_c" 1>&6
3138 else
3139   ac_cv_c_bigendian=unknown
3140 # See if sys/param.h defines the BYTE_ORDER macro.
3141 cat > conftest.$ac_ext <<EOF
3142 #line 3143 "configure"
3143 #include "confdefs.h"
3144 #include <sys/types.h>
3145 #include <sys/param.h>
3146 int main() {
3147
3148 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3149  bogus endian macros
3150 #endif
3151 ; return 0; }
3152 EOF
3153 if { (eval echo configure:3154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3154   rm -rf conftest*
3155   # It does; now see whether it defined to BIG_ENDIAN or not.
3156 cat > conftest.$ac_ext <<EOF
3157 #line 3158 "configure"
3158 #include "confdefs.h"
3159 #include <sys/types.h>
3160 #include <sys/param.h>
3161 int main() {
3162
3163 #if BYTE_ORDER != BIG_ENDIAN
3164  not big endian
3165 #endif
3166 ; return 0; }
3167 EOF
3168 if { (eval echo configure:3169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3169   rm -rf conftest*
3170   ac_cv_c_bigendian=yes
3171 else
3172   echo "configure: failed program was:" >&5
3173   cat conftest.$ac_ext >&5
3174   rm -rf conftest*
3175   ac_cv_c_bigendian=no
3176 fi
3177 rm -f conftest*
3178 else
3179   echo "configure: failed program was:" >&5
3180   cat conftest.$ac_ext >&5
3181 fi
3182 rm -f conftest*
3183 if test $ac_cv_c_bigendian = unknown; then
3184 if test "$cross_compiling" = yes; then
3185     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3186 else
3187   cat > conftest.$ac_ext <<EOF
3188 #line 3189 "configure"
3189 #include "confdefs.h"
3190 main () {
3191   /* Are we little or big endian?  From Harbison&Steele.  */
3192   union
3193   {
3194     long l;
3195     char c[sizeof (long)];
3196   } u;
3197   u.l = 1;
3198   exit (u.c[sizeof (long) - 1] == 1);
3199 }
3200 EOF
3201 if { (eval echo configure:3202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3202 then
3203   ac_cv_c_bigendian=no
3204 else
3205   echo "configure: failed program was:" >&5
3206   cat conftest.$ac_ext >&5
3207   rm -fr conftest*
3208   ac_cv_c_bigendian=yes
3209 fi
3210 rm -fr conftest*
3211 fi
3212
3213 fi
3214 fi
3215
3216 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3217 if test $ac_cv_c_bigendian = yes; then
3218   cat >> confdefs.h <<\EOF
3219 #define WORDS_BIGENDIAN 1
3220 EOF
3221
3222 fi
3223
3224 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3225 echo "configure:3226: checking whether char is unsigned" >&5
3226 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3227   echo $ac_n "(cached) $ac_c" 1>&6
3228 else
3229   if test "$GCC" = yes; then
3230   # GCC predefines this symbol on systems where it applies.
3231 cat > conftest.$ac_ext <<EOF
3232 #line 3233 "configure"
3233 #include "confdefs.h"
3234 #ifdef __CHAR_UNSIGNED__
3235   yes
3236 #endif
3237
3238 EOF
3239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3240   egrep "yes" >/dev/null 2>&1; then
3241   rm -rf conftest*
3242   ac_cv_c_char_unsigned=yes
3243 else
3244   rm -rf conftest*
3245   ac_cv_c_char_unsigned=no
3246 fi
3247 rm -f conftest*
3248
3249 else
3250 if test "$cross_compiling" = yes; then
3251     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3252 else
3253   cat > conftest.$ac_ext <<EOF
3254 #line 3255 "configure"
3255 #include "confdefs.h"
3256 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3257 #if !defined(__STDC__) || __STDC__ != 1
3258 #define volatile
3259 #endif
3260 main() {
3261   volatile char c = 255; exit(c < 0);
3262 }
3263 EOF
3264 if { (eval echo configure:3265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3265 then
3266   ac_cv_c_char_unsigned=yes
3267 else
3268   echo "configure: failed program was:" >&5
3269   cat conftest.$ac_ext >&5
3270   rm -fr conftest*
3271   ac_cv_c_char_unsigned=no
3272 fi
3273 rm -fr conftest*
3274 fi
3275
3276 fi
3277 fi
3278
3279 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3280 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3281   cat >> confdefs.h <<\EOF
3282 #define __CHAR_UNSIGNED__ 1
3283 EOF
3284
3285 fi
3286
3287
3288 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3289 echo "configure:3290: checking return type of signal handlers" >&5
3290 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3291   echo $ac_n "(cached) $ac_c" 1>&6
3292 else
3293   cat > conftest.$ac_ext <<EOF
3294 #line 3295 "configure"
3295 #include "confdefs.h"
3296 #include <sys/types.h>
3297 #include <signal.h>
3298 #ifdef signal
3299 #undef signal
3300 #endif
3301 #ifdef __cplusplus
3302 extern "C" void (*signal (int, void (*)(int)))(int);
3303 #else
3304 void (*signal ()) ();
3305 #endif
3306
3307 int main() {
3308 int i;
3309 ; return 0; }
3310 EOF
3311 if { (eval echo configure:3312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3312   rm -rf conftest*
3313   ac_cv_type_signal=void
3314 else
3315   echo "configure: failed program was:" >&5
3316   cat conftest.$ac_ext >&5
3317   rm -rf conftest*
3318   ac_cv_type_signal=int
3319 fi
3320 rm -f conftest*
3321 fi
3322
3323 echo "$ac_t""$ac_cv_type_signal" 1>&6
3324 cat >> confdefs.h <<EOF
3325 #define RETSIGTYPE $ac_cv_type_signal
3326 EOF
3327
3328
3329 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3330 echo "configure:3331: checking for uid_t in sys/types.h" >&5
3331 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3332   echo $ac_n "(cached) $ac_c" 1>&6
3333 else
3334   cat > conftest.$ac_ext <<EOF
3335 #line 3336 "configure"
3336 #include "confdefs.h"
3337 #include <sys/types.h>
3338 EOF
3339 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3340   egrep "uid_t" >/dev/null 2>&1; then
3341   rm -rf conftest*
3342   ac_cv_type_uid_t=yes
3343 else
3344   rm -rf conftest*
3345   ac_cv_type_uid_t=no
3346 fi
3347 rm -f conftest*
3348
3349 fi
3350
3351 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3352 if test $ac_cv_type_uid_t = no; then
3353   cat >> confdefs.h <<\EOF
3354 #define uid_t int
3355 EOF
3356
3357   cat >> confdefs.h <<\EOF
3358 #define gid_t int
3359 EOF
3360
3361 fi
3362
3363 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3364 echo "configure:3365: checking for mode_t" >&5
3365 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3366   echo $ac_n "(cached) $ac_c" 1>&6
3367 else
3368   cat > conftest.$ac_ext <<EOF
3369 #line 3370 "configure"
3370 #include "confdefs.h"
3371 #include <sys/types.h>
3372 #if STDC_HEADERS
3373 #include <stdlib.h>
3374 #include <stddef.h>
3375 #endif
3376 EOF
3377 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3378   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3379   rm -rf conftest*
3380   ac_cv_type_mode_t=yes
3381 else
3382   rm -rf conftest*
3383   ac_cv_type_mode_t=no
3384 fi
3385 rm -f conftest*
3386
3387 fi
3388 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3389 if test $ac_cv_type_mode_t = no; then
3390   cat >> confdefs.h <<\EOF
3391 #define mode_t int
3392 EOF
3393
3394 fi
3395
3396 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3397 echo "configure:3398: checking for off_t" >&5
3398 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3399   echo $ac_n "(cached) $ac_c" 1>&6
3400 else
3401   cat > conftest.$ac_ext <<EOF
3402 #line 3403 "configure"
3403 #include "confdefs.h"
3404 #include <sys/types.h>
3405 #if STDC_HEADERS
3406 #include <stdlib.h>
3407 #include <stddef.h>
3408 #endif
3409 EOF
3410 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3411   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3412   rm -rf conftest*
3413   ac_cv_type_off_t=yes
3414 else
3415   rm -rf conftest*
3416   ac_cv_type_off_t=no
3417 fi
3418 rm -f conftest*
3419
3420 fi
3421 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3422 if test $ac_cv_type_off_t = no; then
3423   cat >> confdefs.h <<\EOF
3424 #define off_t long
3425 EOF
3426
3427 fi
3428
3429 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3430 echo "configure:3431: checking for size_t" >&5
3431 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3432   echo $ac_n "(cached) $ac_c" 1>&6
3433 else
3434   cat > conftest.$ac_ext <<EOF
3435 #line 3436 "configure"
3436 #include "confdefs.h"
3437 #include <sys/types.h>
3438 #if STDC_HEADERS
3439 #include <stdlib.h>
3440 #include <stddef.h>
3441 #endif
3442 EOF
3443 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3444   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3445   rm -rf conftest*
3446   ac_cv_type_size_t=yes
3447 else
3448   rm -rf conftest*
3449   ac_cv_type_size_t=no
3450 fi
3451 rm -f conftest*
3452
3453 fi
3454 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3455 if test $ac_cv_type_size_t = no; then
3456   cat >> confdefs.h <<\EOF
3457 #define size_t unsigned
3458 EOF
3459
3460 fi
3461
3462 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3463 echo "configure:3464: checking for pid_t" >&5
3464 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3465   echo $ac_n "(cached) $ac_c" 1>&6
3466 else
3467   cat > conftest.$ac_ext <<EOF
3468 #line 3469 "configure"
3469 #include "confdefs.h"
3470 #include <sys/types.h>
3471 #if STDC_HEADERS
3472 #include <stdlib.h>
3473 #include <stddef.h>
3474 #endif
3475 EOF
3476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3477   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3478   rm -rf conftest*
3479   ac_cv_type_pid_t=yes
3480 else
3481   rm -rf conftest*
3482   ac_cv_type_pid_t=no
3483 fi
3484 rm -f conftest*
3485
3486 fi
3487 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3488 if test $ac_cv_type_pid_t = no; then
3489   cat >> confdefs.h <<\EOF
3490 #define pid_t int
3491 EOF
3492
3493 fi
3494
3495 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3496 echo "configure:3497: checking for st_rdev in struct stat" >&5
3497 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3498   echo $ac_n "(cached) $ac_c" 1>&6
3499 else
3500   cat > conftest.$ac_ext <<EOF
3501 #line 3502 "configure"
3502 #include "confdefs.h"
3503 #include <sys/types.h>
3504 #include <sys/stat.h>
3505 int main() {
3506 struct stat s; s.st_rdev;
3507 ; return 0; }
3508 EOF
3509 if { (eval echo configure:3510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3510   rm -rf conftest*
3511   ac_cv_struct_st_rdev=yes
3512 else
3513   echo "configure: failed program was:" >&5
3514   cat conftest.$ac_ext >&5
3515   rm -rf conftest*
3516   ac_cv_struct_st_rdev=no
3517 fi
3518 rm -f conftest*
3519 fi
3520
3521 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3522 if test $ac_cv_struct_st_rdev = yes; then
3523   cat >> confdefs.h <<\EOF
3524 #define HAVE_ST_RDEV 1
3525 EOF
3526
3527 fi
3528
3529 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3530 echo "configure:3531: checking for d_off in dirent" >&5
3531 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3532   echo $ac_n "(cached) $ac_c" 1>&6
3533 else
3534   cat > conftest.$ac_ext <<EOF
3535 #line 3536 "configure"
3536 #include "confdefs.h"
3537
3538 #include <unistd.h>
3539 #include <sys/types.h>
3540 #include <dirent.h>
3541 int main() {
3542 struct dirent d; d.d_off;
3543 ; return 0; }
3544 EOF
3545 if { (eval echo configure:3546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3546   rm -rf conftest*
3547   ac_cv_dirent_d_off=yes
3548 else
3549   echo "configure: failed program was:" >&5
3550   cat conftest.$ac_ext >&5
3551   rm -rf conftest*
3552   ac_cv_dirent_d_off=no
3553 fi
3554 rm -f conftest*
3555 fi
3556
3557 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3558 if test $ac_cv_dirent_d_off = yes; then
3559   cat >> confdefs.h <<\EOF
3560 #define HAVE_DIRENT_D_OFF 1
3561 EOF
3562
3563 fi
3564
3565 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3566 echo "configure:3567: checking for ino_t" >&5
3567 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3568   echo $ac_n "(cached) $ac_c" 1>&6
3569 else
3570   cat > conftest.$ac_ext <<EOF
3571 #line 3572 "configure"
3572 #include "confdefs.h"
3573 #include <sys/types.h>
3574 #if STDC_HEADERS
3575 #include <stdlib.h>
3576 #include <stddef.h>
3577 #endif
3578 EOF
3579 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3580   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3581   rm -rf conftest*
3582   ac_cv_type_ino_t=yes
3583 else
3584   rm -rf conftest*
3585   ac_cv_type_ino_t=no
3586 fi
3587 rm -f conftest*
3588
3589 fi
3590 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3591 if test $ac_cv_type_ino_t = no; then
3592   cat >> confdefs.h <<\EOF
3593 #define ino_t unsigned
3594 EOF
3595
3596 fi
3597
3598 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3599 echo "configure:3600: checking for loff_t" >&5
3600 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3601   echo $ac_n "(cached) $ac_c" 1>&6
3602 else
3603   cat > conftest.$ac_ext <<EOF
3604 #line 3605 "configure"
3605 #include "confdefs.h"
3606 #include <sys/types.h>
3607 #if STDC_HEADERS
3608 #include <stdlib.h>
3609 #include <stddef.h>
3610 #endif
3611 EOF
3612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3613   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3614   rm -rf conftest*
3615   ac_cv_type_loff_t=yes
3616 else
3617   rm -rf conftest*
3618   ac_cv_type_loff_t=no
3619 fi
3620 rm -f conftest*
3621
3622 fi
3623 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3624 if test $ac_cv_type_loff_t = no; then
3625   cat >> confdefs.h <<\EOF
3626 #define loff_t off_t
3627 EOF
3628
3629 fi
3630
3631 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3632 echo "configure:3633: checking for offset_t" >&5
3633 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3634   echo $ac_n "(cached) $ac_c" 1>&6
3635 else
3636   cat > conftest.$ac_ext <<EOF
3637 #line 3638 "configure"
3638 #include "confdefs.h"
3639 #include <sys/types.h>
3640 #if STDC_HEADERS
3641 #include <stdlib.h>
3642 #include <stddef.h>
3643 #endif
3644 EOF
3645 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3646   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3647   rm -rf conftest*
3648   ac_cv_type_offset_t=yes
3649 else
3650   rm -rf conftest*
3651   ac_cv_type_offset_t=no
3652 fi
3653 rm -f conftest*
3654
3655 fi
3656 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3657 if test $ac_cv_type_offset_t = no; then
3658   cat >> confdefs.h <<\EOF
3659 #define offset_t loff_t
3660 EOF
3661
3662 fi
3663
3664 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3665 echo "configure:3666: checking for ssize_t" >&5
3666 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3667   echo $ac_n "(cached) $ac_c" 1>&6
3668 else
3669   cat > conftest.$ac_ext <<EOF
3670 #line 3671 "configure"
3671 #include "confdefs.h"
3672 #include <sys/types.h>
3673 #if STDC_HEADERS
3674 #include <stdlib.h>
3675 #include <stddef.h>
3676 #endif
3677 EOF
3678 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3679   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3680   rm -rf conftest*
3681   ac_cv_type_ssize_t=yes
3682 else
3683   rm -rf conftest*
3684   ac_cv_type_ssize_t=no
3685 fi
3686 rm -f conftest*
3687
3688 fi
3689 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3690 if test $ac_cv_type_ssize_t = no; then
3691   cat >> confdefs.h <<\EOF
3692 #define ssize_t int
3693 EOF
3694
3695 fi
3696
3697 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3698 echo "configure:3699: checking for wchar_t" >&5
3699 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3700   echo $ac_n "(cached) $ac_c" 1>&6
3701 else
3702   cat > conftest.$ac_ext <<EOF
3703 #line 3704 "configure"
3704 #include "confdefs.h"
3705 #include <sys/types.h>
3706 #if STDC_HEADERS
3707 #include <stdlib.h>
3708 #include <stddef.h>
3709 #endif
3710 EOF
3711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3712   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3713   rm -rf conftest*
3714   ac_cv_type_wchar_t=yes
3715 else
3716   rm -rf conftest*
3717   ac_cv_type_wchar_t=no
3718 fi
3719 rm -f conftest*
3720
3721 fi
3722 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3723 if test $ac_cv_type_wchar_t = no; then
3724   cat >> confdefs.h <<\EOF
3725 #define wchar_t unsigned short
3726 EOF
3727
3728 fi
3729
3730
3731 ############################################
3732 # for cups support we need libcups, and a handful of header files
3733
3734 # Check whether --enable-cups or --disable-cups was given.
3735 if test "${enable_cups+set}" = set; then
3736   enableval="$enable_cups"
3737   :
3738 fi
3739
3740
3741 if test x$enable_cups != xno; then
3742         # Extract the first word of "cups-config", so it can be a program name with args.
3743 set dummy cups-config; ac_word=$2
3744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3745 echo "configure:3746: checking for $ac_word" >&5
3746 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
3747   echo $ac_n "(cached) $ac_c" 1>&6
3748 else
3749   case "$CUPS_CONFIG" in
3750   /*)
3751   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
3752   ;;
3753   ?:/*)                  
3754   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path.
3755   ;;
3756   *)
3757   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3758   ac_dummy="$PATH"
3759   for ac_dir in $ac_dummy; do 
3760     test -z "$ac_dir" && ac_dir=.
3761     if test -f $ac_dir/$ac_word; then
3762       ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word"
3763       break
3764     fi
3765   done
3766   IFS="$ac_save_ifs"
3767   ;;
3768 esac
3769 fi
3770 CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG"
3771 if test -n "$CUPS_CONFIG"; then
3772   echo "$ac_t""$CUPS_CONFIG" 1>&6
3773 else
3774   echo "$ac_t""no" 1>&6
3775 fi
3776
3777
3778         if test "x$CUPS_CONFIG" != x; then
3779                         cat >> confdefs.h <<\EOF
3780 #define HAVE_CUPS 1
3781 EOF
3782
3783                 CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
3784                 LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
3785                 PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`"
3786         fi
3787 fi
3788
3789 ############################################
3790 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3791 for ac_func in dlopen
3792 do
3793 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3794 echo "configure:3795: checking for $ac_func" >&5
3795 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3796   echo $ac_n "(cached) $ac_c" 1>&6
3797 else
3798   cat > conftest.$ac_ext <<EOF
3799 #line 3800 "configure"
3800 #include "confdefs.h"
3801 /* System header to define __stub macros and hopefully few prototypes,
3802     which can conflict with char $ac_func(); below.  */
3803 #include <assert.h>
3804 /* Override any gcc2 internal prototype to avoid an error.  */
3805 /* We use char because int might match the return type of a gcc2
3806     builtin and then its argument prototype would still apply.  */
3807 char $ac_func();
3808
3809 int main() {
3810
3811 /* The GNU C library defines this for functions which it implements
3812     to always fail with ENOSYS.  Some functions are actually named
3813     something starting with __ and the normal name is an alias.  */
3814 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3815 choke me
3816 #else
3817 $ac_func();
3818 #endif
3819
3820 ; return 0; }
3821 EOF
3822 if { (eval echo configure:3823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3823   rm -rf conftest*
3824   eval "ac_cv_func_$ac_func=yes"
3825 else
3826   echo "configure: failed program was:" >&5
3827   cat conftest.$ac_ext >&5
3828   rm -rf conftest*
3829   eval "ac_cv_func_$ac_func=no"
3830 fi
3831 rm -f conftest*
3832 fi
3833
3834 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3835   echo "$ac_t""yes" 1>&6
3836     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3837   cat >> confdefs.h <<EOF
3838 #define $ac_tr_func 1
3839 EOF
3840  
3841 else
3842   echo "$ac_t""no" 1>&6
3843 fi
3844 done
3845
3846 if test x"$ac_cv_func_dlopen" = x"no"; then
3847     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3848 echo "configure:3849: checking for dlopen in -ldl" >&5
3849 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3850 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3851   echo $ac_n "(cached) $ac_c" 1>&6
3852 else
3853   ac_save_LIBS="$LIBS"
3854 LIBS="-ldl  $LIBS"
3855 cat > conftest.$ac_ext <<EOF
3856 #line 3857 "configure"
3857 #include "confdefs.h"
3858 /* Override any gcc2 internal prototype to avoid an error.  */
3859 /* We use char because int might match the return type of a gcc2
3860     builtin and then its argument prototype would still apply.  */
3861 char dlopen();
3862
3863 int main() {
3864 dlopen()
3865 ; return 0; }
3866 EOF
3867 if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3868   rm -rf conftest*
3869   eval "ac_cv_lib_$ac_lib_var=yes"
3870 else
3871   echo "configure: failed program was:" >&5
3872   cat conftest.$ac_ext >&5
3873   rm -rf conftest*
3874   eval "ac_cv_lib_$ac_lib_var=no"
3875 fi
3876 rm -f conftest*
3877 LIBS="$ac_save_LIBS"
3878
3879 fi
3880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3881   echo "$ac_t""yes" 1>&6
3882   LIBS="$LIBS -ldl";
3883         cat >> confdefs.h <<\EOF
3884 #define HAVE_DLOPEN 1
3885 EOF
3886
3887 else
3888   echo "$ac_t""no" 1>&6
3889 fi
3890
3891 fi
3892 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3893
3894 ############################################
3895 # check if the compiler can do immediate structures
3896 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3897 echo "configure:3898: checking for immediate structures" >&5
3898 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3899   echo $ac_n "(cached) $ac_c" 1>&6
3900 else
3901   
3902     cat > conftest.$ac_ext <<EOF
3903 #line 3904 "configure"
3904 #include "confdefs.h"
3905
3906 #include <stdio.h>
3907 int main() {
3908
3909    typedef struct {unsigned x;} FOOBAR;
3910    #define X_FOOBAR(x) ((FOOBAR) { x })
3911    #define FOO_ONE X_FOOBAR(1)
3912    FOOBAR f = FOO_ONE;   
3913    static struct {
3914         FOOBAR y; 
3915         } f2[] = {
3916                 {FOO_ONE}
3917         };   
3918
3919 ; return 0; }
3920 EOF
3921 if { (eval echo configure:3922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3922   rm -rf conftest*
3923   samba_cv_immediate_structures=yes
3924 else
3925   echo "configure: failed program was:" >&5
3926   cat conftest.$ac_ext >&5
3927   rm -rf conftest*
3928   samba_cv_immediate_structures=no
3929 fi
3930 rm -f conftest*
3931 fi
3932
3933 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3934 if test x"$samba_cv_immediate_structures" = x"yes"; then
3935    cat >> confdefs.h <<\EOF
3936 #define HAVE_IMMEDIATE_STRUCTURES 1
3937 EOF
3938
3939 fi
3940
3941 ############################################
3942 # check for unix domain sockets
3943 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3944 echo "configure:3945: checking for unix domain sockets" >&5
3945 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3946   echo $ac_n "(cached) $ac_c" 1>&6
3947 else
3948   
3949     cat > conftest.$ac_ext <<EOF
3950 #line 3951 "configure"
3951 #include "confdefs.h"
3952
3953 #include <sys/types.h>
3954 #include <stdlib.h>
3955 #include <stddef.h>
3956 #include <sys/socket.h>
3957 #include <sys/un.h>
3958 int main() {
3959
3960   struct sockaddr_un sunaddr; 
3961   sunaddr.sun_family = AF_UNIX;
3962
3963 ; return 0; }
3964 EOF
3965 if { (eval echo configure:3966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3966   rm -rf conftest*
3967   samba_cv_unixsocket=yes
3968 else
3969   echo "configure: failed program was:" >&5
3970   cat conftest.$ac_ext >&5
3971   rm -rf conftest*
3972   samba_cv_unixsocket=no
3973 fi
3974 rm -f conftest*
3975 fi
3976
3977 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3978 if test x"$samba_cv_unixsocket" = x"yes"; then
3979    cat >> confdefs.h <<\EOF
3980 #define HAVE_UNIXSOCKET 1
3981 EOF
3982
3983 fi
3984
3985
3986 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3987 echo "configure:3988: checking for socklen_t type" >&5
3988 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3989   echo $ac_n "(cached) $ac_c" 1>&6
3990 else
3991   
3992     cat > conftest.$ac_ext <<EOF
3993 #line 3994 "configure"
3994 #include "confdefs.h"
3995
3996 #include <sys/types.h>
3997 #if STDC_HEADERS
3998 #include <stdlib.h>
3999 #include <stddef.h>
4000 #endif
4001 #include <sys/socket.h>
4002 int main() {
4003 socklen_t i = 0
4004 ; return 0; }
4005 EOF
4006 if { (eval echo configure:4007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4007   rm -rf conftest*
4008   samba_cv_socklen_t=yes
4009 else
4010   echo "configure: failed program was:" >&5
4011   cat conftest.$ac_ext >&5
4012   rm -rf conftest*
4013   samba_cv_socklen_t=no
4014 fi
4015 rm -f conftest*
4016 fi
4017
4018 echo "$ac_t""$samba_cv_socklen_t" 1>&6
4019 if test x"$samba_cv_socklen_t" = x"yes"; then
4020    cat >> confdefs.h <<\EOF
4021 #define HAVE_SOCKLEN_T_TYPE 1
4022 EOF
4023
4024 fi
4025
4026 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
4027 echo "configure:4028: checking for sig_atomic_t type" >&5
4028 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
4029   echo $ac_n "(cached) $ac_c" 1>&6
4030 else
4031   
4032     cat > conftest.$ac_ext <<EOF
4033 #line 4034 "configure"
4034 #include "confdefs.h"
4035
4036 #include <sys/types.h>
4037 #if STDC_HEADERS
4038 #include <stdlib.h>
4039 #include <stddef.h>
4040 #endif
4041 #include <signal.h>
4042 int main() {
4043 sig_atomic_t i = 0
4044 ; return 0; }
4045 EOF
4046 if { (eval echo configure:4047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4047   rm -rf conftest*
4048   samba_cv_sig_atomic_t=yes
4049 else
4050   echo "configure: failed program was:" >&5
4051   cat conftest.$ac_ext >&5
4052   rm -rf conftest*
4053   samba_cv_sig_atomic_t=no
4054 fi
4055 rm -f conftest*
4056 fi
4057
4058 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4059 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4060    cat >> confdefs.h <<\EOF
4061 #define HAVE_SIG_ATOMIC_T_TYPE 1
4062 EOF
4063
4064 fi
4065
4066 # stupid headers have the functions but no declaration. grrrr.
4067
4068  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4069 echo "configure:4070: checking for errno declaration" >&5
4070 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4071   echo $ac_n "(cached) $ac_c" 1>&6
4072 else
4073   
4074     cat > conftest.$ac_ext <<EOF
4075 #line 4076 "configure"
4076 #include "confdefs.h"
4077 #include <errno.h>
4078 int main() {
4079 int i = (int)errno
4080 ; return 0; }
4081 EOF
4082 if { (eval echo configure:4083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4083   rm -rf conftest*
4084   ac_cv_have_errno_decl=yes
4085 else
4086   echo "configure: failed program was:" >&5
4087   cat conftest.$ac_ext >&5
4088   rm -rf conftest*
4089   ac_cv_have_errno_decl=no
4090 fi
4091 rm -f conftest*
4092 fi
4093
4094 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4095  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4096     cat >> confdefs.h <<\EOF
4097 #define HAVE_ERRNO_DECL 1
4098 EOF
4099
4100  fi
4101
4102
4103  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4104 echo "configure:4105: checking for setresuid declaration" >&5
4105 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4106   echo $ac_n "(cached) $ac_c" 1>&6
4107 else
4108   
4109     cat > conftest.$ac_ext <<EOF
4110 #line 4111 "configure"
4111 #include "confdefs.h"
4112 #include <unistd.h>
4113 int main() {
4114 int i = (int)setresuid
4115 ; return 0; }
4116 EOF
4117 if { (eval echo configure:4118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4118   rm -rf conftest*
4119   ac_cv_have_setresuid_decl=yes
4120 else
4121   echo "configure: failed program was:" >&5
4122   cat conftest.$ac_ext >&5
4123   rm -rf conftest*
4124   ac_cv_have_setresuid_decl=no
4125 fi
4126 rm -f conftest*
4127 fi
4128
4129 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4130  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4131     cat >> confdefs.h <<\EOF
4132 #define HAVE_SETRESUID_DECL 1
4133 EOF
4134
4135  fi
4136
4137
4138  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4139 echo "configure:4140: checking for setresgid declaration" >&5
4140 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4141   echo $ac_n "(cached) $ac_c" 1>&6
4142 else
4143   
4144     cat > conftest.$ac_ext <<EOF
4145 #line 4146 "configure"
4146 #include "confdefs.h"
4147 #include <unistd.h>
4148 int main() {
4149 int i = (int)setresgid
4150 ; return 0; }
4151 EOF
4152 if { (eval echo configure:4153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4153   rm -rf conftest*
4154   ac_cv_have_setresgid_decl=yes
4155 else
4156   echo "configure: failed program was:" >&5
4157   cat conftest.$ac_ext >&5
4158   rm -rf conftest*
4159   ac_cv_have_setresgid_decl=no
4160 fi
4161 rm -f conftest*
4162 fi
4163
4164 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4165  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4166     cat >> confdefs.h <<\EOF
4167 #define HAVE_SETRESGID_DECL 1
4168 EOF
4169
4170  fi
4171
4172
4173  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4174 echo "configure:4175: checking for asprintf declaration" >&5
4175 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4176   echo $ac_n "(cached) $ac_c" 1>&6
4177 else
4178   
4179     cat > conftest.$ac_ext <<EOF
4180 #line 4181 "configure"
4181 #include "confdefs.h"
4182 #include <stdio.h>
4183 int main() {
4184 int i = (int)asprintf
4185 ; return 0; }
4186 EOF
4187 if { (eval echo configure:4188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4188   rm -rf conftest*
4189   ac_cv_have_asprintf_decl=yes
4190 else
4191   echo "configure: failed program was:" >&5
4192   cat conftest.$ac_ext >&5
4193   rm -rf conftest*
4194   ac_cv_have_asprintf_decl=no
4195 fi
4196 rm -f conftest*
4197 fi
4198
4199 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4200  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4201     cat >> confdefs.h <<\EOF
4202 #define HAVE_ASPRINTF_DECL 1
4203 EOF
4204
4205  fi
4206
4207
4208  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4209 echo "configure:4210: checking for vasprintf declaration" >&5
4210 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4211   echo $ac_n "(cached) $ac_c" 1>&6
4212 else
4213   
4214     cat > conftest.$ac_ext <<EOF
4215 #line 4216 "configure"
4216 #include "confdefs.h"
4217 #include <stdio.h>
4218 int main() {
4219 int i = (int)vasprintf
4220 ; return 0; }
4221 EOF
4222 if { (eval echo configure:4223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4223   rm -rf conftest*
4224   ac_cv_have_vasprintf_decl=yes
4225 else
4226   echo "configure: failed program was:" >&5
4227   cat conftest.$ac_ext >&5
4228   rm -rf conftest*
4229   ac_cv_have_vasprintf_decl=no
4230 fi
4231 rm -f conftest*
4232 fi
4233
4234 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4235  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4236     cat >> confdefs.h <<\EOF
4237 #define HAVE_VASPRINTF_DECL 1
4238 EOF
4239
4240  fi
4241
4242
4243  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4244 echo "configure:4245: checking for vsnprintf declaration" >&5
4245 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4246   echo $ac_n "(cached) $ac_c" 1>&6
4247 else
4248   
4249     cat > conftest.$ac_ext <<EOF
4250 #line 4251 "configure"
4251 #include "confdefs.h"
4252 #include <stdio.h>
4253 int main() {
4254 int i = (int)vsnprintf
4255 ; return 0; }
4256 EOF
4257 if { (eval echo configure:4258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4258   rm -rf conftest*
4259   ac_cv_have_vsnprintf_decl=yes
4260 else
4261   echo "configure: failed program was:" >&5
4262   cat conftest.$ac_ext >&5
4263   rm -rf conftest*
4264   ac_cv_have_vsnprintf_decl=no
4265 fi
4266 rm -f conftest*
4267 fi
4268
4269 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4270  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4271     cat >> confdefs.h <<\EOF
4272 #define HAVE_VSNPRINTF_DECL 1
4273 EOF
4274
4275  fi
4276
4277
4278  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4279 echo "configure:4280: checking for snprintf declaration" >&5
4280 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4281   echo $ac_n "(cached) $ac_c" 1>&6
4282 else
4283   
4284     cat > conftest.$ac_ext <<EOF
4285 #line 4286 "configure"
4286 #include "confdefs.h"
4287 #include <stdio.h>
4288 int main() {
4289 int i = (int)snprintf
4290 ; return 0; }
4291 EOF
4292 if { (eval echo configure:4293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4293   rm -rf conftest*
4294   ac_cv_have_snprintf_decl=yes
4295 else
4296   echo "configure: failed program was:" >&5
4297   cat conftest.$ac_ext >&5
4298   rm -rf conftest*
4299   ac_cv_have_snprintf_decl=no
4300 fi
4301 rm -f conftest*
4302 fi
4303
4304 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4305  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4306     cat >> confdefs.h <<\EOF
4307 #define HAVE_SNPRINTF_DECL 1
4308 EOF
4309
4310  fi
4311
4312
4313 # and glibc has setresuid under linux but the function does
4314 # nothing until kernel 2.1.44! very dumb.
4315 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4316 echo "configure:4317: checking for real setresuid" >&5
4317 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4318   echo $ac_n "(cached) $ac_c" 1>&6
4319 else
4320   
4321     if test "$cross_compiling" = yes; then
4322   samba_cv_have_setresuid=cross
4323 else
4324   cat > conftest.$ac_ext <<EOF
4325 #line 4326 "configure"
4326 #include "confdefs.h"
4327 #include <errno.h>
4328 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4329 EOF
4330 if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4331 then
4332   samba_cv_have_setresuid=yes
4333 else
4334   echo "configure: failed program was:" >&5
4335   cat conftest.$ac_ext >&5
4336   rm -fr conftest*
4337   samba_cv_have_setresuid=no
4338 fi
4339 rm -fr conftest*
4340 fi
4341
4342 fi
4343
4344 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4345 if test x"$samba_cv_have_setresuid" = x"yes"; then
4346     cat >> confdefs.h <<\EOF
4347 #define HAVE_SETRESUID 1
4348 EOF
4349
4350 fi
4351
4352 # Do the same check for setresguid...
4353 #
4354 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4355 echo "configure:4356: checking for real setresgid" >&5
4356 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4357   echo $ac_n "(cached) $ac_c" 1>&6
4358 else
4359   
4360     if test "$cross_compiling" = yes; then
4361   samba_cv_have_setresgid=cross
4362 else
4363   cat > conftest.$ac_ext <<EOF
4364 #line 4365 "configure"
4365 #include "confdefs.h"
4366 #include <unistd.h>
4367 #include <errno.h>
4368 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4369 EOF
4370 if { (eval echo configure:4371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4371 then
4372   samba_cv_have_setresgid=yes
4373 else
4374   echo "configure: failed program was:" >&5
4375   cat conftest.$ac_ext >&5
4376   rm -fr conftest*
4377   samba_cv_have_setresgid=no
4378 fi
4379 rm -fr conftest*
4380 fi
4381
4382 fi
4383
4384 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4385 if test x"$samba_cv_have_setresgid" = x"yes"; then
4386     cat >> confdefs.h <<\EOF
4387 #define HAVE_SETRESGID 1
4388 EOF
4389
4390 fi
4391
4392 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4393 echo "configure:4394: checking for 8-bit clean memcmp" >&5
4394 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4395   echo $ac_n "(cached) $ac_c" 1>&6
4396 else
4397   if test "$cross_compiling" = yes; then
4398   ac_cv_func_memcmp_clean=no
4399 else
4400   cat > conftest.$ac_ext <<EOF
4401 #line 4402 "configure"
4402 #include "confdefs.h"
4403
4404 main()
4405 {
4406   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4407   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4408 }
4409
4410 EOF
4411 if { (eval echo configure:4412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4412 then
4413   ac_cv_func_memcmp_clean=yes
4414 else
4415   echo "configure: failed program was:" >&5
4416   cat conftest.$ac_ext >&5
4417   rm -fr conftest*
4418   ac_cv_func_memcmp_clean=no
4419 fi
4420 rm -fr conftest*
4421 fi
4422
4423 fi
4424
4425 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4426 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4427
4428
4429 ###############################################
4430 # test for where we get crypt() from
4431 for ac_func in crypt
4432 do
4433 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4434 echo "configure:4435: checking for $ac_func" >&5
4435 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4436   echo $ac_n "(cached) $ac_c" 1>&6
4437 else
4438   cat > conftest.$ac_ext <<EOF
4439 #line 4440 "configure"
4440 #include "confdefs.h"
4441 /* System header to define __stub macros and hopefully few prototypes,
4442     which can conflict with char $ac_func(); below.  */
4443 #include <assert.h>
4444 /* Override any gcc2 internal prototype to avoid an error.  */
4445 /* We use char because int might match the return type of a gcc2
4446     builtin and then its argument prototype would still apply.  */
4447 char $ac_func();
4448
4449 int main() {
4450
4451 /* The GNU C library defines this for functions which it implements
4452     to always fail with ENOSYS.  Some functions are actually named
4453     something starting with __ and the normal name is an alias.  */
4454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4455 choke me
4456 #else
4457 $ac_func();
4458 #endif
4459
4460 ; return 0; }
4461 EOF
4462 if { (eval echo configure:4463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4463   rm -rf conftest*
4464   eval "ac_cv_func_$ac_func=yes"
4465 else
4466   echo "configure: failed program was:" >&5
4467   cat conftest.$ac_ext >&5
4468   rm -rf conftest*
4469   eval "ac_cv_func_$ac_func=no"
4470 fi
4471 rm -f conftest*
4472 fi
4473
4474 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4475   echo "$ac_t""yes" 1>&6
4476     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4477   cat >> confdefs.h <<EOF
4478 #define $ac_tr_func 1
4479 EOF
4480  
4481 else
4482   echo "$ac_t""no" 1>&6
4483 fi
4484 done
4485
4486 if test x"$ac_cv_func_crypt" = x"no"; then
4487     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4488 echo "configure:4489: checking for crypt in -lcrypt" >&5
4489 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4490 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4491   echo $ac_n "(cached) $ac_c" 1>&6
4492 else
4493   ac_save_LIBS="$LIBS"
4494 LIBS="-lcrypt  $LIBS"
4495 cat > conftest.$ac_ext <<EOF
4496 #line 4497 "configure"
4497 #include "confdefs.h"
4498 /* Override any gcc2 internal prototype to avoid an error.  */
4499 /* We use char because int might match the return type of a gcc2
4500     builtin and then its argument prototype would still apply.  */
4501 char crypt();
4502
4503 int main() {
4504 crypt()
4505 ; return 0; }
4506 EOF
4507 if { (eval echo configure:4508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4508   rm -rf conftest*
4509   eval "ac_cv_lib_$ac_lib_var=yes"
4510 else
4511   echo "configure: failed program was:" >&5
4512   cat conftest.$ac_ext >&5
4513   rm -rf conftest*
4514   eval "ac_cv_lib_$ac_lib_var=no"
4515 fi
4516 rm -f conftest*
4517 LIBS="$ac_save_LIBS"
4518
4519 fi
4520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4521   echo "$ac_t""yes" 1>&6
4522   LIBS="$LIBS -lcrypt";
4523         cat >> confdefs.h <<\EOF
4524 #define HAVE_CRYPT 1
4525 EOF
4526
4527 else
4528   echo "$ac_t""no" 1>&6
4529 fi
4530
4531 fi
4532
4533
4534 ###############################################
4535 # Readline included by default unless explicitly asked not to
4536 test "${with_readline+set}" != "set" && with_readline=yes
4537
4538 # test for where we get readline() from
4539 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4540 echo "configure:4541: checking whether to use readline" >&5
4541 # Check whether --with-readline or --without-readline was given.
4542 if test "${with_readline+set}" = set; then
4543   withval="$with_readline"
4544     case "$with_readline" in
4545   yes)
4546     echo "$ac_t""yes" 1>&6
4547
4548     for ac_hdr in readline.h history.h readline/readline.h
4549 do
4550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4552 echo "configure:4553: checking for $ac_hdr" >&5
4553 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4554   echo $ac_n "(cached) $ac_c" 1>&6
4555 else
4556   cat > conftest.$ac_ext <<EOF
4557 #line 4558 "configure"
4558 #include "confdefs.h"
4559 #include <$ac_hdr>
4560 EOF
4561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4562 { (eval echo configure:4563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4564 if test -z "$ac_err"; then
4565   rm -rf conftest*
4566   eval "ac_cv_header_$ac_safe=yes"
4567 else
4568   echo "$ac_err" >&5
4569   echo "configure: failed program was:" >&5
4570   cat conftest.$ac_ext >&5
4571   rm -rf conftest*
4572   eval "ac_cv_header_$ac_safe=no"
4573 fi
4574 rm -f conftest*
4575 fi
4576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4577   echo "$ac_t""yes" 1>&6
4578     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4579   cat >> confdefs.h <<EOF
4580 #define $ac_tr_hdr 1
4581 EOF
4582  
4583 else
4584   echo "$ac_t""no" 1>&6
4585 fi
4586 done
4587
4588     for ac_hdr in readline/history.h
4589 do
4590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4592 echo "configure:4593: checking for $ac_hdr" >&5
4593 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4594   echo $ac_n "(cached) $ac_c" 1>&6
4595 else
4596   cat > conftest.$ac_ext <<EOF
4597 #line 4598 "configure"
4598 #include "confdefs.h"
4599 #include <$ac_hdr>
4600 EOF
4601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4602 { (eval echo configure:4603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4604 if test -z "$ac_err"; then
4605   rm -rf conftest*
4606   eval "ac_cv_header_$ac_safe=yes"
4607 else
4608   echo "$ac_err" >&5
4609   echo "configure: failed program was:" >&5
4610   cat conftest.$ac_ext >&5
4611   rm -rf conftest*
4612   eval "ac_cv_header_$ac_safe=no"
4613 fi
4614 rm -f conftest*
4615 fi
4616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4617   echo "$ac_t""yes" 1>&6
4618     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4619   cat >> confdefs.h <<EOF
4620 #define $ac_tr_hdr 1
4621 EOF
4622  
4623 else
4624   echo "$ac_t""no" 1>&6
4625 fi
4626 done
4627
4628
4629     for ac_hdr in readline.h readline/readline.h
4630 do
4631 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4632 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4633 echo "configure:4634: checking for $ac_hdr" >&5
4634 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4635   echo $ac_n "(cached) $ac_c" 1>&6
4636 else
4637   cat > conftest.$ac_ext <<EOF
4638 #line 4639 "configure"
4639 #include "confdefs.h"
4640 #include <$ac_hdr>
4641 EOF
4642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4643 { (eval echo configure:4644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4645 if test -z "$ac_err"; then
4646   rm -rf conftest*
4647   eval "ac_cv_header_$ac_safe=yes"
4648 else
4649   echo "$ac_err" >&5
4650   echo "configure: failed program was:" >&5
4651   cat conftest.$ac_ext >&5
4652   rm -rf conftest*
4653   eval "ac_cv_header_$ac_safe=no"
4654 fi
4655 rm -f conftest*
4656 fi
4657 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4658   echo "$ac_t""yes" 1>&6
4659     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4660   cat >> confdefs.h <<EOF
4661 #define $ac_tr_hdr 1
4662 EOF
4663  
4664       for termlib in ncurses curses termcap terminfo termlib; do
4665        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4666 echo "configure:4667: checking for tgetent in -l${termlib}" >&5
4667 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4668 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4669   echo $ac_n "(cached) $ac_c" 1>&6
4670 else
4671   ac_save_LIBS="$LIBS"
4672 LIBS="-l${termlib}  $LIBS"
4673 cat > conftest.$ac_ext <<EOF
4674 #line 4675 "configure"
4675 #include "confdefs.h"
4676 /* Override any gcc2 internal prototype to avoid an error.  */
4677 /* We use char because int might match the return type of a gcc2
4678     builtin and then its argument prototype would still apply.  */
4679 char tgetent();
4680
4681 int main() {
4682 tgetent()
4683 ; return 0; }
4684 EOF
4685 if { (eval echo configure:4686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4686   rm -rf conftest*
4687   eval "ac_cv_lib_$ac_lib_var=yes"
4688 else
4689   echo "configure: failed program was:" >&5
4690   cat conftest.$ac_ext >&5
4691   rm -rf conftest*
4692   eval "ac_cv_lib_$ac_lib_var=no"
4693 fi
4694 rm -f conftest*
4695 LIBS="$ac_save_LIBS"
4696
4697 fi
4698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4699   echo "$ac_t""yes" 1>&6
4700   TERMLIBS="-l${termlib}"; break
4701 else
4702   echo "$ac_t""no" 1>&6
4703 fi
4704
4705       done
4706       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4707 echo "configure:4708: checking for rl_callback_handler_install in -lreadline" >&5
4708 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4709 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4710   echo $ac_n "(cached) $ac_c" 1>&6
4711 else
4712   ac_save_LIBS="$LIBS"
4713 LIBS="-lreadline $TERMLIBS $LIBS"
4714 cat > conftest.$ac_ext <<EOF
4715 #line 4716 "configure"
4716 #include "confdefs.h"
4717 /* Override any gcc2 internal prototype to avoid an error.  */
4718 /* We use char because int might match the return type of a gcc2
4719     builtin and then its argument prototype would still apply.  */
4720 char rl_callback_handler_install();
4721
4722 int main() {
4723 rl_callback_handler_install()
4724 ; return 0; }
4725 EOF
4726 if { (eval echo configure:4727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4727   rm -rf conftest*
4728   eval "ac_cv_lib_$ac_lib_var=yes"
4729 else
4730   echo "configure: failed program was:" >&5
4731   cat conftest.$ac_ext >&5
4732   rm -rf conftest*
4733   eval "ac_cv_lib_$ac_lib_var=no"
4734 fi
4735 rm -f conftest*
4736 LIBS="$ac_save_LIBS"
4737
4738 fi
4739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4740   echo "$ac_t""yes" 1>&6
4741   TERMLIBS="-lreadline $TERMLIBS"
4742        cat >> confdefs.h <<\EOF
4743 #define HAVE_LIBREADLINE 1
4744 EOF
4745
4746        break
4747 else
4748   echo "$ac_t""no" 1>&6
4749 TERMLIBS=
4750 fi
4751
4752 else
4753   echo "$ac_t""no" 1>&6
4754 fi
4755 done
4756
4757     ;;
4758   no)
4759     echo "$ac_t""no" 1>&6
4760     ;;
4761   *)
4762     echo "$ac_t""yes" 1>&6
4763
4764     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4765     # alternate readline path
4766     _ldflags=${LDFLAGS}
4767     _cppflags=${CPPFLAGS}
4768
4769     # Add additional search path
4770     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4771     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4772
4773     for ac_hdr in readline.h history.h readline/readline.h
4774 do
4775 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4776 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4777 echo "configure:4778: checking for $ac_hdr" >&5
4778 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4779   echo $ac_n "(cached) $ac_c" 1>&6
4780 else
4781   cat > conftest.$ac_ext <<EOF
4782 #line 4783 "configure"
4783 #include "confdefs.h"
4784 #include <$ac_hdr>
4785 EOF
4786 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4787 { (eval echo configure:4788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4788 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4789 if test -z "$ac_err"; then
4790   rm -rf conftest*
4791   eval "ac_cv_header_$ac_safe=yes"
4792 else
4793   echo "$ac_err" >&5
4794   echo "configure: failed program was:" >&5
4795   cat conftest.$ac_ext >&5
4796   rm -rf conftest*
4797   eval "ac_cv_header_$ac_safe=no"
4798 fi
4799 rm -f conftest*
4800 fi
4801 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4802   echo "$ac_t""yes" 1>&6
4803     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4804   cat >> confdefs.h <<EOF
4805 #define $ac_tr_hdr 1
4806 EOF
4807  
4808 else
4809   echo "$ac_t""no" 1>&6
4810 fi
4811 done
4812
4813     for ac_hdr in readline/history.h
4814 do
4815 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4816 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4817 echo "configure:4818: checking for $ac_hdr" >&5
4818 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4819   echo $ac_n "(cached) $ac_c" 1>&6
4820 else
4821   cat > conftest.$ac_ext <<EOF
4822 #line 4823 "configure"
4823 #include "confdefs.h"
4824 #include <$ac_hdr>
4825 EOF
4826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4827 { (eval echo configure:4828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4829 if test -z "$ac_err"; then
4830   rm -rf conftest*
4831   eval "ac_cv_header_$ac_safe=yes"
4832 else
4833   echo "$ac_err" >&5
4834   echo "configure: failed program was:" >&5
4835   cat conftest.$ac_ext >&5
4836   rm -rf conftest*
4837   eval "ac_cv_header_$ac_safe=no"
4838 fi
4839 rm -f conftest*
4840 fi
4841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4842   echo "$ac_t""yes" 1>&6
4843     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4844   cat >> confdefs.h <<EOF
4845 #define $ac_tr_hdr 1
4846 EOF
4847  
4848 else
4849   echo "$ac_t""no" 1>&6
4850 fi
4851 done
4852
4853
4854     for ac_hdr in readline.h readline/readline.h
4855 do
4856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4858 echo "configure:4859: checking for $ac_hdr" >&5
4859 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4860   echo $ac_n "(cached) $ac_c" 1>&6
4861 else
4862   cat > conftest.$ac_ext <<EOF
4863 #line 4864 "configure"
4864 #include "confdefs.h"
4865 #include <$ac_hdr>
4866 EOF
4867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4868 { (eval echo configure:4869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4870 if test -z "$ac_err"; then
4871   rm -rf conftest*
4872   eval "ac_cv_header_$ac_safe=yes"
4873 else
4874   echo "$ac_err" >&5
4875   echo "configure: failed program was:" >&5
4876   cat conftest.$ac_ext >&5
4877   rm -rf conftest*
4878   eval "ac_cv_header_$ac_safe=no"
4879 fi
4880 rm -f conftest*
4881 fi
4882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4883   echo "$ac_t""yes" 1>&6
4884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4885   cat >> confdefs.h <<EOF
4886 #define $ac_tr_hdr 1
4887 EOF
4888  
4889       for termlib in ncurses curses termcap terminfo termlib; do
4890        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4891 echo "configure:4892: checking for tgetent in -l${termlib}" >&5
4892 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4893 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4894   echo $ac_n "(cached) $ac_c" 1>&6
4895 else
4896   ac_save_LIBS="$LIBS"
4897 LIBS="-l${termlib}  $LIBS"
4898 cat > conftest.$ac_ext <<EOF
4899 #line 4900 "configure"
4900 #include "confdefs.h"
4901 /* Override any gcc2 internal prototype to avoid an error.  */
4902 /* We use char because int might match the return type of a gcc2
4903     builtin and then its argument prototype would still apply.  */
4904 char tgetent();
4905
4906 int main() {
4907 tgetent()
4908 ; return 0; }
4909 EOF
4910 if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4911   rm -rf conftest*
4912   eval "ac_cv_lib_$ac_lib_var=yes"
4913 else
4914   echo "configure: failed program was:" >&5
4915   cat conftest.$ac_ext >&5
4916   rm -rf conftest*
4917   eval "ac_cv_lib_$ac_lib_var=no"
4918 fi
4919 rm -f conftest*
4920 LIBS="$ac_save_LIBS"
4921
4922 fi
4923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4924   echo "$ac_t""yes" 1>&6
4925   TERMLIBS="-l${termlib}"; break
4926 else
4927   echo "$ac_t""no" 1>&6
4928 fi
4929
4930       done
4931       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4932 echo "configure:4933: checking for rl_callback_handler_install in -lreadline" >&5
4933 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4934 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4935   echo $ac_n "(cached) $ac_c" 1>&6
4936 else
4937   ac_save_LIBS="$LIBS"
4938 LIBS="-lreadline $TERMLIBS $LIBS"
4939 cat > conftest.$ac_ext <<EOF
4940 #line 4941 "configure"
4941 #include "confdefs.h"
4942 /* Override any gcc2 internal prototype to avoid an error.  */
4943 /* We use char because int might match the return type of a gcc2
4944     builtin and then its argument prototype would still apply.  */
4945 char rl_callback_handler_install();
4946
4947 int main() {
4948 rl_callback_handler_install()
4949 ; return 0; }
4950 EOF
4951 if { (eval echo configure:4952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4952   rm -rf conftest*
4953   eval "ac_cv_lib_$ac_lib_var=yes"
4954 else
4955   echo "configure: failed program was:" >&5
4956   cat conftest.$ac_ext >&5
4957   rm -rf conftest*
4958   eval "ac_cv_lib_$ac_lib_var=no"
4959 fi
4960 rm -f conftest*
4961 LIBS="$ac_save_LIBS"
4962
4963 fi
4964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4965   echo "$ac_t""yes" 1>&6
4966   TERMLDFLAGS="-L$with_readline/lib"
4967        TERMCPPFLAGS="-I$with_readline/include"
4968        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4969        TERMLIBS="-lreadline $TERMLIBS"
4970        cat >> confdefs.h <<\EOF
4971 #define HAVE_LIBREADLINE 1
4972 EOF
4973
4974        break
4975 else
4976   echo "$ac_t""no" 1>&6
4977 TERMLIBS= CPPFLAGS=$_cppflags
4978 fi
4979
4980 else
4981   echo "$ac_t""no" 1>&6
4982 fi
4983 done
4984
4985
4986     LDFLAGS=$_ldflags
4987     ;;
4988   esac
4989 else
4990   echo "$ac_t""no" 1>&6
4991
4992 fi
4993
4994
4995
4996
4997 # The readline API changed slightly from readline3 to readline4, so
4998 # code will generate warnings on one of them unless we have a few
4999 # special cases.
5000 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
5001 echo "configure:5002: checking for rl_completion_matches in -lreadline" >&5
5002 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
5003 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5004   echo $ac_n "(cached) $ac_c" 1>&6
5005 else
5006   ac_save_LIBS="$LIBS"
5007 LIBS="-lreadline $TERMLIBS $LIBS"
5008 cat > conftest.$ac_ext <<EOF
5009 #line 5010 "configure"
5010 #include "confdefs.h"
5011 /* Override any gcc2 internal prototype to avoid an error.  */
5012 /* We use char because int might match the return type of a gcc2
5013     builtin and then its argument prototype would still apply.  */
5014 char rl_completion_matches();
5015
5016 int main() {
5017 rl_completion_matches()
5018 ; return 0; }
5019 EOF
5020 if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5021   rm -rf conftest*
5022   eval "ac_cv_lib_$ac_lib_var=yes"
5023 else
5024   echo "configure: failed program was:" >&5
5025   cat conftest.$ac_ext >&5
5026   rm -rf conftest*
5027   eval "ac_cv_lib_$ac_lib_var=no"
5028 fi
5029 rm -f conftest*
5030 LIBS="$ac_save_LIBS"
5031
5032 fi
5033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5034   echo "$ac_t""yes" 1>&6
5035   cat >> confdefs.h <<\EOF
5036 #define HAVE_NEW_LIBREADLINE 1
5037 EOF
5038
5039 else
5040   echo "$ac_t""no" 1>&6
5041 fi
5042
5043
5044 # The following test taken from the cvs sources
5045 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5046 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5047 # libsocket.so which has a bad implementation of gethostbyname (it
5048 # only looks in /etc/hosts), so we only look for -lsocket if we need
5049 # it.
5050 for ac_func in connect
5051 do
5052 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5053 echo "configure:5054: checking for $ac_func" >&5
5054 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5055   echo $ac_n "(cached) $ac_c" 1>&6
5056 else
5057   cat > conftest.$ac_ext <<EOF
5058 #line 5059 "configure"
5059 #include "confdefs.h"
5060 /* System header to define __stub macros and hopefully few prototypes,
5061     which can conflict with char $ac_func(); below.  */
5062 #include <assert.h>
5063 /* Override any gcc2 internal prototype to avoid an error.  */
5064 /* We use char because int might match the return type of a gcc2
5065     builtin and then its argument prototype would still apply.  */
5066 char $ac_func();
5067
5068 int main() {
5069
5070 /* The GNU C library defines this for functions which it implements
5071     to always fail with ENOSYS.  Some functions are actually named
5072     something starting with __ and the normal name is an alias.  */
5073 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5074 choke me
5075 #else
5076 $ac_func();
5077 #endif
5078
5079 ; return 0; }
5080 EOF
5081 if { (eval echo configure:5082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5082   rm -rf conftest*
5083   eval "ac_cv_func_$ac_func=yes"
5084 else
5085   echo "configure: failed program was:" >&5
5086   cat conftest.$ac_ext >&5
5087   rm -rf conftest*
5088   eval "ac_cv_func_$ac_func=no"
5089 fi
5090 rm -f conftest*
5091 fi
5092
5093 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5094   echo "$ac_t""yes" 1>&6
5095     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5096   cat >> confdefs.h <<EOF
5097 #define $ac_tr_func 1
5098 EOF
5099  
5100 else
5101   echo "$ac_t""no" 1>&6
5102 fi
5103 done
5104
5105 if test x"$ac_cv_func_connect" = x"no"; then
5106     case "$LIBS" in
5107     *-lnsl*) ;;
5108     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5109 echo "configure:5110: checking for printf in -lnsl_s" >&5
5110 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5111 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5112   echo $ac_n "(cached) $ac_c" 1>&6
5113 else
5114   ac_save_LIBS="$LIBS"
5115 LIBS="-lnsl_s  $LIBS"
5116 cat > conftest.$ac_ext <<EOF
5117 #line 5118 "configure"
5118 #include "confdefs.h"
5119 /* Override any gcc2 internal prototype to avoid an error.  */
5120 /* We use char because int might match the return type of a gcc2
5121     builtin and then its argument prototype would still apply.  */
5122 char printf();
5123
5124 int main() {
5125 printf()
5126 ; return 0; }
5127 EOF
5128 if { (eval echo configure:5129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5129   rm -rf conftest*
5130   eval "ac_cv_lib_$ac_lib_var=yes"
5131 else
5132   echo "configure: failed program was:" >&5
5133   cat conftest.$ac_ext >&5
5134   rm -rf conftest*
5135   eval "ac_cv_lib_$ac_lib_var=no"
5136 fi
5137 rm -f conftest*
5138 LIBS="$ac_save_LIBS"
5139
5140 fi
5141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5142   echo "$ac_t""yes" 1>&6
5143     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5144     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5145   cat >> confdefs.h <<EOF
5146 #define $ac_tr_lib 1
5147 EOF
5148
5149   LIBS="-lnsl_s $LIBS"
5150
5151 else
5152   echo "$ac_t""no" 1>&6
5153 fi
5154  ;;
5155     esac
5156     case "$LIBS" in
5157     *-lnsl*) ;;
5158     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5159 echo "configure:5160: checking for printf in -lnsl" >&5
5160 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5161 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5162   echo $ac_n "(cached) $ac_c" 1>&6
5163 else
5164   ac_save_LIBS="$LIBS"
5165 LIBS="-lnsl  $LIBS"
5166 cat > conftest.$ac_ext <<EOF
5167 #line 5168 "configure"
5168 #include "confdefs.h"
5169 /* Override any gcc2 internal prototype to avoid an error.  */
5170 /* We use char because int might match the return type of a gcc2
5171     builtin and then its argument prototype would still apply.  */
5172 char printf();
5173
5174 int main() {
5175 printf()
5176 ; return 0; }
5177 EOF
5178 if { (eval echo configure:5179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5179   rm -rf conftest*
5180   eval "ac_cv_lib_$ac_lib_var=yes"
5181 else
5182   echo "configure: failed program was:" >&5
5183   cat conftest.$ac_ext >&5
5184   rm -rf conftest*
5185   eval "ac_cv_lib_$ac_lib_var=no"
5186 fi
5187 rm -f conftest*
5188 LIBS="$ac_save_LIBS"
5189
5190 fi
5191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5192   echo "$ac_t""yes" 1>&6
5193     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5194     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5195   cat >> confdefs.h <<EOF
5196 #define $ac_tr_lib 1
5197 EOF
5198
5199   LIBS="-lnsl $LIBS"
5200
5201 else
5202   echo "$ac_t""no" 1>&6
5203 fi
5204  ;;
5205     esac
5206     case "$LIBS" in
5207     *-lsocket*) ;;
5208     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5209 echo "configure:5210: checking for connect in -lsocket" >&5
5210 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5211 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5212   echo $ac_n "(cached) $ac_c" 1>&6
5213 else
5214   ac_save_LIBS="$LIBS"
5215 LIBS="-lsocket  $LIBS"
5216 cat > conftest.$ac_ext <<EOF
5217 #line 5218 "configure"
5218 #include "confdefs.h"
5219 /* Override any gcc2 internal prototype to avoid an error.  */
5220 /* We use char because int might match the return type of a gcc2
5221     builtin and then its argument prototype would still apply.  */
5222 char connect();
5223
5224 int main() {
5225 connect()
5226 ; return 0; }
5227 EOF
5228 if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5229   rm -rf conftest*
5230   eval "ac_cv_lib_$ac_lib_var=yes"
5231 else
5232   echo "configure: failed program was:" >&5
5233   cat conftest.$ac_ext >&5
5234   rm -rf conftest*
5235   eval "ac_cv_lib_$ac_lib_var=no"
5236 fi
5237 rm -f conftest*
5238 LIBS="$ac_save_LIBS"
5239
5240 fi
5241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5242   echo "$ac_t""yes" 1>&6
5243     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5244     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5245   cat >> confdefs.h <<EOF
5246 #define $ac_tr_lib 1
5247 EOF
5248
5249   LIBS="-lsocket $LIBS"
5250
5251 else
5252   echo "$ac_t""no" 1>&6
5253 fi
5254  ;;
5255     esac
5256     case "$LIBS" in
5257     *-linet*) ;;
5258     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5259 echo "configure:5260: checking for connect in -linet" >&5
5260 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5261 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5262   echo $ac_n "(cached) $ac_c" 1>&6
5263 else
5264   ac_save_LIBS="$LIBS"
5265 LIBS="-linet  $LIBS"
5266 cat > conftest.$ac_ext <<EOF
5267 #line 5268 "configure"
5268 #include "confdefs.h"
5269 /* Override any gcc2 internal prototype to avoid an error.  */
5270 /* We use char because int might match the return type of a gcc2
5271     builtin and then its argument prototype would still apply.  */
5272 char connect();
5273
5274 int main() {
5275 connect()
5276 ; return 0; }
5277 EOF
5278 if { (eval echo configure:5279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5279   rm -rf conftest*
5280   eval "ac_cv_lib_$ac_lib_var=yes"
5281 else
5282   echo "configure: failed program was:" >&5
5283   cat conftest.$ac_ext >&5
5284   rm -rf conftest*
5285   eval "ac_cv_lib_$ac_lib_var=no"
5286 fi
5287 rm -f conftest*
5288 LIBS="$ac_save_LIBS"
5289
5290 fi
5291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5292   echo "$ac_t""yes" 1>&6
5293     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5294     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5295   cat >> confdefs.h <<EOF
5296 #define $ac_tr_lib 1
5297 EOF
5298
5299   LIBS="-linet $LIBS"
5300
5301 else
5302   echo "$ac_t""no" 1>&6
5303 fi
5304  ;;
5305     esac
5306             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5307        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5308         # ac_cv_func_connect=yes
5309         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5310         cat >> confdefs.h <<\EOF
5311 #define HAVE_CONNECT 1
5312 EOF
5313
5314     fi
5315 fi
5316
5317 ###############################################
5318 # test for where we get get_yp_default_domain() from
5319 for ac_func in yp_get_default_domain
5320 do
5321 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5322 echo "configure:5323: checking for $ac_func" >&5
5323 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5324   echo $ac_n "(cached) $ac_c" 1>&6
5325 else
5326   cat > conftest.$ac_ext <<EOF
5327 #line 5328 "configure"
5328 #include "confdefs.h"
5329 /* System header to define __stub macros and hopefully few prototypes,
5330     which can conflict with char $ac_func(); below.  */
5331 #include <assert.h>
5332 /* Override any gcc2 internal prototype to avoid an error.  */
5333 /* We use char because int might match the return type of a gcc2
5334     builtin and then its argument prototype would still apply.  */
5335 char $ac_func();
5336
5337 int main() {
5338
5339 /* The GNU C library defines this for functions which it implements
5340     to always fail with ENOSYS.  Some functions are actually named
5341     something starting with __ and the normal name is an alias.  */
5342 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5343 choke me
5344 #else
5345 $ac_func();
5346 #endif
5347
5348 ; return 0; }
5349 EOF
5350 if { (eval echo configure:5351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5351   rm -rf conftest*
5352   eval "ac_cv_func_$ac_func=yes"
5353 else
5354   echo "configure: failed program was:" >&5
5355   cat conftest.$ac_ext >&5
5356   rm -rf conftest*
5357   eval "ac_cv_func_$ac_func=no"
5358 fi
5359 rm -f conftest*
5360 fi
5361
5362 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5363   echo "$ac_t""yes" 1>&6
5364     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5365   cat >> confdefs.h <<EOF
5366 #define $ac_tr_func 1
5367 EOF
5368  
5369 else
5370   echo "$ac_t""no" 1>&6
5371 fi
5372 done
5373
5374 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5375         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5376 echo "configure:5377: checking for yp_get_default_domain in -lnsl" >&5
5377 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5378 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5379   echo $ac_n "(cached) $ac_c" 1>&6
5380 else
5381   ac_save_LIBS="$LIBS"
5382 LIBS="-lnsl  $LIBS"
5383 cat > conftest.$ac_ext <<EOF
5384 #line 5385 "configure"
5385 #include "confdefs.h"
5386 /* Override any gcc2 internal prototype to avoid an error.  */
5387 /* We use char because int might match the return type of a gcc2
5388     builtin and then its argument prototype would still apply.  */
5389 char yp_get_default_domain();
5390
5391 int main() {
5392 yp_get_default_domain()
5393 ; return 0; }
5394 EOF
5395 if { (eval echo configure:5396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5396   rm -rf conftest*
5397   eval "ac_cv_lib_$ac_lib_var=yes"
5398 else
5399   echo "configure: failed program was:" >&5
5400   cat conftest.$ac_ext >&5
5401   rm -rf conftest*
5402   eval "ac_cv_lib_$ac_lib_var=no"
5403 fi
5404 rm -f conftest*
5405 LIBS="$ac_save_LIBS"
5406
5407 fi
5408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5409   echo "$ac_t""yes" 1>&6
5410   LIBS="$LIBS -lnsl";
5411         cat >> confdefs.h <<\EOF
5412 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5413 EOF
5414
5415 else
5416   echo "$ac_t""no" 1>&6
5417 fi
5418  
5419 fi
5420
5421 # Check if we have execl, if not we need to compile smbrun.
5422 for ac_func in execl
5423 do
5424 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5425 echo "configure:5426: checking for $ac_func" >&5
5426 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5427   echo $ac_n "(cached) $ac_c" 1>&6
5428 else
5429   cat > conftest.$ac_ext <<EOF
5430 #line 5431 "configure"
5431 #include "confdefs.h"
5432 /* System header to define __stub macros and hopefully few prototypes,
5433     which can conflict with char $ac_func(); below.  */
5434 #include <assert.h>
5435 /* Override any gcc2 internal prototype to avoid an error.  */
5436 /* We use char because int might match the return type of a gcc2
5437     builtin and then its argument prototype would still apply.  */
5438 char $ac_func();
5439
5440 int main() {
5441
5442 /* The GNU C library defines this for functions which it implements
5443     to always fail with ENOSYS.  Some functions are actually named
5444     something starting with __ and the normal name is an alias.  */
5445 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5446 choke me
5447 #else
5448 $ac_func();
5449 #endif
5450
5451 ; return 0; }
5452 EOF
5453 if { (eval echo configure:5454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5454   rm -rf conftest*
5455   eval "ac_cv_func_$ac_func=yes"
5456 else
5457   echo "configure: failed program was:" >&5
5458   cat conftest.$ac_ext >&5
5459   rm -rf conftest*
5460   eval "ac_cv_func_$ac_func=no"
5461 fi
5462 rm -f conftest*
5463 fi
5464
5465 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5466   echo "$ac_t""yes" 1>&6
5467     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5468   cat >> confdefs.h <<EOF
5469 #define $ac_tr_func 1
5470 EOF
5471  
5472 else
5473   echo "$ac_t""no" 1>&6
5474 fi
5475 done
5476
5477 if test x"$ac_cv_func_execl" = x"no"; then
5478     RUNPROG="bin/smbrun"
5479 else
5480     RUNPROG=""
5481 fi
5482
5483 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5484 do
5485 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5486 echo "configure:5487: checking for $ac_func" >&5
5487 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5488   echo $ac_n "(cached) $ac_c" 1>&6
5489 else
5490   cat > conftest.$ac_ext <<EOF
5491 #line 5492 "configure"
5492 #include "confdefs.h"
5493 /* System header to define __stub macros and hopefully few prototypes,
5494     which can conflict with char $ac_func(); below.  */
5495 #include <assert.h>
5496 /* Override any gcc2 internal prototype to avoid an error.  */
5497 /* We use char because int might match the return type of a gcc2
5498     builtin and then its argument prototype would still apply.  */
5499 char $ac_func();
5500
5501 int main() {
5502
5503 /* The GNU C library defines this for functions which it implements
5504     to always fail with ENOSYS.  Some functions are actually named
5505     something starting with __ and the normal name is an alias.  */
5506 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5507 choke me
5508 #else
5509 $ac_func();
5510 #endif
5511
5512 ; return 0; }
5513 EOF
5514 if { (eval echo configure:5515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5515   rm -rf conftest*
5516   eval "ac_cv_func_$ac_func=yes"
5517 else
5518   echo "configure: failed program was:" >&5
5519   cat conftest.$ac_ext >&5
5520   rm -rf conftest*
5521   eval "ac_cv_func_$ac_func=no"
5522 fi
5523 rm -f conftest*
5524 fi
5525
5526 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5527   echo "$ac_t""yes" 1>&6
5528     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5529   cat >> confdefs.h <<EOF
5530 #define $ac_tr_func 1
5531 EOF
5532  
5533 else
5534   echo "$ac_t""no" 1>&6
5535 fi
5536 done
5537
5538 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5539 do
5540 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5541 echo "configure:5542: checking for $ac_func" >&5
5542 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5543   echo $ac_n "(cached) $ac_c" 1>&6
5544 else
5545   cat > conftest.$ac_ext <<EOF
5546 #line 5547 "configure"
5547 #include "confdefs.h"
5548 /* System header to define __stub macros and hopefully few prototypes,
5549     which can conflict with char $ac_func(); below.  */
5550 #include <assert.h>
5551 /* Override any gcc2 internal prototype to avoid an error.  */
5552 /* We use char because int might match the return type of a gcc2
5553     builtin and then its argument prototype would still apply.  */
5554 char $ac_func();
5555
5556 int main() {
5557
5558 /* The GNU C library defines this for functions which it implements
5559     to always fail with ENOSYS.  Some functions are actually named
5560     something starting with __ and the normal name is an alias.  */
5561 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5562 choke me
5563 #else
5564 $ac_func();
5565 #endif
5566
5567 ; return 0; }
5568 EOF
5569 if { (eval echo configure:5570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5570   rm -rf conftest*
5571   eval "ac_cv_func_$ac_func=yes"
5572 else
5573   echo "configure: failed program was:" >&5
5574   cat conftest.$ac_ext >&5
5575   rm -rf conftest*
5576   eval "ac_cv_func_$ac_func=no"
5577 fi
5578 rm -f conftest*
5579 fi
5580
5581 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5582   echo "$ac_t""yes" 1>&6
5583     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5584   cat >> confdefs.h <<EOF
5585 #define $ac_tr_func 1
5586 EOF
5587  
5588 else
5589   echo "$ac_t""no" 1>&6
5590 fi
5591 done
5592
5593 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5594 do
5595 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5596 echo "configure:5597: checking for $ac_func" >&5
5597 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5598   echo $ac_n "(cached) $ac_c" 1>&6
5599 else
5600   cat > conftest.$ac_ext <<EOF
5601 #line 5602 "configure"
5602 #include "confdefs.h"
5603 /* System header to define __stub macros and hopefully few prototypes,
5604     which can conflict with char $ac_func(); below.  */
5605 #include <assert.h>
5606 /* Override any gcc2 internal prototype to avoid an error.  */
5607 /* We use char because int might match the return type of a gcc2
5608     builtin and then its argument prototype would still apply.  */
5609 char $ac_func();
5610
5611 int main() {
5612
5613 /* The GNU C library defines this for functions which it implements
5614     to always fail with ENOSYS.  Some functions are actually named
5615     something starting with __ and the normal name is an alias.  */
5616 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5617 choke me
5618 #else
5619 $ac_func();
5620 #endif
5621
5622 ; return 0; }
5623 EOF
5624 if { (eval echo configure:5625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5625   rm -rf conftest*
5626   eval "ac_cv_func_$ac_func=yes"
5627 else
5628   echo "configure: failed program was:" >&5
5629   cat conftest.$ac_ext >&5
5630   rm -rf conftest*
5631   eval "ac_cv_func_$ac_func=no"
5632 fi
5633 rm -f conftest*
5634 fi
5635
5636 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5637   echo "$ac_t""yes" 1>&6
5638     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5639   cat >> confdefs.h <<EOF
5640 #define $ac_tr_func 1
5641 EOF
5642  
5643 else
5644   echo "$ac_t""no" 1>&6
5645 fi
5646 done
5647
5648 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5649 do
5650 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5651 echo "configure:5652: checking for $ac_func" >&5
5652 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5653   echo $ac_n "(cached) $ac_c" 1>&6
5654 else
5655   cat > conftest.$ac_ext <<EOF
5656 #line 5657 "configure"
5657 #include "confdefs.h"
5658 /* System header to define __stub macros and hopefully few prototypes,
5659     which can conflict with char $ac_func(); below.  */
5660 #include <assert.h>
5661 /* Override any gcc2 internal prototype to avoid an error.  */
5662 /* We use char because int might match the return type of a gcc2
5663     builtin and then its argument prototype would still apply.  */
5664 char $ac_func();
5665
5666 int main() {
5667
5668 /* The GNU C library defines this for functions which it implements
5669     to always fail with ENOSYS.  Some functions are actually named
5670     something starting with __ and the normal name is an alias.  */
5671 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5672 choke me
5673 #else
5674 $ac_func();
5675 #endif
5676
5677 ; return 0; }
5678 EOF
5679 if { (eval echo configure:5680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5680   rm -rf conftest*
5681   eval "ac_cv_func_$ac_func=yes"
5682 else
5683   echo "configure: failed program was:" >&5
5684   cat conftest.$ac_ext >&5
5685   rm -rf conftest*
5686   eval "ac_cv_func_$ac_func=no"
5687 fi
5688 rm -f conftest*
5689 fi
5690
5691 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5692   echo "$ac_t""yes" 1>&6
5693     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5694   cat >> confdefs.h <<EOF
5695 #define $ac_tr_func 1
5696 EOF
5697  
5698 else
5699   echo "$ac_t""no" 1>&6
5700 fi
5701 done
5702
5703 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5704 do
5705 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5706 echo "configure:5707: checking for $ac_func" >&5
5707 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5708   echo $ac_n "(cached) $ac_c" 1>&6
5709 else
5710   cat > conftest.$ac_ext <<EOF
5711 #line 5712 "configure"
5712 #include "confdefs.h"
5713 /* System header to define __stub macros and hopefully few prototypes,
5714     which can conflict with char $ac_func(); below.  */
5715 #include <assert.h>
5716 /* Override any gcc2 internal prototype to avoid an error.  */
5717 /* We use char because int might match the return type of a gcc2
5718     builtin and then its argument prototype would still apply.  */
5719 char $ac_func();
5720
5721 int main() {
5722
5723 /* The GNU C library defines this for functions which it implements
5724     to always fail with ENOSYS.  Some functions are actually named
5725     something starting with __ and the normal name is an alias.  */
5726 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5727 choke me
5728 #else
5729 $ac_func();
5730 #endif
5731
5732 ; return 0; }
5733 EOF
5734 if { (eval echo configure:5735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5735   rm -rf conftest*
5736   eval "ac_cv_func_$ac_func=yes"
5737 else
5738   echo "configure: failed program was:" >&5
5739   cat conftest.$ac_ext >&5
5740   rm -rf conftest*
5741   eval "ac_cv_func_$ac_func=no"
5742 fi
5743 rm -f conftest*
5744 fi
5745
5746 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5747   echo "$ac_t""yes" 1>&6
5748     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5749   cat >> confdefs.h <<EOF
5750 #define $ac_tr_func 1
5751 EOF
5752  
5753 else
5754   echo "$ac_t""no" 1>&6
5755 fi
5756 done
5757
5758 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5759 do
5760 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5761 echo "configure:5762: checking for $ac_func" >&5
5762 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5763   echo $ac_n "(cached) $ac_c" 1>&6
5764 else
5765   cat > conftest.$ac_ext <<EOF
5766 #line 5767 "configure"
5767 #include "confdefs.h"
5768 /* System header to define __stub macros and hopefully few prototypes,
5769     which can conflict with char $ac_func(); below.  */
5770 #include <assert.h>
5771 /* Override any gcc2 internal prototype to avoid an error.  */
5772 /* We use char because int might match the return type of a gcc2
5773     builtin and then its argument prototype would still apply.  */
5774 char $ac_func();
5775
5776 int main() {
5777
5778 /* The GNU C library defines this for functions which it implements
5779     to always fail with ENOSYS.  Some functions are actually named
5780     something starting with __ and the normal name is an alias.  */
5781 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5782 choke me
5783 #else
5784 $ac_func();
5785 #endif
5786
5787 ; return 0; }
5788 EOF
5789 if { (eval echo configure:5790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5790   rm -rf conftest*
5791   eval "ac_cv_func_$ac_func=yes"
5792 else
5793   echo "configure: failed program was:" >&5
5794   cat conftest.$ac_ext >&5
5795   rm -rf conftest*
5796   eval "ac_cv_func_$ac_func=no"
5797 fi
5798 rm -f conftest*
5799 fi
5800
5801 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5802   echo "$ac_t""yes" 1>&6
5803     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5804   cat >> confdefs.h <<EOF
5805 #define $ac_tr_func 1
5806 EOF
5807  
5808 else
5809   echo "$ac_t""no" 1>&6
5810 fi
5811 done
5812
5813 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5814 do
5815 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5816 echo "configure:5817: checking for $ac_func" >&5
5817 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5818   echo $ac_n "(cached) $ac_c" 1>&6
5819 else
5820   cat > conftest.$ac_ext <<EOF
5821 #line 5822 "configure"
5822 #include "confdefs.h"
5823 /* System header to define __stub macros and hopefully few prototypes,
5824     which can conflict with char $ac_func(); below.  */
5825 #include <assert.h>
5826 /* Override any gcc2 internal prototype to avoid an error.  */
5827 /* We use char because int might match the return type of a gcc2
5828     builtin and then its argument prototype would still apply.  */
5829 char $ac_func();
5830
5831 int main() {
5832
5833 /* The GNU C library defines this for functions which it implements
5834     to always fail with ENOSYS.  Some functions are actually named
5835     something starting with __ and the normal name is an alias.  */
5836 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5837 choke me
5838 #else
5839 $ac_func();
5840 #endif
5841
5842 ; return 0; }
5843 EOF
5844 if { (eval echo configure:5845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5845   rm -rf conftest*
5846   eval "ac_cv_func_$ac_func=yes"
5847 else
5848   echo "configure: failed program was:" >&5
5849   cat conftest.$ac_ext >&5
5850   rm -rf conftest*
5851   eval "ac_cv_func_$ac_func=no"
5852 fi
5853 rm -f conftest*
5854 fi
5855
5856 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5857   echo "$ac_t""yes" 1>&6
5858     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5859   cat >> confdefs.h <<EOF
5860 #define $ac_tr_func 1
5861 EOF
5862  
5863 else
5864   echo "$ac_t""no" 1>&6
5865 fi
5866 done
5867
5868 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5869 do
5870 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5871 echo "configure:5872: checking for $ac_func" >&5
5872 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5873   echo $ac_n "(cached) $ac_c" 1>&6
5874 else
5875   cat > conftest.$ac_ext <<EOF
5876 #line 5877 "configure"
5877 #include "confdefs.h"
5878 /* System header to define __stub macros and hopefully few prototypes,
5879     which can conflict with char $ac_func(); below.  */
5880 #include <assert.h>
5881 /* Override any gcc2 internal prototype to avoid an error.  */
5882 /* We use char because int might match the return type of a gcc2
5883     builtin and then its argument prototype would still apply.  */
5884 char $ac_func();
5885
5886 int main() {
5887
5888 /* The GNU C library defines this for functions which it implements
5889     to always fail with ENOSYS.  Some functions are actually named
5890     something starting with __ and the normal name is an alias.  */
5891 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5892 choke me
5893 #else
5894 $ac_func();
5895 #endif
5896
5897 ; return 0; }
5898 EOF
5899 if { (eval echo configure:5900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5900   rm -rf conftest*
5901   eval "ac_cv_func_$ac_func=yes"
5902 else
5903   echo "configure: failed program was:" >&5
5904   cat conftest.$ac_ext >&5
5905   rm -rf conftest*
5906   eval "ac_cv_func_$ac_func=no"
5907 fi
5908 rm -f conftest*
5909 fi
5910
5911 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5912   echo "$ac_t""yes" 1>&6
5913     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5914   cat >> confdefs.h <<EOF
5915 #define $ac_tr_func 1
5916 EOF
5917  
5918 else
5919   echo "$ac_t""no" 1>&6
5920 fi
5921 done
5922
5923 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5924 do
5925 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5926 echo "configure:5927: checking for $ac_func" >&5
5927 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5928   echo $ac_n "(cached) $ac_c" 1>&6
5929 else
5930   cat > conftest.$ac_ext <<EOF
5931 #line 5932 "configure"
5932 #include "confdefs.h"
5933 /* System header to define __stub macros and hopefully few prototypes,
5934     which can conflict with char $ac_func(); below.  */
5935 #include <assert.h>
5936 /* Override any gcc2 internal prototype to avoid an error.  */
5937 /* We use char because int might match the return type of a gcc2
5938     builtin and then its argument prototype would still apply.  */
5939 char $ac_func();
5940
5941 int main() {
5942
5943 /* The GNU C library defines this for functions which it implements
5944     to always fail with ENOSYS.  Some functions are actually named
5945     something starting with __ and the normal name is an alias.  */
5946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5947 choke me
5948 #else
5949 $ac_func();
5950 #endif
5951
5952 ; return 0; }
5953 EOF
5954 if { (eval echo configure:5955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5955   rm -rf conftest*
5956   eval "ac_cv_func_$ac_func=yes"
5957 else
5958   echo "configure: failed program was:" >&5
5959   cat conftest.$ac_ext >&5
5960   rm -rf conftest*
5961   eval "ac_cv_func_$ac_func=no"
5962 fi
5963 rm -f conftest*
5964 fi
5965
5966 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5967   echo "$ac_t""yes" 1>&6
5968     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5969   cat >> confdefs.h <<EOF
5970 #define $ac_tr_func 1
5971 EOF
5972  
5973 else
5974   echo "$ac_t""no" 1>&6
5975 fi
5976 done
5977
5978 for ac_func in syslog vsyslog getgrouplist
5979 do
5980 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5981 echo "configure:5982: checking for $ac_func" >&5
5982 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5983   echo $ac_n "(cached) $ac_c" 1>&6
5984 else
5985   cat > conftest.$ac_ext <<EOF
5986 #line 5987 "configure"
5987 #include "confdefs.h"
5988 /* System header to define __stub macros and hopefully few prototypes,
5989     which can conflict with char $ac_func(); below.  */
5990 #include <assert.h>
5991 /* Override any gcc2 internal prototype to avoid an error.  */
5992 /* We use char because int might match the return type of a gcc2
5993     builtin and then its argument prototype would still apply.  */
5994 char $ac_func();
5995
5996 int main() {
5997
5998 /* The GNU C library defines this for functions which it implements
5999     to always fail with ENOSYS.  Some functions are actually named
6000     something starting with __ and the normal name is an alias.  */
6001 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6002 choke me
6003 #else
6004 $ac_func();
6005 #endif
6006
6007 ; return 0; }
6008 EOF
6009 if { (eval echo configure:6010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6010   rm -rf conftest*
6011   eval "ac_cv_func_$ac_func=yes"
6012 else
6013   echo "configure: failed program was:" >&5
6014   cat conftest.$ac_ext >&5
6015   rm -rf conftest*
6016   eval "ac_cv_func_$ac_func=no"
6017 fi
6018 rm -f conftest*
6019 fi
6020
6021 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6022   echo "$ac_t""yes" 1>&6
6023     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6024   cat >> confdefs.h <<EOF
6025 #define $ac_tr_func 1
6026 EOF
6027  
6028 else
6029   echo "$ac_t""no" 1>&6
6030 fi
6031 done
6032
6033 # setbuffer is needed for smbtorture
6034 for ac_func in setbuffer
6035 do
6036 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6037 echo "configure:6038: checking for $ac_func" >&5
6038 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6039   echo $ac_n "(cached) $ac_c" 1>&6
6040 else
6041   cat > conftest.$ac_ext <<EOF
6042 #line 6043 "configure"
6043 #include "confdefs.h"
6044 /* System header to define __stub macros and hopefully few prototypes,
6045     which can conflict with char $ac_func(); below.  */
6046 #include <assert.h>
6047 /* Override any gcc2 internal prototype to avoid an error.  */
6048 /* We use char because int might match the return type of a gcc2
6049     builtin and then its argument prototype would still apply.  */
6050 char $ac_func();
6051
6052 int main() {
6053
6054 /* The GNU C library defines this for functions which it implements
6055     to always fail with ENOSYS.  Some functions are actually named
6056     something starting with __ and the normal name is an alias.  */
6057 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6058 choke me
6059 #else
6060 $ac_func();
6061 #endif
6062
6063 ; return 0; }
6064 EOF
6065 if { (eval echo configure:6066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6066   rm -rf conftest*
6067   eval "ac_cv_func_$ac_func=yes"
6068 else
6069   echo "configure: failed program was:" >&5
6070   cat conftest.$ac_ext >&5
6071   rm -rf conftest*
6072   eval "ac_cv_func_$ac_func=no"
6073 fi
6074 rm -f conftest*
6075 fi
6076
6077 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6078   echo "$ac_t""yes" 1>&6
6079     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6080   cat >> confdefs.h <<EOF
6081 #define $ac_tr_func 1
6082 EOF
6083  
6084 else
6085   echo "$ac_t""no" 1>&6
6086 fi
6087 done
6088
6089
6090 # syscall() is needed for smbwrapper.
6091 for ac_func in syscall
6092 do
6093 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6094 echo "configure:6095: checking for $ac_func" >&5
6095 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6096   echo $ac_n "(cached) $ac_c" 1>&6
6097 else
6098   cat > conftest.$ac_ext <<EOF
6099 #line 6100 "configure"
6100 #include "confdefs.h"
6101 /* System header to define __stub macros and hopefully few prototypes,
6102     which can conflict with char $ac_func(); below.  */
6103 #include <assert.h>
6104 /* Override any gcc2 internal prototype to avoid an error.  */
6105 /* We use char because int might match the return type of a gcc2
6106     builtin and then its argument prototype would still apply.  */
6107 char $ac_func();
6108
6109 int main() {
6110
6111 /* The GNU C library defines this for functions which it implements
6112     to always fail with ENOSYS.  Some functions are actually named
6113     something starting with __ and the normal name is an alias.  */
6114 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6115 choke me
6116 #else
6117 $ac_func();
6118 #endif
6119
6120 ; return 0; }
6121 EOF
6122 if { (eval echo configure:6123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6123   rm -rf conftest*
6124   eval "ac_cv_func_$ac_func=yes"
6125 else
6126   echo "configure: failed program was:" >&5
6127   cat conftest.$ac_ext >&5
6128   rm -rf conftest*
6129   eval "ac_cv_func_$ac_func=no"
6130 fi
6131 rm -f conftest*
6132 fi
6133
6134 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6135   echo "$ac_t""yes" 1>&6
6136     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6137   cat >> confdefs.h <<EOF
6138 #define $ac_tr_func 1
6139 EOF
6140  
6141 else
6142   echo "$ac_t""no" 1>&6
6143 fi
6144 done
6145
6146
6147 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6148 do
6149 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6150 echo "configure:6151: checking for $ac_func" >&5
6151 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6152   echo $ac_n "(cached) $ac_c" 1>&6
6153 else
6154   cat > conftest.$ac_ext <<EOF
6155 #line 6156 "configure"
6156 #include "confdefs.h"
6157 /* System header to define __stub macros and hopefully few prototypes,
6158     which can conflict with char $ac_func(); below.  */
6159 #include <assert.h>
6160 /* Override any gcc2 internal prototype to avoid an error.  */
6161 /* We use char because int might match the return type of a gcc2
6162     builtin and then its argument prototype would still apply.  */
6163 char $ac_func();
6164
6165 int main() {
6166
6167 /* The GNU C library defines this for functions which it implements
6168     to always fail with ENOSYS.  Some functions are actually named
6169     something starting with __ and the normal name is an alias.  */
6170 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6171 choke me
6172 #else
6173 $ac_func();
6174 #endif
6175
6176 ; return 0; }
6177 EOF
6178 if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6179   rm -rf conftest*
6180   eval "ac_cv_func_$ac_func=yes"
6181 else
6182   echo "configure: failed program was:" >&5
6183   cat conftest.$ac_ext >&5
6184   rm -rf conftest*
6185   eval "ac_cv_func_$ac_func=no"
6186 fi
6187 rm -f conftest*
6188 fi
6189
6190 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6191   echo "$ac_t""yes" 1>&6
6192     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6193   cat >> confdefs.h <<EOF
6194 #define $ac_tr_func 1
6195 EOF
6196  
6197 else
6198   echo "$ac_t""no" 1>&6
6199 fi
6200 done
6201
6202 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6203 do
6204 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6205 echo "configure:6206: checking for $ac_func" >&5
6206 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6207   echo $ac_n "(cached) $ac_c" 1>&6
6208 else
6209   cat > conftest.$ac_ext <<EOF
6210 #line 6211 "configure"
6211 #include "confdefs.h"
6212 /* System header to define __stub macros and hopefully few prototypes,
6213     which can conflict with char $ac_func(); below.  */
6214 #include <assert.h>
6215 /* Override any gcc2 internal prototype to avoid an error.  */
6216 /* We use char because int might match the return type of a gcc2
6217     builtin and then its argument prototype would still apply.  */
6218 char $ac_func();
6219
6220 int main() {
6221
6222 /* The GNU C library defines this for functions which it implements
6223     to always fail with ENOSYS.  Some functions are actually named
6224     something starting with __ and the normal name is an alias.  */
6225 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6226 choke me
6227 #else
6228 $ac_func();
6229 #endif
6230
6231 ; return 0; }
6232 EOF
6233 if { (eval echo configure:6234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6234   rm -rf conftest*
6235   eval "ac_cv_func_$ac_func=yes"
6236 else
6237   echo "configure: failed program was:" >&5
6238   cat conftest.$ac_ext >&5
6239   rm -rf conftest*
6240   eval "ac_cv_func_$ac_func=no"
6241 fi
6242 rm -f conftest*
6243 fi
6244
6245 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6246   echo "$ac_t""yes" 1>&6
6247     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6248   cat >> confdefs.h <<EOF
6249 #define $ac_tr_func 1
6250 EOF
6251  
6252 else
6253   echo "$ac_t""no" 1>&6
6254 fi
6255 done
6256
6257 for ac_func in __getcwd _getcwd
6258 do
6259 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6260 echo "configure:6261: checking for $ac_func" >&5
6261 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6262   echo $ac_n "(cached) $ac_c" 1>&6
6263 else
6264   cat > conftest.$ac_ext <<EOF
6265 #line 6266 "configure"
6266 #include "confdefs.h"
6267 /* System header to define __stub macros and hopefully few prototypes,
6268     which can conflict with char $ac_func(); below.  */
6269 #include <assert.h>
6270 /* Override any gcc2 internal prototype to avoid an error.  */
6271 /* We use char because int might match the return type of a gcc2
6272     builtin and then its argument prototype would still apply.  */
6273 char $ac_func();
6274
6275 int main() {
6276
6277 /* The GNU C library defines this for functions which it implements
6278     to always fail with ENOSYS.  Some functions are actually named
6279     something starting with __ and the normal name is an alias.  */
6280 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6281 choke me
6282 #else
6283 $ac_func();
6284 #endif
6285
6286 ; return 0; }
6287 EOF
6288 if { (eval echo configure:6289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6289   rm -rf conftest*
6290   eval "ac_cv_func_$ac_func=yes"
6291 else
6292   echo "configure: failed program was:" >&5
6293   cat conftest.$ac_ext >&5
6294   rm -rf conftest*
6295   eval "ac_cv_func_$ac_func=no"
6296 fi
6297 rm -f conftest*
6298 fi
6299
6300 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6301   echo "$ac_t""yes" 1>&6
6302     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6303   cat >> confdefs.h <<EOF
6304 #define $ac_tr_func 1
6305 EOF
6306  
6307 else
6308   echo "$ac_t""no" 1>&6
6309 fi
6310 done
6311
6312 for ac_func in __xstat __fxstat __lxstat
6313 do
6314 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6315 echo "configure:6316: checking for $ac_func" >&5
6316 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6317   echo $ac_n "(cached) $ac_c" 1>&6
6318 else
6319   cat > conftest.$ac_ext <<EOF
6320 #line 6321 "configure"
6321 #include "confdefs.h"
6322 /* System header to define __stub macros and hopefully few prototypes,
6323     which can conflict with char $ac_func(); below.  */
6324 #include <assert.h>
6325 /* Override any gcc2 internal prototype to avoid an error.  */
6326 /* We use char because int might match the return type of a gcc2
6327     builtin and then its argument prototype would still apply.  */
6328 char $ac_func();
6329
6330 int main() {
6331
6332 /* The GNU C library defines this for functions which it implements
6333     to always fail with ENOSYS.  Some functions are actually named
6334     something starting with __ and the normal name is an alias.  */
6335 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6336 choke me
6337 #else
6338 $ac_func();
6339 #endif
6340
6341 ; return 0; }
6342 EOF
6343 if { (eval echo configure:6344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6344   rm -rf conftest*
6345   eval "ac_cv_func_$ac_func=yes"
6346 else
6347   echo "configure: failed program was:" >&5
6348   cat conftest.$ac_ext >&5
6349   rm -rf conftest*
6350   eval "ac_cv_func_$ac_func=no"
6351 fi
6352 rm -f conftest*
6353 fi
6354
6355 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6356   echo "$ac_t""yes" 1>&6
6357     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6358   cat >> confdefs.h <<EOF
6359 #define $ac_tr_func 1
6360 EOF
6361  
6362 else
6363   echo "$ac_t""no" 1>&6
6364 fi
6365 done
6366
6367 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6368 do
6369 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6370 echo "configure:6371: checking for $ac_func" >&5
6371 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6372   echo $ac_n "(cached) $ac_c" 1>&6
6373 else
6374   cat > conftest.$ac_ext <<EOF
6375 #line 6376 "configure"
6376 #include "confdefs.h"
6377 /* System header to define __stub macros and hopefully few prototypes,
6378     which can conflict with char $ac_func(); below.  */
6379 #include <assert.h>
6380 /* Override any gcc2 internal prototype to avoid an error.  */
6381 /* We use char because int might match the return type of a gcc2
6382     builtin and then its argument prototype would still apply.  */
6383 char $ac_func();
6384
6385 int main() {
6386
6387 /* The GNU C library defines this for functions which it implements
6388     to always fail with ENOSYS.  Some functions are actually named
6389     something starting with __ and the normal name is an alias.  */
6390 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6391 choke me
6392 #else
6393 $ac_func();
6394 #endif
6395
6396 ; return 0; }
6397 EOF
6398 if { (eval echo configure:6399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6399   rm -rf conftest*
6400   eval "ac_cv_func_$ac_func=yes"
6401 else
6402   echo "configure: failed program was:" >&5
6403   cat conftest.$ac_ext >&5
6404   rm -rf conftest*
6405   eval "ac_cv_func_$ac_func=no"
6406 fi
6407 rm -f conftest*
6408 fi
6409
6410 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6411   echo "$ac_t""yes" 1>&6
6412     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6413   cat >> confdefs.h <<EOF
6414 #define $ac_tr_func 1
6415 EOF
6416  
6417 else
6418   echo "$ac_t""no" 1>&6
6419 fi
6420 done
6421
6422 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6423 do
6424 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6425 echo "configure:6426: checking for $ac_func" >&5
6426 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6427   echo $ac_n "(cached) $ac_c" 1>&6
6428 else
6429   cat > conftest.$ac_ext <<EOF
6430 #line 6431 "configure"
6431 #include "confdefs.h"
6432 /* System header to define __stub macros and hopefully few prototypes,
6433     which can conflict with char $ac_func(); below.  */
6434 #include <assert.h>
6435 /* Override any gcc2 internal prototype to avoid an error.  */
6436 /* We use char because int might match the return type of a gcc2
6437     builtin and then its argument prototype would still apply.  */
6438 char $ac_func();
6439
6440 int main() {
6441
6442 /* The GNU C library defines this for functions which it implements
6443     to always fail with ENOSYS.  Some functions are actually named
6444     something starting with __ and the normal name is an alias.  */
6445 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6446 choke me
6447 #else
6448 $ac_func();
6449 #endif
6450
6451 ; return 0; }
6452 EOF
6453 if { (eval echo configure:6454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6454   rm -rf conftest*
6455   eval "ac_cv_func_$ac_func=yes"
6456 else
6457   echo "configure: failed program was:" >&5
6458   cat conftest.$ac_ext >&5
6459   rm -rf conftest*
6460   eval "ac_cv_func_$ac_func=no"
6461 fi
6462 rm -f conftest*
6463 fi
6464
6465 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6466   echo "$ac_t""yes" 1>&6
6467     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6468   cat >> confdefs.h <<EOF
6469 #define $ac_tr_func 1
6470 EOF
6471  
6472 else
6473   echo "$ac_t""no" 1>&6
6474 fi
6475 done
6476
6477 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6478 do
6479 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6480 echo "configure:6481: checking for $ac_func" >&5
6481 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6482   echo $ac_n "(cached) $ac_c" 1>&6
6483 else
6484   cat > conftest.$ac_ext <<EOF
6485 #line 6486 "configure"
6486 #include "confdefs.h"
6487 /* System header to define __stub macros and hopefully few prototypes,
6488     which can conflict with char $ac_func(); below.  */
6489 #include <assert.h>
6490 /* Override any gcc2 internal prototype to avoid an error.  */
6491 /* We use char because int might match the return type of a gcc2
6492     builtin and then its argument prototype would still apply.  */
6493 char $ac_func();
6494
6495 int main() {
6496
6497 /* The GNU C library defines this for functions which it implements
6498     to always fail with ENOSYS.  Some functions are actually named
6499     something starting with __ and the normal name is an alias.  */
6500 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6501 choke me
6502 #else
6503 $ac_func();
6504 #endif
6505
6506 ; return 0; }
6507 EOF
6508 if { (eval echo configure:6509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6509   rm -rf conftest*
6510   eval "ac_cv_func_$ac_func=yes"
6511 else
6512   echo "configure: failed program was:" >&5
6513   cat conftest.$ac_ext >&5
6514   rm -rf conftest*
6515   eval "ac_cv_func_$ac_func=no"
6516 fi
6517 rm -f conftest*
6518 fi
6519
6520 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6521   echo "$ac_t""yes" 1>&6
6522     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6523   cat >> confdefs.h <<EOF
6524 #define $ac_tr_func 1
6525 EOF
6526  
6527 else
6528   echo "$ac_t""no" 1>&6
6529 fi
6530 done
6531
6532 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6533 do
6534 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6535 echo "configure:6536: checking for $ac_func" >&5
6536 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6537   echo $ac_n "(cached) $ac_c" 1>&6
6538 else
6539   cat > conftest.$ac_ext <<EOF
6540 #line 6541 "configure"
6541 #include "confdefs.h"
6542 /* System header to define __stub macros and hopefully few prototypes,
6543     which can conflict with char $ac_func(); below.  */
6544 #include <assert.h>
6545 /* Override any gcc2 internal prototype to avoid an error.  */
6546 /* We use char because int might match the return type of a gcc2
6547     builtin and then its argument prototype would still apply.  */
6548 char $ac_func();
6549
6550 int main() {
6551
6552 /* The GNU C library defines this for functions which it implements
6553     to always fail with ENOSYS.  Some functions are actually named
6554     something starting with __ and the normal name is an alias.  */
6555 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6556 choke me
6557 #else
6558 $ac_func();
6559 #endif
6560
6561 ; return 0; }
6562 EOF
6563 if { (eval echo configure:6564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6564   rm -rf conftest*
6565   eval "ac_cv_func_$ac_func=yes"
6566 else
6567   echo "configure: failed program was:" >&5
6568   cat conftest.$ac_ext >&5
6569   rm -rf conftest*
6570   eval "ac_cv_func_$ac_func=no"
6571 fi
6572 rm -f conftest*
6573 fi
6574
6575 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6576   echo "$ac_t""yes" 1>&6
6577     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6578   cat >> confdefs.h <<EOF
6579 #define $ac_tr_func 1
6580 EOF
6581  
6582 else
6583   echo "$ac_t""no" 1>&6
6584 fi
6585 done
6586
6587 for ac_func in _write __write _fork __fork
6588 do
6589 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6590 echo "configure:6591: checking for $ac_func" >&5
6591 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6592   echo $ac_n "(cached) $ac_c" 1>&6
6593 else
6594   cat > conftest.$ac_ext <<EOF
6595 #line 6596 "configure"
6596 #include "confdefs.h"
6597 /* System header to define __stub macros and hopefully few prototypes,
6598     which can conflict with char $ac_func(); below.  */
6599 #include <assert.h>
6600 /* Override any gcc2 internal prototype to avoid an error.  */
6601 /* We use char because int might match the return type of a gcc2
6602     builtin and then its argument prototype would still apply.  */
6603 char $ac_func();
6604
6605 int main() {
6606
6607 /* The GNU C library defines this for functions which it implements
6608     to always fail with ENOSYS.  Some functions are actually named
6609     something starting with __ and the normal name is an alias.  */
6610 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6611 choke me
6612 #else
6613 $ac_func();
6614 #endif
6615
6616 ; return 0; }
6617 EOF
6618 if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6619   rm -rf conftest*
6620   eval "ac_cv_func_$ac_func=yes"
6621 else
6622   echo "configure: failed program was:" >&5
6623   cat conftest.$ac_ext >&5
6624   rm -rf conftest*
6625   eval "ac_cv_func_$ac_func=no"
6626 fi
6627 rm -f conftest*
6628 fi
6629
6630 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6631   echo "$ac_t""yes" 1>&6
6632     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6633   cat >> confdefs.h <<EOF
6634 #define $ac_tr_func 1
6635 EOF
6636  
6637 else
6638   echo "$ac_t""no" 1>&6
6639 fi
6640 done
6641
6642 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6643 do
6644 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6645 echo "configure:6646: checking for $ac_func" >&5
6646 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6647   echo $ac_n "(cached) $ac_c" 1>&6
6648 else
6649   cat > conftest.$ac_ext <<EOF
6650 #line 6651 "configure"
6651 #include "confdefs.h"
6652 /* System header to define __stub macros and hopefully few prototypes,
6653     which can conflict with char $ac_func(); below.  */
6654 #include <assert.h>
6655 /* Override any gcc2 internal prototype to avoid an error.  */
6656 /* We use char because int might match the return type of a gcc2
6657     builtin and then its argument prototype would still apply.  */
6658 char $ac_func();
6659
6660 int main() {
6661
6662 /* The GNU C library defines this for functions which it implements
6663     to always fail with ENOSYS.  Some functions are actually named
6664     something starting with __ and the normal name is an alias.  */
6665 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6666 choke me
6667 #else
6668 $ac_func();
6669 #endif
6670
6671 ; return 0; }
6672 EOF
6673 if { (eval echo configure:6674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6674   rm -rf conftest*
6675   eval "ac_cv_func_$ac_func=yes"
6676 else
6677   echo "configure: failed program was:" >&5
6678   cat conftest.$ac_ext >&5
6679   rm -rf conftest*
6680   eval "ac_cv_func_$ac_func=no"
6681 fi
6682 rm -f conftest*
6683 fi
6684
6685 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6686   echo "$ac_t""yes" 1>&6
6687     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6688   cat >> confdefs.h <<EOF
6689 #define $ac_tr_func 1
6690 EOF
6691  
6692 else
6693   echo "$ac_t""no" 1>&6
6694 fi
6695 done
6696
6697 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6698 do
6699 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6700 echo "configure:6701: checking for $ac_func" >&5
6701 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 /* System header to define __stub macros and hopefully few prototypes,
6708     which can conflict with char $ac_func(); below.  */
6709 #include <assert.h>
6710 /* Override any gcc2 internal prototype to avoid an error.  */
6711 /* We use char because int might match the return type of a gcc2
6712     builtin and then its argument prototype would still apply.  */
6713 char $ac_func();
6714
6715 int main() {
6716
6717 /* The GNU C library defines this for functions which it implements
6718     to always fail with ENOSYS.  Some functions are actually named
6719     something starting with __ and the normal name is an alias.  */
6720 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6721 choke me
6722 #else
6723 $ac_func();
6724 #endif
6725
6726 ; return 0; }
6727 EOF
6728 if { (eval echo configure:6729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6729   rm -rf conftest*
6730   eval "ac_cv_func_$ac_func=yes"
6731 else
6732   echo "configure: failed program was:" >&5
6733   cat conftest.$ac_ext >&5
6734   rm -rf conftest*
6735   eval "ac_cv_func_$ac_func=no"
6736 fi
6737 rm -f conftest*
6738 fi
6739
6740 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6741   echo "$ac_t""yes" 1>&6
6742     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6743   cat >> confdefs.h <<EOF
6744 #define $ac_tr_func 1
6745 EOF
6746  
6747 else
6748   echo "$ac_t""no" 1>&6
6749 fi
6750 done
6751
6752 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6753 do
6754 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6755 echo "configure:6756: checking for $ac_func" >&5
6756 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6757   echo $ac_n "(cached) $ac_c" 1>&6
6758 else
6759   cat > conftest.$ac_ext <<EOF
6760 #line 6761 "configure"
6761 #include "confdefs.h"
6762 /* System header to define __stub macros and hopefully few prototypes,
6763     which can conflict with char $ac_func(); below.  */
6764 #include <assert.h>
6765 /* Override any gcc2 internal prototype to avoid an error.  */
6766 /* We use char because int might match the return type of a gcc2
6767     builtin and then its argument prototype would still apply.  */
6768 char $ac_func();
6769
6770 int main() {
6771
6772 /* The GNU C library defines this for functions which it implements
6773     to always fail with ENOSYS.  Some functions are actually named
6774     something starting with __ and the normal name is an alias.  */
6775 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6776 choke me
6777 #else
6778 $ac_func();
6779 #endif
6780
6781 ; return 0; }
6782 EOF
6783 if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6784   rm -rf conftest*
6785   eval "ac_cv_func_$ac_func=yes"
6786 else
6787   echo "configure: failed program was:" >&5
6788   cat conftest.$ac_ext >&5
6789   rm -rf conftest*
6790   eval "ac_cv_func_$ac_func=no"
6791 fi
6792 rm -f conftest*
6793 fi
6794
6795 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6796   echo "$ac_t""yes" 1>&6
6797     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6798   cat >> confdefs.h <<EOF
6799 #define $ac_tr_func 1
6800 EOF
6801  
6802 else
6803   echo "$ac_t""no" 1>&6
6804 fi
6805 done
6806
6807 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6808 do
6809 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6810 echo "configure:6811: checking for $ac_func" >&5
6811 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6812   echo $ac_n "(cached) $ac_c" 1>&6
6813 else
6814   cat > conftest.$ac_ext <<EOF
6815 #line 6816 "configure"
6816 #include "confdefs.h"
6817 /* System header to define __stub macros and hopefully few prototypes,
6818     which can conflict with char $ac_func(); below.  */
6819 #include <assert.h>
6820 /* Override any gcc2 internal prototype to avoid an error.  */
6821 /* We use char because int might match the return type of a gcc2
6822     builtin and then its argument prototype would still apply.  */
6823 char $ac_func();
6824
6825 int main() {
6826
6827 /* The GNU C library defines this for functions which it implements
6828     to always fail with ENOSYS.  Some functions are actually named
6829     something starting with __ and the normal name is an alias.  */
6830 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6831 choke me
6832 #else
6833 $ac_func();
6834 #endif
6835
6836 ; return 0; }
6837 EOF
6838 if { (eval echo configure:6839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6839   rm -rf conftest*
6840   eval "ac_cv_func_$ac_func=yes"
6841 else
6842   echo "configure: failed program was:" >&5
6843   cat conftest.$ac_ext >&5
6844   rm -rf conftest*
6845   eval "ac_cv_func_$ac_func=no"
6846 fi
6847 rm -f conftest*
6848 fi
6849
6850 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6851   echo "$ac_t""yes" 1>&6
6852     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6853   cat >> confdefs.h <<EOF
6854 #define $ac_tr_func 1
6855 EOF
6856  
6857 else
6858   echo "$ac_t""no" 1>&6
6859 fi
6860 done
6861
6862 for ac_func in open64 _open64 __open64 creat64
6863 do
6864 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6865 echo "configure:6866: checking for $ac_func" >&5
6866 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6867   echo $ac_n "(cached) $ac_c" 1>&6
6868 else
6869   cat > conftest.$ac_ext <<EOF
6870 #line 6871 "configure"
6871 #include "confdefs.h"
6872 /* System header to define __stub macros and hopefully few prototypes,
6873     which can conflict with char $ac_func(); below.  */
6874 #include <assert.h>
6875 /* Override any gcc2 internal prototype to avoid an error.  */
6876 /* We use char because int might match the return type of a gcc2
6877     builtin and then its argument prototype would still apply.  */
6878 char $ac_func();
6879
6880 int main() {
6881
6882 /* The GNU C library defines this for functions which it implements
6883     to always fail with ENOSYS.  Some functions are actually named
6884     something starting with __ and the normal name is an alias.  */
6885 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6886 choke me
6887 #else
6888 $ac_func();
6889 #endif
6890
6891 ; return 0; }
6892 EOF
6893 if { (eval echo configure:6894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6894   rm -rf conftest*
6895   eval "ac_cv_func_$ac_func=yes"
6896 else
6897   echo "configure: failed program was:" >&5
6898   cat conftest.$ac_ext >&5
6899   rm -rf conftest*
6900   eval "ac_cv_func_$ac_func=no"
6901 fi
6902 rm -f conftest*
6903 fi
6904
6905 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6906   echo "$ac_t""yes" 1>&6
6907     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6908   cat >> confdefs.h <<EOF
6909 #define $ac_tr_func 1
6910 EOF
6911  
6912 else
6913   echo "$ac_t""no" 1>&6
6914 fi
6915 done
6916
6917
6918 #
6919 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6920 #
6921
6922 if test x$ac_cv_func_stat64 = xno ; then
6923   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6924 echo "configure:6925: checking for stat64 in <sys/stat.h>" >&5
6925   cat > conftest.$ac_ext <<EOF
6926 #line 6927 "configure"
6927 #include "confdefs.h"
6928
6929 #if defined(HAVE_UNISTD_H)
6930 #include <unistd.h>
6931 #endif
6932 #include <sys/stat.h>
6933
6934 int main() {
6935 struct stat64 st64; exit(stat64(".",&st64));
6936 ; return 0; }
6937 EOF
6938 if { (eval echo configure:6939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6939   rm -rf conftest*
6940   ac_cv_func_stat64=yes
6941 else
6942   echo "configure: failed program was:" >&5
6943   cat conftest.$ac_ext >&5
6944 fi
6945 rm -f conftest*
6946   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6947   if test x$ac_cv_func_stat64 = xyes ; then
6948     cat >> confdefs.h <<\EOF
6949 #define HAVE_STAT64 1
6950 EOF
6951
6952   fi
6953 fi
6954
6955 if test x$ac_cv_func_lstat64 = xno ; then
6956   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6957 echo "configure:6958: checking for lstat64 in <sys/stat.h>" >&5
6958   cat > conftest.$ac_ext <<EOF
6959 #line 6960 "configure"
6960 #include "confdefs.h"
6961
6962 #if defined(HAVE_UNISTD_H)
6963 #include <unistd.h>
6964 #endif
6965 #include <sys/stat.h>
6966
6967 int main() {
6968 struct stat64 st64; exit(lstat64(".",&st64));
6969 ; return 0; }
6970 EOF
6971 if { (eval echo configure:6972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6972   rm -rf conftest*
6973   ac_cv_func_lstat64=yes
6974 else
6975   echo "configure: failed program was:" >&5
6976   cat conftest.$ac_ext >&5
6977 fi
6978 rm -f conftest*
6979   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6980   if test x$ac_cv_func_lstat64 = xyes ; then
6981     cat >> confdefs.h <<\EOF
6982 #define HAVE_LSTAT64 1
6983 EOF
6984
6985   fi
6986 fi
6987
6988 if test x$ac_cv_func_fstat64 = xno ; then
6989   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6990 echo "configure:6991: checking for fstat64 in <sys/stat.h>" >&5
6991   cat > conftest.$ac_ext <<EOF
6992 #line 6993 "configure"
6993 #include "confdefs.h"
6994
6995 #if defined(HAVE_UNISTD_H)
6996 #include <unistd.h>
6997 #endif
6998 #include <sys/stat.h>
6999
7000 int main() {
7001 struct stat64 st64; exit(fstat64(0,&st64));
7002 ; return 0; }
7003 EOF
7004 if { (eval echo configure:7005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7005   rm -rf conftest*
7006   ac_cv_func_fstat64=yes
7007 else
7008   echo "configure: failed program was:" >&5
7009   cat conftest.$ac_ext >&5
7010 fi
7011 rm -f conftest*
7012   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
7013   if test x$ac_cv_func_fstat64 = xyes ; then
7014     cat >> confdefs.h <<\EOF
7015 #define HAVE_FSTAT64 1
7016 EOF
7017
7018   fi
7019 fi
7020
7021 #####################################
7022 # we might need the resolv library on some systems
7023 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
7024 echo "configure:7025: checking for dn_expand in -lresolv" >&5
7025 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
7026 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7027   echo $ac_n "(cached) $ac_c" 1>&6
7028 else
7029   ac_save_LIBS="$LIBS"
7030 LIBS="-lresolv  $LIBS"
7031 cat > conftest.$ac_ext <<EOF
7032 #line 7033 "configure"
7033 #include "confdefs.h"
7034 /* Override any gcc2 internal prototype to avoid an error.  */
7035 /* We use char because int might match the return type of a gcc2
7036     builtin and then its argument prototype would still apply.  */
7037 char dn_expand();
7038
7039 int main() {
7040 dn_expand()
7041 ; return 0; }
7042 EOF
7043 if { (eval echo configure:7044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7044   rm -rf conftest*
7045   eval "ac_cv_lib_$ac_lib_var=yes"
7046 else
7047   echo "configure: failed program was:" >&5
7048   cat conftest.$ac_ext >&5
7049   rm -rf conftest*
7050   eval "ac_cv_lib_$ac_lib_var=no"
7051 fi
7052 rm -f conftest*
7053 LIBS="$ac_save_LIBS"
7054
7055 fi
7056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7057   echo "$ac_t""yes" 1>&6
7058     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7059     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7060   cat >> confdefs.h <<EOF
7061 #define $ac_tr_lib 1
7062 EOF
7063
7064   LIBS="-lresolv $LIBS"
7065
7066 else
7067   echo "$ac_t""no" 1>&6
7068 fi
7069
7070
7071 #
7072 # Check for the functions putprpwnam, set_auth_parameters,
7073 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7074 # Needed for OSF1 and HPUX.
7075 #
7076
7077 case "$LIBS" in
7078   *-lsecurity*) for ac_func in putprpwnam
7079 do
7080 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7081 echo "configure:7082: checking for $ac_func" >&5
7082 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7083   echo $ac_n "(cached) $ac_c" 1>&6
7084 else
7085   cat > conftest.$ac_ext <<EOF
7086 #line 7087 "configure"
7087 #include "confdefs.h"
7088 /* System header to define __stub macros and hopefully few prototypes,
7089     which can conflict with char $ac_func(); below.  */
7090 #include <assert.h>
7091 /* Override any gcc2 internal prototype to avoid an error.  */
7092 /* We use char because int might match the return type of a gcc2
7093     builtin and then its argument prototype would still apply.  */
7094 char $ac_func();
7095
7096 int main() {
7097
7098 /* The GNU C library defines this for functions which it implements
7099     to always fail with ENOSYS.  Some functions are actually named
7100     something starting with __ and the normal name is an alias.  */
7101 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7102 choke me
7103 #else
7104 $ac_func();
7105 #endif
7106
7107 ; return 0; }
7108 EOF
7109 if { (eval echo configure:7110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7110   rm -rf conftest*
7111   eval "ac_cv_func_$ac_func=yes"
7112 else
7113   echo "configure: failed program was:" >&5
7114   cat conftest.$ac_ext >&5
7115   rm -rf conftest*
7116   eval "ac_cv_func_$ac_func=no"
7117 fi
7118 rm -f conftest*
7119 fi
7120
7121 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7122   echo "$ac_t""yes" 1>&6
7123     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7124   cat >> confdefs.h <<EOF
7125 #define $ac_tr_func 1
7126 EOF
7127  
7128 else
7129   echo "$ac_t""no" 1>&6
7130 fi
7131 done
7132  ;;
7133   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7134 echo "configure:7135: checking for putprpwnam in -lsecurity" >&5
7135 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7136 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7137   echo $ac_n "(cached) $ac_c" 1>&6
7138 else
7139   ac_save_LIBS="$LIBS"
7140 LIBS="-lsecurity  $LIBS"
7141 cat > conftest.$ac_ext <<EOF
7142 #line 7143 "configure"
7143 #include "confdefs.h"
7144 /* Override any gcc2 internal prototype to avoid an error.  */
7145 /* We use char because int might match the return type of a gcc2
7146     builtin and then its argument prototype would still apply.  */
7147 char putprpwnam();
7148
7149 int main() {
7150 putprpwnam()
7151 ; return 0; }
7152 EOF
7153 if { (eval echo configure:7154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7154   rm -rf conftest*
7155   eval "ac_cv_lib_$ac_lib_var=yes"
7156 else
7157   echo "configure: failed program was:" >&5
7158   cat conftest.$ac_ext >&5
7159   rm -rf conftest*
7160   eval "ac_cv_lib_$ac_lib_var=no"
7161 fi
7162 rm -f conftest*
7163 LIBS="$ac_save_LIBS"
7164
7165 fi
7166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7167   echo "$ac_t""yes" 1>&6
7168     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7169     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7170   cat >> confdefs.h <<EOF
7171 #define $ac_tr_lib 1
7172 EOF
7173
7174   LIBS="-lsecurity $LIBS"
7175
7176 else
7177   echo "$ac_t""no" 1>&6
7178 fi
7179  
7180      for ac_func in putprpwnam
7181 do
7182 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7183 echo "configure:7184: checking for $ac_func" >&5
7184 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7185   echo $ac_n "(cached) $ac_c" 1>&6
7186 else
7187   cat > conftest.$ac_ext <<EOF
7188 #line 7189 "configure"
7189 #include "confdefs.h"
7190 /* System header to define __stub macros and hopefully few prototypes,
7191     which can conflict with char $ac_func(); below.  */
7192 #include <assert.h>
7193 /* Override any gcc2 internal prototype to avoid an error.  */
7194 /* We use char because int might match the return type of a gcc2
7195     builtin and then its argument prototype would still apply.  */
7196 char $ac_func();
7197
7198 int main() {
7199
7200 /* The GNU C library defines this for functions which it implements
7201     to always fail with ENOSYS.  Some functions are actually named
7202     something starting with __ and the normal name is an alias.  */
7203 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7204 choke me
7205 #else
7206 $ac_func();
7207 #endif
7208
7209 ; return 0; }
7210 EOF
7211 if { (eval echo configure:7212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7212   rm -rf conftest*
7213   eval "ac_cv_func_$ac_func=yes"
7214 else
7215   echo "configure: failed program was:" >&5
7216   cat conftest.$ac_ext >&5
7217   rm -rf conftest*
7218   eval "ac_cv_func_$ac_func=no"
7219 fi
7220 rm -f conftest*
7221 fi
7222
7223 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7224   echo "$ac_t""yes" 1>&6
7225     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7226   cat >> confdefs.h <<EOF
7227 #define $ac_tr_func 1
7228 EOF
7229  
7230 else
7231   echo "$ac_t""no" 1>&6
7232 fi
7233 done
7234
7235   ;;
7236   esac
7237
7238 case "$LIBS" in
7239   *-lsec*) for ac_func in putprpwnam
7240 do
7241 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7242 echo "configure:7243: checking for $ac_func" >&5
7243 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7244   echo $ac_n "(cached) $ac_c" 1>&6
7245 else
7246   cat > conftest.$ac_ext <<EOF
7247 #line 7248 "configure"
7248 #include "confdefs.h"
7249 /* System header to define __stub macros and hopefully few prototypes,
7250     which can conflict with char $ac_func(); below.  */
7251 #include <assert.h>
7252 /* Override any gcc2 internal prototype to avoid an error.  */
7253 /* We use char because int might match the return type of a gcc2
7254     builtin and then its argument prototype would still apply.  */
7255 char $ac_func();
7256
7257 int main() {
7258
7259 /* The GNU C library defines this for functions which it implements
7260     to always fail with ENOSYS.  Some functions are actually named
7261     something starting with __ and the normal name is an alias.  */
7262 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7263 choke me
7264 #else
7265 $ac_func();
7266 #endif
7267
7268 ; return 0; }
7269 EOF
7270 if { (eval echo configure:7271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7271   rm -rf conftest*
7272   eval "ac_cv_func_$ac_func=yes"
7273 else
7274   echo "configure: failed program was:" >&5
7275   cat conftest.$ac_ext >&5
7276   rm -rf conftest*
7277   eval "ac_cv_func_$ac_func=no"
7278 fi
7279 rm -f conftest*
7280 fi
7281
7282 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7283   echo "$ac_t""yes" 1>&6
7284     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7285   cat >> confdefs.h <<EOF
7286 #define $ac_tr_func 1
7287 EOF
7288  
7289 else
7290   echo "$ac_t""no" 1>&6
7291 fi
7292 done
7293  ;;
7294   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7295 echo "configure:7296: checking for putprpwnam in -lsec" >&5
7296 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7297 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7298   echo $ac_n "(cached) $ac_c" 1>&6
7299 else
7300   ac_save_LIBS="$LIBS"
7301 LIBS="-lsec  $LIBS"
7302 cat > conftest.$ac_ext <<EOF
7303 #line 7304 "configure"
7304 #include "confdefs.h"
7305 /* Override any gcc2 internal prototype to avoid an error.  */
7306 /* We use char because int might match the return type of a gcc2
7307     builtin and then its argument prototype would still apply.  */
7308 char putprpwnam();
7309
7310 int main() {
7311 putprpwnam()
7312 ; return 0; }
7313 EOF
7314 if { (eval echo configure:7315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7315   rm -rf conftest*
7316   eval "ac_cv_lib_$ac_lib_var=yes"
7317 else
7318   echo "configure: failed program was:" >&5
7319   cat conftest.$ac_ext >&5
7320   rm -rf conftest*
7321   eval "ac_cv_lib_$ac_lib_var=no"
7322 fi
7323 rm -f conftest*
7324 LIBS="$ac_save_LIBS"
7325
7326 fi
7327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7328   echo "$ac_t""yes" 1>&6
7329     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7330     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7331   cat >> confdefs.h <<EOF
7332 #define $ac_tr_lib 1
7333 EOF
7334
7335   LIBS="-lsec $LIBS"
7336
7337 else
7338   echo "$ac_t""no" 1>&6
7339 fi
7340  
7341      for ac_func in putprpwnam
7342 do
7343 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7344 echo "configure:7345: checking for $ac_func" >&5
7345 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7346   echo $ac_n "(cached) $ac_c" 1>&6
7347 else
7348   cat > conftest.$ac_ext <<EOF
7349 #line 7350 "configure"
7350 #include "confdefs.h"
7351 /* System header to define __stub macros and hopefully few prototypes,
7352     which can conflict with char $ac_func(); below.  */
7353 #include <assert.h>
7354 /* Override any gcc2 internal prototype to avoid an error.  */
7355 /* We use char because int might match the return type of a gcc2
7356     builtin and then its argument prototype would still apply.  */
7357 char $ac_func();
7358
7359 int main() {
7360
7361 /* The GNU C library defines this for functions which it implements
7362     to always fail with ENOSYS.  Some functions are actually named
7363     something starting with __ and the normal name is an alias.  */
7364 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7365 choke me
7366 #else
7367 $ac_func();
7368 #endif
7369
7370 ; return 0; }
7371 EOF
7372 if { (eval echo configure:7373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7373   rm -rf conftest*
7374   eval "ac_cv_func_$ac_func=yes"
7375 else
7376   echo "configure: failed program was:" >&5
7377   cat conftest.$ac_ext >&5
7378   rm -rf conftest*
7379   eval "ac_cv_func_$ac_func=no"
7380 fi
7381 rm -f conftest*
7382 fi
7383
7384 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7385   echo "$ac_t""yes" 1>&6
7386     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7387   cat >> confdefs.h <<EOF
7388 #define $ac_tr_func 1
7389 EOF
7390  
7391 else
7392   echo "$ac_t""no" 1>&6
7393 fi
7394 done
7395
7396   ;;
7397   esac
7398
7399
7400 case "$LIBS" in
7401   *-lsecurity*) for ac_func in set_auth_parameters
7402 do
7403 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7404 echo "configure:7405: checking for $ac_func" >&5
7405 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7406   echo $ac_n "(cached) $ac_c" 1>&6
7407 else
7408   cat > conftest.$ac_ext <<EOF
7409 #line 7410 "configure"
7410 #include "confdefs.h"
7411 /* System header to define __stub macros and hopefully few prototypes,
7412     which can conflict with char $ac_func(); below.  */
7413 #include <assert.h>
7414 /* Override any gcc2 internal prototype to avoid an error.  */
7415 /* We use char because int might match the return type of a gcc2
7416     builtin and then its argument prototype would still apply.  */
7417 char $ac_func();
7418
7419 int main() {
7420
7421 /* The GNU C library defines this for functions which it implements
7422     to always fail with ENOSYS.  Some functions are actually named
7423     something starting with __ and the normal name is an alias.  */
7424 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7425 choke me
7426 #else
7427 $ac_func();
7428 #endif
7429
7430 ; return 0; }
7431 EOF
7432 if { (eval echo configure:7433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7433   rm -rf conftest*
7434   eval "ac_cv_func_$ac_func=yes"
7435 else
7436   echo "configure: failed program was:" >&5
7437   cat conftest.$ac_ext >&5
7438   rm -rf conftest*
7439   eval "ac_cv_func_$ac_func=no"
7440 fi
7441 rm -f conftest*
7442 fi
7443
7444 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7445   echo "$ac_t""yes" 1>&6
7446     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7447   cat >> confdefs.h <<EOF
7448 #define $ac_tr_func 1
7449 EOF
7450  
7451 else
7452   echo "$ac_t""no" 1>&6
7453 fi
7454 done
7455  ;;
7456   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7457 echo "configure:7458: checking for set_auth_parameters in -lsecurity" >&5
7458 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7459 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7460   echo $ac_n "(cached) $ac_c" 1>&6
7461 else
7462   ac_save_LIBS="$LIBS"
7463 LIBS="-lsecurity  $LIBS"
7464 cat > conftest.$ac_ext <<EOF
7465 #line 7466 "configure"
7466 #include "confdefs.h"
7467 /* Override any gcc2 internal prototype to avoid an error.  */
7468 /* We use char because int might match the return type of a gcc2
7469     builtin and then its argument prototype would still apply.  */
7470 char set_auth_parameters();
7471
7472 int main() {
7473 set_auth_parameters()
7474 ; return 0; }
7475 EOF
7476 if { (eval echo configure:7477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7477   rm -rf conftest*
7478   eval "ac_cv_lib_$ac_lib_var=yes"
7479 else
7480   echo "configure: failed program was:" >&5
7481   cat conftest.$ac_ext >&5
7482   rm -rf conftest*
7483   eval "ac_cv_lib_$ac_lib_var=no"
7484 fi
7485 rm -f conftest*
7486 LIBS="$ac_save_LIBS"
7487
7488 fi
7489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7490   echo "$ac_t""yes" 1>&6
7491     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7492     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7493   cat >> confdefs.h <<EOF
7494 #define $ac_tr_lib 1
7495 EOF
7496
7497   LIBS="-lsecurity $LIBS"
7498
7499 else
7500   echo "$ac_t""no" 1>&6
7501 fi
7502  
7503      for ac_func in set_auth_parameters
7504 do
7505 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7506 echo "configure:7507: checking for $ac_func" >&5
7507 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7508   echo $ac_n "(cached) $ac_c" 1>&6
7509 else
7510   cat > conftest.$ac_ext <<EOF
7511 #line 7512 "configure"
7512 #include "confdefs.h"
7513 /* System header to define __stub macros and hopefully few prototypes,
7514     which can conflict with char $ac_func(); below.  */
7515 #include <assert.h>
7516 /* Override any gcc2 internal prototype to avoid an error.  */
7517 /* We use char because int might match the return type of a gcc2
7518     builtin and then its argument prototype would still apply.  */
7519 char $ac_func();
7520
7521 int main() {
7522
7523 /* The GNU C library defines this for functions which it implements
7524     to always fail with ENOSYS.  Some functions are actually named
7525     something starting with __ and the normal name is an alias.  */
7526 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7527 choke me
7528 #else
7529 $ac_func();
7530 #endif
7531
7532 ; return 0; }
7533 EOF
7534 if { (eval echo configure:7535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7535   rm -rf conftest*
7536   eval "ac_cv_func_$ac_func=yes"
7537 else
7538   echo "configure: failed program was:" >&5
7539   cat conftest.$ac_ext >&5
7540   rm -rf conftest*
7541   eval "ac_cv_func_$ac_func=no"
7542 fi
7543 rm -f conftest*
7544 fi
7545
7546 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7547   echo "$ac_t""yes" 1>&6
7548     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7549   cat >> confdefs.h <<EOF
7550 #define $ac_tr_func 1
7551 EOF
7552  
7553 else
7554   echo "$ac_t""no" 1>&6
7555 fi
7556 done
7557
7558   ;;
7559   esac
7560
7561 case "$LIBS" in
7562   *-lsec*) for ac_func in set_auth_parameters
7563 do
7564 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7565 echo "configure:7566: checking for $ac_func" >&5
7566 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7567   echo $ac_n "(cached) $ac_c" 1>&6
7568 else
7569   cat > conftest.$ac_ext <<EOF
7570 #line 7571 "configure"
7571 #include "confdefs.h"
7572 /* System header to define __stub macros and hopefully few prototypes,
7573     which can conflict with char $ac_func(); below.  */
7574 #include <assert.h>
7575 /* Override any gcc2 internal prototype to avoid an error.  */
7576 /* We use char because int might match the return type of a gcc2
7577     builtin and then its argument prototype would still apply.  */
7578 char $ac_func();
7579
7580 int main() {
7581
7582 /* The GNU C library defines this for functions which it implements
7583     to always fail with ENOSYS.  Some functions are actually named
7584     something starting with __ and the normal name is an alias.  */
7585 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7586 choke me
7587 #else
7588 $ac_func();
7589 #endif
7590
7591 ; return 0; }
7592 EOF
7593 if { (eval echo configure:7594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7594   rm -rf conftest*
7595   eval "ac_cv_func_$ac_func=yes"
7596 else
7597   echo "configure: failed program was:" >&5
7598   cat conftest.$ac_ext >&5
7599   rm -rf conftest*
7600   eval "ac_cv_func_$ac_func=no"
7601 fi
7602 rm -f conftest*
7603 fi
7604
7605 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7606   echo "$ac_t""yes" 1>&6
7607     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7608   cat >> confdefs.h <<EOF
7609 #define $ac_tr_func 1
7610 EOF
7611  
7612 else
7613   echo "$ac_t""no" 1>&6
7614 fi
7615 done
7616  ;;
7617   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7618 echo "configure:7619: checking for set_auth_parameters in -lsec" >&5
7619 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7620 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7621   echo $ac_n "(cached) $ac_c" 1>&6
7622 else
7623   ac_save_LIBS="$LIBS"
7624 LIBS="-lsec  $LIBS"
7625 cat > conftest.$ac_ext <<EOF
7626 #line 7627 "configure"
7627 #include "confdefs.h"
7628 /* Override any gcc2 internal prototype to avoid an error.  */
7629 /* We use char because int might match the return type of a gcc2
7630     builtin and then its argument prototype would still apply.  */
7631 char set_auth_parameters();
7632
7633 int main() {
7634 set_auth_parameters()
7635 ; return 0; }
7636 EOF
7637 if { (eval echo configure:7638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7638   rm -rf conftest*
7639   eval "ac_cv_lib_$ac_lib_var=yes"
7640 else
7641   echo "configure: failed program was:" >&5
7642   cat conftest.$ac_ext >&5
7643   rm -rf conftest*
7644   eval "ac_cv_lib_$ac_lib_var=no"
7645 fi
7646 rm -f conftest*
7647 LIBS="$ac_save_LIBS"
7648
7649 fi
7650 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7651   echo "$ac_t""yes" 1>&6
7652     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7653     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7654   cat >> confdefs.h <<EOF
7655 #define $ac_tr_lib 1
7656 EOF
7657
7658   LIBS="-lsec $LIBS"
7659
7660 else
7661   echo "$ac_t""no" 1>&6
7662 fi
7663  
7664      for ac_func in set_auth_parameters
7665 do
7666 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7667 echo "configure:7668: checking for $ac_func" >&5
7668 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7669   echo $ac_n "(cached) $ac_c" 1>&6
7670 else
7671   cat > conftest.$ac_ext <<EOF
7672 #line 7673 "configure"
7673 #include "confdefs.h"
7674 /* System header to define __stub macros and hopefully few prototypes,
7675     which can conflict with char $ac_func(); below.  */
7676 #include <assert.h>
7677 /* Override any gcc2 internal prototype to avoid an error.  */
7678 /* We use char because int might match the return type of a gcc2
7679     builtin and then its argument prototype would still apply.  */
7680 char $ac_func();
7681
7682 int main() {
7683
7684 /* The GNU C library defines this for functions which it implements
7685     to always fail with ENOSYS.  Some functions are actually named
7686     something starting with __ and the normal name is an alias.  */
7687 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7688 choke me
7689 #else
7690 $ac_func();
7691 #endif
7692
7693 ; return 0; }
7694 EOF
7695 if { (eval echo configure:7696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7696   rm -rf conftest*
7697   eval "ac_cv_func_$ac_func=yes"
7698 else
7699   echo "configure: failed program was:" >&5
7700   cat conftest.$ac_ext >&5
7701   rm -rf conftest*
7702   eval "ac_cv_func_$ac_func=no"
7703 fi
7704 rm -f conftest*
7705 fi
7706
7707 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7708   echo "$ac_t""yes" 1>&6
7709     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7710   cat >> confdefs.h <<EOF
7711 #define $ac_tr_func 1
7712 EOF
7713  
7714 else
7715   echo "$ac_t""no" 1>&6
7716 fi
7717 done
7718
7719   ;;
7720   esac
7721
7722
7723 # UnixWare 7.x has its getspnam in -lgen
7724 case "$LIBS" in
7725   *-lgen*) for ac_func in getspnam
7726 do
7727 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7728 echo "configure:7729: checking for $ac_func" >&5
7729 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7730   echo $ac_n "(cached) $ac_c" 1>&6
7731 else
7732   cat > conftest.$ac_ext <<EOF
7733 #line 7734 "configure"
7734 #include "confdefs.h"
7735 /* System header to define __stub macros and hopefully few prototypes,
7736     which can conflict with char $ac_func(); below.  */
7737 #include <assert.h>
7738 /* Override any gcc2 internal prototype to avoid an error.  */
7739 /* We use char because int might match the return type of a gcc2
7740     builtin and then its argument prototype would still apply.  */
7741 char $ac_func();
7742
7743 int main() {
7744
7745 /* The GNU C library defines this for functions which it implements
7746     to always fail with ENOSYS.  Some functions are actually named
7747     something starting with __ and the normal name is an alias.  */
7748 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7749 choke me
7750 #else
7751 $ac_func();
7752 #endif
7753
7754 ; return 0; }
7755 EOF
7756 if { (eval echo configure:7757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7757   rm -rf conftest*
7758   eval "ac_cv_func_$ac_func=yes"
7759 else
7760   echo "configure: failed program was:" >&5
7761   cat conftest.$ac_ext >&5
7762   rm -rf conftest*
7763   eval "ac_cv_func_$ac_func=no"
7764 fi
7765 rm -f conftest*
7766 fi
7767
7768 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7769   echo "$ac_t""yes" 1>&6
7770     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7771   cat >> confdefs.h <<EOF
7772 #define $ac_tr_func 1
7773 EOF
7774  
7775 else
7776   echo "$ac_t""no" 1>&6
7777 fi
7778 done
7779  ;;
7780   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7781 echo "configure:7782: checking for getspnam in -lgen" >&5
7782 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7783 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7784   echo $ac_n "(cached) $ac_c" 1>&6
7785 else
7786   ac_save_LIBS="$LIBS"
7787 LIBS="-lgen  $LIBS"
7788 cat > conftest.$ac_ext <<EOF
7789 #line 7790 "configure"
7790 #include "confdefs.h"
7791 /* Override any gcc2 internal prototype to avoid an error.  */
7792 /* We use char because int might match the return type of a gcc2
7793     builtin and then its argument prototype would still apply.  */
7794 char getspnam();
7795
7796 int main() {
7797 getspnam()
7798 ; return 0; }
7799 EOF
7800 if { (eval echo configure:7801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7801   rm -rf conftest*
7802   eval "ac_cv_lib_$ac_lib_var=yes"
7803 else
7804   echo "configure: failed program was:" >&5
7805   cat conftest.$ac_ext >&5
7806   rm -rf conftest*
7807   eval "ac_cv_lib_$ac_lib_var=no"
7808 fi
7809 rm -f conftest*
7810 LIBS="$ac_save_LIBS"
7811
7812 fi
7813 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7814   echo "$ac_t""yes" 1>&6
7815     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7816     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7817   cat >> confdefs.h <<EOF
7818 #define $ac_tr_lib 1
7819 EOF
7820
7821   LIBS="-lgen $LIBS"
7822
7823 else
7824   echo "$ac_t""no" 1>&6
7825 fi
7826  
7827      for ac_func in getspnam
7828 do
7829 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7830 echo "configure:7831: checking for $ac_func" >&5
7831 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7832   echo $ac_n "(cached) $ac_c" 1>&6
7833 else
7834   cat > conftest.$ac_ext <<EOF
7835 #line 7836 "configure"
7836 #include "confdefs.h"
7837 /* System header to define __stub macros and hopefully few prototypes,
7838     which can conflict with char $ac_func(); below.  */
7839 #include <assert.h>
7840 /* Override any gcc2 internal prototype to avoid an error.  */
7841 /* We use char because int might match the return type of a gcc2
7842     builtin and then its argument prototype would still apply.  */
7843 char $ac_func();
7844
7845 int main() {
7846
7847 /* The GNU C library defines this for functions which it implements
7848     to always fail with ENOSYS.  Some functions are actually named
7849     something starting with __ and the normal name is an alias.  */
7850 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7851 choke me
7852 #else
7853 $ac_func();
7854 #endif
7855
7856 ; return 0; }
7857 EOF
7858 if { (eval echo configure:7859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7859   rm -rf conftest*
7860   eval "ac_cv_func_$ac_func=yes"
7861 else
7862   echo "configure: failed program was:" >&5
7863   cat conftest.$ac_ext >&5
7864   rm -rf conftest*
7865   eval "ac_cv_func_$ac_func=no"
7866 fi
7867 rm -f conftest*
7868 fi
7869
7870 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7871   echo "$ac_t""yes" 1>&6
7872     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7873   cat >> confdefs.h <<EOF
7874 #define $ac_tr_func 1
7875 EOF
7876  
7877 else
7878   echo "$ac_t""no" 1>&6
7879 fi
7880 done
7881
7882   ;;
7883   esac
7884
7885
7886 case "$LIBS" in
7887   *-lsecurity*) for ac_func in getspnam
7888 do
7889 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7890 echo "configure:7891: checking for $ac_func" >&5
7891 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7892   echo $ac_n "(cached) $ac_c" 1>&6
7893 else
7894   cat > conftest.$ac_ext <<EOF
7895 #line 7896 "configure"
7896 #include "confdefs.h"
7897 /* System header to define __stub macros and hopefully few prototypes,
7898     which can conflict with char $ac_func(); below.  */
7899 #include <assert.h>
7900 /* Override any gcc2 internal prototype to avoid an error.  */
7901 /* We use char because int might match the return type of a gcc2
7902     builtin and then its argument prototype would still apply.  */
7903 char $ac_func();
7904
7905 int main() {
7906
7907 /* The GNU C library defines this for functions which it implements
7908     to always fail with ENOSYS.  Some functions are actually named
7909     something starting with __ and the normal name is an alias.  */
7910 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7911 choke me
7912 #else
7913 $ac_func();
7914 #endif
7915
7916 ; return 0; }
7917 EOF
7918 if { (eval echo configure:7919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7919   rm -rf conftest*
7920   eval "ac_cv_func_$ac_func=yes"
7921 else
7922   echo "configure: failed program was:" >&5
7923   cat conftest.$ac_ext >&5
7924   rm -rf conftest*
7925   eval "ac_cv_func_$ac_func=no"
7926 fi
7927 rm -f conftest*
7928 fi
7929
7930 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7931   echo "$ac_t""yes" 1>&6
7932     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7933   cat >> confdefs.h <<EOF
7934 #define $ac_tr_func 1
7935 EOF
7936  
7937 else
7938   echo "$ac_t""no" 1>&6
7939 fi
7940 done
7941  ;;
7942   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7943 echo "configure:7944: checking for getspnam in -lsecurity" >&5
7944 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7945 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7946   echo $ac_n "(cached) $ac_c" 1>&6
7947 else
7948   ac_save_LIBS="$LIBS"
7949 LIBS="-lsecurity  $LIBS"
7950 cat > conftest.$ac_ext <<EOF
7951 #line 7952 "configure"
7952 #include "confdefs.h"
7953 /* Override any gcc2 internal prototype to avoid an error.  */
7954 /* We use char because int might match the return type of a gcc2
7955     builtin and then its argument prototype would still apply.  */
7956 char getspnam();
7957
7958 int main() {
7959 getspnam()
7960 ; return 0; }
7961 EOF
7962 if { (eval echo configure:7963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7963   rm -rf conftest*
7964   eval "ac_cv_lib_$ac_lib_var=yes"
7965 else
7966   echo "configure: failed program was:" >&5
7967   cat conftest.$ac_ext >&5
7968   rm -rf conftest*
7969   eval "ac_cv_lib_$ac_lib_var=no"
7970 fi
7971 rm -f conftest*
7972 LIBS="$ac_save_LIBS"
7973
7974 fi
7975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7976   echo "$ac_t""yes" 1>&6
7977     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7978     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7979   cat >> confdefs.h <<EOF
7980 #define $ac_tr_lib 1
7981 EOF
7982
7983   LIBS="-lsecurity $LIBS"
7984
7985 else
7986   echo "$ac_t""no" 1>&6
7987 fi
7988  
7989      for ac_func in getspnam
7990 do
7991 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7992 echo "configure:7993: checking for $ac_func" >&5
7993 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7994   echo $ac_n "(cached) $ac_c" 1>&6
7995 else
7996   cat > conftest.$ac_ext <<EOF
7997 #line 7998 "configure"
7998 #include "confdefs.h"
7999 /* System header to define __stub macros and hopefully few prototypes,
8000     which can conflict with char $ac_func(); below.  */
8001 #include <assert.h>
8002 /* Override any gcc2 internal prototype to avoid an error.  */
8003 /* We use char because int might match the return type of a gcc2
8004     builtin and then its argument prototype would still apply.  */
8005 char $ac_func();
8006
8007 int main() {
8008
8009 /* The GNU C library defines this for functions which it implements
8010     to always fail with ENOSYS.  Some functions are actually named
8011     something starting with __ and the normal name is an alias.  */
8012 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8013 choke me
8014 #else
8015 $ac_func();
8016 #endif
8017
8018 ; return 0; }
8019 EOF
8020 if { (eval echo configure:8021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8021   rm -rf conftest*
8022   eval "ac_cv_func_$ac_func=yes"
8023 else
8024   echo "configure: failed program was:" >&5
8025   cat conftest.$ac_ext >&5
8026   rm -rf conftest*
8027   eval "ac_cv_func_$ac_func=no"
8028 fi
8029 rm -f conftest*
8030 fi
8031
8032 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8033   echo "$ac_t""yes" 1>&6
8034     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8035   cat >> confdefs.h <<EOF
8036 #define $ac_tr_func 1
8037 EOF
8038  
8039 else
8040   echo "$ac_t""no" 1>&6
8041 fi
8042 done
8043
8044   ;;
8045   esac
8046
8047 case "$LIBS" in
8048   *-lsec*) for ac_func in getspnam
8049 do
8050 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8051 echo "configure:8052: checking for $ac_func" >&5
8052 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8053   echo $ac_n "(cached) $ac_c" 1>&6
8054 else
8055   cat > conftest.$ac_ext <<EOF
8056 #line 8057 "configure"
8057 #include "confdefs.h"
8058 /* System header to define __stub macros and hopefully few prototypes,
8059     which can conflict with char $ac_func(); below.  */
8060 #include <assert.h>
8061 /* Override any gcc2 internal prototype to avoid an error.  */
8062 /* We use char because int might match the return type of a gcc2
8063     builtin and then its argument prototype would still apply.  */
8064 char $ac_func();
8065
8066 int main() {
8067
8068 /* The GNU C library defines this for functions which it implements
8069     to always fail with ENOSYS.  Some functions are actually named
8070     something starting with __ and the normal name is an alias.  */
8071 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8072 choke me
8073 #else
8074 $ac_func();
8075 #endif
8076
8077 ; return 0; }
8078 EOF
8079 if { (eval echo configure:8080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8080   rm -rf conftest*
8081   eval "ac_cv_func_$ac_func=yes"
8082 else
8083   echo "configure: failed program was:" >&5
8084   cat conftest.$ac_ext >&5
8085   rm -rf conftest*
8086   eval "ac_cv_func_$ac_func=no"
8087 fi
8088 rm -f conftest*
8089 fi
8090
8091 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8092   echo "$ac_t""yes" 1>&6
8093     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8094   cat >> confdefs.h <<EOF
8095 #define $ac_tr_func 1
8096 EOF
8097  
8098 else
8099   echo "$ac_t""no" 1>&6
8100 fi
8101 done
8102  ;;
8103   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8104 echo "configure:8105: checking for getspnam in -lsec" >&5
8105 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8106 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8107   echo $ac_n "(cached) $ac_c" 1>&6
8108 else
8109   ac_save_LIBS="$LIBS"
8110 LIBS="-lsec  $LIBS"
8111 cat > conftest.$ac_ext <<EOF
8112 #line 8113 "configure"
8113 #include "confdefs.h"
8114 /* Override any gcc2 internal prototype to avoid an error.  */
8115 /* We use char because int might match the return type of a gcc2
8116     builtin and then its argument prototype would still apply.  */
8117 char getspnam();
8118
8119 int main() {
8120 getspnam()
8121 ; return 0; }
8122 EOF
8123 if { (eval echo configure:8124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8124   rm -rf conftest*
8125   eval "ac_cv_lib_$ac_lib_var=yes"
8126 else
8127   echo "configure: failed program was:" >&5
8128   cat conftest.$ac_ext >&5
8129   rm -rf conftest*
8130   eval "ac_cv_lib_$ac_lib_var=no"
8131 fi
8132 rm -f conftest*
8133 LIBS="$ac_save_LIBS"
8134
8135 fi
8136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8137   echo "$ac_t""yes" 1>&6
8138     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8139     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8140   cat >> confdefs.h <<EOF
8141 #define $ac_tr_lib 1
8142 EOF
8143
8144   LIBS="-lsec $LIBS"
8145
8146 else
8147   echo "$ac_t""no" 1>&6
8148 fi
8149  
8150      for ac_func in getspnam
8151 do
8152 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8153 echo "configure:8154: checking for $ac_func" >&5
8154 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8155   echo $ac_n "(cached) $ac_c" 1>&6
8156 else
8157   cat > conftest.$ac_ext <<EOF
8158 #line 8159 "configure"
8159 #include "confdefs.h"
8160 /* System header to define __stub macros and hopefully few prototypes,
8161     which can conflict with char $ac_func(); below.  */
8162 #include <assert.h>
8163 /* Override any gcc2 internal prototype to avoid an error.  */
8164 /* We use char because int might match the return type of a gcc2
8165     builtin and then its argument prototype would still apply.  */
8166 char $ac_func();
8167
8168 int main() {
8169
8170 /* The GNU C library defines this for functions which it implements
8171     to always fail with ENOSYS.  Some functions are actually named
8172     something starting with __ and the normal name is an alias.  */
8173 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8174 choke me
8175 #else
8176 $ac_func();
8177 #endif
8178
8179 ; return 0; }
8180 EOF
8181 if { (eval echo configure:8182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8182   rm -rf conftest*
8183   eval "ac_cv_func_$ac_func=yes"
8184 else
8185   echo "configure: failed program was:" >&5
8186   cat conftest.$ac_ext >&5
8187   rm -rf conftest*
8188   eval "ac_cv_func_$ac_func=no"
8189 fi
8190 rm -f conftest*
8191 fi
8192
8193 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8194   echo "$ac_t""yes" 1>&6
8195     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8196   cat >> confdefs.h <<EOF
8197 #define $ac_tr_func 1
8198 EOF
8199  
8200 else
8201   echo "$ac_t""no" 1>&6
8202 fi
8203 done
8204
8205   ;;
8206   esac
8207
8208
8209 case "$LIBS" in
8210   *-lsecurity*) for ac_func in bigcrypt
8211 do
8212 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8213 echo "configure:8214: checking for $ac_func" >&5
8214 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8215   echo $ac_n "(cached) $ac_c" 1>&6
8216 else
8217   cat > conftest.$ac_ext <<EOF
8218 #line 8219 "configure"
8219 #include "confdefs.h"
8220 /* System header to define __stub macros and hopefully few prototypes,
8221     which can conflict with char $ac_func(); below.  */
8222 #include <assert.h>
8223 /* Override any gcc2 internal prototype to avoid an error.  */
8224 /* We use char because int might match the return type of a gcc2
8225     builtin and then its argument prototype would still apply.  */
8226 char $ac_func();
8227
8228 int main() {
8229
8230 /* The GNU C library defines this for functions which it implements
8231     to always fail with ENOSYS.  Some functions are actually named
8232     something starting with __ and the normal name is an alias.  */
8233 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8234 choke me
8235 #else
8236 $ac_func();
8237 #endif
8238
8239 ; return 0; }
8240 EOF
8241 if { (eval echo configure:8242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8242   rm -rf conftest*
8243   eval "ac_cv_func_$ac_func=yes"
8244 else
8245   echo "configure: failed program was:" >&5
8246   cat conftest.$ac_ext >&5
8247   rm -rf conftest*
8248   eval "ac_cv_func_$ac_func=no"
8249 fi
8250 rm -f conftest*
8251 fi
8252
8253 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8254   echo "$ac_t""yes" 1>&6
8255     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8256   cat >> confdefs.h <<EOF
8257 #define $ac_tr_func 1
8258 EOF
8259  
8260 else
8261   echo "$ac_t""no" 1>&6
8262 fi
8263 done
8264  ;;
8265   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8266 echo "configure:8267: checking for bigcrypt in -lsecurity" >&5
8267 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8268 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8269   echo $ac_n "(cached) $ac_c" 1>&6
8270 else
8271   ac_save_LIBS="$LIBS"
8272 LIBS="-lsecurity  $LIBS"
8273 cat > conftest.$ac_ext <<EOF
8274 #line 8275 "configure"
8275 #include "confdefs.h"
8276 /* Override any gcc2 internal prototype to avoid an error.  */
8277 /* We use char because int might match the return type of a gcc2
8278     builtin and then its argument prototype would still apply.  */
8279 char bigcrypt();
8280
8281 int main() {
8282 bigcrypt()
8283 ; return 0; }
8284 EOF
8285 if { (eval echo configure:8286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8286   rm -rf conftest*
8287   eval "ac_cv_lib_$ac_lib_var=yes"
8288 else
8289   echo "configure: failed program was:" >&5
8290   cat conftest.$ac_ext >&5
8291   rm -rf conftest*
8292   eval "ac_cv_lib_$ac_lib_var=no"
8293 fi
8294 rm -f conftest*
8295 LIBS="$ac_save_LIBS"
8296
8297 fi
8298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8299   echo "$ac_t""yes" 1>&6
8300     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8301     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8302   cat >> confdefs.h <<EOF
8303 #define $ac_tr_lib 1
8304 EOF
8305
8306   LIBS="-lsecurity $LIBS"
8307
8308 else
8309   echo "$ac_t""no" 1>&6
8310 fi
8311  
8312      for ac_func in bigcrypt
8313 do
8314 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8315 echo "configure:8316: checking for $ac_func" >&5
8316 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8317   echo $ac_n "(cached) $ac_c" 1>&6
8318 else
8319   cat > conftest.$ac_ext <<EOF
8320 #line 8321 "configure"
8321 #include "confdefs.h"
8322 /* System header to define __stub macros and hopefully few prototypes,
8323     which can conflict with char $ac_func(); below.  */
8324 #include <assert.h>
8325 /* Override any gcc2 internal prototype to avoid an error.  */
8326 /* We use char because int might match the return type of a gcc2
8327     builtin and then its argument prototype would still apply.  */
8328 char $ac_func();
8329
8330 int main() {
8331
8332 /* The GNU C library defines this for functions which it implements
8333     to always fail with ENOSYS.  Some functions are actually named
8334     something starting with __ and the normal name is an alias.  */
8335 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8336 choke me
8337 #else
8338 $ac_func();
8339 #endif
8340
8341 ; return 0; }
8342 EOF
8343 if { (eval echo configure:8344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8344   rm -rf conftest*
8345   eval "ac_cv_func_$ac_func=yes"
8346 else
8347   echo "configure: failed program was:" >&5
8348   cat conftest.$ac_ext >&5
8349   rm -rf conftest*
8350   eval "ac_cv_func_$ac_func=no"
8351 fi
8352 rm -f conftest*
8353 fi
8354
8355 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8356   echo "$ac_t""yes" 1>&6
8357     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8358   cat >> confdefs.h <<EOF
8359 #define $ac_tr_func 1
8360 EOF
8361  
8362 else
8363   echo "$ac_t""no" 1>&6
8364 fi
8365 done
8366
8367   ;;
8368   esac
8369
8370 case "$LIBS" in
8371   *-lsec*) for ac_func in bigcrypt
8372 do
8373 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8374 echo "configure:8375: checking for $ac_func" >&5
8375 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8376   echo $ac_n "(cached) $ac_c" 1>&6
8377 else
8378   cat > conftest.$ac_ext <<EOF
8379 #line 8380 "configure"
8380 #include "confdefs.h"
8381 /* System header to define __stub macros and hopefully few prototypes,
8382     which can conflict with char $ac_func(); below.  */
8383 #include <assert.h>
8384 /* Override any gcc2 internal prototype to avoid an error.  */
8385 /* We use char because int might match the return type of a gcc2
8386     builtin and then its argument prototype would still apply.  */
8387 char $ac_func();
8388
8389 int main() {
8390
8391 /* The GNU C library defines this for functions which it implements
8392     to always fail with ENOSYS.  Some functions are actually named
8393     something starting with __ and the normal name is an alias.  */
8394 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8395 choke me
8396 #else
8397 $ac_func();
8398 #endif
8399
8400 ; return 0; }
8401 EOF
8402 if { (eval echo configure:8403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8403   rm -rf conftest*
8404   eval "ac_cv_func_$ac_func=yes"
8405 else
8406   echo "configure: failed program was:" >&5
8407   cat conftest.$ac_ext >&5
8408   rm -rf conftest*
8409   eval "ac_cv_func_$ac_func=no"
8410 fi
8411 rm -f conftest*
8412 fi
8413
8414 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8415   echo "$ac_t""yes" 1>&6
8416     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8417   cat >> confdefs.h <<EOF
8418 #define $ac_tr_func 1
8419 EOF
8420  
8421 else
8422   echo "$ac_t""no" 1>&6
8423 fi
8424 done
8425  ;;
8426   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8427 echo "configure:8428: checking for bigcrypt in -lsec" >&5
8428 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8429 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8430   echo $ac_n "(cached) $ac_c" 1>&6
8431 else
8432   ac_save_LIBS="$LIBS"
8433 LIBS="-lsec  $LIBS"
8434 cat > conftest.$ac_ext <<EOF
8435 #line 8436 "configure"
8436 #include "confdefs.h"
8437 /* Override any gcc2 internal prototype to avoid an error.  */
8438 /* We use char because int might match the return type of a gcc2
8439     builtin and then its argument prototype would still apply.  */
8440 char bigcrypt();
8441
8442 int main() {
8443 bigcrypt()
8444 ; return 0; }
8445 EOF
8446 if { (eval echo configure:8447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8447   rm -rf conftest*
8448   eval "ac_cv_lib_$ac_lib_var=yes"
8449 else
8450   echo "configure: failed program was:" >&5
8451   cat conftest.$ac_ext >&5
8452   rm -rf conftest*
8453   eval "ac_cv_lib_$ac_lib_var=no"
8454 fi
8455 rm -f conftest*
8456 LIBS="$ac_save_LIBS"
8457
8458 fi
8459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8460   echo "$ac_t""yes" 1>&6
8461     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8462     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8463   cat >> confdefs.h <<EOF
8464 #define $ac_tr_lib 1
8465 EOF
8466
8467   LIBS="-lsec $LIBS"
8468
8469 else
8470   echo "$ac_t""no" 1>&6
8471 fi
8472  
8473      for ac_func in bigcrypt
8474 do
8475 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8476 echo "configure:8477: checking for $ac_func" >&5
8477 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8478   echo $ac_n "(cached) $ac_c" 1>&6
8479 else
8480   cat > conftest.$ac_ext <<EOF
8481 #line 8482 "configure"
8482 #include "confdefs.h"
8483 /* System header to define __stub macros and hopefully few prototypes,
8484     which can conflict with char $ac_func(); below.  */
8485 #include <assert.h>
8486 /* Override any gcc2 internal prototype to avoid an error.  */
8487 /* We use char because int might match the return type of a gcc2
8488     builtin and then its argument prototype would still apply.  */
8489 char $ac_func();
8490
8491 int main() {
8492
8493 /* The GNU C library defines this for functions which it implements
8494     to always fail with ENOSYS.  Some functions are actually named
8495     something starting with __ and the normal name is an alias.  */
8496 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8497 choke me
8498 #else
8499 $ac_func();
8500 #endif
8501
8502 ; return 0; }
8503 EOF
8504 if { (eval echo configure:8505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8505   rm -rf conftest*
8506   eval "ac_cv_func_$ac_func=yes"
8507 else
8508   echo "configure: failed program was:" >&5
8509   cat conftest.$ac_ext >&5
8510   rm -rf conftest*
8511   eval "ac_cv_func_$ac_func=no"
8512 fi
8513 rm -f conftest*
8514 fi
8515
8516 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8517   echo "$ac_t""yes" 1>&6
8518     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8519   cat >> confdefs.h <<EOF
8520 #define $ac_tr_func 1
8521 EOF
8522  
8523 else
8524   echo "$ac_t""no" 1>&6
8525 fi
8526 done
8527
8528   ;;
8529   esac
8530
8531
8532 case "$LIBS" in
8533   *-lsecurity*) for ac_func in getprpwnam
8534 do
8535 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8536 echo "configure:8537: checking for $ac_func" >&5
8537 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8538   echo $ac_n "(cached) $ac_c" 1>&6
8539 else
8540   cat > conftest.$ac_ext <<EOF
8541 #line 8542 "configure"
8542 #include "confdefs.h"
8543 /* System header to define __stub macros and hopefully few prototypes,
8544     which can conflict with char $ac_func(); below.  */
8545 #include <assert.h>
8546 /* Override any gcc2 internal prototype to avoid an error.  */
8547 /* We use char because int might match the return type of a gcc2
8548     builtin and then its argument prototype would still apply.  */
8549 char $ac_func();
8550
8551 int main() {
8552
8553 /* The GNU C library defines this for functions which it implements
8554     to always fail with ENOSYS.  Some functions are actually named
8555     something starting with __ and the normal name is an alias.  */
8556 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8557 choke me
8558 #else
8559 $ac_func();
8560 #endif
8561
8562 ; return 0; }
8563 EOF
8564 if { (eval echo configure:8565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8565   rm -rf conftest*
8566   eval "ac_cv_func_$ac_func=yes"
8567 else
8568   echo "configure: failed program was:" >&5
8569   cat conftest.$ac_ext >&5
8570   rm -rf conftest*
8571   eval "ac_cv_func_$ac_func=no"
8572 fi
8573 rm -f conftest*
8574 fi
8575
8576 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8577   echo "$ac_t""yes" 1>&6
8578     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8579   cat >> confdefs.h <<EOF
8580 #define $ac_tr_func 1
8581 EOF
8582  
8583 else
8584   echo "$ac_t""no" 1>&6
8585 fi
8586 done
8587  ;;
8588   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8589 echo "configure:8590: checking for getprpwnam in -lsecurity" >&5
8590 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8591 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8592   echo $ac_n "(cached) $ac_c" 1>&6
8593 else
8594   ac_save_LIBS="$LIBS"
8595 LIBS="-lsecurity  $LIBS"
8596 cat > conftest.$ac_ext <<EOF
8597 #line 8598 "configure"
8598 #include "confdefs.h"
8599 /* Override any gcc2 internal prototype to avoid an error.  */
8600 /* We use char because int might match the return type of a gcc2
8601     builtin and then its argument prototype would still apply.  */
8602 char getprpwnam();
8603
8604 int main() {
8605 getprpwnam()
8606 ; return 0; }
8607 EOF
8608 if { (eval echo configure:8609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8609   rm -rf conftest*
8610   eval "ac_cv_lib_$ac_lib_var=yes"
8611 else
8612   echo "configure: failed program was:" >&5
8613   cat conftest.$ac_ext >&5
8614   rm -rf conftest*
8615   eval "ac_cv_lib_$ac_lib_var=no"
8616 fi
8617 rm -f conftest*
8618 LIBS="$ac_save_LIBS"
8619
8620 fi
8621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8622   echo "$ac_t""yes" 1>&6
8623     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8624     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8625   cat >> confdefs.h <<EOF
8626 #define $ac_tr_lib 1
8627 EOF
8628
8629   LIBS="-lsecurity $LIBS"
8630
8631 else
8632   echo "$ac_t""no" 1>&6
8633 fi
8634  
8635      for ac_func in getprpwnam
8636 do
8637 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8638 echo "configure:8639: checking for $ac_func" >&5
8639 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8640   echo $ac_n "(cached) $ac_c" 1>&6
8641 else
8642   cat > conftest.$ac_ext <<EOF
8643 #line 8644 "configure"
8644 #include "confdefs.h"
8645 /* System header to define __stub macros and hopefully few prototypes,
8646     which can conflict with char $ac_func(); below.  */
8647 #include <assert.h>
8648 /* Override any gcc2 internal prototype to avoid an error.  */
8649 /* We use char because int might match the return type of a gcc2
8650     builtin and then its argument prototype would still apply.  */
8651 char $ac_func();
8652
8653 int main() {
8654
8655 /* The GNU C library defines this for functions which it implements
8656     to always fail with ENOSYS.  Some functions are actually named
8657     something starting with __ and the normal name is an alias.  */
8658 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8659 choke me
8660 #else
8661 $ac_func();
8662 #endif
8663
8664 ; return 0; }
8665 EOF
8666 if { (eval echo configure:8667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8667   rm -rf conftest*
8668   eval "ac_cv_func_$ac_func=yes"
8669 else
8670   echo "configure: failed program was:" >&5
8671   cat conftest.$ac_ext >&5
8672   rm -rf conftest*
8673   eval "ac_cv_func_$ac_func=no"
8674 fi
8675 rm -f conftest*
8676 fi
8677
8678 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8679   echo "$ac_t""yes" 1>&6
8680     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8681   cat >> confdefs.h <<EOF
8682 #define $ac_tr_func 1
8683 EOF
8684  
8685 else
8686   echo "$ac_t""no" 1>&6
8687 fi
8688 done
8689
8690   ;;
8691   esac
8692
8693 case "$LIBS" in
8694   *-lsec*) for ac_func in getprpwnam
8695 do
8696 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8697 echo "configure:8698: checking for $ac_func" >&5
8698 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8699   echo $ac_n "(cached) $ac_c" 1>&6
8700 else
8701   cat > conftest.$ac_ext <<EOF
8702 #line 8703 "configure"
8703 #include "confdefs.h"
8704 /* System header to define __stub macros and hopefully few prototypes,
8705     which can conflict with char $ac_func(); below.  */
8706 #include <assert.h>
8707 /* Override any gcc2 internal prototype to avoid an error.  */
8708 /* We use char because int might match the return type of a gcc2
8709     builtin and then its argument prototype would still apply.  */
8710 char $ac_func();
8711
8712 int main() {
8713
8714 /* The GNU C library defines this for functions which it implements
8715     to always fail with ENOSYS.  Some functions are actually named
8716     something starting with __ and the normal name is an alias.  */
8717 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8718 choke me
8719 #else
8720 $ac_func();
8721 #endif
8722
8723 ; return 0; }
8724 EOF
8725 if { (eval echo configure:8726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8726   rm -rf conftest*
8727   eval "ac_cv_func_$ac_func=yes"
8728 else
8729   echo "configure: failed program was:" >&5
8730   cat conftest.$ac_ext >&5
8731   rm -rf conftest*
8732   eval "ac_cv_func_$ac_func=no"
8733 fi
8734 rm -f conftest*
8735 fi
8736
8737 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8738   echo "$ac_t""yes" 1>&6
8739     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8740   cat >> confdefs.h <<EOF
8741 #define $ac_tr_func 1
8742 EOF
8743  
8744 else
8745   echo "$ac_t""no" 1>&6
8746 fi
8747 done
8748  ;;
8749   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8750 echo "configure:8751: checking for getprpwnam in -lsec" >&5
8751 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8752 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8753   echo $ac_n "(cached) $ac_c" 1>&6
8754 else
8755   ac_save_LIBS="$LIBS"
8756 LIBS="-lsec  $LIBS"
8757 cat > conftest.$ac_ext <<EOF
8758 #line 8759 "configure"
8759 #include "confdefs.h"
8760 /* Override any gcc2 internal prototype to avoid an error.  */
8761 /* We use char because int might match the return type of a gcc2
8762     builtin and then its argument prototype would still apply.  */
8763 char getprpwnam();
8764
8765 int main() {
8766 getprpwnam()
8767 ; return 0; }
8768 EOF
8769 if { (eval echo configure:8770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8770   rm -rf conftest*
8771   eval "ac_cv_lib_$ac_lib_var=yes"
8772 else
8773   echo "configure: failed program was:" >&5
8774   cat conftest.$ac_ext >&5
8775   rm -rf conftest*
8776   eval "ac_cv_lib_$ac_lib_var=no"
8777 fi
8778 rm -f conftest*
8779 LIBS="$ac_save_LIBS"
8780
8781 fi
8782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8783   echo "$ac_t""yes" 1>&6
8784     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8785     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8786   cat >> confdefs.h <<EOF
8787 #define $ac_tr_lib 1
8788 EOF
8789
8790   LIBS="-lsec $LIBS"
8791
8792 else
8793   echo "$ac_t""no" 1>&6
8794 fi
8795  
8796      for ac_func in getprpwnam
8797 do
8798 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8799 echo "configure:8800: checking for $ac_func" >&5
8800 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8801   echo $ac_n "(cached) $ac_c" 1>&6
8802 else
8803   cat > conftest.$ac_ext <<EOF
8804 #line 8805 "configure"
8805 #include "confdefs.h"
8806 /* System header to define __stub macros and hopefully few prototypes,
8807     which can conflict with char $ac_func(); below.  */
8808 #include <assert.h>
8809 /* Override any gcc2 internal prototype to avoid an error.  */
8810 /* We use char because int might match the return type of a gcc2
8811     builtin and then its argument prototype would still apply.  */
8812 char $ac_func();
8813
8814 int main() {
8815
8816 /* The GNU C library defines this for functions which it implements
8817     to always fail with ENOSYS.  Some functions are actually named
8818     something starting with __ and the normal name is an alias.  */
8819 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8820 choke me
8821 #else
8822 $ac_func();
8823 #endif
8824
8825 ; return 0; }
8826 EOF
8827 if { (eval echo configure:8828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8828   rm -rf conftest*
8829   eval "ac_cv_func_$ac_func=yes"
8830 else
8831   echo "configure: failed program was:" >&5
8832   cat conftest.$ac_ext >&5
8833   rm -rf conftest*
8834   eval "ac_cv_func_$ac_func=no"
8835 fi
8836 rm -f conftest*
8837 fi
8838
8839 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8840   echo "$ac_t""yes" 1>&6
8841     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8842   cat >> confdefs.h <<EOF
8843 #define $ac_tr_func 1
8844 EOF
8845  
8846 else
8847   echo "$ac_t""no" 1>&6
8848 fi
8849 done
8850
8851   ;;
8852   esac
8853
8854
8855 # this bit needs to be modified for each OS that is suported by
8856 # smbwrapper. You need to specify how to created a shared library and
8857 # how to compile C code to produce PIC object files
8858
8859 # these are the defaults, good for lots of systems
8860 HOST_OS="$host_os"
8861 LDSHFLAGS="-shared"
8862 SONAMEFLAG="#"
8863 SHLD="\${CC}"
8864 PICFLAG=""
8865 PICSUFFIX="po"
8866 POBAD_CC="#"
8867 SHLIBEXT="so"
8868 # Assume non-shared by default and override below
8869 BLDSHARED="false"
8870 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8871 echo "configure:8872: checking ability to build shared libraries" >&5
8872
8873 # and these are for particular systems
8874 case "$host_os" in
8875                 *linux*)   cat >> confdefs.h <<\EOF
8876 #define LINUX 1
8877 EOF
8878
8879                         BLDSHARED="true"
8880                         LDSHFLAGS="-shared" 
8881                         DYNEXP="-Wl,--export-dynamic"
8882                         PICFLAG="-fPIC"
8883                         SONAMEFLAG="-Wl,-soname="
8884                         cat >> confdefs.h <<\EOF
8885 #define STAT_ST_BLOCKSIZE 512
8886 EOF
8887
8888                 ;;
8889                 *solaris*) cat >> confdefs.h <<\EOF
8890 #define SUNOS5 1
8891 EOF
8892
8893                         BLDSHARED="true"
8894                         LDSHFLAGS="-G"
8895                         SONAMEFLAG="-h "
8896                         if test "${GCC}" = "yes"; then
8897                                 PICFLAG="-fPIC"
8898                                 if test "${ac_cv_prog_gnu_ld}" = "yes"; then
8899                                         DYNEXP="-Wl,-E"
8900                                 fi
8901                         else
8902                                 PICFLAG="-KPIC"
8903                                 ## ${CFLAGS} added for building 64-bit shared 
8904                                 ## libs using Sun's Compiler
8905                                 LDSHFLAGS="-G \${CFLAGS}"
8906                                 POBAD_CC=""
8907                                 PICSUFFIX="po.o"
8908                         fi
8909                         cat >> confdefs.h <<\EOF
8910 #define STAT_ST_BLOCKSIZE 512
8911 EOF
8912
8913                 ;;
8914                 *sunos*) cat >> confdefs.h <<\EOF
8915 #define SUNOS4 1
8916 EOF
8917
8918                         BLDSHARED="true"
8919                         LDSHFLAGS="-G"
8920                         SONAMEFLAG="-Wl,-h,"
8921                         PICFLAG="-KPIC"   # Is this correct for SunOS
8922                 ;;
8923                 *bsd*)  BLDSHARED="true"
8924                         LDSHFLAGS="-shared"
8925                         DYNEXP="-Wl,-Bdynamic"
8926                         SONAMEFLAG="-Wl,-soname,"
8927                         PICFLAG="-fPIC"
8928                         cat >> confdefs.h <<\EOF
8929 #define STAT_ST_BLOCKSIZE 512
8930 EOF
8931
8932                 ;;
8933                 *irix*) cat >> confdefs.h <<\EOF
8934 #define IRIX 1
8935 EOF
8936
8937                         case "$host_os" in
8938                         *irix6*) cat >> confdefs.h <<\EOF
8939 #define IRIX6 1
8940 EOF
8941
8942                         ;;
8943                         esac
8944                         ATTEMPT_WRAP32_BUILD=yes
8945                         BLDSHARED="true"
8946                         LDSHFLAGS="-set_version sgi1.0 -shared"
8947                         SONAMEFLAG="-soname "
8948                         SHLD="\${LD}"
8949                         if test "${GCC}" = "yes"; then
8950                                 PICFLAG="-fPIC"
8951                         else 
8952                                 PICFLAG="-KPIC"
8953                         fi
8954                         cat >> confdefs.h <<\EOF
8955 #define STAT_ST_BLOCKSIZE 512
8956 EOF
8957
8958                 ;;
8959                 *aix*) cat >> confdefs.h <<\EOF
8960 #define AIX 1
8961 EOF
8962
8963                         BLDSHARED="true"
8964                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8965                         DYNEXP="-Wl,-brtl,-bexpall"
8966                         if test "${GCC}" = "yes"; then
8967                                 PICFLAG="-O2"
8968                         else
8969                         PICFLAG="-O2 -qmaxmem=6000"
8970                                 ## for funky AIX compiler using strncpy()
8971                                 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT"
8972                         fi
8973
8974                         cat >> confdefs.h <<\EOF
8975 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8976 EOF
8977
8978                 ;;
8979                 *hpux*) cat >> confdefs.h <<\EOF
8980 #define HPUX 1
8981 EOF
8982
8983                         SHLIBEXT="sl"
8984                         # Use special PIC flags for the native HP-UX compiler.
8985                         if test $ac_cv_prog_cc_Ae = yes; then
8986                                 BLDSHARED="true"
8987                                 SHLD="/usr/bin/ld"
8988                                 LDSHFLAGS="-B symbolic -b -z"
8989                                 SONAMEFLAG="+h "
8990                                 PICFLAG="+z"
8991                         fi
8992                         DYNEXP="-Wl,-E"
8993                         cat >> confdefs.h <<\EOF
8994 #define STAT_ST_BLOCKSIZE 8192
8995 EOF
8996
8997                 ;;
8998                 *qnx*) cat >> confdefs.h <<\EOF
8999 #define QNX 1
9000 EOF
9001 ;;
9002                 *osf*) cat >> confdefs.h <<\EOF
9003 #define OSF1 1
9004 EOF
9005
9006                         BLDSHARED="true"
9007                         LDSHFLAGS="-shared"
9008                         SONAMEFLAG="-Wl,-soname,"
9009                         PICFLAG="-fPIC"
9010                 ;;
9011                 *sco*) cat >> confdefs.h <<\EOF
9012 #define SCO 1
9013 EOF
9014 ;;
9015                 *unixware*) cat >> confdefs.h <<\EOF
9016 #define UNIXWARE 1
9017 EOF
9018
9019                         BLDSHARED="true"
9020                         LDSHFLAGS="-shared"
9021                         SONAMEFLAG="-Wl,-soname,"
9022                         PICFLAG="-KPIC"
9023                 ;;
9024                 *next2*) cat >> confdefs.h <<\EOF
9025 #define NEXT2 1
9026 EOF
9027 ;;
9028                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
9029 set dummy groff; ac_word=$2
9030 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9031 echo "configure:9032: checking for $ac_word" >&5
9032 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
9033   echo $ac_n "(cached) $ac_c" 1>&6
9034 else
9035   if test -n "$ROFF"; then
9036   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
9037 else
9038   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
9039   ac_dummy="$PATH"
9040   for ac_dir in $ac_dummy; do
9041     test -z "$ac_dir" && ac_dir=.
9042     if test -f $ac_dir/$ac_word; then
9043       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9044       break
9045     fi
9046   done
9047   IFS="$ac_save_ifs"
9048 fi
9049 fi
9050 ROFF="$ac_cv_prog_ROFF"
9051 if test -n "$ROFF"; then
9052   echo "$ac_t""$ROFF" 1>&6
9053 else
9054   echo "$ac_t""no" 1>&6
9055 fi
9056 ;;
9057                 *sysv4*)
9058                         case "$host" in
9059                                 *-univel-*)     if  test "$GCC" != yes ; then
9060                                                 cat >> confdefs.h <<\EOF
9061 #define HAVE_MEMSET 1
9062 EOF
9063
9064                                         fi
9065                                         LDSHFLAGS="-G"
9066                                         DYNEXP="-Bexport"
9067                                 ;;
9068                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
9069 #define RELIANTUNIX 1
9070 EOF
9071 ;;
9072                         esac
9073                 ;;
9074
9075                 *sysv5*)
9076                         if  test "$GCC" != yes ; then
9077                                 cat >> confdefs.h <<\EOF
9078 #define HAVE_MEMSET 1
9079 EOF
9080
9081                         fi
9082                         LDSHFLAGS="-G"
9083                 ;;
9084 esac
9085
9086 echo "$ac_t""$BLDSHARED" 1>&6
9087 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9088 echo "configure:9089: checking linker flags for shared libraries" >&5
9089 echo "$ac_t""$LDSHFLAGS" 1>&6
9090 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9091 echo "configure:9092: checking compiler flags for position-independent code" >&5
9092 echo "$ac_t""$PICFLAGS" 1>&6
9093
9094 #######################################################
9095 # test whether building a shared library actually works
9096 if test $BLDSHARED = true; then
9097 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9098 echo "configure:9099: checking whether building shared libraries actually works" >&5
9099 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9100   echo $ac_n "(cached) $ac_c" 1>&6
9101 else
9102   
9103    ac_cv_shlib_works=no
9104    # try building a trivial shared library
9105    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9106      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
9107      ac_cv_shlib_works=yes
9108    rm -f shlib.so shlib.po
9109
9110 fi
9111
9112 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9113 if test $ac_cv_shlib_works = no; then
9114    BLDSHARED=false
9115 fi
9116 fi
9117
9118
9119 # this updates our target list if we can build shared libs
9120 if test $BLDSHARED = true; then
9121    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9122 else
9123    LIBSMBCLIENT_SHARED=
9124 fi
9125
9126 ################
9127
9128 echo $ac_n "checking for long long""... $ac_c" 1>&6
9129 echo "configure:9130: checking for long long" >&5
9130 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9131   echo $ac_n "(cached) $ac_c" 1>&6
9132 else
9133   
9134 if test "$cross_compiling" = yes; then
9135   samba_cv_have_longlong=cross
9136 else
9137   cat > conftest.$ac_ext <<EOF
9138 #line 9139 "configure"
9139 #include "confdefs.h"
9140 #include <stdio.h>
9141 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9142 EOF
9143 if { (eval echo configure:9144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9144 then
9145   samba_cv_have_longlong=yes
9146 else
9147   echo "configure: failed program was:" >&5
9148   cat conftest.$ac_ext >&5
9149   rm -fr conftest*
9150   samba_cv_have_longlong=no
9151 fi
9152 rm -fr conftest*
9153 fi
9154
9155 fi
9156
9157 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9158 if test x"$samba_cv_have_longlong" = x"yes"; then
9159     cat >> confdefs.h <<\EOF
9160 #define HAVE_LONGLONG 1
9161 EOF
9162
9163 fi
9164
9165 #
9166 # Check if the compiler supports the LL prefix on long long integers.
9167 # AIX needs this.
9168
9169 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9170 echo "configure:9171: checking for LL suffix on long long integers" >&5
9171 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9172   echo $ac_n "(cached) $ac_c" 1>&6
9173 else
9174   
9175     cat > conftest.$ac_ext <<EOF
9176 #line 9177 "configure"
9177 #include "confdefs.h"
9178 #include <stdio.h>
9179 int main() {
9180 long long i = 0x8000000000LL
9181 ; return 0; }
9182 EOF
9183 if { (eval echo configure:9184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9184   rm -rf conftest*
9185   samba_cv_compiler_supports_ll=yes
9186 else
9187   echo "configure: failed program was:" >&5
9188   cat conftest.$ac_ext >&5
9189   rm -rf conftest*
9190   samba_cv_compiler_supports_ll=no
9191 fi
9192 rm -f conftest*
9193 fi
9194
9195 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9196 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9197    cat >> confdefs.h <<\EOF
9198 #define COMPILER_SUPPORTS_LL 1
9199 EOF
9200
9201 fi
9202
9203   
9204 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9205 echo "configure:9206: checking for 64 bit off_t" >&5
9206 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9207   echo $ac_n "(cached) $ac_c" 1>&6
9208 else
9209   
9210 if test "$cross_compiling" = yes; then
9211   samba_cv_SIZEOF_OFF_T=cross
9212 else
9213   cat > conftest.$ac_ext <<EOF
9214 #line 9215 "configure"
9215 #include "confdefs.h"
9216 #include <stdio.h>
9217 #include <sys/stat.h>
9218 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9219 EOF
9220 if { (eval echo configure:9221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9221 then
9222   samba_cv_SIZEOF_OFF_T=yes
9223 else
9224   echo "configure: failed program was:" >&5
9225   cat conftest.$ac_ext >&5
9226   rm -fr conftest*
9227   samba_cv_SIZEOF_OFF_T=no
9228 fi
9229 rm -fr conftest*
9230 fi
9231
9232 fi
9233
9234 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9235 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9236     cat >> confdefs.h <<\EOF
9237 #define SIZEOF_OFF_T 8
9238 EOF
9239
9240 fi
9241
9242 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9243 echo "configure:9244: checking for off64_t" >&5
9244 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9245   echo $ac_n "(cached) $ac_c" 1>&6
9246 else
9247   
9248 if test "$cross_compiling" = yes; then
9249   samba_cv_HAVE_OFF64_T=cross
9250 else
9251   cat > conftest.$ac_ext <<EOF
9252 #line 9253 "configure"
9253 #include "confdefs.h"
9254
9255 #if defined(HAVE_UNISTD_H)
9256 #include <unistd.h>
9257 #endif
9258 #include <stdio.h>
9259 #include <sys/stat.h>
9260 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9261 EOF
9262 if { (eval echo configure:9263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9263 then
9264   samba_cv_HAVE_OFF64_T=yes
9265 else
9266   echo "configure: failed program was:" >&5
9267   cat conftest.$ac_ext >&5
9268   rm -fr conftest*
9269   samba_cv_HAVE_OFF64_T=no
9270 fi
9271 rm -fr conftest*
9272 fi
9273
9274 fi
9275
9276 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9277 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9278     cat >> confdefs.h <<\EOF
9279 #define HAVE_OFF64_T 1
9280 EOF
9281
9282 fi
9283
9284 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9285 echo "configure:9286: checking for 64 bit ino_t" >&5
9286 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9287   echo $ac_n "(cached) $ac_c" 1>&6
9288 else
9289   
9290 if test "$cross_compiling" = yes; then
9291   samba_cv_SIZEOF_INO_T=cross
9292 else
9293   cat > conftest.$ac_ext <<EOF
9294 #line 9295 "configure"
9295 #include "confdefs.h"
9296 #include <stdio.h>
9297 #include <sys/stat.h>
9298 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9299 EOF
9300 if { (eval echo configure:9301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9301 then
9302   samba_cv_SIZEOF_INO_T=yes
9303 else
9304   echo "configure: failed program was:" >&5
9305   cat conftest.$ac_ext >&5
9306   rm -fr conftest*
9307   samba_cv_SIZEOF_INO_T=no
9308 fi
9309 rm -fr conftest*
9310 fi
9311
9312 fi
9313
9314 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9315 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9316     cat >> confdefs.h <<\EOF
9317 #define SIZEOF_INO_T 8
9318 EOF
9319
9320 fi
9321
9322 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9323 echo "configure:9324: checking for ino64_t" >&5
9324 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9325   echo $ac_n "(cached) $ac_c" 1>&6
9326 else
9327   
9328 if test "$cross_compiling" = yes; then
9329   samba_cv_HAVE_INO64_T=cross
9330 else
9331   cat > conftest.$ac_ext <<EOF
9332 #line 9333 "configure"
9333 #include "confdefs.h"
9334
9335 #if defined(HAVE_UNISTD_H)
9336 #include <unistd.h>
9337 #endif
9338 #include <stdio.h>
9339 #include <sys/stat.h>
9340 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9341 EOF
9342 if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9343 then
9344   samba_cv_HAVE_INO64_T=yes
9345 else
9346   echo "configure: failed program was:" >&5
9347   cat conftest.$ac_ext >&5
9348   rm -fr conftest*
9349   samba_cv_HAVE_INO64_T=no
9350 fi
9351 rm -fr conftest*
9352 fi
9353
9354 fi
9355
9356 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9357 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9358     cat >> confdefs.h <<\EOF
9359 #define HAVE_INO64_T 1
9360 EOF
9361
9362 fi
9363
9364 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9365 echo "configure:9366: checking for dev64_t" >&5
9366 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9367   echo $ac_n "(cached) $ac_c" 1>&6
9368 else
9369   
9370 if test "$cross_compiling" = yes; then
9371   samba_cv_HAVE_DEV64_T=cross
9372 else
9373   cat > conftest.$ac_ext <<EOF
9374 #line 9375 "configure"
9375 #include "confdefs.h"
9376
9377 #if defined(HAVE_UNISTD_H)
9378 #include <unistd.h>
9379 #endif
9380 #include <stdio.h>
9381 #include <sys/stat.h>
9382 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9383 EOF
9384 if { (eval echo configure:9385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9385 then
9386   samba_cv_HAVE_DEV64_T=yes
9387 else
9388   echo "configure: failed program was:" >&5
9389   cat conftest.$ac_ext >&5
9390   rm -fr conftest*
9391   samba_cv_HAVE_DEV64_T=no
9392 fi
9393 rm -fr conftest*
9394 fi
9395
9396 fi
9397
9398 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9399 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9400     cat >> confdefs.h <<\EOF
9401 #define HAVE_DEV64_T 1
9402 EOF
9403
9404 fi
9405
9406 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9407 echo "configure:9408: checking for struct dirent64" >&5
9408 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9409   echo $ac_n "(cached) $ac_c" 1>&6
9410 else
9411   
9412 cat > conftest.$ac_ext <<EOF
9413 #line 9414 "configure"
9414 #include "confdefs.h"
9415
9416 #if defined(HAVE_UNISTD_H)
9417 #include <unistd.h>
9418 #endif
9419 #include <sys/types.h>
9420 #include <dirent.h>
9421 int main() {
9422 struct dirent64 de;
9423 ; return 0; }
9424 EOF
9425 if { (eval echo configure:9426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9426   rm -rf conftest*
9427   samba_cv_HAVE_STRUCT_DIRENT64=yes
9428 else
9429   echo "configure: failed program was:" >&5
9430   cat conftest.$ac_ext >&5
9431   rm -rf conftest*
9432   samba_cv_HAVE_STRUCT_DIRENT64=no
9433 fi
9434 rm -f conftest*
9435 fi
9436
9437 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9438 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
9439     cat >> confdefs.h <<\EOF
9440 #define HAVE_STRUCT_DIRENT64 1
9441 EOF
9442
9443 fi
9444
9445 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9446 echo "configure:9447: checking for major macro" >&5
9447 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9448   echo $ac_n "(cached) $ac_c" 1>&6
9449 else
9450   
9451 if test "$cross_compiling" = yes; then
9452   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9453 else
9454   cat > conftest.$ac_ext <<EOF
9455 #line 9456 "configure"
9456 #include "confdefs.h"
9457
9458 #if defined(HAVE_UNISTD_H)
9459 #include <unistd.h>
9460 #endif
9461 #include <sys/types.h>
9462 main() { dev_t dev; int i = major(dev); return 0; }
9463 EOF
9464 if { (eval echo configure:9465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9465 then
9466   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9467 else
9468   echo "configure: failed program was:" >&5
9469   cat conftest.$ac_ext >&5
9470   rm -fr conftest*
9471   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9472 fi
9473 rm -fr conftest*
9474 fi
9475
9476 fi
9477
9478 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9479 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9480     cat >> confdefs.h <<\EOF
9481 #define HAVE_DEVICE_MAJOR_FN 1
9482 EOF
9483
9484 fi
9485
9486 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9487 echo "configure:9488: checking for minor macro" >&5
9488 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9489   echo $ac_n "(cached) $ac_c" 1>&6
9490 else
9491   
9492 if test "$cross_compiling" = yes; then
9493   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9494 else
9495   cat > conftest.$ac_ext <<EOF
9496 #line 9497 "configure"
9497 #include "confdefs.h"
9498
9499 #if defined(HAVE_UNISTD_H)
9500 #include <unistd.h>
9501 #endif
9502 #include <sys/types.h>
9503 main() { dev_t dev; int i = minor(dev); return 0; }
9504 EOF
9505 if { (eval echo configure:9506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9506 then
9507   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9508 else
9509   echo "configure: failed program was:" >&5
9510   cat conftest.$ac_ext >&5
9511   rm -fr conftest*
9512   samba_cv_HAVE_DEVICE_MINOR_FN=no
9513 fi
9514 rm -fr conftest*
9515 fi
9516
9517 fi
9518
9519 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9520 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9521     cat >> confdefs.h <<\EOF
9522 #define HAVE_DEVICE_MINOR_FN 1
9523 EOF
9524
9525 fi
9526
9527 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9528 echo "configure:9529: checking for unsigned char" >&5
9529 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9530   echo $ac_n "(cached) $ac_c" 1>&6
9531 else
9532   
9533 if test "$cross_compiling" = yes; then
9534   samba_cv_HAVE_UNSIGNED_CHAR=cross
9535 else
9536   cat > conftest.$ac_ext <<EOF
9537 #line 9538 "configure"
9538 #include "confdefs.h"
9539 #include <stdio.h>
9540 main() { char c; c=250; exit((c > 0)?0:1); }
9541 EOF
9542 if { (eval echo configure:9543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9543 then
9544   samba_cv_HAVE_UNSIGNED_CHAR=yes
9545 else
9546   echo "configure: failed program was:" >&5
9547   cat conftest.$ac_ext >&5
9548   rm -fr conftest*
9549   samba_cv_HAVE_UNSIGNED_CHAR=no
9550 fi
9551 rm -fr conftest*
9552 fi
9553
9554 fi
9555
9556 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9557 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9558     cat >> confdefs.h <<\EOF
9559 #define HAVE_UNSIGNED_CHAR 1
9560 EOF
9561
9562 fi
9563
9564 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9565 echo "configure:9566: checking for sin_len in sock" >&5
9566 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9567   echo $ac_n "(cached) $ac_c" 1>&6
9568 else
9569   
9570 cat > conftest.$ac_ext <<EOF
9571 #line 9572 "configure"
9572 #include "confdefs.h"
9573 #include <sys/types.h>
9574 #include <sys/socket.h>
9575 #include <netinet/in.h>
9576 int main() {
9577 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9578 ; return 0; }
9579 EOF
9580 if { (eval echo configure:9581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9581   rm -rf conftest*
9582   samba_cv_HAVE_SOCK_SIN_LEN=yes
9583 else
9584   echo "configure: failed program was:" >&5
9585   cat conftest.$ac_ext >&5
9586   rm -rf conftest*
9587   samba_cv_HAVE_SOCK_SIN_LEN=no
9588 fi
9589 rm -f conftest*
9590 fi
9591
9592 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9593 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9594     cat >> confdefs.h <<\EOF
9595 #define HAVE_SOCK_SIN_LEN 1
9596 EOF
9597
9598 fi
9599
9600 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9601 echo "configure:9602: checking whether seekdir returns void" >&5
9602 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9603   echo $ac_n "(cached) $ac_c" 1>&6
9604 else
9605   
9606 cat > conftest.$ac_ext <<EOF
9607 #line 9608 "configure"
9608 #include "confdefs.h"
9609 #include <sys/types.h>
9610 #include <dirent.h>
9611 void seekdir(DIR *d, long loc) { return; }
9612 int main() {
9613 return 0;
9614 ; return 0; }
9615 EOF
9616 if { (eval echo configure:9617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9617   rm -rf conftest*
9618   samba_cv_SEEKDIR_RETURNS_VOID=yes
9619 else
9620   echo "configure: failed program was:" >&5
9621   cat conftest.$ac_ext >&5
9622   rm -rf conftest*
9623   samba_cv_SEEKDIR_RETURNS_VOID=no
9624 fi
9625 rm -f conftest*
9626 fi
9627
9628 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9629 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9630     cat >> confdefs.h <<\EOF
9631 #define SEEKDIR_RETURNS_VOID 1
9632 EOF
9633
9634 fi
9635
9636 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9637 echo "configure:9638: checking for __FILE__ macro" >&5
9638 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9639   echo $ac_n "(cached) $ac_c" 1>&6
9640 else
9641   
9642 cat > conftest.$ac_ext <<EOF
9643 #line 9644 "configure"
9644 #include "confdefs.h"
9645 #include <stdio.h>
9646 int main() {
9647 printf("%s\n", __FILE__);
9648 ; return 0; }
9649 EOF
9650 if { (eval echo configure:9651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9651   rm -rf conftest*
9652   samba_cv_HAVE_FILE_MACRO=yes
9653 else
9654   echo "configure: failed program was:" >&5
9655   cat conftest.$ac_ext >&5
9656   rm -rf conftest*
9657   samba_cv_HAVE_FILE_MACRO=no
9658 fi
9659 rm -f conftest*
9660 fi
9661
9662 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9663 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9664     cat >> confdefs.h <<\EOF
9665 #define HAVE_FILE_MACRO 1
9666 EOF
9667
9668 fi
9669
9670 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9671 echo "configure:9672: checking for __FUNCTION__ macro" >&5
9672 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9673   echo $ac_n "(cached) $ac_c" 1>&6
9674 else
9675   
9676 cat > conftest.$ac_ext <<EOF
9677 #line 9678 "configure"
9678 #include "confdefs.h"
9679 #include <stdio.h>
9680 int main() {
9681 printf("%s\n", __FUNCTION__);
9682 ; return 0; }
9683 EOF
9684 if { (eval echo configure:9685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9685   rm -rf conftest*
9686   samba_cv_HAVE_FUNCTION_MACRO=yes
9687 else
9688   echo "configure: failed program was:" >&5
9689   cat conftest.$ac_ext >&5
9690   rm -rf conftest*
9691   samba_cv_HAVE_FUNCTION_MACRO=no
9692 fi
9693 rm -f conftest*
9694 fi
9695
9696 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9697 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9698     cat >> confdefs.h <<\EOF
9699 #define HAVE_FUNCTION_MACRO 1
9700 EOF
9701
9702 fi
9703
9704 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9705 echo "configure:9706: checking if gettimeofday takes tz argument" >&5
9706 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9707   echo $ac_n "(cached) $ac_c" 1>&6
9708 else
9709   
9710 if test "$cross_compiling" = yes; then
9711   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9712 else
9713   cat > conftest.$ac_ext <<EOF
9714 #line 9715 "configure"
9715 #include "confdefs.h"
9716
9717 #include <sys/time.h>
9718 #include <unistd.h>
9719 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9720 EOF
9721 if { (eval echo configure:9722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9722 then
9723   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9724 else
9725   echo "configure: failed program was:" >&5
9726   cat conftest.$ac_ext >&5
9727   rm -fr conftest*
9728   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9729 fi
9730 rm -fr conftest*
9731 fi
9732
9733 fi
9734
9735 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9736 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9737     cat >> confdefs.h <<\EOF
9738 #define HAVE_GETTIMEOFDAY_TZ 1
9739 EOF
9740
9741 fi
9742
9743 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9744 echo "configure:9745: checking for __va_copy" >&5
9745 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9746   echo $ac_n "(cached) $ac_c" 1>&6
9747 else
9748   
9749 cat > conftest.$ac_ext <<EOF
9750 #line 9751 "configure"
9751 #include "confdefs.h"
9752 #include <stdarg.h>
9753 va_list ap1,ap2;
9754 int main() {
9755 __va_copy(ap1,ap2);
9756 ; return 0; }
9757 EOF
9758 if { (eval echo configure:9759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9759   rm -rf conftest*
9760   samba_cv_HAVE_VA_COPY=yes
9761 else
9762   echo "configure: failed program was:" >&5
9763   cat conftest.$ac_ext >&5
9764   rm -rf conftest*
9765   samba_cv_HAVE_VA_COPY=no
9766 fi
9767 rm -f conftest*
9768 fi
9769
9770 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9771 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9772     cat >> confdefs.h <<\EOF
9773 #define HAVE_VA_COPY 1
9774 EOF
9775
9776 fi
9777
9778 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9779 echo "configure:9780: checking for C99 vsnprintf" >&5
9780 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9781   echo $ac_n "(cached) $ac_c" 1>&6
9782 else
9783   
9784 if test "$cross_compiling" = yes; then
9785   samba_cv_HAVE_C99_VSNPRINTF=cross
9786 else
9787   cat > conftest.$ac_ext <<EOF
9788 #line 9789 "configure"
9789 #include "confdefs.h"
9790
9791 #include <sys/types.h>
9792 #include <stdarg.h>
9793 void foo(const char *format, ...) { 
9794        va_list ap;
9795        int len;
9796        char buf[5];
9797
9798        va_start(ap, format);
9799        len = vsnprintf(buf, 0, format, ap);
9800        va_end(ap);
9801        if (len != 5) exit(1);
9802
9803        va_start(ap, format);
9804        len = vsnprintf(0, 0, format, ap);
9805        va_end(ap);
9806        if (len != 5) exit(1);
9807
9808        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9809
9810        exit(0);
9811 }
9812 main() { foo("hello"); }
9813
9814 EOF
9815 if { (eval echo configure:9816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9816 then
9817   samba_cv_HAVE_C99_VSNPRINTF=yes
9818 else
9819   echo "configure: failed program was:" >&5
9820   cat conftest.$ac_ext >&5
9821   rm -fr conftest*
9822   samba_cv_HAVE_C99_VSNPRINTF=no
9823 fi
9824 rm -fr conftest*
9825 fi
9826
9827 fi
9828
9829 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9830 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9831     cat >> confdefs.h <<\EOF
9832 #define HAVE_C99_VSNPRINTF 1
9833 EOF
9834
9835 fi
9836
9837 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9838 echo "configure:9839: checking for broken readdir" >&5
9839 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9840   echo $ac_n "(cached) $ac_c" 1>&6
9841 else
9842   
9843 if test "$cross_compiling" = yes; then
9844   samba_cv_HAVE_BROKEN_READDIR=cross
9845 else
9846   cat > conftest.$ac_ext <<EOF
9847 #line 9848 "configure"
9848 #include "confdefs.h"
9849 #include <sys/types.h>
9850 #include <dirent.h>
9851 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9852 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9853 di->d_name[0] == 0) exit(0); exit(1);} 
9854 EOF
9855 if { (eval echo configure:9856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9856 then
9857   samba_cv_HAVE_BROKEN_READDIR=yes
9858 else
9859   echo "configure: failed program was:" >&5
9860   cat conftest.$ac_ext >&5
9861   rm -fr conftest*
9862   samba_cv_HAVE_BROKEN_READDIR=no
9863 fi
9864 rm -fr conftest*
9865 fi
9866
9867 fi
9868
9869 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9870 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9871     cat >> confdefs.h <<\EOF
9872 #define HAVE_BROKEN_READDIR 1
9873 EOF
9874
9875 fi
9876
9877 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9878 echo "configure:9879: checking for utimbuf" >&5
9879 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9880   echo $ac_n "(cached) $ac_c" 1>&6
9881 else
9882   
9883 cat > conftest.$ac_ext <<EOF
9884 #line 9885 "configure"
9885 #include "confdefs.h"
9886 #include <sys/types.h>
9887 #include <utime.h>
9888 int main() {
9889 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9890 ; return 0; }
9891 EOF
9892 if { (eval echo configure:9893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9893   rm -rf conftest*
9894   samba_cv_HAVE_UTIMBUF=yes
9895 else
9896   echo "configure: failed program was:" >&5
9897   cat conftest.$ac_ext >&5
9898   rm -rf conftest*
9899   samba_cv_HAVE_UTIMBUF=no
9900 fi
9901 rm -f conftest*
9902 fi
9903
9904 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9905 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9906     cat >> confdefs.h <<\EOF
9907 #define HAVE_UTIMBUF 1
9908 EOF
9909
9910 fi
9911
9912
9913 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9914 do
9915 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9916 echo "configure:9917: checking for $ac_func" >&5
9917 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9918   echo $ac_n "(cached) $ac_c" 1>&6
9919 else
9920   cat > conftest.$ac_ext <<EOF
9921 #line 9922 "configure"
9922 #include "confdefs.h"
9923 /* System header to define __stub macros and hopefully few prototypes,
9924     which can conflict with char $ac_func(); below.  */
9925 #include <assert.h>
9926 /* Override any gcc2 internal prototype to avoid an error.  */
9927 /* We use char because int might match the return type of a gcc2
9928     builtin and then its argument prototype would still apply.  */
9929 char $ac_func();
9930
9931 int main() {
9932
9933 /* The GNU C library defines this for functions which it implements
9934     to always fail with ENOSYS.  Some functions are actually named
9935     something starting with __ and the normal name is an alias.  */
9936 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9937 choke me
9938 #else
9939 $ac_func();
9940 #endif
9941
9942 ; return 0; }
9943 EOF
9944 if { (eval echo configure:9945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9945   rm -rf conftest*
9946   eval "ac_cv_func_$ac_func=yes"
9947 else
9948   echo "configure: failed program was:" >&5
9949   cat conftest.$ac_ext >&5
9950   rm -rf conftest*
9951   eval "ac_cv_func_$ac_func=no"
9952 fi
9953 rm -f conftest*
9954 fi
9955
9956 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9957   echo "$ac_t""yes" 1>&6
9958     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9959   cat >> confdefs.h <<EOF
9960 #define $ac_tr_func 1
9961 EOF
9962  
9963 else
9964   echo "$ac_t""no" 1>&6
9965 fi
9966 done
9967
9968
9969 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9970 echo "configure:9971: checking for ut_name in utmp" >&5
9971 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9972   echo $ac_n "(cached) $ac_c" 1>&6
9973 else
9974   
9975 cat > conftest.$ac_ext <<EOF
9976 #line 9977 "configure"
9977 #include "confdefs.h"
9978 #include <sys/types.h>
9979 #include <utmp.h>
9980 int main() {
9981 struct utmp ut;  ut.ut_name[0] = 'a';
9982 ; return 0; }
9983 EOF
9984 if { (eval echo configure:9985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9985   rm -rf conftest*
9986   samba_cv_HAVE_UT_UT_NAME=yes
9987 else
9988   echo "configure: failed program was:" >&5
9989   cat conftest.$ac_ext >&5
9990   rm -rf conftest*
9991   samba_cv_HAVE_UT_UT_NAME=no
9992 fi
9993 rm -f conftest*
9994 fi
9995
9996 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9997 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9998     cat >> confdefs.h <<\EOF
9999 #define HAVE_UT_UT_NAME 1
10000 EOF
10001
10002 fi 
10003
10004 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
10005 echo "configure:10006: checking for ut_user in utmp" >&5
10006 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
10007   echo $ac_n "(cached) $ac_c" 1>&6
10008 else
10009   
10010 cat > conftest.$ac_ext <<EOF
10011 #line 10012 "configure"
10012 #include "confdefs.h"
10013 #include <sys/types.h>
10014 #include <utmp.h>
10015 int main() {
10016 struct utmp ut;  ut.ut_user[0] = 'a';
10017 ; return 0; }
10018 EOF
10019 if { (eval echo configure:10020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10020   rm -rf conftest*
10021   samba_cv_HAVE_UT_UT_USER=yes
10022 else
10023   echo "configure: failed program was:" >&5
10024   cat conftest.$ac_ext >&5
10025   rm -rf conftest*
10026   samba_cv_HAVE_UT_UT_USER=no
10027 fi
10028 rm -f conftest*
10029 fi
10030
10031 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
10032 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
10033     cat >> confdefs.h <<\EOF
10034 #define HAVE_UT_UT_USER 1
10035 EOF
10036
10037 fi 
10038
10039 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
10040 echo "configure:10041: checking for ut_id in utmp" >&5
10041 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10042   echo $ac_n "(cached) $ac_c" 1>&6
10043 else
10044   
10045 cat > conftest.$ac_ext <<EOF
10046 #line 10047 "configure"
10047 #include "confdefs.h"
10048 #include <sys/types.h>
10049 #include <utmp.h>
10050 int main() {
10051 struct utmp ut;  ut.ut_id[0] = 'a';
10052 ; return 0; }
10053 EOF
10054 if { (eval echo configure:10055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10055   rm -rf conftest*
10056   samba_cv_HAVE_UT_UT_ID=yes
10057 else
10058   echo "configure: failed program was:" >&5
10059   cat conftest.$ac_ext >&5
10060   rm -rf conftest*
10061   samba_cv_HAVE_UT_UT_ID=no
10062 fi
10063 rm -f conftest*
10064 fi
10065
10066 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10067 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10068     cat >> confdefs.h <<\EOF
10069 #define HAVE_UT_UT_ID 1
10070 EOF
10071
10072 fi 
10073
10074 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10075 echo "configure:10076: checking for ut_host in utmp" >&5
10076 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10077   echo $ac_n "(cached) $ac_c" 1>&6
10078 else
10079   
10080 cat > conftest.$ac_ext <<EOF
10081 #line 10082 "configure"
10082 #include "confdefs.h"
10083 #include <sys/types.h>
10084 #include <utmp.h>
10085 int main() {
10086 struct utmp ut;  ut.ut_host[0] = 'a';
10087 ; return 0; }
10088 EOF
10089 if { (eval echo configure:10090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10090   rm -rf conftest*
10091   samba_cv_HAVE_UT_UT_HOST=yes
10092 else
10093   echo "configure: failed program was:" >&5
10094   cat conftest.$ac_ext >&5
10095   rm -rf conftest*
10096   samba_cv_HAVE_UT_UT_HOST=no
10097 fi
10098 rm -f conftest*
10099 fi
10100
10101 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10102 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10103     cat >> confdefs.h <<\EOF
10104 #define HAVE_UT_UT_HOST 1
10105 EOF
10106
10107 fi 
10108
10109 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10110 echo "configure:10111: checking for ut_time in utmp" >&5
10111 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10112   echo $ac_n "(cached) $ac_c" 1>&6
10113 else
10114   
10115 cat > conftest.$ac_ext <<EOF
10116 #line 10117 "configure"
10117 #include "confdefs.h"
10118 #include <sys/types.h>
10119 #include <utmp.h>
10120 int main() {
10121 struct utmp ut;  time_t t; ut.ut_time = t;
10122 ; return 0; }
10123 EOF
10124 if { (eval echo configure:10125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10125   rm -rf conftest*
10126   samba_cv_HAVE_UT_UT_TIME=yes
10127 else
10128   echo "configure: failed program was:" >&5
10129   cat conftest.$ac_ext >&5
10130   rm -rf conftest*
10131   samba_cv_HAVE_UT_UT_TIME=no
10132 fi
10133 rm -f conftest*
10134 fi
10135
10136 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10137 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10138     cat >> confdefs.h <<\EOF
10139 #define HAVE_UT_UT_TIME 1
10140 EOF
10141
10142 fi 
10143
10144 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10145 echo "configure:10146: checking for ut_tv in utmp" >&5
10146 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10147   echo $ac_n "(cached) $ac_c" 1>&6
10148 else
10149   
10150 cat > conftest.$ac_ext <<EOF
10151 #line 10152 "configure"
10152 #include "confdefs.h"
10153 #include <sys/types.h>
10154 #include <utmp.h>
10155 int main() {
10156 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10157 ; return 0; }
10158 EOF
10159 if { (eval echo configure:10160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10160   rm -rf conftest*
10161   samba_cv_HAVE_UT_UT_TV=yes
10162 else
10163   echo "configure: failed program was:" >&5
10164   cat conftest.$ac_ext >&5
10165   rm -rf conftest*
10166   samba_cv_HAVE_UT_UT_TV=no
10167 fi
10168 rm -f conftest*
10169 fi
10170
10171 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10172 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10173     cat >> confdefs.h <<\EOF
10174 #define HAVE_UT_UT_TV 1
10175 EOF
10176
10177 fi 
10178
10179 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10180 echo "configure:10181: checking for ut_type in utmp" >&5
10181 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10182   echo $ac_n "(cached) $ac_c" 1>&6
10183 else
10184   
10185 cat > conftest.$ac_ext <<EOF
10186 #line 10187 "configure"
10187 #include "confdefs.h"
10188 #include <sys/types.h>
10189 #include <utmp.h>
10190 int main() {
10191 struct utmp ut;  ut.ut_type = 0;
10192 ; return 0; }
10193 EOF
10194 if { (eval echo configure:10195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10195   rm -rf conftest*
10196   samba_cv_HAVE_UT_UT_TYPE=yes
10197 else
10198   echo "configure: failed program was:" >&5
10199   cat conftest.$ac_ext >&5
10200   rm -rf conftest*
10201   samba_cv_HAVE_UT_UT_TYPE=no
10202 fi
10203 rm -f conftest*
10204 fi
10205
10206 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10207 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10208     cat >> confdefs.h <<\EOF
10209 #define HAVE_UT_UT_TYPE 1
10210 EOF
10211
10212 fi 
10213
10214 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10215 echo "configure:10216: checking for ut_pid in utmp" >&5
10216 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10217   echo $ac_n "(cached) $ac_c" 1>&6
10218 else
10219   
10220 cat > conftest.$ac_ext <<EOF
10221 #line 10222 "configure"
10222 #include "confdefs.h"
10223 #include <sys/types.h>
10224 #include <utmp.h>
10225 int main() {
10226 struct utmp ut;  ut.ut_pid = 0;
10227 ; return 0; }
10228 EOF
10229 if { (eval echo configure:10230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10230   rm -rf conftest*
10231   samba_cv_HAVE_UT_UT_PID=yes
10232 else
10233   echo "configure: failed program was:" >&5
10234   cat conftest.$ac_ext >&5
10235   rm -rf conftest*
10236   samba_cv_HAVE_UT_UT_PID=no
10237 fi
10238 rm -f conftest*
10239 fi
10240
10241 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10242 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10243     cat >> confdefs.h <<\EOF
10244 #define HAVE_UT_UT_PID 1
10245 EOF
10246
10247 fi 
10248
10249 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10250 echo "configure:10251: checking for ut_exit in utmp" >&5
10251 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10252   echo $ac_n "(cached) $ac_c" 1>&6
10253 else
10254   
10255 cat > conftest.$ac_ext <<EOF
10256 #line 10257 "configure"
10257 #include "confdefs.h"
10258 #include <sys/types.h>
10259 #include <utmp.h>
10260 int main() {
10261 struct utmp ut;  ut.ut_exit.e_exit = 0;
10262 ; return 0; }
10263 EOF
10264 if { (eval echo configure:10265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10265   rm -rf conftest*
10266   samba_cv_HAVE_UT_UT_EXIT=yes
10267 else
10268   echo "configure: failed program was:" >&5
10269   cat conftest.$ac_ext >&5
10270   rm -rf conftest*
10271   samba_cv_HAVE_UT_UT_EXIT=no
10272 fi
10273 rm -f conftest*
10274 fi
10275
10276 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10277 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10278     cat >> confdefs.h <<\EOF
10279 #define HAVE_UT_UT_EXIT 1
10280 EOF
10281
10282 fi 
10283
10284 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10285 echo "configure:10286: checking for ut_addr in utmp" >&5
10286 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10287   echo $ac_n "(cached) $ac_c" 1>&6
10288 else
10289   
10290 cat > conftest.$ac_ext <<EOF
10291 #line 10292 "configure"
10292 #include "confdefs.h"
10293 #include <sys/types.h>
10294 #include <utmp.h>
10295 int main() {
10296 struct utmp ut;  ut.ut_addr = 0;
10297 ; return 0; }
10298 EOF
10299 if { (eval echo configure:10300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10300   rm -rf conftest*
10301   samba_cv_HAVE_UT_UT_ADDR=yes
10302 else
10303   echo "configure: failed program was:" >&5
10304   cat conftest.$ac_ext >&5
10305   rm -rf conftest*
10306   samba_cv_HAVE_UT_UT_ADDR=no
10307 fi
10308 rm -f conftest*
10309 fi
10310
10311 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10312 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10313     cat >> confdefs.h <<\EOF
10314 #define HAVE_UT_UT_ADDR 1
10315 EOF
10316
10317 fi 
10318
10319 if test x$ac_cv_func_pututline = xyes ; then
10320   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10321 echo "configure:10322: checking whether pututline returns pointer" >&5
10322 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10323   echo $ac_n "(cached) $ac_c" 1>&6
10324 else
10325   
10326   cat > conftest.$ac_ext <<EOF
10327 #line 10328 "configure"
10328 #include "confdefs.h"
10329 #include <sys/types.h>
10330 #include <utmp.h>
10331 int main() {
10332 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10333 ; return 0; }
10334 EOF
10335 if { (eval echo configure:10336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10336   rm -rf conftest*
10337   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10338 else
10339   echo "configure: failed program was:" >&5
10340   cat conftest.$ac_ext >&5
10341   rm -rf conftest*
10342   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10343 fi
10344 rm -f conftest*
10345 fi
10346
10347 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10348   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10349       cat >> confdefs.h <<\EOF
10350 #define PUTUTLINE_RETURNS_UTMP 1
10351 EOF
10352
10353   fi
10354 fi
10355
10356 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10357 echo "configure:10358: checking for ut_syslen in utmpx" >&5
10358 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10359   echo $ac_n "(cached) $ac_c" 1>&6
10360 else
10361   
10362 cat > conftest.$ac_ext <<EOF
10363 #line 10364 "configure"
10364 #include "confdefs.h"
10365 #include <sys/types.h>
10366 #include <utmpx.h>
10367 int main() {
10368 struct utmpx ux;  ux.ut_syslen = 0;
10369 ; return 0; }
10370 EOF
10371 if { (eval echo configure:10372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10372   rm -rf conftest*
10373   samba_cv_HAVE_UX_UT_SYSLEN=yes
10374 else
10375   echo "configure: failed program was:" >&5
10376   cat conftest.$ac_ext >&5
10377   rm -rf conftest*
10378   samba_cv_HAVE_UX_UT_SYSLEN=no
10379 fi
10380 rm -f conftest*
10381 fi
10382
10383 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10384 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10385     cat >> confdefs.h <<\EOF
10386 #define HAVE_UX_UT_SYSLEN 1
10387 EOF
10388
10389 fi 
10390
10391
10392 #################################################
10393 # check for libiconv support
10394 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10395 echo "configure:10396: checking whether to use libiconv" >&5
10396 # Check whether --with-libiconv or --without-libiconv was given.
10397 if test "${with_libiconv+set}" = set; then
10398   withval="$with_libiconv"
10399    case "$withval" in
10400   no)
10401     echo "$ac_t""no" 1>&6
10402     ;;
10403   *)
10404     echo "$ac_t""yes" 1>&6
10405     CFLAGS="$CFLAGS -I$withval/include"
10406     LDFLAGS="$LDFLAGS -L$withval/lib"
10407     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10408 echo "configure:10409: checking for iconv_open in -liconv" >&5
10409 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10410 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10411   echo $ac_n "(cached) $ac_c" 1>&6
10412 else
10413   ac_save_LIBS="$LIBS"
10414 LIBS="-liconv  $LIBS"
10415 cat > conftest.$ac_ext <<EOF
10416 #line 10417 "configure"
10417 #include "confdefs.h"
10418 /* Override any gcc2 internal prototype to avoid an error.  */
10419 /* We use char because int might match the return type of a gcc2
10420     builtin and then its argument prototype would still apply.  */
10421 char iconv_open();
10422
10423 int main() {
10424 iconv_open()
10425 ; return 0; }
10426 EOF
10427 if { (eval echo configure:10428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10428   rm -rf conftest*
10429   eval "ac_cv_lib_$ac_lib_var=yes"
10430 else
10431   echo "configure: failed program was:" >&5
10432   cat conftest.$ac_ext >&5
10433   rm -rf conftest*
10434   eval "ac_cv_lib_$ac_lib_var=no"
10435 fi
10436 rm -f conftest*
10437 LIBS="$ac_save_LIBS"
10438
10439 fi
10440 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10441   echo "$ac_t""yes" 1>&6
10442     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10443     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10444   cat >> confdefs.h <<EOF
10445 #define $ac_tr_lib 1
10446 EOF
10447
10448   LIBS="-liconv $LIBS"
10449
10450 else
10451   echo "$ac_t""no" 1>&6
10452 fi
10453
10454     cat >> confdefs.h <<EOF
10455 #define WITH_LIBICONV "${withval}"
10456 EOF
10457
10458     ;;
10459   esac 
10460 else
10461   echo "$ac_t""no" 1>&6
10462
10463 fi
10464
10465
10466
10467 ############
10468 # check for iconv in libc
10469 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10470 echo "configure:10471: checking for working iconv" >&5
10471 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10472   echo $ac_n "(cached) $ac_c" 1>&6
10473 else
10474   
10475 if test "$cross_compiling" = yes; then
10476   samba_cv_HAVE_NATIVE_ICONV=cross
10477 else
10478   cat > conftest.$ac_ext <<EOF
10479 #line 10480 "configure"
10480 #include "confdefs.h"
10481
10482 #include <iconv.h>
10483 main() {
10484        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10485        if (cd == 0 || cd == (iconv_t)-1) return -1;
10486        return 0;
10487 }
10488
10489 EOF
10490 if { (eval echo configure:10491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10491 then
10492   samba_cv_HAVE_NATIVE_ICONV=yes
10493 else
10494   echo "configure: failed program was:" >&5
10495   cat conftest.$ac_ext >&5
10496   rm -fr conftest*
10497   samba_cv_HAVE_NATIVE_ICONV=no
10498 fi
10499 rm -fr conftest*
10500 fi
10501
10502 fi
10503
10504 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10505 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10506     cat >> confdefs.h <<\EOF
10507 #define HAVE_NATIVE_ICONV 1
10508 EOF
10509
10510 fi
10511
10512
10513 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10514 echo "configure:10515: checking for Linux kernel oplocks" >&5
10515 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10516   echo $ac_n "(cached) $ac_c" 1>&6
10517 else
10518   
10519 if test "$cross_compiling" = yes; then
10520   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10521 else
10522   cat > conftest.$ac_ext <<EOF
10523 #line 10524 "configure"
10524 #include "confdefs.h"
10525
10526 #include <sys/types.h>
10527 #include <fcntl.h>
10528 #ifndef F_GETLEASE
10529 #define F_GETLEASE      1025
10530 #endif
10531 main() {
10532        int fd = open("/dev/null", O_RDONLY);
10533        return fcntl(fd, F_GETLEASE, 0) == -1;
10534 }
10535
10536 EOF
10537 if { (eval echo configure:10538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10538 then
10539   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10540 else
10541   echo "configure: failed program was:" >&5
10542   cat conftest.$ac_ext >&5
10543   rm -fr conftest*
10544   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10545 fi
10546 rm -fr conftest*
10547 fi
10548
10549 fi
10550
10551 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10552 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10553     cat >> confdefs.h <<\EOF
10554 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10555 EOF
10556
10557 fi
10558
10559 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10560 echo "configure:10561: checking for kernel change notify support" >&5
10561 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10562   echo $ac_n "(cached) $ac_c" 1>&6
10563 else
10564   
10565 if test "$cross_compiling" = yes; then
10566   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10567 else
10568   cat > conftest.$ac_ext <<EOF
10569 #line 10570 "configure"
10570 #include "confdefs.h"
10571
10572 #include <sys/types.h>
10573 #include <fcntl.h>
10574 #include <signal.h>
10575 #ifndef F_NOTIFY
10576 #define F_NOTIFY 1026
10577 #endif
10578 main() {
10579         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10580 }
10581
10582 EOF
10583 if { (eval echo configure:10584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10584 then
10585   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10586 else
10587   echo "configure: failed program was:" >&5
10588   cat conftest.$ac_ext >&5
10589   rm -fr conftest*
10590   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10591 fi
10592 rm -fr conftest*
10593 fi
10594
10595 fi
10596
10597 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10598 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10599     cat >> confdefs.h <<\EOF
10600 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10601 EOF
10602
10603 fi
10604
10605 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10606 echo "configure:10607: checking for kernel share modes" >&5
10607 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10608   echo $ac_n "(cached) $ac_c" 1>&6
10609 else
10610   
10611 if test "$cross_compiling" = yes; then
10612   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10613 else
10614   cat > conftest.$ac_ext <<EOF
10615 #line 10616 "configure"
10616 #include "confdefs.h"
10617
10618 #include <sys/types.h>
10619 #include <fcntl.h>
10620 #include <signal.h>
10621 #include <sys/file.h>
10622 #ifndef LOCK_MAND
10623 #define LOCK_MAND       32
10624 #define LOCK_READ       64
10625 #endif
10626 main() {
10627         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10628 }
10629
10630 EOF
10631 if { (eval echo configure:10632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10632 then
10633   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10634 else
10635   echo "configure: failed program was:" >&5
10636   cat conftest.$ac_ext >&5
10637   rm -fr conftest*
10638   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10639 fi
10640 rm -fr conftest*
10641 fi
10642
10643 fi
10644
10645 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10646 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10647     cat >> confdefs.h <<\EOF
10648 #define HAVE_KERNEL_SHARE_MODES 1
10649 EOF
10650
10651 fi
10652
10653
10654
10655
10656 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10657 echo "configure:10658: checking for IRIX kernel oplock type definitions" >&5
10658 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10659   echo $ac_n "(cached) $ac_c" 1>&6
10660 else
10661   
10662 cat > conftest.$ac_ext <<EOF
10663 #line 10664 "configure"
10664 #include "confdefs.h"
10665 #include <sys/types.h>
10666 #include <fcntl.h>
10667 int main() {
10668 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10669 ; return 0; }
10670 EOF
10671 if { (eval echo configure:10672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10672   rm -rf conftest*
10673   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10674 else
10675   echo "configure: failed program was:" >&5
10676   cat conftest.$ac_ext >&5
10677   rm -rf conftest*
10678   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10679 fi
10680 rm -f conftest*
10681 fi
10682
10683 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10684 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10685     cat >> confdefs.h <<\EOF
10686 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10687 EOF
10688
10689 fi
10690
10691 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10692 echo "configure:10693: checking for irix specific capabilities" >&5
10693 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10694   echo $ac_n "(cached) $ac_c" 1>&6
10695 else
10696   
10697 if test "$cross_compiling" = yes; then
10698   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10699 else
10700   cat > conftest.$ac_ext <<EOF
10701 #line 10702 "configure"
10702 #include "confdefs.h"
10703 #include <sys/types.h>
10704 #include <sys/capability.h>
10705 main() {
10706  cap_t cap;
10707  if ((cap = cap_get_proc()) == NULL)
10708    exit(1);
10709  cap->cap_effective |= CAP_NETWORK_MGT;
10710  cap->cap_inheritable |= CAP_NETWORK_MGT;
10711  cap_set_proc(cap);
10712  exit(0);
10713 }
10714
10715 EOF
10716 if { (eval echo configure:10717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10717 then
10718   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10719 else
10720   echo "configure: failed program was:" >&5
10721   cat conftest.$ac_ext >&5
10722   rm -fr conftest*
10723   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10724 fi
10725 rm -fr conftest*
10726 fi
10727
10728 fi
10729
10730 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10731 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10732     cat >> confdefs.h <<\EOF
10733 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10734 EOF
10735
10736 fi
10737
10738 #
10739 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10740 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10741 #
10742
10743 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10744 echo "configure:10745: checking for int16 typedef included by rpc/rpc.h" >&5
10745 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10746   echo $ac_n "(cached) $ac_c" 1>&6
10747 else
10748   
10749 cat > conftest.$ac_ext <<EOF
10750 #line 10751 "configure"
10751 #include "confdefs.h"
10752 #include <sys/types.h>
10753 #if defined(HAVE_RPC_RPC_H)
10754 #include <rpc/rpc.h>
10755 #endif
10756 int main() {
10757 int16 testvar;
10758 ; return 0; }
10759 EOF
10760 if { (eval echo configure:10761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10761   rm -rf conftest*
10762   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10763 else
10764   echo "configure: failed program was:" >&5
10765   cat conftest.$ac_ext >&5
10766   rm -rf conftest*
10767   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10768 fi
10769 rm -f conftest*
10770 fi
10771
10772 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10773 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10774     cat >> confdefs.h <<\EOF
10775 #define HAVE_INT16_FROM_RPC_RPC_H 1
10776 EOF
10777
10778 fi
10779
10780 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10781 echo "configure:10782: checking for uint16 typedef included by rpc/rpc.h" >&5
10782 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10783   echo $ac_n "(cached) $ac_c" 1>&6
10784 else
10785   
10786 cat > conftest.$ac_ext <<EOF
10787 #line 10788 "configure"
10788 #include "confdefs.h"
10789 #include <sys/types.h>
10790 #if defined(HAVE_RPC_RPC_H)
10791 #include <rpc/rpc.h>
10792 #endif
10793 int main() {
10794 uint16 testvar;
10795 ; return 0; }
10796 EOF
10797 if { (eval echo configure:10798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10798   rm -rf conftest*
10799   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10800 else
10801   echo "configure: failed program was:" >&5
10802   cat conftest.$ac_ext >&5
10803   rm -rf conftest*
10804   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10805 fi
10806 rm -f conftest*
10807 fi
10808
10809 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10810 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10811     cat >> confdefs.h <<\EOF
10812 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10813 EOF
10814
10815 fi
10816
10817 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10818 echo "configure:10819: checking for int32 typedef included by rpc/rpc.h" >&5
10819 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10820   echo $ac_n "(cached) $ac_c" 1>&6
10821 else
10822   
10823 cat > conftest.$ac_ext <<EOF
10824 #line 10825 "configure"
10825 #include "confdefs.h"
10826 #include <sys/types.h>
10827 #if defined(HAVE_RPC_RPC_H)
10828 #include <rpc/rpc.h>
10829 #endif
10830 int main() {
10831 int32 testvar;
10832 ; return 0; }
10833 EOF
10834 if { (eval echo configure:10835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10835   rm -rf conftest*
10836   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10837 else
10838   echo "configure: failed program was:" >&5
10839   cat conftest.$ac_ext >&5
10840   rm -rf conftest*
10841   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10842 fi
10843 rm -f conftest*
10844 fi
10845
10846 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10847 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10848     cat >> confdefs.h <<\EOF
10849 #define HAVE_INT32_FROM_RPC_RPC_H 1
10850 EOF
10851
10852 fi
10853
10854 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10855 echo "configure:10856: checking for uint32 typedef included by rpc/rpc.h" >&5
10856 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10857   echo $ac_n "(cached) $ac_c" 1>&6
10858 else
10859   
10860 cat > conftest.$ac_ext <<EOF
10861 #line 10862 "configure"
10862 #include "confdefs.h"
10863 #include <sys/types.h>
10864 #if defined(HAVE_RPC_RPC_H)
10865 #include <rpc/rpc.h>
10866 #endif
10867 int main() {
10868 uint32 testvar;
10869 ; return 0; }
10870 EOF
10871 if { (eval echo configure:10872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10872   rm -rf conftest*
10873   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10874 else
10875   echo "configure: failed program was:" >&5
10876   cat conftest.$ac_ext >&5
10877   rm -rf conftest*
10878   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10879 fi
10880 rm -f conftest*
10881 fi
10882
10883 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10884 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10885     cat >> confdefs.h <<\EOF
10886 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10887 EOF
10888
10889 fi
10890
10891
10892 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10893 echo "configure:10894: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10894 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10895   echo $ac_n "(cached) $ac_c" 1>&6
10896 else
10897   
10898 cat > conftest.$ac_ext <<EOF
10899 #line 10900 "configure"
10900 #include "confdefs.h"
10901 #include <sys/types.h>
10902 #ifdef HAVE_SYS_SECURITY_H
10903 #include <sys/security.h>
10904 #include <prot.h>
10905 #endif  /* HAVE_SYS_SECURITY_H */
10906 #if defined(HAVE_RPC_RPC_H)
10907 #include <rpc/rpc.h>
10908 #endif
10909 int main() {
10910 int testvar;
10911 ; return 0; }
10912 EOF
10913 if { (eval echo configure:10914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10914   rm -rf conftest*
10915   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10916 else
10917   echo "configure: failed program was:" >&5
10918   cat conftest.$ac_ext >&5
10919   rm -rf conftest*
10920   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10921 fi
10922 rm -f conftest*
10923 fi
10924
10925 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10926 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10927     cat >> confdefs.h <<\EOF
10928 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10929 EOF
10930
10931 fi
10932
10933 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10934 echo "configure:10935: checking for test routines" >&5
10935 if test "$cross_compiling" = yes; then
10936   echo "configure: warning: cannot run when cross-compiling" 1>&2
10937 else
10938   cat > conftest.$ac_ext <<EOF
10939 #line 10940 "configure"
10940 #include "confdefs.h"
10941 #include "${srcdir-.}/tests/trivial.c"
10942 EOF
10943 if { (eval echo configure:10944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10944 then
10945   echo "$ac_t""yes" 1>&6
10946 else
10947   echo "configure: failed program was:" >&5
10948   cat conftest.$ac_ext >&5
10949   rm -fr conftest*
10950   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10951 fi
10952 rm -fr conftest*
10953 fi
10954
10955
10956 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10957 echo "configure:10958: checking for ftruncate extend" >&5
10958 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10959   echo $ac_n "(cached) $ac_c" 1>&6
10960 else
10961   
10962 if test "$cross_compiling" = yes; then
10963   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10964 else
10965   cat > conftest.$ac_ext <<EOF
10966 #line 10967 "configure"
10967 #include "confdefs.h"
10968 #include "${srcdir-.}/tests/ftruncate.c"
10969 EOF
10970 if { (eval echo configure:10971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10971 then
10972   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10973 else
10974   echo "configure: failed program was:" >&5
10975   cat conftest.$ac_ext >&5
10976   rm -fr conftest*
10977   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10978 fi
10979 rm -fr conftest*
10980 fi
10981
10982 fi
10983
10984 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10985 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10986     cat >> confdefs.h <<\EOF
10987 #define HAVE_FTRUNCATE_EXTEND 1
10988 EOF
10989
10990 fi
10991
10992 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10993 echo "configure:10994: checking for AF_LOCAL socket support" >&5
10994 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10995   echo $ac_n "(cached) $ac_c" 1>&6
10996 else
10997   
10998 if test "$cross_compiling" = yes; then
10999   samba_cv_HAVE_WORKING_AF_LOCAL=cross
11000 else
11001   cat > conftest.$ac_ext <<EOF
11002 #line 11003 "configure"
11003 #include "confdefs.h"
11004 #include "${srcdir-.}/tests/unixsock.c"
11005 EOF
11006 if { (eval echo configure:11007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11007 then
11008   samba_cv_HAVE_WORKING_AF_LOCAL=yes
11009 else
11010   echo "configure: failed program was:" >&5
11011   cat conftest.$ac_ext >&5
11012   rm -fr conftest*
11013   samba_cv_HAVE_WORKING_AF_LOCAL=no
11014 fi
11015 rm -fr conftest*
11016 fi
11017
11018 fi
11019
11020 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
11021 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
11022 then
11023     cat >> confdefs.h <<\EOF
11024 #define HAVE_WORKING_AF_LOCAL 1
11025 EOF
11026
11027 fi
11028
11029 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
11030 echo "configure:11031: checking for broken getgroups" >&5
11031 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
11032   echo $ac_n "(cached) $ac_c" 1>&6
11033 else
11034   
11035 if test "$cross_compiling" = yes; then
11036   samba_cv_HAVE_BROKEN_GETGROUPS=cross
11037 else
11038   cat > conftest.$ac_ext <<EOF
11039 #line 11040 "configure"
11040 #include "confdefs.h"
11041 #include "${srcdir-.}/tests/getgroups.c"
11042 EOF
11043 if { (eval echo configure:11044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11044 then
11045   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11046 else
11047   echo "configure: failed program was:" >&5
11048   cat conftest.$ac_ext >&5
11049   rm -fr conftest*
11050   samba_cv_HAVE_BROKEN_GETGROUPS=no
11051 fi
11052 rm -fr conftest*
11053 fi
11054
11055 fi
11056
11057 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11058 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11059     cat >> confdefs.h <<\EOF
11060 #define HAVE_BROKEN_GETGROUPS 1
11061 EOF
11062
11063 fi
11064
11065 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11066 echo "configure:11067: checking whether getpass should be replaced" >&5
11067 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11068   echo $ac_n "(cached) $ac_c" 1>&6
11069 else
11070   
11071 SAVE_CPPFLAGS="$CPPFLAGS"
11072 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt  -I${srcdir-.}/smbwrapper"
11073 cat > conftest.$ac_ext <<EOF
11074 #line 11075 "configure"
11075 #include "confdefs.h"
11076
11077 #define REPLACE_GETPASS 1
11078 #define NO_CONFIG_H 1
11079 #define main dont_declare_main
11080 #include "${srcdir-.}/lib/getsmbpass.c"
11081 #undef main
11082
11083 int main() {
11084
11085 ; return 0; }
11086 EOF
11087 if { (eval echo configure:11088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11088   rm -rf conftest*
11089   samba_cv_REPLACE_GETPASS=yes
11090 else
11091   echo "configure: failed program was:" >&5
11092   cat conftest.$ac_ext >&5
11093   rm -rf conftest*
11094   samba_cv_REPLACE_GETPASS=no
11095 fi
11096 rm -f conftest*
11097 CPPFLAGS="$SAVE_CPPFLAGS"
11098
11099 fi
11100
11101 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11102 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11103         cat >> confdefs.h <<\EOF
11104 #define REPLACE_GETPASS 1
11105 EOF
11106
11107 fi
11108
11109 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11110 echo "configure:11111: checking for broken inet_ntoa" >&5
11111 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11112   echo $ac_n "(cached) $ac_c" 1>&6
11113 else
11114   
11115 if test "$cross_compiling" = yes; then
11116   samba_cv_REPLACE_INET_NTOA=cross
11117 else
11118   cat > conftest.$ac_ext <<EOF
11119 #line 11120 "configure"
11120 #include "confdefs.h"
11121
11122 #include <stdio.h>
11123 #include <sys/types.h>
11124 #include <netinet/in.h>
11125 #ifdef HAVE_ARPA_INET_H
11126 #include <arpa/inet.h>
11127 #endif
11128 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11129 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11130     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11131 exit(1);}
11132 EOF
11133 if { (eval echo configure:11134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11134 then
11135   samba_cv_REPLACE_INET_NTOA=yes
11136 else
11137   echo "configure: failed program was:" >&5
11138   cat conftest.$ac_ext >&5
11139   rm -fr conftest*
11140   samba_cv_REPLACE_INET_NTOA=no
11141 fi
11142 rm -fr conftest*
11143 fi
11144
11145 fi
11146
11147 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11148 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11149     cat >> confdefs.h <<\EOF
11150 #define REPLACE_INET_NTOA 1
11151 EOF
11152
11153 fi
11154
11155 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11156 echo "configure:11157: checking for secure mkstemp" >&5
11157 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11158   echo $ac_n "(cached) $ac_c" 1>&6
11159 else
11160   
11161 if test "$cross_compiling" = yes; then
11162   samba_cv_HAVE_SECURE_MKSTEMP=cross
11163 else
11164   cat > conftest.$ac_ext <<EOF
11165 #line 11166 "configure"
11166 #include "confdefs.h"
11167 #include <stdlib.h>
11168 #include <sys/types.h>
11169 #include <sys/stat.h>
11170 #include <unistd.h>
11171 main() { 
11172   struct stat st;
11173   char tpl[20]="/tmp/test.XXXXXX"; 
11174   int fd = mkstemp(tpl); 
11175   if (fd == -1) exit(1);
11176   unlink(tpl);
11177   if (fstat(fd, &st) != 0) exit(1);
11178   if ((st.st_mode & 0777) != 0600) exit(1);
11179   exit(0);
11180 }
11181 EOF
11182 if { (eval echo configure:11183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11183 then
11184   samba_cv_HAVE_SECURE_MKSTEMP=yes
11185 else
11186   echo "configure: failed program was:" >&5
11187   cat conftest.$ac_ext >&5
11188   rm -fr conftest*
11189   samba_cv_HAVE_SECURE_MKSTEMP=no
11190 fi
11191 rm -fr conftest*
11192 fi
11193
11194 fi
11195
11196 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11197 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11198     cat >> confdefs.h <<\EOF
11199 #define HAVE_SECURE_MKSTEMP 1
11200 EOF
11201
11202 fi
11203
11204 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11205 echo "configure:11206: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11206 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11207   echo $ac_n "(cached) $ac_c" 1>&6
11208 else
11209   
11210 if test "$cross_compiling" = yes; then
11211   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11212 else
11213   cat > conftest.$ac_ext <<EOF
11214 #line 11215 "configure"
11215 #include "confdefs.h"
11216 #include <unistd.h>
11217 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11218 EOF
11219 if { (eval echo configure:11220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11220 then
11221   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11222 else
11223   echo "configure: failed program was:" >&5
11224   cat conftest.$ac_ext >&5
11225   rm -fr conftest*
11226   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11227 fi
11228 rm -fr conftest*
11229 fi
11230
11231 fi
11232
11233 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11234 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11235     cat >> confdefs.h <<\EOF
11236 #define SYSCONF_SC_NGROUPS_MAX 1
11237 EOF
11238
11239 fi
11240
11241 echo $ac_n "checking for root""... $ac_c" 1>&6
11242 echo "configure:11243: checking for root" >&5
11243 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11244   echo $ac_n "(cached) $ac_c" 1>&6
11245 else
11246   
11247 if test "$cross_compiling" = yes; then
11248   samba_cv_HAVE_ROOT=cross
11249 else
11250   cat > conftest.$ac_ext <<EOF
11251 #line 11252 "configure"
11252 #include "confdefs.h"
11253 main() { exit(getuid() != 0); }
11254 EOF
11255 if { (eval echo configure:11256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11256 then
11257   samba_cv_HAVE_ROOT=yes
11258 else
11259   echo "configure: failed program was:" >&5
11260   cat conftest.$ac_ext >&5
11261   rm -fr conftest*
11262   samba_cv_HAVE_ROOT=no
11263 fi
11264 rm -fr conftest*
11265 fi
11266
11267 fi
11268
11269 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11270 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11271     cat >> confdefs.h <<\EOF
11272 #define HAVE_ROOT 1
11273 EOF
11274
11275 else
11276     echo "configure: warning: running as non-root will disable some tests" 1>&2
11277 fi
11278
11279 ##################
11280 # look for a method of finding the list of network interfaces
11281 iface=no;
11282 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11283 echo "configure:11284: checking for iface AIX" >&5
11284 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11285   echo $ac_n "(cached) $ac_c" 1>&6
11286 else
11287   
11288 if test "$cross_compiling" = yes; then
11289   samba_cv_HAVE_IFACE_AIX=cross
11290 else
11291   cat > conftest.$ac_ext <<EOF
11292 #line 11293 "configure"
11293 #include "confdefs.h"
11294
11295 #define HAVE_IFACE_AIX 1
11296 #define AUTOCONF_TEST 1
11297 #include "confdefs.h"
11298 #include "${srcdir-.}/lib/interfaces.c"
11299 EOF
11300 if { (eval echo configure:11301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11301 then
11302   samba_cv_HAVE_IFACE_AIX=yes
11303 else
11304   echo "configure: failed program was:" >&5
11305   cat conftest.$ac_ext >&5
11306   rm -fr conftest*
11307   samba_cv_HAVE_IFACE_AIX=no
11308 fi
11309 rm -fr conftest*
11310 fi
11311
11312 fi
11313
11314 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11315 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11316     iface=yes;cat >> confdefs.h <<\EOF
11317 #define HAVE_IFACE_AIX 1
11318 EOF
11319
11320 fi
11321
11322 if test $iface = no; then
11323 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11324 echo "configure:11325: checking for iface ifconf" >&5
11325 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11326   echo $ac_n "(cached) $ac_c" 1>&6
11327 else
11328   
11329 if test "$cross_compiling" = yes; then
11330   samba_cv_HAVE_IFACE_IFCONF=cross
11331 else
11332   cat > conftest.$ac_ext <<EOF
11333 #line 11334 "configure"
11334 #include "confdefs.h"
11335
11336 #define HAVE_IFACE_IFCONF 1
11337 #define AUTOCONF_TEST 1
11338 #include "confdefs.h"
11339 #include "${srcdir-.}/lib/interfaces.c"
11340 EOF
11341 if { (eval echo configure:11342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11342 then
11343   samba_cv_HAVE_IFACE_IFCONF=yes
11344 else
11345   echo "configure: failed program was:" >&5
11346   cat conftest.$ac_ext >&5
11347   rm -fr conftest*
11348   samba_cv_HAVE_IFACE_IFCONF=no
11349 fi
11350 rm -fr conftest*
11351 fi
11352
11353 fi
11354
11355 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11356 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11357     iface=yes;cat >> confdefs.h <<\EOF
11358 #define HAVE_IFACE_IFCONF 1
11359 EOF
11360
11361 fi
11362 fi
11363
11364 if test $iface = no; then
11365 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11366 echo "configure:11367: checking for iface ifreq" >&5
11367 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11368   echo $ac_n "(cached) $ac_c" 1>&6
11369 else
11370   
11371 if test "$cross_compiling" = yes; then
11372   samba_cv_HAVE_IFACE_IFREQ=cross
11373 else
11374   cat > conftest.$ac_ext <<EOF
11375 #line 11376 "configure"
11376 #include "confdefs.h"
11377
11378 #define HAVE_IFACE_IFREQ 1
11379 #define AUTOCONF_TEST 1
11380 #include "confdefs.h"
11381 #include "${srcdir-.}/lib/interfaces.c"
11382 EOF
11383 if { (eval echo configure:11384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11384 then
11385   samba_cv_HAVE_IFACE_IFREQ=yes
11386 else
11387   echo "configure: failed program was:" >&5
11388   cat conftest.$ac_ext >&5
11389   rm -fr conftest*
11390   samba_cv_HAVE_IFACE_IFREQ=no
11391 fi
11392 rm -fr conftest*
11393 fi
11394
11395 fi
11396
11397 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11398 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11399     iface=yes;cat >> confdefs.h <<\EOF
11400 #define HAVE_IFACE_IFREQ 1
11401 EOF
11402
11403 fi
11404 fi
11405
11406
11407 ################################################
11408 # look for a method of setting the effective uid
11409 seteuid=no;
11410 if test $seteuid = no; then
11411 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11412 echo "configure:11413: checking for setresuid" >&5
11413 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11414   echo $ac_n "(cached) $ac_c" 1>&6
11415 else
11416   
11417 if test "$cross_compiling" = yes; then
11418   samba_cv_USE_SETRESUID=cross
11419 else
11420   cat > conftest.$ac_ext <<EOF
11421 #line 11422 "configure"
11422 #include "confdefs.h"
11423
11424 #define AUTOCONF_TEST 1
11425 #define USE_SETRESUID 1
11426 #include "confdefs.h"
11427 #include "${srcdir-.}/lib/util_sec.c"
11428 EOF
11429 if { (eval echo configure:11430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11430 then
11431   samba_cv_USE_SETRESUID=yes
11432 else
11433   echo "configure: failed program was:" >&5
11434   cat conftest.$ac_ext >&5
11435   rm -fr conftest*
11436   samba_cv_USE_SETRESUID=no
11437 fi
11438 rm -fr conftest*
11439 fi
11440
11441 fi
11442
11443 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11444 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11445     seteuid=yes;cat >> confdefs.h <<\EOF
11446 #define USE_SETRESUID 1
11447 EOF
11448
11449 fi
11450 fi
11451
11452
11453 if test $seteuid = no; then
11454 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11455 echo "configure:11456: checking for setreuid" >&5
11456 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11457   echo $ac_n "(cached) $ac_c" 1>&6
11458 else
11459   
11460 if test "$cross_compiling" = yes; then
11461   samba_cv_USE_SETREUID=cross
11462 else
11463   cat > conftest.$ac_ext <<EOF
11464 #line 11465 "configure"
11465 #include "confdefs.h"
11466
11467 #define AUTOCONF_TEST 1
11468 #define USE_SETREUID 1
11469 #include "confdefs.h"
11470 #include "${srcdir-.}/lib/util_sec.c"
11471 EOF
11472 if { (eval echo configure:11473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11473 then
11474   samba_cv_USE_SETREUID=yes
11475 else
11476   echo "configure: failed program was:" >&5
11477   cat conftest.$ac_ext >&5
11478   rm -fr conftest*
11479   samba_cv_USE_SETREUID=no
11480 fi
11481 rm -fr conftest*
11482 fi
11483
11484 fi
11485
11486 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11487 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11488     seteuid=yes;cat >> confdefs.h <<\EOF
11489 #define USE_SETREUID 1
11490 EOF
11491
11492 fi
11493 fi
11494
11495 if test $seteuid = no; then
11496 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11497 echo "configure:11498: checking for seteuid" >&5
11498 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11499   echo $ac_n "(cached) $ac_c" 1>&6
11500 else
11501   
11502 if test "$cross_compiling" = yes; then
11503   samba_cv_USE_SETEUID=cross
11504 else
11505   cat > conftest.$ac_ext <<EOF
11506 #line 11507 "configure"
11507 #include "confdefs.h"
11508
11509 #define AUTOCONF_TEST 1
11510 #define USE_SETEUID 1
11511 #include "confdefs.h"
11512 #include "${srcdir-.}/lib/util_sec.c"
11513 EOF
11514 if { (eval echo configure:11515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11515 then
11516   samba_cv_USE_SETEUID=yes
11517 else
11518   echo "configure: failed program was:" >&5
11519   cat conftest.$ac_ext >&5
11520   rm -fr conftest*
11521   samba_cv_USE_SETEUID=no
11522 fi
11523 rm -fr conftest*
11524 fi
11525
11526 fi
11527
11528 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11529 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11530     seteuid=yes;cat >> confdefs.h <<\EOF
11531 #define USE_SETEUID 1
11532 EOF
11533
11534 fi
11535 fi
11536
11537 if test $seteuid = no; then
11538 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11539 echo "configure:11540: checking for setuidx" >&5
11540 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11541   echo $ac_n "(cached) $ac_c" 1>&6
11542 else
11543   
11544 if test "$cross_compiling" = yes; then
11545   samba_cv_USE_SETUIDX=cross
11546 else
11547   cat > conftest.$ac_ext <<EOF
11548 #line 11549 "configure"
11549 #include "confdefs.h"
11550
11551 #define AUTOCONF_TEST 1
11552 #define USE_SETUIDX 1
11553 #include "confdefs.h"
11554 #include "${srcdir-.}/lib/util_sec.c"
11555 EOF
11556 if { (eval echo configure:11557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11557 then
11558   samba_cv_USE_SETUIDX=yes
11559 else
11560   echo "configure: failed program was:" >&5
11561   cat conftest.$ac_ext >&5
11562   rm -fr conftest*
11563   samba_cv_USE_SETUIDX=no
11564 fi
11565 rm -fr conftest*
11566 fi
11567
11568 fi
11569
11570 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11571 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11572     seteuid=yes;cat >> confdefs.h <<\EOF
11573 #define USE_SETUIDX 1
11574 EOF
11575
11576 fi
11577 fi
11578
11579
11580 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11581 echo "configure:11582: checking for working mmap" >&5
11582 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11583   echo $ac_n "(cached) $ac_c" 1>&6
11584 else
11585   
11586 if test "$cross_compiling" = yes; then
11587   samba_cv_HAVE_MMAP=cross
11588 else
11589   cat > conftest.$ac_ext <<EOF
11590 #line 11591 "configure"
11591 #include "confdefs.h"
11592 #include "${srcdir-.}/tests/shared_mmap.c"
11593 EOF
11594 if { (eval echo configure:11595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11595 then
11596   samba_cv_HAVE_MMAP=yes
11597 else
11598   echo "configure: failed program was:" >&5
11599   cat conftest.$ac_ext >&5
11600   rm -fr conftest*
11601   samba_cv_HAVE_MMAP=no
11602 fi
11603 rm -fr conftest*
11604 fi
11605
11606 fi
11607
11608 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11609 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11610     cat >> confdefs.h <<\EOF
11611 #define HAVE_MMAP 1
11612 EOF
11613
11614 fi
11615
11616 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11617 echo "configure:11618: checking for ftruncate needs root" >&5
11618 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11619   echo $ac_n "(cached) $ac_c" 1>&6
11620 else
11621   
11622 if test "$cross_compiling" = yes; then
11623   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11624 else
11625   cat > conftest.$ac_ext <<EOF
11626 #line 11627 "configure"
11627 #include "confdefs.h"
11628 #include "${srcdir-.}/tests/ftruncroot.c"
11629 EOF
11630 if { (eval echo configure:11631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11631 then
11632   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11633 else
11634   echo "configure: failed program was:" >&5
11635   cat conftest.$ac_ext >&5
11636   rm -fr conftest*
11637   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11638 fi
11639 rm -fr conftest*
11640 fi
11641
11642 fi
11643
11644 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11645 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11646     cat >> confdefs.h <<\EOF
11647 #define FTRUNCATE_NEEDS_ROOT 1
11648 EOF
11649
11650 fi
11651
11652 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11653 echo "configure:11654: checking for fcntl locking" >&5
11654 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11655   echo $ac_n "(cached) $ac_c" 1>&6
11656 else
11657   
11658 if test "$cross_compiling" = yes; then
11659   samba_cv_HAVE_FCNTL_LOCK=cross
11660 else
11661   cat > conftest.$ac_ext <<EOF
11662 #line 11663 "configure"
11663 #include "confdefs.h"
11664 #include "${srcdir-.}/tests/fcntl_lock.c"
11665 EOF
11666 if { (eval echo configure:11667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11667 then
11668   samba_cv_HAVE_FCNTL_LOCK=yes
11669 else
11670   echo "configure: failed program was:" >&5
11671   cat conftest.$ac_ext >&5
11672   rm -fr conftest*
11673   samba_cv_HAVE_FCNTL_LOCK=no
11674 fi
11675 rm -fr conftest*
11676 fi
11677
11678 fi
11679
11680 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11681 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11682     cat >> confdefs.h <<\EOF
11683 #define HAVE_FCNTL_LOCK 1
11684 EOF
11685
11686 fi
11687
11688 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11689 echo "configure:11690: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11690 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11691   echo $ac_n "(cached) $ac_c" 1>&6
11692 else
11693   
11694 if test "$cross_compiling" = yes; then
11695   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11696 else
11697   cat > conftest.$ac_ext <<EOF
11698 #line 11699 "configure"
11699 #include "confdefs.h"
11700 #include "${srcdir-.}/tests/fcntl_lock64.c"
11701 EOF
11702 if { (eval echo configure:11703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11703 then
11704   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11705 else
11706   echo "configure: failed program was:" >&5
11707   cat conftest.$ac_ext >&5
11708   rm -fr conftest*
11709   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11710 fi
11711 rm -fr conftest*
11712 fi
11713
11714 fi
11715
11716 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11717 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11718     cat >> confdefs.h <<\EOF
11719 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11720 EOF
11721
11722
11723 else
11724
11725
11726   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11727 echo "configure:11728: checking for 64 bit fcntl locking" >&5
11728 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11729   echo $ac_n "(cached) $ac_c" 1>&6
11730 else
11731   
11732   if test "$cross_compiling" = yes; then
11733   samba_cv_HAVE_STRUCT_FLOCK64=cross
11734 else
11735   cat > conftest.$ac_ext <<EOF
11736 #line 11737 "configure"
11737 #include "confdefs.h"
11738
11739 #if defined(HAVE_UNISTD_H)
11740 #include <unistd.h>
11741 #endif
11742 #include <stdio.h>
11743 #include <stdlib.h>
11744
11745 #ifdef HAVE_FCNTL_H
11746 #include <fcntl.h>
11747 #endif
11748
11749 #ifdef HAVE_SYS_FCNTL_H
11750 #include <sys/fcntl.h>
11751 #endif
11752 main() { struct flock64 fl64;
11753 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11754 exit(0);
11755 #else
11756 exit(1);
11757 #endif
11758 }
11759 EOF
11760 if { (eval echo configure:11761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11761 then
11762   samba_cv_HAVE_STRUCT_FLOCK64=yes
11763 else
11764   echo "configure: failed program was:" >&5
11765   cat conftest.$ac_ext >&5
11766   rm -fr conftest*
11767   samba_cv_HAVE_STRUCT_FLOCK64=no
11768 fi
11769 rm -fr conftest*
11770 fi
11771
11772 fi
11773
11774 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11775
11776   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11777       cat >> confdefs.h <<\EOF
11778 #define HAVE_STRUCT_FLOCK64 1
11779 EOF
11780
11781   fi
11782 fi
11783
11784 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11785 echo "configure:11786: checking for st_blocks in struct stat" >&5
11786 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11787   echo $ac_n "(cached) $ac_c" 1>&6
11788 else
11789   
11790 cat > conftest.$ac_ext <<EOF
11791 #line 11792 "configure"
11792 #include "confdefs.h"
11793 #include <sys/types.h>
11794 #include <sys/stat.h>
11795 #include <unistd.h>
11796 int main() {
11797 struct stat st;  st.st_blocks = 0;
11798 ; return 0; }
11799 EOF
11800 if { (eval echo configure:11801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11801   rm -rf conftest*
11802   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11803 else
11804   echo "configure: failed program was:" >&5
11805   cat conftest.$ac_ext >&5
11806   rm -rf conftest*
11807   samba_cv_HAVE_STAT_ST_BLOCKS=no
11808 fi
11809 rm -f conftest*
11810 fi
11811
11812 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11813 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11814     cat >> confdefs.h <<\EOF
11815 #define HAVE_STAT_ST_BLOCKS 1
11816 EOF
11817
11818 fi 
11819
11820 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
11821 echo "configure:11822: checking for st_blksize in struct stat" >&5
11822 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLKSIZE'+set}'`\" = set"; then
11823   echo $ac_n "(cached) $ac_c" 1>&6
11824 else
11825   
11826 cat > conftest.$ac_ext <<EOF
11827 #line 11828 "configure"
11828 #include "confdefs.h"
11829 #include <sys/types.h>
11830 #include <sys/stat.h>
11831 #include <unistd.h>
11832 int main() {
11833 struct stat st;  st.st_blksize = 0;
11834 ; return 0; }
11835 EOF
11836 if { (eval echo configure:11837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11837   rm -rf conftest*
11838   samba_cv_HAVE_STAT_ST_BLKSIZE=yes
11839 else
11840   echo "configure: failed program was:" >&5
11841   cat conftest.$ac_ext >&5
11842   rm -rf conftest*
11843   samba_cv_HAVE_STAT_ST_BLKSIZE=no
11844 fi
11845 rm -f conftest*
11846 fi
11847
11848 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLKSIZE" 1>&6
11849 if test x"$samba_cv_HAVE_STAT_ST_BLKSIZE" = x"yes"; then
11850     cat >> confdefs.h <<\EOF
11851 #define HAVE_STAT_ST_BLKSIZE 1
11852 EOF
11853
11854 fi
11855
11856 case "$host_os" in
11857 *linux*)
11858 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11859 echo "configure:11860: checking for broken RedHat 7.2 system header files" >&5
11860 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11861   echo $ac_n "(cached) $ac_c" 1>&6
11862 else
11863   
11864 cat > conftest.$ac_ext <<EOF
11865 #line 11866 "configure"
11866 #include "confdefs.h"
11867
11868 #ifdef HAVE_SYS_VFS_H
11869 #include <sys/vfs.h>
11870 #endif
11871 #ifdef HAVE_SYS_CAPABILITY_H
11872 #include <sys/capability.h>
11873 #endif
11874
11875 int main() {
11876 int i;
11877 ; return 0; }
11878 EOF
11879 if { (eval echo configure:11880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11880   rm -rf conftest*
11881   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11882 else
11883   echo "configure: failed program was:" >&5
11884   cat conftest.$ac_ext >&5
11885   rm -rf conftest*
11886   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11887 fi
11888 rm -f conftest*
11889 fi
11890
11891 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11892 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11893    cat >> confdefs.h <<\EOF
11894 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11895 EOF
11896
11897 fi
11898 ;;
11899 esac
11900
11901 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11902 echo "configure:11903: checking for broken nisplus include files" >&5
11903 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11904   echo $ac_n "(cached) $ac_c" 1>&6
11905 else
11906   
11907 cat > conftest.$ac_ext <<EOF
11908 #line 11909 "configure"
11909 #include "confdefs.h"
11910 #include <sys/acl.h>
11911 #if defined(HAVE_RPCSVC_NIS_H)
11912 #include <rpcsvc/nis.h>
11913 #endif
11914 int main() {
11915 int i;
11916 ; return 0; }
11917 EOF
11918 if { (eval echo configure:11919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11919   rm -rf conftest*
11920   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11921 else
11922   echo "configure: failed program was:" >&5
11923   cat conftest.$ac_ext >&5
11924   rm -rf conftest*
11925   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11926 fi
11927 rm -f conftest*
11928 fi
11929
11930 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11931 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11932     cat >> confdefs.h <<\EOF
11933 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11934 EOF
11935
11936 fi
11937
11938
11939 #################################################
11940 # check for smbwrapper support
11941 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11942 echo "configure:11943: checking whether to use smbwrapper" >&5
11943 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11944 if test "${with_smbwrapper+set}" = set; then
11945   withval="$with_smbwrapper"
11946    case "$withval" in
11947   yes)
11948     echo "$ac_t""yes" 1>&6
11949     cat >> confdefs.h <<\EOF
11950 #define WITH_SMBWRAPPER 1
11951 EOF
11952
11953         WRAPPROG="bin/smbsh"
11954         WRAP="bin/smbwrapper.$SHLIBEXT"
11955
11956         if test x$ATTEMPT_WRAP32_BUILD = x; then
11957                 WRAP32=""
11958         else
11959                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11960         fi
11961
11962 # Conditions under which smbwrapper should not be built.
11963
11964         if test x$PICFLAG = x; then
11965            echo No support for PIC code - disabling smbwrapper and smbsh
11966            WRAPPROG=""
11967            WRAP=""
11968            WRAP32=""
11969         elif test x$ac_cv_func_syscall = xno; then
11970            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11971            WRAPPROG=""
11972            WRAP=""
11973            WRAP32=""
11974         fi
11975     ;;
11976   *)
11977     echo "$ac_t""no" 1>&6
11978     ;;
11979   esac 
11980 else
11981   echo "$ac_t""no" 1>&6
11982
11983 fi
11984
11985
11986 #################################################
11987 # check for AFS clear-text auth support
11988 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11989 echo "configure:11990: checking whether to use AFS clear-text auth" >&5
11990 # Check whether --with-afs or --without-afs was given.
11991 if test "${with_afs+set}" = set; then
11992   withval="$with_afs"
11993    case "$withval" in
11994   yes)
11995     echo "$ac_t""yes" 1>&6
11996     cat >> confdefs.h <<\EOF
11997 #define WITH_AFS 1
11998 EOF
11999
12000     ;;
12001   *)
12002     echo "$ac_t""no" 1>&6
12003     ;;
12004   esac 
12005 else
12006   echo "$ac_t""no" 1>&6
12007
12008 fi
12009
12010
12011
12012 #################################################
12013 # check for the DFS clear-text auth system
12014 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
12015 echo "configure:12016: checking whether to use DFS clear-text auth" >&5
12016 # Check whether --with-dfs or --without-dfs was given.
12017 if test "${with_dfs+set}" = set; then
12018   withval="$with_dfs"
12019    case "$withval" in
12020   yes)
12021     echo "$ac_t""yes" 1>&6
12022     cat >> confdefs.h <<\EOF
12023 #define WITH_DFS 1
12024 EOF
12025
12026     ;;
12027   *)
12028     echo "$ac_t""no" 1>&6
12029     ;;
12030   esac 
12031 else
12032   echo "$ac_t""no" 1>&6
12033
12034 fi
12035
12036
12037
12038 #################################################
12039 # see if this box has the RedHat location for kerberos
12040 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
12041 echo "configure:12042: checking for /usr/kerberos" >&5
12042 if test -d /usr/kerberos; then
12043     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
12044     CFLAGS="$CFLAGS -I/usr/kerberos/include"
12045     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
12046     echo "$ac_t""yes" 1>&6
12047 else
12048     echo "$ac_t""no" 1>&6
12049 fi
12050
12051 #################################################
12052 # check for location of Kerberos 5 install
12053 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
12054 echo "configure:12055: checking for kerberos 5 install path" >&5
12055 # Check whether --with-krb5 or --without-krb5 was given.
12056 if test "${with_krb5+set}" = set; then
12057   withval="$with_krb5"
12058    case "$withval" in
12059   no)
12060     echo "$ac_t""no" 1>&6
12061     ;;
12062   *)
12063     echo "$ac_t""yes" 1>&6
12064     LIBS="$LIBS -lkrb5"
12065     CFLAGS="$CFLAGS -I$withval/include"
12066     CPPFLAGS="$CPPFLAGS -I$withval/include"
12067     LDFLAGS="$LDFLAGS -L$withval/lib"
12068     ;;
12069   esac 
12070 else
12071   echo "$ac_t""no" 1>&6
12072
12073 fi
12074
12075
12076 # now check for krb5.h. Some systems have the libraries without the headers!
12077 # note that this check is done here to allow for different kerberos
12078 # include paths
12079 for ac_hdr in krb5.h
12080 do
12081 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12082 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12083 echo "configure:12084: checking for $ac_hdr" >&5
12084 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12085   echo $ac_n "(cached) $ac_c" 1>&6
12086 else
12087   cat > conftest.$ac_ext <<EOF
12088 #line 12089 "configure"
12089 #include "confdefs.h"
12090 #include <$ac_hdr>
12091 EOF
12092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12093 { (eval echo configure:12094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12095 if test -z "$ac_err"; then
12096   rm -rf conftest*
12097   eval "ac_cv_header_$ac_safe=yes"
12098 else
12099   echo "$ac_err" >&5
12100   echo "configure: failed program was:" >&5
12101   cat conftest.$ac_ext >&5
12102   rm -rf conftest*
12103   eval "ac_cv_header_$ac_safe=no"
12104 fi
12105 rm -f conftest*
12106 fi
12107 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12108   echo "$ac_t""yes" 1>&6
12109     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12110   cat >> confdefs.h <<EOF
12111 #define $ac_tr_hdr 1
12112 EOF
12113  
12114 else
12115   echo "$ac_t""no" 1>&6
12116 fi
12117 done
12118
12119
12120 # now check for gssapi headers.  This is also done here to allow for
12121 # different kerberos include paths
12122 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12123 do
12124 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12125 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12126 echo "configure:12127: checking for $ac_hdr" >&5
12127 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12128   echo $ac_n "(cached) $ac_c" 1>&6
12129 else
12130   cat > conftest.$ac_ext <<EOF
12131 #line 12132 "configure"
12132 #include "confdefs.h"
12133 #include <$ac_hdr>
12134 EOF
12135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12136 { (eval echo configure:12137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12138 if test -z "$ac_err"; then
12139   rm -rf conftest*
12140   eval "ac_cv_header_$ac_safe=yes"
12141 else
12142   echo "$ac_err" >&5
12143   echo "configure: failed program was:" >&5
12144   cat conftest.$ac_ext >&5
12145   rm -rf conftest*
12146   eval "ac_cv_header_$ac_safe=no"
12147 fi
12148 rm -f conftest*
12149 fi
12150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12151   echo "$ac_t""yes" 1>&6
12152     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12153   cat >> confdefs.h <<EOF
12154 #define $ac_tr_hdr 1
12155 EOF
12156  
12157 else
12158   echo "$ac_t""no" 1>&6
12159 fi
12160 done
12161
12162
12163 ##################################################################
12164 # we might need the k5crypto and com_err libraries on some systems
12165 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12166 echo "configure:12167: checking for _et_list in -lcom_err" >&5
12167 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12168 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12169   echo $ac_n "(cached) $ac_c" 1>&6
12170 else
12171   ac_save_LIBS="$LIBS"
12172 LIBS="-lcom_err  $LIBS"
12173 cat > conftest.$ac_ext <<EOF
12174 #line 12175 "configure"
12175 #include "confdefs.h"
12176 /* Override any gcc2 internal prototype to avoid an error.  */
12177 /* We use char because int might match the return type of a gcc2
12178     builtin and then its argument prototype would still apply.  */
12179 char _et_list();
12180
12181 int main() {
12182 _et_list()
12183 ; return 0; }
12184 EOF
12185 if { (eval echo configure:12186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12186   rm -rf conftest*
12187   eval "ac_cv_lib_$ac_lib_var=yes"
12188 else
12189   echo "configure: failed program was:" >&5
12190   cat conftest.$ac_ext >&5
12191   rm -rf conftest*
12192   eval "ac_cv_lib_$ac_lib_var=no"
12193 fi
12194 rm -f conftest*
12195 LIBS="$ac_save_LIBS"
12196
12197 fi
12198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12199   echo "$ac_t""yes" 1>&6
12200   LIBS="$LIBS -lcom_err"
12201 else
12202   echo "$ac_t""no" 1>&6
12203 fi
12204
12205 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12206 echo "configure:12207: checking for krb5_encrypt_data in -lk5crypto" >&5
12207 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12208 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12209   echo $ac_n "(cached) $ac_c" 1>&6
12210 else
12211   ac_save_LIBS="$LIBS"
12212 LIBS="-lk5crypto  $LIBS"
12213 cat > conftest.$ac_ext <<EOF
12214 #line 12215 "configure"
12215 #include "confdefs.h"
12216 /* Override any gcc2 internal prototype to avoid an error.  */
12217 /* We use char because int might match the return type of a gcc2
12218     builtin and then its argument prototype would still apply.  */
12219 char krb5_encrypt_data();
12220
12221 int main() {
12222 krb5_encrypt_data()
12223 ; return 0; }
12224 EOF
12225 if { (eval echo configure:12226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12226   rm -rf conftest*
12227   eval "ac_cv_lib_$ac_lib_var=yes"
12228 else
12229   echo "configure: failed program was:" >&5
12230   cat conftest.$ac_ext >&5
12231   rm -rf conftest*
12232   eval "ac_cv_lib_$ac_lib_var=no"
12233 fi
12234 rm -f conftest*
12235 LIBS="$ac_save_LIBS"
12236
12237 fi
12238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12239   echo "$ac_t""yes" 1>&6
12240   LIBS="$LIBS -lk5crypto"
12241 else
12242   echo "$ac_t""no" 1>&6
12243 fi
12244
12245
12246 ########################################################
12247 # now see if we can find the krb5 libs in standard paths
12248 # or as specified above
12249 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12250 echo "configure:12251: checking for krb5_mk_req_extended in -lkrb5" >&5
12251 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12252 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12253   echo $ac_n "(cached) $ac_c" 1>&6
12254 else
12255   ac_save_LIBS="$LIBS"
12256 LIBS="-lkrb5  $LIBS"
12257 cat > conftest.$ac_ext <<EOF
12258 #line 12259 "configure"
12259 #include "confdefs.h"
12260 /* Override any gcc2 internal prototype to avoid an error.  */
12261 /* We use char because int might match the return type of a gcc2
12262     builtin and then its argument prototype would still apply.  */
12263 char krb5_mk_req_extended();
12264
12265 int main() {
12266 krb5_mk_req_extended()
12267 ; return 0; }
12268 EOF
12269 if { (eval echo configure:12270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12270   rm -rf conftest*
12271   eval "ac_cv_lib_$ac_lib_var=yes"
12272 else
12273   echo "configure: failed program was:" >&5
12274   cat conftest.$ac_ext >&5
12275   rm -rf conftest*
12276   eval "ac_cv_lib_$ac_lib_var=no"
12277 fi
12278 rm -f conftest*
12279 LIBS="$ac_save_LIBS"
12280
12281 fi
12282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12283   echo "$ac_t""yes" 1>&6
12284   LIBS="$LIBS -lkrb5";
12285         cat >> confdefs.h <<\EOF
12286 #define HAVE_KRB5 1
12287 EOF
12288
12289 else
12290   echo "$ac_t""no" 1>&6
12291 fi
12292
12293
12294 ########################################################
12295 # now see if we can find the gssapi libs in standard paths
12296 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12297 echo "configure:12298: checking for gss_display_status in -lgssapi_krb5" >&5
12298 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12299 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12300   echo $ac_n "(cached) $ac_c" 1>&6
12301 else
12302   ac_save_LIBS="$LIBS"
12303 LIBS="-lgssapi_krb5  $LIBS"
12304 cat > conftest.$ac_ext <<EOF
12305 #line 12306 "configure"
12306 #include "confdefs.h"
12307 /* Override any gcc2 internal prototype to avoid an error.  */
12308 /* We use char because int might match the return type of a gcc2
12309     builtin and then its argument prototype would still apply.  */
12310 char gss_display_status();
12311
12312 int main() {
12313 gss_display_status()
12314 ; return 0; }
12315 EOF
12316 if { (eval echo configure:12317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12317   rm -rf conftest*
12318   eval "ac_cv_lib_$ac_lib_var=yes"
12319 else
12320   echo "configure: failed program was:" >&5
12321   cat conftest.$ac_ext >&5
12322   rm -rf conftest*
12323   eval "ac_cv_lib_$ac_lib_var=no"
12324 fi
12325 rm -f conftest*
12326 LIBS="$ac_save_LIBS"
12327
12328 fi
12329 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12330   echo "$ac_t""yes" 1>&6
12331   LIBS="$LIBS -lgssapi_krb5";
12332         cat >> confdefs.h <<\EOF
12333 #define HAVE_GSSAPI 1
12334 EOF
12335
12336 else
12337   echo "$ac_t""no" 1>&6
12338 fi
12339
12340
12341 ##################################################################
12342 # we might need the lber lib on some systems. To avoid link errors
12343 # this test must be before the libldap test
12344 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12345 echo "configure:12346: checking for ber_scanf in -llber" >&5
12346 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12347 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12348   echo $ac_n "(cached) $ac_c" 1>&6
12349 else
12350   ac_save_LIBS="$LIBS"
12351 LIBS="-llber  $LIBS"
12352 cat > conftest.$ac_ext <<EOF
12353 #line 12354 "configure"
12354 #include "confdefs.h"
12355 /* Override any gcc2 internal prototype to avoid an error.  */
12356 /* We use char because int might match the return type of a gcc2
12357     builtin and then its argument prototype would still apply.  */
12358 char ber_scanf();
12359
12360 int main() {
12361 ber_scanf()
12362 ; return 0; }
12363 EOF
12364 if { (eval echo configure:12365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12365   rm -rf conftest*
12366   eval "ac_cv_lib_$ac_lib_var=yes"
12367 else
12368   echo "configure: failed program was:" >&5
12369   cat conftest.$ac_ext >&5
12370   rm -rf conftest*
12371   eval "ac_cv_lib_$ac_lib_var=no"
12372 fi
12373 rm -f conftest*
12374 LIBS="$ac_save_LIBS"
12375
12376 fi
12377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12378   echo "$ac_t""yes" 1>&6
12379   LIBS="$LIBS -llber"
12380 else
12381   echo "$ac_t""no" 1>&6
12382 fi
12383
12384
12385 ########################################################
12386 # now see if we can find the ldap libs in standard paths
12387 if test x$have_ldap != xyes; then
12388 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12389 echo "configure:12390: checking for ldap_domain2hostlist in -lldap" >&5
12390 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12391 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12392   echo $ac_n "(cached) $ac_c" 1>&6
12393 else
12394   ac_save_LIBS="$LIBS"
12395 LIBS="-lldap  $LIBS"
12396 cat > conftest.$ac_ext <<EOF
12397 #line 12398 "configure"
12398 #include "confdefs.h"
12399 /* Override any gcc2 internal prototype to avoid an error.  */
12400 /* We use char because int might match the return type of a gcc2
12401     builtin and then its argument prototype would still apply.  */
12402 char ldap_domain2hostlist();
12403
12404 int main() {
12405 ldap_domain2hostlist()
12406 ; return 0; }
12407 EOF
12408 if { (eval echo configure:12409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12409   rm -rf conftest*
12410   eval "ac_cv_lib_$ac_lib_var=yes"
12411 else
12412   echo "configure: failed program was:" >&5
12413   cat conftest.$ac_ext >&5
12414   rm -rf conftest*
12415   eval "ac_cv_lib_$ac_lib_var=no"
12416 fi
12417 rm -f conftest*
12418 LIBS="$ac_save_LIBS"
12419
12420 fi
12421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12422   echo "$ac_t""yes" 1>&6
12423   LIBS="$LIBS -lldap";
12424         cat >> confdefs.h <<\EOF
12425 #define HAVE_LDAP 1
12426 EOF
12427
12428 else
12429   echo "$ac_t""no" 1>&6
12430 fi
12431
12432
12433         ########################################################
12434         # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
12435         # Check found in pam_ldap 145.
12436         for ac_func in ldap_set_rebind_proc
12437 do
12438 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12439 echo "configure:12440: checking for $ac_func" >&5
12440 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12441   echo $ac_n "(cached) $ac_c" 1>&6
12442 else
12443   cat > conftest.$ac_ext <<EOF
12444 #line 12445 "configure"
12445 #include "confdefs.h"
12446 /* System header to define __stub macros and hopefully few prototypes,
12447     which can conflict with char $ac_func(); below.  */
12448 #include <assert.h>
12449 /* Override any gcc2 internal prototype to avoid an error.  */
12450 /* We use char because int might match the return type of a gcc2
12451     builtin and then its argument prototype would still apply.  */
12452 char $ac_func();
12453
12454 int main() {
12455
12456 /* The GNU C library defines this for functions which it implements
12457     to always fail with ENOSYS.  Some functions are actually named
12458     something starting with __ and the normal name is an alias.  */
12459 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12460 choke me
12461 #else
12462 $ac_func();
12463 #endif
12464
12465 ; return 0; }
12466 EOF
12467 if { (eval echo configure:12468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12468   rm -rf conftest*
12469   eval "ac_cv_func_$ac_func=yes"
12470 else
12471   echo "configure: failed program was:" >&5
12472   cat conftest.$ac_ext >&5
12473   rm -rf conftest*
12474   eval "ac_cv_func_$ac_func=no"
12475 fi
12476 rm -f conftest*
12477 fi
12478
12479 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12480   echo "$ac_t""yes" 1>&6
12481     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12482   cat >> confdefs.h <<EOF
12483 #define $ac_tr_func 1
12484 EOF
12485  
12486 else
12487   echo "$ac_t""no" 1>&6
12488 fi
12489 done
12490
12491         echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6
12492 echo "configure:12493: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
12493 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then
12494   echo $ac_n "(cached) $ac_c" 1>&6
12495 else
12496   
12497         cat > conftest.$ac_ext <<EOF
12498 #line 12499 "configure"
12499 #include "confdefs.h"
12500
12501         #include <lber.h>
12502         #include <ldap.h>
12503 int main() {
12504 ldap_set_rebind_proc(0, 0, 0);
12505 ; return 0; }
12506 EOF
12507 if { (eval echo configure:12508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12508   rm -rf conftest*
12509   pam_ldap_cv_ldap_set_rebind_proc=3
12510 else
12511   echo "configure: failed program was:" >&5
12512   cat conftest.$ac_ext >&5
12513   rm -rf conftest*
12514   pam_ldap_cv_ldap_set_rebind_proc=2
12515 fi
12516 rm -f conftest* 
12517 fi
12518
12519 echo "$ac_t""$pam_ldap_cv_ldap_set_rebind_proc" 1>&6
12520         cat >> confdefs.h <<EOF
12521 #define LDAP_SET_REBIND_PROC_ARGS $pam_ldap_cv_ldap_set_rebind_proc
12522 EOF
12523
12524 fi
12525
12526 #################################################
12527 # check for automount support
12528 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12529 echo "configure:12530: checking whether to use AUTOMOUNT" >&5
12530 # Check whether --with-automount or --without-automount was given.
12531 if test "${with_automount+set}" = set; then
12532   withval="$with_automount"
12533    case "$withval" in
12534   yes)
12535     echo "$ac_t""yes" 1>&6
12536     cat >> confdefs.h <<\EOF
12537 #define WITH_AUTOMOUNT 1
12538 EOF
12539
12540     ;;
12541   *)
12542     echo "$ac_t""no" 1>&6
12543     ;;
12544   esac 
12545 else
12546   echo "$ac_t""no" 1>&6
12547
12548 fi
12549
12550
12551 #################################################
12552 # check for smbmount support
12553 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12554 echo "configure:12555: checking whether to use SMBMOUNT" >&5
12555 # Check whether --with-smbmount or --without-smbmount was given.
12556 if test "${with_smbmount+set}" = set; then
12557   withval="$with_smbmount"
12558    case "$withval" in
12559   yes)
12560         case "$host_os" in
12561         *linux*)
12562                 echo "$ac_t""yes" 1>&6
12563                 cat >> confdefs.h <<\EOF
12564 #define WITH_SMBMOUNT 1
12565 EOF
12566
12567                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12568                 ;;
12569         *)
12570                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12571                 ;;
12572         esac
12573     ;;
12574   *)
12575     echo "$ac_t""no" 1>&6
12576     MPROGS=
12577     ;;
12578   esac 
12579 else
12580   echo "$ac_t""no" 1>&6
12581   MPROGS=
12582
12583 fi
12584
12585
12586
12587 #################################################
12588 # check for a PAM clear-text auth, accounts, password and session support
12589 with_pam_for_crypt=no
12590 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12591 echo "configure:12592: checking whether to use PAM" >&5
12592 # Check whether --with-pam or --without-pam was given.
12593 if test "${with_pam+set}" = set; then
12594   withval="$with_pam"
12595    case "$withval" in
12596   yes)
12597     echo "$ac_t""yes" 1>&6
12598     cat >> confdefs.h <<\EOF
12599 #define WITH_PAM 1
12600 EOF
12601
12602     LIBS="$LIBS -lpam"
12603     with_pam_for_crypt=yes
12604     ;;
12605   *)
12606     echo "$ac_t""no" 1>&6
12607     ;;
12608   esac 
12609 else
12610   echo "$ac_t""no" 1>&6
12611
12612 fi
12613
12614
12615 # we can't build a pam module if we don't have pam.
12616 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12617 echo "configure:12618: checking for pam_get_data in -lpam" >&5
12618 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12619 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12620   echo $ac_n "(cached) $ac_c" 1>&6
12621 else
12622   ac_save_LIBS="$LIBS"
12623 LIBS="-lpam  $LIBS"
12624 cat > conftest.$ac_ext <<EOF
12625 #line 12626 "configure"
12626 #include "confdefs.h"
12627 /* Override any gcc2 internal prototype to avoid an error.  */
12628 /* We use char because int might match the return type of a gcc2
12629     builtin and then its argument prototype would still apply.  */
12630 char pam_get_data();
12631
12632 int main() {
12633 pam_get_data()
12634 ; return 0; }
12635 EOF
12636 if { (eval echo configure:12637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12637   rm -rf conftest*
12638   eval "ac_cv_lib_$ac_lib_var=yes"
12639 else
12640   echo "configure: failed program was:" >&5
12641   cat conftest.$ac_ext >&5
12642   rm -rf conftest*
12643   eval "ac_cv_lib_$ac_lib_var=no"
12644 fi
12645 rm -f conftest*
12646 LIBS="$ac_save_LIBS"
12647
12648 fi
12649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12650   echo "$ac_t""yes" 1>&6
12651   cat >> confdefs.h <<\EOF
12652 #define HAVE_LIBPAM 1
12653 EOF
12654
12655 else
12656   echo "$ac_t""no" 1>&6
12657 fi
12658
12659
12660 #################################################
12661 # check for pam_smbpass support
12662 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12663 echo "configure:12664: checking whether to use pam_smbpass" >&5
12664 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12665 if test "${with_pam_smbpass+set}" = set; then
12666   withval="$with_pam_smbpass"
12667    case "$withval" in
12668   yes)
12669     echo "$ac_t""yes" 1>&6
12670
12671 # Conditions under which pam_smbpass should not be built.
12672
12673        if test x$PICFLAG = x; then
12674           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12675           PAM_MOD=""
12676        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12677           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12678           PAM_MOD=""
12679        else
12680           PAM_MOD="bin/pam_smbpass.so"
12681        fi
12682     ;;
12683   *)
12684     echo "$ac_t""no" 1>&6
12685     ;;
12686   esac 
12687 else
12688   echo "$ac_t""no" 1>&6
12689
12690 fi
12691
12692
12693
12694 ###############################################
12695 # test for where we get crypt() from, but only
12696 # if not using PAM
12697 if test $with_pam_for_crypt = no; then
12698 for ac_func in crypt
12699 do
12700 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12701 echo "configure:12702: checking for $ac_func" >&5
12702 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12703   echo $ac_n "(cached) $ac_c" 1>&6
12704 else
12705   cat > conftest.$ac_ext <<EOF
12706 #line 12707 "configure"
12707 #include "confdefs.h"
12708 /* System header to define __stub macros and hopefully few prototypes,
12709     which can conflict with char $ac_func(); below.  */
12710 #include <assert.h>
12711 /* Override any gcc2 internal prototype to avoid an error.  */
12712 /* We use char because int might match the return type of a gcc2
12713     builtin and then its argument prototype would still apply.  */
12714 char $ac_func();
12715
12716 int main() {
12717
12718 /* The GNU C library defines this for functions which it implements
12719     to always fail with ENOSYS.  Some functions are actually named
12720     something starting with __ and the normal name is an alias.  */
12721 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12722 choke me
12723 #else
12724 $ac_func();
12725 #endif
12726
12727 ; return 0; }
12728 EOF
12729 if { (eval echo configure:12730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12730   rm -rf conftest*
12731   eval "ac_cv_func_$ac_func=yes"
12732 else
12733   echo "configure: failed program was:" >&5
12734   cat conftest.$ac_ext >&5
12735   rm -rf conftest*
12736   eval "ac_cv_func_$ac_func=no"
12737 fi
12738 rm -f conftest*
12739 fi
12740
12741 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12742   echo "$ac_t""yes" 1>&6
12743     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12744   cat >> confdefs.h <<EOF
12745 #define $ac_tr_func 1
12746 EOF
12747  
12748 else
12749   echo "$ac_t""no" 1>&6
12750 fi
12751 done
12752
12753 if test x"$ac_cv_func_crypt" = x"no"; then
12754     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12755 echo "configure:12756: checking for crypt in -lcrypt" >&5
12756 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12757 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12758   echo $ac_n "(cached) $ac_c" 1>&6
12759 else
12760   ac_save_LIBS="$LIBS"
12761 LIBS="-lcrypt  $LIBS"
12762 cat > conftest.$ac_ext <<EOF
12763 #line 12764 "configure"
12764 #include "confdefs.h"
12765 /* Override any gcc2 internal prototype to avoid an error.  */
12766 /* We use char because int might match the return type of a gcc2
12767     builtin and then its argument prototype would still apply.  */
12768 char crypt();
12769
12770 int main() {
12771 crypt()
12772 ; return 0; }
12773 EOF
12774 if { (eval echo configure:12775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12775   rm -rf conftest*
12776   eval "ac_cv_lib_$ac_lib_var=yes"
12777 else
12778   echo "configure: failed program was:" >&5
12779   cat conftest.$ac_ext >&5
12780   rm -rf conftest*
12781   eval "ac_cv_lib_$ac_lib_var=no"
12782 fi
12783 rm -f conftest*
12784 LIBS="$ac_save_LIBS"
12785
12786 fi
12787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12788   echo "$ac_t""yes" 1>&6
12789   LIBS="$LIBS -lcrypt";
12790         cat >> confdefs.h <<\EOF
12791 #define HAVE_CRYPT 1
12792 EOF
12793
12794 else
12795   echo "$ac_t""no" 1>&6
12796 fi
12797
12798 fi
12799 fi
12800
12801 ##
12802 ## moved after the check for -lcrypt in order to
12803 ## ensure that the necessary libraries are included
12804 ## check checking for truncated salt.  Wrapped by the
12805 ## $with_pam_for_crypt variable as above   --jerry
12806 ##
12807 if test $with_pam_for_crypt = no; then
12808 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12809 echo "configure:12810: checking for a crypt that needs truncated salt" >&5
12810 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12811   echo $ac_n "(cached) $ac_c" 1>&6
12812 else
12813   
12814 if test "$cross_compiling" = yes; then
12815   samba_cv_HAVE_TRUNCATED_SALT=cross
12816 else
12817   cat > conftest.$ac_ext <<EOF
12818 #line 12819 "configure"
12819 #include "confdefs.h"
12820 #include "${srcdir-.}/tests/crypttest.c"
12821 EOF
12822 if { (eval echo configure:12823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12823 then
12824   samba_cv_HAVE_TRUNCATED_SALT=no
12825 else
12826   echo "configure: failed program was:" >&5
12827   cat conftest.$ac_ext >&5
12828   rm -fr conftest*
12829   samba_cv_HAVE_TRUNCATED_SALT=yes
12830 fi
12831 rm -fr conftest*
12832 fi
12833
12834 fi
12835
12836 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12837 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12838         cat >> confdefs.h <<\EOF
12839 #define HAVE_TRUNCATED_SALT 1
12840 EOF
12841
12842 fi
12843 fi
12844
12845 # New experimental SAM system
12846
12847 echo $ac_n "checking whether to build the new (experimental) SAM database""... $ac_c" 1>&6
12848 echo "configure:12849: checking whether to build the new (experimental) SAM database" >&5
12849 # Check whether --with-sam or --without-sam was given.
12850 if test "${with_sam+set}" = set; then
12851   withval="$with_sam"
12852    case "$withval" in
12853   yes)
12854     echo "$ac_t""yes" 1>&6
12855     cat >> confdefs.h <<\EOF
12856 #define WITH_SAM 1
12857 EOF
12858
12859     ;;
12860   *)
12861     echo "$ac_t""no" 1>&6
12862     ;;
12863   esac 
12864 else
12865   echo "$ac_t""no" 1>&6
12866
12867 fi
12868
12869
12870
12871 ########################################################################################
12872 ##
12873 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12874 ##
12875 ########################################################################################
12876
12877 #################################################
12878 # check for a TDB password database
12879 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12880 echo "configure:12881: checking whether to use TDB SAM database" >&5
12881 # Check whether --with-tdbsam or --without-tdbsam was given.
12882 if test "${with_tdbsam+set}" = set; then
12883   withval="$with_tdbsam"
12884    case "$withval" in
12885   yes)
12886     echo "$ac_t""yes" 1>&6
12887     cat >> confdefs.h <<\EOF
12888 #define WITH_TDB_SAM 1
12889 EOF
12890
12891     ;;
12892   *)
12893     echo "$ac_t""no" 1>&6
12894     ;;
12895   esac 
12896 else
12897   echo "$ac_t""no" 1>&6
12898
12899 fi
12900
12901
12902 #################################################
12903 # check for a NISPLUS password database
12904 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12905 echo "configure:12906: checking whether to use NISPLUS SAM database" >&5
12906 # Check whether --with-nisplussam or --without-nisplussam was given.
12907 if test "${with_nisplussam+set}" = set; then
12908   withval="$with_nisplussam"
12909    case "$withval" in
12910   yes)
12911     echo "$ac_t""yes" 1>&6
12912     cat >> confdefs.h <<\EOF
12913 #define WITH_NISPLUS_SAM 1
12914 EOF
12915
12916     ;;
12917   *)
12918     echo "$ac_t""no" 1>&6
12919     ;;
12920   esac 
12921 else
12922   echo "$ac_t""no" 1>&6
12923
12924 fi
12925
12926
12927 ########################################################################################
12928 ##
12929 ## END OF TESTS FOR SAM BACKENDS.  
12930 ##
12931 ########################################################################################
12932
12933 #################################################
12934 # check for a NISPLUS_HOME support 
12935 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12936 echo "configure:12937: checking whether to use NISPLUS_HOME" >&5
12937 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12938 if test "${with_nisplus_home+set}" = set; then
12939   withval="$with_nisplus_home"
12940    case "$withval" in
12941   yes)
12942     echo "$ac_t""yes" 1>&6
12943     cat >> confdefs.h <<\EOF
12944 #define WITH_NISPLUS_HOME 1
12945 EOF
12946
12947     ;;
12948   *)
12949     echo "$ac_t""no" 1>&6
12950     ;;
12951   esac 
12952 else
12953   echo "$ac_t""no" 1>&6
12954
12955 fi
12956
12957
12958 #################################################
12959 # check for syslog logging
12960 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12961 echo "configure:12962: checking whether to use syslog logging" >&5
12962 # Check whether --with-syslog or --without-syslog was given.
12963 if test "${with_syslog+set}" = set; then
12964   withval="$with_syslog"
12965    case "$withval" in
12966   yes)
12967     echo "$ac_t""yes" 1>&6
12968     cat >> confdefs.h <<\EOF
12969 #define WITH_SYSLOG 1
12970 EOF
12971
12972     ;;
12973   *)
12974     echo "$ac_t""no" 1>&6
12975     ;;
12976   esac 
12977 else
12978   echo "$ac_t""no" 1>&6
12979
12980 fi
12981
12982
12983 #################################################
12984 # check for a shared memory profiling support
12985 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12986 echo "configure:12987: checking whether to use profiling" >&5
12987 # Check whether --with-profiling-data or --without-profiling-data was given.
12988 if test "${with_profiling_data+set}" = set; then
12989   withval="$with_profiling_data"
12990    case "$withval" in
12991   yes)
12992     echo "$ac_t""yes" 1>&6
12993     cat >> confdefs.h <<\EOF
12994 #define WITH_PROFILE 1
12995 EOF
12996
12997     ;;
12998   *)
12999     echo "$ac_t""no" 1>&6
13000     ;;
13001   esac 
13002 else
13003   echo "$ac_t""no" 1>&6
13004
13005 fi
13006
13007
13008
13009 #################################################
13010 # check for experimental disk-quotas support
13011 QUOTAOBJS=smbd/noquotas.o
13012
13013 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
13014 echo "configure:13015: checking whether to support disk-quotas" >&5
13015 # Check whether --with-quotas or --without-quotas was given.
13016 if test "${with_quotas+set}" = set; then
13017   withval="$with_quotas"
13018    case "$withval" in
13019   yes)
13020     echo "$ac_t""yes" 1>&6
13021     case "$host_os" in
13022       *linux*)
13023         # Check for kernel 2.4.x quota braindamage...
13024         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
13025 echo "configure:13026: checking for linux 2.4.x quota braindamage.." >&5
13026 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
13027   echo $ac_n "(cached) $ac_c" 1>&6
13028 else
13029   
13030         cat > conftest.$ac_ext <<EOF
13031 #line 13032 "configure"
13032 #include "confdefs.h"
13033 #include <stdio.h>
13034 #include <sys/types.h>
13035 #include <asm/types.h>
13036 #include <linux/quota.h>
13037 #include <mntent.h>
13038 #include <linux/unistd.h>
13039 int main() {
13040 struct mem_dqblk D;
13041 ; return 0; }
13042 EOF
13043 if { (eval echo configure:13044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13044   rm -rf conftest*
13045   samba_cv_linux_2_4_quota_braindamage=yes
13046 else
13047   echo "configure: failed program was:" >&5
13048   cat conftest.$ac_ext >&5
13049   rm -rf conftest*
13050   samba_cv_linux_2_4_quota_braindamage=no
13051 fi
13052 rm -f conftest*
13053 fi
13054
13055 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
13056 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
13057         cat >> confdefs.h <<\EOF
13058 #define LINUX_QUOTAS_2 1
13059 EOF
13060
13061 else
13062         cat >> confdefs.h <<\EOF
13063 #define LINUX_QUOTAS_1 1
13064 EOF
13065
13066 fi
13067         ;;
13068       *)
13069         ;;
13070     esac
13071     QUOTAOBJS=smbd/quotas.o
13072     cat >> confdefs.h <<\EOF
13073 #define WITH_QUOTAS 1
13074 EOF
13075
13076     ;;
13077   *)
13078     echo "$ac_t""no" 1>&6
13079     ;;
13080   esac 
13081 else
13082   echo "$ac_t""no" 1>&6
13083
13084 fi
13085
13086
13087
13088 #################################################
13089 # check for experimental utmp accounting
13090
13091 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
13092 echo "configure:13093: checking whether to support utmp accounting" >&5
13093 # Check whether --with-utmp or --without-utmp was given.
13094 if test "${with_utmp+set}" = set; then
13095   withval="$with_utmp"
13096    case "$withval" in
13097   yes)
13098     echo "$ac_t""yes" 1>&6
13099     cat >> confdefs.h <<\EOF
13100 #define WITH_UTMP 1
13101 EOF
13102
13103     ;;
13104   *)
13105     echo "$ac_t""no" 1>&6
13106     ;;
13107   esac 
13108 else
13109   echo "$ac_t""no" 1>&6
13110
13111 fi
13112
13113
13114 #################################################
13115 # choose native language(s) of man pages
13116 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13117 echo "configure:13118: checking chosen man pages' language(s)" >&5
13118 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13119 if test "${with_manpages_langs+set}" = set; then
13120   withval="$with_manpages_langs"
13121    case "$withval" in
13122   yes|no)
13123     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13124     manlangs="en"
13125   ;;
13126   *)
13127     manlangs="$withval"
13128   ;;
13129   esac
13130
13131   echo "$ac_t""$manlangs" 1>&6
13132   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
13133   
13134 else
13135   manlangs="en"
13136   echo "$ac_t""$manlangs" 1>&6
13137   
13138
13139 fi
13140
13141
13142 #################################################
13143 # should we build libsmbclient?
13144
13145 LIBSMBCLIENT_SHARED=
13146 LIBSMBCLIENT=
13147 echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
13148 echo "configure:13149: checking whether to build the libsmbclient shared library" >&5
13149 # Check whether --with-libsmbclient or --without-libsmbclient was given.
13150 if test "${with_libsmbclient+set}" = set; then
13151   withval="$with_libsmbclient"
13152    case "$withval" in
13153   no) 
13154      echo "$ac_t""no" 1>&6
13155      ;;
13156   *)
13157      if test $BLDSHARED = true; then
13158         LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
13159         LIBSMBCLIENT=libsmbclient
13160         echo "$ac_t""yes" 1>&6
13161      else
13162         echo "$ac_t""no shared library support" 1>&6
13163      fi
13164      ;;
13165   esac 
13166 else
13167   echo "$ac_t""yes" 1>&6
13168
13169 fi
13170
13171
13172
13173 #################################################
13174 # these tests are taken from the GNU fileutils package
13175 echo "checking how to get filesystem space usage" 1>&6
13176 echo "configure:13177: checking how to get filesystem space usage" >&5
13177 space=no
13178
13179 # Test for statvfs64.
13180 if test $space = no; then
13181   # SVR4
13182   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13183 echo "configure:13184: checking statvfs64 function (SVR4)" >&5
13184 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13185   echo $ac_n "(cached) $ac_c" 1>&6
13186 else
13187   if test "$cross_compiling" = yes; then
13188   fu_cv_sys_stat_statvfs64=cross
13189 else
13190   cat > conftest.$ac_ext <<EOF
13191 #line 13192 "configure"
13192 #include "confdefs.h"
13193
13194 #if defined(HAVE_UNISTD_H)
13195 #include <unistd.h>
13196 #endif
13197 #include <sys/types.h>
13198 #include <sys/statvfs.h>
13199   main ()
13200   {
13201     struct statvfs64 fsd;
13202     exit (statvfs64 (".", &fsd));
13203   }
13204 EOF
13205 if { (eval echo configure:13206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13206 then
13207   fu_cv_sys_stat_statvfs64=yes
13208 else
13209   echo "configure: failed program was:" >&5
13210   cat conftest.$ac_ext >&5
13211   rm -fr conftest*
13212   fu_cv_sys_stat_statvfs64=no
13213 fi
13214 rm -fr conftest*
13215 fi
13216
13217 fi
13218
13219 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13220   if test $fu_cv_sys_stat_statvfs64 = yes; then
13221     space=yes
13222     cat >> confdefs.h <<\EOF
13223 #define STAT_STATVFS64 1
13224 EOF
13225
13226   fi
13227 fi
13228
13229 # Perform only the link test since it seems there are no variants of the
13230 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13231 # because that got a false positive on SCO OSR5.  Adding the declaration
13232 # of a `struct statvfs' causes this test to fail (as it should) on such
13233 # systems.  That system is reported to work fine with STAT_STATFS4 which
13234 # is what it gets when this test fails.
13235 if test $space = no; then
13236   # SVR4
13237   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13238 echo "configure:13239: checking statvfs function (SVR4)" >&5
13239 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13240   echo $ac_n "(cached) $ac_c" 1>&6
13241 else
13242   cat > conftest.$ac_ext <<EOF
13243 #line 13244 "configure"
13244 #include "confdefs.h"
13245 #include <sys/types.h>
13246 #include <sys/statvfs.h>
13247 int main() {
13248 struct statvfs fsd; statvfs (0, &fsd);
13249 ; return 0; }
13250 EOF
13251 if { (eval echo configure:13252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13252   rm -rf conftest*
13253   fu_cv_sys_stat_statvfs=yes
13254 else
13255   echo "configure: failed program was:" >&5
13256   cat conftest.$ac_ext >&5
13257   rm -rf conftest*
13258   fu_cv_sys_stat_statvfs=no
13259 fi
13260 rm -f conftest*
13261 fi
13262
13263 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13264   if test $fu_cv_sys_stat_statvfs = yes; then
13265     space=yes
13266     cat >> confdefs.h <<\EOF
13267 #define STAT_STATVFS 1
13268 EOF
13269
13270   fi
13271 fi
13272
13273 if test $space = no; then
13274   # DEC Alpha running OSF/1
13275   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13276 echo "configure:13277: checking for 3-argument statfs function (DEC OSF/1)" >&5
13277   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13278   echo $ac_n "(cached) $ac_c" 1>&6
13279 else
13280   if test "$cross_compiling" = yes; then
13281   fu_cv_sys_stat_statfs3_osf1=no
13282 else
13283   cat > conftest.$ac_ext <<EOF
13284 #line 13285 "configure"
13285 #include "confdefs.h"
13286
13287 #include <sys/param.h>
13288 #include <sys/types.h>
13289 #include <sys/mount.h>
13290   main ()
13291   {
13292     struct statfs fsd;
13293     fsd.f_fsize = 0;
13294     exit (statfs (".", &fsd, sizeof (struct statfs)));
13295   }
13296 EOF
13297 if { (eval echo configure:13298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13298 then
13299   fu_cv_sys_stat_statfs3_osf1=yes
13300 else
13301   echo "configure: failed program was:" >&5
13302   cat conftest.$ac_ext >&5
13303   rm -fr conftest*
13304   fu_cv_sys_stat_statfs3_osf1=no
13305 fi
13306 rm -fr conftest*
13307 fi
13308
13309 fi
13310
13311   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13312   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13313     space=yes
13314     cat >> confdefs.h <<\EOF
13315 #define STAT_STATFS3_OSF1 1
13316 EOF
13317
13318   fi
13319 fi
13320
13321 if test $space = no; then
13322 # AIX
13323   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13324 echo "configure:13325: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13325   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13326   echo $ac_n "(cached) $ac_c" 1>&6
13327 else
13328   if test "$cross_compiling" = yes; then
13329   fu_cv_sys_stat_statfs2_bsize=no
13330 else
13331   cat > conftest.$ac_ext <<EOF
13332 #line 13333 "configure"
13333 #include "confdefs.h"
13334
13335 #ifdef HAVE_SYS_PARAM_H
13336 #include <sys/param.h>
13337 #endif
13338 #ifdef HAVE_SYS_MOUNT_H
13339 #include <sys/mount.h>
13340 #endif
13341 #ifdef HAVE_SYS_VFS_H
13342 #include <sys/vfs.h>
13343 #endif
13344   main ()
13345   {
13346   struct statfs fsd;
13347   fsd.f_bsize = 0;
13348   exit (statfs (".", &fsd));
13349   }
13350 EOF
13351 if { (eval echo configure:13352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13352 then
13353   fu_cv_sys_stat_statfs2_bsize=yes
13354 else
13355   echo "configure: failed program was:" >&5
13356   cat conftest.$ac_ext >&5
13357   rm -fr conftest*
13358   fu_cv_sys_stat_statfs2_bsize=no
13359 fi
13360 rm -fr conftest*
13361 fi
13362
13363 fi
13364
13365   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13366   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13367     space=yes
13368     cat >> confdefs.h <<\EOF
13369 #define STAT_STATFS2_BSIZE 1
13370 EOF
13371
13372   fi
13373 fi
13374
13375 if test $space = no; then
13376 # SVR3
13377   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13378 echo "configure:13379: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13379   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13380   echo $ac_n "(cached) $ac_c" 1>&6
13381 else
13382   if test "$cross_compiling" = yes; then
13383   fu_cv_sys_stat_statfs4=no
13384 else
13385   cat > conftest.$ac_ext <<EOF
13386 #line 13387 "configure"
13387 #include "confdefs.h"
13388 #include <sys/types.h>
13389 #include <sys/statfs.h>
13390   main ()
13391   {
13392   struct statfs fsd;
13393   exit (statfs (".", &fsd, sizeof fsd, 0));
13394   }
13395 EOF
13396 if { (eval echo configure:13397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13397 then
13398   fu_cv_sys_stat_statfs4=yes
13399 else
13400   echo "configure: failed program was:" >&5
13401   cat conftest.$ac_ext >&5
13402   rm -fr conftest*
13403   fu_cv_sys_stat_statfs4=no
13404 fi
13405 rm -fr conftest*
13406 fi
13407
13408 fi
13409
13410   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13411   if test $fu_cv_sys_stat_statfs4 = yes; then
13412     space=yes
13413     cat >> confdefs.h <<\EOF
13414 #define STAT_STATFS4 1
13415 EOF
13416
13417   fi
13418 fi
13419
13420 if test $space = no; then
13421 # 4.4BSD and NetBSD
13422   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13423 echo "configure:13424: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13424   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13425   echo $ac_n "(cached) $ac_c" 1>&6
13426 else
13427   if test "$cross_compiling" = yes; then
13428   fu_cv_sys_stat_statfs2_fsize=no
13429 else
13430   cat > conftest.$ac_ext <<EOF
13431 #line 13432 "configure"
13432 #include "confdefs.h"
13433 #include <sys/types.h>
13434 #ifdef HAVE_SYS_PARAM_H
13435 #include <sys/param.h>
13436 #endif
13437 #ifdef HAVE_SYS_MOUNT_H
13438 #include <sys/mount.h>
13439 #endif
13440   main ()
13441   {
13442   struct statfs fsd;
13443   fsd.f_fsize = 0;
13444   exit (statfs (".", &fsd));
13445   }
13446 EOF
13447 if { (eval echo configure:13448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13448 then
13449   fu_cv_sys_stat_statfs2_fsize=yes
13450 else
13451   echo "configure: failed program was:" >&5
13452   cat conftest.$ac_ext >&5
13453   rm -fr conftest*
13454   fu_cv_sys_stat_statfs2_fsize=no
13455 fi
13456 rm -fr conftest*
13457 fi
13458
13459 fi
13460
13461   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13462   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13463     space=yes
13464     cat >> confdefs.h <<\EOF
13465 #define STAT_STATFS2_FSIZE 1
13466 EOF
13467
13468   fi
13469 fi
13470
13471 if test $space = no; then
13472   # Ultrix
13473   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13474 echo "configure:13475: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13475   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13476   echo $ac_n "(cached) $ac_c" 1>&6
13477 else
13478   if test "$cross_compiling" = yes; then
13479   fu_cv_sys_stat_fs_data=no
13480 else
13481   cat > conftest.$ac_ext <<EOF
13482 #line 13483 "configure"
13483 #include "confdefs.h"
13484 #include <sys/types.h>
13485 #ifdef HAVE_SYS_PARAM_H
13486 #include <sys/param.h>
13487 #endif
13488 #ifdef HAVE_SYS_MOUNT_H
13489 #include <sys/mount.h>
13490 #endif
13491 #ifdef HAVE_SYS_FS_TYPES_H
13492 #include <sys/fs_types.h>
13493 #endif
13494   main ()
13495   {
13496   struct fs_data fsd;
13497   /* Ultrix's statfs returns 1 for success,
13498      0 for not mounted, -1 for failure.  */
13499   exit (statfs (".", &fsd) != 1);
13500   }
13501 EOF
13502 if { (eval echo configure:13503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13503 then
13504   fu_cv_sys_stat_fs_data=yes
13505 else
13506   echo "configure: failed program was:" >&5
13507   cat conftest.$ac_ext >&5
13508   rm -fr conftest*
13509   fu_cv_sys_stat_fs_data=no
13510 fi
13511 rm -fr conftest*
13512 fi
13513
13514 fi
13515
13516   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13517   if test $fu_cv_sys_stat_fs_data = yes; then
13518     space=yes
13519     cat >> confdefs.h <<\EOF
13520 #define STAT_STATFS2_FS_DATA 1
13521 EOF
13522
13523   fi
13524 fi
13525
13526 #
13527 # As a gating factor for large file support, in order to
13528 # use <4GB files we must have the following minimal support
13529 # available.
13530 # long long, and a 64 bit off_t or off64_t.
13531 # If we don't have all of these then disable large
13532 # file support.
13533 #
13534 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13535 echo "configure:13536: checking if large file support can be enabled" >&5
13536 cat > conftest.$ac_ext <<EOF
13537 #line 13538 "configure"
13538 #include "confdefs.h"
13539
13540 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13541 #include <sys/types.h>
13542 #else
13543 __COMPILE_ERROR_
13544 #endif
13545
13546 int main() {
13547 int i
13548 ; return 0; }
13549 EOF
13550 if { (eval echo configure:13551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13551   rm -rf conftest*
13552   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13553 else
13554   echo "configure: failed program was:" >&5
13555   cat conftest.$ac_ext >&5
13556   rm -rf conftest*
13557   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13558 fi
13559 rm -f conftest*
13560 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13561     cat >> confdefs.h <<\EOF
13562 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13563 EOF
13564
13565 fi
13566 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13567
13568 # Check whether --with-spinlocks or --without-spinlocks was given.
13569 if test "${with_spinlocks+set}" = set; then
13570   withval="$with_spinlocks"
13571   :
13572 fi
13573
13574 if test "x$with_spinlocks" = "xyes"; then
13575     cat >> confdefs.h <<\EOF
13576 #define USE_SPINLOCKS 1
13577 EOF
13578
13579
13580     case "$host_cpu" in
13581         sparc)
13582             cat >> confdefs.h <<\EOF
13583 #define SPARC_SPINLOCKS 1
13584 EOF
13585
13586             ;;
13587
13588         i386|i486|i586|i686)
13589             cat >> confdefs.h <<\EOF
13590 #define INTEL_SPINLOCKS 1
13591 EOF
13592
13593             ;;
13594
13595         mips)
13596             cat >> confdefs.h <<\EOF
13597 #define MIPS_SPINLOCKS 1
13598 EOF
13599
13600             ;;
13601
13602         powerpc)
13603             cat >> confdefs.h <<\EOF
13604 #define POWERPC_SPINLOCKS 1
13605 EOF
13606
13607             ;;
13608     esac
13609 fi
13610
13611 #################################################
13612 # check for ACL support
13613
13614 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13615 echo "configure:13616: checking whether to support ACLs" >&5
13616 # Check whether --with-acl-support or --without-acl-support was given.
13617 if test "${with_acl_support+set}" = set; then
13618   withval="$with_acl_support"
13619    case "$withval" in
13620   yes)
13621
13622         case "$host_os" in
13623         *sysv5*)
13624                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13625                 cat >> confdefs.h <<\EOF
13626 #define HAVE_UNIXWARE_ACLS 1
13627 EOF
13628
13629                 ;;
13630         *solaris*)
13631                 echo "$ac_t""Using solaris ACLs" 1>&6
13632                 cat >> confdefs.h <<\EOF
13633 #define HAVE_SOLARIS_ACLS 1
13634 EOF
13635
13636                 ;;
13637         *hpux*)
13638                 echo "$ac_t""Using HPUX ACLs" 1>&6
13639                 cat >> confdefs.h <<\EOF
13640 #define HAVE_HPUX_ACLS 1
13641 EOF
13642
13643                 ;;
13644         *irix*)
13645                 echo "$ac_t""Using IRIX ACLs" 1>&6
13646                 cat >> confdefs.h <<\EOF
13647 #define HAVE_IRIX_ACLS 1
13648 EOF
13649
13650                 ;;
13651         *aix*)
13652                 echo "$ac_t""Using AIX ACLs" 1>&6
13653                 cat >> confdefs.h <<\EOF
13654 #define HAVE_AIX_ACLS 1
13655 EOF
13656
13657                 ;;
13658         *osf*)
13659                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13660                 cat >> confdefs.h <<\EOF
13661 #define HAVE_TRU64_ACLS 1
13662 EOF
13663
13664                 LIBS="$LIBS -lpacl"
13665                 ;;
13666         *)
13667                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13668 echo "configure:13669: checking for acl_get_file in -lacl" >&5
13669 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13670 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13671   echo $ac_n "(cached) $ac_c" 1>&6
13672 else
13673   ac_save_LIBS="$LIBS"
13674 LIBS="-lacl  $LIBS"
13675 cat > conftest.$ac_ext <<EOF
13676 #line 13677 "configure"
13677 #include "confdefs.h"
13678 /* Override any gcc2 internal prototype to avoid an error.  */
13679 /* We use char because int might match the return type of a gcc2
13680     builtin and then its argument prototype would still apply.  */
13681 char acl_get_file();
13682
13683 int main() {
13684 acl_get_file()
13685 ; return 0; }
13686 EOF
13687 if { (eval echo configure:13688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13688   rm -rf conftest*
13689   eval "ac_cv_lib_$ac_lib_var=yes"
13690 else
13691   echo "configure: failed program was:" >&5
13692   cat conftest.$ac_ext >&5
13693   rm -rf conftest*
13694   eval "ac_cv_lib_$ac_lib_var=no"
13695 fi
13696 rm -f conftest*
13697 LIBS="$ac_save_LIBS"
13698
13699 fi
13700 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13701   echo "$ac_t""yes" 1>&6
13702     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13703     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13704   cat >> confdefs.h <<EOF
13705 #define $ac_tr_lib 1
13706 EOF
13707
13708   LIBS="-lacl $LIBS"
13709
13710 else
13711   echo "$ac_t""no" 1>&6
13712 fi
13713
13714                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13715 echo "configure:13716: checking for ACL support" >&5
13716 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13717   echo $ac_n "(cached) $ac_c" 1>&6
13718 else
13719   
13720                 cat > conftest.$ac_ext <<EOF
13721 #line 13722 "configure"
13722 #include "confdefs.h"
13723 #include <sys/types.h>
13724 #include <sys/acl.h>
13725 int main() {
13726  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13727 ; return 0; }
13728 EOF
13729 if { (eval echo configure:13730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13730   rm -rf conftest*
13731   samba_cv_HAVE_POSIX_ACLS=yes
13732 else
13733   echo "configure: failed program was:" >&5
13734   cat conftest.$ac_ext >&5
13735   rm -rf conftest*
13736   samba_cv_HAVE_POSIX_ACLS=no
13737 fi
13738 rm -f conftest*
13739 fi
13740
13741 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13742                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13743                                 echo "$ac_t""Using posix ACLs" 1>&6
13744                                 cat >> confdefs.h <<\EOF
13745 #define HAVE_POSIX_ACLS 1
13746 EOF
13747
13748                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13749 echo "configure:13750: checking for acl_get_perm_np" >&5
13750 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13751   echo $ac_n "(cached) $ac_c" 1>&6
13752 else
13753   
13754                                 cat > conftest.$ac_ext <<EOF
13755 #line 13756 "configure"
13756 #include "confdefs.h"
13757 #include <sys/types.h>
13758 #include <sys/acl.h>
13759 int main() {
13760  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13761 ; return 0; }
13762 EOF
13763 if { (eval echo configure:13764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13764   rm -rf conftest*
13765   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13766 else
13767   echo "configure: failed program was:" >&5
13768   cat conftest.$ac_ext >&5
13769   rm -rf conftest*
13770   samba_cv_HAVE_ACL_GET_PERM_NP=no
13771 fi
13772 rm -f conftest*
13773 fi
13774
13775 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13776                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13777                                         cat >> confdefs.h <<\EOF
13778 #define HAVE_ACL_GET_PERM_NP 1
13779 EOF
13780
13781                                 fi
13782                         fi
13783             ;;
13784         esac
13785         ;;
13786   *)
13787     echo "$ac_t""no" 1>&6
13788     cat >> confdefs.h <<\EOF
13789 #define HAVE_NO_ACLS 1
13790 EOF
13791
13792     ;;
13793   esac 
13794 else
13795   cat >> confdefs.h <<\EOF
13796 #define HAVE_NO_ACLS 1
13797 EOF
13798
13799   echo "$ac_t""no" 1>&6
13800
13801 fi
13802
13803
13804 #################################################
13805 # Check whether winbind is supported on this platform.  If so we need to
13806 # build and install client programs (WINBIND_TARGETS), sbin programs
13807 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13808
13809 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13810 echo "configure:13811: checking whether to build winbind" >&5
13811
13812 # Initially, the value of $host_os decides whether winbind is supported
13813
13814 case "$host_os" in
13815         *linux*|*irix*)
13816                 HAVE_WINBIND=yes
13817                 ;;
13818         *solaris*)
13819                 HAVE_WINBIND=yes
13820                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13821                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
13822                 ;;
13823         *hpux11*)
13824                 HAVE_WINBIND=yes
13825                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13826                 ;;
13827         *)
13828                 HAVE_WINBIND=no
13829                 winbind_no_reason=", unsupported on $host_os"
13830                 ;;
13831 esac
13832
13833 # Check the setting of --with-winbindd
13834
13835 # Check whether --with-winbind or --without-winbind was given.
13836 if test "${with_winbind+set}" = set; then
13837   withval="$with_winbind"
13838    
13839   case "$withval" in
13840         yes)
13841                 HAVE_WINBIND=yes
13842                 ;;
13843         no)
13844                 HAVE_WINBIND=no
13845                 winbind_reason=""
13846                 ;;
13847   esac 
13848 fi
13849
13850
13851 # We need unix domain sockets for winbind
13852
13853 if test x"$HAVE_WINBIND" = x"yes"; then
13854         if test x"$samba_cv_unixsocket" = x"no"; then
13855                 winbind_no_reason=", no unix domain socket support on $host_os"
13856                 HAVE_WINBIND=no
13857         fi
13858 fi
13859
13860 # Display test results
13861
13862 WINBIND_TARGETS=""
13863 WINBIND_STARGETS=""
13864 WINBIND_LTARGETS=""
13865 WINBIND_PAM_PROGS=""
13866
13867 if test x"$HAVE_WINBIND" = x"yes"; then
13868         echo "$ac_t""yes" 1>&6
13869         cat >> confdefs.h <<\EOF
13870 #define WITH_WINBIND 1
13871 EOF
13872
13873
13874         WINBIND_TARGETS="bin/wbinfo"
13875         WINBIND_STARGETS="bin/winbindd"
13876         if test x"$BLDSHARED" = x"true"; then
13877                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13878                 if test x"$with_pam" = x"yes"; then
13879                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13880                 fi
13881         fi
13882 else
13883         echo "$ac_t""no$winbind_no_reason" 1>&6
13884 fi
13885
13886
13887 # Substitution time!
13888
13889
13890
13891
13892
13893
13894
13895
13896 # Solaris has some extra fields in struct passwd that need to be
13897 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
13898 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
13899 # this. 
13900
13901 #AC_CHECK_MEMBER(struct passwd.pw_comment,
13902 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
13903 #               [#include <pwd.h>])
13904
13905 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
13906 echo "configure:13907: checking whether struct passwd has pw_comment" >&5
13907 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
13908   echo $ac_n "(cached) $ac_c" 1>&6
13909 else
13910   
13911     cat > conftest.$ac_ext <<EOF
13912 #line 13913 "configure"
13913 #include "confdefs.h"
13914 #include <pwd.h>
13915 int main() {
13916 struct passwd p; p.pw_comment;
13917 ; return 0; }
13918 EOF
13919 if { (eval echo configure:13920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13920   rm -rf conftest*
13921   samba_cv_passwd_pw_comment=yes
13922 else
13923   echo "configure: failed program was:" >&5
13924   cat conftest.$ac_ext >&5
13925   rm -rf conftest*
13926   samba_cv_passwd_pw_comment=no
13927 fi
13928 rm -f conftest*
13929 fi
13930
13931 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
13932 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
13933    cat >> confdefs.h <<\EOF
13934 #define HAVE_PASSWD_PW_COMMENT 1
13935 EOF
13936
13937 fi
13938
13939 #AC_CHECK_MEMBER(struct passwd.pw_age,
13940 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
13941 #               [#include <pwd.h>])
13942
13943 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
13944 echo "configure:13945: checking whether struct passwd has pw_age" >&5
13945 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
13946   echo $ac_n "(cached) $ac_c" 1>&6
13947 else
13948   
13949     cat > conftest.$ac_ext <<EOF
13950 #line 13951 "configure"
13951 #include "confdefs.h"
13952 #include <pwd.h>
13953 int main() {
13954 struct passwd p; p.pw_age;
13955 ; return 0; }
13956 EOF
13957 if { (eval echo configure:13958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13958   rm -rf conftest*
13959   samba_cv_passwd_pw_age=yes
13960 else
13961   echo "configure: failed program was:" >&5
13962   cat conftest.$ac_ext >&5
13963   rm -rf conftest*
13964   samba_cv_passwd_pw_age=no
13965 fi
13966 rm -f conftest*
13967 fi
13968
13969 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
13970 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
13971    cat >> confdefs.h <<\EOF
13972 #define HAVE_PASSWD_PW_AGE 1
13973 EOF
13974
13975 fi
13976
13977 #################################################
13978 # Check to see if we should use the included popt 
13979
13980 # Check whether --with-included-popt or --without-included-popt was given.
13981 if test "${with_included_popt+set}" = set; then
13982   withval="$with_included_popt"
13983    
13984   case "$withval" in
13985         yes)
13986                 INCLUDED_POPT=yes
13987                 ;;
13988         no)
13989                 INCLUDED_POPT=no
13990                 ;;
13991   esac 
13992 fi
13993
13994 if test x"$INCLUDED_POPT" != x"yes"; then
13995     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13996 echo "configure:13997: checking for poptGetContext in -lpopt" >&5
13997 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13998 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13999   echo $ac_n "(cached) $ac_c" 1>&6
14000 else
14001   ac_save_LIBS="$LIBS"
14002 LIBS="-lpopt  $LIBS"
14003 cat > conftest.$ac_ext <<EOF
14004 #line 14005 "configure"
14005 #include "confdefs.h"
14006 /* Override any gcc2 internal prototype to avoid an error.  */
14007 /* We use char because int might match the return type of a gcc2
14008     builtin and then its argument prototype would still apply.  */
14009 char poptGetContext();
14010
14011 int main() {
14012 poptGetContext()
14013 ; return 0; }
14014 EOF
14015 if { (eval echo configure:14016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14016   rm -rf conftest*
14017   eval "ac_cv_lib_$ac_lib_var=yes"
14018 else
14019   echo "configure: failed program was:" >&5
14020   cat conftest.$ac_ext >&5
14021   rm -rf conftest*
14022   eval "ac_cv_lib_$ac_lib_var=no"
14023 fi
14024 rm -f conftest*
14025 LIBS="$ac_save_LIBS"
14026
14027 fi
14028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14029   echo "$ac_t""yes" 1>&6
14030   INCLUDED_POPT=no
14031 else
14032   echo "$ac_t""no" 1>&6
14033 INCLUDED_POPT=yes
14034 fi
14035
14036 fi
14037
14038 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
14039 echo "configure:14040: checking whether to use included popt" >&5
14040 if test x"$INCLUDED_POPT" = x"yes"; then
14041     echo "$ac_t""yes" 1>&6
14042     BUILD_POPT='$(POPT_OBJS)'
14043     FLAGS1="-I$srcdir/popt"
14044 else
14045     echo "$ac_t""no" 1>&6
14046     LIBS="$LIBS -lpopt"
14047 fi
14048
14049
14050
14051 #################################################
14052 # do extra things if we are running insure
14053
14054 if test "${ac_cv_prog_CC}" = "insure"; then
14055         CPPFLAGS="$CPPFLAGS -D__INSURE__"
14056 fi
14057
14058 #################################################
14059 # final configure stuff
14060
14061 echo $ac_n "checking configure summary""... $ac_c" 1>&6
14062 echo "configure:14063: checking configure summary" >&5
14063 if test "$cross_compiling" = yes; then
14064   echo "configure: warning: cannot run when cross-compiling" 1>&2
14065 else
14066   cat > conftest.$ac_ext <<EOF
14067 #line 14068 "configure"
14068 #include "confdefs.h"
14069 #include "${srcdir-.}/tests/summary.c"
14070 EOF
14071 if { (eval echo configure:14072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14072 then
14073   echo "$ac_t""yes" 1>&6
14074 else
14075   echo "configure: failed program was:" >&5
14076   cat conftest.$ac_ext >&5
14077   rm -fr conftest*
14078   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
14079 fi
14080 rm -fr conftest*
14081 fi
14082
14083
14084 builddir=`pwd`
14085
14086
14087 # I added make files that are outside /source directory.
14088 # I know this is not a good solution, will work out a better
14089 # solution soon.                        --simo
14090 trap '' 1 2 15
14091 cat > confcache <<\EOF
14092 # This file is a shell script that caches the results of configure
14093 # tests run on this system so they can be shared between configure
14094 # scripts and configure runs.  It is not useful on other systems.
14095 # If it contains results you don't want to keep, you may remove or edit it.
14096 #
14097 # By default, configure uses ./config.cache as the cache file,
14098 # creating it if it does not exist already.  You can give configure
14099 # the --cache-file=FILE option to use a different cache file; that is
14100 # what configure does when it calls configure scripts in
14101 # subdirectories, so they share the cache.
14102 # Giving --cache-file=/dev/null disables caching, for debugging configure.
14103 # config.status only pays attention to the cache file if you give it the
14104 # --recheck option to rerun configure.
14105 #
14106 EOF
14107 # The following way of writing the cache mishandles newlines in values,
14108 # but we know of no workaround that is simple, portable, and efficient.
14109 # So, don't put newlines in cache variables' values.
14110 # Ultrix sh set writes to stderr and can't be redirected directly,
14111 # and sets the high bit in the cache file unless we assign to the vars.
14112 (set) 2>&1 |
14113   case `(ac_space=' '; set | grep ac_space) 2>&1` in
14114   *ac_space=\ *)
14115     # `set' does not quote correctly, so add quotes (double-quote substitution
14116     # turns \\\\ into \\, and sed turns \\ into \).
14117     sed -n \
14118       -e "s/'/'\\\\''/g" \
14119       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
14120     ;;
14121   *)
14122     # `set' quotes correctly as required by POSIX, so do not add quotes.
14123     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
14124     ;;
14125   esac >> confcache
14126 if cmp -s $cache_file confcache; then
14127   :
14128 else
14129   if test -w $cache_file; then
14130     echo "updating cache $cache_file"
14131     cat confcache > $cache_file
14132   else
14133     echo "not updating unwritable cache $cache_file"
14134   fi
14135 fi
14136 rm -f confcache
14137
14138 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14139
14140 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14141 # Let make expand exec_prefix.
14142 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14143
14144 # Any assignment to VPATH causes Sun make to only execute
14145 # the first set of double-colon rules, so remove it if not needed.
14146 # If there is a colon in the path, we need to keep it.
14147 if test "x$srcdir" = x.; then
14148   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14149 fi
14150
14151 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14152
14153 DEFS=-DHAVE_CONFIG_H
14154
14155 # Without the "./", some shells look in PATH for config.status.
14156 : ${CONFIG_STATUS=./config.status}
14157
14158 echo creating $CONFIG_STATUS
14159 rm -f $CONFIG_STATUS
14160 cat > $CONFIG_STATUS <<EOF
14161 #! /bin/sh
14162 # Generated automatically by configure.
14163 # Run this file to recreate the current configuration.
14164 # This directory was configured as follows,
14165 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14166 #
14167 # $0 $ac_configure_args
14168 #
14169 # Compiler output produced by configure, useful for debugging
14170 # configure, is in ./config.log if it exists.
14171
14172 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14173 for ac_option
14174 do
14175   case "\$ac_option" in
14176   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14177     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14178     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14179   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14180     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14181     exit 0 ;;
14182   -help | --help | --hel | --he | --h)
14183     echo "\$ac_cs_usage"; exit 0 ;;
14184   *) echo "\$ac_cs_usage"; exit 1 ;;
14185   esac
14186 done
14187
14188 ac_given_srcdir=$srcdir
14189 ac_given_INSTALL="$INSTALL"
14190
14191 trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/VFS/block/Makefile ../examples/VFS/netatalk/Makefile ../examples/pdb/mysql/Makefile ../examples/pdb/xml/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14192 EOF
14193 cat >> $CONFIG_STATUS <<EOF
14194
14195 # Protect against being on the right side of a sed subst in config.status.
14196 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14197  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14198 $ac_vpsub
14199 $extrasub
14200 s%@SHELL@%$SHELL%g
14201 s%@CFLAGS@%$CFLAGS%g
14202 s%@CPPFLAGS@%$CPPFLAGS%g
14203 s%@CXXFLAGS@%$CXXFLAGS%g
14204 s%@FFLAGS@%$FFLAGS%g
14205 s%@DEFS@%$DEFS%g
14206 s%@LDFLAGS@%$LDFLAGS%g
14207 s%@LIBS@%$LIBS%g
14208 s%@exec_prefix@%$exec_prefix%g
14209 s%@prefix@%$prefix%g
14210 s%@program_transform_name@%$program_transform_name%g
14211 s%@bindir@%$bindir%g
14212 s%@sbindir@%$sbindir%g
14213 s%@libexecdir@%$libexecdir%g
14214 s%@datadir@%$datadir%g
14215 s%@sysconfdir@%$sysconfdir%g
14216 s%@sharedstatedir@%$sharedstatedir%g
14217 s%@localstatedir@%$localstatedir%g
14218 s%@libdir@%$libdir%g
14219 s%@includedir@%$includedir%g
14220 s%@oldincludedir@%$oldincludedir%g
14221 s%@infodir@%$infodir%g
14222 s%@mandir@%$mandir%g
14223 s%@configdir@%$configdir%g
14224 s%@lockdir@%$lockdir%g
14225 s%@piddir@%$piddir%g
14226 s%@logfilebase@%$logfilebase%g
14227 s%@privatedir@%$privatedir%g
14228 s%@swatdir@%$swatdir%g
14229 s%@RUNPROG@%$RUNPROG%g
14230 s%@MPROGS@%$MPROGS%g
14231 s%@LDSHFLAGS@%$LDSHFLAGS%g
14232 s%@SONAMEFLAG@%$SONAMEFLAG%g
14233 s%@SHLD@%$SHLD%g
14234 s%@HOST_OS@%$HOST_OS%g
14235 s%@PAM_MOD@%$PAM_MOD%g
14236 s%@WRAP@%$WRAP%g
14237 s%@WRAP32@%$WRAP32%g
14238 s%@WRAPPROG@%$WRAPPROG%g
14239 s%@PICFLAG@%$PICFLAG%g
14240 s%@PICSUFFIX@%$PICSUFFIX%g
14241 s%@POBAD_CC@%$POBAD_CC%g
14242 s%@SHLIBEXT@%$SHLIBEXT%g
14243 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14244 s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g
14245 s%@PRINTLIBS@%$PRINTLIBS%g
14246 s%@CC@%$CC%g
14247 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14248 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14249 s%@INSTALL_DATA@%$INSTALL_DATA%g
14250 s%@AWK@%$AWK%g
14251 s%@BROKEN_CC@%$BROKEN_CC%g
14252 s%@host@%$host%g
14253 s%@host_alias@%$host_alias%g
14254 s%@host_cpu@%$host_cpu%g
14255 s%@host_vendor@%$host_vendor%g
14256 s%@host_os@%$host_os%g
14257 s%@target@%$target%g
14258 s%@target_alias@%$target_alias%g
14259 s%@target_cpu@%$target_cpu%g
14260 s%@target_vendor@%$target_vendor%g
14261 s%@target_os@%$target_os%g
14262 s%@build@%$build%g
14263 s%@build_alias@%$build_alias%g
14264 s%@build_cpu@%$build_cpu%g
14265 s%@build_vendor@%$build_vendor%g
14266 s%@build_os@%$build_os%g
14267 s%@CPP@%$CPP%g
14268 s%@CUPS_CONFIG@%$CUPS_CONFIG%g
14269 s%@LIBOBJS@%$LIBOBJS%g
14270 s%@TERMLIBS@%$TERMLIBS%g
14271 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14272 s%@ROFF@%$ROFF%g
14273 s%@DYNEXP@%$DYNEXP%g
14274 s%@QUOTAOBJS@%$QUOTAOBJS%g
14275 s%@manlangs@%$manlangs%g
14276 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14277 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14278 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14279 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
14280 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
14281 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
14282 s%@BUILD_POPT@%$BUILD_POPT%g
14283 s%@FLAGS1@%$FLAGS1%g
14284 s%@builddir@%$builddir%g
14285
14286 CEOF
14287 EOF
14288
14289 cat >> $CONFIG_STATUS <<\EOF
14290
14291 # Split the substitutions into bite-sized pieces for seds with
14292 # small command number limits, like on Digital OSF/1 and HP-UX.
14293 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14294 ac_file=1 # Number of current file.
14295 ac_beg=1 # First line for current file.
14296 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14297 ac_more_lines=:
14298 ac_sed_cmds=""
14299 while $ac_more_lines; do
14300   if test $ac_beg -gt 1; then
14301     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14302   else
14303     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14304   fi
14305   if test ! -s conftest.s$ac_file; then
14306     ac_more_lines=false
14307     rm -f conftest.s$ac_file
14308   else
14309     if test -z "$ac_sed_cmds"; then
14310       ac_sed_cmds="sed -f conftest.s$ac_file"
14311     else
14312       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14313     fi
14314     ac_file=`expr $ac_file + 1`
14315     ac_beg=$ac_end
14316     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14317   fi
14318 done
14319 if test -z "$ac_sed_cmds"; then
14320   ac_sed_cmds=cat
14321 fi
14322 EOF
14323
14324 cat >> $CONFIG_STATUS <<EOF
14325
14326 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/VFS/block/Makefile ../examples/VFS/netatalk/Makefile ../examples/pdb/mysql/Makefile ../examples/pdb/xml/Makefile"}
14327 EOF
14328 cat >> $CONFIG_STATUS <<\EOF
14329 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14330   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14331   case "$ac_file" in
14332   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14333        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14334   *) ac_file_in="${ac_file}.in" ;;
14335   esac
14336
14337   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14338
14339   # Remove last slash and all that follows it.  Not all systems have dirname.
14340   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14341   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14342     # The file is in a subdirectory.
14343     test ! -d "$ac_dir" && mkdir "$ac_dir"
14344     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14345     # A "../" for each directory in $ac_dir_suffix.
14346     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14347   else
14348     ac_dir_suffix= ac_dots=
14349   fi
14350
14351   case "$ac_given_srcdir" in
14352   .)  srcdir=.
14353       if test -z "$ac_dots"; then top_srcdir=.
14354       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14355   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14356   *) # Relative path.
14357     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14358     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14359   esac
14360
14361   case "$ac_given_INSTALL" in
14362   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14363   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14364   esac
14365
14366   echo creating "$ac_file"
14367   rm -f "$ac_file"
14368   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14369   case "$ac_file" in
14370   *Makefile*) ac_comsub="1i\\
14371 # $configure_input" ;;
14372   *) ac_comsub= ;;
14373   esac
14374
14375   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14376   sed -e "$ac_comsub
14377 s%@configure_input@%$configure_input%g
14378 s%@srcdir@%$srcdir%g
14379 s%@top_srcdir@%$top_srcdir%g
14380 s%@INSTALL@%$INSTALL%g
14381 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14382 fi; done
14383 rm -f conftest.s*
14384
14385 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14386 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14387 #
14388 # ac_d sets the value in "#define NAME VALUE" lines.
14389 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14390 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14391 ac_dC='\3'
14392 ac_dD='%g'
14393 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14394 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14395 ac_uB='\([      ]\)%\1#\2define\3'
14396 ac_uC=' '
14397 ac_uD='\4%g'
14398 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14399 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14400 ac_eB='$%\1#\2define\3'
14401 ac_eC=' '
14402 ac_eD='%g'
14403
14404 if test "${CONFIG_HEADERS+set}" != set; then
14405 EOF
14406 cat >> $CONFIG_STATUS <<EOF
14407   CONFIG_HEADERS="include/config.h"
14408 EOF
14409 cat >> $CONFIG_STATUS <<\EOF
14410 fi
14411 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14412   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14413   case "$ac_file" in
14414   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14415        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14416   *) ac_file_in="${ac_file}.in" ;;
14417   esac
14418
14419   echo creating $ac_file
14420
14421   rm -f conftest.frag conftest.in conftest.out
14422   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14423   cat $ac_file_inputs > conftest.in
14424
14425 EOF
14426
14427 # Transform confdefs.h into a sed script conftest.vals that substitutes
14428 # the proper values into config.h.in to produce config.h.  And first:
14429 # Protect against being on the right side of a sed subst in config.status.
14430 # Protect against being in an unquoted here document in config.status.
14431 rm -f conftest.vals
14432 cat > conftest.hdr <<\EOF
14433 s/[\\&%]/\\&/g
14434 s%[\\$`]%\\&%g
14435 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14436 s%ac_d%ac_u%gp
14437 s%ac_u%ac_e%gp
14438 EOF
14439 sed -n -f conftest.hdr confdefs.h > conftest.vals
14440 rm -f conftest.hdr
14441
14442 # This sed command replaces #undef with comments.  This is necessary, for
14443 # example, in the case of _POSIX_SOURCE, which is predefined and required
14444 # on some systems where configure will not decide to define it.
14445 cat >> conftest.vals <<\EOF
14446 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14447 EOF
14448
14449 # Break up conftest.vals because some shells have a limit on
14450 # the size of here documents, and old seds have small limits too.
14451
14452 rm -f conftest.tail
14453 while :
14454 do
14455   ac_lines=`grep -c . conftest.vals`
14456   # grep -c gives empty output for an empty file on some AIX systems.
14457   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14458   # Write a limited-size here document to conftest.frag.
14459   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14460   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14461   echo 'CEOF
14462   sed -f conftest.frag conftest.in > conftest.out
14463   rm -f conftest.in
14464   mv conftest.out conftest.in
14465 ' >> $CONFIG_STATUS
14466   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14467   rm -f conftest.vals
14468   mv conftest.tail conftest.vals
14469 done
14470 rm -f conftest.vals
14471
14472 cat >> $CONFIG_STATUS <<\EOF
14473   rm -f conftest.frag conftest.h
14474   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14475   cat conftest.in >> conftest.h
14476   rm -f conftest.in
14477   if cmp -s $ac_file conftest.h 2>/dev/null; then
14478     echo "$ac_file is unchanged"
14479     rm -f conftest.h
14480   else
14481     # Remove last slash and all that follows it.  Not all systems have dirname.
14482       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14483       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14484       # The file is in a subdirectory.
14485       test ! -d "$ac_dir" && mkdir "$ac_dir"
14486     fi
14487     rm -f $ac_file
14488     mv conftest.h $ac_file
14489   fi
14490 fi; done
14491
14492 EOF
14493 cat >> $CONFIG_STATUS <<EOF
14494
14495 EOF
14496 cat >> $CONFIG_STATUS <<\EOF
14497
14498 exit 0
14499 EOF
14500 chmod +x $CONFIG_STATUS
14501 rm -fr confdefs* $ac_clean_files
14502 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14503
14504
14505 #################################################
14506 # Print very concise instructions on building/use
14507 if test "x$enable_dmalloc" = xyes
14508 then
14509         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14510         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14511 fi