Merge tpot's Python patch. ./configure now writes to the Python
[samba.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --with-fhs              Use FHS-compliant paths (default=no)"
17 ac_help="$ac_help
18   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
19 ac_help="$ac_help
20   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
21 ac_help="$ac_help
22   --with-piddir=DIR       Where to put pid files ($ac_default_prefix/var/locks)"
23 ac_help="$ac_help
24   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
25 ac_help="$ac_help
26   --with-configdir=DIR    Where to put configuration files (\$libdir)"
27 ac_help="$ac_help
28   --with-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 mawk gawk 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 #include <sys/types.h>
2914 main()
2915 {
2916   FILE *f=fopen("conftestval", "w");
2917   if (!f) exit(1);
2918   fprintf(f, "%d\n", sizeof(int));
2919   exit(0);
2920 }
2921 EOF
2922 if { (eval echo configure:2923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2923 then
2924   ac_cv_sizeof_int=`cat conftestval`
2925 else
2926   echo "configure: failed program was:" >&5
2927   cat conftest.$ac_ext >&5
2928   rm -fr conftest*
2929   ac_cv_sizeof_int=0
2930 fi
2931 rm -fr conftest*
2932 fi
2933
2934 fi
2935 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2936 cat >> confdefs.h <<EOF
2937 #define SIZEOF_INT $ac_cv_sizeof_int
2938 EOF
2939
2940
2941 echo $ac_n "checking size of long""... $ac_c" 1>&6
2942 echo "configure:2943: checking size of long" >&5
2943 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2944   echo $ac_n "(cached) $ac_c" 1>&6
2945 else
2946   if test "$cross_compiling" = yes; then
2947   ac_cv_sizeof_long=cross
2948 else
2949   cat > conftest.$ac_ext <<EOF
2950 #line 2951 "configure"
2951 #include "confdefs.h"
2952 #include <stdio.h>
2953 #include <sys/types.h>
2954 main()
2955 {
2956   FILE *f=fopen("conftestval", "w");
2957   if (!f) exit(1);
2958   fprintf(f, "%d\n", sizeof(long));
2959   exit(0);
2960 }
2961 EOF
2962 if { (eval echo configure:2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2963 then
2964   ac_cv_sizeof_long=`cat conftestval`
2965 else
2966   echo "configure: failed program was:" >&5
2967   cat conftest.$ac_ext >&5
2968   rm -fr conftest*
2969   ac_cv_sizeof_long=0
2970 fi
2971 rm -fr conftest*
2972 fi
2973
2974 fi
2975 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2976 cat >> confdefs.h <<EOF
2977 #define SIZEOF_LONG $ac_cv_sizeof_long
2978 EOF
2979
2980
2981 echo $ac_n "checking size of short""... $ac_c" 1>&6
2982 echo "configure:2983: checking size of short" >&5
2983 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2984   echo $ac_n "(cached) $ac_c" 1>&6
2985 else
2986   if test "$cross_compiling" = yes; then
2987   ac_cv_sizeof_short=cross
2988 else
2989   cat > conftest.$ac_ext <<EOF
2990 #line 2991 "configure"
2991 #include "confdefs.h"
2992 #include <stdio.h>
2993 #include <sys/types.h>
2994 main()
2995 {
2996   FILE *f=fopen("conftestval", "w");
2997   if (!f) exit(1);
2998   fprintf(f, "%d\n", sizeof(short));
2999   exit(0);
3000 }
3001 EOF
3002 if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3003 then
3004   ac_cv_sizeof_short=`cat conftestval`
3005 else
3006   echo "configure: failed program was:" >&5
3007   cat conftest.$ac_ext >&5
3008   rm -fr conftest*
3009   ac_cv_sizeof_short=0
3010 fi
3011 rm -fr conftest*
3012 fi
3013
3014 fi
3015 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3016 cat >> confdefs.h <<EOF
3017 #define SIZEOF_SHORT $ac_cv_sizeof_short
3018 EOF
3019
3020
3021
3022 echo $ac_n "checking for working const""... $ac_c" 1>&6
3023 echo "configure:3024: checking for working const" >&5
3024 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3025   echo $ac_n "(cached) $ac_c" 1>&6
3026 else
3027   cat > conftest.$ac_ext <<EOF
3028 #line 3029 "configure"
3029 #include "confdefs.h"
3030
3031 int main() {
3032
3033 /* Ultrix mips cc rejects this.  */
3034 typedef int charset[2]; const charset x;
3035 /* SunOS 4.1.1 cc rejects this.  */
3036 char const *const *ccp;
3037 char **p;
3038 /* NEC SVR4.0.2 mips cc rejects this.  */
3039 struct point {int x, y;};
3040 static struct point const zero = {0,0};
3041 /* AIX XL C 1.02.0.0 rejects this.
3042    It does not let you subtract one const X* pointer from another in an arm
3043    of an if-expression whose if-part is not a constant expression */
3044 const char *g = "string";
3045 ccp = &g + (g ? g-g : 0);
3046 /* HPUX 7.0 cc rejects these. */
3047 ++ccp;
3048 p = (char**) ccp;
3049 ccp = (char const *const *) p;
3050 { /* SCO 3.2v4 cc rejects this.  */
3051   char *t;
3052   char const *s = 0 ? (char *) 0 : (char const *) 0;
3053
3054   *t++ = 0;
3055 }
3056 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3057   int x[] = {25, 17};
3058   const int *foo = &x[0];
3059   ++foo;
3060 }
3061 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3062   typedef const int *iptr;
3063   iptr p = 0;
3064   ++p;
3065 }
3066 { /* AIX XL C 1.02.0.0 rejects this saying
3067      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3068   struct s { int j; const int *ap[3]; };
3069   struct s *b; b->j = 5;
3070 }
3071 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3072   const int foo = 10;
3073 }
3074
3075 ; return 0; }
3076 EOF
3077 if { (eval echo configure:3078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3078   rm -rf conftest*
3079   ac_cv_c_const=yes
3080 else
3081   echo "configure: failed program was:" >&5
3082   cat conftest.$ac_ext >&5
3083   rm -rf conftest*
3084   ac_cv_c_const=no
3085 fi
3086 rm -f conftest*
3087 fi
3088
3089 echo "$ac_t""$ac_cv_c_const" 1>&6
3090 if test $ac_cv_c_const = no; then
3091   cat >> confdefs.h <<\EOF
3092 #define const 
3093 EOF
3094
3095 fi
3096
3097 echo $ac_n "checking for inline""... $ac_c" 1>&6
3098 echo "configure:3099: checking for inline" >&5
3099 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3100   echo $ac_n "(cached) $ac_c" 1>&6
3101 else
3102   ac_cv_c_inline=no
3103 for ac_kw in inline __inline__ __inline; do
3104   cat > conftest.$ac_ext <<EOF
3105 #line 3106 "configure"
3106 #include "confdefs.h"
3107
3108 int main() {
3109 } $ac_kw foo() {
3110 ; return 0; }
3111 EOF
3112 if { (eval echo configure:3113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3113   rm -rf conftest*
3114   ac_cv_c_inline=$ac_kw; break
3115 else
3116   echo "configure: failed program was:" >&5
3117   cat conftest.$ac_ext >&5
3118 fi
3119 rm -f conftest*
3120 done
3121
3122 fi
3123
3124 echo "$ac_t""$ac_cv_c_inline" 1>&6
3125 case "$ac_cv_c_inline" in
3126   inline | yes) ;;
3127   no) cat >> confdefs.h <<\EOF
3128 #define inline 
3129 EOF
3130  ;;
3131   *)  cat >> confdefs.h <<EOF
3132 #define inline $ac_cv_c_inline
3133 EOF
3134  ;;
3135 esac
3136
3137 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3138 echo "configure:3139: checking whether byte ordering is bigendian" >&5
3139 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3140   echo $ac_n "(cached) $ac_c" 1>&6
3141 else
3142   ac_cv_c_bigendian=unknown
3143 # See if sys/param.h defines the BYTE_ORDER macro.
3144 cat > conftest.$ac_ext <<EOF
3145 #line 3146 "configure"
3146 #include "confdefs.h"
3147 #include <sys/types.h>
3148 #include <sys/param.h>
3149 int main() {
3150
3151 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3152  bogus endian macros
3153 #endif
3154 ; return 0; }
3155 EOF
3156 if { (eval echo configure:3157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3157   rm -rf conftest*
3158   # It does; now see whether it defined to BIG_ENDIAN or not.
3159 cat > conftest.$ac_ext <<EOF
3160 #line 3161 "configure"
3161 #include "confdefs.h"
3162 #include <sys/types.h>
3163 #include <sys/param.h>
3164 int main() {
3165
3166 #if BYTE_ORDER != BIG_ENDIAN
3167  not big endian
3168 #endif
3169 ; return 0; }
3170 EOF
3171 if { (eval echo configure:3172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3172   rm -rf conftest*
3173   ac_cv_c_bigendian=yes
3174 else
3175   echo "configure: failed program was:" >&5
3176   cat conftest.$ac_ext >&5
3177   rm -rf conftest*
3178   ac_cv_c_bigendian=no
3179 fi
3180 rm -f conftest*
3181 else
3182   echo "configure: failed program was:" >&5
3183   cat conftest.$ac_ext >&5
3184 fi
3185 rm -f conftest*
3186 if test $ac_cv_c_bigendian = unknown; then
3187 if test "$cross_compiling" = yes; then
3188     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3189 else
3190   cat > conftest.$ac_ext <<EOF
3191 #line 3192 "configure"
3192 #include "confdefs.h"
3193 main () {
3194   /* Are we little or big endian?  From Harbison&Steele.  */
3195   union
3196   {
3197     long l;
3198     char c[sizeof (long)];
3199   } u;
3200   u.l = 1;
3201   exit (u.c[sizeof (long) - 1] == 1);
3202 }
3203 EOF
3204 if { (eval echo configure:3205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3205 then
3206   ac_cv_c_bigendian=no
3207 else
3208   echo "configure: failed program was:" >&5
3209   cat conftest.$ac_ext >&5
3210   rm -fr conftest*
3211   ac_cv_c_bigendian=yes
3212 fi
3213 rm -fr conftest*
3214 fi
3215
3216 fi
3217 fi
3218
3219 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3220 if test $ac_cv_c_bigendian = yes; then
3221   cat >> confdefs.h <<\EOF
3222 #define WORDS_BIGENDIAN 1
3223 EOF
3224
3225 fi
3226
3227 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3228 echo "configure:3229: checking whether char is unsigned" >&5
3229 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3230   echo $ac_n "(cached) $ac_c" 1>&6
3231 else
3232   if test "$GCC" = yes; then
3233   # GCC predefines this symbol on systems where it applies.
3234 cat > conftest.$ac_ext <<EOF
3235 #line 3236 "configure"
3236 #include "confdefs.h"
3237 #ifdef __CHAR_UNSIGNED__
3238   yes
3239 #endif
3240
3241 EOF
3242 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3243   egrep "yes" >/dev/null 2>&1; then
3244   rm -rf conftest*
3245   ac_cv_c_char_unsigned=yes
3246 else
3247   rm -rf conftest*
3248   ac_cv_c_char_unsigned=no
3249 fi
3250 rm -f conftest*
3251
3252 else
3253 if test "$cross_compiling" = yes; then
3254     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3255 else
3256   cat > conftest.$ac_ext <<EOF
3257 #line 3258 "configure"
3258 #include "confdefs.h"
3259 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3260 #if !defined(__STDC__) || __STDC__ != 1
3261 #define volatile
3262 #endif
3263 main() {
3264   volatile char c = 255; exit(c < 0);
3265 }
3266 EOF
3267 if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3268 then
3269   ac_cv_c_char_unsigned=yes
3270 else
3271   echo "configure: failed program was:" >&5
3272   cat conftest.$ac_ext >&5
3273   rm -fr conftest*
3274   ac_cv_c_char_unsigned=no
3275 fi
3276 rm -fr conftest*
3277 fi
3278
3279 fi
3280 fi
3281
3282 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3283 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3284   cat >> confdefs.h <<\EOF
3285 #define __CHAR_UNSIGNED__ 1
3286 EOF
3287
3288 fi
3289
3290
3291 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3292 echo "configure:3293: checking return type of signal handlers" >&5
3293 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3294   echo $ac_n "(cached) $ac_c" 1>&6
3295 else
3296   cat > conftest.$ac_ext <<EOF
3297 #line 3298 "configure"
3298 #include "confdefs.h"
3299 #include <sys/types.h>
3300 #include <signal.h>
3301 #ifdef signal
3302 #undef signal
3303 #endif
3304 #ifdef __cplusplus
3305 extern "C" void (*signal (int, void (*)(int)))(int);
3306 #else
3307 void (*signal ()) ();
3308 #endif
3309
3310 int main() {
3311 int i;
3312 ; return 0; }
3313 EOF
3314 if { (eval echo configure:3315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3315   rm -rf conftest*
3316   ac_cv_type_signal=void
3317 else
3318   echo "configure: failed program was:" >&5
3319   cat conftest.$ac_ext >&5
3320   rm -rf conftest*
3321   ac_cv_type_signal=int
3322 fi
3323 rm -f conftest*
3324 fi
3325
3326 echo "$ac_t""$ac_cv_type_signal" 1>&6
3327 cat >> confdefs.h <<EOF
3328 #define RETSIGTYPE $ac_cv_type_signal
3329 EOF
3330
3331
3332 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3333 echo "configure:3334: checking for uid_t in sys/types.h" >&5
3334 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3335   echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337   cat > conftest.$ac_ext <<EOF
3338 #line 3339 "configure"
3339 #include "confdefs.h"
3340 #include <sys/types.h>
3341 EOF
3342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3343   egrep "uid_t" >/dev/null 2>&1; then
3344   rm -rf conftest*
3345   ac_cv_type_uid_t=yes
3346 else
3347   rm -rf conftest*
3348   ac_cv_type_uid_t=no
3349 fi
3350 rm -f conftest*
3351
3352 fi
3353
3354 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3355 if test $ac_cv_type_uid_t = no; then
3356   cat >> confdefs.h <<\EOF
3357 #define uid_t int
3358 EOF
3359
3360   cat >> confdefs.h <<\EOF
3361 #define gid_t int
3362 EOF
3363
3364 fi
3365
3366 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3367 echo "configure:3368: checking for mode_t" >&5
3368 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3369   echo $ac_n "(cached) $ac_c" 1>&6
3370 else
3371   cat > conftest.$ac_ext <<EOF
3372 #line 3373 "configure"
3373 #include "confdefs.h"
3374 #include <sys/types.h>
3375 #if STDC_HEADERS
3376 #include <stdlib.h>
3377 #include <stddef.h>
3378 #endif
3379 EOF
3380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3381   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3382   rm -rf conftest*
3383   ac_cv_type_mode_t=yes
3384 else
3385   rm -rf conftest*
3386   ac_cv_type_mode_t=no
3387 fi
3388 rm -f conftest*
3389
3390 fi
3391 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3392 if test $ac_cv_type_mode_t = no; then
3393   cat >> confdefs.h <<\EOF
3394 #define mode_t int
3395 EOF
3396
3397 fi
3398
3399 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3400 echo "configure:3401: checking for off_t" >&5
3401 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3402   echo $ac_n "(cached) $ac_c" 1>&6
3403 else
3404   cat > conftest.$ac_ext <<EOF
3405 #line 3406 "configure"
3406 #include "confdefs.h"
3407 #include <sys/types.h>
3408 #if STDC_HEADERS
3409 #include <stdlib.h>
3410 #include <stddef.h>
3411 #endif
3412 EOF
3413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3414   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3415   rm -rf conftest*
3416   ac_cv_type_off_t=yes
3417 else
3418   rm -rf conftest*
3419   ac_cv_type_off_t=no
3420 fi
3421 rm -f conftest*
3422
3423 fi
3424 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3425 if test $ac_cv_type_off_t = no; then
3426   cat >> confdefs.h <<\EOF
3427 #define off_t long
3428 EOF
3429
3430 fi
3431
3432 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3433 echo "configure:3434: checking for size_t" >&5
3434 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3435   echo $ac_n "(cached) $ac_c" 1>&6
3436 else
3437   cat > conftest.$ac_ext <<EOF
3438 #line 3439 "configure"
3439 #include "confdefs.h"
3440 #include <sys/types.h>
3441 #if STDC_HEADERS
3442 #include <stdlib.h>
3443 #include <stddef.h>
3444 #endif
3445 EOF
3446 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3447   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3448   rm -rf conftest*
3449   ac_cv_type_size_t=yes
3450 else
3451   rm -rf conftest*
3452   ac_cv_type_size_t=no
3453 fi
3454 rm -f conftest*
3455
3456 fi
3457 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3458 if test $ac_cv_type_size_t = no; then
3459   cat >> confdefs.h <<\EOF
3460 #define size_t unsigned
3461 EOF
3462
3463 fi
3464
3465 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3466 echo "configure:3467: checking for pid_t" >&5
3467 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3468   echo $ac_n "(cached) $ac_c" 1>&6
3469 else
3470   cat > conftest.$ac_ext <<EOF
3471 #line 3472 "configure"
3472 #include "confdefs.h"
3473 #include <sys/types.h>
3474 #if STDC_HEADERS
3475 #include <stdlib.h>
3476 #include <stddef.h>
3477 #endif
3478 EOF
3479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3480   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3481   rm -rf conftest*
3482   ac_cv_type_pid_t=yes
3483 else
3484   rm -rf conftest*
3485   ac_cv_type_pid_t=no
3486 fi
3487 rm -f conftest*
3488
3489 fi
3490 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3491 if test $ac_cv_type_pid_t = no; then
3492   cat >> confdefs.h <<\EOF
3493 #define pid_t int
3494 EOF
3495
3496 fi
3497
3498 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3499 echo "configure:3500: checking for st_rdev in struct stat" >&5
3500 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3501   echo $ac_n "(cached) $ac_c" 1>&6
3502 else
3503   cat > conftest.$ac_ext <<EOF
3504 #line 3505 "configure"
3505 #include "confdefs.h"
3506 #include <sys/types.h>
3507 #include <sys/stat.h>
3508 int main() {
3509 struct stat s; s.st_rdev;
3510 ; return 0; }
3511 EOF
3512 if { (eval echo configure:3513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3513   rm -rf conftest*
3514   ac_cv_struct_st_rdev=yes
3515 else
3516   echo "configure: failed program was:" >&5
3517   cat conftest.$ac_ext >&5
3518   rm -rf conftest*
3519   ac_cv_struct_st_rdev=no
3520 fi
3521 rm -f conftest*
3522 fi
3523
3524 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3525 if test $ac_cv_struct_st_rdev = yes; then
3526   cat >> confdefs.h <<\EOF
3527 #define HAVE_ST_RDEV 1
3528 EOF
3529
3530 fi
3531
3532 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3533 echo "configure:3534: checking for d_off in dirent" >&5
3534 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3535   echo $ac_n "(cached) $ac_c" 1>&6
3536 else
3537   cat > conftest.$ac_ext <<EOF
3538 #line 3539 "configure"
3539 #include "confdefs.h"
3540
3541 #include <unistd.h>
3542 #include <sys/types.h>
3543 #include <dirent.h>
3544 int main() {
3545 struct dirent d; d.d_off;
3546 ; return 0; }
3547 EOF
3548 if { (eval echo configure:3549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3549   rm -rf conftest*
3550   ac_cv_dirent_d_off=yes
3551 else
3552   echo "configure: failed program was:" >&5
3553   cat conftest.$ac_ext >&5
3554   rm -rf conftest*
3555   ac_cv_dirent_d_off=no
3556 fi
3557 rm -f conftest*
3558 fi
3559
3560 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3561 if test $ac_cv_dirent_d_off = yes; then
3562   cat >> confdefs.h <<\EOF
3563 #define HAVE_DIRENT_D_OFF 1
3564 EOF
3565
3566 fi
3567
3568 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3569 echo "configure:3570: checking for ino_t" >&5
3570 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3571   echo $ac_n "(cached) $ac_c" 1>&6
3572 else
3573   cat > conftest.$ac_ext <<EOF
3574 #line 3575 "configure"
3575 #include "confdefs.h"
3576 #include <sys/types.h>
3577 #if STDC_HEADERS
3578 #include <stdlib.h>
3579 #include <stddef.h>
3580 #endif
3581 EOF
3582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3583   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3584   rm -rf conftest*
3585   ac_cv_type_ino_t=yes
3586 else
3587   rm -rf conftest*
3588   ac_cv_type_ino_t=no
3589 fi
3590 rm -f conftest*
3591
3592 fi
3593 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3594 if test $ac_cv_type_ino_t = no; then
3595   cat >> confdefs.h <<\EOF
3596 #define ino_t unsigned
3597 EOF
3598
3599 fi
3600
3601 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3602 echo "configure:3603: checking for loff_t" >&5
3603 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3604   echo $ac_n "(cached) $ac_c" 1>&6
3605 else
3606   cat > conftest.$ac_ext <<EOF
3607 #line 3608 "configure"
3608 #include "confdefs.h"
3609 #include <sys/types.h>
3610 #if STDC_HEADERS
3611 #include <stdlib.h>
3612 #include <stddef.h>
3613 #endif
3614 EOF
3615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3616   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3617   rm -rf conftest*
3618   ac_cv_type_loff_t=yes
3619 else
3620   rm -rf conftest*
3621   ac_cv_type_loff_t=no
3622 fi
3623 rm -f conftest*
3624
3625 fi
3626 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3627 if test $ac_cv_type_loff_t = no; then
3628   cat >> confdefs.h <<\EOF
3629 #define loff_t off_t
3630 EOF
3631
3632 fi
3633
3634 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3635 echo "configure:3636: checking for offset_t" >&5
3636 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3637   echo $ac_n "(cached) $ac_c" 1>&6
3638 else
3639   cat > conftest.$ac_ext <<EOF
3640 #line 3641 "configure"
3641 #include "confdefs.h"
3642 #include <sys/types.h>
3643 #if STDC_HEADERS
3644 #include <stdlib.h>
3645 #include <stddef.h>
3646 #endif
3647 EOF
3648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3649   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3650   rm -rf conftest*
3651   ac_cv_type_offset_t=yes
3652 else
3653   rm -rf conftest*
3654   ac_cv_type_offset_t=no
3655 fi
3656 rm -f conftest*
3657
3658 fi
3659 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3660 if test $ac_cv_type_offset_t = no; then
3661   cat >> confdefs.h <<\EOF
3662 #define offset_t loff_t
3663 EOF
3664
3665 fi
3666
3667 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3668 echo "configure:3669: checking for ssize_t" >&5
3669 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3670   echo $ac_n "(cached) $ac_c" 1>&6
3671 else
3672   cat > conftest.$ac_ext <<EOF
3673 #line 3674 "configure"
3674 #include "confdefs.h"
3675 #include <sys/types.h>
3676 #if STDC_HEADERS
3677 #include <stdlib.h>
3678 #include <stddef.h>
3679 #endif
3680 EOF
3681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3682   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3683   rm -rf conftest*
3684   ac_cv_type_ssize_t=yes
3685 else
3686   rm -rf conftest*
3687   ac_cv_type_ssize_t=no
3688 fi
3689 rm -f conftest*
3690
3691 fi
3692 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3693 if test $ac_cv_type_ssize_t = no; then
3694   cat >> confdefs.h <<\EOF
3695 #define ssize_t int
3696 EOF
3697
3698 fi
3699
3700 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3701 echo "configure:3702: checking for wchar_t" >&5
3702 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3703   echo $ac_n "(cached) $ac_c" 1>&6
3704 else
3705   cat > conftest.$ac_ext <<EOF
3706 #line 3707 "configure"
3707 #include "confdefs.h"
3708 #include <sys/types.h>
3709 #if STDC_HEADERS
3710 #include <stdlib.h>
3711 #include <stddef.h>
3712 #endif
3713 EOF
3714 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3715   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3716   rm -rf conftest*
3717   ac_cv_type_wchar_t=yes
3718 else
3719   rm -rf conftest*
3720   ac_cv_type_wchar_t=no
3721 fi
3722 rm -f conftest*
3723
3724 fi
3725 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3726 if test $ac_cv_type_wchar_t = no; then
3727   cat >> confdefs.h <<\EOF
3728 #define wchar_t unsigned short
3729 EOF
3730
3731 fi
3732
3733
3734 ############################################
3735 # for cups support we need libcups, and a handful of header files
3736
3737 # Check whether --enable-cups or --disable-cups was given.
3738 if test "${enable_cups+set}" = set; then
3739   enableval="$enable_cups"
3740   :
3741 fi
3742
3743
3744 if test x$enable_cups != xno; then
3745         # Extract the first word of "cups-config", so it can be a program name with args.
3746 set dummy cups-config; ac_word=$2
3747 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3748 echo "configure:3749: checking for $ac_word" >&5
3749 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
3750   echo $ac_n "(cached) $ac_c" 1>&6
3751 else
3752   case "$CUPS_CONFIG" in
3753   /*)
3754   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
3755   ;;
3756   ?:/*)                  
3757   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path.
3758   ;;
3759   *)
3760   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3761   ac_dummy="$PATH"
3762   for ac_dir in $ac_dummy; do 
3763     test -z "$ac_dir" && ac_dir=.
3764     if test -f $ac_dir/$ac_word; then
3765       ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word"
3766       break
3767     fi
3768   done
3769   IFS="$ac_save_ifs"
3770   ;;
3771 esac
3772 fi
3773 CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG"
3774 if test -n "$CUPS_CONFIG"; then
3775   echo "$ac_t""$CUPS_CONFIG" 1>&6
3776 else
3777   echo "$ac_t""no" 1>&6
3778 fi
3779
3780
3781         if test "x$CUPS_CONFIG" != x; then
3782                         cat >> confdefs.h <<\EOF
3783 #define HAVE_CUPS 1
3784 EOF
3785
3786                 CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
3787                 LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
3788                 PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`"
3789         fi
3790 fi
3791
3792 ############################################
3793 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3794 for ac_func in dlopen
3795 do
3796 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3797 echo "configure:3798: checking for $ac_func" >&5
3798 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3799   echo $ac_n "(cached) $ac_c" 1>&6
3800 else
3801   cat > conftest.$ac_ext <<EOF
3802 #line 3803 "configure"
3803 #include "confdefs.h"
3804 /* System header to define __stub macros and hopefully few prototypes,
3805     which can conflict with char $ac_func(); below.  */
3806 #include <assert.h>
3807 /* Override any gcc2 internal prototype to avoid an error.  */
3808 /* We use char because int might match the return type of a gcc2
3809     builtin and then its argument prototype would still apply.  */
3810 char $ac_func();
3811
3812 int main() {
3813
3814 /* The GNU C library defines this for functions which it implements
3815     to always fail with ENOSYS.  Some functions are actually named
3816     something starting with __ and the normal name is an alias.  */
3817 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3818 choke me
3819 #else
3820 $ac_func();
3821 #endif
3822
3823 ; return 0; }
3824 EOF
3825 if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3826   rm -rf conftest*
3827   eval "ac_cv_func_$ac_func=yes"
3828 else
3829   echo "configure: failed program was:" >&5
3830   cat conftest.$ac_ext >&5
3831   rm -rf conftest*
3832   eval "ac_cv_func_$ac_func=no"
3833 fi
3834 rm -f conftest*
3835 fi
3836
3837 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3838   echo "$ac_t""yes" 1>&6
3839     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3840   cat >> confdefs.h <<EOF
3841 #define $ac_tr_func 1
3842 EOF
3843  
3844 else
3845   echo "$ac_t""no" 1>&6
3846 fi
3847 done
3848
3849 if test x"$ac_cv_func_dlopen" = x"no"; then
3850     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3851 echo "configure:3852: checking for dlopen in -ldl" >&5
3852 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3853 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3854   echo $ac_n "(cached) $ac_c" 1>&6
3855 else
3856   ac_save_LIBS="$LIBS"
3857 LIBS="-ldl  $LIBS"
3858 cat > conftest.$ac_ext <<EOF
3859 #line 3860 "configure"
3860 #include "confdefs.h"
3861 /* Override any gcc2 internal prototype to avoid an error.  */
3862 /* We use char because int might match the return type of a gcc2
3863     builtin and then its argument prototype would still apply.  */
3864 char dlopen();
3865
3866 int main() {
3867 dlopen()
3868 ; return 0; }
3869 EOF
3870 if { (eval echo configure:3871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3871   rm -rf conftest*
3872   eval "ac_cv_lib_$ac_lib_var=yes"
3873 else
3874   echo "configure: failed program was:" >&5
3875   cat conftest.$ac_ext >&5
3876   rm -rf conftest*
3877   eval "ac_cv_lib_$ac_lib_var=no"
3878 fi
3879 rm -f conftest*
3880 LIBS="$ac_save_LIBS"
3881
3882 fi
3883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3884   echo "$ac_t""yes" 1>&6
3885   LIBS="$LIBS -ldl";
3886         cat >> confdefs.h <<\EOF
3887 #define HAVE_DLOPEN 1
3888 EOF
3889
3890 else
3891   echo "$ac_t""no" 1>&6
3892 fi
3893
3894 fi
3895 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3896
3897 ############################################
3898 # check if the compiler can do immediate structures
3899 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3900 echo "configure:3901: checking for immediate structures" >&5
3901 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3902   echo $ac_n "(cached) $ac_c" 1>&6
3903 else
3904   
3905     cat > conftest.$ac_ext <<EOF
3906 #line 3907 "configure"
3907 #include "confdefs.h"
3908
3909 #include <stdio.h>
3910 int main() {
3911
3912    typedef struct {unsigned x;} FOOBAR;
3913    #define X_FOOBAR(x) ((FOOBAR) { x })
3914    #define FOO_ONE X_FOOBAR(1)
3915    FOOBAR f = FOO_ONE;   
3916    static struct {
3917         FOOBAR y; 
3918         } f2[] = {
3919                 {FOO_ONE}
3920         };   
3921
3922 ; return 0; }
3923 EOF
3924 if { (eval echo configure:3925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3925   rm -rf conftest*
3926   samba_cv_immediate_structures=yes
3927 else
3928   echo "configure: failed program was:" >&5
3929   cat conftest.$ac_ext >&5
3930   rm -rf conftest*
3931   samba_cv_immediate_structures=no
3932 fi
3933 rm -f conftest*
3934 fi
3935
3936 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3937 if test x"$samba_cv_immediate_structures" = x"yes"; then
3938    cat >> confdefs.h <<\EOF
3939 #define HAVE_IMMEDIATE_STRUCTURES 1
3940 EOF
3941
3942 fi
3943
3944 ############################################
3945 # check for unix domain sockets
3946 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3947 echo "configure:3948: checking for unix domain sockets" >&5
3948 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3949   echo $ac_n "(cached) $ac_c" 1>&6
3950 else
3951   
3952     cat > conftest.$ac_ext <<EOF
3953 #line 3954 "configure"
3954 #include "confdefs.h"
3955
3956 #include <sys/types.h>
3957 #include <stdlib.h>
3958 #include <stddef.h>
3959 #include <sys/socket.h>
3960 #include <sys/un.h>
3961 int main() {
3962
3963   struct sockaddr_un sunaddr; 
3964   sunaddr.sun_family = AF_UNIX;
3965
3966 ; return 0; }
3967 EOF
3968 if { (eval echo configure:3969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3969   rm -rf conftest*
3970   samba_cv_unixsocket=yes
3971 else
3972   echo "configure: failed program was:" >&5
3973   cat conftest.$ac_ext >&5
3974   rm -rf conftest*
3975   samba_cv_unixsocket=no
3976 fi
3977 rm -f conftest*
3978 fi
3979
3980 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3981 if test x"$samba_cv_unixsocket" = x"yes"; then
3982    cat >> confdefs.h <<\EOF
3983 #define HAVE_UNIXSOCKET 1
3984 EOF
3985
3986 fi
3987
3988
3989 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3990 echo "configure:3991: checking for socklen_t type" >&5
3991 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3992   echo $ac_n "(cached) $ac_c" 1>&6
3993 else
3994   
3995     cat > conftest.$ac_ext <<EOF
3996 #line 3997 "configure"
3997 #include "confdefs.h"
3998
3999 #include <sys/types.h>
4000 #if STDC_HEADERS
4001 #include <stdlib.h>
4002 #include <stddef.h>
4003 #endif
4004 #include <sys/socket.h>
4005 int main() {
4006 socklen_t i = 0
4007 ; return 0; }
4008 EOF
4009 if { (eval echo configure:4010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4010   rm -rf conftest*
4011   samba_cv_socklen_t=yes
4012 else
4013   echo "configure: failed program was:" >&5
4014   cat conftest.$ac_ext >&5
4015   rm -rf conftest*
4016   samba_cv_socklen_t=no
4017 fi
4018 rm -f conftest*
4019 fi
4020
4021 echo "$ac_t""$samba_cv_socklen_t" 1>&6
4022 if test x"$samba_cv_socklen_t" = x"yes"; then
4023    cat >> confdefs.h <<\EOF
4024 #define HAVE_SOCKLEN_T_TYPE 1
4025 EOF
4026
4027 fi
4028
4029 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
4030 echo "configure:4031: checking for sig_atomic_t type" >&5
4031 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
4032   echo $ac_n "(cached) $ac_c" 1>&6
4033 else
4034   
4035     cat > conftest.$ac_ext <<EOF
4036 #line 4037 "configure"
4037 #include "confdefs.h"
4038
4039 #include <sys/types.h>
4040 #if STDC_HEADERS
4041 #include <stdlib.h>
4042 #include <stddef.h>
4043 #endif
4044 #include <signal.h>
4045 int main() {
4046 sig_atomic_t i = 0
4047 ; return 0; }
4048 EOF
4049 if { (eval echo configure:4050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4050   rm -rf conftest*
4051   samba_cv_sig_atomic_t=yes
4052 else
4053   echo "configure: failed program was:" >&5
4054   cat conftest.$ac_ext >&5
4055   rm -rf conftest*
4056   samba_cv_sig_atomic_t=no
4057 fi
4058 rm -f conftest*
4059 fi
4060
4061 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4062 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4063    cat >> confdefs.h <<\EOF
4064 #define HAVE_SIG_ATOMIC_T_TYPE 1
4065 EOF
4066
4067 fi
4068
4069 # stupid headers have the functions but no declaration. grrrr.
4070
4071  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4072 echo "configure:4073: checking for errno declaration" >&5
4073 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4074   echo $ac_n "(cached) $ac_c" 1>&6
4075 else
4076   
4077     cat > conftest.$ac_ext <<EOF
4078 #line 4079 "configure"
4079 #include "confdefs.h"
4080 #include <errno.h>
4081 int main() {
4082 int i = (int)errno
4083 ; return 0; }
4084 EOF
4085 if { (eval echo configure:4086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4086   rm -rf conftest*
4087   ac_cv_have_errno_decl=yes
4088 else
4089   echo "configure: failed program was:" >&5
4090   cat conftest.$ac_ext >&5
4091   rm -rf conftest*
4092   ac_cv_have_errno_decl=no
4093 fi
4094 rm -f conftest*
4095 fi
4096
4097 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4098  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4099     cat >> confdefs.h <<\EOF
4100 #define HAVE_ERRNO_DECL 1
4101 EOF
4102
4103  fi
4104
4105
4106  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4107 echo "configure:4108: checking for setresuid declaration" >&5
4108 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4109   echo $ac_n "(cached) $ac_c" 1>&6
4110 else
4111   
4112     cat > conftest.$ac_ext <<EOF
4113 #line 4114 "configure"
4114 #include "confdefs.h"
4115 #include <unistd.h>
4116 int main() {
4117 int i = (int)setresuid
4118 ; return 0; }
4119 EOF
4120 if { (eval echo configure:4121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4121   rm -rf conftest*
4122   ac_cv_have_setresuid_decl=yes
4123 else
4124   echo "configure: failed program was:" >&5
4125   cat conftest.$ac_ext >&5
4126   rm -rf conftest*
4127   ac_cv_have_setresuid_decl=no
4128 fi
4129 rm -f conftest*
4130 fi
4131
4132 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4133  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4134     cat >> confdefs.h <<\EOF
4135 #define HAVE_SETRESUID_DECL 1
4136 EOF
4137
4138  fi
4139
4140
4141  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4142 echo "configure:4143: checking for setresgid declaration" >&5
4143 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4144   echo $ac_n "(cached) $ac_c" 1>&6
4145 else
4146   
4147     cat > conftest.$ac_ext <<EOF
4148 #line 4149 "configure"
4149 #include "confdefs.h"
4150 #include <unistd.h>
4151 int main() {
4152 int i = (int)setresgid
4153 ; return 0; }
4154 EOF
4155 if { (eval echo configure:4156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4156   rm -rf conftest*
4157   ac_cv_have_setresgid_decl=yes
4158 else
4159   echo "configure: failed program was:" >&5
4160   cat conftest.$ac_ext >&5
4161   rm -rf conftest*
4162   ac_cv_have_setresgid_decl=no
4163 fi
4164 rm -f conftest*
4165 fi
4166
4167 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4168  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4169     cat >> confdefs.h <<\EOF
4170 #define HAVE_SETRESGID_DECL 1
4171 EOF
4172
4173  fi
4174
4175
4176  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4177 echo "configure:4178: checking for asprintf declaration" >&5
4178 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4179   echo $ac_n "(cached) $ac_c" 1>&6
4180 else
4181   
4182     cat > conftest.$ac_ext <<EOF
4183 #line 4184 "configure"
4184 #include "confdefs.h"
4185 #include <stdio.h>
4186 int main() {
4187 int i = (int)asprintf
4188 ; return 0; }
4189 EOF
4190 if { (eval echo configure:4191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4191   rm -rf conftest*
4192   ac_cv_have_asprintf_decl=yes
4193 else
4194   echo "configure: failed program was:" >&5
4195   cat conftest.$ac_ext >&5
4196   rm -rf conftest*
4197   ac_cv_have_asprintf_decl=no
4198 fi
4199 rm -f conftest*
4200 fi
4201
4202 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4203  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4204     cat >> confdefs.h <<\EOF
4205 #define HAVE_ASPRINTF_DECL 1
4206 EOF
4207
4208  fi
4209
4210
4211  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4212 echo "configure:4213: checking for vasprintf declaration" >&5
4213 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4214   echo $ac_n "(cached) $ac_c" 1>&6
4215 else
4216   
4217     cat > conftest.$ac_ext <<EOF
4218 #line 4219 "configure"
4219 #include "confdefs.h"
4220 #include <stdio.h>
4221 int main() {
4222 int i = (int)vasprintf
4223 ; return 0; }
4224 EOF
4225 if { (eval echo configure:4226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4226   rm -rf conftest*
4227   ac_cv_have_vasprintf_decl=yes
4228 else
4229   echo "configure: failed program was:" >&5
4230   cat conftest.$ac_ext >&5
4231   rm -rf conftest*
4232   ac_cv_have_vasprintf_decl=no
4233 fi
4234 rm -f conftest*
4235 fi
4236
4237 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4238  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4239     cat >> confdefs.h <<\EOF
4240 #define HAVE_VASPRINTF_DECL 1
4241 EOF
4242
4243  fi
4244
4245
4246  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4247 echo "configure:4248: checking for vsnprintf declaration" >&5
4248 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4249   echo $ac_n "(cached) $ac_c" 1>&6
4250 else
4251   
4252     cat > conftest.$ac_ext <<EOF
4253 #line 4254 "configure"
4254 #include "confdefs.h"
4255 #include <stdio.h>
4256 int main() {
4257 int i = (int)vsnprintf
4258 ; return 0; }
4259 EOF
4260 if { (eval echo configure:4261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4261   rm -rf conftest*
4262   ac_cv_have_vsnprintf_decl=yes
4263 else
4264   echo "configure: failed program was:" >&5
4265   cat conftest.$ac_ext >&5
4266   rm -rf conftest*
4267   ac_cv_have_vsnprintf_decl=no
4268 fi
4269 rm -f conftest*
4270 fi
4271
4272 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4273  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4274     cat >> confdefs.h <<\EOF
4275 #define HAVE_VSNPRINTF_DECL 1
4276 EOF
4277
4278  fi
4279
4280
4281  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4282 echo "configure:4283: checking for snprintf declaration" >&5
4283 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4284   echo $ac_n "(cached) $ac_c" 1>&6
4285 else
4286   
4287     cat > conftest.$ac_ext <<EOF
4288 #line 4289 "configure"
4289 #include "confdefs.h"
4290 #include <stdio.h>
4291 int main() {
4292 int i = (int)snprintf
4293 ; return 0; }
4294 EOF
4295 if { (eval echo configure:4296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4296   rm -rf conftest*
4297   ac_cv_have_snprintf_decl=yes
4298 else
4299   echo "configure: failed program was:" >&5
4300   cat conftest.$ac_ext >&5
4301   rm -rf conftest*
4302   ac_cv_have_snprintf_decl=no
4303 fi
4304 rm -f conftest*
4305 fi
4306
4307 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4308  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4309     cat >> confdefs.h <<\EOF
4310 #define HAVE_SNPRINTF_DECL 1
4311 EOF
4312
4313  fi
4314
4315
4316 # and glibc has setresuid under linux but the function does
4317 # nothing until kernel 2.1.44! very dumb.
4318 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4319 echo "configure:4320: checking for real setresuid" >&5
4320 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4321   echo $ac_n "(cached) $ac_c" 1>&6
4322 else
4323   
4324     if test "$cross_compiling" = yes; then
4325   samba_cv_have_setresuid=cross
4326 else
4327   cat > conftest.$ac_ext <<EOF
4328 #line 4329 "configure"
4329 #include "confdefs.h"
4330 #include <errno.h>
4331 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4332 EOF
4333 if { (eval echo configure:4334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4334 then
4335   samba_cv_have_setresuid=yes
4336 else
4337   echo "configure: failed program was:" >&5
4338   cat conftest.$ac_ext >&5
4339   rm -fr conftest*
4340   samba_cv_have_setresuid=no
4341 fi
4342 rm -fr conftest*
4343 fi
4344
4345 fi
4346
4347 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4348 if test x"$samba_cv_have_setresuid" = x"yes"; then
4349     cat >> confdefs.h <<\EOF
4350 #define HAVE_SETRESUID 1
4351 EOF
4352
4353 fi
4354
4355 # Do the same check for setresguid...
4356 #
4357 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4358 echo "configure:4359: checking for real setresgid" >&5
4359 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4360   echo $ac_n "(cached) $ac_c" 1>&6
4361 else
4362   
4363     if test "$cross_compiling" = yes; then
4364   samba_cv_have_setresgid=cross
4365 else
4366   cat > conftest.$ac_ext <<EOF
4367 #line 4368 "configure"
4368 #include "confdefs.h"
4369 #include <unistd.h>
4370 #include <errno.h>
4371 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4372 EOF
4373 if { (eval echo configure:4374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4374 then
4375   samba_cv_have_setresgid=yes
4376 else
4377   echo "configure: failed program was:" >&5
4378   cat conftest.$ac_ext >&5
4379   rm -fr conftest*
4380   samba_cv_have_setresgid=no
4381 fi
4382 rm -fr conftest*
4383 fi
4384
4385 fi
4386
4387 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4388 if test x"$samba_cv_have_setresgid" = x"yes"; then
4389     cat >> confdefs.h <<\EOF
4390 #define HAVE_SETRESGID 1
4391 EOF
4392
4393 fi
4394
4395 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4396 echo "configure:4397: checking for 8-bit clean memcmp" >&5
4397 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4398   echo $ac_n "(cached) $ac_c" 1>&6
4399 else
4400   if test "$cross_compiling" = yes; then
4401   ac_cv_func_memcmp_clean=no
4402 else
4403   cat > conftest.$ac_ext <<EOF
4404 #line 4405 "configure"
4405 #include "confdefs.h"
4406
4407 main()
4408 {
4409   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4410   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4411 }
4412
4413 EOF
4414 if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4415 then
4416   ac_cv_func_memcmp_clean=yes
4417 else
4418   echo "configure: failed program was:" >&5
4419   cat conftest.$ac_ext >&5
4420   rm -fr conftest*
4421   ac_cv_func_memcmp_clean=no
4422 fi
4423 rm -fr conftest*
4424 fi
4425
4426 fi
4427
4428 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4429 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4430
4431
4432 ###############################################
4433 # test for where we get crypt() from
4434 for ac_func in crypt
4435 do
4436 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4437 echo "configure:4438: checking for $ac_func" >&5
4438 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4439   echo $ac_n "(cached) $ac_c" 1>&6
4440 else
4441   cat > conftest.$ac_ext <<EOF
4442 #line 4443 "configure"
4443 #include "confdefs.h"
4444 /* System header to define __stub macros and hopefully few prototypes,
4445     which can conflict with char $ac_func(); below.  */
4446 #include <assert.h>
4447 /* Override any gcc2 internal prototype to avoid an error.  */
4448 /* We use char because int might match the return type of a gcc2
4449     builtin and then its argument prototype would still apply.  */
4450 char $ac_func();
4451
4452 int main() {
4453
4454 /* The GNU C library defines this for functions which it implements
4455     to always fail with ENOSYS.  Some functions are actually named
4456     something starting with __ and the normal name is an alias.  */
4457 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4458 choke me
4459 #else
4460 $ac_func();
4461 #endif
4462
4463 ; return 0; }
4464 EOF
4465 if { (eval echo configure:4466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4466   rm -rf conftest*
4467   eval "ac_cv_func_$ac_func=yes"
4468 else
4469   echo "configure: failed program was:" >&5
4470   cat conftest.$ac_ext >&5
4471   rm -rf conftest*
4472   eval "ac_cv_func_$ac_func=no"
4473 fi
4474 rm -f conftest*
4475 fi
4476
4477 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4478   echo "$ac_t""yes" 1>&6
4479     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4480   cat >> confdefs.h <<EOF
4481 #define $ac_tr_func 1
4482 EOF
4483  
4484 else
4485   echo "$ac_t""no" 1>&6
4486 fi
4487 done
4488
4489 if test x"$ac_cv_func_crypt" = x"no"; then
4490     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4491 echo "configure:4492: checking for crypt in -lcrypt" >&5
4492 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4493 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4494   echo $ac_n "(cached) $ac_c" 1>&6
4495 else
4496   ac_save_LIBS="$LIBS"
4497 LIBS="-lcrypt  $LIBS"
4498 cat > conftest.$ac_ext <<EOF
4499 #line 4500 "configure"
4500 #include "confdefs.h"
4501 /* Override any gcc2 internal prototype to avoid an error.  */
4502 /* We use char because int might match the return type of a gcc2
4503     builtin and then its argument prototype would still apply.  */
4504 char crypt();
4505
4506 int main() {
4507 crypt()
4508 ; return 0; }
4509 EOF
4510 if { (eval echo configure:4511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4511   rm -rf conftest*
4512   eval "ac_cv_lib_$ac_lib_var=yes"
4513 else
4514   echo "configure: failed program was:" >&5
4515   cat conftest.$ac_ext >&5
4516   rm -rf conftest*
4517   eval "ac_cv_lib_$ac_lib_var=no"
4518 fi
4519 rm -f conftest*
4520 LIBS="$ac_save_LIBS"
4521
4522 fi
4523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4524   echo "$ac_t""yes" 1>&6
4525   LIBS="$LIBS -lcrypt";
4526         cat >> confdefs.h <<\EOF
4527 #define HAVE_CRYPT 1
4528 EOF
4529
4530 else
4531   echo "$ac_t""no" 1>&6
4532 fi
4533
4534 fi
4535
4536
4537 ###############################################
4538 # Readline included by default unless explicitly asked not to
4539 test "${with_readline+set}" != "set" && with_readline=yes
4540
4541 # test for where we get readline() from
4542 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4543 echo "configure:4544: checking whether to use readline" >&5
4544 # Check whether --with-readline or --without-readline was given.
4545 if test "${with_readline+set}" = set; then
4546   withval="$with_readline"
4547     case "$with_readline" in
4548   yes)
4549     echo "$ac_t""yes" 1>&6
4550
4551     for ac_hdr in readline.h history.h readline/readline.h
4552 do
4553 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4554 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4555 echo "configure:4556: checking for $ac_hdr" >&5
4556 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4557   echo $ac_n "(cached) $ac_c" 1>&6
4558 else
4559   cat > conftest.$ac_ext <<EOF
4560 #line 4561 "configure"
4561 #include "confdefs.h"
4562 #include <$ac_hdr>
4563 EOF
4564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4565 { (eval echo configure:4566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4567 if test -z "$ac_err"; then
4568   rm -rf conftest*
4569   eval "ac_cv_header_$ac_safe=yes"
4570 else
4571   echo "$ac_err" >&5
4572   echo "configure: failed program was:" >&5
4573   cat conftest.$ac_ext >&5
4574   rm -rf conftest*
4575   eval "ac_cv_header_$ac_safe=no"
4576 fi
4577 rm -f conftest*
4578 fi
4579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4580   echo "$ac_t""yes" 1>&6
4581     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4582   cat >> confdefs.h <<EOF
4583 #define $ac_tr_hdr 1
4584 EOF
4585  
4586 else
4587   echo "$ac_t""no" 1>&6
4588 fi
4589 done
4590
4591     for ac_hdr in readline/history.h
4592 do
4593 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4594 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4595 echo "configure:4596: checking for $ac_hdr" >&5
4596 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4597   echo $ac_n "(cached) $ac_c" 1>&6
4598 else
4599   cat > conftest.$ac_ext <<EOF
4600 #line 4601 "configure"
4601 #include "confdefs.h"
4602 #include <$ac_hdr>
4603 EOF
4604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4605 { (eval echo configure:4606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4607 if test -z "$ac_err"; then
4608   rm -rf conftest*
4609   eval "ac_cv_header_$ac_safe=yes"
4610 else
4611   echo "$ac_err" >&5
4612   echo "configure: failed program was:" >&5
4613   cat conftest.$ac_ext >&5
4614   rm -rf conftest*
4615   eval "ac_cv_header_$ac_safe=no"
4616 fi
4617 rm -f conftest*
4618 fi
4619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4620   echo "$ac_t""yes" 1>&6
4621     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4622   cat >> confdefs.h <<EOF
4623 #define $ac_tr_hdr 1
4624 EOF
4625  
4626 else
4627   echo "$ac_t""no" 1>&6
4628 fi
4629 done
4630
4631
4632     for ac_hdr in readline.h readline/readline.h
4633 do
4634 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4635 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4636 echo "configure:4637: checking for $ac_hdr" >&5
4637 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4638   echo $ac_n "(cached) $ac_c" 1>&6
4639 else
4640   cat > conftest.$ac_ext <<EOF
4641 #line 4642 "configure"
4642 #include "confdefs.h"
4643 #include <$ac_hdr>
4644 EOF
4645 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4646 { (eval echo configure:4647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4647 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4648 if test -z "$ac_err"; then
4649   rm -rf conftest*
4650   eval "ac_cv_header_$ac_safe=yes"
4651 else
4652   echo "$ac_err" >&5
4653   echo "configure: failed program was:" >&5
4654   cat conftest.$ac_ext >&5
4655   rm -rf conftest*
4656   eval "ac_cv_header_$ac_safe=no"
4657 fi
4658 rm -f conftest*
4659 fi
4660 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4661   echo "$ac_t""yes" 1>&6
4662     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4663   cat >> confdefs.h <<EOF
4664 #define $ac_tr_hdr 1
4665 EOF
4666  
4667       for termlib in ncurses curses termcap terminfo termlib; do
4668        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4669 echo "configure:4670: checking for tgetent in -l${termlib}" >&5
4670 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4671 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4672   echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674   ac_save_LIBS="$LIBS"
4675 LIBS="-l${termlib}  $LIBS"
4676 cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679 /* Override any gcc2 internal prototype to avoid an error.  */
4680 /* We use char because int might match the return type of a gcc2
4681     builtin and then its argument prototype would still apply.  */
4682 char tgetent();
4683
4684 int main() {
4685 tgetent()
4686 ; return 0; }
4687 EOF
4688 if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4689   rm -rf conftest*
4690   eval "ac_cv_lib_$ac_lib_var=yes"
4691 else
4692   echo "configure: failed program was:" >&5
4693   cat conftest.$ac_ext >&5
4694   rm -rf conftest*
4695   eval "ac_cv_lib_$ac_lib_var=no"
4696 fi
4697 rm -f conftest*
4698 LIBS="$ac_save_LIBS"
4699
4700 fi
4701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4702   echo "$ac_t""yes" 1>&6
4703   TERMLIBS="-l${termlib}"; break
4704 else
4705   echo "$ac_t""no" 1>&6
4706 fi
4707
4708       done
4709       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4710 echo "configure:4711: checking for rl_callback_handler_install in -lreadline" >&5
4711 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4712 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4713   echo $ac_n "(cached) $ac_c" 1>&6
4714 else
4715   ac_save_LIBS="$LIBS"
4716 LIBS="-lreadline $TERMLIBS $LIBS"
4717 cat > conftest.$ac_ext <<EOF
4718 #line 4719 "configure"
4719 #include "confdefs.h"
4720 /* Override any gcc2 internal prototype to avoid an error.  */
4721 /* We use char because int might match the return type of a gcc2
4722     builtin and then its argument prototype would still apply.  */
4723 char rl_callback_handler_install();
4724
4725 int main() {
4726 rl_callback_handler_install()
4727 ; return 0; }
4728 EOF
4729 if { (eval echo configure:4730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4730   rm -rf conftest*
4731   eval "ac_cv_lib_$ac_lib_var=yes"
4732 else
4733   echo "configure: failed program was:" >&5
4734   cat conftest.$ac_ext >&5
4735   rm -rf conftest*
4736   eval "ac_cv_lib_$ac_lib_var=no"
4737 fi
4738 rm -f conftest*
4739 LIBS="$ac_save_LIBS"
4740
4741 fi
4742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4743   echo "$ac_t""yes" 1>&6
4744   TERMLIBS="-lreadline $TERMLIBS"
4745        cat >> confdefs.h <<\EOF
4746 #define HAVE_LIBREADLINE 1
4747 EOF
4748
4749        break
4750 else
4751   echo "$ac_t""no" 1>&6
4752 TERMLIBS=
4753 fi
4754
4755 else
4756   echo "$ac_t""no" 1>&6
4757 fi
4758 done
4759
4760     ;;
4761   no)
4762     echo "$ac_t""no" 1>&6
4763     ;;
4764   *)
4765     echo "$ac_t""yes" 1>&6
4766
4767     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4768     # alternate readline path
4769     _ldflags=${LDFLAGS}
4770     _cppflags=${CPPFLAGS}
4771
4772     # Add additional search path
4773     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4774     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4775
4776     for ac_hdr in readline.h history.h readline/readline.h
4777 do
4778 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4779 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4780 echo "configure:4781: checking for $ac_hdr" >&5
4781 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4782   echo $ac_n "(cached) $ac_c" 1>&6
4783 else
4784   cat > conftest.$ac_ext <<EOF
4785 #line 4786 "configure"
4786 #include "confdefs.h"
4787 #include <$ac_hdr>
4788 EOF
4789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4790 { (eval echo configure:4791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4792 if test -z "$ac_err"; then
4793   rm -rf conftest*
4794   eval "ac_cv_header_$ac_safe=yes"
4795 else
4796   echo "$ac_err" >&5
4797   echo "configure: failed program was:" >&5
4798   cat conftest.$ac_ext >&5
4799   rm -rf conftest*
4800   eval "ac_cv_header_$ac_safe=no"
4801 fi
4802 rm -f conftest*
4803 fi
4804 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4805   echo "$ac_t""yes" 1>&6
4806     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4807   cat >> confdefs.h <<EOF
4808 #define $ac_tr_hdr 1
4809 EOF
4810  
4811 else
4812   echo "$ac_t""no" 1>&6
4813 fi
4814 done
4815
4816     for ac_hdr in readline/history.h
4817 do
4818 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4819 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4820 echo "configure:4821: checking for $ac_hdr" >&5
4821 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4822   echo $ac_n "(cached) $ac_c" 1>&6
4823 else
4824   cat > conftest.$ac_ext <<EOF
4825 #line 4826 "configure"
4826 #include "confdefs.h"
4827 #include <$ac_hdr>
4828 EOF
4829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4830 { (eval echo configure:4831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4832 if test -z "$ac_err"; then
4833   rm -rf conftest*
4834   eval "ac_cv_header_$ac_safe=yes"
4835 else
4836   echo "$ac_err" >&5
4837   echo "configure: failed program was:" >&5
4838   cat conftest.$ac_ext >&5
4839   rm -rf conftest*
4840   eval "ac_cv_header_$ac_safe=no"
4841 fi
4842 rm -f conftest*
4843 fi
4844 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4845   echo "$ac_t""yes" 1>&6
4846     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4847   cat >> confdefs.h <<EOF
4848 #define $ac_tr_hdr 1
4849 EOF
4850  
4851 else
4852   echo "$ac_t""no" 1>&6
4853 fi
4854 done
4855
4856
4857     for ac_hdr in readline.h readline/readline.h
4858 do
4859 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4860 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4861 echo "configure:4862: checking for $ac_hdr" >&5
4862 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4863   echo $ac_n "(cached) $ac_c" 1>&6
4864 else
4865   cat > conftest.$ac_ext <<EOF
4866 #line 4867 "configure"
4867 #include "confdefs.h"
4868 #include <$ac_hdr>
4869 EOF
4870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4871 { (eval echo configure:4872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4873 if test -z "$ac_err"; then
4874   rm -rf conftest*
4875   eval "ac_cv_header_$ac_safe=yes"
4876 else
4877   echo "$ac_err" >&5
4878   echo "configure: failed program was:" >&5
4879   cat conftest.$ac_ext >&5
4880   rm -rf conftest*
4881   eval "ac_cv_header_$ac_safe=no"
4882 fi
4883 rm -f conftest*
4884 fi
4885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4886   echo "$ac_t""yes" 1>&6
4887     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4888   cat >> confdefs.h <<EOF
4889 #define $ac_tr_hdr 1
4890 EOF
4891  
4892       for termlib in ncurses curses termcap terminfo termlib; do
4893        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4894 echo "configure:4895: checking for tgetent in -l${termlib}" >&5
4895 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4896 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4897   echo $ac_n "(cached) $ac_c" 1>&6
4898 else
4899   ac_save_LIBS="$LIBS"
4900 LIBS="-l${termlib}  $LIBS"
4901 cat > conftest.$ac_ext <<EOF
4902 #line 4903 "configure"
4903 #include "confdefs.h"
4904 /* Override any gcc2 internal prototype to avoid an error.  */
4905 /* We use char because int might match the return type of a gcc2
4906     builtin and then its argument prototype would still apply.  */
4907 char tgetent();
4908
4909 int main() {
4910 tgetent()
4911 ; return 0; }
4912 EOF
4913 if { (eval echo configure:4914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4914   rm -rf conftest*
4915   eval "ac_cv_lib_$ac_lib_var=yes"
4916 else
4917   echo "configure: failed program was:" >&5
4918   cat conftest.$ac_ext >&5
4919   rm -rf conftest*
4920   eval "ac_cv_lib_$ac_lib_var=no"
4921 fi
4922 rm -f conftest*
4923 LIBS="$ac_save_LIBS"
4924
4925 fi
4926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4927   echo "$ac_t""yes" 1>&6
4928   TERMLIBS="-l${termlib}"; break
4929 else
4930   echo "$ac_t""no" 1>&6
4931 fi
4932
4933       done
4934       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4935 echo "configure:4936: checking for rl_callback_handler_install in -lreadline" >&5
4936 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4937 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4938   echo $ac_n "(cached) $ac_c" 1>&6
4939 else
4940   ac_save_LIBS="$LIBS"
4941 LIBS="-lreadline $TERMLIBS $LIBS"
4942 cat > conftest.$ac_ext <<EOF
4943 #line 4944 "configure"
4944 #include "confdefs.h"
4945 /* Override any gcc2 internal prototype to avoid an error.  */
4946 /* We use char because int might match the return type of a gcc2
4947     builtin and then its argument prototype would still apply.  */
4948 char rl_callback_handler_install();
4949
4950 int main() {
4951 rl_callback_handler_install()
4952 ; return 0; }
4953 EOF
4954 if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4955   rm -rf conftest*
4956   eval "ac_cv_lib_$ac_lib_var=yes"
4957 else
4958   echo "configure: failed program was:" >&5
4959   cat conftest.$ac_ext >&5
4960   rm -rf conftest*
4961   eval "ac_cv_lib_$ac_lib_var=no"
4962 fi
4963 rm -f conftest*
4964 LIBS="$ac_save_LIBS"
4965
4966 fi
4967 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4968   echo "$ac_t""yes" 1>&6
4969   TERMLDFLAGS="-L$with_readline/lib"
4970        TERMCPPFLAGS="-I$with_readline/include"
4971        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4972        TERMLIBS="-lreadline $TERMLIBS"
4973        cat >> confdefs.h <<\EOF
4974 #define HAVE_LIBREADLINE 1
4975 EOF
4976
4977        break
4978 else
4979   echo "$ac_t""no" 1>&6
4980 TERMLIBS= CPPFLAGS=$_cppflags
4981 fi
4982
4983 else
4984   echo "$ac_t""no" 1>&6
4985 fi
4986 done
4987
4988
4989     LDFLAGS=$_ldflags
4990     ;;
4991   esac
4992 else
4993   echo "$ac_t""no" 1>&6
4994
4995 fi
4996
4997
4998
4999
5000 # The readline API changed slightly from readline3 to readline4, so
5001 # code will generate warnings on one of them unless we have a few
5002 # special cases.
5003 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
5004 echo "configure:5005: checking for rl_completion_matches in -lreadline" >&5
5005 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
5006 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5007   echo $ac_n "(cached) $ac_c" 1>&6
5008 else
5009   ac_save_LIBS="$LIBS"
5010 LIBS="-lreadline $TERMLIBS $LIBS"
5011 cat > conftest.$ac_ext <<EOF
5012 #line 5013 "configure"
5013 #include "confdefs.h"
5014 /* Override any gcc2 internal prototype to avoid an error.  */
5015 /* We use char because int might match the return type of a gcc2
5016     builtin and then its argument prototype would still apply.  */
5017 char rl_completion_matches();
5018
5019 int main() {
5020 rl_completion_matches()
5021 ; return 0; }
5022 EOF
5023 if { (eval echo configure:5024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5024   rm -rf conftest*
5025   eval "ac_cv_lib_$ac_lib_var=yes"
5026 else
5027   echo "configure: failed program was:" >&5
5028   cat conftest.$ac_ext >&5
5029   rm -rf conftest*
5030   eval "ac_cv_lib_$ac_lib_var=no"
5031 fi
5032 rm -f conftest*
5033 LIBS="$ac_save_LIBS"
5034
5035 fi
5036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5037   echo "$ac_t""yes" 1>&6
5038   cat >> confdefs.h <<\EOF
5039 #define HAVE_NEW_LIBREADLINE 1
5040 EOF
5041
5042 else
5043   echo "$ac_t""no" 1>&6
5044 fi
5045
5046
5047 # The following test taken from the cvs sources
5048 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5049 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5050 # libsocket.so which has a bad implementation of gethostbyname (it
5051 # only looks in /etc/hosts), so we only look for -lsocket if we need
5052 # it.
5053 for ac_func in connect
5054 do
5055 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5056 echo "configure:5057: checking for $ac_func" >&5
5057 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5058   echo $ac_n "(cached) $ac_c" 1>&6
5059 else
5060   cat > conftest.$ac_ext <<EOF
5061 #line 5062 "configure"
5062 #include "confdefs.h"
5063 /* System header to define __stub macros and hopefully few prototypes,
5064     which can conflict with char $ac_func(); below.  */
5065 #include <assert.h>
5066 /* Override any gcc2 internal prototype to avoid an error.  */
5067 /* We use char because int might match the return type of a gcc2
5068     builtin and then its argument prototype would still apply.  */
5069 char $ac_func();
5070
5071 int main() {
5072
5073 /* The GNU C library defines this for functions which it implements
5074     to always fail with ENOSYS.  Some functions are actually named
5075     something starting with __ and the normal name is an alias.  */
5076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5077 choke me
5078 #else
5079 $ac_func();
5080 #endif
5081
5082 ; return 0; }
5083 EOF
5084 if { (eval echo configure:5085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5085   rm -rf conftest*
5086   eval "ac_cv_func_$ac_func=yes"
5087 else
5088   echo "configure: failed program was:" >&5
5089   cat conftest.$ac_ext >&5
5090   rm -rf conftest*
5091   eval "ac_cv_func_$ac_func=no"
5092 fi
5093 rm -f conftest*
5094 fi
5095
5096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5097   echo "$ac_t""yes" 1>&6
5098     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5099   cat >> confdefs.h <<EOF
5100 #define $ac_tr_func 1
5101 EOF
5102  
5103 else
5104   echo "$ac_t""no" 1>&6
5105 fi
5106 done
5107
5108 if test x"$ac_cv_func_connect" = x"no"; then
5109     case "$LIBS" in
5110     *-lnsl*) ;;
5111     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5112 echo "configure:5113: checking for printf in -lnsl_s" >&5
5113 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5114 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5115   echo $ac_n "(cached) $ac_c" 1>&6
5116 else
5117   ac_save_LIBS="$LIBS"
5118 LIBS="-lnsl_s  $LIBS"
5119 cat > conftest.$ac_ext <<EOF
5120 #line 5121 "configure"
5121 #include "confdefs.h"
5122 /* Override any gcc2 internal prototype to avoid an error.  */
5123 /* We use char because int might match the return type of a gcc2
5124     builtin and then its argument prototype would still apply.  */
5125 char printf();
5126
5127 int main() {
5128 printf()
5129 ; return 0; }
5130 EOF
5131 if { (eval echo configure:5132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5132   rm -rf conftest*
5133   eval "ac_cv_lib_$ac_lib_var=yes"
5134 else
5135   echo "configure: failed program was:" >&5
5136   cat conftest.$ac_ext >&5
5137   rm -rf conftest*
5138   eval "ac_cv_lib_$ac_lib_var=no"
5139 fi
5140 rm -f conftest*
5141 LIBS="$ac_save_LIBS"
5142
5143 fi
5144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5145   echo "$ac_t""yes" 1>&6
5146     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5147     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5148   cat >> confdefs.h <<EOF
5149 #define $ac_tr_lib 1
5150 EOF
5151
5152   LIBS="-lnsl_s $LIBS"
5153
5154 else
5155   echo "$ac_t""no" 1>&6
5156 fi
5157  ;;
5158     esac
5159     case "$LIBS" in
5160     *-lnsl*) ;;
5161     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5162 echo "configure:5163: checking for printf in -lnsl" >&5
5163 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5164 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5165   echo $ac_n "(cached) $ac_c" 1>&6
5166 else
5167   ac_save_LIBS="$LIBS"
5168 LIBS="-lnsl  $LIBS"
5169 cat > conftest.$ac_ext <<EOF
5170 #line 5171 "configure"
5171 #include "confdefs.h"
5172 /* Override any gcc2 internal prototype to avoid an error.  */
5173 /* We use char because int might match the return type of a gcc2
5174     builtin and then its argument prototype would still apply.  */
5175 char printf();
5176
5177 int main() {
5178 printf()
5179 ; return 0; }
5180 EOF
5181 if { (eval echo configure:5182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5182   rm -rf conftest*
5183   eval "ac_cv_lib_$ac_lib_var=yes"
5184 else
5185   echo "configure: failed program was:" >&5
5186   cat conftest.$ac_ext >&5
5187   rm -rf conftest*
5188   eval "ac_cv_lib_$ac_lib_var=no"
5189 fi
5190 rm -f conftest*
5191 LIBS="$ac_save_LIBS"
5192
5193 fi
5194 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5195   echo "$ac_t""yes" 1>&6
5196     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5197     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5198   cat >> confdefs.h <<EOF
5199 #define $ac_tr_lib 1
5200 EOF
5201
5202   LIBS="-lnsl $LIBS"
5203
5204 else
5205   echo "$ac_t""no" 1>&6
5206 fi
5207  ;;
5208     esac
5209     case "$LIBS" in
5210     *-lsocket*) ;;
5211     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5212 echo "configure:5213: checking for connect in -lsocket" >&5
5213 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5214 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5215   echo $ac_n "(cached) $ac_c" 1>&6
5216 else
5217   ac_save_LIBS="$LIBS"
5218 LIBS="-lsocket  $LIBS"
5219 cat > conftest.$ac_ext <<EOF
5220 #line 5221 "configure"
5221 #include "confdefs.h"
5222 /* Override any gcc2 internal prototype to avoid an error.  */
5223 /* We use char because int might match the return type of a gcc2
5224     builtin and then its argument prototype would still apply.  */
5225 char connect();
5226
5227 int main() {
5228 connect()
5229 ; return 0; }
5230 EOF
5231 if { (eval echo configure:5232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5232   rm -rf conftest*
5233   eval "ac_cv_lib_$ac_lib_var=yes"
5234 else
5235   echo "configure: failed program was:" >&5
5236   cat conftest.$ac_ext >&5
5237   rm -rf conftest*
5238   eval "ac_cv_lib_$ac_lib_var=no"
5239 fi
5240 rm -f conftest*
5241 LIBS="$ac_save_LIBS"
5242
5243 fi
5244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5245   echo "$ac_t""yes" 1>&6
5246     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5247     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5248   cat >> confdefs.h <<EOF
5249 #define $ac_tr_lib 1
5250 EOF
5251
5252   LIBS="-lsocket $LIBS"
5253
5254 else
5255   echo "$ac_t""no" 1>&6
5256 fi
5257  ;;
5258     esac
5259     case "$LIBS" in
5260     *-linet*) ;;
5261     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5262 echo "configure:5263: checking for connect in -linet" >&5
5263 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5264 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5265   echo $ac_n "(cached) $ac_c" 1>&6
5266 else
5267   ac_save_LIBS="$LIBS"
5268 LIBS="-linet  $LIBS"
5269 cat > conftest.$ac_ext <<EOF
5270 #line 5271 "configure"
5271 #include "confdefs.h"
5272 /* Override any gcc2 internal prototype to avoid an error.  */
5273 /* We use char because int might match the return type of a gcc2
5274     builtin and then its argument prototype would still apply.  */
5275 char connect();
5276
5277 int main() {
5278 connect()
5279 ; return 0; }
5280 EOF
5281 if { (eval echo configure:5282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5282   rm -rf conftest*
5283   eval "ac_cv_lib_$ac_lib_var=yes"
5284 else
5285   echo "configure: failed program was:" >&5
5286   cat conftest.$ac_ext >&5
5287   rm -rf conftest*
5288   eval "ac_cv_lib_$ac_lib_var=no"
5289 fi
5290 rm -f conftest*
5291 LIBS="$ac_save_LIBS"
5292
5293 fi
5294 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5295   echo "$ac_t""yes" 1>&6
5296     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5297     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5298   cat >> confdefs.h <<EOF
5299 #define $ac_tr_lib 1
5300 EOF
5301
5302   LIBS="-linet $LIBS"
5303
5304 else
5305   echo "$ac_t""no" 1>&6
5306 fi
5307  ;;
5308     esac
5309             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5310        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5311         # ac_cv_func_connect=yes
5312         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5313         cat >> confdefs.h <<\EOF
5314 #define HAVE_CONNECT 1
5315 EOF
5316
5317     fi
5318 fi
5319
5320 ###############################################
5321 # test for where we get get_yp_default_domain() from
5322 for ac_func in yp_get_default_domain
5323 do
5324 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5325 echo "configure:5326: checking for $ac_func" >&5
5326 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5327   echo $ac_n "(cached) $ac_c" 1>&6
5328 else
5329   cat > conftest.$ac_ext <<EOF
5330 #line 5331 "configure"
5331 #include "confdefs.h"
5332 /* System header to define __stub macros and hopefully few prototypes,
5333     which can conflict with char $ac_func(); below.  */
5334 #include <assert.h>
5335 /* Override any gcc2 internal prototype to avoid an error.  */
5336 /* We use char because int might match the return type of a gcc2
5337     builtin and then its argument prototype would still apply.  */
5338 char $ac_func();
5339
5340 int main() {
5341
5342 /* The GNU C library defines this for functions which it implements
5343     to always fail with ENOSYS.  Some functions are actually named
5344     something starting with __ and the normal name is an alias.  */
5345 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5346 choke me
5347 #else
5348 $ac_func();
5349 #endif
5350
5351 ; return 0; }
5352 EOF
5353 if { (eval echo configure:5354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5354   rm -rf conftest*
5355   eval "ac_cv_func_$ac_func=yes"
5356 else
5357   echo "configure: failed program was:" >&5
5358   cat conftest.$ac_ext >&5
5359   rm -rf conftest*
5360   eval "ac_cv_func_$ac_func=no"
5361 fi
5362 rm -f conftest*
5363 fi
5364
5365 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5366   echo "$ac_t""yes" 1>&6
5367     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5368   cat >> confdefs.h <<EOF
5369 #define $ac_tr_func 1
5370 EOF
5371  
5372 else
5373   echo "$ac_t""no" 1>&6
5374 fi
5375 done
5376
5377 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5378         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5379 echo "configure:5380: checking for yp_get_default_domain in -lnsl" >&5
5380 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5381 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5382   echo $ac_n "(cached) $ac_c" 1>&6
5383 else
5384   ac_save_LIBS="$LIBS"
5385 LIBS="-lnsl  $LIBS"
5386 cat > conftest.$ac_ext <<EOF
5387 #line 5388 "configure"
5388 #include "confdefs.h"
5389 /* Override any gcc2 internal prototype to avoid an error.  */
5390 /* We use char because int might match the return type of a gcc2
5391     builtin and then its argument prototype would still apply.  */
5392 char yp_get_default_domain();
5393
5394 int main() {
5395 yp_get_default_domain()
5396 ; return 0; }
5397 EOF
5398 if { (eval echo configure:5399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5399   rm -rf conftest*
5400   eval "ac_cv_lib_$ac_lib_var=yes"
5401 else
5402   echo "configure: failed program was:" >&5
5403   cat conftest.$ac_ext >&5
5404   rm -rf conftest*
5405   eval "ac_cv_lib_$ac_lib_var=no"
5406 fi
5407 rm -f conftest*
5408 LIBS="$ac_save_LIBS"
5409
5410 fi
5411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5412   echo "$ac_t""yes" 1>&6
5413   LIBS="$LIBS -lnsl";
5414         cat >> confdefs.h <<\EOF
5415 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5416 EOF
5417
5418 else
5419   echo "$ac_t""no" 1>&6
5420 fi
5421  
5422 fi
5423
5424 # Check if we have execl, if not we need to compile smbrun.
5425 for ac_func in execl
5426 do
5427 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5428 echo "configure:5429: checking for $ac_func" >&5
5429 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5430   echo $ac_n "(cached) $ac_c" 1>&6
5431 else
5432   cat > conftest.$ac_ext <<EOF
5433 #line 5434 "configure"
5434 #include "confdefs.h"
5435 /* System header to define __stub macros and hopefully few prototypes,
5436     which can conflict with char $ac_func(); below.  */
5437 #include <assert.h>
5438 /* Override any gcc2 internal prototype to avoid an error.  */
5439 /* We use char because int might match the return type of a gcc2
5440     builtin and then its argument prototype would still apply.  */
5441 char $ac_func();
5442
5443 int main() {
5444
5445 /* The GNU C library defines this for functions which it implements
5446     to always fail with ENOSYS.  Some functions are actually named
5447     something starting with __ and the normal name is an alias.  */
5448 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5449 choke me
5450 #else
5451 $ac_func();
5452 #endif
5453
5454 ; return 0; }
5455 EOF
5456 if { (eval echo configure:5457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5457   rm -rf conftest*
5458   eval "ac_cv_func_$ac_func=yes"
5459 else
5460   echo "configure: failed program was:" >&5
5461   cat conftest.$ac_ext >&5
5462   rm -rf conftest*
5463   eval "ac_cv_func_$ac_func=no"
5464 fi
5465 rm -f conftest*
5466 fi
5467
5468 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5469   echo "$ac_t""yes" 1>&6
5470     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5471   cat >> confdefs.h <<EOF
5472 #define $ac_tr_func 1
5473 EOF
5474  
5475 else
5476   echo "$ac_t""no" 1>&6
5477 fi
5478 done
5479
5480 if test x"$ac_cv_func_execl" = x"no"; then
5481     RUNPROG="bin/smbrun"
5482 else
5483     RUNPROG=""
5484 fi
5485
5486 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5487 do
5488 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5489 echo "configure:5490: checking for $ac_func" >&5
5490 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5491   echo $ac_n "(cached) $ac_c" 1>&6
5492 else
5493   cat > conftest.$ac_ext <<EOF
5494 #line 5495 "configure"
5495 #include "confdefs.h"
5496 /* System header to define __stub macros and hopefully few prototypes,
5497     which can conflict with char $ac_func(); below.  */
5498 #include <assert.h>
5499 /* Override any gcc2 internal prototype to avoid an error.  */
5500 /* We use char because int might match the return type of a gcc2
5501     builtin and then its argument prototype would still apply.  */
5502 char $ac_func();
5503
5504 int main() {
5505
5506 /* The GNU C library defines this for functions which it implements
5507     to always fail with ENOSYS.  Some functions are actually named
5508     something starting with __ and the normal name is an alias.  */
5509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5510 choke me
5511 #else
5512 $ac_func();
5513 #endif
5514
5515 ; return 0; }
5516 EOF
5517 if { (eval echo configure:5518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5518   rm -rf conftest*
5519   eval "ac_cv_func_$ac_func=yes"
5520 else
5521   echo "configure: failed program was:" >&5
5522   cat conftest.$ac_ext >&5
5523   rm -rf conftest*
5524   eval "ac_cv_func_$ac_func=no"
5525 fi
5526 rm -f conftest*
5527 fi
5528
5529 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5530   echo "$ac_t""yes" 1>&6
5531     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5532   cat >> confdefs.h <<EOF
5533 #define $ac_tr_func 1
5534 EOF
5535  
5536 else
5537   echo "$ac_t""no" 1>&6
5538 fi
5539 done
5540
5541 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5542 do
5543 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5544 echo "configure:5545: checking for $ac_func" >&5
5545 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5546   echo $ac_n "(cached) $ac_c" 1>&6
5547 else
5548   cat > conftest.$ac_ext <<EOF
5549 #line 5550 "configure"
5550 #include "confdefs.h"
5551 /* System header to define __stub macros and hopefully few prototypes,
5552     which can conflict with char $ac_func(); below.  */
5553 #include <assert.h>
5554 /* Override any gcc2 internal prototype to avoid an error.  */
5555 /* We use char because int might match the return type of a gcc2
5556     builtin and then its argument prototype would still apply.  */
5557 char $ac_func();
5558
5559 int main() {
5560
5561 /* The GNU C library defines this for functions which it implements
5562     to always fail with ENOSYS.  Some functions are actually named
5563     something starting with __ and the normal name is an alias.  */
5564 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5565 choke me
5566 #else
5567 $ac_func();
5568 #endif
5569
5570 ; return 0; }
5571 EOF
5572 if { (eval echo configure:5573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5573   rm -rf conftest*
5574   eval "ac_cv_func_$ac_func=yes"
5575 else
5576   echo "configure: failed program was:" >&5
5577   cat conftest.$ac_ext >&5
5578   rm -rf conftest*
5579   eval "ac_cv_func_$ac_func=no"
5580 fi
5581 rm -f conftest*
5582 fi
5583
5584 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5585   echo "$ac_t""yes" 1>&6
5586     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5587   cat >> confdefs.h <<EOF
5588 #define $ac_tr_func 1
5589 EOF
5590  
5591 else
5592   echo "$ac_t""no" 1>&6
5593 fi
5594 done
5595
5596 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5597 do
5598 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5599 echo "configure:5600: checking for $ac_func" >&5
5600 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5601   echo $ac_n "(cached) $ac_c" 1>&6
5602 else
5603   cat > conftest.$ac_ext <<EOF
5604 #line 5605 "configure"
5605 #include "confdefs.h"
5606 /* System header to define __stub macros and hopefully few prototypes,
5607     which can conflict with char $ac_func(); below.  */
5608 #include <assert.h>
5609 /* Override any gcc2 internal prototype to avoid an error.  */
5610 /* We use char because int might match the return type of a gcc2
5611     builtin and then its argument prototype would still apply.  */
5612 char $ac_func();
5613
5614 int main() {
5615
5616 /* The GNU C library defines this for functions which it implements
5617     to always fail with ENOSYS.  Some functions are actually named
5618     something starting with __ and the normal name is an alias.  */
5619 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5620 choke me
5621 #else
5622 $ac_func();
5623 #endif
5624
5625 ; return 0; }
5626 EOF
5627 if { (eval echo configure:5628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5628   rm -rf conftest*
5629   eval "ac_cv_func_$ac_func=yes"
5630 else
5631   echo "configure: failed program was:" >&5
5632   cat conftest.$ac_ext >&5
5633   rm -rf conftest*
5634   eval "ac_cv_func_$ac_func=no"
5635 fi
5636 rm -f conftest*
5637 fi
5638
5639 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5640   echo "$ac_t""yes" 1>&6
5641     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5642   cat >> confdefs.h <<EOF
5643 #define $ac_tr_func 1
5644 EOF
5645  
5646 else
5647   echo "$ac_t""no" 1>&6
5648 fi
5649 done
5650
5651 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5652 do
5653 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5654 echo "configure:5655: checking for $ac_func" >&5
5655 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5656   echo $ac_n "(cached) $ac_c" 1>&6
5657 else
5658   cat > conftest.$ac_ext <<EOF
5659 #line 5660 "configure"
5660 #include "confdefs.h"
5661 /* System header to define __stub macros and hopefully few prototypes,
5662     which can conflict with char $ac_func(); below.  */
5663 #include <assert.h>
5664 /* Override any gcc2 internal prototype to avoid an error.  */
5665 /* We use char because int might match the return type of a gcc2
5666     builtin and then its argument prototype would still apply.  */
5667 char $ac_func();
5668
5669 int main() {
5670
5671 /* The GNU C library defines this for functions which it implements
5672     to always fail with ENOSYS.  Some functions are actually named
5673     something starting with __ and the normal name is an alias.  */
5674 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5675 choke me
5676 #else
5677 $ac_func();
5678 #endif
5679
5680 ; return 0; }
5681 EOF
5682 if { (eval echo configure:5683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5683   rm -rf conftest*
5684   eval "ac_cv_func_$ac_func=yes"
5685 else
5686   echo "configure: failed program was:" >&5
5687   cat conftest.$ac_ext >&5
5688   rm -rf conftest*
5689   eval "ac_cv_func_$ac_func=no"
5690 fi
5691 rm -f conftest*
5692 fi
5693
5694 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5695   echo "$ac_t""yes" 1>&6
5696     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5697   cat >> confdefs.h <<EOF
5698 #define $ac_tr_func 1
5699 EOF
5700  
5701 else
5702   echo "$ac_t""no" 1>&6
5703 fi
5704 done
5705
5706 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5707 do
5708 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5709 echo "configure:5710: checking for $ac_func" >&5
5710 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5711   echo $ac_n "(cached) $ac_c" 1>&6
5712 else
5713   cat > conftest.$ac_ext <<EOF
5714 #line 5715 "configure"
5715 #include "confdefs.h"
5716 /* System header to define __stub macros and hopefully few prototypes,
5717     which can conflict with char $ac_func(); below.  */
5718 #include <assert.h>
5719 /* Override any gcc2 internal prototype to avoid an error.  */
5720 /* We use char because int might match the return type of a gcc2
5721     builtin and then its argument prototype would still apply.  */
5722 char $ac_func();
5723
5724 int main() {
5725
5726 /* The GNU C library defines this for functions which it implements
5727     to always fail with ENOSYS.  Some functions are actually named
5728     something starting with __ and the normal name is an alias.  */
5729 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5730 choke me
5731 #else
5732 $ac_func();
5733 #endif
5734
5735 ; return 0; }
5736 EOF
5737 if { (eval echo configure:5738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5738   rm -rf conftest*
5739   eval "ac_cv_func_$ac_func=yes"
5740 else
5741   echo "configure: failed program was:" >&5
5742   cat conftest.$ac_ext >&5
5743   rm -rf conftest*
5744   eval "ac_cv_func_$ac_func=no"
5745 fi
5746 rm -f conftest*
5747 fi
5748
5749 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5750   echo "$ac_t""yes" 1>&6
5751     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5752   cat >> confdefs.h <<EOF
5753 #define $ac_tr_func 1
5754 EOF
5755  
5756 else
5757   echo "$ac_t""no" 1>&6
5758 fi
5759 done
5760
5761 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5762 do
5763 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5764 echo "configure:5765: checking for $ac_func" >&5
5765 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5766   echo $ac_n "(cached) $ac_c" 1>&6
5767 else
5768   cat > conftest.$ac_ext <<EOF
5769 #line 5770 "configure"
5770 #include "confdefs.h"
5771 /* System header to define __stub macros and hopefully few prototypes,
5772     which can conflict with char $ac_func(); below.  */
5773 #include <assert.h>
5774 /* Override any gcc2 internal prototype to avoid an error.  */
5775 /* We use char because int might match the return type of a gcc2
5776     builtin and then its argument prototype would still apply.  */
5777 char $ac_func();
5778
5779 int main() {
5780
5781 /* The GNU C library defines this for functions which it implements
5782     to always fail with ENOSYS.  Some functions are actually named
5783     something starting with __ and the normal name is an alias.  */
5784 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5785 choke me
5786 #else
5787 $ac_func();
5788 #endif
5789
5790 ; return 0; }
5791 EOF
5792 if { (eval echo configure:5793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5793   rm -rf conftest*
5794   eval "ac_cv_func_$ac_func=yes"
5795 else
5796   echo "configure: failed program was:" >&5
5797   cat conftest.$ac_ext >&5
5798   rm -rf conftest*
5799   eval "ac_cv_func_$ac_func=no"
5800 fi
5801 rm -f conftest*
5802 fi
5803
5804 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5805   echo "$ac_t""yes" 1>&6
5806     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5807   cat >> confdefs.h <<EOF
5808 #define $ac_tr_func 1
5809 EOF
5810  
5811 else
5812   echo "$ac_t""no" 1>&6
5813 fi
5814 done
5815
5816 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5817 do
5818 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5819 echo "configure:5820: checking for $ac_func" >&5
5820 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5821   echo $ac_n "(cached) $ac_c" 1>&6
5822 else
5823   cat > conftest.$ac_ext <<EOF
5824 #line 5825 "configure"
5825 #include "confdefs.h"
5826 /* System header to define __stub macros and hopefully few prototypes,
5827     which can conflict with char $ac_func(); below.  */
5828 #include <assert.h>
5829 /* Override any gcc2 internal prototype to avoid an error.  */
5830 /* We use char because int might match the return type of a gcc2
5831     builtin and then its argument prototype would still apply.  */
5832 char $ac_func();
5833
5834 int main() {
5835
5836 /* The GNU C library defines this for functions which it implements
5837     to always fail with ENOSYS.  Some functions are actually named
5838     something starting with __ and the normal name is an alias.  */
5839 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5840 choke me
5841 #else
5842 $ac_func();
5843 #endif
5844
5845 ; return 0; }
5846 EOF
5847 if { (eval echo configure:5848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5848   rm -rf conftest*
5849   eval "ac_cv_func_$ac_func=yes"
5850 else
5851   echo "configure: failed program was:" >&5
5852   cat conftest.$ac_ext >&5
5853   rm -rf conftest*
5854   eval "ac_cv_func_$ac_func=no"
5855 fi
5856 rm -f conftest*
5857 fi
5858
5859 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5860   echo "$ac_t""yes" 1>&6
5861     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5862   cat >> confdefs.h <<EOF
5863 #define $ac_tr_func 1
5864 EOF
5865  
5866 else
5867   echo "$ac_t""no" 1>&6
5868 fi
5869 done
5870
5871 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5872 do
5873 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5874 echo "configure:5875: checking for $ac_func" >&5
5875 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5876   echo $ac_n "(cached) $ac_c" 1>&6
5877 else
5878   cat > conftest.$ac_ext <<EOF
5879 #line 5880 "configure"
5880 #include "confdefs.h"
5881 /* System header to define __stub macros and hopefully few prototypes,
5882     which can conflict with char $ac_func(); below.  */
5883 #include <assert.h>
5884 /* Override any gcc2 internal prototype to avoid an error.  */
5885 /* We use char because int might match the return type of a gcc2
5886     builtin and then its argument prototype would still apply.  */
5887 char $ac_func();
5888
5889 int main() {
5890
5891 /* The GNU C library defines this for functions which it implements
5892     to always fail with ENOSYS.  Some functions are actually named
5893     something starting with __ and the normal name is an alias.  */
5894 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5895 choke me
5896 #else
5897 $ac_func();
5898 #endif
5899
5900 ; return 0; }
5901 EOF
5902 if { (eval echo configure:5903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5903   rm -rf conftest*
5904   eval "ac_cv_func_$ac_func=yes"
5905 else
5906   echo "configure: failed program was:" >&5
5907   cat conftest.$ac_ext >&5
5908   rm -rf conftest*
5909   eval "ac_cv_func_$ac_func=no"
5910 fi
5911 rm -f conftest*
5912 fi
5913
5914 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5915   echo "$ac_t""yes" 1>&6
5916     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5917   cat >> confdefs.h <<EOF
5918 #define $ac_tr_func 1
5919 EOF
5920  
5921 else
5922   echo "$ac_t""no" 1>&6
5923 fi
5924 done
5925
5926 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5927 do
5928 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5929 echo "configure:5930: checking for $ac_func" >&5
5930 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5931   echo $ac_n "(cached) $ac_c" 1>&6
5932 else
5933   cat > conftest.$ac_ext <<EOF
5934 #line 5935 "configure"
5935 #include "confdefs.h"
5936 /* System header to define __stub macros and hopefully few prototypes,
5937     which can conflict with char $ac_func(); below.  */
5938 #include <assert.h>
5939 /* Override any gcc2 internal prototype to avoid an error.  */
5940 /* We use char because int might match the return type of a gcc2
5941     builtin and then its argument prototype would still apply.  */
5942 char $ac_func();
5943
5944 int main() {
5945
5946 /* The GNU C library defines this for functions which it implements
5947     to always fail with ENOSYS.  Some functions are actually named
5948     something starting with __ and the normal name is an alias.  */
5949 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5950 choke me
5951 #else
5952 $ac_func();
5953 #endif
5954
5955 ; return 0; }
5956 EOF
5957 if { (eval echo configure:5958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5958   rm -rf conftest*
5959   eval "ac_cv_func_$ac_func=yes"
5960 else
5961   echo "configure: failed program was:" >&5
5962   cat conftest.$ac_ext >&5
5963   rm -rf conftest*
5964   eval "ac_cv_func_$ac_func=no"
5965 fi
5966 rm -f conftest*
5967 fi
5968
5969 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5970   echo "$ac_t""yes" 1>&6
5971     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5972   cat >> confdefs.h <<EOF
5973 #define $ac_tr_func 1
5974 EOF
5975  
5976 else
5977   echo "$ac_t""no" 1>&6
5978 fi
5979 done
5980
5981 for ac_func in syslog vsyslog getgrouplist
5982 do
5983 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5984 echo "configure:5985: checking for $ac_func" >&5
5985 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5986   echo $ac_n "(cached) $ac_c" 1>&6
5987 else
5988   cat > conftest.$ac_ext <<EOF
5989 #line 5990 "configure"
5990 #include "confdefs.h"
5991 /* System header to define __stub macros and hopefully few prototypes,
5992     which can conflict with char $ac_func(); below.  */
5993 #include <assert.h>
5994 /* Override any gcc2 internal prototype to avoid an error.  */
5995 /* We use char because int might match the return type of a gcc2
5996     builtin and then its argument prototype would still apply.  */
5997 char $ac_func();
5998
5999 int main() {
6000
6001 /* The GNU C library defines this for functions which it implements
6002     to always fail with ENOSYS.  Some functions are actually named
6003     something starting with __ and the normal name is an alias.  */
6004 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6005 choke me
6006 #else
6007 $ac_func();
6008 #endif
6009
6010 ; return 0; }
6011 EOF
6012 if { (eval echo configure:6013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6013   rm -rf conftest*
6014   eval "ac_cv_func_$ac_func=yes"
6015 else
6016   echo "configure: failed program was:" >&5
6017   cat conftest.$ac_ext >&5
6018   rm -rf conftest*
6019   eval "ac_cv_func_$ac_func=no"
6020 fi
6021 rm -f conftest*
6022 fi
6023
6024 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6025   echo "$ac_t""yes" 1>&6
6026     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6027   cat >> confdefs.h <<EOF
6028 #define $ac_tr_func 1
6029 EOF
6030  
6031 else
6032   echo "$ac_t""no" 1>&6
6033 fi
6034 done
6035
6036 # setbuffer is needed for smbtorture
6037 for ac_func in setbuffer
6038 do
6039 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6040 echo "configure:6041: checking for $ac_func" >&5
6041 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6042   echo $ac_n "(cached) $ac_c" 1>&6
6043 else
6044   cat > conftest.$ac_ext <<EOF
6045 #line 6046 "configure"
6046 #include "confdefs.h"
6047 /* System header to define __stub macros and hopefully few prototypes,
6048     which can conflict with char $ac_func(); below.  */
6049 #include <assert.h>
6050 /* Override any gcc2 internal prototype to avoid an error.  */
6051 /* We use char because int might match the return type of a gcc2
6052     builtin and then its argument prototype would still apply.  */
6053 char $ac_func();
6054
6055 int main() {
6056
6057 /* The GNU C library defines this for functions which it implements
6058     to always fail with ENOSYS.  Some functions are actually named
6059     something starting with __ and the normal name is an alias.  */
6060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6061 choke me
6062 #else
6063 $ac_func();
6064 #endif
6065
6066 ; return 0; }
6067 EOF
6068 if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6069   rm -rf conftest*
6070   eval "ac_cv_func_$ac_func=yes"
6071 else
6072   echo "configure: failed program was:" >&5
6073   cat conftest.$ac_ext >&5
6074   rm -rf conftest*
6075   eval "ac_cv_func_$ac_func=no"
6076 fi
6077 rm -f conftest*
6078 fi
6079
6080 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6081   echo "$ac_t""yes" 1>&6
6082     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6083   cat >> confdefs.h <<EOF
6084 #define $ac_tr_func 1
6085 EOF
6086  
6087 else
6088   echo "$ac_t""no" 1>&6
6089 fi
6090 done
6091
6092
6093 # syscall() is needed for smbwrapper.
6094 for ac_func in syscall
6095 do
6096 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6097 echo "configure:6098: checking for $ac_func" >&5
6098 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6099   echo $ac_n "(cached) $ac_c" 1>&6
6100 else
6101   cat > conftest.$ac_ext <<EOF
6102 #line 6103 "configure"
6103 #include "confdefs.h"
6104 /* System header to define __stub macros and hopefully few prototypes,
6105     which can conflict with char $ac_func(); below.  */
6106 #include <assert.h>
6107 /* Override any gcc2 internal prototype to avoid an error.  */
6108 /* We use char because int might match the return type of a gcc2
6109     builtin and then its argument prototype would still apply.  */
6110 char $ac_func();
6111
6112 int main() {
6113
6114 /* The GNU C library defines this for functions which it implements
6115     to always fail with ENOSYS.  Some functions are actually named
6116     something starting with __ and the normal name is an alias.  */
6117 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6118 choke me
6119 #else
6120 $ac_func();
6121 #endif
6122
6123 ; return 0; }
6124 EOF
6125 if { (eval echo configure:6126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6126   rm -rf conftest*
6127   eval "ac_cv_func_$ac_func=yes"
6128 else
6129   echo "configure: failed program was:" >&5
6130   cat conftest.$ac_ext >&5
6131   rm -rf conftest*
6132   eval "ac_cv_func_$ac_func=no"
6133 fi
6134 rm -f conftest*
6135 fi
6136
6137 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6138   echo "$ac_t""yes" 1>&6
6139     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6140   cat >> confdefs.h <<EOF
6141 #define $ac_tr_func 1
6142 EOF
6143  
6144 else
6145   echo "$ac_t""no" 1>&6
6146 fi
6147 done
6148
6149
6150 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6151 do
6152 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6153 echo "configure:6154: checking for $ac_func" >&5
6154 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6155   echo $ac_n "(cached) $ac_c" 1>&6
6156 else
6157   cat > conftest.$ac_ext <<EOF
6158 #line 6159 "configure"
6159 #include "confdefs.h"
6160 /* System header to define __stub macros and hopefully few prototypes,
6161     which can conflict with char $ac_func(); below.  */
6162 #include <assert.h>
6163 /* Override any gcc2 internal prototype to avoid an error.  */
6164 /* We use char because int might match the return type of a gcc2
6165     builtin and then its argument prototype would still apply.  */
6166 char $ac_func();
6167
6168 int main() {
6169
6170 /* The GNU C library defines this for functions which it implements
6171     to always fail with ENOSYS.  Some functions are actually named
6172     something starting with __ and the normal name is an alias.  */
6173 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6174 choke me
6175 #else
6176 $ac_func();
6177 #endif
6178
6179 ; return 0; }
6180 EOF
6181 if { (eval echo configure:6182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6182   rm -rf conftest*
6183   eval "ac_cv_func_$ac_func=yes"
6184 else
6185   echo "configure: failed program was:" >&5
6186   cat conftest.$ac_ext >&5
6187   rm -rf conftest*
6188   eval "ac_cv_func_$ac_func=no"
6189 fi
6190 rm -f conftest*
6191 fi
6192
6193 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6194   echo "$ac_t""yes" 1>&6
6195     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6196   cat >> confdefs.h <<EOF
6197 #define $ac_tr_func 1
6198 EOF
6199  
6200 else
6201   echo "$ac_t""no" 1>&6
6202 fi
6203 done
6204
6205 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6206 do
6207 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6208 echo "configure:6209: checking for $ac_func" >&5
6209 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6210   echo $ac_n "(cached) $ac_c" 1>&6
6211 else
6212   cat > conftest.$ac_ext <<EOF
6213 #line 6214 "configure"
6214 #include "confdefs.h"
6215 /* System header to define __stub macros and hopefully few prototypes,
6216     which can conflict with char $ac_func(); below.  */
6217 #include <assert.h>
6218 /* Override any gcc2 internal prototype to avoid an error.  */
6219 /* We use char because int might match the return type of a gcc2
6220     builtin and then its argument prototype would still apply.  */
6221 char $ac_func();
6222
6223 int main() {
6224
6225 /* The GNU C library defines this for functions which it implements
6226     to always fail with ENOSYS.  Some functions are actually named
6227     something starting with __ and the normal name is an alias.  */
6228 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6229 choke me
6230 #else
6231 $ac_func();
6232 #endif
6233
6234 ; return 0; }
6235 EOF
6236 if { (eval echo configure:6237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6237   rm -rf conftest*
6238   eval "ac_cv_func_$ac_func=yes"
6239 else
6240   echo "configure: failed program was:" >&5
6241   cat conftest.$ac_ext >&5
6242   rm -rf conftest*
6243   eval "ac_cv_func_$ac_func=no"
6244 fi
6245 rm -f conftest*
6246 fi
6247
6248 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6249   echo "$ac_t""yes" 1>&6
6250     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6251   cat >> confdefs.h <<EOF
6252 #define $ac_tr_func 1
6253 EOF
6254  
6255 else
6256   echo "$ac_t""no" 1>&6
6257 fi
6258 done
6259
6260 for ac_func in __getcwd _getcwd
6261 do
6262 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6263 echo "configure:6264: checking for $ac_func" >&5
6264 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6265   echo $ac_n "(cached) $ac_c" 1>&6
6266 else
6267   cat > conftest.$ac_ext <<EOF
6268 #line 6269 "configure"
6269 #include "confdefs.h"
6270 /* System header to define __stub macros and hopefully few prototypes,
6271     which can conflict with char $ac_func(); below.  */
6272 #include <assert.h>
6273 /* Override any gcc2 internal prototype to avoid an error.  */
6274 /* We use char because int might match the return type of a gcc2
6275     builtin and then its argument prototype would still apply.  */
6276 char $ac_func();
6277
6278 int main() {
6279
6280 /* The GNU C library defines this for functions which it implements
6281     to always fail with ENOSYS.  Some functions are actually named
6282     something starting with __ and the normal name is an alias.  */
6283 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6284 choke me
6285 #else
6286 $ac_func();
6287 #endif
6288
6289 ; return 0; }
6290 EOF
6291 if { (eval echo configure:6292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6292   rm -rf conftest*
6293   eval "ac_cv_func_$ac_func=yes"
6294 else
6295   echo "configure: failed program was:" >&5
6296   cat conftest.$ac_ext >&5
6297   rm -rf conftest*
6298   eval "ac_cv_func_$ac_func=no"
6299 fi
6300 rm -f conftest*
6301 fi
6302
6303 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6304   echo "$ac_t""yes" 1>&6
6305     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6306   cat >> confdefs.h <<EOF
6307 #define $ac_tr_func 1
6308 EOF
6309  
6310 else
6311   echo "$ac_t""no" 1>&6
6312 fi
6313 done
6314
6315 for ac_func in __xstat __fxstat __lxstat
6316 do
6317 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6318 echo "configure:6319: checking for $ac_func" >&5
6319 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6320   echo $ac_n "(cached) $ac_c" 1>&6
6321 else
6322   cat > conftest.$ac_ext <<EOF
6323 #line 6324 "configure"
6324 #include "confdefs.h"
6325 /* System header to define __stub macros and hopefully few prototypes,
6326     which can conflict with char $ac_func(); below.  */
6327 #include <assert.h>
6328 /* Override any gcc2 internal prototype to avoid an error.  */
6329 /* We use char because int might match the return type of a gcc2
6330     builtin and then its argument prototype would still apply.  */
6331 char $ac_func();
6332
6333 int main() {
6334
6335 /* The GNU C library defines this for functions which it implements
6336     to always fail with ENOSYS.  Some functions are actually named
6337     something starting with __ and the normal name is an alias.  */
6338 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6339 choke me
6340 #else
6341 $ac_func();
6342 #endif
6343
6344 ; return 0; }
6345 EOF
6346 if { (eval echo configure:6347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6347   rm -rf conftest*
6348   eval "ac_cv_func_$ac_func=yes"
6349 else
6350   echo "configure: failed program was:" >&5
6351   cat conftest.$ac_ext >&5
6352   rm -rf conftest*
6353   eval "ac_cv_func_$ac_func=no"
6354 fi
6355 rm -f conftest*
6356 fi
6357
6358 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6359   echo "$ac_t""yes" 1>&6
6360     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6361   cat >> confdefs.h <<EOF
6362 #define $ac_tr_func 1
6363 EOF
6364  
6365 else
6366   echo "$ac_t""no" 1>&6
6367 fi
6368 done
6369
6370 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6371 do
6372 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6373 echo "configure:6374: checking for $ac_func" >&5
6374 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6375   echo $ac_n "(cached) $ac_c" 1>&6
6376 else
6377   cat > conftest.$ac_ext <<EOF
6378 #line 6379 "configure"
6379 #include "confdefs.h"
6380 /* System header to define __stub macros and hopefully few prototypes,
6381     which can conflict with char $ac_func(); below.  */
6382 #include <assert.h>
6383 /* Override any gcc2 internal prototype to avoid an error.  */
6384 /* We use char because int might match the return type of a gcc2
6385     builtin and then its argument prototype would still apply.  */
6386 char $ac_func();
6387
6388 int main() {
6389
6390 /* The GNU C library defines this for functions which it implements
6391     to always fail with ENOSYS.  Some functions are actually named
6392     something starting with __ and the normal name is an alias.  */
6393 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6394 choke me
6395 #else
6396 $ac_func();
6397 #endif
6398
6399 ; return 0; }
6400 EOF
6401 if { (eval echo configure:6402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6402   rm -rf conftest*
6403   eval "ac_cv_func_$ac_func=yes"
6404 else
6405   echo "configure: failed program was:" >&5
6406   cat conftest.$ac_ext >&5
6407   rm -rf conftest*
6408   eval "ac_cv_func_$ac_func=no"
6409 fi
6410 rm -f conftest*
6411 fi
6412
6413 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6414   echo "$ac_t""yes" 1>&6
6415     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6416   cat >> confdefs.h <<EOF
6417 #define $ac_tr_func 1
6418 EOF
6419  
6420 else
6421   echo "$ac_t""no" 1>&6
6422 fi
6423 done
6424
6425 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6426 do
6427 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6428 echo "configure:6429: checking for $ac_func" >&5
6429 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6430   echo $ac_n "(cached) $ac_c" 1>&6
6431 else
6432   cat > conftest.$ac_ext <<EOF
6433 #line 6434 "configure"
6434 #include "confdefs.h"
6435 /* System header to define __stub macros and hopefully few prototypes,
6436     which can conflict with char $ac_func(); below.  */
6437 #include <assert.h>
6438 /* Override any gcc2 internal prototype to avoid an error.  */
6439 /* We use char because int might match the return type of a gcc2
6440     builtin and then its argument prototype would still apply.  */
6441 char $ac_func();
6442
6443 int main() {
6444
6445 /* The GNU C library defines this for functions which it implements
6446     to always fail with ENOSYS.  Some functions are actually named
6447     something starting with __ and the normal name is an alias.  */
6448 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6449 choke me
6450 #else
6451 $ac_func();
6452 #endif
6453
6454 ; return 0; }
6455 EOF
6456 if { (eval echo configure:6457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6457   rm -rf conftest*
6458   eval "ac_cv_func_$ac_func=yes"
6459 else
6460   echo "configure: failed program was:" >&5
6461   cat conftest.$ac_ext >&5
6462   rm -rf conftest*
6463   eval "ac_cv_func_$ac_func=no"
6464 fi
6465 rm -f conftest*
6466 fi
6467
6468 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6469   echo "$ac_t""yes" 1>&6
6470     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6471   cat >> confdefs.h <<EOF
6472 #define $ac_tr_func 1
6473 EOF
6474  
6475 else
6476   echo "$ac_t""no" 1>&6
6477 fi
6478 done
6479
6480 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6481 do
6482 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6483 echo "configure:6484: checking for $ac_func" >&5
6484 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6485   echo $ac_n "(cached) $ac_c" 1>&6
6486 else
6487   cat > conftest.$ac_ext <<EOF
6488 #line 6489 "configure"
6489 #include "confdefs.h"
6490 /* System header to define __stub macros and hopefully few prototypes,
6491     which can conflict with char $ac_func(); below.  */
6492 #include <assert.h>
6493 /* Override any gcc2 internal prototype to avoid an error.  */
6494 /* We use char because int might match the return type of a gcc2
6495     builtin and then its argument prototype would still apply.  */
6496 char $ac_func();
6497
6498 int main() {
6499
6500 /* The GNU C library defines this for functions which it implements
6501     to always fail with ENOSYS.  Some functions are actually named
6502     something starting with __ and the normal name is an alias.  */
6503 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6504 choke me
6505 #else
6506 $ac_func();
6507 #endif
6508
6509 ; return 0; }
6510 EOF
6511 if { (eval echo configure:6512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6512   rm -rf conftest*
6513   eval "ac_cv_func_$ac_func=yes"
6514 else
6515   echo "configure: failed program was:" >&5
6516   cat conftest.$ac_ext >&5
6517   rm -rf conftest*
6518   eval "ac_cv_func_$ac_func=no"
6519 fi
6520 rm -f conftest*
6521 fi
6522
6523 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6524   echo "$ac_t""yes" 1>&6
6525     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6526   cat >> confdefs.h <<EOF
6527 #define $ac_tr_func 1
6528 EOF
6529  
6530 else
6531   echo "$ac_t""no" 1>&6
6532 fi
6533 done
6534
6535 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6536 do
6537 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6538 echo "configure:6539: checking for $ac_func" >&5
6539 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6540   echo $ac_n "(cached) $ac_c" 1>&6
6541 else
6542   cat > conftest.$ac_ext <<EOF
6543 #line 6544 "configure"
6544 #include "confdefs.h"
6545 /* System header to define __stub macros and hopefully few prototypes,
6546     which can conflict with char $ac_func(); below.  */
6547 #include <assert.h>
6548 /* Override any gcc2 internal prototype to avoid an error.  */
6549 /* We use char because int might match the return type of a gcc2
6550     builtin and then its argument prototype would still apply.  */
6551 char $ac_func();
6552
6553 int main() {
6554
6555 /* The GNU C library defines this for functions which it implements
6556     to always fail with ENOSYS.  Some functions are actually named
6557     something starting with __ and the normal name is an alias.  */
6558 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6559 choke me
6560 #else
6561 $ac_func();
6562 #endif
6563
6564 ; return 0; }
6565 EOF
6566 if { (eval echo configure:6567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6567   rm -rf conftest*
6568   eval "ac_cv_func_$ac_func=yes"
6569 else
6570   echo "configure: failed program was:" >&5
6571   cat conftest.$ac_ext >&5
6572   rm -rf conftest*
6573   eval "ac_cv_func_$ac_func=no"
6574 fi
6575 rm -f conftest*
6576 fi
6577
6578 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6579   echo "$ac_t""yes" 1>&6
6580     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6581   cat >> confdefs.h <<EOF
6582 #define $ac_tr_func 1
6583 EOF
6584  
6585 else
6586   echo "$ac_t""no" 1>&6
6587 fi
6588 done
6589
6590 for ac_func in _write __write _fork __fork
6591 do
6592 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6593 echo "configure:6594: checking for $ac_func" >&5
6594 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6595   echo $ac_n "(cached) $ac_c" 1>&6
6596 else
6597   cat > conftest.$ac_ext <<EOF
6598 #line 6599 "configure"
6599 #include "confdefs.h"
6600 /* System header to define __stub macros and hopefully few prototypes,
6601     which can conflict with char $ac_func(); below.  */
6602 #include <assert.h>
6603 /* Override any gcc2 internal prototype to avoid an error.  */
6604 /* We use char because int might match the return type of a gcc2
6605     builtin and then its argument prototype would still apply.  */
6606 char $ac_func();
6607
6608 int main() {
6609
6610 /* The GNU C library defines this for functions which it implements
6611     to always fail with ENOSYS.  Some functions are actually named
6612     something starting with __ and the normal name is an alias.  */
6613 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6614 choke me
6615 #else
6616 $ac_func();
6617 #endif
6618
6619 ; return 0; }
6620 EOF
6621 if { (eval echo configure:6622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6622   rm -rf conftest*
6623   eval "ac_cv_func_$ac_func=yes"
6624 else
6625   echo "configure: failed program was:" >&5
6626   cat conftest.$ac_ext >&5
6627   rm -rf conftest*
6628   eval "ac_cv_func_$ac_func=no"
6629 fi
6630 rm -f conftest*
6631 fi
6632
6633 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6634   echo "$ac_t""yes" 1>&6
6635     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6636   cat >> confdefs.h <<EOF
6637 #define $ac_tr_func 1
6638 EOF
6639  
6640 else
6641   echo "$ac_t""no" 1>&6
6642 fi
6643 done
6644
6645 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6646 do
6647 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6648 echo "configure:6649: checking for $ac_func" >&5
6649 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6650   echo $ac_n "(cached) $ac_c" 1>&6
6651 else
6652   cat > conftest.$ac_ext <<EOF
6653 #line 6654 "configure"
6654 #include "confdefs.h"
6655 /* System header to define __stub macros and hopefully few prototypes,
6656     which can conflict with char $ac_func(); below.  */
6657 #include <assert.h>
6658 /* Override any gcc2 internal prototype to avoid an error.  */
6659 /* We use char because int might match the return type of a gcc2
6660     builtin and then its argument prototype would still apply.  */
6661 char $ac_func();
6662
6663 int main() {
6664
6665 /* The GNU C library defines this for functions which it implements
6666     to always fail with ENOSYS.  Some functions are actually named
6667     something starting with __ and the normal name is an alias.  */
6668 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6669 choke me
6670 #else
6671 $ac_func();
6672 #endif
6673
6674 ; return 0; }
6675 EOF
6676 if { (eval echo configure:6677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6677   rm -rf conftest*
6678   eval "ac_cv_func_$ac_func=yes"
6679 else
6680   echo "configure: failed program was:" >&5
6681   cat conftest.$ac_ext >&5
6682   rm -rf conftest*
6683   eval "ac_cv_func_$ac_func=no"
6684 fi
6685 rm -f conftest*
6686 fi
6687
6688 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6689   echo "$ac_t""yes" 1>&6
6690     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6691   cat >> confdefs.h <<EOF
6692 #define $ac_tr_func 1
6693 EOF
6694  
6695 else
6696   echo "$ac_t""no" 1>&6
6697 fi
6698 done
6699
6700 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6701 do
6702 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6703 echo "configure:6704: checking for $ac_func" >&5
6704 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6705   echo $ac_n "(cached) $ac_c" 1>&6
6706 else
6707   cat > conftest.$ac_ext <<EOF
6708 #line 6709 "configure"
6709 #include "confdefs.h"
6710 /* System header to define __stub macros and hopefully few prototypes,
6711     which can conflict with char $ac_func(); below.  */
6712 #include <assert.h>
6713 /* Override any gcc2 internal prototype to avoid an error.  */
6714 /* We use char because int might match the return type of a gcc2
6715     builtin and then its argument prototype would still apply.  */
6716 char $ac_func();
6717
6718 int main() {
6719
6720 /* The GNU C library defines this for functions which it implements
6721     to always fail with ENOSYS.  Some functions are actually named
6722     something starting with __ and the normal name is an alias.  */
6723 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6724 choke me
6725 #else
6726 $ac_func();
6727 #endif
6728
6729 ; return 0; }
6730 EOF
6731 if { (eval echo configure:6732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6732   rm -rf conftest*
6733   eval "ac_cv_func_$ac_func=yes"
6734 else
6735   echo "configure: failed program was:" >&5
6736   cat conftest.$ac_ext >&5
6737   rm -rf conftest*
6738   eval "ac_cv_func_$ac_func=no"
6739 fi
6740 rm -f conftest*
6741 fi
6742
6743 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6744   echo "$ac_t""yes" 1>&6
6745     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6746   cat >> confdefs.h <<EOF
6747 #define $ac_tr_func 1
6748 EOF
6749  
6750 else
6751   echo "$ac_t""no" 1>&6
6752 fi
6753 done
6754
6755 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6756 do
6757 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6758 echo "configure:6759: checking for $ac_func" >&5
6759 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6760   echo $ac_n "(cached) $ac_c" 1>&6
6761 else
6762   cat > conftest.$ac_ext <<EOF
6763 #line 6764 "configure"
6764 #include "confdefs.h"
6765 /* System header to define __stub macros and hopefully few prototypes,
6766     which can conflict with char $ac_func(); below.  */
6767 #include <assert.h>
6768 /* Override any gcc2 internal prototype to avoid an error.  */
6769 /* We use char because int might match the return type of a gcc2
6770     builtin and then its argument prototype would still apply.  */
6771 char $ac_func();
6772
6773 int main() {
6774
6775 /* The GNU C library defines this for functions which it implements
6776     to always fail with ENOSYS.  Some functions are actually named
6777     something starting with __ and the normal name is an alias.  */
6778 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6779 choke me
6780 #else
6781 $ac_func();
6782 #endif
6783
6784 ; return 0; }
6785 EOF
6786 if { (eval echo configure:6787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6787   rm -rf conftest*
6788   eval "ac_cv_func_$ac_func=yes"
6789 else
6790   echo "configure: failed program was:" >&5
6791   cat conftest.$ac_ext >&5
6792   rm -rf conftest*
6793   eval "ac_cv_func_$ac_func=no"
6794 fi
6795 rm -f conftest*
6796 fi
6797
6798 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6799   echo "$ac_t""yes" 1>&6
6800     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6801   cat >> confdefs.h <<EOF
6802 #define $ac_tr_func 1
6803 EOF
6804  
6805 else
6806   echo "$ac_t""no" 1>&6
6807 fi
6808 done
6809
6810 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6811 do
6812 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6813 echo "configure:6814: checking for $ac_func" >&5
6814 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6815   echo $ac_n "(cached) $ac_c" 1>&6
6816 else
6817   cat > conftest.$ac_ext <<EOF
6818 #line 6819 "configure"
6819 #include "confdefs.h"
6820 /* System header to define __stub macros and hopefully few prototypes,
6821     which can conflict with char $ac_func(); below.  */
6822 #include <assert.h>
6823 /* Override any gcc2 internal prototype to avoid an error.  */
6824 /* We use char because int might match the return type of a gcc2
6825     builtin and then its argument prototype would still apply.  */
6826 char $ac_func();
6827
6828 int main() {
6829
6830 /* The GNU C library defines this for functions which it implements
6831     to always fail with ENOSYS.  Some functions are actually named
6832     something starting with __ and the normal name is an alias.  */
6833 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6834 choke me
6835 #else
6836 $ac_func();
6837 #endif
6838
6839 ; return 0; }
6840 EOF
6841 if { (eval echo configure:6842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6842   rm -rf conftest*
6843   eval "ac_cv_func_$ac_func=yes"
6844 else
6845   echo "configure: failed program was:" >&5
6846   cat conftest.$ac_ext >&5
6847   rm -rf conftest*
6848   eval "ac_cv_func_$ac_func=no"
6849 fi
6850 rm -f conftest*
6851 fi
6852
6853 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6854   echo "$ac_t""yes" 1>&6
6855     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6856   cat >> confdefs.h <<EOF
6857 #define $ac_tr_func 1
6858 EOF
6859  
6860 else
6861   echo "$ac_t""no" 1>&6
6862 fi
6863 done
6864
6865 for ac_func in open64 _open64 __open64 creat64
6866 do
6867 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6868 echo "configure:6869: checking for $ac_func" >&5
6869 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6870   echo $ac_n "(cached) $ac_c" 1>&6
6871 else
6872   cat > conftest.$ac_ext <<EOF
6873 #line 6874 "configure"
6874 #include "confdefs.h"
6875 /* System header to define __stub macros and hopefully few prototypes,
6876     which can conflict with char $ac_func(); below.  */
6877 #include <assert.h>
6878 /* Override any gcc2 internal prototype to avoid an error.  */
6879 /* We use char because int might match the return type of a gcc2
6880     builtin and then its argument prototype would still apply.  */
6881 char $ac_func();
6882
6883 int main() {
6884
6885 /* The GNU C library defines this for functions which it implements
6886     to always fail with ENOSYS.  Some functions are actually named
6887     something starting with __ and the normal name is an alias.  */
6888 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6889 choke me
6890 #else
6891 $ac_func();
6892 #endif
6893
6894 ; return 0; }
6895 EOF
6896 if { (eval echo configure:6897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6897   rm -rf conftest*
6898   eval "ac_cv_func_$ac_func=yes"
6899 else
6900   echo "configure: failed program was:" >&5
6901   cat conftest.$ac_ext >&5
6902   rm -rf conftest*
6903   eval "ac_cv_func_$ac_func=no"
6904 fi
6905 rm -f conftest*
6906 fi
6907
6908 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6909   echo "$ac_t""yes" 1>&6
6910     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6911   cat >> confdefs.h <<EOF
6912 #define $ac_tr_func 1
6913 EOF
6914  
6915 else
6916   echo "$ac_t""no" 1>&6
6917 fi
6918 done
6919
6920
6921 #
6922 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6923 #
6924
6925 if test x$ac_cv_func_stat64 = xno ; then
6926   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6927 echo "configure:6928: checking for stat64 in <sys/stat.h>" >&5
6928   cat > conftest.$ac_ext <<EOF
6929 #line 6930 "configure"
6930 #include "confdefs.h"
6931
6932 #if defined(HAVE_UNISTD_H)
6933 #include <unistd.h>
6934 #endif
6935 #include <sys/stat.h>
6936
6937 int main() {
6938 struct stat64 st64; exit(stat64(".",&st64));
6939 ; return 0; }
6940 EOF
6941 if { (eval echo configure:6942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6942   rm -rf conftest*
6943   ac_cv_func_stat64=yes
6944 else
6945   echo "configure: failed program was:" >&5
6946   cat conftest.$ac_ext >&5
6947 fi
6948 rm -f conftest*
6949   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6950   if test x$ac_cv_func_stat64 = xyes ; then
6951     cat >> confdefs.h <<\EOF
6952 #define HAVE_STAT64 1
6953 EOF
6954
6955   fi
6956 fi
6957
6958 if test x$ac_cv_func_lstat64 = xno ; then
6959   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6960 echo "configure:6961: checking for lstat64 in <sys/stat.h>" >&5
6961   cat > conftest.$ac_ext <<EOF
6962 #line 6963 "configure"
6963 #include "confdefs.h"
6964
6965 #if defined(HAVE_UNISTD_H)
6966 #include <unistd.h>
6967 #endif
6968 #include <sys/stat.h>
6969
6970 int main() {
6971 struct stat64 st64; exit(lstat64(".",&st64));
6972 ; return 0; }
6973 EOF
6974 if { (eval echo configure:6975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6975   rm -rf conftest*
6976   ac_cv_func_lstat64=yes
6977 else
6978   echo "configure: failed program was:" >&5
6979   cat conftest.$ac_ext >&5
6980 fi
6981 rm -f conftest*
6982   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6983   if test x$ac_cv_func_lstat64 = xyes ; then
6984     cat >> confdefs.h <<\EOF
6985 #define HAVE_LSTAT64 1
6986 EOF
6987
6988   fi
6989 fi
6990
6991 if test x$ac_cv_func_fstat64 = xno ; then
6992   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6993 echo "configure:6994: checking for fstat64 in <sys/stat.h>" >&5
6994   cat > conftest.$ac_ext <<EOF
6995 #line 6996 "configure"
6996 #include "confdefs.h"
6997
6998 #if defined(HAVE_UNISTD_H)
6999 #include <unistd.h>
7000 #endif
7001 #include <sys/stat.h>
7002
7003 int main() {
7004 struct stat64 st64; exit(fstat64(0,&st64));
7005 ; return 0; }
7006 EOF
7007 if { (eval echo configure:7008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7008   rm -rf conftest*
7009   ac_cv_func_fstat64=yes
7010 else
7011   echo "configure: failed program was:" >&5
7012   cat conftest.$ac_ext >&5
7013 fi
7014 rm -f conftest*
7015   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
7016   if test x$ac_cv_func_fstat64 = xyes ; then
7017     cat >> confdefs.h <<\EOF
7018 #define HAVE_FSTAT64 1
7019 EOF
7020
7021   fi
7022 fi
7023
7024 #####################################
7025 # we might need the resolv library on some systems
7026 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
7027 echo "configure:7028: checking for dn_expand in -lresolv" >&5
7028 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
7029 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7030   echo $ac_n "(cached) $ac_c" 1>&6
7031 else
7032   ac_save_LIBS="$LIBS"
7033 LIBS="-lresolv  $LIBS"
7034 cat > conftest.$ac_ext <<EOF
7035 #line 7036 "configure"
7036 #include "confdefs.h"
7037 /* Override any gcc2 internal prototype to avoid an error.  */
7038 /* We use char because int might match the return type of a gcc2
7039     builtin and then its argument prototype would still apply.  */
7040 char dn_expand();
7041
7042 int main() {
7043 dn_expand()
7044 ; return 0; }
7045 EOF
7046 if { (eval echo configure:7047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7047   rm -rf conftest*
7048   eval "ac_cv_lib_$ac_lib_var=yes"
7049 else
7050   echo "configure: failed program was:" >&5
7051   cat conftest.$ac_ext >&5
7052   rm -rf conftest*
7053   eval "ac_cv_lib_$ac_lib_var=no"
7054 fi
7055 rm -f conftest*
7056 LIBS="$ac_save_LIBS"
7057
7058 fi
7059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7060   echo "$ac_t""yes" 1>&6
7061     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7062     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7063   cat >> confdefs.h <<EOF
7064 #define $ac_tr_lib 1
7065 EOF
7066
7067   LIBS="-lresolv $LIBS"
7068
7069 else
7070   echo "$ac_t""no" 1>&6
7071 fi
7072
7073
7074 #
7075 # Check for the functions putprpwnam, set_auth_parameters,
7076 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7077 # Needed for OSF1 and HPUX.
7078 #
7079
7080 case "$LIBS" in
7081   *-lsecurity*) for ac_func in putprpwnam
7082 do
7083 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7084 echo "configure:7085: checking for $ac_func" >&5
7085 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7086   echo $ac_n "(cached) $ac_c" 1>&6
7087 else
7088   cat > conftest.$ac_ext <<EOF
7089 #line 7090 "configure"
7090 #include "confdefs.h"
7091 /* System header to define __stub macros and hopefully few prototypes,
7092     which can conflict with char $ac_func(); below.  */
7093 #include <assert.h>
7094 /* Override any gcc2 internal prototype to avoid an error.  */
7095 /* We use char because int might match the return type of a gcc2
7096     builtin and then its argument prototype would still apply.  */
7097 char $ac_func();
7098
7099 int main() {
7100
7101 /* The GNU C library defines this for functions which it implements
7102     to always fail with ENOSYS.  Some functions are actually named
7103     something starting with __ and the normal name is an alias.  */
7104 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7105 choke me
7106 #else
7107 $ac_func();
7108 #endif
7109
7110 ; return 0; }
7111 EOF
7112 if { (eval echo configure:7113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7113   rm -rf conftest*
7114   eval "ac_cv_func_$ac_func=yes"
7115 else
7116   echo "configure: failed program was:" >&5
7117   cat conftest.$ac_ext >&5
7118   rm -rf conftest*
7119   eval "ac_cv_func_$ac_func=no"
7120 fi
7121 rm -f conftest*
7122 fi
7123
7124 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7125   echo "$ac_t""yes" 1>&6
7126     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7127   cat >> confdefs.h <<EOF
7128 #define $ac_tr_func 1
7129 EOF
7130  
7131 else
7132   echo "$ac_t""no" 1>&6
7133 fi
7134 done
7135  ;;
7136   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7137 echo "configure:7138: checking for putprpwnam in -lsecurity" >&5
7138 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7139 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7140   echo $ac_n "(cached) $ac_c" 1>&6
7141 else
7142   ac_save_LIBS="$LIBS"
7143 LIBS="-lsecurity  $LIBS"
7144 cat > conftest.$ac_ext <<EOF
7145 #line 7146 "configure"
7146 #include "confdefs.h"
7147 /* Override any gcc2 internal prototype to avoid an error.  */
7148 /* We use char because int might match the return type of a gcc2
7149     builtin and then its argument prototype would still apply.  */
7150 char putprpwnam();
7151
7152 int main() {
7153 putprpwnam()
7154 ; return 0; }
7155 EOF
7156 if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7157   rm -rf conftest*
7158   eval "ac_cv_lib_$ac_lib_var=yes"
7159 else
7160   echo "configure: failed program was:" >&5
7161   cat conftest.$ac_ext >&5
7162   rm -rf conftest*
7163   eval "ac_cv_lib_$ac_lib_var=no"
7164 fi
7165 rm -f conftest*
7166 LIBS="$ac_save_LIBS"
7167
7168 fi
7169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7170   echo "$ac_t""yes" 1>&6
7171     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7172     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7173   cat >> confdefs.h <<EOF
7174 #define $ac_tr_lib 1
7175 EOF
7176
7177   LIBS="-lsecurity $LIBS"
7178
7179 else
7180   echo "$ac_t""no" 1>&6
7181 fi
7182  
7183      for ac_func in putprpwnam
7184 do
7185 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7186 echo "configure:7187: checking for $ac_func" >&5
7187 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7188   echo $ac_n "(cached) $ac_c" 1>&6
7189 else
7190   cat > conftest.$ac_ext <<EOF
7191 #line 7192 "configure"
7192 #include "confdefs.h"
7193 /* System header to define __stub macros and hopefully few prototypes,
7194     which can conflict with char $ac_func(); below.  */
7195 #include <assert.h>
7196 /* Override any gcc2 internal prototype to avoid an error.  */
7197 /* We use char because int might match the return type of a gcc2
7198     builtin and then its argument prototype would still apply.  */
7199 char $ac_func();
7200
7201 int main() {
7202
7203 /* The GNU C library defines this for functions which it implements
7204     to always fail with ENOSYS.  Some functions are actually named
7205     something starting with __ and the normal name is an alias.  */
7206 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7207 choke me
7208 #else
7209 $ac_func();
7210 #endif
7211
7212 ; return 0; }
7213 EOF
7214 if { (eval echo configure:7215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7215   rm -rf conftest*
7216   eval "ac_cv_func_$ac_func=yes"
7217 else
7218   echo "configure: failed program was:" >&5
7219   cat conftest.$ac_ext >&5
7220   rm -rf conftest*
7221   eval "ac_cv_func_$ac_func=no"
7222 fi
7223 rm -f conftest*
7224 fi
7225
7226 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7227   echo "$ac_t""yes" 1>&6
7228     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7229   cat >> confdefs.h <<EOF
7230 #define $ac_tr_func 1
7231 EOF
7232  
7233 else
7234   echo "$ac_t""no" 1>&6
7235 fi
7236 done
7237
7238   ;;
7239   esac
7240
7241 case "$LIBS" in
7242   *-lsec*) for ac_func in putprpwnam
7243 do
7244 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7245 echo "configure:7246: checking for $ac_func" >&5
7246 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7247   echo $ac_n "(cached) $ac_c" 1>&6
7248 else
7249   cat > conftest.$ac_ext <<EOF
7250 #line 7251 "configure"
7251 #include "confdefs.h"
7252 /* System header to define __stub macros and hopefully few prototypes,
7253     which can conflict with char $ac_func(); below.  */
7254 #include <assert.h>
7255 /* Override any gcc2 internal prototype to avoid an error.  */
7256 /* We use char because int might match the return type of a gcc2
7257     builtin and then its argument prototype would still apply.  */
7258 char $ac_func();
7259
7260 int main() {
7261
7262 /* The GNU C library defines this for functions which it implements
7263     to always fail with ENOSYS.  Some functions are actually named
7264     something starting with __ and the normal name is an alias.  */
7265 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7266 choke me
7267 #else
7268 $ac_func();
7269 #endif
7270
7271 ; return 0; }
7272 EOF
7273 if { (eval echo configure:7274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7274   rm -rf conftest*
7275   eval "ac_cv_func_$ac_func=yes"
7276 else
7277   echo "configure: failed program was:" >&5
7278   cat conftest.$ac_ext >&5
7279   rm -rf conftest*
7280   eval "ac_cv_func_$ac_func=no"
7281 fi
7282 rm -f conftest*
7283 fi
7284
7285 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7286   echo "$ac_t""yes" 1>&6
7287     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7288   cat >> confdefs.h <<EOF
7289 #define $ac_tr_func 1
7290 EOF
7291  
7292 else
7293   echo "$ac_t""no" 1>&6
7294 fi
7295 done
7296  ;;
7297   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7298 echo "configure:7299: checking for putprpwnam in -lsec" >&5
7299 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7300 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7301   echo $ac_n "(cached) $ac_c" 1>&6
7302 else
7303   ac_save_LIBS="$LIBS"
7304 LIBS="-lsec  $LIBS"
7305 cat > conftest.$ac_ext <<EOF
7306 #line 7307 "configure"
7307 #include "confdefs.h"
7308 /* Override any gcc2 internal prototype to avoid an error.  */
7309 /* We use char because int might match the return type of a gcc2
7310     builtin and then its argument prototype would still apply.  */
7311 char putprpwnam();
7312
7313 int main() {
7314 putprpwnam()
7315 ; return 0; }
7316 EOF
7317 if { (eval echo configure:7318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7318   rm -rf conftest*
7319   eval "ac_cv_lib_$ac_lib_var=yes"
7320 else
7321   echo "configure: failed program was:" >&5
7322   cat conftest.$ac_ext >&5
7323   rm -rf conftest*
7324   eval "ac_cv_lib_$ac_lib_var=no"
7325 fi
7326 rm -f conftest*
7327 LIBS="$ac_save_LIBS"
7328
7329 fi
7330 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7331   echo "$ac_t""yes" 1>&6
7332     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7333     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7334   cat >> confdefs.h <<EOF
7335 #define $ac_tr_lib 1
7336 EOF
7337
7338   LIBS="-lsec $LIBS"
7339
7340 else
7341   echo "$ac_t""no" 1>&6
7342 fi
7343  
7344      for ac_func in putprpwnam
7345 do
7346 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7347 echo "configure:7348: checking for $ac_func" >&5
7348 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7349   echo $ac_n "(cached) $ac_c" 1>&6
7350 else
7351   cat > conftest.$ac_ext <<EOF
7352 #line 7353 "configure"
7353 #include "confdefs.h"
7354 /* System header to define __stub macros and hopefully few prototypes,
7355     which can conflict with char $ac_func(); below.  */
7356 #include <assert.h>
7357 /* Override any gcc2 internal prototype to avoid an error.  */
7358 /* We use char because int might match the return type of a gcc2
7359     builtin and then its argument prototype would still apply.  */
7360 char $ac_func();
7361
7362 int main() {
7363
7364 /* The GNU C library defines this for functions which it implements
7365     to always fail with ENOSYS.  Some functions are actually named
7366     something starting with __ and the normal name is an alias.  */
7367 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7368 choke me
7369 #else
7370 $ac_func();
7371 #endif
7372
7373 ; return 0; }
7374 EOF
7375 if { (eval echo configure:7376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7376   rm -rf conftest*
7377   eval "ac_cv_func_$ac_func=yes"
7378 else
7379   echo "configure: failed program was:" >&5
7380   cat conftest.$ac_ext >&5
7381   rm -rf conftest*
7382   eval "ac_cv_func_$ac_func=no"
7383 fi
7384 rm -f conftest*
7385 fi
7386
7387 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7388   echo "$ac_t""yes" 1>&6
7389     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7390   cat >> confdefs.h <<EOF
7391 #define $ac_tr_func 1
7392 EOF
7393  
7394 else
7395   echo "$ac_t""no" 1>&6
7396 fi
7397 done
7398
7399   ;;
7400   esac
7401
7402
7403 case "$LIBS" in
7404   *-lsecurity*) for ac_func in set_auth_parameters
7405 do
7406 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7407 echo "configure:7408: checking for $ac_func" >&5
7408 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7409   echo $ac_n "(cached) $ac_c" 1>&6
7410 else
7411   cat > conftest.$ac_ext <<EOF
7412 #line 7413 "configure"
7413 #include "confdefs.h"
7414 /* System header to define __stub macros and hopefully few prototypes,
7415     which can conflict with char $ac_func(); below.  */
7416 #include <assert.h>
7417 /* Override any gcc2 internal prototype to avoid an error.  */
7418 /* We use char because int might match the return type of a gcc2
7419     builtin and then its argument prototype would still apply.  */
7420 char $ac_func();
7421
7422 int main() {
7423
7424 /* The GNU C library defines this for functions which it implements
7425     to always fail with ENOSYS.  Some functions are actually named
7426     something starting with __ and the normal name is an alias.  */
7427 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7428 choke me
7429 #else
7430 $ac_func();
7431 #endif
7432
7433 ; return 0; }
7434 EOF
7435 if { (eval echo configure:7436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7436   rm -rf conftest*
7437   eval "ac_cv_func_$ac_func=yes"
7438 else
7439   echo "configure: failed program was:" >&5
7440   cat conftest.$ac_ext >&5
7441   rm -rf conftest*
7442   eval "ac_cv_func_$ac_func=no"
7443 fi
7444 rm -f conftest*
7445 fi
7446
7447 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7448   echo "$ac_t""yes" 1>&6
7449     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7450   cat >> confdefs.h <<EOF
7451 #define $ac_tr_func 1
7452 EOF
7453  
7454 else
7455   echo "$ac_t""no" 1>&6
7456 fi
7457 done
7458  ;;
7459   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7460 echo "configure:7461: checking for set_auth_parameters in -lsecurity" >&5
7461 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7462 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7463   echo $ac_n "(cached) $ac_c" 1>&6
7464 else
7465   ac_save_LIBS="$LIBS"
7466 LIBS="-lsecurity  $LIBS"
7467 cat > conftest.$ac_ext <<EOF
7468 #line 7469 "configure"
7469 #include "confdefs.h"
7470 /* Override any gcc2 internal prototype to avoid an error.  */
7471 /* We use char because int might match the return type of a gcc2
7472     builtin and then its argument prototype would still apply.  */
7473 char set_auth_parameters();
7474
7475 int main() {
7476 set_auth_parameters()
7477 ; return 0; }
7478 EOF
7479 if { (eval echo configure:7480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7480   rm -rf conftest*
7481   eval "ac_cv_lib_$ac_lib_var=yes"
7482 else
7483   echo "configure: failed program was:" >&5
7484   cat conftest.$ac_ext >&5
7485   rm -rf conftest*
7486   eval "ac_cv_lib_$ac_lib_var=no"
7487 fi
7488 rm -f conftest*
7489 LIBS="$ac_save_LIBS"
7490
7491 fi
7492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7493   echo "$ac_t""yes" 1>&6
7494     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7495     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7496   cat >> confdefs.h <<EOF
7497 #define $ac_tr_lib 1
7498 EOF
7499
7500   LIBS="-lsecurity $LIBS"
7501
7502 else
7503   echo "$ac_t""no" 1>&6
7504 fi
7505  
7506      for ac_func in set_auth_parameters
7507 do
7508 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7509 echo "configure:7510: checking for $ac_func" >&5
7510 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7511   echo $ac_n "(cached) $ac_c" 1>&6
7512 else
7513   cat > conftest.$ac_ext <<EOF
7514 #line 7515 "configure"
7515 #include "confdefs.h"
7516 /* System header to define __stub macros and hopefully few prototypes,
7517     which can conflict with char $ac_func(); below.  */
7518 #include <assert.h>
7519 /* Override any gcc2 internal prototype to avoid an error.  */
7520 /* We use char because int might match the return type of a gcc2
7521     builtin and then its argument prototype would still apply.  */
7522 char $ac_func();
7523
7524 int main() {
7525
7526 /* The GNU C library defines this for functions which it implements
7527     to always fail with ENOSYS.  Some functions are actually named
7528     something starting with __ and the normal name is an alias.  */
7529 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7530 choke me
7531 #else
7532 $ac_func();
7533 #endif
7534
7535 ; return 0; }
7536 EOF
7537 if { (eval echo configure:7538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7538   rm -rf conftest*
7539   eval "ac_cv_func_$ac_func=yes"
7540 else
7541   echo "configure: failed program was:" >&5
7542   cat conftest.$ac_ext >&5
7543   rm -rf conftest*
7544   eval "ac_cv_func_$ac_func=no"
7545 fi
7546 rm -f conftest*
7547 fi
7548
7549 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7550   echo "$ac_t""yes" 1>&6
7551     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7552   cat >> confdefs.h <<EOF
7553 #define $ac_tr_func 1
7554 EOF
7555  
7556 else
7557   echo "$ac_t""no" 1>&6
7558 fi
7559 done
7560
7561   ;;
7562   esac
7563
7564 case "$LIBS" in
7565   *-lsec*) for ac_func in set_auth_parameters
7566 do
7567 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7568 echo "configure:7569: checking for $ac_func" >&5
7569 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7570   echo $ac_n "(cached) $ac_c" 1>&6
7571 else
7572   cat > conftest.$ac_ext <<EOF
7573 #line 7574 "configure"
7574 #include "confdefs.h"
7575 /* System header to define __stub macros and hopefully few prototypes,
7576     which can conflict with char $ac_func(); below.  */
7577 #include <assert.h>
7578 /* Override any gcc2 internal prototype to avoid an error.  */
7579 /* We use char because int might match the return type of a gcc2
7580     builtin and then its argument prototype would still apply.  */
7581 char $ac_func();
7582
7583 int main() {
7584
7585 /* The GNU C library defines this for functions which it implements
7586     to always fail with ENOSYS.  Some functions are actually named
7587     something starting with __ and the normal name is an alias.  */
7588 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7589 choke me
7590 #else
7591 $ac_func();
7592 #endif
7593
7594 ; return 0; }
7595 EOF
7596 if { (eval echo configure:7597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7597   rm -rf conftest*
7598   eval "ac_cv_func_$ac_func=yes"
7599 else
7600   echo "configure: failed program was:" >&5
7601   cat conftest.$ac_ext >&5
7602   rm -rf conftest*
7603   eval "ac_cv_func_$ac_func=no"
7604 fi
7605 rm -f conftest*
7606 fi
7607
7608 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7609   echo "$ac_t""yes" 1>&6
7610     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7611   cat >> confdefs.h <<EOF
7612 #define $ac_tr_func 1
7613 EOF
7614  
7615 else
7616   echo "$ac_t""no" 1>&6
7617 fi
7618 done
7619  ;;
7620   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7621 echo "configure:7622: checking for set_auth_parameters in -lsec" >&5
7622 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7623 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7624   echo $ac_n "(cached) $ac_c" 1>&6
7625 else
7626   ac_save_LIBS="$LIBS"
7627 LIBS="-lsec  $LIBS"
7628 cat > conftest.$ac_ext <<EOF
7629 #line 7630 "configure"
7630 #include "confdefs.h"
7631 /* Override any gcc2 internal prototype to avoid an error.  */
7632 /* We use char because int might match the return type of a gcc2
7633     builtin and then its argument prototype would still apply.  */
7634 char set_auth_parameters();
7635
7636 int main() {
7637 set_auth_parameters()
7638 ; return 0; }
7639 EOF
7640 if { (eval echo configure:7641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7641   rm -rf conftest*
7642   eval "ac_cv_lib_$ac_lib_var=yes"
7643 else
7644   echo "configure: failed program was:" >&5
7645   cat conftest.$ac_ext >&5
7646   rm -rf conftest*
7647   eval "ac_cv_lib_$ac_lib_var=no"
7648 fi
7649 rm -f conftest*
7650 LIBS="$ac_save_LIBS"
7651
7652 fi
7653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7654   echo "$ac_t""yes" 1>&6
7655     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7656     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7657   cat >> confdefs.h <<EOF
7658 #define $ac_tr_lib 1
7659 EOF
7660
7661   LIBS="-lsec $LIBS"
7662
7663 else
7664   echo "$ac_t""no" 1>&6
7665 fi
7666  
7667      for ac_func in set_auth_parameters
7668 do
7669 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7670 echo "configure:7671: checking for $ac_func" >&5
7671 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7672   echo $ac_n "(cached) $ac_c" 1>&6
7673 else
7674   cat > conftest.$ac_ext <<EOF
7675 #line 7676 "configure"
7676 #include "confdefs.h"
7677 /* System header to define __stub macros and hopefully few prototypes,
7678     which can conflict with char $ac_func(); below.  */
7679 #include <assert.h>
7680 /* Override any gcc2 internal prototype to avoid an error.  */
7681 /* We use char because int might match the return type of a gcc2
7682     builtin and then its argument prototype would still apply.  */
7683 char $ac_func();
7684
7685 int main() {
7686
7687 /* The GNU C library defines this for functions which it implements
7688     to always fail with ENOSYS.  Some functions are actually named
7689     something starting with __ and the normal name is an alias.  */
7690 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7691 choke me
7692 #else
7693 $ac_func();
7694 #endif
7695
7696 ; return 0; }
7697 EOF
7698 if { (eval echo configure:7699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7699   rm -rf conftest*
7700   eval "ac_cv_func_$ac_func=yes"
7701 else
7702   echo "configure: failed program was:" >&5
7703   cat conftest.$ac_ext >&5
7704   rm -rf conftest*
7705   eval "ac_cv_func_$ac_func=no"
7706 fi
7707 rm -f conftest*
7708 fi
7709
7710 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7711   echo "$ac_t""yes" 1>&6
7712     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7713   cat >> confdefs.h <<EOF
7714 #define $ac_tr_func 1
7715 EOF
7716  
7717 else
7718   echo "$ac_t""no" 1>&6
7719 fi
7720 done
7721
7722   ;;
7723   esac
7724
7725
7726 # UnixWare 7.x has its getspnam in -lgen
7727 case "$LIBS" in
7728   *-lgen*) for ac_func in getspnam
7729 do
7730 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7731 echo "configure:7732: checking for $ac_func" >&5
7732 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7733   echo $ac_n "(cached) $ac_c" 1>&6
7734 else
7735   cat > conftest.$ac_ext <<EOF
7736 #line 7737 "configure"
7737 #include "confdefs.h"
7738 /* System header to define __stub macros and hopefully few prototypes,
7739     which can conflict with char $ac_func(); below.  */
7740 #include <assert.h>
7741 /* Override any gcc2 internal prototype to avoid an error.  */
7742 /* We use char because int might match the return type of a gcc2
7743     builtin and then its argument prototype would still apply.  */
7744 char $ac_func();
7745
7746 int main() {
7747
7748 /* The GNU C library defines this for functions which it implements
7749     to always fail with ENOSYS.  Some functions are actually named
7750     something starting with __ and the normal name is an alias.  */
7751 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7752 choke me
7753 #else
7754 $ac_func();
7755 #endif
7756
7757 ; return 0; }
7758 EOF
7759 if { (eval echo configure:7760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7760   rm -rf conftest*
7761   eval "ac_cv_func_$ac_func=yes"
7762 else
7763   echo "configure: failed program was:" >&5
7764   cat conftest.$ac_ext >&5
7765   rm -rf conftest*
7766   eval "ac_cv_func_$ac_func=no"
7767 fi
7768 rm -f conftest*
7769 fi
7770
7771 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7772   echo "$ac_t""yes" 1>&6
7773     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7774   cat >> confdefs.h <<EOF
7775 #define $ac_tr_func 1
7776 EOF
7777  
7778 else
7779   echo "$ac_t""no" 1>&6
7780 fi
7781 done
7782  ;;
7783   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7784 echo "configure:7785: checking for getspnam in -lgen" >&5
7785 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7786 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7787   echo $ac_n "(cached) $ac_c" 1>&6
7788 else
7789   ac_save_LIBS="$LIBS"
7790 LIBS="-lgen  $LIBS"
7791 cat > conftest.$ac_ext <<EOF
7792 #line 7793 "configure"
7793 #include "confdefs.h"
7794 /* Override any gcc2 internal prototype to avoid an error.  */
7795 /* We use char because int might match the return type of a gcc2
7796     builtin and then its argument prototype would still apply.  */
7797 char getspnam();
7798
7799 int main() {
7800 getspnam()
7801 ; return 0; }
7802 EOF
7803 if { (eval echo configure:7804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7804   rm -rf conftest*
7805   eval "ac_cv_lib_$ac_lib_var=yes"
7806 else
7807   echo "configure: failed program was:" >&5
7808   cat conftest.$ac_ext >&5
7809   rm -rf conftest*
7810   eval "ac_cv_lib_$ac_lib_var=no"
7811 fi
7812 rm -f conftest*
7813 LIBS="$ac_save_LIBS"
7814
7815 fi
7816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7817   echo "$ac_t""yes" 1>&6
7818     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7819     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7820   cat >> confdefs.h <<EOF
7821 #define $ac_tr_lib 1
7822 EOF
7823
7824   LIBS="-lgen $LIBS"
7825
7826 else
7827   echo "$ac_t""no" 1>&6
7828 fi
7829  
7830      for ac_func in getspnam
7831 do
7832 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7833 echo "configure:7834: checking for $ac_func" >&5
7834 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7835   echo $ac_n "(cached) $ac_c" 1>&6
7836 else
7837   cat > conftest.$ac_ext <<EOF
7838 #line 7839 "configure"
7839 #include "confdefs.h"
7840 /* System header to define __stub macros and hopefully few prototypes,
7841     which can conflict with char $ac_func(); below.  */
7842 #include <assert.h>
7843 /* Override any gcc2 internal prototype to avoid an error.  */
7844 /* We use char because int might match the return type of a gcc2
7845     builtin and then its argument prototype would still apply.  */
7846 char $ac_func();
7847
7848 int main() {
7849
7850 /* The GNU C library defines this for functions which it implements
7851     to always fail with ENOSYS.  Some functions are actually named
7852     something starting with __ and the normal name is an alias.  */
7853 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7854 choke me
7855 #else
7856 $ac_func();
7857 #endif
7858
7859 ; return 0; }
7860 EOF
7861 if { (eval echo configure:7862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7862   rm -rf conftest*
7863   eval "ac_cv_func_$ac_func=yes"
7864 else
7865   echo "configure: failed program was:" >&5
7866   cat conftest.$ac_ext >&5
7867   rm -rf conftest*
7868   eval "ac_cv_func_$ac_func=no"
7869 fi
7870 rm -f conftest*
7871 fi
7872
7873 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7874   echo "$ac_t""yes" 1>&6
7875     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7876   cat >> confdefs.h <<EOF
7877 #define $ac_tr_func 1
7878 EOF
7879  
7880 else
7881   echo "$ac_t""no" 1>&6
7882 fi
7883 done
7884
7885   ;;
7886   esac
7887
7888
7889 case "$LIBS" in
7890   *-lsecurity*) for ac_func in getspnam
7891 do
7892 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7893 echo "configure:7894: checking for $ac_func" >&5
7894 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7895   echo $ac_n "(cached) $ac_c" 1>&6
7896 else
7897   cat > conftest.$ac_ext <<EOF
7898 #line 7899 "configure"
7899 #include "confdefs.h"
7900 /* System header to define __stub macros and hopefully few prototypes,
7901     which can conflict with char $ac_func(); below.  */
7902 #include <assert.h>
7903 /* Override any gcc2 internal prototype to avoid an error.  */
7904 /* We use char because int might match the return type of a gcc2
7905     builtin and then its argument prototype would still apply.  */
7906 char $ac_func();
7907
7908 int main() {
7909
7910 /* The GNU C library defines this for functions which it implements
7911     to always fail with ENOSYS.  Some functions are actually named
7912     something starting with __ and the normal name is an alias.  */
7913 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7914 choke me
7915 #else
7916 $ac_func();
7917 #endif
7918
7919 ; return 0; }
7920 EOF
7921 if { (eval echo configure:7922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7922   rm -rf conftest*
7923   eval "ac_cv_func_$ac_func=yes"
7924 else
7925   echo "configure: failed program was:" >&5
7926   cat conftest.$ac_ext >&5
7927   rm -rf conftest*
7928   eval "ac_cv_func_$ac_func=no"
7929 fi
7930 rm -f conftest*
7931 fi
7932
7933 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7934   echo "$ac_t""yes" 1>&6
7935     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7936   cat >> confdefs.h <<EOF
7937 #define $ac_tr_func 1
7938 EOF
7939  
7940 else
7941   echo "$ac_t""no" 1>&6
7942 fi
7943 done
7944  ;;
7945   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7946 echo "configure:7947: checking for getspnam in -lsecurity" >&5
7947 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7948 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7949   echo $ac_n "(cached) $ac_c" 1>&6
7950 else
7951   ac_save_LIBS="$LIBS"
7952 LIBS="-lsecurity  $LIBS"
7953 cat > conftest.$ac_ext <<EOF
7954 #line 7955 "configure"
7955 #include "confdefs.h"
7956 /* Override any gcc2 internal prototype to avoid an error.  */
7957 /* We use char because int might match the return type of a gcc2
7958     builtin and then its argument prototype would still apply.  */
7959 char getspnam();
7960
7961 int main() {
7962 getspnam()
7963 ; return 0; }
7964 EOF
7965 if { (eval echo configure:7966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7966   rm -rf conftest*
7967   eval "ac_cv_lib_$ac_lib_var=yes"
7968 else
7969   echo "configure: failed program was:" >&5
7970   cat conftest.$ac_ext >&5
7971   rm -rf conftest*
7972   eval "ac_cv_lib_$ac_lib_var=no"
7973 fi
7974 rm -f conftest*
7975 LIBS="$ac_save_LIBS"
7976
7977 fi
7978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7979   echo "$ac_t""yes" 1>&6
7980     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7981     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7982   cat >> confdefs.h <<EOF
7983 #define $ac_tr_lib 1
7984 EOF
7985
7986   LIBS="-lsecurity $LIBS"
7987
7988 else
7989   echo "$ac_t""no" 1>&6
7990 fi
7991  
7992      for ac_func in getspnam
7993 do
7994 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7995 echo "configure:7996: checking for $ac_func" >&5
7996 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7997   echo $ac_n "(cached) $ac_c" 1>&6
7998 else
7999   cat > conftest.$ac_ext <<EOF
8000 #line 8001 "configure"
8001 #include "confdefs.h"
8002 /* System header to define __stub macros and hopefully few prototypes,
8003     which can conflict with char $ac_func(); below.  */
8004 #include <assert.h>
8005 /* Override any gcc2 internal prototype to avoid an error.  */
8006 /* We use char because int might match the return type of a gcc2
8007     builtin and then its argument prototype would still apply.  */
8008 char $ac_func();
8009
8010 int main() {
8011
8012 /* The GNU C library defines this for functions which it implements
8013     to always fail with ENOSYS.  Some functions are actually named
8014     something starting with __ and the normal name is an alias.  */
8015 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8016 choke me
8017 #else
8018 $ac_func();
8019 #endif
8020
8021 ; return 0; }
8022 EOF
8023 if { (eval echo configure:8024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8024   rm -rf conftest*
8025   eval "ac_cv_func_$ac_func=yes"
8026 else
8027   echo "configure: failed program was:" >&5
8028   cat conftest.$ac_ext >&5
8029   rm -rf conftest*
8030   eval "ac_cv_func_$ac_func=no"
8031 fi
8032 rm -f conftest*
8033 fi
8034
8035 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8036   echo "$ac_t""yes" 1>&6
8037     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8038   cat >> confdefs.h <<EOF
8039 #define $ac_tr_func 1
8040 EOF
8041  
8042 else
8043   echo "$ac_t""no" 1>&6
8044 fi
8045 done
8046
8047   ;;
8048   esac
8049
8050 case "$LIBS" in
8051   *-lsec*) for ac_func in getspnam
8052 do
8053 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8054 echo "configure:8055: checking for $ac_func" >&5
8055 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8056   echo $ac_n "(cached) $ac_c" 1>&6
8057 else
8058   cat > conftest.$ac_ext <<EOF
8059 #line 8060 "configure"
8060 #include "confdefs.h"
8061 /* System header to define __stub macros and hopefully few prototypes,
8062     which can conflict with char $ac_func(); below.  */
8063 #include <assert.h>
8064 /* Override any gcc2 internal prototype to avoid an error.  */
8065 /* We use char because int might match the return type of a gcc2
8066     builtin and then its argument prototype would still apply.  */
8067 char $ac_func();
8068
8069 int main() {
8070
8071 /* The GNU C library defines this for functions which it implements
8072     to always fail with ENOSYS.  Some functions are actually named
8073     something starting with __ and the normal name is an alias.  */
8074 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8075 choke me
8076 #else
8077 $ac_func();
8078 #endif
8079
8080 ; return 0; }
8081 EOF
8082 if { (eval echo configure:8083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8083   rm -rf conftest*
8084   eval "ac_cv_func_$ac_func=yes"
8085 else
8086   echo "configure: failed program was:" >&5
8087   cat conftest.$ac_ext >&5
8088   rm -rf conftest*
8089   eval "ac_cv_func_$ac_func=no"
8090 fi
8091 rm -f conftest*
8092 fi
8093
8094 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8095   echo "$ac_t""yes" 1>&6
8096     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8097   cat >> confdefs.h <<EOF
8098 #define $ac_tr_func 1
8099 EOF
8100  
8101 else
8102   echo "$ac_t""no" 1>&6
8103 fi
8104 done
8105  ;;
8106   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8107 echo "configure:8108: checking for getspnam in -lsec" >&5
8108 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8109 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8110   echo $ac_n "(cached) $ac_c" 1>&6
8111 else
8112   ac_save_LIBS="$LIBS"
8113 LIBS="-lsec  $LIBS"
8114 cat > conftest.$ac_ext <<EOF
8115 #line 8116 "configure"
8116 #include "confdefs.h"
8117 /* Override any gcc2 internal prototype to avoid an error.  */
8118 /* We use char because int might match the return type of a gcc2
8119     builtin and then its argument prototype would still apply.  */
8120 char getspnam();
8121
8122 int main() {
8123 getspnam()
8124 ; return 0; }
8125 EOF
8126 if { (eval echo configure:8127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8127   rm -rf conftest*
8128   eval "ac_cv_lib_$ac_lib_var=yes"
8129 else
8130   echo "configure: failed program was:" >&5
8131   cat conftest.$ac_ext >&5
8132   rm -rf conftest*
8133   eval "ac_cv_lib_$ac_lib_var=no"
8134 fi
8135 rm -f conftest*
8136 LIBS="$ac_save_LIBS"
8137
8138 fi
8139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8140   echo "$ac_t""yes" 1>&6
8141     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8142     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8143   cat >> confdefs.h <<EOF
8144 #define $ac_tr_lib 1
8145 EOF
8146
8147   LIBS="-lsec $LIBS"
8148
8149 else
8150   echo "$ac_t""no" 1>&6
8151 fi
8152  
8153      for ac_func in getspnam
8154 do
8155 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8156 echo "configure:8157: checking for $ac_func" >&5
8157 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8158   echo $ac_n "(cached) $ac_c" 1>&6
8159 else
8160   cat > conftest.$ac_ext <<EOF
8161 #line 8162 "configure"
8162 #include "confdefs.h"
8163 /* System header to define __stub macros and hopefully few prototypes,
8164     which can conflict with char $ac_func(); below.  */
8165 #include <assert.h>
8166 /* Override any gcc2 internal prototype to avoid an error.  */
8167 /* We use char because int might match the return type of a gcc2
8168     builtin and then its argument prototype would still apply.  */
8169 char $ac_func();
8170
8171 int main() {
8172
8173 /* The GNU C library defines this for functions which it implements
8174     to always fail with ENOSYS.  Some functions are actually named
8175     something starting with __ and the normal name is an alias.  */
8176 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8177 choke me
8178 #else
8179 $ac_func();
8180 #endif
8181
8182 ; return 0; }
8183 EOF
8184 if { (eval echo configure:8185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8185   rm -rf conftest*
8186   eval "ac_cv_func_$ac_func=yes"
8187 else
8188   echo "configure: failed program was:" >&5
8189   cat conftest.$ac_ext >&5
8190   rm -rf conftest*
8191   eval "ac_cv_func_$ac_func=no"
8192 fi
8193 rm -f conftest*
8194 fi
8195
8196 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8197   echo "$ac_t""yes" 1>&6
8198     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8199   cat >> confdefs.h <<EOF
8200 #define $ac_tr_func 1
8201 EOF
8202  
8203 else
8204   echo "$ac_t""no" 1>&6
8205 fi
8206 done
8207
8208   ;;
8209   esac
8210
8211
8212 case "$LIBS" in
8213   *-lsecurity*) for ac_func in bigcrypt
8214 do
8215 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8216 echo "configure:8217: checking for $ac_func" >&5
8217 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8218   echo $ac_n "(cached) $ac_c" 1>&6
8219 else
8220   cat > conftest.$ac_ext <<EOF
8221 #line 8222 "configure"
8222 #include "confdefs.h"
8223 /* System header to define __stub macros and hopefully few prototypes,
8224     which can conflict with char $ac_func(); below.  */
8225 #include <assert.h>
8226 /* Override any gcc2 internal prototype to avoid an error.  */
8227 /* We use char because int might match the return type of a gcc2
8228     builtin and then its argument prototype would still apply.  */
8229 char $ac_func();
8230
8231 int main() {
8232
8233 /* The GNU C library defines this for functions which it implements
8234     to always fail with ENOSYS.  Some functions are actually named
8235     something starting with __ and the normal name is an alias.  */
8236 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8237 choke me
8238 #else
8239 $ac_func();
8240 #endif
8241
8242 ; return 0; }
8243 EOF
8244 if { (eval echo configure:8245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8245   rm -rf conftest*
8246   eval "ac_cv_func_$ac_func=yes"
8247 else
8248   echo "configure: failed program was:" >&5
8249   cat conftest.$ac_ext >&5
8250   rm -rf conftest*
8251   eval "ac_cv_func_$ac_func=no"
8252 fi
8253 rm -f conftest*
8254 fi
8255
8256 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8257   echo "$ac_t""yes" 1>&6
8258     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8259   cat >> confdefs.h <<EOF
8260 #define $ac_tr_func 1
8261 EOF
8262  
8263 else
8264   echo "$ac_t""no" 1>&6
8265 fi
8266 done
8267  ;;
8268   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8269 echo "configure:8270: checking for bigcrypt in -lsecurity" >&5
8270 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8271 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8272   echo $ac_n "(cached) $ac_c" 1>&6
8273 else
8274   ac_save_LIBS="$LIBS"
8275 LIBS="-lsecurity  $LIBS"
8276 cat > conftest.$ac_ext <<EOF
8277 #line 8278 "configure"
8278 #include "confdefs.h"
8279 /* Override any gcc2 internal prototype to avoid an error.  */
8280 /* We use char because int might match the return type of a gcc2
8281     builtin and then its argument prototype would still apply.  */
8282 char bigcrypt();
8283
8284 int main() {
8285 bigcrypt()
8286 ; return 0; }
8287 EOF
8288 if { (eval echo configure:8289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8289   rm -rf conftest*
8290   eval "ac_cv_lib_$ac_lib_var=yes"
8291 else
8292   echo "configure: failed program was:" >&5
8293   cat conftest.$ac_ext >&5
8294   rm -rf conftest*
8295   eval "ac_cv_lib_$ac_lib_var=no"
8296 fi
8297 rm -f conftest*
8298 LIBS="$ac_save_LIBS"
8299
8300 fi
8301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8302   echo "$ac_t""yes" 1>&6
8303     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8304     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8305   cat >> confdefs.h <<EOF
8306 #define $ac_tr_lib 1
8307 EOF
8308
8309   LIBS="-lsecurity $LIBS"
8310
8311 else
8312   echo "$ac_t""no" 1>&6
8313 fi
8314  
8315      for ac_func in bigcrypt
8316 do
8317 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8318 echo "configure:8319: checking for $ac_func" >&5
8319 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8320   echo $ac_n "(cached) $ac_c" 1>&6
8321 else
8322   cat > conftest.$ac_ext <<EOF
8323 #line 8324 "configure"
8324 #include "confdefs.h"
8325 /* System header to define __stub macros and hopefully few prototypes,
8326     which can conflict with char $ac_func(); below.  */
8327 #include <assert.h>
8328 /* Override any gcc2 internal prototype to avoid an error.  */
8329 /* We use char because int might match the return type of a gcc2
8330     builtin and then its argument prototype would still apply.  */
8331 char $ac_func();
8332
8333 int main() {
8334
8335 /* The GNU C library defines this for functions which it implements
8336     to always fail with ENOSYS.  Some functions are actually named
8337     something starting with __ and the normal name is an alias.  */
8338 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8339 choke me
8340 #else
8341 $ac_func();
8342 #endif
8343
8344 ; return 0; }
8345 EOF
8346 if { (eval echo configure:8347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8347   rm -rf conftest*
8348   eval "ac_cv_func_$ac_func=yes"
8349 else
8350   echo "configure: failed program was:" >&5
8351   cat conftest.$ac_ext >&5
8352   rm -rf conftest*
8353   eval "ac_cv_func_$ac_func=no"
8354 fi
8355 rm -f conftest*
8356 fi
8357
8358 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8359   echo "$ac_t""yes" 1>&6
8360     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8361   cat >> confdefs.h <<EOF
8362 #define $ac_tr_func 1
8363 EOF
8364  
8365 else
8366   echo "$ac_t""no" 1>&6
8367 fi
8368 done
8369
8370   ;;
8371   esac
8372
8373 case "$LIBS" in
8374   *-lsec*) for ac_func in bigcrypt
8375 do
8376 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8377 echo "configure:8378: checking for $ac_func" >&5
8378 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8379   echo $ac_n "(cached) $ac_c" 1>&6
8380 else
8381   cat > conftest.$ac_ext <<EOF
8382 #line 8383 "configure"
8383 #include "confdefs.h"
8384 /* System header to define __stub macros and hopefully few prototypes,
8385     which can conflict with char $ac_func(); below.  */
8386 #include <assert.h>
8387 /* Override any gcc2 internal prototype to avoid an error.  */
8388 /* We use char because int might match the return type of a gcc2
8389     builtin and then its argument prototype would still apply.  */
8390 char $ac_func();
8391
8392 int main() {
8393
8394 /* The GNU C library defines this for functions which it implements
8395     to always fail with ENOSYS.  Some functions are actually named
8396     something starting with __ and the normal name is an alias.  */
8397 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8398 choke me
8399 #else
8400 $ac_func();
8401 #endif
8402
8403 ; return 0; }
8404 EOF
8405 if { (eval echo configure:8406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8406   rm -rf conftest*
8407   eval "ac_cv_func_$ac_func=yes"
8408 else
8409   echo "configure: failed program was:" >&5
8410   cat conftest.$ac_ext >&5
8411   rm -rf conftest*
8412   eval "ac_cv_func_$ac_func=no"
8413 fi
8414 rm -f conftest*
8415 fi
8416
8417 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8418   echo "$ac_t""yes" 1>&6
8419     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8420   cat >> confdefs.h <<EOF
8421 #define $ac_tr_func 1
8422 EOF
8423  
8424 else
8425   echo "$ac_t""no" 1>&6
8426 fi
8427 done
8428  ;;
8429   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8430 echo "configure:8431: checking for bigcrypt in -lsec" >&5
8431 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8432 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8433   echo $ac_n "(cached) $ac_c" 1>&6
8434 else
8435   ac_save_LIBS="$LIBS"
8436 LIBS="-lsec  $LIBS"
8437 cat > conftest.$ac_ext <<EOF
8438 #line 8439 "configure"
8439 #include "confdefs.h"
8440 /* Override any gcc2 internal prototype to avoid an error.  */
8441 /* We use char because int might match the return type of a gcc2
8442     builtin and then its argument prototype would still apply.  */
8443 char bigcrypt();
8444
8445 int main() {
8446 bigcrypt()
8447 ; return 0; }
8448 EOF
8449 if { (eval echo configure:8450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8450   rm -rf conftest*
8451   eval "ac_cv_lib_$ac_lib_var=yes"
8452 else
8453   echo "configure: failed program was:" >&5
8454   cat conftest.$ac_ext >&5
8455   rm -rf conftest*
8456   eval "ac_cv_lib_$ac_lib_var=no"
8457 fi
8458 rm -f conftest*
8459 LIBS="$ac_save_LIBS"
8460
8461 fi
8462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8463   echo "$ac_t""yes" 1>&6
8464     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8465     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8466   cat >> confdefs.h <<EOF
8467 #define $ac_tr_lib 1
8468 EOF
8469
8470   LIBS="-lsec $LIBS"
8471
8472 else
8473   echo "$ac_t""no" 1>&6
8474 fi
8475  
8476      for ac_func in bigcrypt
8477 do
8478 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8479 echo "configure:8480: checking for $ac_func" >&5
8480 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8481   echo $ac_n "(cached) $ac_c" 1>&6
8482 else
8483   cat > conftest.$ac_ext <<EOF
8484 #line 8485 "configure"
8485 #include "confdefs.h"
8486 /* System header to define __stub macros and hopefully few prototypes,
8487     which can conflict with char $ac_func(); below.  */
8488 #include <assert.h>
8489 /* Override any gcc2 internal prototype to avoid an error.  */
8490 /* We use char because int might match the return type of a gcc2
8491     builtin and then its argument prototype would still apply.  */
8492 char $ac_func();
8493
8494 int main() {
8495
8496 /* The GNU C library defines this for functions which it implements
8497     to always fail with ENOSYS.  Some functions are actually named
8498     something starting with __ and the normal name is an alias.  */
8499 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8500 choke me
8501 #else
8502 $ac_func();
8503 #endif
8504
8505 ; return 0; }
8506 EOF
8507 if { (eval echo configure:8508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8508   rm -rf conftest*
8509   eval "ac_cv_func_$ac_func=yes"
8510 else
8511   echo "configure: failed program was:" >&5
8512   cat conftest.$ac_ext >&5
8513   rm -rf conftest*
8514   eval "ac_cv_func_$ac_func=no"
8515 fi
8516 rm -f conftest*
8517 fi
8518
8519 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8520   echo "$ac_t""yes" 1>&6
8521     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8522   cat >> confdefs.h <<EOF
8523 #define $ac_tr_func 1
8524 EOF
8525  
8526 else
8527   echo "$ac_t""no" 1>&6
8528 fi
8529 done
8530
8531   ;;
8532   esac
8533
8534
8535 case "$LIBS" in
8536   *-lsecurity*) for ac_func in getprpwnam
8537 do
8538 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8539 echo "configure:8540: checking for $ac_func" >&5
8540 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8541   echo $ac_n "(cached) $ac_c" 1>&6
8542 else
8543   cat > conftest.$ac_ext <<EOF
8544 #line 8545 "configure"
8545 #include "confdefs.h"
8546 /* System header to define __stub macros and hopefully few prototypes,
8547     which can conflict with char $ac_func(); below.  */
8548 #include <assert.h>
8549 /* Override any gcc2 internal prototype to avoid an error.  */
8550 /* We use char because int might match the return type of a gcc2
8551     builtin and then its argument prototype would still apply.  */
8552 char $ac_func();
8553
8554 int main() {
8555
8556 /* The GNU C library defines this for functions which it implements
8557     to always fail with ENOSYS.  Some functions are actually named
8558     something starting with __ and the normal name is an alias.  */
8559 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8560 choke me
8561 #else
8562 $ac_func();
8563 #endif
8564
8565 ; return 0; }
8566 EOF
8567 if { (eval echo configure:8568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8568   rm -rf conftest*
8569   eval "ac_cv_func_$ac_func=yes"
8570 else
8571   echo "configure: failed program was:" >&5
8572   cat conftest.$ac_ext >&5
8573   rm -rf conftest*
8574   eval "ac_cv_func_$ac_func=no"
8575 fi
8576 rm -f conftest*
8577 fi
8578
8579 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8580   echo "$ac_t""yes" 1>&6
8581     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8582   cat >> confdefs.h <<EOF
8583 #define $ac_tr_func 1
8584 EOF
8585  
8586 else
8587   echo "$ac_t""no" 1>&6
8588 fi
8589 done
8590  ;;
8591   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8592 echo "configure:8593: checking for getprpwnam in -lsecurity" >&5
8593 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8594 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8595   echo $ac_n "(cached) $ac_c" 1>&6
8596 else
8597   ac_save_LIBS="$LIBS"
8598 LIBS="-lsecurity  $LIBS"
8599 cat > conftest.$ac_ext <<EOF
8600 #line 8601 "configure"
8601 #include "confdefs.h"
8602 /* Override any gcc2 internal prototype to avoid an error.  */
8603 /* We use char because int might match the return type of a gcc2
8604     builtin and then its argument prototype would still apply.  */
8605 char getprpwnam();
8606
8607 int main() {
8608 getprpwnam()
8609 ; return 0; }
8610 EOF
8611 if { (eval echo configure:8612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8612   rm -rf conftest*
8613   eval "ac_cv_lib_$ac_lib_var=yes"
8614 else
8615   echo "configure: failed program was:" >&5
8616   cat conftest.$ac_ext >&5
8617   rm -rf conftest*
8618   eval "ac_cv_lib_$ac_lib_var=no"
8619 fi
8620 rm -f conftest*
8621 LIBS="$ac_save_LIBS"
8622
8623 fi
8624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8625   echo "$ac_t""yes" 1>&6
8626     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8627     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8628   cat >> confdefs.h <<EOF
8629 #define $ac_tr_lib 1
8630 EOF
8631
8632   LIBS="-lsecurity $LIBS"
8633
8634 else
8635   echo "$ac_t""no" 1>&6
8636 fi
8637  
8638      for ac_func in getprpwnam
8639 do
8640 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8641 echo "configure:8642: checking for $ac_func" >&5
8642 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8643   echo $ac_n "(cached) $ac_c" 1>&6
8644 else
8645   cat > conftest.$ac_ext <<EOF
8646 #line 8647 "configure"
8647 #include "confdefs.h"
8648 /* System header to define __stub macros and hopefully few prototypes,
8649     which can conflict with char $ac_func(); below.  */
8650 #include <assert.h>
8651 /* Override any gcc2 internal prototype to avoid an error.  */
8652 /* We use char because int might match the return type of a gcc2
8653     builtin and then its argument prototype would still apply.  */
8654 char $ac_func();
8655
8656 int main() {
8657
8658 /* The GNU C library defines this for functions which it implements
8659     to always fail with ENOSYS.  Some functions are actually named
8660     something starting with __ and the normal name is an alias.  */
8661 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8662 choke me
8663 #else
8664 $ac_func();
8665 #endif
8666
8667 ; return 0; }
8668 EOF
8669 if { (eval echo configure:8670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8670   rm -rf conftest*
8671   eval "ac_cv_func_$ac_func=yes"
8672 else
8673   echo "configure: failed program was:" >&5
8674   cat conftest.$ac_ext >&5
8675   rm -rf conftest*
8676   eval "ac_cv_func_$ac_func=no"
8677 fi
8678 rm -f conftest*
8679 fi
8680
8681 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8682   echo "$ac_t""yes" 1>&6
8683     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8684   cat >> confdefs.h <<EOF
8685 #define $ac_tr_func 1
8686 EOF
8687  
8688 else
8689   echo "$ac_t""no" 1>&6
8690 fi
8691 done
8692
8693   ;;
8694   esac
8695
8696 case "$LIBS" in
8697   *-lsec*) for ac_func in getprpwnam
8698 do
8699 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8700 echo "configure:8701: checking for $ac_func" >&5
8701 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8702   echo $ac_n "(cached) $ac_c" 1>&6
8703 else
8704   cat > conftest.$ac_ext <<EOF
8705 #line 8706 "configure"
8706 #include "confdefs.h"
8707 /* System header to define __stub macros and hopefully few prototypes,
8708     which can conflict with char $ac_func(); below.  */
8709 #include <assert.h>
8710 /* Override any gcc2 internal prototype to avoid an error.  */
8711 /* We use char because int might match the return type of a gcc2
8712     builtin and then its argument prototype would still apply.  */
8713 char $ac_func();
8714
8715 int main() {
8716
8717 /* The GNU C library defines this for functions which it implements
8718     to always fail with ENOSYS.  Some functions are actually named
8719     something starting with __ and the normal name is an alias.  */
8720 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8721 choke me
8722 #else
8723 $ac_func();
8724 #endif
8725
8726 ; return 0; }
8727 EOF
8728 if { (eval echo configure:8729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8729   rm -rf conftest*
8730   eval "ac_cv_func_$ac_func=yes"
8731 else
8732   echo "configure: failed program was:" >&5
8733   cat conftest.$ac_ext >&5
8734   rm -rf conftest*
8735   eval "ac_cv_func_$ac_func=no"
8736 fi
8737 rm -f conftest*
8738 fi
8739
8740 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8741   echo "$ac_t""yes" 1>&6
8742     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8743   cat >> confdefs.h <<EOF
8744 #define $ac_tr_func 1
8745 EOF
8746  
8747 else
8748   echo "$ac_t""no" 1>&6
8749 fi
8750 done
8751  ;;
8752   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8753 echo "configure:8754: checking for getprpwnam in -lsec" >&5
8754 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8755 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8756   echo $ac_n "(cached) $ac_c" 1>&6
8757 else
8758   ac_save_LIBS="$LIBS"
8759 LIBS="-lsec  $LIBS"
8760 cat > conftest.$ac_ext <<EOF
8761 #line 8762 "configure"
8762 #include "confdefs.h"
8763 /* Override any gcc2 internal prototype to avoid an error.  */
8764 /* We use char because int might match the return type of a gcc2
8765     builtin and then its argument prototype would still apply.  */
8766 char getprpwnam();
8767
8768 int main() {
8769 getprpwnam()
8770 ; return 0; }
8771 EOF
8772 if { (eval echo configure:8773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8773   rm -rf conftest*
8774   eval "ac_cv_lib_$ac_lib_var=yes"
8775 else
8776   echo "configure: failed program was:" >&5
8777   cat conftest.$ac_ext >&5
8778   rm -rf conftest*
8779   eval "ac_cv_lib_$ac_lib_var=no"
8780 fi
8781 rm -f conftest*
8782 LIBS="$ac_save_LIBS"
8783
8784 fi
8785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8786   echo "$ac_t""yes" 1>&6
8787     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8788     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8789   cat >> confdefs.h <<EOF
8790 #define $ac_tr_lib 1
8791 EOF
8792
8793   LIBS="-lsec $LIBS"
8794
8795 else
8796   echo "$ac_t""no" 1>&6
8797 fi
8798  
8799      for ac_func in getprpwnam
8800 do
8801 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8802 echo "configure:8803: checking for $ac_func" >&5
8803 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8804   echo $ac_n "(cached) $ac_c" 1>&6
8805 else
8806   cat > conftest.$ac_ext <<EOF
8807 #line 8808 "configure"
8808 #include "confdefs.h"
8809 /* System header to define __stub macros and hopefully few prototypes,
8810     which can conflict with char $ac_func(); below.  */
8811 #include <assert.h>
8812 /* Override any gcc2 internal prototype to avoid an error.  */
8813 /* We use char because int might match the return type of a gcc2
8814     builtin and then its argument prototype would still apply.  */
8815 char $ac_func();
8816
8817 int main() {
8818
8819 /* The GNU C library defines this for functions which it implements
8820     to always fail with ENOSYS.  Some functions are actually named
8821     something starting with __ and the normal name is an alias.  */
8822 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8823 choke me
8824 #else
8825 $ac_func();
8826 #endif
8827
8828 ; return 0; }
8829 EOF
8830 if { (eval echo configure:8831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8831   rm -rf conftest*
8832   eval "ac_cv_func_$ac_func=yes"
8833 else
8834   echo "configure: failed program was:" >&5
8835   cat conftest.$ac_ext >&5
8836   rm -rf conftest*
8837   eval "ac_cv_func_$ac_func=no"
8838 fi
8839 rm -f conftest*
8840 fi
8841
8842 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8843   echo "$ac_t""yes" 1>&6
8844     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8845   cat >> confdefs.h <<EOF
8846 #define $ac_tr_func 1
8847 EOF
8848  
8849 else
8850   echo "$ac_t""no" 1>&6
8851 fi
8852 done
8853
8854   ;;
8855   esac
8856
8857
8858 # this bit needs to be modified for each OS that is suported by
8859 # smbwrapper. You need to specify how to created a shared library and
8860 # how to compile C code to produce PIC object files
8861
8862 # these are the defaults, good for lots of systems
8863 HOST_OS="$host_os"
8864 LDSHFLAGS="-shared"
8865 SONAMEFLAG="#"
8866 SHLD="\${CC}"
8867 PICFLAG=""
8868 PICSUFFIX="po"
8869 POBAD_CC="#"
8870 SHLIBEXT="so"
8871 # Assume non-shared by default and override below
8872 BLDSHARED="false"
8873 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8874 echo "configure:8875: checking ability to build shared libraries" >&5
8875
8876 # and these are for particular systems
8877 case "$host_os" in
8878                 *linux*)   cat >> confdefs.h <<\EOF
8879 #define LINUX 1
8880 EOF
8881
8882                         BLDSHARED="true"
8883                         LDSHFLAGS="-shared" 
8884                         DYNEXP="-Wl,--export-dynamic"
8885                         PICFLAG="-fPIC"
8886                         SONAMEFLAG="-Wl,-soname="
8887                         cat >> confdefs.h <<\EOF
8888 #define STAT_ST_BLOCKSIZE 512
8889 EOF
8890
8891                 ;;
8892                 *solaris*) cat >> confdefs.h <<\EOF
8893 #define SUNOS5 1
8894 EOF
8895
8896                         BLDSHARED="true"
8897                         LDSHFLAGS="-G"
8898                         SONAMEFLAG="-h "
8899                         if test "${GCC}" = "yes"; then
8900                                 PICFLAG="-fPIC"
8901                                 if test "${ac_cv_prog_gnu_ld}" = "yes"; then
8902                                         DYNEXP="-Wl,-E"
8903                                 fi
8904                         else
8905                                 PICFLAG="-KPIC"
8906                                 ## ${CFLAGS} added for building 64-bit shared 
8907                                 ## libs using Sun's Compiler
8908                                 LDSHFLAGS="-G \${CFLAGS}"
8909                                 POBAD_CC=""
8910                                 PICSUFFIX="po.o"
8911                         fi
8912                         cat >> confdefs.h <<\EOF
8913 #define STAT_ST_BLOCKSIZE 512
8914 EOF
8915
8916                 ;;
8917                 *sunos*) cat >> confdefs.h <<\EOF
8918 #define SUNOS4 1
8919 EOF
8920
8921                         BLDSHARED="true"
8922                         LDSHFLAGS="-G"
8923                         SONAMEFLAG="-Wl,-h,"
8924                         PICFLAG="-KPIC"   # Is this correct for SunOS
8925                 ;;
8926                 *bsd*)  BLDSHARED="true"
8927                         LDSHFLAGS="-shared"
8928                         DYNEXP="-Wl,-Bdynamic"
8929                         SONAMEFLAG="-Wl,-soname,"
8930                         PICFLAG="-fPIC"
8931                         cat >> confdefs.h <<\EOF
8932 #define STAT_ST_BLOCKSIZE 512
8933 EOF
8934
8935                 ;;
8936                 *irix*) cat >> confdefs.h <<\EOF
8937 #define IRIX 1
8938 EOF
8939
8940                         case "$host_os" in
8941                         *irix6*) cat >> confdefs.h <<\EOF
8942 #define IRIX6 1
8943 EOF
8944
8945                         ;;
8946                         esac
8947                         ATTEMPT_WRAP32_BUILD=yes
8948                         BLDSHARED="true"
8949                         LDSHFLAGS="-set_version sgi1.0 -shared"
8950                         SONAMEFLAG="-soname "
8951                         SHLD="\${LD}"
8952                         if test "${GCC}" = "yes"; then
8953                                 PICFLAG="-fPIC"
8954                         else 
8955                                 PICFLAG="-KPIC"
8956                         fi
8957                         cat >> confdefs.h <<\EOF
8958 #define STAT_ST_BLOCKSIZE 512
8959 EOF
8960
8961                 ;;
8962                 *aix*) cat >> confdefs.h <<\EOF
8963 #define AIX 1
8964 EOF
8965
8966                         BLDSHARED="true"
8967                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8968                         DYNEXP="-Wl,-brtl,-bexpall"
8969                         if test "${GCC}" = "yes"; then
8970                                 PICFLAG="-O2"
8971                         else
8972                         PICFLAG="-O2 -qmaxmem=6000"
8973                                 ## for funky AIX compiler using strncpy()
8974                                 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT"
8975                         fi
8976
8977                         cat >> confdefs.h <<\EOF
8978 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8979 EOF
8980
8981                 ;;
8982                 *hpux*) cat >> confdefs.h <<\EOF
8983 #define HPUX 1
8984 EOF
8985
8986                         SHLIBEXT="sl"
8987                         # Use special PIC flags for the native HP-UX compiler.
8988                         if test $ac_cv_prog_cc_Ae = yes; then
8989                                 BLDSHARED="true"
8990                                 SHLD="/usr/bin/ld"
8991                                 LDSHFLAGS="-B symbolic -b -z"
8992                                 SONAMEFLAG="+h "
8993                                 PICFLAG="+z"
8994                         fi
8995                         DYNEXP="-Wl,-E"
8996                         cat >> confdefs.h <<\EOF
8997 #define STAT_ST_BLOCKSIZE 8192
8998 EOF
8999
9000                 ;;
9001                 *qnx*) cat >> confdefs.h <<\EOF
9002 #define QNX 1
9003 EOF
9004 ;;
9005                 *osf*) cat >> confdefs.h <<\EOF
9006 #define OSF1 1
9007 EOF
9008
9009                         BLDSHARED="true"
9010                         LDSHFLAGS="-shared"
9011                         SONAMEFLAG="-Wl,-soname,"
9012                         PICFLAG="-fPIC"
9013                 ;;
9014                 *sco*) cat >> confdefs.h <<\EOF
9015 #define SCO 1
9016 EOF
9017 ;;
9018                 *unixware*) cat >> confdefs.h <<\EOF
9019 #define UNIXWARE 1
9020 EOF
9021
9022                         BLDSHARED="true"
9023                         LDSHFLAGS="-shared"
9024                         SONAMEFLAG="-Wl,-soname,"
9025                         PICFLAG="-KPIC"
9026                 ;;
9027                 *next2*) cat >> confdefs.h <<\EOF
9028 #define NEXT2 1
9029 EOF
9030 ;;
9031                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
9032 set dummy groff; ac_word=$2
9033 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9034 echo "configure:9035: checking for $ac_word" >&5
9035 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
9036   echo $ac_n "(cached) $ac_c" 1>&6
9037 else
9038   if test -n "$ROFF"; then
9039   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
9040 else
9041   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
9042   ac_dummy="$PATH"
9043   for ac_dir in $ac_dummy; do
9044     test -z "$ac_dir" && ac_dir=.
9045     if test -f $ac_dir/$ac_word; then
9046       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9047       break
9048     fi
9049   done
9050   IFS="$ac_save_ifs"
9051 fi
9052 fi
9053 ROFF="$ac_cv_prog_ROFF"
9054 if test -n "$ROFF"; then
9055   echo "$ac_t""$ROFF" 1>&6
9056 else
9057   echo "$ac_t""no" 1>&6
9058 fi
9059 ;;
9060                 *sysv4*)
9061                         case "$host" in
9062                                 *-univel-*)     if  test "$GCC" != yes ; then
9063                                                 cat >> confdefs.h <<\EOF
9064 #define HAVE_MEMSET 1
9065 EOF
9066
9067                                         fi
9068                                         LDSHFLAGS="-G"
9069                                         DYNEXP="-Bexport"
9070                                 ;;
9071                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
9072 #define RELIANTUNIX 1
9073 EOF
9074 ;;
9075                         esac
9076                 ;;
9077
9078                 *sysv5*)
9079                         if  test "$GCC" != yes ; then
9080                                 cat >> confdefs.h <<\EOF
9081 #define HAVE_MEMSET 1
9082 EOF
9083
9084                         fi
9085                         LDSHFLAGS="-G"
9086                 ;;
9087 esac
9088
9089 echo "$ac_t""$BLDSHARED" 1>&6
9090 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9091 echo "configure:9092: checking linker flags for shared libraries" >&5
9092 echo "$ac_t""$LDSHFLAGS" 1>&6
9093 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9094 echo "configure:9095: checking compiler flags for position-independent code" >&5
9095 echo "$ac_t""$PICFLAGS" 1>&6
9096
9097 #######################################################
9098 # test whether building a shared library actually works
9099 if test $BLDSHARED = true; then
9100 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9101 echo "configure:9102: checking whether building shared libraries actually works" >&5
9102 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9103   echo $ac_n "(cached) $ac_c" 1>&6
9104 else
9105   
9106    ac_cv_shlib_works=no
9107    # try building a trivial shared library
9108    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9109      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
9110      ac_cv_shlib_works=yes
9111    rm -f shlib.so shlib.po
9112
9113 fi
9114
9115 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9116 if test $ac_cv_shlib_works = no; then
9117    BLDSHARED=false
9118 fi
9119 fi
9120
9121
9122 # this updates our target list if we can build shared libs
9123 if test $BLDSHARED = true; then
9124    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9125 else
9126    LIBSMBCLIENT_SHARED=
9127 fi
9128
9129 ################
9130
9131 echo $ac_n "checking for long long""... $ac_c" 1>&6
9132 echo "configure:9133: checking for long long" >&5
9133 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9134   echo $ac_n "(cached) $ac_c" 1>&6
9135 else
9136   
9137 if test "$cross_compiling" = yes; then
9138   samba_cv_have_longlong=cross
9139 else
9140   cat > conftest.$ac_ext <<EOF
9141 #line 9142 "configure"
9142 #include "confdefs.h"
9143 #include <stdio.h>
9144 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9145 EOF
9146 if { (eval echo configure:9147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9147 then
9148   samba_cv_have_longlong=yes
9149 else
9150   echo "configure: failed program was:" >&5
9151   cat conftest.$ac_ext >&5
9152   rm -fr conftest*
9153   samba_cv_have_longlong=no
9154 fi
9155 rm -fr conftest*
9156 fi
9157
9158 fi
9159
9160 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9161 if test x"$samba_cv_have_longlong" = x"yes"; then
9162     cat >> confdefs.h <<\EOF
9163 #define HAVE_LONGLONG 1
9164 EOF
9165
9166 fi
9167
9168 #
9169 # Check if the compiler supports the LL prefix on long long integers.
9170 # AIX needs this.
9171
9172 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9173 echo "configure:9174: checking for LL suffix on long long integers" >&5
9174 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9175   echo $ac_n "(cached) $ac_c" 1>&6
9176 else
9177   
9178     cat > conftest.$ac_ext <<EOF
9179 #line 9180 "configure"
9180 #include "confdefs.h"
9181 #include <stdio.h>
9182 int main() {
9183 long long i = 0x8000000000LL
9184 ; return 0; }
9185 EOF
9186 if { (eval echo configure:9187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9187   rm -rf conftest*
9188   samba_cv_compiler_supports_ll=yes
9189 else
9190   echo "configure: failed program was:" >&5
9191   cat conftest.$ac_ext >&5
9192   rm -rf conftest*
9193   samba_cv_compiler_supports_ll=no
9194 fi
9195 rm -f conftest*
9196 fi
9197
9198 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9199 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9200    cat >> confdefs.h <<\EOF
9201 #define COMPILER_SUPPORTS_LL 1
9202 EOF
9203
9204 fi
9205
9206   
9207 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9208 echo "configure:9209: checking for 64 bit off_t" >&5
9209 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9210   echo $ac_n "(cached) $ac_c" 1>&6
9211 else
9212   
9213 if test "$cross_compiling" = yes; then
9214   samba_cv_SIZEOF_OFF_T=cross
9215 else
9216   cat > conftest.$ac_ext <<EOF
9217 #line 9218 "configure"
9218 #include "confdefs.h"
9219 #include <stdio.h>
9220 #include <sys/stat.h>
9221 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9222 EOF
9223 if { (eval echo configure:9224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9224 then
9225   samba_cv_SIZEOF_OFF_T=yes
9226 else
9227   echo "configure: failed program was:" >&5
9228   cat conftest.$ac_ext >&5
9229   rm -fr conftest*
9230   samba_cv_SIZEOF_OFF_T=no
9231 fi
9232 rm -fr conftest*
9233 fi
9234
9235 fi
9236
9237 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9238 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9239     cat >> confdefs.h <<\EOF
9240 #define SIZEOF_OFF_T 8
9241 EOF
9242
9243 fi
9244
9245 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9246 echo "configure:9247: checking for off64_t" >&5
9247 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9248   echo $ac_n "(cached) $ac_c" 1>&6
9249 else
9250   
9251 if test "$cross_compiling" = yes; then
9252   samba_cv_HAVE_OFF64_T=cross
9253 else
9254   cat > conftest.$ac_ext <<EOF
9255 #line 9256 "configure"
9256 #include "confdefs.h"
9257
9258 #if defined(HAVE_UNISTD_H)
9259 #include <unistd.h>
9260 #endif
9261 #include <stdio.h>
9262 #include <sys/stat.h>
9263 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9264 EOF
9265 if { (eval echo configure:9266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9266 then
9267   samba_cv_HAVE_OFF64_T=yes
9268 else
9269   echo "configure: failed program was:" >&5
9270   cat conftest.$ac_ext >&5
9271   rm -fr conftest*
9272   samba_cv_HAVE_OFF64_T=no
9273 fi
9274 rm -fr conftest*
9275 fi
9276
9277 fi
9278
9279 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9280 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9281     cat >> confdefs.h <<\EOF
9282 #define HAVE_OFF64_T 1
9283 EOF
9284
9285 fi
9286
9287 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9288 echo "configure:9289: checking for 64 bit ino_t" >&5
9289 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9290   echo $ac_n "(cached) $ac_c" 1>&6
9291 else
9292   
9293 if test "$cross_compiling" = yes; then
9294   samba_cv_SIZEOF_INO_T=cross
9295 else
9296   cat > conftest.$ac_ext <<EOF
9297 #line 9298 "configure"
9298 #include "confdefs.h"
9299 #include <stdio.h>
9300 #include <sys/stat.h>
9301 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9302 EOF
9303 if { (eval echo configure:9304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9304 then
9305   samba_cv_SIZEOF_INO_T=yes
9306 else
9307   echo "configure: failed program was:" >&5
9308   cat conftest.$ac_ext >&5
9309   rm -fr conftest*
9310   samba_cv_SIZEOF_INO_T=no
9311 fi
9312 rm -fr conftest*
9313 fi
9314
9315 fi
9316
9317 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9318 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9319     cat >> confdefs.h <<\EOF
9320 #define SIZEOF_INO_T 8
9321 EOF
9322
9323 fi
9324
9325 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9326 echo "configure:9327: checking for ino64_t" >&5
9327 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9328   echo $ac_n "(cached) $ac_c" 1>&6
9329 else
9330   
9331 if test "$cross_compiling" = yes; then
9332   samba_cv_HAVE_INO64_T=cross
9333 else
9334   cat > conftest.$ac_ext <<EOF
9335 #line 9336 "configure"
9336 #include "confdefs.h"
9337
9338 #if defined(HAVE_UNISTD_H)
9339 #include <unistd.h>
9340 #endif
9341 #include <stdio.h>
9342 #include <sys/stat.h>
9343 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9344 EOF
9345 if { (eval echo configure:9346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9346 then
9347   samba_cv_HAVE_INO64_T=yes
9348 else
9349   echo "configure: failed program was:" >&5
9350   cat conftest.$ac_ext >&5
9351   rm -fr conftest*
9352   samba_cv_HAVE_INO64_T=no
9353 fi
9354 rm -fr conftest*
9355 fi
9356
9357 fi
9358
9359 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9360 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9361     cat >> confdefs.h <<\EOF
9362 #define HAVE_INO64_T 1
9363 EOF
9364
9365 fi
9366
9367 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9368 echo "configure:9369: checking for dev64_t" >&5
9369 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9370   echo $ac_n "(cached) $ac_c" 1>&6
9371 else
9372   
9373 if test "$cross_compiling" = yes; then
9374   samba_cv_HAVE_DEV64_T=cross
9375 else
9376   cat > conftest.$ac_ext <<EOF
9377 #line 9378 "configure"
9378 #include "confdefs.h"
9379
9380 #if defined(HAVE_UNISTD_H)
9381 #include <unistd.h>
9382 #endif
9383 #include <stdio.h>
9384 #include <sys/stat.h>
9385 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9386 EOF
9387 if { (eval echo configure:9388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9388 then
9389   samba_cv_HAVE_DEV64_T=yes
9390 else
9391   echo "configure: failed program was:" >&5
9392   cat conftest.$ac_ext >&5
9393   rm -fr conftest*
9394   samba_cv_HAVE_DEV64_T=no
9395 fi
9396 rm -fr conftest*
9397 fi
9398
9399 fi
9400
9401 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9402 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9403     cat >> confdefs.h <<\EOF
9404 #define HAVE_DEV64_T 1
9405 EOF
9406
9407 fi
9408
9409 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9410 echo "configure:9411: checking for struct dirent64" >&5
9411 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9412   echo $ac_n "(cached) $ac_c" 1>&6
9413 else
9414   
9415 cat > conftest.$ac_ext <<EOF
9416 #line 9417 "configure"
9417 #include "confdefs.h"
9418
9419 #if defined(HAVE_UNISTD_H)
9420 #include <unistd.h>
9421 #endif
9422 #include <sys/types.h>
9423 #include <dirent.h>
9424 int main() {
9425 struct dirent64 de;
9426 ; return 0; }
9427 EOF
9428 if { (eval echo configure:9429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9429   rm -rf conftest*
9430   samba_cv_HAVE_STRUCT_DIRENT64=yes
9431 else
9432   echo "configure: failed program was:" >&5
9433   cat conftest.$ac_ext >&5
9434   rm -rf conftest*
9435   samba_cv_HAVE_STRUCT_DIRENT64=no
9436 fi
9437 rm -f conftest*
9438 fi
9439
9440 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9441 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
9442     cat >> confdefs.h <<\EOF
9443 #define HAVE_STRUCT_DIRENT64 1
9444 EOF
9445
9446 fi
9447
9448 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9449 echo "configure:9450: checking for major macro" >&5
9450 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9451   echo $ac_n "(cached) $ac_c" 1>&6
9452 else
9453   
9454 if test "$cross_compiling" = yes; then
9455   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9456 else
9457   cat > conftest.$ac_ext <<EOF
9458 #line 9459 "configure"
9459 #include "confdefs.h"
9460
9461 #if defined(HAVE_UNISTD_H)
9462 #include <unistd.h>
9463 #endif
9464 #include <sys/types.h>
9465 main() { dev_t dev; int i = major(dev); return 0; }
9466 EOF
9467 if { (eval echo configure:9468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9468 then
9469   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9470 else
9471   echo "configure: failed program was:" >&5
9472   cat conftest.$ac_ext >&5
9473   rm -fr conftest*
9474   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9475 fi
9476 rm -fr conftest*
9477 fi
9478
9479 fi
9480
9481 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9482 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9483     cat >> confdefs.h <<\EOF
9484 #define HAVE_DEVICE_MAJOR_FN 1
9485 EOF
9486
9487 fi
9488
9489 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9490 echo "configure:9491: checking for minor macro" >&5
9491 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9492   echo $ac_n "(cached) $ac_c" 1>&6
9493 else
9494   
9495 if test "$cross_compiling" = yes; then
9496   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9497 else
9498   cat > conftest.$ac_ext <<EOF
9499 #line 9500 "configure"
9500 #include "confdefs.h"
9501
9502 #if defined(HAVE_UNISTD_H)
9503 #include <unistd.h>
9504 #endif
9505 #include <sys/types.h>
9506 main() { dev_t dev; int i = minor(dev); return 0; }
9507 EOF
9508 if { (eval echo configure:9509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9509 then
9510   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9511 else
9512   echo "configure: failed program was:" >&5
9513   cat conftest.$ac_ext >&5
9514   rm -fr conftest*
9515   samba_cv_HAVE_DEVICE_MINOR_FN=no
9516 fi
9517 rm -fr conftest*
9518 fi
9519
9520 fi
9521
9522 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9523 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9524     cat >> confdefs.h <<\EOF
9525 #define HAVE_DEVICE_MINOR_FN 1
9526 EOF
9527
9528 fi
9529
9530 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9531 echo "configure:9532: checking for unsigned char" >&5
9532 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9533   echo $ac_n "(cached) $ac_c" 1>&6
9534 else
9535   
9536 if test "$cross_compiling" = yes; then
9537   samba_cv_HAVE_UNSIGNED_CHAR=cross
9538 else
9539   cat > conftest.$ac_ext <<EOF
9540 #line 9541 "configure"
9541 #include "confdefs.h"
9542 #include <stdio.h>
9543 main() { char c; c=250; exit((c > 0)?0:1); }
9544 EOF
9545 if { (eval echo configure:9546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9546 then
9547   samba_cv_HAVE_UNSIGNED_CHAR=yes
9548 else
9549   echo "configure: failed program was:" >&5
9550   cat conftest.$ac_ext >&5
9551   rm -fr conftest*
9552   samba_cv_HAVE_UNSIGNED_CHAR=no
9553 fi
9554 rm -fr conftest*
9555 fi
9556
9557 fi
9558
9559 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9560 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9561     cat >> confdefs.h <<\EOF
9562 #define HAVE_UNSIGNED_CHAR 1
9563 EOF
9564
9565 fi
9566
9567 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9568 echo "configure:9569: checking for sin_len in sock" >&5
9569 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9570   echo $ac_n "(cached) $ac_c" 1>&6
9571 else
9572   
9573 cat > conftest.$ac_ext <<EOF
9574 #line 9575 "configure"
9575 #include "confdefs.h"
9576 #include <sys/types.h>
9577 #include <sys/socket.h>
9578 #include <netinet/in.h>
9579 int main() {
9580 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9581 ; return 0; }
9582 EOF
9583 if { (eval echo configure:9584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9584   rm -rf conftest*
9585   samba_cv_HAVE_SOCK_SIN_LEN=yes
9586 else
9587   echo "configure: failed program was:" >&5
9588   cat conftest.$ac_ext >&5
9589   rm -rf conftest*
9590   samba_cv_HAVE_SOCK_SIN_LEN=no
9591 fi
9592 rm -f conftest*
9593 fi
9594
9595 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9596 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9597     cat >> confdefs.h <<\EOF
9598 #define HAVE_SOCK_SIN_LEN 1
9599 EOF
9600
9601 fi
9602
9603 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9604 echo "configure:9605: checking whether seekdir returns void" >&5
9605 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9606   echo $ac_n "(cached) $ac_c" 1>&6
9607 else
9608   
9609 cat > conftest.$ac_ext <<EOF
9610 #line 9611 "configure"
9611 #include "confdefs.h"
9612 #include <sys/types.h>
9613 #include <dirent.h>
9614 void seekdir(DIR *d, long loc) { return; }
9615 int main() {
9616 return 0;
9617 ; return 0; }
9618 EOF
9619 if { (eval echo configure:9620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9620   rm -rf conftest*
9621   samba_cv_SEEKDIR_RETURNS_VOID=yes
9622 else
9623   echo "configure: failed program was:" >&5
9624   cat conftest.$ac_ext >&5
9625   rm -rf conftest*
9626   samba_cv_SEEKDIR_RETURNS_VOID=no
9627 fi
9628 rm -f conftest*
9629 fi
9630
9631 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9632 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9633     cat >> confdefs.h <<\EOF
9634 #define SEEKDIR_RETURNS_VOID 1
9635 EOF
9636
9637 fi
9638
9639 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9640 echo "configure:9641: checking for __FILE__ macro" >&5
9641 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9642   echo $ac_n "(cached) $ac_c" 1>&6
9643 else
9644   
9645 cat > conftest.$ac_ext <<EOF
9646 #line 9647 "configure"
9647 #include "confdefs.h"
9648 #include <stdio.h>
9649 int main() {
9650 printf("%s\n", __FILE__);
9651 ; return 0; }
9652 EOF
9653 if { (eval echo configure:9654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9654   rm -rf conftest*
9655   samba_cv_HAVE_FILE_MACRO=yes
9656 else
9657   echo "configure: failed program was:" >&5
9658   cat conftest.$ac_ext >&5
9659   rm -rf conftest*
9660   samba_cv_HAVE_FILE_MACRO=no
9661 fi
9662 rm -f conftest*
9663 fi
9664
9665 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9666 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9667     cat >> confdefs.h <<\EOF
9668 #define HAVE_FILE_MACRO 1
9669 EOF
9670
9671 fi
9672
9673 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9674 echo "configure:9675: checking for __FUNCTION__ macro" >&5
9675 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9676   echo $ac_n "(cached) $ac_c" 1>&6
9677 else
9678   
9679 cat > conftest.$ac_ext <<EOF
9680 #line 9681 "configure"
9681 #include "confdefs.h"
9682 #include <stdio.h>
9683 int main() {
9684 printf("%s\n", __FUNCTION__);
9685 ; return 0; }
9686 EOF
9687 if { (eval echo configure:9688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9688   rm -rf conftest*
9689   samba_cv_HAVE_FUNCTION_MACRO=yes
9690 else
9691   echo "configure: failed program was:" >&5
9692   cat conftest.$ac_ext >&5
9693   rm -rf conftest*
9694   samba_cv_HAVE_FUNCTION_MACRO=no
9695 fi
9696 rm -f conftest*
9697 fi
9698
9699 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9700 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9701     cat >> confdefs.h <<\EOF
9702 #define HAVE_FUNCTION_MACRO 1
9703 EOF
9704
9705 fi
9706
9707 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9708 echo "configure:9709: checking if gettimeofday takes tz argument" >&5
9709 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9710   echo $ac_n "(cached) $ac_c" 1>&6
9711 else
9712   
9713 if test "$cross_compiling" = yes; then
9714   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9715 else
9716   cat > conftest.$ac_ext <<EOF
9717 #line 9718 "configure"
9718 #include "confdefs.h"
9719
9720 #include <sys/time.h>
9721 #include <unistd.h>
9722 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9723 EOF
9724 if { (eval echo configure:9725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9725 then
9726   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9727 else
9728   echo "configure: failed program was:" >&5
9729   cat conftest.$ac_ext >&5
9730   rm -fr conftest*
9731   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9732 fi
9733 rm -fr conftest*
9734 fi
9735
9736 fi
9737
9738 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9739 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9740     cat >> confdefs.h <<\EOF
9741 #define HAVE_GETTIMEOFDAY_TZ 1
9742 EOF
9743
9744 fi
9745
9746 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9747 echo "configure:9748: checking for __va_copy" >&5
9748 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9749   echo $ac_n "(cached) $ac_c" 1>&6
9750 else
9751   
9752 cat > conftest.$ac_ext <<EOF
9753 #line 9754 "configure"
9754 #include "confdefs.h"
9755 #include <stdarg.h>
9756 va_list ap1,ap2;
9757 int main() {
9758 __va_copy(ap1,ap2);
9759 ; return 0; }
9760 EOF
9761 if { (eval echo configure:9762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9762   rm -rf conftest*
9763   samba_cv_HAVE_VA_COPY=yes
9764 else
9765   echo "configure: failed program was:" >&5
9766   cat conftest.$ac_ext >&5
9767   rm -rf conftest*
9768   samba_cv_HAVE_VA_COPY=no
9769 fi
9770 rm -f conftest*
9771 fi
9772
9773 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9774 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9775     cat >> confdefs.h <<\EOF
9776 #define HAVE_VA_COPY 1
9777 EOF
9778
9779 fi
9780
9781 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9782 echo "configure:9783: checking for C99 vsnprintf" >&5
9783 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9784   echo $ac_n "(cached) $ac_c" 1>&6
9785 else
9786   
9787 if test "$cross_compiling" = yes; then
9788   samba_cv_HAVE_C99_VSNPRINTF=cross
9789 else
9790   cat > conftest.$ac_ext <<EOF
9791 #line 9792 "configure"
9792 #include "confdefs.h"
9793
9794 #include <sys/types.h>
9795 #include <stdarg.h>
9796 void foo(const char *format, ...) { 
9797        va_list ap;
9798        int len;
9799        char buf[5];
9800
9801        va_start(ap, format);
9802        len = vsnprintf(buf, 0, format, ap);
9803        va_end(ap);
9804        if (len != 5) exit(1);
9805
9806        va_start(ap, format);
9807        len = vsnprintf(0, 0, format, ap);
9808        va_end(ap);
9809        if (len != 5) exit(1);
9810
9811        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9812
9813        exit(0);
9814 }
9815 main() { foo("hello"); }
9816
9817 EOF
9818 if { (eval echo configure:9819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9819 then
9820   samba_cv_HAVE_C99_VSNPRINTF=yes
9821 else
9822   echo "configure: failed program was:" >&5
9823   cat conftest.$ac_ext >&5
9824   rm -fr conftest*
9825   samba_cv_HAVE_C99_VSNPRINTF=no
9826 fi
9827 rm -fr conftest*
9828 fi
9829
9830 fi
9831
9832 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9833 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9834     cat >> confdefs.h <<\EOF
9835 #define HAVE_C99_VSNPRINTF 1
9836 EOF
9837
9838 fi
9839
9840 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9841 echo "configure:9842: checking for broken readdir" >&5
9842 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9843   echo $ac_n "(cached) $ac_c" 1>&6
9844 else
9845   
9846 if test "$cross_compiling" = yes; then
9847   samba_cv_HAVE_BROKEN_READDIR=cross
9848 else
9849   cat > conftest.$ac_ext <<EOF
9850 #line 9851 "configure"
9851 #include "confdefs.h"
9852 #include <sys/types.h>
9853 #include <dirent.h>
9854 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9855 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9856 di->d_name[0] == 0) exit(0); exit(1);} 
9857 EOF
9858 if { (eval echo configure:9859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9859 then
9860   samba_cv_HAVE_BROKEN_READDIR=yes
9861 else
9862   echo "configure: failed program was:" >&5
9863   cat conftest.$ac_ext >&5
9864   rm -fr conftest*
9865   samba_cv_HAVE_BROKEN_READDIR=no
9866 fi
9867 rm -fr conftest*
9868 fi
9869
9870 fi
9871
9872 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9873 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9874     cat >> confdefs.h <<\EOF
9875 #define HAVE_BROKEN_READDIR 1
9876 EOF
9877
9878 fi
9879
9880 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9881 echo "configure:9882: checking for utimbuf" >&5
9882 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9883   echo $ac_n "(cached) $ac_c" 1>&6
9884 else
9885   
9886 cat > conftest.$ac_ext <<EOF
9887 #line 9888 "configure"
9888 #include "confdefs.h"
9889 #include <sys/types.h>
9890 #include <utime.h>
9891 int main() {
9892 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9893 ; return 0; }
9894 EOF
9895 if { (eval echo configure:9896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9896   rm -rf conftest*
9897   samba_cv_HAVE_UTIMBUF=yes
9898 else
9899   echo "configure: failed program was:" >&5
9900   cat conftest.$ac_ext >&5
9901   rm -rf conftest*
9902   samba_cv_HAVE_UTIMBUF=no
9903 fi
9904 rm -f conftest*
9905 fi
9906
9907 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9908 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9909     cat >> confdefs.h <<\EOF
9910 #define HAVE_UTIMBUF 1
9911 EOF
9912
9913 fi
9914
9915
9916 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9917 do
9918 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9919 echo "configure:9920: checking for $ac_func" >&5
9920 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9921   echo $ac_n "(cached) $ac_c" 1>&6
9922 else
9923   cat > conftest.$ac_ext <<EOF
9924 #line 9925 "configure"
9925 #include "confdefs.h"
9926 /* System header to define __stub macros and hopefully few prototypes,
9927     which can conflict with char $ac_func(); below.  */
9928 #include <assert.h>
9929 /* Override any gcc2 internal prototype to avoid an error.  */
9930 /* We use char because int might match the return type of a gcc2
9931     builtin and then its argument prototype would still apply.  */
9932 char $ac_func();
9933
9934 int main() {
9935
9936 /* The GNU C library defines this for functions which it implements
9937     to always fail with ENOSYS.  Some functions are actually named
9938     something starting with __ and the normal name is an alias.  */
9939 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9940 choke me
9941 #else
9942 $ac_func();
9943 #endif
9944
9945 ; return 0; }
9946 EOF
9947 if { (eval echo configure:9948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9948   rm -rf conftest*
9949   eval "ac_cv_func_$ac_func=yes"
9950 else
9951   echo "configure: failed program was:" >&5
9952   cat conftest.$ac_ext >&5
9953   rm -rf conftest*
9954   eval "ac_cv_func_$ac_func=no"
9955 fi
9956 rm -f conftest*
9957 fi
9958
9959 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9960   echo "$ac_t""yes" 1>&6
9961     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9962   cat >> confdefs.h <<EOF
9963 #define $ac_tr_func 1
9964 EOF
9965  
9966 else
9967   echo "$ac_t""no" 1>&6
9968 fi
9969 done
9970
9971
9972 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9973 echo "configure:9974: checking for ut_name in utmp" >&5
9974 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9975   echo $ac_n "(cached) $ac_c" 1>&6
9976 else
9977   
9978 cat > conftest.$ac_ext <<EOF
9979 #line 9980 "configure"
9980 #include "confdefs.h"
9981 #include <sys/types.h>
9982 #include <utmp.h>
9983 int main() {
9984 struct utmp ut;  ut.ut_name[0] = 'a';
9985 ; return 0; }
9986 EOF
9987 if { (eval echo configure:9988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9988   rm -rf conftest*
9989   samba_cv_HAVE_UT_UT_NAME=yes
9990 else
9991   echo "configure: failed program was:" >&5
9992   cat conftest.$ac_ext >&5
9993   rm -rf conftest*
9994   samba_cv_HAVE_UT_UT_NAME=no
9995 fi
9996 rm -f conftest*
9997 fi
9998
9999 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
10000 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
10001     cat >> confdefs.h <<\EOF
10002 #define HAVE_UT_UT_NAME 1
10003 EOF
10004
10005 fi 
10006
10007 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
10008 echo "configure:10009: checking for ut_user in utmp" >&5
10009 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
10010   echo $ac_n "(cached) $ac_c" 1>&6
10011 else
10012   
10013 cat > conftest.$ac_ext <<EOF
10014 #line 10015 "configure"
10015 #include "confdefs.h"
10016 #include <sys/types.h>
10017 #include <utmp.h>
10018 int main() {
10019 struct utmp ut;  ut.ut_user[0] = 'a';
10020 ; return 0; }
10021 EOF
10022 if { (eval echo configure:10023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10023   rm -rf conftest*
10024   samba_cv_HAVE_UT_UT_USER=yes
10025 else
10026   echo "configure: failed program was:" >&5
10027   cat conftest.$ac_ext >&5
10028   rm -rf conftest*
10029   samba_cv_HAVE_UT_UT_USER=no
10030 fi
10031 rm -f conftest*
10032 fi
10033
10034 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
10035 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
10036     cat >> confdefs.h <<\EOF
10037 #define HAVE_UT_UT_USER 1
10038 EOF
10039
10040 fi 
10041
10042 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
10043 echo "configure:10044: checking for ut_id in utmp" >&5
10044 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10045   echo $ac_n "(cached) $ac_c" 1>&6
10046 else
10047   
10048 cat > conftest.$ac_ext <<EOF
10049 #line 10050 "configure"
10050 #include "confdefs.h"
10051 #include <sys/types.h>
10052 #include <utmp.h>
10053 int main() {
10054 struct utmp ut;  ut.ut_id[0] = 'a';
10055 ; return 0; }
10056 EOF
10057 if { (eval echo configure:10058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10058   rm -rf conftest*
10059   samba_cv_HAVE_UT_UT_ID=yes
10060 else
10061   echo "configure: failed program was:" >&5
10062   cat conftest.$ac_ext >&5
10063   rm -rf conftest*
10064   samba_cv_HAVE_UT_UT_ID=no
10065 fi
10066 rm -f conftest*
10067 fi
10068
10069 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10070 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10071     cat >> confdefs.h <<\EOF
10072 #define HAVE_UT_UT_ID 1
10073 EOF
10074
10075 fi 
10076
10077 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10078 echo "configure:10079: checking for ut_host in utmp" >&5
10079 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10080   echo $ac_n "(cached) $ac_c" 1>&6
10081 else
10082   
10083 cat > conftest.$ac_ext <<EOF
10084 #line 10085 "configure"
10085 #include "confdefs.h"
10086 #include <sys/types.h>
10087 #include <utmp.h>
10088 int main() {
10089 struct utmp ut;  ut.ut_host[0] = 'a';
10090 ; return 0; }
10091 EOF
10092 if { (eval echo configure:10093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10093   rm -rf conftest*
10094   samba_cv_HAVE_UT_UT_HOST=yes
10095 else
10096   echo "configure: failed program was:" >&5
10097   cat conftest.$ac_ext >&5
10098   rm -rf conftest*
10099   samba_cv_HAVE_UT_UT_HOST=no
10100 fi
10101 rm -f conftest*
10102 fi
10103
10104 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10105 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10106     cat >> confdefs.h <<\EOF
10107 #define HAVE_UT_UT_HOST 1
10108 EOF
10109
10110 fi 
10111
10112 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10113 echo "configure:10114: checking for ut_time in utmp" >&5
10114 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10115   echo $ac_n "(cached) $ac_c" 1>&6
10116 else
10117   
10118 cat > conftest.$ac_ext <<EOF
10119 #line 10120 "configure"
10120 #include "confdefs.h"
10121 #include <sys/types.h>
10122 #include <utmp.h>
10123 int main() {
10124 struct utmp ut;  time_t t; ut.ut_time = t;
10125 ; return 0; }
10126 EOF
10127 if { (eval echo configure:10128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10128   rm -rf conftest*
10129   samba_cv_HAVE_UT_UT_TIME=yes
10130 else
10131   echo "configure: failed program was:" >&5
10132   cat conftest.$ac_ext >&5
10133   rm -rf conftest*
10134   samba_cv_HAVE_UT_UT_TIME=no
10135 fi
10136 rm -f conftest*
10137 fi
10138
10139 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10140 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10141     cat >> confdefs.h <<\EOF
10142 #define HAVE_UT_UT_TIME 1
10143 EOF
10144
10145 fi 
10146
10147 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10148 echo "configure:10149: checking for ut_tv in utmp" >&5
10149 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10150   echo $ac_n "(cached) $ac_c" 1>&6
10151 else
10152   
10153 cat > conftest.$ac_ext <<EOF
10154 #line 10155 "configure"
10155 #include "confdefs.h"
10156 #include <sys/types.h>
10157 #include <utmp.h>
10158 int main() {
10159 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10160 ; return 0; }
10161 EOF
10162 if { (eval echo configure:10163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10163   rm -rf conftest*
10164   samba_cv_HAVE_UT_UT_TV=yes
10165 else
10166   echo "configure: failed program was:" >&5
10167   cat conftest.$ac_ext >&5
10168   rm -rf conftest*
10169   samba_cv_HAVE_UT_UT_TV=no
10170 fi
10171 rm -f conftest*
10172 fi
10173
10174 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10175 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10176     cat >> confdefs.h <<\EOF
10177 #define HAVE_UT_UT_TV 1
10178 EOF
10179
10180 fi 
10181
10182 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10183 echo "configure:10184: checking for ut_type in utmp" >&5
10184 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10185   echo $ac_n "(cached) $ac_c" 1>&6
10186 else
10187   
10188 cat > conftest.$ac_ext <<EOF
10189 #line 10190 "configure"
10190 #include "confdefs.h"
10191 #include <sys/types.h>
10192 #include <utmp.h>
10193 int main() {
10194 struct utmp ut;  ut.ut_type = 0;
10195 ; return 0; }
10196 EOF
10197 if { (eval echo configure:10198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10198   rm -rf conftest*
10199   samba_cv_HAVE_UT_UT_TYPE=yes
10200 else
10201   echo "configure: failed program was:" >&5
10202   cat conftest.$ac_ext >&5
10203   rm -rf conftest*
10204   samba_cv_HAVE_UT_UT_TYPE=no
10205 fi
10206 rm -f conftest*
10207 fi
10208
10209 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10210 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10211     cat >> confdefs.h <<\EOF
10212 #define HAVE_UT_UT_TYPE 1
10213 EOF
10214
10215 fi 
10216
10217 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10218 echo "configure:10219: checking for ut_pid in utmp" >&5
10219 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10220   echo $ac_n "(cached) $ac_c" 1>&6
10221 else
10222   
10223 cat > conftest.$ac_ext <<EOF
10224 #line 10225 "configure"
10225 #include "confdefs.h"
10226 #include <sys/types.h>
10227 #include <utmp.h>
10228 int main() {
10229 struct utmp ut;  ut.ut_pid = 0;
10230 ; return 0; }
10231 EOF
10232 if { (eval echo configure:10233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10233   rm -rf conftest*
10234   samba_cv_HAVE_UT_UT_PID=yes
10235 else
10236   echo "configure: failed program was:" >&5
10237   cat conftest.$ac_ext >&5
10238   rm -rf conftest*
10239   samba_cv_HAVE_UT_UT_PID=no
10240 fi
10241 rm -f conftest*
10242 fi
10243
10244 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10245 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10246     cat >> confdefs.h <<\EOF
10247 #define HAVE_UT_UT_PID 1
10248 EOF
10249
10250 fi 
10251
10252 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10253 echo "configure:10254: checking for ut_exit in utmp" >&5
10254 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10255   echo $ac_n "(cached) $ac_c" 1>&6
10256 else
10257   
10258 cat > conftest.$ac_ext <<EOF
10259 #line 10260 "configure"
10260 #include "confdefs.h"
10261 #include <sys/types.h>
10262 #include <utmp.h>
10263 int main() {
10264 struct utmp ut;  ut.ut_exit.e_exit = 0;
10265 ; return 0; }
10266 EOF
10267 if { (eval echo configure:10268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10268   rm -rf conftest*
10269   samba_cv_HAVE_UT_UT_EXIT=yes
10270 else
10271   echo "configure: failed program was:" >&5
10272   cat conftest.$ac_ext >&5
10273   rm -rf conftest*
10274   samba_cv_HAVE_UT_UT_EXIT=no
10275 fi
10276 rm -f conftest*
10277 fi
10278
10279 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10280 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10281     cat >> confdefs.h <<\EOF
10282 #define HAVE_UT_UT_EXIT 1
10283 EOF
10284
10285 fi 
10286
10287 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10288 echo "configure:10289: checking for ut_addr in utmp" >&5
10289 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10290   echo $ac_n "(cached) $ac_c" 1>&6
10291 else
10292   
10293 cat > conftest.$ac_ext <<EOF
10294 #line 10295 "configure"
10295 #include "confdefs.h"
10296 #include <sys/types.h>
10297 #include <utmp.h>
10298 int main() {
10299 struct utmp ut;  ut.ut_addr = 0;
10300 ; return 0; }
10301 EOF
10302 if { (eval echo configure:10303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10303   rm -rf conftest*
10304   samba_cv_HAVE_UT_UT_ADDR=yes
10305 else
10306   echo "configure: failed program was:" >&5
10307   cat conftest.$ac_ext >&5
10308   rm -rf conftest*
10309   samba_cv_HAVE_UT_UT_ADDR=no
10310 fi
10311 rm -f conftest*
10312 fi
10313
10314 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10315 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10316     cat >> confdefs.h <<\EOF
10317 #define HAVE_UT_UT_ADDR 1
10318 EOF
10319
10320 fi 
10321
10322 if test x$ac_cv_func_pututline = xyes ; then
10323   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10324 echo "configure:10325: checking whether pututline returns pointer" >&5
10325 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10326   echo $ac_n "(cached) $ac_c" 1>&6
10327 else
10328   
10329   cat > conftest.$ac_ext <<EOF
10330 #line 10331 "configure"
10331 #include "confdefs.h"
10332 #include <sys/types.h>
10333 #include <utmp.h>
10334 int main() {
10335 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10336 ; return 0; }
10337 EOF
10338 if { (eval echo configure:10339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10339   rm -rf conftest*
10340   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10341 else
10342   echo "configure: failed program was:" >&5
10343   cat conftest.$ac_ext >&5
10344   rm -rf conftest*
10345   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10346 fi
10347 rm -f conftest*
10348 fi
10349
10350 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10351   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10352       cat >> confdefs.h <<\EOF
10353 #define PUTUTLINE_RETURNS_UTMP 1
10354 EOF
10355
10356   fi
10357 fi
10358
10359 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10360 echo "configure:10361: checking for ut_syslen in utmpx" >&5
10361 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10362   echo $ac_n "(cached) $ac_c" 1>&6
10363 else
10364   
10365 cat > conftest.$ac_ext <<EOF
10366 #line 10367 "configure"
10367 #include "confdefs.h"
10368 #include <sys/types.h>
10369 #include <utmpx.h>
10370 int main() {
10371 struct utmpx ux;  ux.ut_syslen = 0;
10372 ; return 0; }
10373 EOF
10374 if { (eval echo configure:10375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10375   rm -rf conftest*
10376   samba_cv_HAVE_UX_UT_SYSLEN=yes
10377 else
10378   echo "configure: failed program was:" >&5
10379   cat conftest.$ac_ext >&5
10380   rm -rf conftest*
10381   samba_cv_HAVE_UX_UT_SYSLEN=no
10382 fi
10383 rm -f conftest*
10384 fi
10385
10386 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10387 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10388     cat >> confdefs.h <<\EOF
10389 #define HAVE_UX_UT_SYSLEN 1
10390 EOF
10391
10392 fi 
10393
10394
10395 #################################################
10396 # check for libiconv support
10397 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10398 echo "configure:10399: checking whether to use libiconv" >&5
10399 # Check whether --with-libiconv or --without-libiconv was given.
10400 if test "${with_libiconv+set}" = set; then
10401   withval="$with_libiconv"
10402    case "$withval" in
10403   no)
10404     echo "$ac_t""no" 1>&6
10405     ;;
10406   *)
10407     echo "$ac_t""yes" 1>&6
10408     CFLAGS="$CFLAGS -I$withval/include"
10409     LDFLAGS="$LDFLAGS -L$withval/lib"
10410     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10411 echo "configure:10412: checking for iconv_open in -liconv" >&5
10412 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10413 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10414   echo $ac_n "(cached) $ac_c" 1>&6
10415 else
10416   ac_save_LIBS="$LIBS"
10417 LIBS="-liconv  $LIBS"
10418 cat > conftest.$ac_ext <<EOF
10419 #line 10420 "configure"
10420 #include "confdefs.h"
10421 /* Override any gcc2 internal prototype to avoid an error.  */
10422 /* We use char because int might match the return type of a gcc2
10423     builtin and then its argument prototype would still apply.  */
10424 char iconv_open();
10425
10426 int main() {
10427 iconv_open()
10428 ; return 0; }
10429 EOF
10430 if { (eval echo configure:10431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10431   rm -rf conftest*
10432   eval "ac_cv_lib_$ac_lib_var=yes"
10433 else
10434   echo "configure: failed program was:" >&5
10435   cat conftest.$ac_ext >&5
10436   rm -rf conftest*
10437   eval "ac_cv_lib_$ac_lib_var=no"
10438 fi
10439 rm -f conftest*
10440 LIBS="$ac_save_LIBS"
10441
10442 fi
10443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10444   echo "$ac_t""yes" 1>&6
10445     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10446     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10447   cat >> confdefs.h <<EOF
10448 #define $ac_tr_lib 1
10449 EOF
10450
10451   LIBS="-liconv $LIBS"
10452
10453 else
10454   echo "$ac_t""no" 1>&6
10455 fi
10456
10457     cat >> confdefs.h <<EOF
10458 #define WITH_LIBICONV "${withval}"
10459 EOF
10460
10461     ;;
10462   esac 
10463 else
10464   echo "$ac_t""no" 1>&6
10465
10466 fi
10467
10468
10469
10470 ############
10471 # check for iconv in libc
10472 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10473 echo "configure:10474: checking for working iconv" >&5
10474 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10475   echo $ac_n "(cached) $ac_c" 1>&6
10476 else
10477   
10478 if test "$cross_compiling" = yes; then
10479   samba_cv_HAVE_NATIVE_ICONV=cross
10480 else
10481   cat > conftest.$ac_ext <<EOF
10482 #line 10483 "configure"
10483 #include "confdefs.h"
10484
10485 #include <iconv.h>
10486 main() {
10487        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10488        if (cd == 0 || cd == (iconv_t)-1) return -1;
10489        return 0;
10490 }
10491
10492 EOF
10493 if { (eval echo configure:10494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10494 then
10495   samba_cv_HAVE_NATIVE_ICONV=yes
10496 else
10497   echo "configure: failed program was:" >&5
10498   cat conftest.$ac_ext >&5
10499   rm -fr conftest*
10500   samba_cv_HAVE_NATIVE_ICONV=no
10501 fi
10502 rm -fr conftest*
10503 fi
10504
10505 fi
10506
10507 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10508 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10509     cat >> confdefs.h <<\EOF
10510 #define HAVE_NATIVE_ICONV 1
10511 EOF
10512
10513 fi
10514
10515
10516 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10517 echo "configure:10518: checking for Linux kernel oplocks" >&5
10518 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10519   echo $ac_n "(cached) $ac_c" 1>&6
10520 else
10521   
10522 if test "$cross_compiling" = yes; then
10523   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10524 else
10525   cat > conftest.$ac_ext <<EOF
10526 #line 10527 "configure"
10527 #include "confdefs.h"
10528
10529 #include <sys/types.h>
10530 #include <fcntl.h>
10531 #ifndef F_GETLEASE
10532 #define F_GETLEASE      1025
10533 #endif
10534 main() {
10535        int fd = open("/dev/null", O_RDONLY);
10536        return fcntl(fd, F_GETLEASE, 0) == -1;
10537 }
10538
10539 EOF
10540 if { (eval echo configure:10541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10541 then
10542   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10543 else
10544   echo "configure: failed program was:" >&5
10545   cat conftest.$ac_ext >&5
10546   rm -fr conftest*
10547   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10548 fi
10549 rm -fr conftest*
10550 fi
10551
10552 fi
10553
10554 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10555 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10556     cat >> confdefs.h <<\EOF
10557 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10558 EOF
10559
10560 fi
10561
10562 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10563 echo "configure:10564: checking for kernel change notify support" >&5
10564 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10565   echo $ac_n "(cached) $ac_c" 1>&6
10566 else
10567   
10568 if test "$cross_compiling" = yes; then
10569   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10570 else
10571   cat > conftest.$ac_ext <<EOF
10572 #line 10573 "configure"
10573 #include "confdefs.h"
10574
10575 #include <sys/types.h>
10576 #include <fcntl.h>
10577 #include <signal.h>
10578 #ifndef F_NOTIFY
10579 #define F_NOTIFY 1026
10580 #endif
10581 main() {
10582         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10583 }
10584
10585 EOF
10586 if { (eval echo configure:10587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10587 then
10588   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10589 else
10590   echo "configure: failed program was:" >&5
10591   cat conftest.$ac_ext >&5
10592   rm -fr conftest*
10593   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10594 fi
10595 rm -fr conftest*
10596 fi
10597
10598 fi
10599
10600 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10601 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10602     cat >> confdefs.h <<\EOF
10603 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10604 EOF
10605
10606 fi
10607
10608 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10609 echo "configure:10610: checking for kernel share modes" >&5
10610 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10611   echo $ac_n "(cached) $ac_c" 1>&6
10612 else
10613   
10614 if test "$cross_compiling" = yes; then
10615   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10616 else
10617   cat > conftest.$ac_ext <<EOF
10618 #line 10619 "configure"
10619 #include "confdefs.h"
10620
10621 #include <sys/types.h>
10622 #include <fcntl.h>
10623 #include <signal.h>
10624 #include <sys/file.h>
10625 #ifndef LOCK_MAND
10626 #define LOCK_MAND       32
10627 #define LOCK_READ       64
10628 #endif
10629 main() {
10630         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10631 }
10632
10633 EOF
10634 if { (eval echo configure:10635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10635 then
10636   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10637 else
10638   echo "configure: failed program was:" >&5
10639   cat conftest.$ac_ext >&5
10640   rm -fr conftest*
10641   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10642 fi
10643 rm -fr conftest*
10644 fi
10645
10646 fi
10647
10648 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10649 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10650     cat >> confdefs.h <<\EOF
10651 #define HAVE_KERNEL_SHARE_MODES 1
10652 EOF
10653
10654 fi
10655
10656
10657
10658
10659 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10660 echo "configure:10661: checking for IRIX kernel oplock type definitions" >&5
10661 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10662   echo $ac_n "(cached) $ac_c" 1>&6
10663 else
10664   
10665 cat > conftest.$ac_ext <<EOF
10666 #line 10667 "configure"
10667 #include "confdefs.h"
10668 #include <sys/types.h>
10669 #include <fcntl.h>
10670 int main() {
10671 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10672 ; return 0; }
10673 EOF
10674 if { (eval echo configure:10675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10675   rm -rf conftest*
10676   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10677 else
10678   echo "configure: failed program was:" >&5
10679   cat conftest.$ac_ext >&5
10680   rm -rf conftest*
10681   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10682 fi
10683 rm -f conftest*
10684 fi
10685
10686 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10687 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10688     cat >> confdefs.h <<\EOF
10689 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10690 EOF
10691
10692 fi
10693
10694 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10695 echo "configure:10696: checking for irix specific capabilities" >&5
10696 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10697   echo $ac_n "(cached) $ac_c" 1>&6
10698 else
10699   
10700 if test "$cross_compiling" = yes; then
10701   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10702 else
10703   cat > conftest.$ac_ext <<EOF
10704 #line 10705 "configure"
10705 #include "confdefs.h"
10706 #include <sys/types.h>
10707 #include <sys/capability.h>
10708 main() {
10709  cap_t cap;
10710  if ((cap = cap_get_proc()) == NULL)
10711    exit(1);
10712  cap->cap_effective |= CAP_NETWORK_MGT;
10713  cap->cap_inheritable |= CAP_NETWORK_MGT;
10714  cap_set_proc(cap);
10715  exit(0);
10716 }
10717
10718 EOF
10719 if { (eval echo configure:10720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10720 then
10721   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10722 else
10723   echo "configure: failed program was:" >&5
10724   cat conftest.$ac_ext >&5
10725   rm -fr conftest*
10726   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10727 fi
10728 rm -fr conftest*
10729 fi
10730
10731 fi
10732
10733 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10734 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10735     cat >> confdefs.h <<\EOF
10736 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10737 EOF
10738
10739 fi
10740
10741 #
10742 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10743 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10744 #
10745
10746 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10747 echo "configure:10748: checking for int16 typedef included by rpc/rpc.h" >&5
10748 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10749   echo $ac_n "(cached) $ac_c" 1>&6
10750 else
10751   
10752 cat > conftest.$ac_ext <<EOF
10753 #line 10754 "configure"
10754 #include "confdefs.h"
10755 #include <sys/types.h>
10756 #if defined(HAVE_RPC_RPC_H)
10757 #include <rpc/rpc.h>
10758 #endif
10759 int main() {
10760 int16 testvar;
10761 ; return 0; }
10762 EOF
10763 if { (eval echo configure:10764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10764   rm -rf conftest*
10765   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10766 else
10767   echo "configure: failed program was:" >&5
10768   cat conftest.$ac_ext >&5
10769   rm -rf conftest*
10770   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10771 fi
10772 rm -f conftest*
10773 fi
10774
10775 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10776 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10777     cat >> confdefs.h <<\EOF
10778 #define HAVE_INT16_FROM_RPC_RPC_H 1
10779 EOF
10780
10781 fi
10782
10783 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10784 echo "configure:10785: checking for uint16 typedef included by rpc/rpc.h" >&5
10785 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10786   echo $ac_n "(cached) $ac_c" 1>&6
10787 else
10788   
10789 cat > conftest.$ac_ext <<EOF
10790 #line 10791 "configure"
10791 #include "confdefs.h"
10792 #include <sys/types.h>
10793 #if defined(HAVE_RPC_RPC_H)
10794 #include <rpc/rpc.h>
10795 #endif
10796 int main() {
10797 uint16 testvar;
10798 ; return 0; }
10799 EOF
10800 if { (eval echo configure:10801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10801   rm -rf conftest*
10802   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10803 else
10804   echo "configure: failed program was:" >&5
10805   cat conftest.$ac_ext >&5
10806   rm -rf conftest*
10807   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10808 fi
10809 rm -f conftest*
10810 fi
10811
10812 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10813 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10814     cat >> confdefs.h <<\EOF
10815 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10816 EOF
10817
10818 fi
10819
10820 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10821 echo "configure:10822: checking for int32 typedef included by rpc/rpc.h" >&5
10822 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10823   echo $ac_n "(cached) $ac_c" 1>&6
10824 else
10825   
10826 cat > conftest.$ac_ext <<EOF
10827 #line 10828 "configure"
10828 #include "confdefs.h"
10829 #include <sys/types.h>
10830 #if defined(HAVE_RPC_RPC_H)
10831 #include <rpc/rpc.h>
10832 #endif
10833 int main() {
10834 int32 testvar;
10835 ; return 0; }
10836 EOF
10837 if { (eval echo configure:10838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10838   rm -rf conftest*
10839   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10840 else
10841   echo "configure: failed program was:" >&5
10842   cat conftest.$ac_ext >&5
10843   rm -rf conftest*
10844   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10845 fi
10846 rm -f conftest*
10847 fi
10848
10849 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10850 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10851     cat >> confdefs.h <<\EOF
10852 #define HAVE_INT32_FROM_RPC_RPC_H 1
10853 EOF
10854
10855 fi
10856
10857 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10858 echo "configure:10859: checking for uint32 typedef included by rpc/rpc.h" >&5
10859 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10860   echo $ac_n "(cached) $ac_c" 1>&6
10861 else
10862   
10863 cat > conftest.$ac_ext <<EOF
10864 #line 10865 "configure"
10865 #include "confdefs.h"
10866 #include <sys/types.h>
10867 #if defined(HAVE_RPC_RPC_H)
10868 #include <rpc/rpc.h>
10869 #endif
10870 int main() {
10871 uint32 testvar;
10872 ; return 0; }
10873 EOF
10874 if { (eval echo configure:10875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10875   rm -rf conftest*
10876   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10877 else
10878   echo "configure: failed program was:" >&5
10879   cat conftest.$ac_ext >&5
10880   rm -rf conftest*
10881   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10882 fi
10883 rm -f conftest*
10884 fi
10885
10886 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10887 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10888     cat >> confdefs.h <<\EOF
10889 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10890 EOF
10891
10892 fi
10893
10894
10895 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10896 echo "configure:10897: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10897 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10898   echo $ac_n "(cached) $ac_c" 1>&6
10899 else
10900   
10901 cat > conftest.$ac_ext <<EOF
10902 #line 10903 "configure"
10903 #include "confdefs.h"
10904 #include <sys/types.h>
10905 #ifdef HAVE_SYS_SECURITY_H
10906 #include <sys/security.h>
10907 #include <prot.h>
10908 #endif  /* HAVE_SYS_SECURITY_H */
10909 #if defined(HAVE_RPC_RPC_H)
10910 #include <rpc/rpc.h>
10911 #endif
10912 int main() {
10913 int testvar;
10914 ; return 0; }
10915 EOF
10916 if { (eval echo configure:10917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10917   rm -rf conftest*
10918   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10919 else
10920   echo "configure: failed program was:" >&5
10921   cat conftest.$ac_ext >&5
10922   rm -rf conftest*
10923   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10924 fi
10925 rm -f conftest*
10926 fi
10927
10928 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10929 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10930     cat >> confdefs.h <<\EOF
10931 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10932 EOF
10933
10934 fi
10935
10936 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10937 echo "configure:10938: checking for test routines" >&5
10938 if test "$cross_compiling" = yes; then
10939   echo "configure: warning: cannot run when cross-compiling" 1>&2
10940 else
10941   cat > conftest.$ac_ext <<EOF
10942 #line 10943 "configure"
10943 #include "confdefs.h"
10944 #include "${srcdir-.}/tests/trivial.c"
10945 EOF
10946 if { (eval echo configure:10947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10947 then
10948   echo "$ac_t""yes" 1>&6
10949 else
10950   echo "configure: failed program was:" >&5
10951   cat conftest.$ac_ext >&5
10952   rm -fr conftest*
10953   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10954 fi
10955 rm -fr conftest*
10956 fi
10957
10958
10959 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10960 echo "configure:10961: checking for ftruncate extend" >&5
10961 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10962   echo $ac_n "(cached) $ac_c" 1>&6
10963 else
10964   
10965 if test "$cross_compiling" = yes; then
10966   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10967 else
10968   cat > conftest.$ac_ext <<EOF
10969 #line 10970 "configure"
10970 #include "confdefs.h"
10971 #include "${srcdir-.}/tests/ftruncate.c"
10972 EOF
10973 if { (eval echo configure:10974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10974 then
10975   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10976 else
10977   echo "configure: failed program was:" >&5
10978   cat conftest.$ac_ext >&5
10979   rm -fr conftest*
10980   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10981 fi
10982 rm -fr conftest*
10983 fi
10984
10985 fi
10986
10987 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10988 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10989     cat >> confdefs.h <<\EOF
10990 #define HAVE_FTRUNCATE_EXTEND 1
10991 EOF
10992
10993 fi
10994
10995 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10996 echo "configure:10997: checking for AF_LOCAL socket support" >&5
10997 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10998   echo $ac_n "(cached) $ac_c" 1>&6
10999 else
11000   
11001 if test "$cross_compiling" = yes; then
11002   samba_cv_HAVE_WORKING_AF_LOCAL=cross
11003 else
11004   cat > conftest.$ac_ext <<EOF
11005 #line 11006 "configure"
11006 #include "confdefs.h"
11007 #include "${srcdir-.}/tests/unixsock.c"
11008 EOF
11009 if { (eval echo configure:11010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11010 then
11011   samba_cv_HAVE_WORKING_AF_LOCAL=yes
11012 else
11013   echo "configure: failed program was:" >&5
11014   cat conftest.$ac_ext >&5
11015   rm -fr conftest*
11016   samba_cv_HAVE_WORKING_AF_LOCAL=no
11017 fi
11018 rm -fr conftest*
11019 fi
11020
11021 fi
11022
11023 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
11024 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
11025 then
11026     cat >> confdefs.h <<\EOF
11027 #define HAVE_WORKING_AF_LOCAL 1
11028 EOF
11029
11030 fi
11031
11032 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
11033 echo "configure:11034: checking for broken getgroups" >&5
11034 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
11035   echo $ac_n "(cached) $ac_c" 1>&6
11036 else
11037   
11038 if test "$cross_compiling" = yes; then
11039   samba_cv_HAVE_BROKEN_GETGROUPS=cross
11040 else
11041   cat > conftest.$ac_ext <<EOF
11042 #line 11043 "configure"
11043 #include "confdefs.h"
11044 #include "${srcdir-.}/tests/getgroups.c"
11045 EOF
11046 if { (eval echo configure:11047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11047 then
11048   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11049 else
11050   echo "configure: failed program was:" >&5
11051   cat conftest.$ac_ext >&5
11052   rm -fr conftest*
11053   samba_cv_HAVE_BROKEN_GETGROUPS=no
11054 fi
11055 rm -fr conftest*
11056 fi
11057
11058 fi
11059
11060 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11061 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11062     cat >> confdefs.h <<\EOF
11063 #define HAVE_BROKEN_GETGROUPS 1
11064 EOF
11065
11066 fi
11067
11068 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11069 echo "configure:11070: checking whether getpass should be replaced" >&5
11070 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11071   echo $ac_n "(cached) $ac_c" 1>&6
11072 else
11073   
11074 SAVE_CPPFLAGS="$CPPFLAGS"
11075 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt  -I${srcdir-.}/smbwrapper"
11076 cat > conftest.$ac_ext <<EOF
11077 #line 11078 "configure"
11078 #include "confdefs.h"
11079
11080 #define REPLACE_GETPASS 1
11081 #define NO_CONFIG_H 1
11082 #define main dont_declare_main
11083 #include "${srcdir-.}/lib/getsmbpass.c"
11084 #undef main
11085
11086 int main() {
11087
11088 ; return 0; }
11089 EOF
11090 if { (eval echo configure:11091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11091   rm -rf conftest*
11092   samba_cv_REPLACE_GETPASS=yes
11093 else
11094   echo "configure: failed program was:" >&5
11095   cat conftest.$ac_ext >&5
11096   rm -rf conftest*
11097   samba_cv_REPLACE_GETPASS=no
11098 fi
11099 rm -f conftest*
11100 CPPFLAGS="$SAVE_CPPFLAGS"
11101
11102 fi
11103
11104 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11105 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11106         cat >> confdefs.h <<\EOF
11107 #define REPLACE_GETPASS 1
11108 EOF
11109
11110 fi
11111
11112 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11113 echo "configure:11114: checking for broken inet_ntoa" >&5
11114 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11115   echo $ac_n "(cached) $ac_c" 1>&6
11116 else
11117   
11118 if test "$cross_compiling" = yes; then
11119   samba_cv_REPLACE_INET_NTOA=cross
11120 else
11121   cat > conftest.$ac_ext <<EOF
11122 #line 11123 "configure"
11123 #include "confdefs.h"
11124
11125 #include <stdio.h>
11126 #include <sys/types.h>
11127 #include <netinet/in.h>
11128 #ifdef HAVE_ARPA_INET_H
11129 #include <arpa/inet.h>
11130 #endif
11131 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11132 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11133     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11134 exit(1);}
11135 EOF
11136 if { (eval echo configure:11137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11137 then
11138   samba_cv_REPLACE_INET_NTOA=yes
11139 else
11140   echo "configure: failed program was:" >&5
11141   cat conftest.$ac_ext >&5
11142   rm -fr conftest*
11143   samba_cv_REPLACE_INET_NTOA=no
11144 fi
11145 rm -fr conftest*
11146 fi
11147
11148 fi
11149
11150 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11151 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11152     cat >> confdefs.h <<\EOF
11153 #define REPLACE_INET_NTOA 1
11154 EOF
11155
11156 fi
11157
11158 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11159 echo "configure:11160: checking for secure mkstemp" >&5
11160 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11161   echo $ac_n "(cached) $ac_c" 1>&6
11162 else
11163   
11164 if test "$cross_compiling" = yes; then
11165   samba_cv_HAVE_SECURE_MKSTEMP=cross
11166 else
11167   cat > conftest.$ac_ext <<EOF
11168 #line 11169 "configure"
11169 #include "confdefs.h"
11170 #include <stdlib.h>
11171 #include <sys/types.h>
11172 #include <sys/stat.h>
11173 #include <unistd.h>
11174 main() { 
11175   struct stat st;
11176   char tpl[20]="/tmp/test.XXXXXX"; 
11177   int fd = mkstemp(tpl); 
11178   if (fd == -1) exit(1);
11179   unlink(tpl);
11180   if (fstat(fd, &st) != 0) exit(1);
11181   if ((st.st_mode & 0777) != 0600) exit(1);
11182   exit(0);
11183 }
11184 EOF
11185 if { (eval echo configure:11186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11186 then
11187   samba_cv_HAVE_SECURE_MKSTEMP=yes
11188 else
11189   echo "configure: failed program was:" >&5
11190   cat conftest.$ac_ext >&5
11191   rm -fr conftest*
11192   samba_cv_HAVE_SECURE_MKSTEMP=no
11193 fi
11194 rm -fr conftest*
11195 fi
11196
11197 fi
11198
11199 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11200 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11201     cat >> confdefs.h <<\EOF
11202 #define HAVE_SECURE_MKSTEMP 1
11203 EOF
11204
11205 fi
11206
11207 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11208 echo "configure:11209: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11209 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11210   echo $ac_n "(cached) $ac_c" 1>&6
11211 else
11212   
11213 if test "$cross_compiling" = yes; then
11214   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11215 else
11216   cat > conftest.$ac_ext <<EOF
11217 #line 11218 "configure"
11218 #include "confdefs.h"
11219 #include <unistd.h>
11220 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11221 EOF
11222 if { (eval echo configure:11223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11223 then
11224   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11225 else
11226   echo "configure: failed program was:" >&5
11227   cat conftest.$ac_ext >&5
11228   rm -fr conftest*
11229   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11230 fi
11231 rm -fr conftest*
11232 fi
11233
11234 fi
11235
11236 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11237 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11238     cat >> confdefs.h <<\EOF
11239 #define SYSCONF_SC_NGROUPS_MAX 1
11240 EOF
11241
11242 fi
11243
11244 echo $ac_n "checking for root""... $ac_c" 1>&6
11245 echo "configure:11246: checking for root" >&5
11246 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11247   echo $ac_n "(cached) $ac_c" 1>&6
11248 else
11249   
11250 if test "$cross_compiling" = yes; then
11251   samba_cv_HAVE_ROOT=cross
11252 else
11253   cat > conftest.$ac_ext <<EOF
11254 #line 11255 "configure"
11255 #include "confdefs.h"
11256 main() { exit(getuid() != 0); }
11257 EOF
11258 if { (eval echo configure:11259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11259 then
11260   samba_cv_HAVE_ROOT=yes
11261 else
11262   echo "configure: failed program was:" >&5
11263   cat conftest.$ac_ext >&5
11264   rm -fr conftest*
11265   samba_cv_HAVE_ROOT=no
11266 fi
11267 rm -fr conftest*
11268 fi
11269
11270 fi
11271
11272 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11273 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11274     cat >> confdefs.h <<\EOF
11275 #define HAVE_ROOT 1
11276 EOF
11277
11278 else
11279     echo "configure: warning: running as non-root will disable some tests" 1>&2
11280 fi
11281
11282 ##################
11283 # look for a method of finding the list of network interfaces
11284 iface=no;
11285 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11286 echo "configure:11287: checking for iface AIX" >&5
11287 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11288   echo $ac_n "(cached) $ac_c" 1>&6
11289 else
11290   
11291 if test "$cross_compiling" = yes; then
11292   samba_cv_HAVE_IFACE_AIX=cross
11293 else
11294   cat > conftest.$ac_ext <<EOF
11295 #line 11296 "configure"
11296 #include "confdefs.h"
11297
11298 #define HAVE_IFACE_AIX 1
11299 #define AUTOCONF_TEST 1
11300 #include "confdefs.h"
11301 #include "${srcdir-.}/lib/interfaces.c"
11302 EOF
11303 if { (eval echo configure:11304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11304 then
11305   samba_cv_HAVE_IFACE_AIX=yes
11306 else
11307   echo "configure: failed program was:" >&5
11308   cat conftest.$ac_ext >&5
11309   rm -fr conftest*
11310   samba_cv_HAVE_IFACE_AIX=no
11311 fi
11312 rm -fr conftest*
11313 fi
11314
11315 fi
11316
11317 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11318 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11319     iface=yes;cat >> confdefs.h <<\EOF
11320 #define HAVE_IFACE_AIX 1
11321 EOF
11322
11323 fi
11324
11325 if test $iface = no; then
11326 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11327 echo "configure:11328: checking for iface ifconf" >&5
11328 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11329   echo $ac_n "(cached) $ac_c" 1>&6
11330 else
11331   
11332 if test "$cross_compiling" = yes; then
11333   samba_cv_HAVE_IFACE_IFCONF=cross
11334 else
11335   cat > conftest.$ac_ext <<EOF
11336 #line 11337 "configure"
11337 #include "confdefs.h"
11338
11339 #define HAVE_IFACE_IFCONF 1
11340 #define AUTOCONF_TEST 1
11341 #include "confdefs.h"
11342 #include "${srcdir-.}/lib/interfaces.c"
11343 EOF
11344 if { (eval echo configure:11345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11345 then
11346   samba_cv_HAVE_IFACE_IFCONF=yes
11347 else
11348   echo "configure: failed program was:" >&5
11349   cat conftest.$ac_ext >&5
11350   rm -fr conftest*
11351   samba_cv_HAVE_IFACE_IFCONF=no
11352 fi
11353 rm -fr conftest*
11354 fi
11355
11356 fi
11357
11358 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11359 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11360     iface=yes;cat >> confdefs.h <<\EOF
11361 #define HAVE_IFACE_IFCONF 1
11362 EOF
11363
11364 fi
11365 fi
11366
11367 if test $iface = no; then
11368 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11369 echo "configure:11370: checking for iface ifreq" >&5
11370 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11371   echo $ac_n "(cached) $ac_c" 1>&6
11372 else
11373   
11374 if test "$cross_compiling" = yes; then
11375   samba_cv_HAVE_IFACE_IFREQ=cross
11376 else
11377   cat > conftest.$ac_ext <<EOF
11378 #line 11379 "configure"
11379 #include "confdefs.h"
11380
11381 #define HAVE_IFACE_IFREQ 1
11382 #define AUTOCONF_TEST 1
11383 #include "confdefs.h"
11384 #include "${srcdir-.}/lib/interfaces.c"
11385 EOF
11386 if { (eval echo configure:11387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11387 then
11388   samba_cv_HAVE_IFACE_IFREQ=yes
11389 else
11390   echo "configure: failed program was:" >&5
11391   cat conftest.$ac_ext >&5
11392   rm -fr conftest*
11393   samba_cv_HAVE_IFACE_IFREQ=no
11394 fi
11395 rm -fr conftest*
11396 fi
11397
11398 fi
11399
11400 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11401 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11402     iface=yes;cat >> confdefs.h <<\EOF
11403 #define HAVE_IFACE_IFREQ 1
11404 EOF
11405
11406 fi
11407 fi
11408
11409
11410 ################################################
11411 # look for a method of setting the effective uid
11412 seteuid=no;
11413 if test $seteuid = no; then
11414 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11415 echo "configure:11416: checking for setresuid" >&5
11416 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11417   echo $ac_n "(cached) $ac_c" 1>&6
11418 else
11419   
11420 if test "$cross_compiling" = yes; then
11421   samba_cv_USE_SETRESUID=cross
11422 else
11423   cat > conftest.$ac_ext <<EOF
11424 #line 11425 "configure"
11425 #include "confdefs.h"
11426
11427 #define AUTOCONF_TEST 1
11428 #define USE_SETRESUID 1
11429 #include "confdefs.h"
11430 #include "${srcdir-.}/lib/util_sec.c"
11431 EOF
11432 if { (eval echo configure:11433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11433 then
11434   samba_cv_USE_SETRESUID=yes
11435 else
11436   echo "configure: failed program was:" >&5
11437   cat conftest.$ac_ext >&5
11438   rm -fr conftest*
11439   samba_cv_USE_SETRESUID=no
11440 fi
11441 rm -fr conftest*
11442 fi
11443
11444 fi
11445
11446 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11447 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11448     seteuid=yes;cat >> confdefs.h <<\EOF
11449 #define USE_SETRESUID 1
11450 EOF
11451
11452 fi
11453 fi
11454
11455
11456 if test $seteuid = no; then
11457 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11458 echo "configure:11459: checking for setreuid" >&5
11459 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11460   echo $ac_n "(cached) $ac_c" 1>&6
11461 else
11462   
11463 if test "$cross_compiling" = yes; then
11464   samba_cv_USE_SETREUID=cross
11465 else
11466   cat > conftest.$ac_ext <<EOF
11467 #line 11468 "configure"
11468 #include "confdefs.h"
11469
11470 #define AUTOCONF_TEST 1
11471 #define USE_SETREUID 1
11472 #include "confdefs.h"
11473 #include "${srcdir-.}/lib/util_sec.c"
11474 EOF
11475 if { (eval echo configure:11476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11476 then
11477   samba_cv_USE_SETREUID=yes
11478 else
11479   echo "configure: failed program was:" >&5
11480   cat conftest.$ac_ext >&5
11481   rm -fr conftest*
11482   samba_cv_USE_SETREUID=no
11483 fi
11484 rm -fr conftest*
11485 fi
11486
11487 fi
11488
11489 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11490 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11491     seteuid=yes;cat >> confdefs.h <<\EOF
11492 #define USE_SETREUID 1
11493 EOF
11494
11495 fi
11496 fi
11497
11498 if test $seteuid = no; then
11499 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11500 echo "configure:11501: checking for seteuid" >&5
11501 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11502   echo $ac_n "(cached) $ac_c" 1>&6
11503 else
11504   
11505 if test "$cross_compiling" = yes; then
11506   samba_cv_USE_SETEUID=cross
11507 else
11508   cat > conftest.$ac_ext <<EOF
11509 #line 11510 "configure"
11510 #include "confdefs.h"
11511
11512 #define AUTOCONF_TEST 1
11513 #define USE_SETEUID 1
11514 #include "confdefs.h"
11515 #include "${srcdir-.}/lib/util_sec.c"
11516 EOF
11517 if { (eval echo configure:11518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11518 then
11519   samba_cv_USE_SETEUID=yes
11520 else
11521   echo "configure: failed program was:" >&5
11522   cat conftest.$ac_ext >&5
11523   rm -fr conftest*
11524   samba_cv_USE_SETEUID=no
11525 fi
11526 rm -fr conftest*
11527 fi
11528
11529 fi
11530
11531 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11532 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11533     seteuid=yes;cat >> confdefs.h <<\EOF
11534 #define USE_SETEUID 1
11535 EOF
11536
11537 fi
11538 fi
11539
11540 if test $seteuid = no; then
11541 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11542 echo "configure:11543: checking for setuidx" >&5
11543 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11544   echo $ac_n "(cached) $ac_c" 1>&6
11545 else
11546   
11547 if test "$cross_compiling" = yes; then
11548   samba_cv_USE_SETUIDX=cross
11549 else
11550   cat > conftest.$ac_ext <<EOF
11551 #line 11552 "configure"
11552 #include "confdefs.h"
11553
11554 #define AUTOCONF_TEST 1
11555 #define USE_SETUIDX 1
11556 #include "confdefs.h"
11557 #include "${srcdir-.}/lib/util_sec.c"
11558 EOF
11559 if { (eval echo configure:11560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11560 then
11561   samba_cv_USE_SETUIDX=yes
11562 else
11563   echo "configure: failed program was:" >&5
11564   cat conftest.$ac_ext >&5
11565   rm -fr conftest*
11566   samba_cv_USE_SETUIDX=no
11567 fi
11568 rm -fr conftest*
11569 fi
11570
11571 fi
11572
11573 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11574 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11575     seteuid=yes;cat >> confdefs.h <<\EOF
11576 #define USE_SETUIDX 1
11577 EOF
11578
11579 fi
11580 fi
11581
11582
11583 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11584 echo "configure:11585: checking for working mmap" >&5
11585 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11586   echo $ac_n "(cached) $ac_c" 1>&6
11587 else
11588   
11589 if test "$cross_compiling" = yes; then
11590   samba_cv_HAVE_MMAP=cross
11591 else
11592   cat > conftest.$ac_ext <<EOF
11593 #line 11594 "configure"
11594 #include "confdefs.h"
11595 #include "${srcdir-.}/tests/shared_mmap.c"
11596 EOF
11597 if { (eval echo configure:11598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11598 then
11599   samba_cv_HAVE_MMAP=yes
11600 else
11601   echo "configure: failed program was:" >&5
11602   cat conftest.$ac_ext >&5
11603   rm -fr conftest*
11604   samba_cv_HAVE_MMAP=no
11605 fi
11606 rm -fr conftest*
11607 fi
11608
11609 fi
11610
11611 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11612 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11613     cat >> confdefs.h <<\EOF
11614 #define HAVE_MMAP 1
11615 EOF
11616
11617 fi
11618
11619 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11620 echo "configure:11621: checking for ftruncate needs root" >&5
11621 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11622   echo $ac_n "(cached) $ac_c" 1>&6
11623 else
11624   
11625 if test "$cross_compiling" = yes; then
11626   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11627 else
11628   cat > conftest.$ac_ext <<EOF
11629 #line 11630 "configure"
11630 #include "confdefs.h"
11631 #include "${srcdir-.}/tests/ftruncroot.c"
11632 EOF
11633 if { (eval echo configure:11634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11634 then
11635   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11636 else
11637   echo "configure: failed program was:" >&5
11638   cat conftest.$ac_ext >&5
11639   rm -fr conftest*
11640   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11641 fi
11642 rm -fr conftest*
11643 fi
11644
11645 fi
11646
11647 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11648 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11649     cat >> confdefs.h <<\EOF
11650 #define FTRUNCATE_NEEDS_ROOT 1
11651 EOF
11652
11653 fi
11654
11655 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11656 echo "configure:11657: checking for fcntl locking" >&5
11657 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11658   echo $ac_n "(cached) $ac_c" 1>&6
11659 else
11660   
11661 if test "$cross_compiling" = yes; then
11662   samba_cv_HAVE_FCNTL_LOCK=cross
11663 else
11664   cat > conftest.$ac_ext <<EOF
11665 #line 11666 "configure"
11666 #include "confdefs.h"
11667 #include "${srcdir-.}/tests/fcntl_lock.c"
11668 EOF
11669 if { (eval echo configure:11670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11670 then
11671   samba_cv_HAVE_FCNTL_LOCK=yes
11672 else
11673   echo "configure: failed program was:" >&5
11674   cat conftest.$ac_ext >&5
11675   rm -fr conftest*
11676   samba_cv_HAVE_FCNTL_LOCK=no
11677 fi
11678 rm -fr conftest*
11679 fi
11680
11681 fi
11682
11683 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11684 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11685     cat >> confdefs.h <<\EOF
11686 #define HAVE_FCNTL_LOCK 1
11687 EOF
11688
11689 fi
11690
11691 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11692 echo "configure:11693: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11693 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11694   echo $ac_n "(cached) $ac_c" 1>&6
11695 else
11696   
11697 if test "$cross_compiling" = yes; then
11698   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11699 else
11700   cat > conftest.$ac_ext <<EOF
11701 #line 11702 "configure"
11702 #include "confdefs.h"
11703 #include "${srcdir-.}/tests/fcntl_lock64.c"
11704 EOF
11705 if { (eval echo configure:11706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11706 then
11707   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11708 else
11709   echo "configure: failed program was:" >&5
11710   cat conftest.$ac_ext >&5
11711   rm -fr conftest*
11712   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11713 fi
11714 rm -fr conftest*
11715 fi
11716
11717 fi
11718
11719 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11720 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11721     cat >> confdefs.h <<\EOF
11722 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11723 EOF
11724
11725
11726 else
11727
11728
11729   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11730 echo "configure:11731: checking for 64 bit fcntl locking" >&5
11731 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11732   echo $ac_n "(cached) $ac_c" 1>&6
11733 else
11734   
11735   if test "$cross_compiling" = yes; then
11736   samba_cv_HAVE_STRUCT_FLOCK64=cross
11737 else
11738   cat > conftest.$ac_ext <<EOF
11739 #line 11740 "configure"
11740 #include "confdefs.h"
11741
11742 #if defined(HAVE_UNISTD_H)
11743 #include <unistd.h>
11744 #endif
11745 #include <stdio.h>
11746 #include <stdlib.h>
11747
11748 #ifdef HAVE_FCNTL_H
11749 #include <fcntl.h>
11750 #endif
11751
11752 #ifdef HAVE_SYS_FCNTL_H
11753 #include <sys/fcntl.h>
11754 #endif
11755 main() { struct flock64 fl64;
11756 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11757 exit(0);
11758 #else
11759 exit(1);
11760 #endif
11761 }
11762 EOF
11763 if { (eval echo configure:11764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11764 then
11765   samba_cv_HAVE_STRUCT_FLOCK64=yes
11766 else
11767   echo "configure: failed program was:" >&5
11768   cat conftest.$ac_ext >&5
11769   rm -fr conftest*
11770   samba_cv_HAVE_STRUCT_FLOCK64=no
11771 fi
11772 rm -fr conftest*
11773 fi
11774
11775 fi
11776
11777 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11778
11779   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11780       cat >> confdefs.h <<\EOF
11781 #define HAVE_STRUCT_FLOCK64 1
11782 EOF
11783
11784   fi
11785 fi
11786
11787 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11788 echo "configure:11789: checking for st_blocks in struct stat" >&5
11789 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11790   echo $ac_n "(cached) $ac_c" 1>&6
11791 else
11792   
11793 cat > conftest.$ac_ext <<EOF
11794 #line 11795 "configure"
11795 #include "confdefs.h"
11796 #include <sys/types.h>
11797 #include <sys/stat.h>
11798 #include <unistd.h>
11799 int main() {
11800 struct stat st;  st.st_blocks = 0;
11801 ; return 0; }
11802 EOF
11803 if { (eval echo configure:11804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11804   rm -rf conftest*
11805   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11806 else
11807   echo "configure: failed program was:" >&5
11808   cat conftest.$ac_ext >&5
11809   rm -rf conftest*
11810   samba_cv_HAVE_STAT_ST_BLOCKS=no
11811 fi
11812 rm -f conftest*
11813 fi
11814
11815 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11816 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11817     cat >> confdefs.h <<\EOF
11818 #define HAVE_STAT_ST_BLOCKS 1
11819 EOF
11820
11821 fi 
11822
11823 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
11824 echo "configure:11825: checking for st_blksize in struct stat" >&5
11825 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLKSIZE'+set}'`\" = set"; then
11826   echo $ac_n "(cached) $ac_c" 1>&6
11827 else
11828   
11829 cat > conftest.$ac_ext <<EOF
11830 #line 11831 "configure"
11831 #include "confdefs.h"
11832 #include <sys/types.h>
11833 #include <sys/stat.h>
11834 #include <unistd.h>
11835 int main() {
11836 struct stat st;  st.st_blksize = 0;
11837 ; return 0; }
11838 EOF
11839 if { (eval echo configure:11840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11840   rm -rf conftest*
11841   samba_cv_HAVE_STAT_ST_BLKSIZE=yes
11842 else
11843   echo "configure: failed program was:" >&5
11844   cat conftest.$ac_ext >&5
11845   rm -rf conftest*
11846   samba_cv_HAVE_STAT_ST_BLKSIZE=no
11847 fi
11848 rm -f conftest*
11849 fi
11850
11851 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLKSIZE" 1>&6
11852 if test x"$samba_cv_HAVE_STAT_ST_BLKSIZE" = x"yes"; then
11853     cat >> confdefs.h <<\EOF
11854 #define HAVE_STAT_ST_BLKSIZE 1
11855 EOF
11856
11857 fi
11858
11859 case "$host_os" in
11860 *linux*)
11861 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11862 echo "configure:11863: checking for broken RedHat 7.2 system header files" >&5
11863 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11864   echo $ac_n "(cached) $ac_c" 1>&6
11865 else
11866   
11867 cat > conftest.$ac_ext <<EOF
11868 #line 11869 "configure"
11869 #include "confdefs.h"
11870
11871 #ifdef HAVE_SYS_VFS_H
11872 #include <sys/vfs.h>
11873 #endif
11874 #ifdef HAVE_SYS_CAPABILITY_H
11875 #include <sys/capability.h>
11876 #endif
11877
11878 int main() {
11879 int i;
11880 ; return 0; }
11881 EOF
11882 if { (eval echo configure:11883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11883   rm -rf conftest*
11884   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11885 else
11886   echo "configure: failed program was:" >&5
11887   cat conftest.$ac_ext >&5
11888   rm -rf conftest*
11889   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11890 fi
11891 rm -f conftest*
11892 fi
11893
11894 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11895 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11896    cat >> confdefs.h <<\EOF
11897 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11898 EOF
11899
11900 fi
11901 ;;
11902 esac
11903
11904 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11905 echo "configure:11906: checking for broken nisplus include files" >&5
11906 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11907   echo $ac_n "(cached) $ac_c" 1>&6
11908 else
11909   
11910 cat > conftest.$ac_ext <<EOF
11911 #line 11912 "configure"
11912 #include "confdefs.h"
11913 #include <sys/acl.h>
11914 #if defined(HAVE_RPCSVC_NIS_H)
11915 #include <rpcsvc/nis.h>
11916 #endif
11917 int main() {
11918 int i;
11919 ; return 0; }
11920 EOF
11921 if { (eval echo configure:11922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11922   rm -rf conftest*
11923   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11924 else
11925   echo "configure: failed program was:" >&5
11926   cat conftest.$ac_ext >&5
11927   rm -rf conftest*
11928   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11929 fi
11930 rm -f conftest*
11931 fi
11932
11933 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11934 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11935     cat >> confdefs.h <<\EOF
11936 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11937 EOF
11938
11939 fi
11940
11941
11942 #################################################
11943 # check for smbwrapper support
11944 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11945 echo "configure:11946: checking whether to use smbwrapper" >&5
11946 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11947 if test "${with_smbwrapper+set}" = set; then
11948   withval="$with_smbwrapper"
11949    case "$withval" in
11950   yes)
11951     echo "$ac_t""yes" 1>&6
11952     cat >> confdefs.h <<\EOF
11953 #define WITH_SMBWRAPPER 1
11954 EOF
11955
11956         WRAPPROG="bin/smbsh"
11957         WRAP="bin/smbwrapper.$SHLIBEXT"
11958
11959         if test x$ATTEMPT_WRAP32_BUILD = x; then
11960                 WRAP32=""
11961         else
11962                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11963         fi
11964
11965 # Conditions under which smbwrapper should not be built.
11966
11967         if test x$PICFLAG = x; then
11968            echo No support for PIC code - disabling smbwrapper and smbsh
11969            WRAPPROG=""
11970            WRAP=""
11971            WRAP32=""
11972         elif test x$ac_cv_func_syscall = xno; then
11973            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11974            WRAPPROG=""
11975            WRAP=""
11976            WRAP32=""
11977         fi
11978     ;;
11979   *)
11980     echo "$ac_t""no" 1>&6
11981     ;;
11982   esac 
11983 else
11984   echo "$ac_t""no" 1>&6
11985
11986 fi
11987
11988
11989 #################################################
11990 # check for AFS clear-text auth support
11991 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11992 echo "configure:11993: checking whether to use AFS clear-text auth" >&5
11993 # Check whether --with-afs or --without-afs was given.
11994 if test "${with_afs+set}" = set; then
11995   withval="$with_afs"
11996    case "$withval" in
11997   yes)
11998     echo "$ac_t""yes" 1>&6
11999     cat >> confdefs.h <<\EOF
12000 #define WITH_AFS 1
12001 EOF
12002
12003     ;;
12004   *)
12005     echo "$ac_t""no" 1>&6
12006     ;;
12007   esac 
12008 else
12009   echo "$ac_t""no" 1>&6
12010
12011 fi
12012
12013
12014
12015 #################################################
12016 # check for the DFS clear-text auth system
12017 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
12018 echo "configure:12019: checking whether to use DFS clear-text auth" >&5
12019 # Check whether --with-dfs or --without-dfs was given.
12020 if test "${with_dfs+set}" = set; then
12021   withval="$with_dfs"
12022    case "$withval" in
12023   yes)
12024     echo "$ac_t""yes" 1>&6
12025     cat >> confdefs.h <<\EOF
12026 #define WITH_DFS 1
12027 EOF
12028
12029     ;;
12030   *)
12031     echo "$ac_t""no" 1>&6
12032     ;;
12033   esac 
12034 else
12035   echo "$ac_t""no" 1>&6
12036
12037 fi
12038
12039
12040
12041 #################################################
12042 # see if this box has the RedHat location for kerberos
12043 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
12044 echo "configure:12045: checking for /usr/kerberos" >&5
12045 if test -d /usr/kerberos; then
12046     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
12047     CFLAGS="$CFLAGS -I/usr/kerberos/include"
12048     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
12049     echo "$ac_t""yes" 1>&6
12050 else
12051     echo "$ac_t""no" 1>&6
12052 fi
12053
12054 #################################################
12055 # check for location of Kerberos 5 install
12056 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
12057 echo "configure:12058: checking for kerberos 5 install path" >&5
12058 # Check whether --with-krb5 or --without-krb5 was given.
12059 if test "${with_krb5+set}" = set; then
12060   withval="$with_krb5"
12061    case "$withval" in
12062   no)
12063     echo "$ac_t""no" 1>&6
12064     ;;
12065   *)
12066     echo "$ac_t""yes" 1>&6
12067     LIBS="$LIBS -lkrb5"
12068     CFLAGS="$CFLAGS -I$withval/include"
12069     CPPFLAGS="$CPPFLAGS -I$withval/include"
12070     LDFLAGS="$LDFLAGS -L$withval/lib"
12071     ;;
12072   esac 
12073 else
12074   echo "$ac_t""no" 1>&6
12075
12076 fi
12077
12078
12079 # now check for krb5.h. Some systems have the libraries without the headers!
12080 # note that this check is done here to allow for different kerberos
12081 # include paths
12082 for ac_hdr in krb5.h
12083 do
12084 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12085 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12086 echo "configure:12087: checking for $ac_hdr" >&5
12087 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12088   echo $ac_n "(cached) $ac_c" 1>&6
12089 else
12090   cat > conftest.$ac_ext <<EOF
12091 #line 12092 "configure"
12092 #include "confdefs.h"
12093 #include <$ac_hdr>
12094 EOF
12095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12096 { (eval echo configure:12097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12098 if test -z "$ac_err"; then
12099   rm -rf conftest*
12100   eval "ac_cv_header_$ac_safe=yes"
12101 else
12102   echo "$ac_err" >&5
12103   echo "configure: failed program was:" >&5
12104   cat conftest.$ac_ext >&5
12105   rm -rf conftest*
12106   eval "ac_cv_header_$ac_safe=no"
12107 fi
12108 rm -f conftest*
12109 fi
12110 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12111   echo "$ac_t""yes" 1>&6
12112     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12113   cat >> confdefs.h <<EOF
12114 #define $ac_tr_hdr 1
12115 EOF
12116  
12117 else
12118   echo "$ac_t""no" 1>&6
12119 fi
12120 done
12121
12122
12123 # now check for gssapi headers.  This is also done here to allow for
12124 # different kerberos include paths
12125 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12126 do
12127 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12128 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12129 echo "configure:12130: checking for $ac_hdr" >&5
12130 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12131   echo $ac_n "(cached) $ac_c" 1>&6
12132 else
12133   cat > conftest.$ac_ext <<EOF
12134 #line 12135 "configure"
12135 #include "confdefs.h"
12136 #include <$ac_hdr>
12137 EOF
12138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12139 { (eval echo configure:12140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12141 if test -z "$ac_err"; then
12142   rm -rf conftest*
12143   eval "ac_cv_header_$ac_safe=yes"
12144 else
12145   echo "$ac_err" >&5
12146   echo "configure: failed program was:" >&5
12147   cat conftest.$ac_ext >&5
12148   rm -rf conftest*
12149   eval "ac_cv_header_$ac_safe=no"
12150 fi
12151 rm -f conftest*
12152 fi
12153 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12154   echo "$ac_t""yes" 1>&6
12155     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12156   cat >> confdefs.h <<EOF
12157 #define $ac_tr_hdr 1
12158 EOF
12159  
12160 else
12161   echo "$ac_t""no" 1>&6
12162 fi
12163 done
12164
12165
12166 ##################################################################
12167 # we might need the k5crypto and com_err libraries on some systems
12168 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12169 echo "configure:12170: checking for _et_list in -lcom_err" >&5
12170 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12171 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12172   echo $ac_n "(cached) $ac_c" 1>&6
12173 else
12174   ac_save_LIBS="$LIBS"
12175 LIBS="-lcom_err  $LIBS"
12176 cat > conftest.$ac_ext <<EOF
12177 #line 12178 "configure"
12178 #include "confdefs.h"
12179 /* Override any gcc2 internal prototype to avoid an error.  */
12180 /* We use char because int might match the return type of a gcc2
12181     builtin and then its argument prototype would still apply.  */
12182 char _et_list();
12183
12184 int main() {
12185 _et_list()
12186 ; return 0; }
12187 EOF
12188 if { (eval echo configure:12189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12189   rm -rf conftest*
12190   eval "ac_cv_lib_$ac_lib_var=yes"
12191 else
12192   echo "configure: failed program was:" >&5
12193   cat conftest.$ac_ext >&5
12194   rm -rf conftest*
12195   eval "ac_cv_lib_$ac_lib_var=no"
12196 fi
12197 rm -f conftest*
12198 LIBS="$ac_save_LIBS"
12199
12200 fi
12201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12202   echo "$ac_t""yes" 1>&6
12203   LIBS="$LIBS -lcom_err"
12204 else
12205   echo "$ac_t""no" 1>&6
12206 fi
12207
12208 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12209 echo "configure:12210: checking for krb5_encrypt_data in -lk5crypto" >&5
12210 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12211 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12212   echo $ac_n "(cached) $ac_c" 1>&6
12213 else
12214   ac_save_LIBS="$LIBS"
12215 LIBS="-lk5crypto  $LIBS"
12216 cat > conftest.$ac_ext <<EOF
12217 #line 12218 "configure"
12218 #include "confdefs.h"
12219 /* Override any gcc2 internal prototype to avoid an error.  */
12220 /* We use char because int might match the return type of a gcc2
12221     builtin and then its argument prototype would still apply.  */
12222 char krb5_encrypt_data();
12223
12224 int main() {
12225 krb5_encrypt_data()
12226 ; return 0; }
12227 EOF
12228 if { (eval echo configure:12229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12229   rm -rf conftest*
12230   eval "ac_cv_lib_$ac_lib_var=yes"
12231 else
12232   echo "configure: failed program was:" >&5
12233   cat conftest.$ac_ext >&5
12234   rm -rf conftest*
12235   eval "ac_cv_lib_$ac_lib_var=no"
12236 fi
12237 rm -f conftest*
12238 LIBS="$ac_save_LIBS"
12239
12240 fi
12241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12242   echo "$ac_t""yes" 1>&6
12243   LIBS="$LIBS -lk5crypto"
12244 else
12245   echo "$ac_t""no" 1>&6
12246 fi
12247
12248
12249 ########################################################
12250 # now see if we can find the krb5 libs in standard paths
12251 # or as specified above
12252 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12253 echo "configure:12254: checking for krb5_mk_req_extended in -lkrb5" >&5
12254 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12255 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12256   echo $ac_n "(cached) $ac_c" 1>&6
12257 else
12258   ac_save_LIBS="$LIBS"
12259 LIBS="-lkrb5  $LIBS"
12260 cat > conftest.$ac_ext <<EOF
12261 #line 12262 "configure"
12262 #include "confdefs.h"
12263 /* Override any gcc2 internal prototype to avoid an error.  */
12264 /* We use char because int might match the return type of a gcc2
12265     builtin and then its argument prototype would still apply.  */
12266 char krb5_mk_req_extended();
12267
12268 int main() {
12269 krb5_mk_req_extended()
12270 ; return 0; }
12271 EOF
12272 if { (eval echo configure:12273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12273   rm -rf conftest*
12274   eval "ac_cv_lib_$ac_lib_var=yes"
12275 else
12276   echo "configure: failed program was:" >&5
12277   cat conftest.$ac_ext >&5
12278   rm -rf conftest*
12279   eval "ac_cv_lib_$ac_lib_var=no"
12280 fi
12281 rm -f conftest*
12282 LIBS="$ac_save_LIBS"
12283
12284 fi
12285 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12286   echo "$ac_t""yes" 1>&6
12287   LIBS="$LIBS -lkrb5";
12288         cat >> confdefs.h <<\EOF
12289 #define HAVE_KRB5 1
12290 EOF
12291
12292 else
12293   echo "$ac_t""no" 1>&6
12294 fi
12295
12296
12297 ########################################################
12298 # now see if we can find the gssapi libs in standard paths
12299 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12300 echo "configure:12301: checking for gss_display_status in -lgssapi_krb5" >&5
12301 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12302 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12303   echo $ac_n "(cached) $ac_c" 1>&6
12304 else
12305   ac_save_LIBS="$LIBS"
12306 LIBS="-lgssapi_krb5  $LIBS"
12307 cat > conftest.$ac_ext <<EOF
12308 #line 12309 "configure"
12309 #include "confdefs.h"
12310 /* Override any gcc2 internal prototype to avoid an error.  */
12311 /* We use char because int might match the return type of a gcc2
12312     builtin and then its argument prototype would still apply.  */
12313 char gss_display_status();
12314
12315 int main() {
12316 gss_display_status()
12317 ; return 0; }
12318 EOF
12319 if { (eval echo configure:12320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12320   rm -rf conftest*
12321   eval "ac_cv_lib_$ac_lib_var=yes"
12322 else
12323   echo "configure: failed program was:" >&5
12324   cat conftest.$ac_ext >&5
12325   rm -rf conftest*
12326   eval "ac_cv_lib_$ac_lib_var=no"
12327 fi
12328 rm -f conftest*
12329 LIBS="$ac_save_LIBS"
12330
12331 fi
12332 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12333   echo "$ac_t""yes" 1>&6
12334   LIBS="$LIBS -lgssapi_krb5";
12335         cat >> confdefs.h <<\EOF
12336 #define HAVE_GSSAPI 1
12337 EOF
12338
12339 else
12340   echo "$ac_t""no" 1>&6
12341 fi
12342
12343
12344 ##################################################################
12345 # we might need the lber lib on some systems. To avoid link errors
12346 # this test must be before the libldap test
12347 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12348 echo "configure:12349: checking for ber_scanf in -llber" >&5
12349 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12350 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12351   echo $ac_n "(cached) $ac_c" 1>&6
12352 else
12353   ac_save_LIBS="$LIBS"
12354 LIBS="-llber  $LIBS"
12355 cat > conftest.$ac_ext <<EOF
12356 #line 12357 "configure"
12357 #include "confdefs.h"
12358 /* Override any gcc2 internal prototype to avoid an error.  */
12359 /* We use char because int might match the return type of a gcc2
12360     builtin and then its argument prototype would still apply.  */
12361 char ber_scanf();
12362
12363 int main() {
12364 ber_scanf()
12365 ; return 0; }
12366 EOF
12367 if { (eval echo configure:12368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12368   rm -rf conftest*
12369   eval "ac_cv_lib_$ac_lib_var=yes"
12370 else
12371   echo "configure: failed program was:" >&5
12372   cat conftest.$ac_ext >&5
12373   rm -rf conftest*
12374   eval "ac_cv_lib_$ac_lib_var=no"
12375 fi
12376 rm -f conftest*
12377 LIBS="$ac_save_LIBS"
12378
12379 fi
12380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12381   echo "$ac_t""yes" 1>&6
12382   LIBS="$LIBS -llber"
12383 else
12384   echo "$ac_t""no" 1>&6
12385 fi
12386
12387
12388 ########################################################
12389 # now see if we can find the ldap libs in standard paths
12390 if test x$have_ldap != xyes; then
12391 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12392 echo "configure:12393: checking for ldap_domain2hostlist in -lldap" >&5
12393 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12394 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12395   echo $ac_n "(cached) $ac_c" 1>&6
12396 else
12397   ac_save_LIBS="$LIBS"
12398 LIBS="-lldap  $LIBS"
12399 cat > conftest.$ac_ext <<EOF
12400 #line 12401 "configure"
12401 #include "confdefs.h"
12402 /* Override any gcc2 internal prototype to avoid an error.  */
12403 /* We use char because int might match the return type of a gcc2
12404     builtin and then its argument prototype would still apply.  */
12405 char ldap_domain2hostlist();
12406
12407 int main() {
12408 ldap_domain2hostlist()
12409 ; return 0; }
12410 EOF
12411 if { (eval echo configure:12412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12412   rm -rf conftest*
12413   eval "ac_cv_lib_$ac_lib_var=yes"
12414 else
12415   echo "configure: failed program was:" >&5
12416   cat conftest.$ac_ext >&5
12417   rm -rf conftest*
12418   eval "ac_cv_lib_$ac_lib_var=no"
12419 fi
12420 rm -f conftest*
12421 LIBS="$ac_save_LIBS"
12422
12423 fi
12424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12425   echo "$ac_t""yes" 1>&6
12426   LIBS="$LIBS -lldap";
12427         cat >> confdefs.h <<\EOF
12428 #define HAVE_LDAP 1
12429 EOF
12430
12431 else
12432   echo "$ac_t""no" 1>&6
12433 fi
12434
12435
12436         ########################################################
12437         # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
12438         # Check found in pam_ldap 145.
12439         for ac_func in ldap_set_rebind_proc
12440 do
12441 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12442 echo "configure:12443: checking for $ac_func" >&5
12443 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12444   echo $ac_n "(cached) $ac_c" 1>&6
12445 else
12446   cat > conftest.$ac_ext <<EOF
12447 #line 12448 "configure"
12448 #include "confdefs.h"
12449 /* System header to define __stub macros and hopefully few prototypes,
12450     which can conflict with char $ac_func(); below.  */
12451 #include <assert.h>
12452 /* Override any gcc2 internal prototype to avoid an error.  */
12453 /* We use char because int might match the return type of a gcc2
12454     builtin and then its argument prototype would still apply.  */
12455 char $ac_func();
12456
12457 int main() {
12458
12459 /* The GNU C library defines this for functions which it implements
12460     to always fail with ENOSYS.  Some functions are actually named
12461     something starting with __ and the normal name is an alias.  */
12462 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12463 choke me
12464 #else
12465 $ac_func();
12466 #endif
12467
12468 ; return 0; }
12469 EOF
12470 if { (eval echo configure:12471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12471   rm -rf conftest*
12472   eval "ac_cv_func_$ac_func=yes"
12473 else
12474   echo "configure: failed program was:" >&5
12475   cat conftest.$ac_ext >&5
12476   rm -rf conftest*
12477   eval "ac_cv_func_$ac_func=no"
12478 fi
12479 rm -f conftest*
12480 fi
12481
12482 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12483   echo "$ac_t""yes" 1>&6
12484     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12485   cat >> confdefs.h <<EOF
12486 #define $ac_tr_func 1
12487 EOF
12488  
12489 else
12490   echo "$ac_t""no" 1>&6
12491 fi
12492 done
12493
12494         echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6
12495 echo "configure:12496: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
12496 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then
12497   echo $ac_n "(cached) $ac_c" 1>&6
12498 else
12499   
12500         cat > conftest.$ac_ext <<EOF
12501 #line 12502 "configure"
12502 #include "confdefs.h"
12503
12504         #include <lber.h>
12505         #include <ldap.h>
12506 int main() {
12507 ldap_set_rebind_proc(0, 0, 0);
12508 ; return 0; }
12509 EOF
12510 if { (eval echo configure:12511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12511   rm -rf conftest*
12512   pam_ldap_cv_ldap_set_rebind_proc=3
12513 else
12514   echo "configure: failed program was:" >&5
12515   cat conftest.$ac_ext >&5
12516   rm -rf conftest*
12517   pam_ldap_cv_ldap_set_rebind_proc=2
12518 fi
12519 rm -f conftest* 
12520 fi
12521
12522 echo "$ac_t""$pam_ldap_cv_ldap_set_rebind_proc" 1>&6
12523         cat >> confdefs.h <<EOF
12524 #define LDAP_SET_REBIND_PROC_ARGS $pam_ldap_cv_ldap_set_rebind_proc
12525 EOF
12526
12527 fi
12528
12529 #################################################
12530 # check for automount support
12531 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12532 echo "configure:12533: checking whether to use AUTOMOUNT" >&5
12533 # Check whether --with-automount or --without-automount was given.
12534 if test "${with_automount+set}" = set; then
12535   withval="$with_automount"
12536    case "$withval" in
12537   yes)
12538     echo "$ac_t""yes" 1>&6
12539     cat >> confdefs.h <<\EOF
12540 #define WITH_AUTOMOUNT 1
12541 EOF
12542
12543     ;;
12544   *)
12545     echo "$ac_t""no" 1>&6
12546     ;;
12547   esac 
12548 else
12549   echo "$ac_t""no" 1>&6
12550
12551 fi
12552
12553
12554 #################################################
12555 # check for smbmount support
12556 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12557 echo "configure:12558: checking whether to use SMBMOUNT" >&5
12558 # Check whether --with-smbmount or --without-smbmount was given.
12559 if test "${with_smbmount+set}" = set; then
12560   withval="$with_smbmount"
12561    case "$withval" in
12562   yes)
12563         case "$host_os" in
12564         *linux*)
12565                 echo "$ac_t""yes" 1>&6
12566                 cat >> confdefs.h <<\EOF
12567 #define WITH_SMBMOUNT 1
12568 EOF
12569
12570                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12571                 ;;
12572         *)
12573                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12574                 ;;
12575         esac
12576     ;;
12577   *)
12578     echo "$ac_t""no" 1>&6
12579     MPROGS=
12580     ;;
12581   esac 
12582 else
12583   echo "$ac_t""no" 1>&6
12584   MPROGS=
12585
12586 fi
12587
12588
12589
12590 #################################################
12591 # check for a PAM clear-text auth, accounts, password and session support
12592 with_pam_for_crypt=no
12593 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12594 echo "configure:12595: checking whether to use PAM" >&5
12595 # Check whether --with-pam or --without-pam was given.
12596 if test "${with_pam+set}" = set; then
12597   withval="$with_pam"
12598    case "$withval" in
12599   yes)
12600     echo "$ac_t""yes" 1>&6
12601     cat >> confdefs.h <<\EOF
12602 #define WITH_PAM 1
12603 EOF
12604
12605     LIBS="$LIBS -lpam"
12606     with_pam_for_crypt=yes
12607     ;;
12608   *)
12609     echo "$ac_t""no" 1>&6
12610     ;;
12611   esac 
12612 else
12613   echo "$ac_t""no" 1>&6
12614
12615 fi
12616
12617
12618 # we can't build a pam module if we don't have pam.
12619 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12620 echo "configure:12621: checking for pam_get_data in -lpam" >&5
12621 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12622 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12623   echo $ac_n "(cached) $ac_c" 1>&6
12624 else
12625   ac_save_LIBS="$LIBS"
12626 LIBS="-lpam  $LIBS"
12627 cat > conftest.$ac_ext <<EOF
12628 #line 12629 "configure"
12629 #include "confdefs.h"
12630 /* Override any gcc2 internal prototype to avoid an error.  */
12631 /* We use char because int might match the return type of a gcc2
12632     builtin and then its argument prototype would still apply.  */
12633 char pam_get_data();
12634
12635 int main() {
12636 pam_get_data()
12637 ; return 0; }
12638 EOF
12639 if { (eval echo configure:12640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12640   rm -rf conftest*
12641   eval "ac_cv_lib_$ac_lib_var=yes"
12642 else
12643   echo "configure: failed program was:" >&5
12644   cat conftest.$ac_ext >&5
12645   rm -rf conftest*
12646   eval "ac_cv_lib_$ac_lib_var=no"
12647 fi
12648 rm -f conftest*
12649 LIBS="$ac_save_LIBS"
12650
12651 fi
12652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12653   echo "$ac_t""yes" 1>&6
12654   cat >> confdefs.h <<\EOF
12655 #define HAVE_LIBPAM 1
12656 EOF
12657
12658 else
12659   echo "$ac_t""no" 1>&6
12660 fi
12661
12662
12663 #################################################
12664 # check for pam_smbpass support
12665 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12666 echo "configure:12667: checking whether to use pam_smbpass" >&5
12667 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12668 if test "${with_pam_smbpass+set}" = set; then
12669   withval="$with_pam_smbpass"
12670    case "$withval" in
12671   yes)
12672     echo "$ac_t""yes" 1>&6
12673
12674 # Conditions under which pam_smbpass should not be built.
12675
12676        if test x$PICFLAG = x; then
12677           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12678           PAM_MOD=""
12679        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12680           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12681           PAM_MOD=""
12682        else
12683           PAM_MOD="bin/pam_smbpass.so"
12684        fi
12685     ;;
12686   *)
12687     echo "$ac_t""no" 1>&6
12688     ;;
12689   esac 
12690 else
12691   echo "$ac_t""no" 1>&6
12692
12693 fi
12694
12695
12696
12697 ###############################################
12698 # test for where we get crypt() from, but only
12699 # if not using PAM
12700 if test $with_pam_for_crypt = no; then
12701 for ac_func in crypt
12702 do
12703 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12704 echo "configure:12705: checking for $ac_func" >&5
12705 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12706   echo $ac_n "(cached) $ac_c" 1>&6
12707 else
12708   cat > conftest.$ac_ext <<EOF
12709 #line 12710 "configure"
12710 #include "confdefs.h"
12711 /* System header to define __stub macros and hopefully few prototypes,
12712     which can conflict with char $ac_func(); below.  */
12713 #include <assert.h>
12714 /* Override any gcc2 internal prototype to avoid an error.  */
12715 /* We use char because int might match the return type of a gcc2
12716     builtin and then its argument prototype would still apply.  */
12717 char $ac_func();
12718
12719 int main() {
12720
12721 /* The GNU C library defines this for functions which it implements
12722     to always fail with ENOSYS.  Some functions are actually named
12723     something starting with __ and the normal name is an alias.  */
12724 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12725 choke me
12726 #else
12727 $ac_func();
12728 #endif
12729
12730 ; return 0; }
12731 EOF
12732 if { (eval echo configure:12733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12733   rm -rf conftest*
12734   eval "ac_cv_func_$ac_func=yes"
12735 else
12736   echo "configure: failed program was:" >&5
12737   cat conftest.$ac_ext >&5
12738   rm -rf conftest*
12739   eval "ac_cv_func_$ac_func=no"
12740 fi
12741 rm -f conftest*
12742 fi
12743
12744 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12745   echo "$ac_t""yes" 1>&6
12746     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12747   cat >> confdefs.h <<EOF
12748 #define $ac_tr_func 1
12749 EOF
12750  
12751 else
12752   echo "$ac_t""no" 1>&6
12753 fi
12754 done
12755
12756 if test x"$ac_cv_func_crypt" = x"no"; then
12757     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12758 echo "configure:12759: checking for crypt in -lcrypt" >&5
12759 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12760 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12761   echo $ac_n "(cached) $ac_c" 1>&6
12762 else
12763   ac_save_LIBS="$LIBS"
12764 LIBS="-lcrypt  $LIBS"
12765 cat > conftest.$ac_ext <<EOF
12766 #line 12767 "configure"
12767 #include "confdefs.h"
12768 /* Override any gcc2 internal prototype to avoid an error.  */
12769 /* We use char because int might match the return type of a gcc2
12770     builtin and then its argument prototype would still apply.  */
12771 char crypt();
12772
12773 int main() {
12774 crypt()
12775 ; return 0; }
12776 EOF
12777 if { (eval echo configure:12778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12778   rm -rf conftest*
12779   eval "ac_cv_lib_$ac_lib_var=yes"
12780 else
12781   echo "configure: failed program was:" >&5
12782   cat conftest.$ac_ext >&5
12783   rm -rf conftest*
12784   eval "ac_cv_lib_$ac_lib_var=no"
12785 fi
12786 rm -f conftest*
12787 LIBS="$ac_save_LIBS"
12788
12789 fi
12790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12791   echo "$ac_t""yes" 1>&6
12792   LIBS="$LIBS -lcrypt";
12793         cat >> confdefs.h <<\EOF
12794 #define HAVE_CRYPT 1
12795 EOF
12796
12797 else
12798   echo "$ac_t""no" 1>&6
12799 fi
12800
12801 fi
12802 fi
12803
12804 ##
12805 ## moved after the check for -lcrypt in order to
12806 ## ensure that the necessary libraries are included
12807 ## check checking for truncated salt.  Wrapped by the
12808 ## $with_pam_for_crypt variable as above   --jerry
12809 ##
12810 if test $with_pam_for_crypt = no; then
12811 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12812 echo "configure:12813: checking for a crypt that needs truncated salt" >&5
12813 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12814   echo $ac_n "(cached) $ac_c" 1>&6
12815 else
12816   
12817 if test "$cross_compiling" = yes; then
12818   samba_cv_HAVE_TRUNCATED_SALT=cross
12819 else
12820   cat > conftest.$ac_ext <<EOF
12821 #line 12822 "configure"
12822 #include "confdefs.h"
12823 #include "${srcdir-.}/tests/crypttest.c"
12824 EOF
12825 if { (eval echo configure:12826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12826 then
12827   samba_cv_HAVE_TRUNCATED_SALT=no
12828 else
12829   echo "configure: failed program was:" >&5
12830   cat conftest.$ac_ext >&5
12831   rm -fr conftest*
12832   samba_cv_HAVE_TRUNCATED_SALT=yes
12833 fi
12834 rm -fr conftest*
12835 fi
12836
12837 fi
12838
12839 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12840 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12841         cat >> confdefs.h <<\EOF
12842 #define HAVE_TRUNCATED_SALT 1
12843 EOF
12844
12845 fi
12846 fi
12847
12848 # New experimental SAM system
12849
12850 echo $ac_n "checking whether to build the new (experimental) SAM database""... $ac_c" 1>&6
12851 echo "configure:12852: checking whether to build the new (experimental) SAM database" >&5
12852 # Check whether --with-sam or --without-sam was given.
12853 if test "${with_sam+set}" = set; then
12854   withval="$with_sam"
12855    case "$withval" in
12856   yes)
12857     echo "$ac_t""yes" 1>&6
12858     cat >> confdefs.h <<\EOF
12859 #define WITH_SAM 1
12860 EOF
12861
12862     ;;
12863   *)
12864     echo "$ac_t""no" 1>&6
12865     ;;
12866   esac 
12867 else
12868   echo "$ac_t""no" 1>&6
12869
12870 fi
12871
12872
12873
12874 ########################################################################################
12875 ##
12876 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12877 ##
12878 ########################################################################################
12879
12880 #################################################
12881 # check for a TDB password database
12882 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12883 echo "configure:12884: checking whether to use TDB SAM database" >&5
12884 # Check whether --with-tdbsam or --without-tdbsam was given.
12885 if test "${with_tdbsam+set}" = set; then
12886   withval="$with_tdbsam"
12887    case "$withval" in
12888   yes)
12889     echo "$ac_t""yes" 1>&6
12890     cat >> confdefs.h <<\EOF
12891 #define WITH_TDB_SAM 1
12892 EOF
12893
12894     ;;
12895   *)
12896     echo "$ac_t""no" 1>&6
12897     ;;
12898   esac 
12899 else
12900   echo "$ac_t""no" 1>&6
12901
12902 fi
12903
12904
12905 #################################################
12906 # check for a NISPLUS password database
12907 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12908 echo "configure:12909: checking whether to use NISPLUS SAM database" >&5
12909 # Check whether --with-nisplussam or --without-nisplussam was given.
12910 if test "${with_nisplussam+set}" = set; then
12911   withval="$with_nisplussam"
12912    case "$withval" in
12913   yes)
12914     echo "$ac_t""yes" 1>&6
12915     cat >> confdefs.h <<\EOF
12916 #define WITH_NISPLUS_SAM 1
12917 EOF
12918
12919     ;;
12920   *)
12921     echo "$ac_t""no" 1>&6
12922     ;;
12923   esac 
12924 else
12925   echo "$ac_t""no" 1>&6
12926
12927 fi
12928
12929
12930 ########################################################################################
12931 ##
12932 ## END OF TESTS FOR SAM BACKENDS.  
12933 ##
12934 ########################################################################################
12935
12936 #################################################
12937 # check for a NISPLUS_HOME support 
12938 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12939 echo "configure:12940: checking whether to use NISPLUS_HOME" >&5
12940 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12941 if test "${with_nisplus_home+set}" = set; then
12942   withval="$with_nisplus_home"
12943    case "$withval" in
12944   yes)
12945     echo "$ac_t""yes" 1>&6
12946     cat >> confdefs.h <<\EOF
12947 #define WITH_NISPLUS_HOME 1
12948 EOF
12949
12950     ;;
12951   *)
12952     echo "$ac_t""no" 1>&6
12953     ;;
12954   esac 
12955 else
12956   echo "$ac_t""no" 1>&6
12957
12958 fi
12959
12960
12961 #################################################
12962 # check for syslog logging
12963 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12964 echo "configure:12965: checking whether to use syslog logging" >&5
12965 # Check whether --with-syslog or --without-syslog was given.
12966 if test "${with_syslog+set}" = set; then
12967   withval="$with_syslog"
12968    case "$withval" in
12969   yes)
12970     echo "$ac_t""yes" 1>&6
12971     cat >> confdefs.h <<\EOF
12972 #define WITH_SYSLOG 1
12973 EOF
12974
12975     ;;
12976   *)
12977     echo "$ac_t""no" 1>&6
12978     ;;
12979   esac 
12980 else
12981   echo "$ac_t""no" 1>&6
12982
12983 fi
12984
12985
12986 #################################################
12987 # check for a shared memory profiling support
12988 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12989 echo "configure:12990: checking whether to use profiling" >&5
12990 # Check whether --with-profiling-data or --without-profiling-data was given.
12991 if test "${with_profiling_data+set}" = set; then
12992   withval="$with_profiling_data"
12993    case "$withval" in
12994   yes)
12995     echo "$ac_t""yes" 1>&6
12996     cat >> confdefs.h <<\EOF
12997 #define WITH_PROFILE 1
12998 EOF
12999
13000     ;;
13001   *)
13002     echo "$ac_t""no" 1>&6
13003     ;;
13004   esac 
13005 else
13006   echo "$ac_t""no" 1>&6
13007
13008 fi
13009
13010
13011
13012 #################################################
13013 # check for experimental disk-quotas support
13014 QUOTAOBJS=smbd/noquotas.o
13015
13016 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
13017 echo "configure:13018: checking whether to support disk-quotas" >&5
13018 # Check whether --with-quotas or --without-quotas was given.
13019 if test "${with_quotas+set}" = set; then
13020   withval="$with_quotas"
13021    case "$withval" in
13022   yes)
13023     echo "$ac_t""yes" 1>&6
13024     case "$host_os" in
13025       *linux*)
13026         # Check for kernel 2.4.x quota braindamage...
13027         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
13028 echo "configure:13029: checking for linux 2.4.x quota braindamage.." >&5
13029 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
13030   echo $ac_n "(cached) $ac_c" 1>&6
13031 else
13032   
13033         cat > conftest.$ac_ext <<EOF
13034 #line 13035 "configure"
13035 #include "confdefs.h"
13036 #include <stdio.h>
13037 #include <sys/types.h>
13038 #include <asm/types.h>
13039 #include <linux/quota.h>
13040 #include <mntent.h>
13041 #include <linux/unistd.h>
13042 int main() {
13043 struct mem_dqblk D;
13044 ; return 0; }
13045 EOF
13046 if { (eval echo configure:13047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13047   rm -rf conftest*
13048   samba_cv_linux_2_4_quota_braindamage=yes
13049 else
13050   echo "configure: failed program was:" >&5
13051   cat conftest.$ac_ext >&5
13052   rm -rf conftest*
13053   samba_cv_linux_2_4_quota_braindamage=no
13054 fi
13055 rm -f conftest*
13056 fi
13057
13058 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
13059 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
13060         cat >> confdefs.h <<\EOF
13061 #define LINUX_QUOTAS_2 1
13062 EOF
13063
13064 else
13065         cat >> confdefs.h <<\EOF
13066 #define LINUX_QUOTAS_1 1
13067 EOF
13068
13069 fi
13070         ;;
13071       *)
13072         ;;
13073     esac
13074     QUOTAOBJS=smbd/quotas.o
13075     cat >> confdefs.h <<\EOF
13076 #define WITH_QUOTAS 1
13077 EOF
13078
13079     ;;
13080   *)
13081     echo "$ac_t""no" 1>&6
13082     ;;
13083   esac 
13084 else
13085   echo "$ac_t""no" 1>&6
13086
13087 fi
13088
13089
13090
13091 #################################################
13092 # check for experimental utmp accounting
13093
13094 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
13095 echo "configure:13096: checking whether to support utmp accounting" >&5
13096 # Check whether --with-utmp or --without-utmp was given.
13097 if test "${with_utmp+set}" = set; then
13098   withval="$with_utmp"
13099    case "$withval" in
13100   yes)
13101     echo "$ac_t""yes" 1>&6
13102     cat >> confdefs.h <<\EOF
13103 #define WITH_UTMP 1
13104 EOF
13105
13106     ;;
13107   *)
13108     echo "$ac_t""no" 1>&6
13109     ;;
13110   esac 
13111 else
13112   echo "$ac_t""no" 1>&6
13113
13114 fi
13115
13116
13117 #################################################
13118 # choose native language(s) of man pages
13119 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13120 echo "configure:13121: checking chosen man pages' language(s)" >&5
13121 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13122 if test "${with_manpages_langs+set}" = set; then
13123   withval="$with_manpages_langs"
13124    case "$withval" in
13125   yes|no)
13126     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13127     manlangs="en"
13128   ;;
13129   *)
13130     manlangs="$withval"
13131   ;;
13132   esac
13133
13134   echo "$ac_t""$manlangs" 1>&6
13135   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
13136   
13137 else
13138   manlangs="en"
13139   echo "$ac_t""$manlangs" 1>&6
13140   
13141
13142 fi
13143
13144
13145 #################################################
13146 # should we build libsmbclient?
13147
13148 LIBSMBCLIENT_SHARED=
13149 LIBSMBCLIENT=
13150 echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
13151 echo "configure:13152: checking whether to build the libsmbclient shared library" >&5
13152 # Check whether --with-libsmbclient or --without-libsmbclient was given.
13153 if test "${with_libsmbclient+set}" = set; then
13154   withval="$with_libsmbclient"
13155    case "$withval" in
13156   no) 
13157      echo "$ac_t""no" 1>&6
13158      ;;
13159   *)
13160      if test $BLDSHARED = true; then
13161         LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
13162         LIBSMBCLIENT=libsmbclient
13163         echo "$ac_t""yes" 1>&6
13164      else
13165         echo "$ac_t""no shared library support" 1>&6
13166      fi
13167      ;;
13168   esac 
13169 else
13170   echo "$ac_t""yes" 1>&6
13171
13172 fi
13173
13174
13175
13176 #################################################
13177 # these tests are taken from the GNU fileutils package
13178 echo "checking how to get filesystem space usage" 1>&6
13179 echo "configure:13180: checking how to get filesystem space usage" >&5
13180 space=no
13181
13182 # Test for statvfs64.
13183 if test $space = no; then
13184   # SVR4
13185   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13186 echo "configure:13187: checking statvfs64 function (SVR4)" >&5
13187 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13188   echo $ac_n "(cached) $ac_c" 1>&6
13189 else
13190   if test "$cross_compiling" = yes; then
13191   fu_cv_sys_stat_statvfs64=cross
13192 else
13193   cat > conftest.$ac_ext <<EOF
13194 #line 13195 "configure"
13195 #include "confdefs.h"
13196
13197 #if defined(HAVE_UNISTD_H)
13198 #include <unistd.h>
13199 #endif
13200 #include <sys/types.h>
13201 #include <sys/statvfs.h>
13202   main ()
13203   {
13204     struct statvfs64 fsd;
13205     exit (statvfs64 (".", &fsd));
13206   }
13207 EOF
13208 if { (eval echo configure:13209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13209 then
13210   fu_cv_sys_stat_statvfs64=yes
13211 else
13212   echo "configure: failed program was:" >&5
13213   cat conftest.$ac_ext >&5
13214   rm -fr conftest*
13215   fu_cv_sys_stat_statvfs64=no
13216 fi
13217 rm -fr conftest*
13218 fi
13219
13220 fi
13221
13222 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13223   if test $fu_cv_sys_stat_statvfs64 = yes; then
13224     space=yes
13225     cat >> confdefs.h <<\EOF
13226 #define STAT_STATVFS64 1
13227 EOF
13228
13229   fi
13230 fi
13231
13232 # Perform only the link test since it seems there are no variants of the
13233 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13234 # because that got a false positive on SCO OSR5.  Adding the declaration
13235 # of a `struct statvfs' causes this test to fail (as it should) on such
13236 # systems.  That system is reported to work fine with STAT_STATFS4 which
13237 # is what it gets when this test fails.
13238 if test $space = no; then
13239   # SVR4
13240   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13241 echo "configure:13242: checking statvfs function (SVR4)" >&5
13242 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13243   echo $ac_n "(cached) $ac_c" 1>&6
13244 else
13245   cat > conftest.$ac_ext <<EOF
13246 #line 13247 "configure"
13247 #include "confdefs.h"
13248 #include <sys/types.h>
13249 #include <sys/statvfs.h>
13250 int main() {
13251 struct statvfs fsd; statvfs (0, &fsd);
13252 ; return 0; }
13253 EOF
13254 if { (eval echo configure:13255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13255   rm -rf conftest*
13256   fu_cv_sys_stat_statvfs=yes
13257 else
13258   echo "configure: failed program was:" >&5
13259   cat conftest.$ac_ext >&5
13260   rm -rf conftest*
13261   fu_cv_sys_stat_statvfs=no
13262 fi
13263 rm -f conftest*
13264 fi
13265
13266 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13267   if test $fu_cv_sys_stat_statvfs = yes; then
13268     space=yes
13269     cat >> confdefs.h <<\EOF
13270 #define STAT_STATVFS 1
13271 EOF
13272
13273   fi
13274 fi
13275
13276 if test $space = no; then
13277   # DEC Alpha running OSF/1
13278   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13279 echo "configure:13280: checking for 3-argument statfs function (DEC OSF/1)" >&5
13280   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13281   echo $ac_n "(cached) $ac_c" 1>&6
13282 else
13283   if test "$cross_compiling" = yes; then
13284   fu_cv_sys_stat_statfs3_osf1=no
13285 else
13286   cat > conftest.$ac_ext <<EOF
13287 #line 13288 "configure"
13288 #include "confdefs.h"
13289
13290 #include <sys/param.h>
13291 #include <sys/types.h>
13292 #include <sys/mount.h>
13293   main ()
13294   {
13295     struct statfs fsd;
13296     fsd.f_fsize = 0;
13297     exit (statfs (".", &fsd, sizeof (struct statfs)));
13298   }
13299 EOF
13300 if { (eval echo configure:13301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13301 then
13302   fu_cv_sys_stat_statfs3_osf1=yes
13303 else
13304   echo "configure: failed program was:" >&5
13305   cat conftest.$ac_ext >&5
13306   rm -fr conftest*
13307   fu_cv_sys_stat_statfs3_osf1=no
13308 fi
13309 rm -fr conftest*
13310 fi
13311
13312 fi
13313
13314   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13315   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13316     space=yes
13317     cat >> confdefs.h <<\EOF
13318 #define STAT_STATFS3_OSF1 1
13319 EOF
13320
13321   fi
13322 fi
13323
13324 if test $space = no; then
13325 # AIX
13326   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13327 echo "configure:13328: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13328   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13329   echo $ac_n "(cached) $ac_c" 1>&6
13330 else
13331   if test "$cross_compiling" = yes; then
13332   fu_cv_sys_stat_statfs2_bsize=no
13333 else
13334   cat > conftest.$ac_ext <<EOF
13335 #line 13336 "configure"
13336 #include "confdefs.h"
13337
13338 #ifdef HAVE_SYS_PARAM_H
13339 #include <sys/param.h>
13340 #endif
13341 #ifdef HAVE_SYS_MOUNT_H
13342 #include <sys/mount.h>
13343 #endif
13344 #ifdef HAVE_SYS_VFS_H
13345 #include <sys/vfs.h>
13346 #endif
13347   main ()
13348   {
13349   struct statfs fsd;
13350   fsd.f_bsize = 0;
13351   exit (statfs (".", &fsd));
13352   }
13353 EOF
13354 if { (eval echo configure:13355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13355 then
13356   fu_cv_sys_stat_statfs2_bsize=yes
13357 else
13358   echo "configure: failed program was:" >&5
13359   cat conftest.$ac_ext >&5
13360   rm -fr conftest*
13361   fu_cv_sys_stat_statfs2_bsize=no
13362 fi
13363 rm -fr conftest*
13364 fi
13365
13366 fi
13367
13368   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13369   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13370     space=yes
13371     cat >> confdefs.h <<\EOF
13372 #define STAT_STATFS2_BSIZE 1
13373 EOF
13374
13375   fi
13376 fi
13377
13378 if test $space = no; then
13379 # SVR3
13380   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13381 echo "configure:13382: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13382   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13383   echo $ac_n "(cached) $ac_c" 1>&6
13384 else
13385   if test "$cross_compiling" = yes; then
13386   fu_cv_sys_stat_statfs4=no
13387 else
13388   cat > conftest.$ac_ext <<EOF
13389 #line 13390 "configure"
13390 #include "confdefs.h"
13391 #include <sys/types.h>
13392 #include <sys/statfs.h>
13393   main ()
13394   {
13395   struct statfs fsd;
13396   exit (statfs (".", &fsd, sizeof fsd, 0));
13397   }
13398 EOF
13399 if { (eval echo configure:13400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13400 then
13401   fu_cv_sys_stat_statfs4=yes
13402 else
13403   echo "configure: failed program was:" >&5
13404   cat conftest.$ac_ext >&5
13405   rm -fr conftest*
13406   fu_cv_sys_stat_statfs4=no
13407 fi
13408 rm -fr conftest*
13409 fi
13410
13411 fi
13412
13413   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13414   if test $fu_cv_sys_stat_statfs4 = yes; then
13415     space=yes
13416     cat >> confdefs.h <<\EOF
13417 #define STAT_STATFS4 1
13418 EOF
13419
13420   fi
13421 fi
13422
13423 if test $space = no; then
13424 # 4.4BSD and NetBSD
13425   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13426 echo "configure:13427: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13427   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13428   echo $ac_n "(cached) $ac_c" 1>&6
13429 else
13430   if test "$cross_compiling" = yes; then
13431   fu_cv_sys_stat_statfs2_fsize=no
13432 else
13433   cat > conftest.$ac_ext <<EOF
13434 #line 13435 "configure"
13435 #include "confdefs.h"
13436 #include <sys/types.h>
13437 #ifdef HAVE_SYS_PARAM_H
13438 #include <sys/param.h>
13439 #endif
13440 #ifdef HAVE_SYS_MOUNT_H
13441 #include <sys/mount.h>
13442 #endif
13443   main ()
13444   {
13445   struct statfs fsd;
13446   fsd.f_fsize = 0;
13447   exit (statfs (".", &fsd));
13448   }
13449 EOF
13450 if { (eval echo configure:13451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13451 then
13452   fu_cv_sys_stat_statfs2_fsize=yes
13453 else
13454   echo "configure: failed program was:" >&5
13455   cat conftest.$ac_ext >&5
13456   rm -fr conftest*
13457   fu_cv_sys_stat_statfs2_fsize=no
13458 fi
13459 rm -fr conftest*
13460 fi
13461
13462 fi
13463
13464   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13465   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13466     space=yes
13467     cat >> confdefs.h <<\EOF
13468 #define STAT_STATFS2_FSIZE 1
13469 EOF
13470
13471   fi
13472 fi
13473
13474 if test $space = no; then
13475   # Ultrix
13476   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13477 echo "configure:13478: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13478   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13479   echo $ac_n "(cached) $ac_c" 1>&6
13480 else
13481   if test "$cross_compiling" = yes; then
13482   fu_cv_sys_stat_fs_data=no
13483 else
13484   cat > conftest.$ac_ext <<EOF
13485 #line 13486 "configure"
13486 #include "confdefs.h"
13487 #include <sys/types.h>
13488 #ifdef HAVE_SYS_PARAM_H
13489 #include <sys/param.h>
13490 #endif
13491 #ifdef HAVE_SYS_MOUNT_H
13492 #include <sys/mount.h>
13493 #endif
13494 #ifdef HAVE_SYS_FS_TYPES_H
13495 #include <sys/fs_types.h>
13496 #endif
13497   main ()
13498   {
13499   struct fs_data fsd;
13500   /* Ultrix's statfs returns 1 for success,
13501      0 for not mounted, -1 for failure.  */
13502   exit (statfs (".", &fsd) != 1);
13503   }
13504 EOF
13505 if { (eval echo configure:13506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13506 then
13507   fu_cv_sys_stat_fs_data=yes
13508 else
13509   echo "configure: failed program was:" >&5
13510   cat conftest.$ac_ext >&5
13511   rm -fr conftest*
13512   fu_cv_sys_stat_fs_data=no
13513 fi
13514 rm -fr conftest*
13515 fi
13516
13517 fi
13518
13519   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13520   if test $fu_cv_sys_stat_fs_data = yes; then
13521     space=yes
13522     cat >> confdefs.h <<\EOF
13523 #define STAT_STATFS2_FS_DATA 1
13524 EOF
13525
13526   fi
13527 fi
13528
13529 #
13530 # As a gating factor for large file support, in order to
13531 # use <4GB files we must have the following minimal support
13532 # available.
13533 # long long, and a 64 bit off_t or off64_t.
13534 # If we don't have all of these then disable large
13535 # file support.
13536 #
13537 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13538 echo "configure:13539: checking if large file support can be enabled" >&5
13539 cat > conftest.$ac_ext <<EOF
13540 #line 13541 "configure"
13541 #include "confdefs.h"
13542
13543 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13544 #include <sys/types.h>
13545 #else
13546 __COMPILE_ERROR_
13547 #endif
13548
13549 int main() {
13550 int i
13551 ; return 0; }
13552 EOF
13553 if { (eval echo configure:13554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13554   rm -rf conftest*
13555   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13556 else
13557   echo "configure: failed program was:" >&5
13558   cat conftest.$ac_ext >&5
13559   rm -rf conftest*
13560   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13561 fi
13562 rm -f conftest*
13563 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13564     cat >> confdefs.h <<\EOF
13565 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13566 EOF
13567
13568 fi
13569 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13570
13571 # Check whether --with-spinlocks or --without-spinlocks was given.
13572 if test "${with_spinlocks+set}" = set; then
13573   withval="$with_spinlocks"
13574   :
13575 fi
13576
13577 if test "x$with_spinlocks" = "xyes"; then
13578     cat >> confdefs.h <<\EOF
13579 #define USE_SPINLOCKS 1
13580 EOF
13581
13582
13583     case "$host_cpu" in
13584         sparc)
13585             cat >> confdefs.h <<\EOF
13586 #define SPARC_SPINLOCKS 1
13587 EOF
13588
13589             ;;
13590
13591         i386|i486|i586|i686)
13592             cat >> confdefs.h <<\EOF
13593 #define INTEL_SPINLOCKS 1
13594 EOF
13595
13596             ;;
13597
13598         mips)
13599             cat >> confdefs.h <<\EOF
13600 #define MIPS_SPINLOCKS 1
13601 EOF
13602
13603             ;;
13604
13605         powerpc)
13606             cat >> confdefs.h <<\EOF
13607 #define POWERPC_SPINLOCKS 1
13608 EOF
13609
13610             ;;
13611     esac
13612 fi
13613
13614 #################################################
13615 # check for ACL support
13616
13617 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13618 echo "configure:13619: checking whether to support ACLs" >&5
13619 # Check whether --with-acl-support or --without-acl-support was given.
13620 if test "${with_acl_support+set}" = set; then
13621   withval="$with_acl_support"
13622    case "$withval" in
13623   yes)
13624
13625         case "$host_os" in
13626         *sysv5*)
13627                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13628                 cat >> confdefs.h <<\EOF
13629 #define HAVE_UNIXWARE_ACLS 1
13630 EOF
13631
13632                 ;;
13633         *solaris*)
13634                 echo "$ac_t""Using solaris ACLs" 1>&6
13635                 cat >> confdefs.h <<\EOF
13636 #define HAVE_SOLARIS_ACLS 1
13637 EOF
13638
13639                 ;;
13640         *hpux*)
13641                 echo "$ac_t""Using HPUX ACLs" 1>&6
13642                 cat >> confdefs.h <<\EOF
13643 #define HAVE_HPUX_ACLS 1
13644 EOF
13645
13646                 ;;
13647         *irix*)
13648                 echo "$ac_t""Using IRIX ACLs" 1>&6
13649                 cat >> confdefs.h <<\EOF
13650 #define HAVE_IRIX_ACLS 1
13651 EOF
13652
13653                 ;;
13654         *aix*)
13655                 echo "$ac_t""Using AIX ACLs" 1>&6
13656                 cat >> confdefs.h <<\EOF
13657 #define HAVE_AIX_ACLS 1
13658 EOF
13659
13660                 ;;
13661         *osf*)
13662                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13663                 cat >> confdefs.h <<\EOF
13664 #define HAVE_TRU64_ACLS 1
13665 EOF
13666
13667                 LIBS="$LIBS -lpacl"
13668                 ;;
13669         *)
13670                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13671 echo "configure:13672: checking for acl_get_file in -lacl" >&5
13672 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13673 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13674   echo $ac_n "(cached) $ac_c" 1>&6
13675 else
13676   ac_save_LIBS="$LIBS"
13677 LIBS="-lacl  $LIBS"
13678 cat > conftest.$ac_ext <<EOF
13679 #line 13680 "configure"
13680 #include "confdefs.h"
13681 /* Override any gcc2 internal prototype to avoid an error.  */
13682 /* We use char because int might match the return type of a gcc2
13683     builtin and then its argument prototype would still apply.  */
13684 char acl_get_file();
13685
13686 int main() {
13687 acl_get_file()
13688 ; return 0; }
13689 EOF
13690 if { (eval echo configure:13691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13691   rm -rf conftest*
13692   eval "ac_cv_lib_$ac_lib_var=yes"
13693 else
13694   echo "configure: failed program was:" >&5
13695   cat conftest.$ac_ext >&5
13696   rm -rf conftest*
13697   eval "ac_cv_lib_$ac_lib_var=no"
13698 fi
13699 rm -f conftest*
13700 LIBS="$ac_save_LIBS"
13701
13702 fi
13703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13704   echo "$ac_t""yes" 1>&6
13705     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13706     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13707   cat >> confdefs.h <<EOF
13708 #define $ac_tr_lib 1
13709 EOF
13710
13711   LIBS="-lacl $LIBS"
13712
13713 else
13714   echo "$ac_t""no" 1>&6
13715 fi
13716
13717                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13718 echo "configure:13719: checking for ACL support" >&5
13719 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13720   echo $ac_n "(cached) $ac_c" 1>&6
13721 else
13722   
13723                 cat > conftest.$ac_ext <<EOF
13724 #line 13725 "configure"
13725 #include "confdefs.h"
13726 #include <sys/types.h>
13727 #include <sys/acl.h>
13728 int main() {
13729  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13730 ; return 0; }
13731 EOF
13732 if { (eval echo configure:13733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13733   rm -rf conftest*
13734   samba_cv_HAVE_POSIX_ACLS=yes
13735 else
13736   echo "configure: failed program was:" >&5
13737   cat conftest.$ac_ext >&5
13738   rm -rf conftest*
13739   samba_cv_HAVE_POSIX_ACLS=no
13740 fi
13741 rm -f conftest*
13742 fi
13743
13744 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13745                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13746                                 echo "$ac_t""Using posix ACLs" 1>&6
13747                                 cat >> confdefs.h <<\EOF
13748 #define HAVE_POSIX_ACLS 1
13749 EOF
13750
13751                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13752 echo "configure:13753: checking for acl_get_perm_np" >&5
13753 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13754   echo $ac_n "(cached) $ac_c" 1>&6
13755 else
13756   
13757                                 cat > conftest.$ac_ext <<EOF
13758 #line 13759 "configure"
13759 #include "confdefs.h"
13760 #include <sys/types.h>
13761 #include <sys/acl.h>
13762 int main() {
13763  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13764 ; return 0; }
13765 EOF
13766 if { (eval echo configure:13767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13767   rm -rf conftest*
13768   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13769 else
13770   echo "configure: failed program was:" >&5
13771   cat conftest.$ac_ext >&5
13772   rm -rf conftest*
13773   samba_cv_HAVE_ACL_GET_PERM_NP=no
13774 fi
13775 rm -f conftest*
13776 fi
13777
13778 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13779                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13780                                         cat >> confdefs.h <<\EOF
13781 #define HAVE_ACL_GET_PERM_NP 1
13782 EOF
13783
13784                                 fi
13785                         fi
13786             ;;
13787         esac
13788         ;;
13789   *)
13790     echo "$ac_t""no" 1>&6
13791     cat >> confdefs.h <<\EOF
13792 #define HAVE_NO_ACLS 1
13793 EOF
13794
13795     ;;
13796   esac 
13797 else
13798   cat >> confdefs.h <<\EOF
13799 #define HAVE_NO_ACLS 1
13800 EOF
13801
13802   echo "$ac_t""no" 1>&6
13803
13804 fi
13805
13806
13807 #################################################
13808 # Check whether winbind is supported on this platform.  If so we need to
13809 # build and install client programs (WINBIND_TARGETS), sbin programs
13810 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13811
13812 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13813 echo "configure:13814: checking whether to build winbind" >&5
13814
13815 # Initially, the value of $host_os decides whether winbind is supported
13816
13817 case "$host_os" in
13818         *linux*|*irix*)
13819                 HAVE_WINBIND=yes
13820                 ;;
13821         *solaris*)
13822                 HAVE_WINBIND=yes
13823                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13824                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
13825                 ;;
13826         *hpux11*)
13827                 HAVE_WINBIND=yes
13828                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13829                 ;;
13830         *)
13831                 HAVE_WINBIND=no
13832                 winbind_no_reason=", unsupported on $host_os"
13833                 ;;
13834 esac
13835
13836 # Check the setting of --with-winbindd
13837
13838 # Check whether --with-winbind or --without-winbind was given.
13839 if test "${with_winbind+set}" = set; then
13840   withval="$with_winbind"
13841    
13842   case "$withval" in
13843         yes)
13844                 HAVE_WINBIND=yes
13845                 ;;
13846         no)
13847                 HAVE_WINBIND=no
13848                 winbind_reason=""
13849                 ;;
13850   esac 
13851 fi
13852
13853
13854 # We need unix domain sockets for winbind
13855
13856 if test x"$HAVE_WINBIND" = x"yes"; then
13857         if test x"$samba_cv_unixsocket" = x"no"; then
13858                 winbind_no_reason=", no unix domain socket support on $host_os"
13859                 HAVE_WINBIND=no
13860         fi
13861 fi
13862
13863 # Display test results
13864
13865 WINBIND_TARGETS=""
13866 WINBIND_STARGETS=""
13867 WINBIND_LTARGETS=""
13868 WINBIND_PAM_PROGS=""
13869
13870 if test x"$HAVE_WINBIND" = x"yes"; then
13871         echo "$ac_t""yes" 1>&6
13872         cat >> confdefs.h <<\EOF
13873 #define WITH_WINBIND 1
13874 EOF
13875
13876
13877         WINBIND_TARGETS="bin/wbinfo"
13878         WINBIND_STARGETS="bin/winbindd"
13879         if test x"$BLDSHARED" = x"true"; then
13880                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13881                 if test x"$with_pam" = x"yes"; then
13882                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13883                 fi
13884         fi
13885 else
13886         echo "$ac_t""no$winbind_no_reason" 1>&6
13887 fi
13888
13889
13890 # Substitution time!
13891
13892
13893
13894
13895
13896
13897
13898
13899 # Solaris has some extra fields in struct passwd that need to be
13900 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
13901 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
13902 # this. 
13903
13904 #AC_CHECK_MEMBER(struct passwd.pw_comment,
13905 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
13906 #               [#include <pwd.h>])
13907
13908 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
13909 echo "configure:13910: checking whether struct passwd has pw_comment" >&5
13910 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
13911   echo $ac_n "(cached) $ac_c" 1>&6
13912 else
13913   
13914     cat > conftest.$ac_ext <<EOF
13915 #line 13916 "configure"
13916 #include "confdefs.h"
13917 #include <pwd.h>
13918 int main() {
13919 struct passwd p; p.pw_comment;
13920 ; return 0; }
13921 EOF
13922 if { (eval echo configure:13923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13923   rm -rf conftest*
13924   samba_cv_passwd_pw_comment=yes
13925 else
13926   echo "configure: failed program was:" >&5
13927   cat conftest.$ac_ext >&5
13928   rm -rf conftest*
13929   samba_cv_passwd_pw_comment=no
13930 fi
13931 rm -f conftest*
13932 fi
13933
13934 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
13935 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
13936    cat >> confdefs.h <<\EOF
13937 #define HAVE_PASSWD_PW_COMMENT 1
13938 EOF
13939
13940 fi
13941
13942 #AC_CHECK_MEMBER(struct passwd.pw_age,
13943 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
13944 #               [#include <pwd.h>])
13945
13946 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
13947 echo "configure:13948: checking whether struct passwd has pw_age" >&5
13948 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
13949   echo $ac_n "(cached) $ac_c" 1>&6
13950 else
13951   
13952     cat > conftest.$ac_ext <<EOF
13953 #line 13954 "configure"
13954 #include "confdefs.h"
13955 #include <pwd.h>
13956 int main() {
13957 struct passwd p; p.pw_age;
13958 ; return 0; }
13959 EOF
13960 if { (eval echo configure:13961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13961   rm -rf conftest*
13962   samba_cv_passwd_pw_age=yes
13963 else
13964   echo "configure: failed program was:" >&5
13965   cat conftest.$ac_ext >&5
13966   rm -rf conftest*
13967   samba_cv_passwd_pw_age=no
13968 fi
13969 rm -f conftest*
13970 fi
13971
13972 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
13973 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
13974    cat >> confdefs.h <<\EOF
13975 #define HAVE_PASSWD_PW_AGE 1
13976 EOF
13977
13978 fi
13979
13980 #################################################
13981 # Check to see if we should use the included popt 
13982
13983 # Check whether --with-included-popt or --without-included-popt was given.
13984 if test "${with_included_popt+set}" = set; then
13985   withval="$with_included_popt"
13986    
13987   case "$withval" in
13988         yes)
13989                 INCLUDED_POPT=yes
13990                 ;;
13991         no)
13992                 INCLUDED_POPT=no
13993                 ;;
13994   esac 
13995 fi
13996
13997 if test x"$INCLUDED_POPT" != x"yes"; then
13998     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13999 echo "configure:14000: checking for poptGetContext in -lpopt" >&5
14000 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
14001 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14002   echo $ac_n "(cached) $ac_c" 1>&6
14003 else
14004   ac_save_LIBS="$LIBS"
14005 LIBS="-lpopt  $LIBS"
14006 cat > conftest.$ac_ext <<EOF
14007 #line 14008 "configure"
14008 #include "confdefs.h"
14009 /* Override any gcc2 internal prototype to avoid an error.  */
14010 /* We use char because int might match the return type of a gcc2
14011     builtin and then its argument prototype would still apply.  */
14012 char poptGetContext();
14013
14014 int main() {
14015 poptGetContext()
14016 ; return 0; }
14017 EOF
14018 if { (eval echo configure:14019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14019   rm -rf conftest*
14020   eval "ac_cv_lib_$ac_lib_var=yes"
14021 else
14022   echo "configure: failed program was:" >&5
14023   cat conftest.$ac_ext >&5
14024   rm -rf conftest*
14025   eval "ac_cv_lib_$ac_lib_var=no"
14026 fi
14027 rm -f conftest*
14028 LIBS="$ac_save_LIBS"
14029
14030 fi
14031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14032   echo "$ac_t""yes" 1>&6
14033   INCLUDED_POPT=no
14034 else
14035   echo "$ac_t""no" 1>&6
14036 INCLUDED_POPT=yes
14037 fi
14038
14039 fi
14040
14041 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
14042 echo "configure:14043: checking whether to use included popt" >&5
14043 if test x"$INCLUDED_POPT" = x"yes"; then
14044     echo "$ac_t""yes" 1>&6
14045     BUILD_POPT='$(POPT_OBJS)'
14046     FLAGS1="-I$srcdir/popt"
14047 else
14048     echo "$ac_t""no" 1>&6
14049     LIBS="$LIBS -lpopt"
14050 fi
14051
14052
14053
14054 #################################################
14055 # do extra things if we are running insure
14056
14057 if test "${ac_cv_prog_CC}" = "insure"; then
14058         CPPFLAGS="$CPPFLAGS -D__INSURE__"
14059 fi
14060
14061 #################################################
14062 # final configure stuff
14063
14064 echo $ac_n "checking configure summary""... $ac_c" 1>&6
14065 echo "configure:14066: checking configure summary" >&5
14066 if test "$cross_compiling" = yes; then
14067   echo "configure: warning: cannot run when cross-compiling" 1>&2
14068 else
14069   cat > conftest.$ac_ext <<EOF
14070 #line 14071 "configure"
14071 #include "confdefs.h"
14072 #include "${srcdir-.}/tests/summary.c"
14073 EOF
14074 if { (eval echo configure:14075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14075 then
14076   echo "$ac_t""yes" 1>&6
14077 else
14078   echo "configure: failed program was:" >&5
14079   cat conftest.$ac_ext >&5
14080   rm -fr conftest*
14081   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
14082 fi
14083 rm -fr conftest*
14084 fi
14085
14086
14087 builddir=`pwd`
14088
14089
14090 # I added make files that are outside /source directory.
14091 # I know this is not a good solution, will work out a better
14092 # solution soon.                        --simo
14093 trap '' 1 2 15
14094 cat > confcache <<\EOF
14095 # This file is a shell script that caches the results of configure
14096 # tests run on this system so they can be shared between configure
14097 # scripts and configure runs.  It is not useful on other systems.
14098 # If it contains results you don't want to keep, you may remove or edit it.
14099 #
14100 # By default, configure uses ./config.cache as the cache file,
14101 # creating it if it does not exist already.  You can give configure
14102 # the --cache-file=FILE option to use a different cache file; that is
14103 # what configure does when it calls configure scripts in
14104 # subdirectories, so they share the cache.
14105 # Giving --cache-file=/dev/null disables caching, for debugging configure.
14106 # config.status only pays attention to the cache file if you give it the
14107 # --recheck option to rerun configure.
14108 #
14109 EOF
14110 # The following way of writing the cache mishandles newlines in values,
14111 # but we know of no workaround that is simple, portable, and efficient.
14112 # So, don't put newlines in cache variables' values.
14113 # Ultrix sh set writes to stderr and can't be redirected directly,
14114 # and sets the high bit in the cache file unless we assign to the vars.
14115 (set) 2>&1 |
14116   case `(ac_space=' '; set | grep ac_space) 2>&1` in
14117   *ac_space=\ *)
14118     # `set' does not quote correctly, so add quotes (double-quote substitution
14119     # turns \\\\ into \\, and sed turns \\ into \).
14120     sed -n \
14121       -e "s/'/'\\\\''/g" \
14122       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
14123     ;;
14124   *)
14125     # `set' quotes correctly as required by POSIX, so do not add quotes.
14126     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
14127     ;;
14128   esac >> confcache
14129 if cmp -s $cache_file confcache; then
14130   :
14131 else
14132   if test -w $cache_file; then
14133     echo "updating cache $cache_file"
14134     cat confcache > $cache_file
14135   else
14136     echo "not updating unwritable cache $cache_file"
14137   fi
14138 fi
14139 rm -f confcache
14140
14141 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14142
14143 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14144 # Let make expand exec_prefix.
14145 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14146
14147 # Any assignment to VPATH causes Sun make to only execute
14148 # the first set of double-colon rules, so remove it if not needed.
14149 # If there is a colon in the path, we need to keep it.
14150 if test "x$srcdir" = x.; then
14151   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14152 fi
14153
14154 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14155
14156 DEFS=-DHAVE_CONFIG_H
14157
14158 # Without the "./", some shells look in PATH for config.status.
14159 : ${CONFIG_STATUS=./config.status}
14160
14161 echo creating $CONFIG_STATUS
14162 rm -f $CONFIG_STATUS
14163 cat > $CONFIG_STATUS <<EOF
14164 #! /bin/sh
14165 # Generated automatically by configure.
14166 # Run this file to recreate the current configuration.
14167 # This directory was configured as follows,
14168 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14169 #
14170 # $0 $ac_configure_args
14171 #
14172 # Compiler output produced by configure, useful for debugging
14173 # configure, is in ./config.log if it exists.
14174
14175 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14176 for ac_option
14177 do
14178   case "\$ac_option" in
14179   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14180     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14181     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14182   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14183     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14184     exit 0 ;;
14185   -help | --help | --hel | --he | --h)
14186     echo "\$ac_cs_usage"; exit 0 ;;
14187   *) echo "\$ac_cs_usage"; exit 1 ;;
14188   esac
14189 done
14190
14191 ac_given_srcdir=$srcdir
14192 ac_given_INSTALL="$INSTALL"
14193
14194 trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/pdb/mysql/Makefile ../examples/pdb/xml/Makefile ../examples/sam/Makefile python/setup.py include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14195 EOF
14196 cat >> $CONFIG_STATUS <<EOF
14197
14198 # Protect against being on the right side of a sed subst in config.status.
14199 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14200  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14201 $ac_vpsub
14202 $extrasub
14203 s%@SHELL@%$SHELL%g
14204 s%@CFLAGS@%$CFLAGS%g
14205 s%@CPPFLAGS@%$CPPFLAGS%g
14206 s%@CXXFLAGS@%$CXXFLAGS%g
14207 s%@FFLAGS@%$FFLAGS%g
14208 s%@DEFS@%$DEFS%g
14209 s%@LDFLAGS@%$LDFLAGS%g
14210 s%@LIBS@%$LIBS%g
14211 s%@exec_prefix@%$exec_prefix%g
14212 s%@prefix@%$prefix%g
14213 s%@program_transform_name@%$program_transform_name%g
14214 s%@bindir@%$bindir%g
14215 s%@sbindir@%$sbindir%g
14216 s%@libexecdir@%$libexecdir%g
14217 s%@datadir@%$datadir%g
14218 s%@sysconfdir@%$sysconfdir%g
14219 s%@sharedstatedir@%$sharedstatedir%g
14220 s%@localstatedir@%$localstatedir%g
14221 s%@libdir@%$libdir%g
14222 s%@includedir@%$includedir%g
14223 s%@oldincludedir@%$oldincludedir%g
14224 s%@infodir@%$infodir%g
14225 s%@mandir@%$mandir%g
14226 s%@configdir@%$configdir%g
14227 s%@lockdir@%$lockdir%g
14228 s%@piddir@%$piddir%g
14229 s%@logfilebase@%$logfilebase%g
14230 s%@privatedir@%$privatedir%g
14231 s%@swatdir@%$swatdir%g
14232 s%@RUNPROG@%$RUNPROG%g
14233 s%@MPROGS@%$MPROGS%g
14234 s%@LDSHFLAGS@%$LDSHFLAGS%g
14235 s%@SONAMEFLAG@%$SONAMEFLAG%g
14236 s%@SHLD@%$SHLD%g
14237 s%@HOST_OS@%$HOST_OS%g
14238 s%@PAM_MOD@%$PAM_MOD%g
14239 s%@WRAP@%$WRAP%g
14240 s%@WRAP32@%$WRAP32%g
14241 s%@WRAPPROG@%$WRAPPROG%g
14242 s%@PICFLAG@%$PICFLAG%g
14243 s%@PICSUFFIX@%$PICSUFFIX%g
14244 s%@POBAD_CC@%$POBAD_CC%g
14245 s%@SHLIBEXT@%$SHLIBEXT%g
14246 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14247 s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g
14248 s%@PRINTLIBS@%$PRINTLIBS%g
14249 s%@CC@%$CC%g
14250 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14251 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14252 s%@INSTALL_DATA@%$INSTALL_DATA%g
14253 s%@AWK@%$AWK%g
14254 s%@BROKEN_CC@%$BROKEN_CC%g
14255 s%@host@%$host%g
14256 s%@host_alias@%$host_alias%g
14257 s%@host_cpu@%$host_cpu%g
14258 s%@host_vendor@%$host_vendor%g
14259 s%@host_os@%$host_os%g
14260 s%@target@%$target%g
14261 s%@target_alias@%$target_alias%g
14262 s%@target_cpu@%$target_cpu%g
14263 s%@target_vendor@%$target_vendor%g
14264 s%@target_os@%$target_os%g
14265 s%@build@%$build%g
14266 s%@build_alias@%$build_alias%g
14267 s%@build_cpu@%$build_cpu%g
14268 s%@build_vendor@%$build_vendor%g
14269 s%@build_os@%$build_os%g
14270 s%@CPP@%$CPP%g
14271 s%@CUPS_CONFIG@%$CUPS_CONFIG%g
14272 s%@LIBOBJS@%$LIBOBJS%g
14273 s%@TERMLIBS@%$TERMLIBS%g
14274 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14275 s%@ROFF@%$ROFF%g
14276 s%@DYNEXP@%$DYNEXP%g
14277 s%@QUOTAOBJS@%$QUOTAOBJS%g
14278 s%@manlangs@%$manlangs%g
14279 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14280 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14281 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14282 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
14283 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
14284 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
14285 s%@BUILD_POPT@%$BUILD_POPT%g
14286 s%@FLAGS1@%$FLAGS1%g
14287 s%@builddir@%$builddir%g
14288
14289 CEOF
14290 EOF
14291
14292 cat >> $CONFIG_STATUS <<\EOF
14293
14294 # Split the substitutions into bite-sized pieces for seds with
14295 # small command number limits, like on Digital OSF/1 and HP-UX.
14296 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14297 ac_file=1 # Number of current file.
14298 ac_beg=1 # First line for current file.
14299 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14300 ac_more_lines=:
14301 ac_sed_cmds=""
14302 while $ac_more_lines; do
14303   if test $ac_beg -gt 1; then
14304     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14305   else
14306     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14307   fi
14308   if test ! -s conftest.s$ac_file; then
14309     ac_more_lines=false
14310     rm -f conftest.s$ac_file
14311   else
14312     if test -z "$ac_sed_cmds"; then
14313       ac_sed_cmds="sed -f conftest.s$ac_file"
14314     else
14315       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14316     fi
14317     ac_file=`expr $ac_file + 1`
14318     ac_beg=$ac_end
14319     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14320   fi
14321 done
14322 if test -z "$ac_sed_cmds"; then
14323   ac_sed_cmds=cat
14324 fi
14325 EOF
14326
14327 cat >> $CONFIG_STATUS <<EOF
14328
14329 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/pdb/mysql/Makefile ../examples/pdb/xml/Makefile ../examples/sam/Makefile python/setup.py"}
14330 EOF
14331 cat >> $CONFIG_STATUS <<\EOF
14332 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14333   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14334   case "$ac_file" in
14335   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14336        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14337   *) ac_file_in="${ac_file}.in" ;;
14338   esac
14339
14340   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14341
14342   # Remove last slash and all that follows it.  Not all systems have dirname.
14343   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14344   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14345     # The file is in a subdirectory.
14346     test ! -d "$ac_dir" && mkdir "$ac_dir"
14347     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14348     # A "../" for each directory in $ac_dir_suffix.
14349     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14350   else
14351     ac_dir_suffix= ac_dots=
14352   fi
14353
14354   case "$ac_given_srcdir" in
14355   .)  srcdir=.
14356       if test -z "$ac_dots"; then top_srcdir=.
14357       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14358   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14359   *) # Relative path.
14360     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14361     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14362   esac
14363
14364   case "$ac_given_INSTALL" in
14365   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14366   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14367   esac
14368
14369   echo creating "$ac_file"
14370   rm -f "$ac_file"
14371   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14372   case "$ac_file" in
14373   *Makefile*) ac_comsub="1i\\
14374 # $configure_input" ;;
14375   *) ac_comsub= ;;
14376   esac
14377
14378   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14379   sed -e "$ac_comsub
14380 s%@configure_input@%$configure_input%g
14381 s%@srcdir@%$srcdir%g
14382 s%@top_srcdir@%$top_srcdir%g
14383 s%@INSTALL@%$INSTALL%g
14384 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14385 fi; done
14386 rm -f conftest.s*
14387
14388 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14389 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14390 #
14391 # ac_d sets the value in "#define NAME VALUE" lines.
14392 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14393 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14394 ac_dC='\3'
14395 ac_dD='%g'
14396 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14397 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14398 ac_uB='\([      ]\)%\1#\2define\3'
14399 ac_uC=' '
14400 ac_uD='\4%g'
14401 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14402 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14403 ac_eB='$%\1#\2define\3'
14404 ac_eC=' '
14405 ac_eD='%g'
14406
14407 if test "${CONFIG_HEADERS+set}" != set; then
14408 EOF
14409 cat >> $CONFIG_STATUS <<EOF
14410   CONFIG_HEADERS="include/config.h"
14411 EOF
14412 cat >> $CONFIG_STATUS <<\EOF
14413 fi
14414 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14415   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14416   case "$ac_file" in
14417   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14418        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14419   *) ac_file_in="${ac_file}.in" ;;
14420   esac
14421
14422   echo creating $ac_file
14423
14424   rm -f conftest.frag conftest.in conftest.out
14425   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14426   cat $ac_file_inputs > conftest.in
14427
14428 EOF
14429
14430 # Transform confdefs.h into a sed script conftest.vals that substitutes
14431 # the proper values into config.h.in to produce config.h.  And first:
14432 # Protect against being on the right side of a sed subst in config.status.
14433 # Protect against being in an unquoted here document in config.status.
14434 rm -f conftest.vals
14435 cat > conftest.hdr <<\EOF
14436 s/[\\&%]/\\&/g
14437 s%[\\$`]%\\&%g
14438 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14439 s%ac_d%ac_u%gp
14440 s%ac_u%ac_e%gp
14441 EOF
14442 sed -n -f conftest.hdr confdefs.h > conftest.vals
14443 rm -f conftest.hdr
14444
14445 # This sed command replaces #undef with comments.  This is necessary, for
14446 # example, in the case of _POSIX_SOURCE, which is predefined and required
14447 # on some systems where configure will not decide to define it.
14448 cat >> conftest.vals <<\EOF
14449 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14450 EOF
14451
14452 # Break up conftest.vals because some shells have a limit on
14453 # the size of here documents, and old seds have small limits too.
14454
14455 rm -f conftest.tail
14456 while :
14457 do
14458   ac_lines=`grep -c . conftest.vals`
14459   # grep -c gives empty output for an empty file on some AIX systems.
14460   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14461   # Write a limited-size here document to conftest.frag.
14462   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14463   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14464   echo 'CEOF
14465   sed -f conftest.frag conftest.in > conftest.out
14466   rm -f conftest.in
14467   mv conftest.out conftest.in
14468 ' >> $CONFIG_STATUS
14469   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14470   rm -f conftest.vals
14471   mv conftest.tail conftest.vals
14472 done
14473 rm -f conftest.vals
14474
14475 cat >> $CONFIG_STATUS <<\EOF
14476   rm -f conftest.frag conftest.h
14477   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14478   cat conftest.in >> conftest.h
14479   rm -f conftest.in
14480   if cmp -s $ac_file conftest.h 2>/dev/null; then
14481     echo "$ac_file is unchanged"
14482     rm -f conftest.h
14483   else
14484     # Remove last slash and all that follows it.  Not all systems have dirname.
14485       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14486       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14487       # The file is in a subdirectory.
14488       test ! -d "$ac_dir" && mkdir "$ac_dir"
14489     fi
14490     rm -f $ac_file
14491     mv conftest.h $ac_file
14492   fi
14493 fi; done
14494
14495 EOF
14496 cat >> $CONFIG_STATUS <<EOF
14497
14498 EOF
14499 cat >> $CONFIG_STATUS <<\EOF
14500
14501 exit 0
14502 EOF
14503 chmod +x $CONFIG_STATUS
14504 rm -fr confdefs* $ac_clean_files
14505 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14506
14507
14508 #################################################
14509 # Print very concise instructions on building/use
14510 if test "x$enable_dmalloc" = xyes
14511 then
14512         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14513         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14514 fi