Re-enable kernel change notification on s390 as it has been fixed in the
[nivanova/samba-autobuild/.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --with-fhs              Use FHS-compliant paths (default=no)"
17 ac_help="$ac_help
18   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
19 ac_help="$ac_help
20   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
21 ac_help="$ac_help
22   --with-piddir=DIR       Where to put pid files ($ac_default_prefix/var/locks)"
23 ac_help="$ac_help
24   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
25 ac_help="$ac_help
26   --with-configdir=DIR    Where to put configuration files (\$libdir)"
27 ac_help="$ac_help
28   --with-codepagedir=DIR  Where to put codepage files (\$libdir/codepages)"
29 ac_help="$ac_help
30   --with-logfilebase=DIR  Where to put log files (\$(VARDIR))"
31 ac_help="$ac_help
32   --enable-debug          Turn on compiler debugging information (default=no)"
33 ac_help="$ac_help
34   --enable-developer      Turn on developer warnings and debugging (default=no)"
35 ac_help="$ac_help
36   --enable-krb5developer  Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)"
37 ac_help="$ac_help
38   --enable-dmalloc        Enable heap debugging [default=no]"
39 ac_help="$ac_help
40   --enable-cups           Turn on CUPS support (default=auto)"
41 ac_help="$ac_help
42   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
43 ac_help="$ac_help
44   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
45 ac_help="$ac_help
46   --with-smbwrapper       Include SMB wrapper support (default=no) "
47 ac_help="$ac_help
48   --with-afs              Include AFS clear-text auth support (default=no) "
49 ac_help="$ac_help
50   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
51 ac_help="$ac_help
52   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
53 ac_help="$ac_help
54   --with-automount        Include AUTOMOUNT support (default=no)"
55 ac_help="$ac_help
56   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
57 ac_help="$ac_help
58   --with-pam              Include PAM support (default=no)"
59 ac_help="$ac_help
60   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (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   codepagedir="\$(DATADIR)/samba/codepages"
609     configdir="${sysconfdir}/samba"
610     lockdir="\${VARDIR}/cache/samba"
611     piddir="\$(VARDIR)/run/samba"
612     logfilebase="\${VARDIR}/log/samba"
613     privatedir="\${CONFIGDIR}/private"
614     swatdir="\${DATADIR}/samba/swat"
615 else
616   codepagedir="\$(LIBDIR)/codepages"
617     configdir="\$(LIBDIR)"
618     logfilebase="\$(VARDIR)"
619     lockdir="\${VARDIR}/locks"
620     piddir="\$(VARDIR)/locks"
621     privatedir="\${prefix}/private"
622     swatdir="\${prefix}/swat"
623 fi
624
625
626 #################################################
627 # set private directory location
628 # Check whether --with-privatedir or --without-privatedir was given.
629 if test "${with_privatedir+set}" = set; then
630   withval="$with_privatedir"
631    case "$withval" in
632   yes|no)
633   #
634   # Just in case anybody calls it without argument
635   #
636     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
637   ;;
638   * )
639     privatedir="$withval"
640     ;;
641   esac
642 fi
643
644
645 #################################################
646 # set lock directory location
647 # Check whether --with-lockdir or --without-lockdir was given.
648 if test "${with_lockdir+set}" = set; then
649   withval="$with_lockdir"
650    case "$withval" in
651   yes|no)
652   #
653   # Just in case anybody calls it without argument
654   #
655     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
656   ;;
657   * )
658     lockdir="$withval"
659     ;;
660   esac
661 fi
662
663
664 #################################################
665 # set pid directory location
666 # Check whether --with-piddir or --without-piddir was given.
667 if test "${with_piddir+set}" = set; then
668   withval="$with_piddir"
669    case "$withval" in
670   yes|no)
671   #
672   # Just in case anybody calls it without argument
673   #
674     echo "configure: warning: --with-piddir called without argument - will use default" 1>&2
675   ;;
676   * )
677     piddir="$withval"
678     ;;
679   esac
680 fi
681
682
683 #################################################
684 # set SWAT directory location
685 # Check whether --with-swatdir or --without-swatdir was given.
686 if test "${with_swatdir+set}" = set; then
687   withval="$with_swatdir"
688    case "$withval" in
689   yes|no)
690   #
691   # Just in case anybody does it
692   #
693     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
694   ;;
695   * )
696     swatdir="$withval"
697     ;;
698   esac
699 fi
700
701
702 #################################################
703 # set configuration directory location
704 # Check whether --with-configdir or --without-configdir was given.
705 if test "${with_configdir+set}" = set; then
706   withval="$with_configdir"
707    case "$withval" in
708   yes|no)
709   #
710   # Just in case anybody does it
711   #
712     echo "configure: warning: --with-configdir called without argument - will use default" 1>&2
713   ;;
714   * )
715     configdir="$withval"
716     ;;
717   esac
718 fi
719
720
721 #################################################
722 # set codepage directory location
723 # Check whether --with-codepagedir or --without-codepagedir was given.
724 if test "${with_codepagedir+set}" = set; then
725   withval="$with_codepagedir"
726    case "$withval" in
727   yes|no)
728   #
729   # Just in case anybody does it
730   #
731     echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2
732   ;;
733   * )
734     codepagedir="$withval"
735     ;;
736   esac
737 fi
738
739
740 #################################################
741 # set log directory location
742 # Check whether --with-logfilebase or --without-logfilebase was given.
743 if test "${with_logfilebase+set}" = set; then
744   withval="$with_logfilebase"
745    case "$withval" in
746   yes|no)
747   #
748   # Just in case anybody does it
749   #
750     echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2
751   ;;
752   * )
753     logfilebase="$withval"
754     ;;
755   esac
756 fi
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787 # compile with optimization and without debugging by default
788 CFLAGS="-O ${CFLAGS}"
789
790 # Check whether --enable-debug or --disable-debug was given.
791 if test "${enable_debug+set}" = set; then
792   enableval="$enable_debug"
793   if eval "test x$enable_debug = xyes"; then
794         CFLAGS="${CFLAGS} -g"
795     fi
796 fi
797
798
799 # Check whether --enable-developer or --disable-developer was given.
800 if test "${enable_developer+set}" = set; then
801   enableval="$enable_developer"
802   if eval "test x$enable_developer = xyes"; then
803         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
804     fi
805 fi
806
807
808 # Check whether --enable-krb5developer or --disable-krb5developer was given.
809 if test "${enable_krb5developer+set}" = set; then
810   enableval="$enable_krb5developer"
811   if eval "test x$enable_krb5developer = xyes"; then
812         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
813     fi
814 fi
815
816
817 # Check whether --enable-dmalloc or --disable-dmalloc was given.
818 if test "${enable_dmalloc+set}" = set; then
819   enableval="$enable_dmalloc"
820   :
821 fi
822
823
824 if test "x$enable_dmalloc" = xyes
825 then
826         cat >> confdefs.h <<\EOF
827 #define ENABLE_DMALLOC 1
828 EOF
829
830         cat >> confdefs.h <<\EOF
831 #define DMALLOC_FUNC_CHECK 1
832 EOF
833
834         LIBS="$LIBS -ldmalloc"  
835 fi
836
837 # Extract the first word of "gcc", so it can be a program name with args.
838 set dummy gcc; ac_word=$2
839 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
840 echo "configure:841: checking for $ac_word" >&5
841 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
842   echo $ac_n "(cached) $ac_c" 1>&6
843 else
844   if test -n "$CC"; then
845   ac_cv_prog_CC="$CC" # Let the user override the test.
846 else
847   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
848   ac_dummy="$PATH"
849   for ac_dir in $ac_dummy; do
850     test -z "$ac_dir" && ac_dir=.
851     if test -f $ac_dir/$ac_word; then
852       ac_cv_prog_CC="gcc"
853       break
854     fi
855   done
856   IFS="$ac_save_ifs"
857 fi
858 fi
859 CC="$ac_cv_prog_CC"
860 if test -n "$CC"; then
861   echo "$ac_t""$CC" 1>&6
862 else
863   echo "$ac_t""no" 1>&6
864 fi
865
866 if test -z "$CC"; then
867   # Extract the first word of "cc", so it can be a program name with args.
868 set dummy cc; ac_word=$2
869 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
870 echo "configure:871: checking for $ac_word" >&5
871 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
872   echo $ac_n "(cached) $ac_c" 1>&6
873 else
874   if test -n "$CC"; then
875   ac_cv_prog_CC="$CC" # Let the user override the test.
876 else
877   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
878   ac_prog_rejected=no
879   ac_dummy="$PATH"
880   for ac_dir in $ac_dummy; do
881     test -z "$ac_dir" && ac_dir=.
882     if test -f $ac_dir/$ac_word; then
883       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
884         ac_prog_rejected=yes
885         continue
886       fi
887       ac_cv_prog_CC="cc"
888       break
889     fi
890   done
891   IFS="$ac_save_ifs"
892 if test $ac_prog_rejected = yes; then
893   # We found a bogon in the path, so make sure we never use it.
894   set dummy $ac_cv_prog_CC
895   shift
896   if test $# -gt 0; then
897     # We chose a different compiler from the bogus one.
898     # However, it has the same basename, so the bogon will be chosen
899     # first if we set CC to just the basename; use the full file name.
900     shift
901     set dummy "$ac_dir/$ac_word" "$@"
902     shift
903     ac_cv_prog_CC="$@"
904   fi
905 fi
906 fi
907 fi
908 CC="$ac_cv_prog_CC"
909 if test -n "$CC"; then
910   echo "$ac_t""$CC" 1>&6
911 else
912   echo "$ac_t""no" 1>&6
913 fi
914
915   if test -z "$CC"; then
916     case "`uname -s`" in
917     *win32* | *WIN32*)
918       # Extract the first word of "cl", so it can be a program name with args.
919 set dummy cl; ac_word=$2
920 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921 echo "configure:922: checking for $ac_word" >&5
922 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
923   echo $ac_n "(cached) $ac_c" 1>&6
924 else
925   if test -n "$CC"; then
926   ac_cv_prog_CC="$CC" # Let the user override the test.
927 else
928   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
929   ac_dummy="$PATH"
930   for ac_dir in $ac_dummy; do
931     test -z "$ac_dir" && ac_dir=.
932     if test -f $ac_dir/$ac_word; then
933       ac_cv_prog_CC="cl"
934       break
935     fi
936   done
937   IFS="$ac_save_ifs"
938 fi
939 fi
940 CC="$ac_cv_prog_CC"
941 if test -n "$CC"; then
942   echo "$ac_t""$CC" 1>&6
943 else
944   echo "$ac_t""no" 1>&6
945 fi
946  ;;
947     esac
948   fi
949   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
950 fi
951
952 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
953 echo "configure:954: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
954
955 ac_ext=c
956 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
957 ac_cpp='$CPP $CPPFLAGS'
958 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
959 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
960 cross_compiling=$ac_cv_prog_cc_cross
961
962 cat > conftest.$ac_ext << EOF
963
964 #line 965 "configure"
965 #include "confdefs.h"
966
967 main(){return(0);}
968 EOF
969 if { (eval echo configure:970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
970   ac_cv_prog_cc_works=yes
971   # If we can't run a trivial program, we are probably using a cross compiler.
972   if (./conftest; exit) 2>/dev/null; then
973     ac_cv_prog_cc_cross=no
974   else
975     ac_cv_prog_cc_cross=yes
976   fi
977 else
978   echo "configure: failed program was:" >&5
979   cat conftest.$ac_ext >&5
980   ac_cv_prog_cc_works=no
981 fi
982 rm -fr conftest*
983 ac_ext=c
984 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
985 ac_cpp='$CPP $CPPFLAGS'
986 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
987 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
988 cross_compiling=$ac_cv_prog_cc_cross
989
990 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
991 if test $ac_cv_prog_cc_works = no; then
992   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
993 fi
994 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
995 echo "configure:996: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
996 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
997 cross_compiling=$ac_cv_prog_cc_cross
998
999 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1000 echo "configure:1001: checking whether we are using GNU C" >&5
1001 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1002   echo $ac_n "(cached) $ac_c" 1>&6
1003 else
1004   cat > conftest.c <<EOF
1005 #ifdef __GNUC__
1006   yes;
1007 #endif
1008 EOF
1009 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1010   ac_cv_prog_gcc=yes
1011 else
1012   ac_cv_prog_gcc=no
1013 fi
1014 fi
1015
1016 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1017
1018 if test $ac_cv_prog_gcc = yes; then
1019   GCC=yes
1020 else
1021   GCC=
1022 fi
1023
1024 ac_test_CFLAGS="${CFLAGS+set}"
1025 ac_save_CFLAGS="$CFLAGS"
1026 CFLAGS=
1027 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1028 echo "configure:1029: checking whether ${CC-cc} accepts -g" >&5
1029 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1030   echo $ac_n "(cached) $ac_c" 1>&6
1031 else
1032   echo 'void f(){}' > conftest.c
1033 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1034   ac_cv_prog_cc_g=yes
1035 else
1036   ac_cv_prog_cc_g=no
1037 fi
1038 rm -f conftest*
1039
1040 fi
1041
1042 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1043 if test "$ac_test_CFLAGS" = set; then
1044   CFLAGS="$ac_save_CFLAGS"
1045 elif test $ac_cv_prog_cc_g = yes; then
1046   if test "$GCC" = yes; then
1047     CFLAGS="-g -O2"
1048   else
1049     CFLAGS="-g"
1050   fi
1051 else
1052   if test "$GCC" = yes; then
1053     CFLAGS="-O2"
1054   else
1055     CFLAGS=
1056   fi
1057 fi
1058
1059 ac_aux_dir=
1060 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1061   if test -f $ac_dir/install-sh; then
1062     ac_aux_dir=$ac_dir
1063     ac_install_sh="$ac_aux_dir/install-sh -c"
1064     break
1065   elif test -f $ac_dir/install.sh; then
1066     ac_aux_dir=$ac_dir
1067     ac_install_sh="$ac_aux_dir/install.sh -c"
1068     break
1069   fi
1070 done
1071 if test -z "$ac_aux_dir"; then
1072   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1073 fi
1074 ac_config_guess=$ac_aux_dir/config.guess
1075 ac_config_sub=$ac_aux_dir/config.sub
1076 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1077
1078 # Find a good install program.  We prefer a C program (faster),
1079 # so one script is as good as another.  But avoid the broken or
1080 # incompatible versions:
1081 # SysV /etc/install, /usr/sbin/install
1082 # SunOS /usr/etc/install
1083 # IRIX /sbin/install
1084 # AIX /bin/install
1085 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1086 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1087 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1088 # ./install, which can be erroneously created by make from ./install.sh.
1089 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1090 echo "configure:1091: checking for a BSD compatible install" >&5
1091 if test -z "$INSTALL"; then
1092 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1093   echo $ac_n "(cached) $ac_c" 1>&6
1094 else
1095     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1096   for ac_dir in $PATH; do
1097     # Account for people who put trailing slashes in PATH elements.
1098     case "$ac_dir/" in
1099     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1100     *)
1101       # OSF1 and SCO ODT 3.0 have their own names for install.
1102       # Don't use installbsd from OSF since it installs stuff as root
1103       # by default.
1104       for ac_prog in ginstall scoinst install; do
1105         if test -f $ac_dir/$ac_prog; then
1106           if test $ac_prog = install &&
1107             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1108             # AIX install.  It has an incompatible calling convention.
1109             :
1110           else
1111             ac_cv_path_install="$ac_dir/$ac_prog -c"
1112             break 2
1113           fi
1114         fi
1115       done
1116       ;;
1117     esac
1118   done
1119   IFS="$ac_save_IFS"
1120
1121 fi
1122   if test "${ac_cv_path_install+set}" = set; then
1123     INSTALL="$ac_cv_path_install"
1124   else
1125     # As a last resort, use the slow shell script.  We don't cache a
1126     # path for INSTALL within a source directory, because that will
1127     # break other packages using the cache if that directory is
1128     # removed, or if the path is relative.
1129     INSTALL="$ac_install_sh"
1130   fi
1131 fi
1132 echo "$ac_t""$INSTALL" 1>&6
1133
1134 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1135 # It thinks the first close brace ends the variable substitution.
1136 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1137
1138 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1139
1140 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1141
1142 for ac_prog in gawk mawk nawk awk
1143 do
1144 # Extract the first word of "$ac_prog", so it can be a program name with args.
1145 set dummy $ac_prog; ac_word=$2
1146 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1147 echo "configure:1148: checking for $ac_word" >&5
1148 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1149   echo $ac_n "(cached) $ac_c" 1>&6
1150 else
1151   if test -n "$AWK"; then
1152   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1153 else
1154   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1155   ac_dummy="$PATH"
1156   for ac_dir in $ac_dummy; do
1157     test -z "$ac_dir" && ac_dir=.
1158     if test -f $ac_dir/$ac_word; then
1159       ac_cv_prog_AWK="$ac_prog"
1160       break
1161     fi
1162   done
1163   IFS="$ac_save_ifs"
1164 fi
1165 fi
1166 AWK="$ac_cv_prog_AWK"
1167 if test -n "$AWK"; then
1168   echo "$ac_t""$AWK" 1>&6
1169 else
1170   echo "$ac_t""no" 1>&6
1171 fi
1172
1173 test -n "$AWK" && break
1174 done
1175
1176
1177 LD=ld
1178 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1179 echo "configure:1180: checking if the linker ($LD) is GNU ld" >&5
1180 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1181   echo $ac_n "(cached) $ac_c" 1>&6
1182 else
1183   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1184 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1185   ac_cv_prog_gnu_ld=yes
1186 else
1187   ac_cv_prog_gnu_ld=no
1188 fi
1189 fi
1190
1191 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1192
1193
1194 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1195 echo "configure:1196: checking for POSIXized ISC" >&5
1196 if test -d /etc/conf/kconfig.d &&
1197   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1198 then
1199   echo "$ac_t""yes" 1>&6
1200   ISC=yes # If later tests want to check for ISC.
1201   cat >> confdefs.h <<\EOF
1202 #define _POSIX_SOURCE 1
1203 EOF
1204
1205   if test "$GCC" = yes; then
1206     CC="$CC -posix"
1207   else
1208     CC="$CC -Xp"
1209   fi
1210 else
1211   echo "$ac_t""no" 1>&6
1212   ISC=
1213 fi
1214
1215
1216 if test "x$CC" != xcc; then
1217   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1218 echo "configure:1219: checking whether $CC and cc understand -c and -o together" >&5
1219 else
1220   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1221 echo "configure:1222: checking whether cc understands -c and -o together" >&5
1222 fi
1223 set dummy $CC; ac_cc="`echo $2 |
1224                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1225 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1226   echo $ac_n "(cached) $ac_c" 1>&6
1227 else
1228   echo 'foo(){}' > conftest.c
1229 # Make sure it works both with $CC and with simple cc.
1230 # We do the test twice because some compilers refuse to overwrite an
1231 # existing .o file with -o, though they will create one.
1232 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1233 if { (eval echo configure:1234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1234    test -f conftest.o && { (eval echo configure:1235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1235 then
1236   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1237   if test "x$CC" != xcc; then
1238     # Test first that cc exists at all.
1239     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1240       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1241       if { (eval echo configure:1242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1242          test -f conftest.o && { (eval echo configure:1243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1243       then
1244         # cc works too.
1245         :
1246       else
1247         # cc exists but doesn't like -o.
1248         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1249       fi
1250     fi
1251   fi
1252 else
1253   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1254 fi
1255 rm -f conftest*
1256
1257 fi
1258 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1259   echo "$ac_t""yes" 1>&6
1260 else
1261   echo "$ac_t""no" 1>&6
1262   cat >> confdefs.h <<\EOF
1263 #define NO_MINUS_C_MINUS_O 1
1264 EOF
1265
1266 fi
1267
1268 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1269       BROKEN_CC=
1270 else
1271       BROKEN_CC=#
1272 fi
1273
1274
1275 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1276 echo "configure:1277: checking that the C compiler understands volatile" >&5
1277 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1278   echo $ac_n "(cached) $ac_c" 1>&6
1279 else
1280   
1281     cat > conftest.$ac_ext <<EOF
1282 #line 1283 "configure"
1283 #include "confdefs.h"
1284 #include <sys/types.h>
1285 int main() {
1286 volatile int i = 0
1287 ; return 0; }
1288 EOF
1289 if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1290   rm -rf conftest*
1291   samba_cv_volatile=yes
1292 else
1293   echo "configure: failed program was:" >&5
1294   cat conftest.$ac_ext >&5
1295   rm -rf conftest*
1296   samba_cv_volatile=no
1297 fi
1298 rm -f conftest*
1299 fi
1300
1301 echo "$ac_t""$samba_cv_volatile" 1>&6
1302 if test x"$samba_cv_volatile" = x"yes"; then
1303    cat >> confdefs.h <<\EOF
1304 #define HAVE_VOLATILE 1
1305 EOF
1306
1307 fi
1308
1309
1310
1311 # Do some error checking and defaulting for the host and target type.
1312 # The inputs are:
1313 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1314 #
1315 # The rules are:
1316 # 1. You are not allowed to specify --host, --target, and nonopt at the
1317 #    same time.
1318 # 2. Host defaults to nonopt.
1319 # 3. If nonopt is not specified, then host defaults to the current host,
1320 #    as determined by config.guess.
1321 # 4. Target and build default to nonopt.
1322 # 5. If nonopt is not specified, then target and build default to host.
1323
1324 # The aliases save the names the user supplied, while $host etc.
1325 # will get canonicalized.
1326 case $host---$target---$nonopt in
1327 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1328 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1329 esac
1330
1331
1332 # Make sure we can run config.sub.
1333 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1334 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1335 fi
1336
1337 echo $ac_n "checking host system type""... $ac_c" 1>&6
1338 echo "configure:1339: checking host system type" >&5
1339
1340 host_alias=$host
1341 case "$host_alias" in
1342 NONE)
1343   case $nonopt in
1344   NONE)
1345     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1346     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1347     fi ;;
1348   *) host_alias=$nonopt ;;
1349   esac ;;
1350 esac
1351
1352 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1353 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1354 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1355 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1356 echo "$ac_t""$host" 1>&6
1357
1358 echo $ac_n "checking target system type""... $ac_c" 1>&6
1359 echo "configure:1360: checking target system type" >&5
1360
1361 target_alias=$target
1362 case "$target_alias" in
1363 NONE)
1364   case $nonopt in
1365   NONE) target_alias=$host_alias ;;
1366   *) target_alias=$nonopt ;;
1367   esac ;;
1368 esac
1369
1370 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1371 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1372 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1373 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1374 echo "$ac_t""$target" 1>&6
1375
1376 echo $ac_n "checking build system type""... $ac_c" 1>&6
1377 echo "configure:1378: checking build system type" >&5
1378
1379 build_alias=$build
1380 case "$build_alias" in
1381 NONE)
1382   case $nonopt in
1383   NONE) build_alias=$host_alias ;;
1384   *) build_alias=$nonopt ;;
1385   esac ;;
1386 esac
1387
1388 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1389 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1390 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1391 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1392 echo "$ac_t""$build" 1>&6
1393
1394 test "$host_alias" != "$target_alias" &&
1395   test "$program_prefix$program_suffix$program_transform_name" = \
1396     NONENONEs,x,x, &&
1397   program_prefix=${target_alias}-
1398
1399
1400   case "$host_os" in
1401         *irix6*) cat >> confdefs.h <<\EOF
1402 #include <standards.h>
1403 EOF
1404
1405         ;;
1406 esac
1407
1408
1409     
1410     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1411 echo "configure:1412: checking config.cache system type" >&5
1412     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1413          test x"$ac_cv_host_system_type" != x"$host"; } ||
1414        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1415          test x"$ac_cv_build_system_type" != x"$build"; } ||
1416        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1417          test x"$ac_cv_target_system_type" != x"$target"; }; then
1418         echo "$ac_t""different" 1>&6
1419         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1420     else
1421         echo "$ac_t""same" 1>&6
1422     fi
1423     ac_cv_host_system_type="$host"
1424     ac_cv_build_system_type="$build"
1425     ac_cv_target_system_type="$target"
1426
1427
1428 DYNEXP=
1429
1430 #
1431 # Config CPPFLAG settings for strange OS's that must be set
1432 # before other tests.
1433 #
1434 case "$host_os" in
1435 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1436     *hpux*)
1437     
1438       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1439 echo "configure:1440: checking whether ${CC-cc} accepts -Ae" >&5
1440 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1441   echo $ac_n "(cached) $ac_c" 1>&6
1442 else
1443   echo 'void f(){}' > conftest.c
1444 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1445   ac_cv_prog_cc_Ae=yes
1446 else
1447   ac_cv_prog_cc_Ae=no
1448 fi
1449 rm -f conftest*
1450
1451 fi
1452
1453 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1454       # mmap on HPUX is completely broken...
1455       cat >> confdefs.h <<\EOF
1456 #define MMAP_BLACKLIST 1
1457 EOF
1458
1459       if test $ac_cv_prog_cc_Ae = yes; then
1460         CPPFLAGS="$CPPFLAGS -Ae"
1461       fi
1462 #
1463 # Defines needed for HPUX support.
1464 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1465 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1466 #
1467       case `uname -r` in
1468                         *9*|*10*)
1469                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1470                                 cat >> confdefs.h <<\EOF
1471 #define USE_BOTH_CRYPT_CALLS 1
1472 EOF
1473
1474                                 cat >> confdefs.h <<\EOF
1475 #define _HPUX_SOURCE 1
1476 EOF
1477
1478                                 cat >> confdefs.h <<\EOF
1479 #define _POSIX_SOURCE 1
1480 EOF
1481
1482                                 cat >> confdefs.h <<\EOF
1483 #define _ALIGNMENT_REQUIRED 1
1484 EOF
1485
1486                                 cat >> confdefs.h <<\EOF
1487 #define _MAX_ALIGNMENT 4
1488 EOF
1489
1490                                 ;;
1491                         *11*)
1492                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1493                                 cat >> confdefs.h <<\EOF
1494 #define USE_BOTH_CRYPT_CALLS 1
1495 EOF
1496
1497                                 cat >> confdefs.h <<\EOF
1498 #define _HPUX_SOURCE 1
1499 EOF
1500
1501                                 cat >> confdefs.h <<\EOF
1502 #define _POSIX_SOURCE 1
1503 EOF
1504
1505                                 cat >> confdefs.h <<\EOF
1506 #define _LARGEFILE64_SOURCE 1
1507 EOF
1508
1509                                 cat >> confdefs.h <<\EOF
1510 #define _ALIGNMENT_REQUIRED 1
1511 EOF
1512
1513                                 cat >> confdefs.h <<\EOF
1514 #define _MAX_ALIGNMENT 4
1515 EOF
1516
1517                                 ;;
1518       esac
1519       DYNEXP="-Wl,-E"
1520       ;;
1521
1522 #
1523 # CRAY Unicos has broken const handling
1524        *unicos*)
1525           echo "$ac_t""disabling const" 1>&6
1526           CPPFLAGS="$CPPFLAGS -Dconst="
1527           ;;
1528         
1529 #
1530 # AIX4.x doesn't even admit to having large
1531 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1532 #
1533     *aix4*)
1534           echo "$ac_t""enabling large file support" 1>&6
1535       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1536       cat >> confdefs.h <<\EOF
1537 #define _LARGE_FILES 1
1538 EOF
1539
1540       ;;    
1541 #
1542 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1543 # to the existance of large files..
1544 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1545 # recommendations on large file support, however it makes the
1546 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1547 # recommendation makes the compile fail on gcc2.7. JRA.
1548 #
1549         *solaris*)
1550                 case `uname -r` in
1551                         5.0*|5.1*|5.2*|5.3*|5.5*)
1552                                 echo "$ac_t""no large file support" 1>&6
1553                                 ;;
1554                         5.*)
1555                         echo "$ac_t""enabling large file support" 1>&6
1556                         if test "$ac_cv_prog_gcc" = yes; then
1557                                 ${CC-cc} -v >conftest.c 2>&1
1558                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1559                                 rm -fr conftest.c
1560                                 case "$ac_cv_gcc_compiler_version_number" in
1561                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1562                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1563                                                 cat >> confdefs.h <<\EOF
1564 #define _LARGEFILE64_SOURCE 1
1565 EOF
1566
1567                                                 ;;
1568                                         *)
1569                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1570                                                 cat >> confdefs.h <<\EOF
1571 #define _LARGEFILE64_SOURCE 1
1572 EOF
1573
1574                                                 cat >> confdefs.h <<\EOF
1575 #define _FILE_OFFSET_BITS 64
1576 EOF
1577
1578                                                 ;;
1579                                 esac
1580                         else
1581                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1582                                 cat >> confdefs.h <<\EOF
1583 #define _LARGEFILE64_SOURCE 1
1584 EOF
1585
1586                                 cat >> confdefs.h <<\EOF
1587 #define _FILE_OFFSET_BITS 64
1588 EOF
1589
1590                         fi
1591                         ;;
1592                 esac
1593                 ;;
1594 #
1595 # Tests needed for SINIX large file support.
1596 #
1597     *sysv4*)
1598       if test $host = mips-sni-sysv4 ; then
1599         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1600 echo "configure:1601: checking for LFS support" >&5
1601         old_CPPFLAGS="$CPPFLAGS"
1602         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1603         if test "$cross_compiling" = yes; then
1604   SINIX_LFS_SUPPORT=cross
1605 else
1606   cat > conftest.$ac_ext <<EOF
1607 #line 1608 "configure"
1608 #include "confdefs.h"
1609
1610 #include <unistd.h>
1611 main () {
1612 #if _LFS64_LARGEFILE == 1
1613 exit(0);
1614 #else
1615 exit(1);
1616 #endif
1617 }
1618 EOF
1619 if { (eval echo configure:1620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1620 then
1621   SINIX_LFS_SUPPORT=yes
1622 else
1623   echo "configure: failed program was:" >&5
1624   cat conftest.$ac_ext >&5
1625   rm -fr conftest*
1626   SINIX_LFS_SUPPORT=no
1627 fi
1628 rm -fr conftest*
1629 fi
1630
1631         CPPFLAGS="$old_CPPFLAGS"
1632         if test x$SINIX_LFS_SUPPORT = xyes ; then
1633           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1634           cat >> confdefs.h <<\EOF
1635 #define _LARGEFILE64_SOURCE 1
1636 EOF
1637
1638           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1639           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1640           LIBS="`getconf LFS64_LIBS` $LIBS"
1641         fi
1642       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1643       fi
1644     ;;
1645
1646 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1647 #
1648     *linux*)
1649         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1650 echo "configure:1651: checking for LFS support" >&5
1651         old_CPPFLAGS="$CPPFLAGS"
1652         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1653        if test "$cross_compiling" = yes; then
1654   LINUX_LFS_SUPPORT=cross
1655 else
1656   cat > conftest.$ac_ext <<EOF
1657 #line 1658 "configure"
1658 #include "confdefs.h"
1659
1660 #include <unistd.h>
1661 #include <sys/utsname.h>
1662 main() {
1663 #if _LFS64_LARGEFILE == 1
1664        struct utsname uts;
1665        char *release;
1666        int major, minor;
1667
1668        /* Ensure this is glibc 2.2 or higher */
1669 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1670        int libc_major = __GLIBC__;
1671        int libc_minor = __GLIBC_MINOR__;
1672
1673        if (libc_major < 2)
1674               exit(1);
1675        if (libc_minor < 2)
1676               exit(1);
1677 #endif
1678
1679        /* Ensure this is kernel 2.4 or higher */
1680
1681        uname(&uts);
1682        release = uts.release;
1683        major = atoi(strsep(&release, "."));
1684        minor = atoi(strsep(&release, "."));
1685
1686        if (major > 2 || (major == 2 && minor > 3))
1687                exit(0);
1688        exit(1);
1689 #else
1690        exit(1);
1691 #endif
1692 }
1693
1694 EOF
1695 if { (eval echo configure:1696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1696 then
1697   LINUX_LFS_SUPPORT=yes
1698 else
1699   echo "configure: failed program was:" >&5
1700   cat conftest.$ac_ext >&5
1701   rm -fr conftest*
1702   LINUX_LFS_SUPPORT=no
1703 fi
1704 rm -fr conftest*
1705 fi
1706
1707         CPPFLAGS="$old_CPPFLAGS"
1708         if test x$LINUX_LFS_SUPPORT = xyes ; then
1709           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1710           cat >> confdefs.h <<\EOF
1711 #define _LARGEFILE64_SOURCE 1
1712 EOF
1713
1714           cat >> confdefs.h <<\EOF
1715 #define _FILE_OFFSET_BITS 64
1716 EOF
1717
1718           cat >> confdefs.h <<\EOF
1719 #define _GNU_SOURCE 1
1720 EOF
1721
1722         fi
1723        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1724                 ;;
1725
1726     *hurd*)
1727         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1728 echo "configure:1729: checking for LFS support" >&5
1729         old_CPPFLAGS="$CPPFLAGS"
1730         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1731         if test "$cross_compiling" = yes; then
1732   GLIBC_LFS_SUPPORT=cross
1733 else
1734   cat > conftest.$ac_ext <<EOF
1735 #line 1736 "configure"
1736 #include "confdefs.h"
1737
1738 #include <unistd.h>
1739 main () {
1740 #if _LFS64_LARGEFILE == 1
1741 exit(0);
1742 #else
1743 exit(1);
1744 #endif
1745 }
1746 EOF
1747 if { (eval echo configure:1748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1748 then
1749   GLIBC_LFS_SUPPORT=yes
1750 else
1751   echo "configure: failed program was:" >&5
1752   cat conftest.$ac_ext >&5
1753   rm -fr conftest*
1754   GLIBC_LFS_SUPPORT=no
1755 fi
1756 rm -fr conftest*
1757 fi
1758
1759         CPPFLAGS="$old_CPPFLAGS"
1760         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1761           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1762           cat >> confdefs.h <<\EOF
1763 #define _LARGEFILE64_SOURCE 1
1764 EOF
1765
1766           cat >> confdefs.h <<\EOF
1767 #define _GNU_SOURCE 1
1768 EOF
1769
1770         fi
1771       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1772     ;;
1773
1774 esac
1775
1776 echo $ac_n "checking for inline""... $ac_c" 1>&6
1777 echo "configure:1778: checking for inline" >&5
1778 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1779   echo $ac_n "(cached) $ac_c" 1>&6
1780 else
1781   ac_cv_c_inline=no
1782 for ac_kw in inline __inline__ __inline; do
1783   cat > conftest.$ac_ext <<EOF
1784 #line 1785 "configure"
1785 #include "confdefs.h"
1786
1787 int main() {
1788 } $ac_kw foo() {
1789 ; return 0; }
1790 EOF
1791 if { (eval echo configure:1792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1792   rm -rf conftest*
1793   ac_cv_c_inline=$ac_kw; break
1794 else
1795   echo "configure: failed program was:" >&5
1796   cat conftest.$ac_ext >&5
1797 fi
1798 rm -f conftest*
1799 done
1800
1801 fi
1802
1803 echo "$ac_t""$ac_cv_c_inline" 1>&6
1804 case "$ac_cv_c_inline" in
1805   inline | yes) ;;
1806   no) cat >> confdefs.h <<\EOF
1807 #define inline 
1808 EOF
1809  ;;
1810   *)  cat >> confdefs.h <<EOF
1811 #define inline $ac_cv_c_inline
1812 EOF
1813  ;;
1814 esac
1815
1816 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1817 echo "configure:1818: checking how to run the C preprocessor" >&5
1818 # On Suns, sometimes $CPP names a directory.
1819 if test -n "$CPP" && test -d "$CPP"; then
1820   CPP=
1821 fi
1822 if test -z "$CPP"; then
1823 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1824   echo $ac_n "(cached) $ac_c" 1>&6
1825 else
1826     # This must be in double quotes, not single quotes, because CPP may get
1827   # substituted into the Makefile and "${CC-cc}" will confuse make.
1828   CPP="${CC-cc} -E"
1829   # On the NeXT, cc -E runs the code through the compiler's parser,
1830   # not just through cpp.
1831   cat > conftest.$ac_ext <<EOF
1832 #line 1833 "configure"
1833 #include "confdefs.h"
1834 #include <assert.h>
1835 Syntax Error
1836 EOF
1837 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1838 { (eval echo configure:1839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1839 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1840 if test -z "$ac_err"; then
1841   :
1842 else
1843   echo "$ac_err" >&5
1844   echo "configure: failed program was:" >&5
1845   cat conftest.$ac_ext >&5
1846   rm -rf conftest*
1847   CPP="${CC-cc} -E -traditional-cpp"
1848   cat > conftest.$ac_ext <<EOF
1849 #line 1850 "configure"
1850 #include "confdefs.h"
1851 #include <assert.h>
1852 Syntax Error
1853 EOF
1854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1855 { (eval echo configure:1856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1857 if test -z "$ac_err"; then
1858   :
1859 else
1860   echo "$ac_err" >&5
1861   echo "configure: failed program was:" >&5
1862   cat conftest.$ac_ext >&5
1863   rm -rf conftest*
1864   CPP="${CC-cc} -nologo -E"
1865   cat > conftest.$ac_ext <<EOF
1866 #line 1867 "configure"
1867 #include "confdefs.h"
1868 #include <assert.h>
1869 Syntax Error
1870 EOF
1871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1872 { (eval echo configure:1873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1874 if test -z "$ac_err"; then
1875   :
1876 else
1877   echo "$ac_err" >&5
1878   echo "configure: failed program was:" >&5
1879   cat conftest.$ac_ext >&5
1880   rm -rf conftest*
1881   CPP=/lib/cpp
1882 fi
1883 rm -f conftest*
1884 fi
1885 rm -f conftest*
1886 fi
1887 rm -f conftest*
1888   ac_cv_prog_CPP="$CPP"
1889 fi
1890   CPP="$ac_cv_prog_CPP"
1891 else
1892   ac_cv_prog_CPP="$CPP"
1893 fi
1894 echo "$ac_t""$CPP" 1>&6
1895
1896 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1897 echo "configure:1898: checking for ANSI C header files" >&5
1898 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1899   echo $ac_n "(cached) $ac_c" 1>&6
1900 else
1901   cat > conftest.$ac_ext <<EOF
1902 #line 1903 "configure"
1903 #include "confdefs.h"
1904 #include <stdlib.h>
1905 #include <stdarg.h>
1906 #include <string.h>
1907 #include <float.h>
1908 EOF
1909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1910 { (eval echo configure:1911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1912 if test -z "$ac_err"; then
1913   rm -rf conftest*
1914   ac_cv_header_stdc=yes
1915 else
1916   echo "$ac_err" >&5
1917   echo "configure: failed program was:" >&5
1918   cat conftest.$ac_ext >&5
1919   rm -rf conftest*
1920   ac_cv_header_stdc=no
1921 fi
1922 rm -f conftest*
1923
1924 if test $ac_cv_header_stdc = yes; then
1925   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1926 cat > conftest.$ac_ext <<EOF
1927 #line 1928 "configure"
1928 #include "confdefs.h"
1929 #include <string.h>
1930 EOF
1931 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1932   egrep "memchr" >/dev/null 2>&1; then
1933   :
1934 else
1935   rm -rf conftest*
1936   ac_cv_header_stdc=no
1937 fi
1938 rm -f conftest*
1939
1940 fi
1941
1942 if test $ac_cv_header_stdc = yes; then
1943   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1944 cat > conftest.$ac_ext <<EOF
1945 #line 1946 "configure"
1946 #include "confdefs.h"
1947 #include <stdlib.h>
1948 EOF
1949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1950   egrep "free" >/dev/null 2>&1; then
1951   :
1952 else
1953   rm -rf conftest*
1954   ac_cv_header_stdc=no
1955 fi
1956 rm -f conftest*
1957
1958 fi
1959
1960 if test $ac_cv_header_stdc = yes; then
1961   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1962 if test "$cross_compiling" = yes; then
1963   :
1964 else
1965   cat > conftest.$ac_ext <<EOF
1966 #line 1967 "configure"
1967 #include "confdefs.h"
1968 #include <ctype.h>
1969 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1970 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1971 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1972 int main () { int i; for (i = 0; i < 256; i++)
1973 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1974 exit (0); }
1975
1976 EOF
1977 if { (eval echo configure:1978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1978 then
1979   :
1980 else
1981   echo "configure: failed program was:" >&5
1982   cat conftest.$ac_ext >&5
1983   rm -fr conftest*
1984   ac_cv_header_stdc=no
1985 fi
1986 rm -fr conftest*
1987 fi
1988
1989 fi
1990 fi
1991
1992 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1993 if test $ac_cv_header_stdc = yes; then
1994   cat >> confdefs.h <<\EOF
1995 #define STDC_HEADERS 1
1996 EOF
1997
1998 fi
1999
2000 ac_header_dirent=no
2001 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2002 do
2003 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2004 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2005 echo "configure:2006: checking for $ac_hdr that defines DIR" >&5
2006 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2007   echo $ac_n "(cached) $ac_c" 1>&6
2008 else
2009   cat > conftest.$ac_ext <<EOF
2010 #line 2011 "configure"
2011 #include "confdefs.h"
2012 #include <sys/types.h>
2013 #include <$ac_hdr>
2014 int main() {
2015 DIR *dirp = 0;
2016 ; return 0; }
2017 EOF
2018 if { (eval echo configure:2019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2019   rm -rf conftest*
2020   eval "ac_cv_header_dirent_$ac_safe=yes"
2021 else
2022   echo "configure: failed program was:" >&5
2023   cat conftest.$ac_ext >&5
2024   rm -rf conftest*
2025   eval "ac_cv_header_dirent_$ac_safe=no"
2026 fi
2027 rm -f conftest*
2028 fi
2029 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2030   echo "$ac_t""yes" 1>&6
2031     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2032   cat >> confdefs.h <<EOF
2033 #define $ac_tr_hdr 1
2034 EOF
2035  ac_header_dirent=$ac_hdr; break
2036 else
2037   echo "$ac_t""no" 1>&6
2038 fi
2039 done
2040 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2041 if test $ac_header_dirent = dirent.h; then
2042 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2043 echo "configure:2044: checking for opendir in -ldir" >&5
2044 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2045 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2046   echo $ac_n "(cached) $ac_c" 1>&6
2047 else
2048   ac_save_LIBS="$LIBS"
2049 LIBS="-ldir  $LIBS"
2050 cat > conftest.$ac_ext <<EOF
2051 #line 2052 "configure"
2052 #include "confdefs.h"
2053 /* Override any gcc2 internal prototype to avoid an error.  */
2054 /* We use char because int might match the return type of a gcc2
2055     builtin and then its argument prototype would still apply.  */
2056 char opendir();
2057
2058 int main() {
2059 opendir()
2060 ; return 0; }
2061 EOF
2062 if { (eval echo configure:2063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2063   rm -rf conftest*
2064   eval "ac_cv_lib_$ac_lib_var=yes"
2065 else
2066   echo "configure: failed program was:" >&5
2067   cat conftest.$ac_ext >&5
2068   rm -rf conftest*
2069   eval "ac_cv_lib_$ac_lib_var=no"
2070 fi
2071 rm -f conftest*
2072 LIBS="$ac_save_LIBS"
2073
2074 fi
2075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2076   echo "$ac_t""yes" 1>&6
2077   LIBS="$LIBS -ldir"
2078 else
2079   echo "$ac_t""no" 1>&6
2080 fi
2081
2082 else
2083 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2084 echo "configure:2085: checking for opendir in -lx" >&5
2085 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2086 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2087   echo $ac_n "(cached) $ac_c" 1>&6
2088 else
2089   ac_save_LIBS="$LIBS"
2090 LIBS="-lx  $LIBS"
2091 cat > conftest.$ac_ext <<EOF
2092 #line 2093 "configure"
2093 #include "confdefs.h"
2094 /* Override any gcc2 internal prototype to avoid an error.  */
2095 /* We use char because int might match the return type of a gcc2
2096     builtin and then its argument prototype would still apply.  */
2097 char opendir();
2098
2099 int main() {
2100 opendir()
2101 ; return 0; }
2102 EOF
2103 if { (eval echo configure:2104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2104   rm -rf conftest*
2105   eval "ac_cv_lib_$ac_lib_var=yes"
2106 else
2107   echo "configure: failed program was:" >&5
2108   cat conftest.$ac_ext >&5
2109   rm -rf conftest*
2110   eval "ac_cv_lib_$ac_lib_var=no"
2111 fi
2112 rm -f conftest*
2113 LIBS="$ac_save_LIBS"
2114
2115 fi
2116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2117   echo "$ac_t""yes" 1>&6
2118   LIBS="$LIBS -lx"
2119 else
2120   echo "$ac_t""no" 1>&6
2121 fi
2122
2123 fi
2124
2125 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2126 echo "configure:2127: checking whether time.h and sys/time.h may both be included" >&5
2127 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2128   echo $ac_n "(cached) $ac_c" 1>&6
2129 else
2130   cat > conftest.$ac_ext <<EOF
2131 #line 2132 "configure"
2132 #include "confdefs.h"
2133 #include <sys/types.h>
2134 #include <sys/time.h>
2135 #include <time.h>
2136 int main() {
2137 struct tm *tp;
2138 ; return 0; }
2139 EOF
2140 if { (eval echo configure:2141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2141   rm -rf conftest*
2142   ac_cv_header_time=yes
2143 else
2144   echo "configure: failed program was:" >&5
2145   cat conftest.$ac_ext >&5
2146   rm -rf conftest*
2147   ac_cv_header_time=no
2148 fi
2149 rm -f conftest*
2150 fi
2151
2152 echo "$ac_t""$ac_cv_header_time" 1>&6
2153 if test $ac_cv_header_time = yes; then
2154   cat >> confdefs.h <<\EOF
2155 #define TIME_WITH_SYS_TIME 1
2156 EOF
2157
2158 fi
2159
2160 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2161 echo "configure:2162: checking for sys/wait.h that is POSIX.1 compatible" >&5
2162 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2163   echo $ac_n "(cached) $ac_c" 1>&6
2164 else
2165   cat > conftest.$ac_ext <<EOF
2166 #line 2167 "configure"
2167 #include "confdefs.h"
2168 #include <sys/types.h>
2169 #include <sys/wait.h>
2170 #ifndef WEXITSTATUS
2171 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2172 #endif
2173 #ifndef WIFEXITED
2174 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2175 #endif
2176 int main() {
2177 int s;
2178 wait (&s);
2179 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2180 ; return 0; }
2181 EOF
2182 if { (eval echo configure:2183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2183   rm -rf conftest*
2184   ac_cv_header_sys_wait_h=yes
2185 else
2186   echo "configure: failed program was:" >&5
2187   cat conftest.$ac_ext >&5
2188   rm -rf conftest*
2189   ac_cv_header_sys_wait_h=no
2190 fi
2191 rm -f conftest*
2192 fi
2193
2194 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2195 if test $ac_cv_header_sys_wait_h = yes; then
2196   cat >> confdefs.h <<\EOF
2197 #define HAVE_SYS_WAIT_H 1
2198 EOF
2199
2200 fi
2201
2202 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2203 do
2204 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2205 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2206 echo "configure:2207: checking for $ac_hdr" >&5
2207 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2208   echo $ac_n "(cached) $ac_c" 1>&6
2209 else
2210   cat > conftest.$ac_ext <<EOF
2211 #line 2212 "configure"
2212 #include "confdefs.h"
2213 #include <$ac_hdr>
2214 EOF
2215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2216 { (eval echo configure:2217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2218 if test -z "$ac_err"; then
2219   rm -rf conftest*
2220   eval "ac_cv_header_$ac_safe=yes"
2221 else
2222   echo "$ac_err" >&5
2223   echo "configure: failed program was:" >&5
2224   cat conftest.$ac_ext >&5
2225   rm -rf conftest*
2226   eval "ac_cv_header_$ac_safe=no"
2227 fi
2228 rm -f conftest*
2229 fi
2230 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2231   echo "$ac_t""yes" 1>&6
2232     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2233   cat >> confdefs.h <<EOF
2234 #define $ac_tr_hdr 1
2235 EOF
2236  
2237 else
2238   echo "$ac_t""no" 1>&6
2239 fi
2240 done
2241
2242 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2243 do
2244 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2245 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2246 echo "configure:2247: checking for $ac_hdr" >&5
2247 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2248   echo $ac_n "(cached) $ac_c" 1>&6
2249 else
2250   cat > conftest.$ac_ext <<EOF
2251 #line 2252 "configure"
2252 #include "confdefs.h"
2253 #include <$ac_hdr>
2254 EOF
2255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2256 { (eval echo configure:2257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2258 if test -z "$ac_err"; then
2259   rm -rf conftest*
2260   eval "ac_cv_header_$ac_safe=yes"
2261 else
2262   echo "$ac_err" >&5
2263   echo "configure: failed program was:" >&5
2264   cat conftest.$ac_ext >&5
2265   rm -rf conftest*
2266   eval "ac_cv_header_$ac_safe=no"
2267 fi
2268 rm -f conftest*
2269 fi
2270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2271   echo "$ac_t""yes" 1>&6
2272     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2273   cat >> confdefs.h <<EOF
2274 #define $ac_tr_hdr 1
2275 EOF
2276  
2277 else
2278   echo "$ac_t""no" 1>&6
2279 fi
2280 done
2281
2282 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2283 do
2284 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2285 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2286 echo "configure:2287: checking for $ac_hdr" >&5
2287 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2288   echo $ac_n "(cached) $ac_c" 1>&6
2289 else
2290   cat > conftest.$ac_ext <<EOF
2291 #line 2292 "configure"
2292 #include "confdefs.h"
2293 #include <$ac_hdr>
2294 EOF
2295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2296 { (eval echo configure:2297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2298 if test -z "$ac_err"; then
2299   rm -rf conftest*
2300   eval "ac_cv_header_$ac_safe=yes"
2301 else
2302   echo "$ac_err" >&5
2303   echo "configure: failed program was:" >&5
2304   cat conftest.$ac_ext >&5
2305   rm -rf conftest*
2306   eval "ac_cv_header_$ac_safe=no"
2307 fi
2308 rm -f conftest*
2309 fi
2310 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2311   echo "$ac_t""yes" 1>&6
2312     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2313   cat >> confdefs.h <<EOF
2314 #define $ac_tr_hdr 1
2315 EOF
2316  
2317 else
2318   echo "$ac_t""no" 1>&6
2319 fi
2320 done
2321
2322 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2323 do
2324 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2325 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2326 echo "configure:2327: checking for $ac_hdr" >&5
2327 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2328   echo $ac_n "(cached) $ac_c" 1>&6
2329 else
2330   cat > conftest.$ac_ext <<EOF
2331 #line 2332 "configure"
2332 #include "confdefs.h"
2333 #include <$ac_hdr>
2334 EOF
2335 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2336 { (eval echo configure:2337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2337 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2338 if test -z "$ac_err"; then
2339   rm -rf conftest*
2340   eval "ac_cv_header_$ac_safe=yes"
2341 else
2342   echo "$ac_err" >&5
2343   echo "configure: failed program was:" >&5
2344   cat conftest.$ac_ext >&5
2345   rm -rf conftest*
2346   eval "ac_cv_header_$ac_safe=no"
2347 fi
2348 rm -f conftest*
2349 fi
2350 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2351   echo "$ac_t""yes" 1>&6
2352     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2353   cat >> confdefs.h <<EOF
2354 #define $ac_tr_hdr 1
2355 EOF
2356  
2357 else
2358   echo "$ac_t""no" 1>&6
2359 fi
2360 done
2361
2362 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
2363 do
2364 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2365 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2366 echo "configure:2367: checking for $ac_hdr" >&5
2367 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2368   echo $ac_n "(cached) $ac_c" 1>&6
2369 else
2370   cat > conftest.$ac_ext <<EOF
2371 #line 2372 "configure"
2372 #include "confdefs.h"
2373 #include <$ac_hdr>
2374 EOF
2375 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2376 { (eval echo configure:2377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2377 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2378 if test -z "$ac_err"; then
2379   rm -rf conftest*
2380   eval "ac_cv_header_$ac_safe=yes"
2381 else
2382   echo "$ac_err" >&5
2383   echo "configure: failed program was:" >&5
2384   cat conftest.$ac_ext >&5
2385   rm -rf conftest*
2386   eval "ac_cv_header_$ac_safe=no"
2387 fi
2388 rm -f conftest*
2389 fi
2390 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2391   echo "$ac_t""yes" 1>&6
2392     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2393   cat >> confdefs.h <<EOF
2394 #define $ac_tr_hdr 1
2395 EOF
2396  
2397 else
2398   echo "$ac_t""no" 1>&6
2399 fi
2400 done
2401
2402 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2403 do
2404 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2405 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2406 echo "configure:2407: checking for $ac_hdr" >&5
2407 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2408   echo $ac_n "(cached) $ac_c" 1>&6
2409 else
2410   cat > conftest.$ac_ext <<EOF
2411 #line 2412 "configure"
2412 #include "confdefs.h"
2413 #include <$ac_hdr>
2414 EOF
2415 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2416 { (eval echo configure:2417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2417 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2418 if test -z "$ac_err"; then
2419   rm -rf conftest*
2420   eval "ac_cv_header_$ac_safe=yes"
2421 else
2422   echo "$ac_err" >&5
2423   echo "configure: failed program was:" >&5
2424   cat conftest.$ac_ext >&5
2425   rm -rf conftest*
2426   eval "ac_cv_header_$ac_safe=no"
2427 fi
2428 rm -f conftest*
2429 fi
2430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2431   echo "$ac_t""yes" 1>&6
2432     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2433   cat >> confdefs.h <<EOF
2434 #define $ac_tr_hdr 1
2435 EOF
2436  
2437 else
2438   echo "$ac_t""no" 1>&6
2439 fi
2440 done
2441
2442 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2443 do
2444 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2445 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2446 echo "configure:2447: checking for $ac_hdr" >&5
2447 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2448   echo $ac_n "(cached) $ac_c" 1>&6
2449 else
2450   cat > conftest.$ac_ext <<EOF
2451 #line 2452 "configure"
2452 #include "confdefs.h"
2453 #include <$ac_hdr>
2454 EOF
2455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2456 { (eval echo configure:2457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2458 if test -z "$ac_err"; then
2459   rm -rf conftest*
2460   eval "ac_cv_header_$ac_safe=yes"
2461 else
2462   echo "$ac_err" >&5
2463   echo "configure: failed program was:" >&5
2464   cat conftest.$ac_ext >&5
2465   rm -rf conftest*
2466   eval "ac_cv_header_$ac_safe=no"
2467 fi
2468 rm -f conftest*
2469 fi
2470 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2471   echo "$ac_t""yes" 1>&6
2472     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2473   cat >> confdefs.h <<EOF
2474 #define $ac_tr_hdr 1
2475 EOF
2476  
2477 else
2478   echo "$ac_t""no" 1>&6
2479 fi
2480 done
2481
2482 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
2483 do
2484 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2485 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2486 echo "configure:2487: checking for $ac_hdr" >&5
2487 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2488   echo $ac_n "(cached) $ac_c" 1>&6
2489 else
2490   cat > conftest.$ac_ext <<EOF
2491 #line 2492 "configure"
2492 #include "confdefs.h"
2493 #include <$ac_hdr>
2494 EOF
2495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2496 { (eval echo configure:2497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2498 if test -z "$ac_err"; then
2499   rm -rf conftest*
2500   eval "ac_cv_header_$ac_safe=yes"
2501 else
2502   echo "$ac_err" >&5
2503   echo "configure: failed program was:" >&5
2504   cat conftest.$ac_ext >&5
2505   rm -rf conftest*
2506   eval "ac_cv_header_$ac_safe=no"
2507 fi
2508 rm -f conftest*
2509 fi
2510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2511   echo "$ac_t""yes" 1>&6
2512     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2513   cat >> confdefs.h <<EOF
2514 #define $ac_tr_hdr 1
2515 EOF
2516  
2517 else
2518   echo "$ac_t""no" 1>&6
2519 fi
2520 done
2521
2522
2523 #
2524 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2525 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2526 #
2527 case "$host_os" in
2528     *hpux*)
2529                 cat > conftest.$ac_ext <<EOF
2530 #line 2531 "configure"
2531 #include "confdefs.h"
2532 #include <shadow.h>
2533 int main() {
2534 struct spwd testme
2535 ; return 0; }
2536 EOF
2537 if { (eval echo configure:2538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2538   rm -rf conftest*
2539   ac_cv_header_shadow_h=yes
2540 else
2541   echo "configure: failed program was:" >&5
2542   cat conftest.$ac_ext >&5
2543   rm -rf conftest*
2544   ac_cv_header_shadow_h=no
2545 fi
2546 rm -f conftest*
2547                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2548                    cat >> confdefs.h <<\EOF
2549 #define HAVE_SHADOW_H 1
2550 EOF
2551
2552                 fi
2553         ;;
2554 esac
2555 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2556 do
2557 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2558 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2559 echo "configure:2560: checking for $ac_hdr" >&5
2560 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2561   echo $ac_n "(cached) $ac_c" 1>&6
2562 else
2563   cat > conftest.$ac_ext <<EOF
2564 #line 2565 "configure"
2565 #include "confdefs.h"
2566 #include <$ac_hdr>
2567 EOF
2568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2569 { (eval echo configure:2570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2571 if test -z "$ac_err"; then
2572   rm -rf conftest*
2573   eval "ac_cv_header_$ac_safe=yes"
2574 else
2575   echo "$ac_err" >&5
2576   echo "configure: failed program was:" >&5
2577   cat conftest.$ac_ext >&5
2578   rm -rf conftest*
2579   eval "ac_cv_header_$ac_safe=no"
2580 fi
2581 rm -f conftest*
2582 fi
2583 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2584   echo "$ac_t""yes" 1>&6
2585     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2586   cat >> confdefs.h <<EOF
2587 #define $ac_tr_hdr 1
2588 EOF
2589  
2590 else
2591   echo "$ac_t""no" 1>&6
2592 fi
2593 done
2594
2595 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2596 do
2597 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2598 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2599 echo "configure:2600: checking for $ac_hdr" >&5
2600 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2601   echo $ac_n "(cached) $ac_c" 1>&6
2602 else
2603   cat > conftest.$ac_ext <<EOF
2604 #line 2605 "configure"
2605 #include "confdefs.h"
2606 #include <$ac_hdr>
2607 EOF
2608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2609 { (eval echo configure:2610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2611 if test -z "$ac_err"; then
2612   rm -rf conftest*
2613   eval "ac_cv_header_$ac_safe=yes"
2614 else
2615   echo "$ac_err" >&5
2616   echo "configure: failed program was:" >&5
2617   cat conftest.$ac_ext >&5
2618   rm -rf conftest*
2619   eval "ac_cv_header_$ac_safe=no"
2620 fi
2621 rm -f conftest*
2622 fi
2623 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2624   echo "$ac_t""yes" 1>&6
2625     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2626   cat >> confdefs.h <<EOF
2627 #define $ac_tr_hdr 1
2628 EOF
2629  
2630 else
2631   echo "$ac_t""no" 1>&6
2632 fi
2633 done
2634
2635 for ac_hdr in stropts.h poll.h
2636 do
2637 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2638 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2639 echo "configure:2640: checking for $ac_hdr" >&5
2640 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2641   echo $ac_n "(cached) $ac_c" 1>&6
2642 else
2643   cat > conftest.$ac_ext <<EOF
2644 #line 2645 "configure"
2645 #include "confdefs.h"
2646 #include <$ac_hdr>
2647 EOF
2648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2649 { (eval echo configure:2650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2651 if test -z "$ac_err"; then
2652   rm -rf conftest*
2653   eval "ac_cv_header_$ac_safe=yes"
2654 else
2655   echo "$ac_err" >&5
2656   echo "configure: failed program was:" >&5
2657   cat conftest.$ac_ext >&5
2658   rm -rf conftest*
2659   eval "ac_cv_header_$ac_safe=no"
2660 fi
2661 rm -f conftest*
2662 fi
2663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2664   echo "$ac_t""yes" 1>&6
2665     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2666   cat >> confdefs.h <<EOF
2667 #define $ac_tr_hdr 1
2668 EOF
2669  
2670 else
2671   echo "$ac_t""no" 1>&6
2672 fi
2673 done
2674
2675 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2676 do
2677 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2678 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2679 echo "configure:2680: checking for $ac_hdr" >&5
2680 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2681   echo $ac_n "(cached) $ac_c" 1>&6
2682 else
2683   cat > conftest.$ac_ext <<EOF
2684 #line 2685 "configure"
2685 #include "confdefs.h"
2686 #include <$ac_hdr>
2687 EOF
2688 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2689 { (eval echo configure:2690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2690 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2691 if test -z "$ac_err"; then
2692   rm -rf conftest*
2693   eval "ac_cv_header_$ac_safe=yes"
2694 else
2695   echo "$ac_err" >&5
2696   echo "configure: failed program was:" >&5
2697   cat conftest.$ac_ext >&5
2698   rm -rf conftest*
2699   eval "ac_cv_header_$ac_safe=no"
2700 fi
2701 rm -f conftest*
2702 fi
2703 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2704   echo "$ac_t""yes" 1>&6
2705     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2706   cat >> confdefs.h <<EOF
2707 #define $ac_tr_hdr 1
2708 EOF
2709  
2710 else
2711   echo "$ac_t""no" 1>&6
2712 fi
2713 done
2714
2715 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2716 do
2717 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2718 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2719 echo "configure:2720: checking for $ac_hdr" >&5
2720 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2721   echo $ac_n "(cached) $ac_c" 1>&6
2722 else
2723   cat > conftest.$ac_ext <<EOF
2724 #line 2725 "configure"
2725 #include "confdefs.h"
2726 #include <$ac_hdr>
2727 EOF
2728 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2729 { (eval echo configure:2730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2730 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2731 if test -z "$ac_err"; then
2732   rm -rf conftest*
2733   eval "ac_cv_header_$ac_safe=yes"
2734 else
2735   echo "$ac_err" >&5
2736   echo "configure: failed program was:" >&5
2737   cat conftest.$ac_ext >&5
2738   rm -rf conftest*
2739   eval "ac_cv_header_$ac_safe=no"
2740 fi
2741 rm -f conftest*
2742 fi
2743 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2744   echo "$ac_t""yes" 1>&6
2745     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2746   cat >> confdefs.h <<EOF
2747 #define $ac_tr_hdr 1
2748 EOF
2749  
2750 else
2751   echo "$ac_t""no" 1>&6
2752 fi
2753 done
2754
2755
2756 # For experimental utmp support (lastlog on some BSD-like systems)
2757 for ac_hdr in utmp.h utmpx.h lastlog.h
2758 do
2759 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2760 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2761 echo "configure:2762: checking for $ac_hdr" >&5
2762 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2763   echo $ac_n "(cached) $ac_c" 1>&6
2764 else
2765   cat > conftest.$ac_ext <<EOF
2766 #line 2767 "configure"
2767 #include "confdefs.h"
2768 #include <$ac_hdr>
2769 EOF
2770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2771 { (eval echo configure:2772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2773 if test -z "$ac_err"; then
2774   rm -rf conftest*
2775   eval "ac_cv_header_$ac_safe=yes"
2776 else
2777   echo "$ac_err" >&5
2778   echo "configure: failed program was:" >&5
2779   cat conftest.$ac_ext >&5
2780   rm -rf conftest*
2781   eval "ac_cv_header_$ac_safe=no"
2782 fi
2783 rm -f conftest*
2784 fi
2785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2786   echo "$ac_t""yes" 1>&6
2787     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2788   cat >> confdefs.h <<EOF
2789 #define $ac_tr_hdr 1
2790 EOF
2791  
2792 else
2793   echo "$ac_t""no" 1>&6
2794 fi
2795 done
2796
2797  
2798 # For quotas on Veritas VxFS filesystems
2799 for ac_hdr in sys/fs/vx_quota.h
2800 do
2801 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2802 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2803 echo "configure:2804: checking for $ac_hdr" >&5
2804 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2805   echo $ac_n "(cached) $ac_c" 1>&6
2806 else
2807   cat > conftest.$ac_ext <<EOF
2808 #line 2809 "configure"
2809 #include "confdefs.h"
2810 #include <$ac_hdr>
2811 EOF
2812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2813 { (eval echo configure:2814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2815 if test -z "$ac_err"; then
2816   rm -rf conftest*
2817   eval "ac_cv_header_$ac_safe=yes"
2818 else
2819   echo "$ac_err" >&5
2820   echo "configure: failed program was:" >&5
2821   cat conftest.$ac_ext >&5
2822   rm -rf conftest*
2823   eval "ac_cv_header_$ac_safe=no"
2824 fi
2825 rm -f conftest*
2826 fi
2827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2828   echo "$ac_t""yes" 1>&6
2829     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2830   cat >> confdefs.h <<EOF
2831 #define $ac_tr_hdr 1
2832 EOF
2833  
2834 else
2835   echo "$ac_t""no" 1>&6
2836 fi
2837 done
2838
2839
2840 # For quotas on Linux XFS filesystems
2841 for ac_hdr in linux/xqm.h
2842 do
2843 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2844 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2845 echo "configure:2846: checking for $ac_hdr" >&5
2846 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2847   echo $ac_n "(cached) $ac_c" 1>&6
2848 else
2849   cat > conftest.$ac_ext <<EOF
2850 #line 2851 "configure"
2851 #include "confdefs.h"
2852 #include <$ac_hdr>
2853 EOF
2854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2855 { (eval echo configure:2856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2857 if test -z "$ac_err"; then
2858   rm -rf conftest*
2859   eval "ac_cv_header_$ac_safe=yes"
2860 else
2861   echo "$ac_err" >&5
2862   echo "configure: failed program was:" >&5
2863   cat conftest.$ac_ext >&5
2864   rm -rf conftest*
2865   eval "ac_cv_header_$ac_safe=no"
2866 fi
2867 rm -f conftest*
2868 fi
2869 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2870   echo "$ac_t""yes" 1>&6
2871     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2872   cat >> confdefs.h <<EOF
2873 #define $ac_tr_hdr 1
2874 EOF
2875  
2876 else
2877   echo "$ac_t""no" 1>&6
2878 fi
2879 done
2880
2881
2882 echo $ac_n "checking size of int""... $ac_c" 1>&6
2883 echo "configure:2884: checking size of int" >&5
2884 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2885   echo $ac_n "(cached) $ac_c" 1>&6
2886 else
2887   if test "$cross_compiling" = yes; then
2888   ac_cv_sizeof_int=cross
2889 else
2890   cat > conftest.$ac_ext <<EOF
2891 #line 2892 "configure"
2892 #include "confdefs.h"
2893 #include <stdio.h>
2894 main()
2895 {
2896   FILE *f=fopen("conftestval", "w");
2897   if (!f) exit(1);
2898   fprintf(f, "%d\n", sizeof(int));
2899   exit(0);
2900 }
2901 EOF
2902 if { (eval echo configure:2903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2903 then
2904   ac_cv_sizeof_int=`cat conftestval`
2905 else
2906   echo "configure: failed program was:" >&5
2907   cat conftest.$ac_ext >&5
2908   rm -fr conftest*
2909   ac_cv_sizeof_int=0
2910 fi
2911 rm -fr conftest*
2912 fi
2913
2914 fi
2915 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2916 cat >> confdefs.h <<EOF
2917 #define SIZEOF_INT $ac_cv_sizeof_int
2918 EOF
2919
2920
2921 echo $ac_n "checking size of long""... $ac_c" 1>&6
2922 echo "configure:2923: checking size of long" >&5
2923 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2924   echo $ac_n "(cached) $ac_c" 1>&6
2925 else
2926   if test "$cross_compiling" = yes; then
2927   ac_cv_sizeof_long=cross
2928 else
2929   cat > conftest.$ac_ext <<EOF
2930 #line 2931 "configure"
2931 #include "confdefs.h"
2932 #include <stdio.h>
2933 main()
2934 {
2935   FILE *f=fopen("conftestval", "w");
2936   if (!f) exit(1);
2937   fprintf(f, "%d\n", sizeof(long));
2938   exit(0);
2939 }
2940 EOF
2941 if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2942 then
2943   ac_cv_sizeof_long=`cat conftestval`
2944 else
2945   echo "configure: failed program was:" >&5
2946   cat conftest.$ac_ext >&5
2947   rm -fr conftest*
2948   ac_cv_sizeof_long=0
2949 fi
2950 rm -fr conftest*
2951 fi
2952
2953 fi
2954 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2955 cat >> confdefs.h <<EOF
2956 #define SIZEOF_LONG $ac_cv_sizeof_long
2957 EOF
2958
2959
2960 echo $ac_n "checking size of short""... $ac_c" 1>&6
2961 echo "configure:2962: checking size of short" >&5
2962 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2963   echo $ac_n "(cached) $ac_c" 1>&6
2964 else
2965   if test "$cross_compiling" = yes; then
2966   ac_cv_sizeof_short=cross
2967 else
2968   cat > conftest.$ac_ext <<EOF
2969 #line 2970 "configure"
2970 #include "confdefs.h"
2971 #include <stdio.h>
2972 main()
2973 {
2974   FILE *f=fopen("conftestval", "w");
2975   if (!f) exit(1);
2976   fprintf(f, "%d\n", sizeof(short));
2977   exit(0);
2978 }
2979 EOF
2980 if { (eval echo configure:2981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2981 then
2982   ac_cv_sizeof_short=`cat conftestval`
2983 else
2984   echo "configure: failed program was:" >&5
2985   cat conftest.$ac_ext >&5
2986   rm -fr conftest*
2987   ac_cv_sizeof_short=0
2988 fi
2989 rm -fr conftest*
2990 fi
2991
2992 fi
2993 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2994 cat >> confdefs.h <<EOF
2995 #define SIZEOF_SHORT $ac_cv_sizeof_short
2996 EOF
2997
2998
2999
3000 echo $ac_n "checking for working const""... $ac_c" 1>&6
3001 echo "configure:3002: checking for working const" >&5
3002 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3003   echo $ac_n "(cached) $ac_c" 1>&6
3004 else
3005   cat > conftest.$ac_ext <<EOF
3006 #line 3007 "configure"
3007 #include "confdefs.h"
3008
3009 int main() {
3010
3011 /* Ultrix mips cc rejects this.  */
3012 typedef int charset[2]; const charset x;
3013 /* SunOS 4.1.1 cc rejects this.  */
3014 char const *const *ccp;
3015 char **p;
3016 /* NEC SVR4.0.2 mips cc rejects this.  */
3017 struct point {int x, y;};
3018 static struct point const zero = {0,0};
3019 /* AIX XL C 1.02.0.0 rejects this.
3020    It does not let you subtract one const X* pointer from another in an arm
3021    of an if-expression whose if-part is not a constant expression */
3022 const char *g = "string";
3023 ccp = &g + (g ? g-g : 0);
3024 /* HPUX 7.0 cc rejects these. */
3025 ++ccp;
3026 p = (char**) ccp;
3027 ccp = (char const *const *) p;
3028 { /* SCO 3.2v4 cc rejects this.  */
3029   char *t;
3030   char const *s = 0 ? (char *) 0 : (char const *) 0;
3031
3032   *t++ = 0;
3033 }
3034 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3035   int x[] = {25, 17};
3036   const int *foo = &x[0];
3037   ++foo;
3038 }
3039 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3040   typedef const int *iptr;
3041   iptr p = 0;
3042   ++p;
3043 }
3044 { /* AIX XL C 1.02.0.0 rejects this saying
3045      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3046   struct s { int j; const int *ap[3]; };
3047   struct s *b; b->j = 5;
3048 }
3049 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3050   const int foo = 10;
3051 }
3052
3053 ; return 0; }
3054 EOF
3055 if { (eval echo configure:3056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3056   rm -rf conftest*
3057   ac_cv_c_const=yes
3058 else
3059   echo "configure: failed program was:" >&5
3060   cat conftest.$ac_ext >&5
3061   rm -rf conftest*
3062   ac_cv_c_const=no
3063 fi
3064 rm -f conftest*
3065 fi
3066
3067 echo "$ac_t""$ac_cv_c_const" 1>&6
3068 if test $ac_cv_c_const = no; then
3069   cat >> confdefs.h <<\EOF
3070 #define const 
3071 EOF
3072
3073 fi
3074
3075 echo $ac_n "checking for inline""... $ac_c" 1>&6
3076 echo "configure:3077: checking for inline" >&5
3077 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3078   echo $ac_n "(cached) $ac_c" 1>&6
3079 else
3080   ac_cv_c_inline=no
3081 for ac_kw in inline __inline__ __inline; do
3082   cat > conftest.$ac_ext <<EOF
3083 #line 3084 "configure"
3084 #include "confdefs.h"
3085
3086 int main() {
3087 } $ac_kw foo() {
3088 ; return 0; }
3089 EOF
3090 if { (eval echo configure:3091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3091   rm -rf conftest*
3092   ac_cv_c_inline=$ac_kw; break
3093 else
3094   echo "configure: failed program was:" >&5
3095   cat conftest.$ac_ext >&5
3096 fi
3097 rm -f conftest*
3098 done
3099
3100 fi
3101
3102 echo "$ac_t""$ac_cv_c_inline" 1>&6
3103 case "$ac_cv_c_inline" in
3104   inline | yes) ;;
3105   no) cat >> confdefs.h <<\EOF
3106 #define inline 
3107 EOF
3108  ;;
3109   *)  cat >> confdefs.h <<EOF
3110 #define inline $ac_cv_c_inline
3111 EOF
3112  ;;
3113 esac
3114
3115 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3116 echo "configure:3117: checking whether byte ordering is bigendian" >&5
3117 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3118   echo $ac_n "(cached) $ac_c" 1>&6
3119 else
3120   ac_cv_c_bigendian=unknown
3121 # See if sys/param.h defines the BYTE_ORDER macro.
3122 cat > conftest.$ac_ext <<EOF
3123 #line 3124 "configure"
3124 #include "confdefs.h"
3125 #include <sys/types.h>
3126 #include <sys/param.h>
3127 int main() {
3128
3129 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3130  bogus endian macros
3131 #endif
3132 ; return 0; }
3133 EOF
3134 if { (eval echo configure:3135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3135   rm -rf conftest*
3136   # It does; now see whether it defined to BIG_ENDIAN or not.
3137 cat > conftest.$ac_ext <<EOF
3138 #line 3139 "configure"
3139 #include "confdefs.h"
3140 #include <sys/types.h>
3141 #include <sys/param.h>
3142 int main() {
3143
3144 #if BYTE_ORDER != BIG_ENDIAN
3145  not big endian
3146 #endif
3147 ; return 0; }
3148 EOF
3149 if { (eval echo configure:3150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3150   rm -rf conftest*
3151   ac_cv_c_bigendian=yes
3152 else
3153   echo "configure: failed program was:" >&5
3154   cat conftest.$ac_ext >&5
3155   rm -rf conftest*
3156   ac_cv_c_bigendian=no
3157 fi
3158 rm -f conftest*
3159 else
3160   echo "configure: failed program was:" >&5
3161   cat conftest.$ac_ext >&5
3162 fi
3163 rm -f conftest*
3164 if test $ac_cv_c_bigendian = unknown; then
3165 if test "$cross_compiling" = yes; then
3166     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3167 else
3168   cat > conftest.$ac_ext <<EOF
3169 #line 3170 "configure"
3170 #include "confdefs.h"
3171 main () {
3172   /* Are we little or big endian?  From Harbison&Steele.  */
3173   union
3174   {
3175     long l;
3176     char c[sizeof (long)];
3177   } u;
3178   u.l = 1;
3179   exit (u.c[sizeof (long) - 1] == 1);
3180 }
3181 EOF
3182 if { (eval echo configure:3183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3183 then
3184   ac_cv_c_bigendian=no
3185 else
3186   echo "configure: failed program was:" >&5
3187   cat conftest.$ac_ext >&5
3188   rm -fr conftest*
3189   ac_cv_c_bigendian=yes
3190 fi
3191 rm -fr conftest*
3192 fi
3193
3194 fi
3195 fi
3196
3197 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3198 if test $ac_cv_c_bigendian = yes; then
3199   cat >> confdefs.h <<\EOF
3200 #define WORDS_BIGENDIAN 1
3201 EOF
3202
3203 fi
3204
3205 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3206 echo "configure:3207: checking whether char is unsigned" >&5
3207 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3208   echo $ac_n "(cached) $ac_c" 1>&6
3209 else
3210   if test "$GCC" = yes; then
3211   # GCC predefines this symbol on systems where it applies.
3212 cat > conftest.$ac_ext <<EOF
3213 #line 3214 "configure"
3214 #include "confdefs.h"
3215 #ifdef __CHAR_UNSIGNED__
3216   yes
3217 #endif
3218
3219 EOF
3220 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3221   egrep "yes" >/dev/null 2>&1; then
3222   rm -rf conftest*
3223   ac_cv_c_char_unsigned=yes
3224 else
3225   rm -rf conftest*
3226   ac_cv_c_char_unsigned=no
3227 fi
3228 rm -f conftest*
3229
3230 else
3231 if test "$cross_compiling" = yes; then
3232     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3233 else
3234   cat > conftest.$ac_ext <<EOF
3235 #line 3236 "configure"
3236 #include "confdefs.h"
3237 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3238 #if !defined(__STDC__) || __STDC__ != 1
3239 #define volatile
3240 #endif
3241 main() {
3242   volatile char c = 255; exit(c < 0);
3243 }
3244 EOF
3245 if { (eval echo configure:3246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3246 then
3247   ac_cv_c_char_unsigned=yes
3248 else
3249   echo "configure: failed program was:" >&5
3250   cat conftest.$ac_ext >&5
3251   rm -fr conftest*
3252   ac_cv_c_char_unsigned=no
3253 fi
3254 rm -fr conftest*
3255 fi
3256
3257 fi
3258 fi
3259
3260 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3261 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3262   cat >> confdefs.h <<\EOF
3263 #define __CHAR_UNSIGNED__ 1
3264 EOF
3265
3266 fi
3267
3268
3269 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3270 echo "configure:3271: checking return type of signal handlers" >&5
3271 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3272   echo $ac_n "(cached) $ac_c" 1>&6
3273 else
3274   cat > conftest.$ac_ext <<EOF
3275 #line 3276 "configure"
3276 #include "confdefs.h"
3277 #include <sys/types.h>
3278 #include <signal.h>
3279 #ifdef signal
3280 #undef signal
3281 #endif
3282 #ifdef __cplusplus
3283 extern "C" void (*signal (int, void (*)(int)))(int);
3284 #else
3285 void (*signal ()) ();
3286 #endif
3287
3288 int main() {
3289 int i;
3290 ; return 0; }
3291 EOF
3292 if { (eval echo configure:3293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3293   rm -rf conftest*
3294   ac_cv_type_signal=void
3295 else
3296   echo "configure: failed program was:" >&5
3297   cat conftest.$ac_ext >&5
3298   rm -rf conftest*
3299   ac_cv_type_signal=int
3300 fi
3301 rm -f conftest*
3302 fi
3303
3304 echo "$ac_t""$ac_cv_type_signal" 1>&6
3305 cat >> confdefs.h <<EOF
3306 #define RETSIGTYPE $ac_cv_type_signal
3307 EOF
3308
3309
3310 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3311 echo "configure:3312: checking for uid_t in sys/types.h" >&5
3312 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3313   echo $ac_n "(cached) $ac_c" 1>&6
3314 else
3315   cat > conftest.$ac_ext <<EOF
3316 #line 3317 "configure"
3317 #include "confdefs.h"
3318 #include <sys/types.h>
3319 EOF
3320 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3321   egrep "uid_t" >/dev/null 2>&1; then
3322   rm -rf conftest*
3323   ac_cv_type_uid_t=yes
3324 else
3325   rm -rf conftest*
3326   ac_cv_type_uid_t=no
3327 fi
3328 rm -f conftest*
3329
3330 fi
3331
3332 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3333 if test $ac_cv_type_uid_t = no; then
3334   cat >> confdefs.h <<\EOF
3335 #define uid_t int
3336 EOF
3337
3338   cat >> confdefs.h <<\EOF
3339 #define gid_t int
3340 EOF
3341
3342 fi
3343
3344 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3345 echo "configure:3346: checking for mode_t" >&5
3346 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3347   echo $ac_n "(cached) $ac_c" 1>&6
3348 else
3349   cat > conftest.$ac_ext <<EOF
3350 #line 3351 "configure"
3351 #include "confdefs.h"
3352 #include <sys/types.h>
3353 #if STDC_HEADERS
3354 #include <stdlib.h>
3355 #include <stddef.h>
3356 #endif
3357 EOF
3358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3359   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3360   rm -rf conftest*
3361   ac_cv_type_mode_t=yes
3362 else
3363   rm -rf conftest*
3364   ac_cv_type_mode_t=no
3365 fi
3366 rm -f conftest*
3367
3368 fi
3369 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3370 if test $ac_cv_type_mode_t = no; then
3371   cat >> confdefs.h <<\EOF
3372 #define mode_t int
3373 EOF
3374
3375 fi
3376
3377 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3378 echo "configure:3379: checking for off_t" >&5
3379 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3380   echo $ac_n "(cached) $ac_c" 1>&6
3381 else
3382   cat > conftest.$ac_ext <<EOF
3383 #line 3384 "configure"
3384 #include "confdefs.h"
3385 #include <sys/types.h>
3386 #if STDC_HEADERS
3387 #include <stdlib.h>
3388 #include <stddef.h>
3389 #endif
3390 EOF
3391 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3392   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3393   rm -rf conftest*
3394   ac_cv_type_off_t=yes
3395 else
3396   rm -rf conftest*
3397   ac_cv_type_off_t=no
3398 fi
3399 rm -f conftest*
3400
3401 fi
3402 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3403 if test $ac_cv_type_off_t = no; then
3404   cat >> confdefs.h <<\EOF
3405 #define off_t long
3406 EOF
3407
3408 fi
3409
3410 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3411 echo "configure:3412: checking for size_t" >&5
3412 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3413   echo $ac_n "(cached) $ac_c" 1>&6
3414 else
3415   cat > conftest.$ac_ext <<EOF
3416 #line 3417 "configure"
3417 #include "confdefs.h"
3418 #include <sys/types.h>
3419 #if STDC_HEADERS
3420 #include <stdlib.h>
3421 #include <stddef.h>
3422 #endif
3423 EOF
3424 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3425   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3426   rm -rf conftest*
3427   ac_cv_type_size_t=yes
3428 else
3429   rm -rf conftest*
3430   ac_cv_type_size_t=no
3431 fi
3432 rm -f conftest*
3433
3434 fi
3435 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3436 if test $ac_cv_type_size_t = no; then
3437   cat >> confdefs.h <<\EOF
3438 #define size_t unsigned
3439 EOF
3440
3441 fi
3442
3443 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3444 echo "configure:3445: checking for pid_t" >&5
3445 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3446   echo $ac_n "(cached) $ac_c" 1>&6
3447 else
3448   cat > conftest.$ac_ext <<EOF
3449 #line 3450 "configure"
3450 #include "confdefs.h"
3451 #include <sys/types.h>
3452 #if STDC_HEADERS
3453 #include <stdlib.h>
3454 #include <stddef.h>
3455 #endif
3456 EOF
3457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3458   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3459   rm -rf conftest*
3460   ac_cv_type_pid_t=yes
3461 else
3462   rm -rf conftest*
3463   ac_cv_type_pid_t=no
3464 fi
3465 rm -f conftest*
3466
3467 fi
3468 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3469 if test $ac_cv_type_pid_t = no; then
3470   cat >> confdefs.h <<\EOF
3471 #define pid_t int
3472 EOF
3473
3474 fi
3475
3476 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3477 echo "configure:3478: checking for st_rdev in struct stat" >&5
3478 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3479   echo $ac_n "(cached) $ac_c" 1>&6
3480 else
3481   cat > conftest.$ac_ext <<EOF
3482 #line 3483 "configure"
3483 #include "confdefs.h"
3484 #include <sys/types.h>
3485 #include <sys/stat.h>
3486 int main() {
3487 struct stat s; s.st_rdev;
3488 ; return 0; }
3489 EOF
3490 if { (eval echo configure:3491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3491   rm -rf conftest*
3492   ac_cv_struct_st_rdev=yes
3493 else
3494   echo "configure: failed program was:" >&5
3495   cat conftest.$ac_ext >&5
3496   rm -rf conftest*
3497   ac_cv_struct_st_rdev=no
3498 fi
3499 rm -f conftest*
3500 fi
3501
3502 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3503 if test $ac_cv_struct_st_rdev = yes; then
3504   cat >> confdefs.h <<\EOF
3505 #define HAVE_ST_RDEV 1
3506 EOF
3507
3508 fi
3509
3510 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3511 echo "configure:3512: checking for d_off in dirent" >&5
3512 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3513   echo $ac_n "(cached) $ac_c" 1>&6
3514 else
3515   cat > conftest.$ac_ext <<EOF
3516 #line 3517 "configure"
3517 #include "confdefs.h"
3518
3519 #include <unistd.h>
3520 #include <sys/types.h>
3521 #include <dirent.h>
3522 int main() {
3523 struct dirent d; d.d_off;
3524 ; return 0; }
3525 EOF
3526 if { (eval echo configure:3527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3527   rm -rf conftest*
3528   ac_cv_dirent_d_off=yes
3529 else
3530   echo "configure: failed program was:" >&5
3531   cat conftest.$ac_ext >&5
3532   rm -rf conftest*
3533   ac_cv_dirent_d_off=no
3534 fi
3535 rm -f conftest*
3536 fi
3537
3538 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3539 if test $ac_cv_dirent_d_off = yes; then
3540   cat >> confdefs.h <<\EOF
3541 #define HAVE_DIRENT_D_OFF 1
3542 EOF
3543
3544 fi
3545
3546 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3547 echo "configure:3548: checking for ino_t" >&5
3548 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3549   echo $ac_n "(cached) $ac_c" 1>&6
3550 else
3551   cat > conftest.$ac_ext <<EOF
3552 #line 3553 "configure"
3553 #include "confdefs.h"
3554 #include <sys/types.h>
3555 #if STDC_HEADERS
3556 #include <stdlib.h>
3557 #include <stddef.h>
3558 #endif
3559 EOF
3560 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3561   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3562   rm -rf conftest*
3563   ac_cv_type_ino_t=yes
3564 else
3565   rm -rf conftest*
3566   ac_cv_type_ino_t=no
3567 fi
3568 rm -f conftest*
3569
3570 fi
3571 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3572 if test $ac_cv_type_ino_t = no; then
3573   cat >> confdefs.h <<\EOF
3574 #define ino_t unsigned
3575 EOF
3576
3577 fi
3578
3579 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3580 echo "configure:3581: checking for loff_t" >&5
3581 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3582   echo $ac_n "(cached) $ac_c" 1>&6
3583 else
3584   cat > conftest.$ac_ext <<EOF
3585 #line 3586 "configure"
3586 #include "confdefs.h"
3587 #include <sys/types.h>
3588 #if STDC_HEADERS
3589 #include <stdlib.h>
3590 #include <stddef.h>
3591 #endif
3592 EOF
3593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3594   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3595   rm -rf conftest*
3596   ac_cv_type_loff_t=yes
3597 else
3598   rm -rf conftest*
3599   ac_cv_type_loff_t=no
3600 fi
3601 rm -f conftest*
3602
3603 fi
3604 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3605 if test $ac_cv_type_loff_t = no; then
3606   cat >> confdefs.h <<\EOF
3607 #define loff_t off_t
3608 EOF
3609
3610 fi
3611
3612 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3613 echo "configure:3614: checking for offset_t" >&5
3614 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3615   echo $ac_n "(cached) $ac_c" 1>&6
3616 else
3617   cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620 #include <sys/types.h>
3621 #if STDC_HEADERS
3622 #include <stdlib.h>
3623 #include <stddef.h>
3624 #endif
3625 EOF
3626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3627   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3628   rm -rf conftest*
3629   ac_cv_type_offset_t=yes
3630 else
3631   rm -rf conftest*
3632   ac_cv_type_offset_t=no
3633 fi
3634 rm -f conftest*
3635
3636 fi
3637 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3638 if test $ac_cv_type_offset_t = no; then
3639   cat >> confdefs.h <<\EOF
3640 #define offset_t loff_t
3641 EOF
3642
3643 fi
3644
3645 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3646 echo "configure:3647: checking for ssize_t" >&5
3647 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3648   echo $ac_n "(cached) $ac_c" 1>&6
3649 else
3650   cat > conftest.$ac_ext <<EOF
3651 #line 3652 "configure"
3652 #include "confdefs.h"
3653 #include <sys/types.h>
3654 #if STDC_HEADERS
3655 #include <stdlib.h>
3656 #include <stddef.h>
3657 #endif
3658 EOF
3659 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3660   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3661   rm -rf conftest*
3662   ac_cv_type_ssize_t=yes
3663 else
3664   rm -rf conftest*
3665   ac_cv_type_ssize_t=no
3666 fi
3667 rm -f conftest*
3668
3669 fi
3670 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3671 if test $ac_cv_type_ssize_t = no; then
3672   cat >> confdefs.h <<\EOF
3673 #define ssize_t int
3674 EOF
3675
3676 fi
3677
3678 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3679 echo "configure:3680: checking for wchar_t" >&5
3680 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3681   echo $ac_n "(cached) $ac_c" 1>&6
3682 else
3683   cat > conftest.$ac_ext <<EOF
3684 #line 3685 "configure"
3685 #include "confdefs.h"
3686 #include <sys/types.h>
3687 #if STDC_HEADERS
3688 #include <stdlib.h>
3689 #include <stddef.h>
3690 #endif
3691 EOF
3692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3693   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3694   rm -rf conftest*
3695   ac_cv_type_wchar_t=yes
3696 else
3697   rm -rf conftest*
3698   ac_cv_type_wchar_t=no
3699 fi
3700 rm -f conftest*
3701
3702 fi
3703 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3704 if test $ac_cv_type_wchar_t = no; then
3705   cat >> confdefs.h <<\EOF
3706 #define wchar_t unsigned short
3707 EOF
3708
3709 fi
3710
3711
3712 ############################################
3713 # for cups support we need libcups, and a handful of header files
3714
3715 # Check whether --enable-cups or --disable-cups was given.
3716 if test "${enable_cups+set}" = set; then
3717   enableval="$enable_cups"
3718   :
3719 fi
3720
3721
3722 if test x$enable_cups != xno; then
3723         # Extract the first word of "cups-config", so it can be a program name with args.
3724 set dummy cups-config; ac_word=$2
3725 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3726 echo "configure:3727: checking for $ac_word" >&5
3727 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
3728   echo $ac_n "(cached) $ac_c" 1>&6
3729 else
3730   case "$CUPS_CONFIG" in
3731   /*)
3732   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
3733   ;;
3734   ?:/*)                  
3735   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path.
3736   ;;
3737   *)
3738   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3739   ac_dummy="$PATH"
3740   for ac_dir in $ac_dummy; do 
3741     test -z "$ac_dir" && ac_dir=.
3742     if test -f $ac_dir/$ac_word; then
3743       ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word"
3744       break
3745     fi
3746   done
3747   IFS="$ac_save_ifs"
3748   ;;
3749 esac
3750 fi
3751 CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG"
3752 if test -n "$CUPS_CONFIG"; then
3753   echo "$ac_t""$CUPS_CONFIG" 1>&6
3754 else
3755   echo "$ac_t""no" 1>&6
3756 fi
3757
3758
3759         if test "x$CUPS_CONFIG" != x; then
3760                         cat >> confdefs.h <<\EOF
3761 #define HAVE_CUPS 1
3762 EOF
3763
3764                 CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
3765                 LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
3766                 LIBS="$LIBS `$CUPS_CONFIG --libs`"
3767         fi
3768 fi
3769
3770 ############################################
3771 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3772 for ac_func in dlopen
3773 do
3774 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3775 echo "configure:3776: checking for $ac_func" >&5
3776 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3777   echo $ac_n "(cached) $ac_c" 1>&6
3778 else
3779   cat > conftest.$ac_ext <<EOF
3780 #line 3781 "configure"
3781 #include "confdefs.h"
3782 /* System header to define __stub macros and hopefully few prototypes,
3783     which can conflict with char $ac_func(); below.  */
3784 #include <assert.h>
3785 /* Override any gcc2 internal prototype to avoid an error.  */
3786 /* We use char because int might match the return type of a gcc2
3787     builtin and then its argument prototype would still apply.  */
3788 char $ac_func();
3789
3790 int main() {
3791
3792 /* The GNU C library defines this for functions which it implements
3793     to always fail with ENOSYS.  Some functions are actually named
3794     something starting with __ and the normal name is an alias.  */
3795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3796 choke me
3797 #else
3798 $ac_func();
3799 #endif
3800
3801 ; return 0; }
3802 EOF
3803 if { (eval echo configure:3804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3804   rm -rf conftest*
3805   eval "ac_cv_func_$ac_func=yes"
3806 else
3807   echo "configure: failed program was:" >&5
3808   cat conftest.$ac_ext >&5
3809   rm -rf conftest*
3810   eval "ac_cv_func_$ac_func=no"
3811 fi
3812 rm -f conftest*
3813 fi
3814
3815 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3816   echo "$ac_t""yes" 1>&6
3817     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3818   cat >> confdefs.h <<EOF
3819 #define $ac_tr_func 1
3820 EOF
3821  
3822 else
3823   echo "$ac_t""no" 1>&6
3824 fi
3825 done
3826
3827 if test x"$ac_cv_func_dlopen" = x"no"; then
3828     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3829 echo "configure:3830: checking for dlopen in -ldl" >&5
3830 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3831 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3832   echo $ac_n "(cached) $ac_c" 1>&6
3833 else
3834   ac_save_LIBS="$LIBS"
3835 LIBS="-ldl  $LIBS"
3836 cat > conftest.$ac_ext <<EOF
3837 #line 3838 "configure"
3838 #include "confdefs.h"
3839 /* Override any gcc2 internal prototype to avoid an error.  */
3840 /* We use char because int might match the return type of a gcc2
3841     builtin and then its argument prototype would still apply.  */
3842 char dlopen();
3843
3844 int main() {
3845 dlopen()
3846 ; return 0; }
3847 EOF
3848 if { (eval echo configure:3849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3849   rm -rf conftest*
3850   eval "ac_cv_lib_$ac_lib_var=yes"
3851 else
3852   echo "configure: failed program was:" >&5
3853   cat conftest.$ac_ext >&5
3854   rm -rf conftest*
3855   eval "ac_cv_lib_$ac_lib_var=no"
3856 fi
3857 rm -f conftest*
3858 LIBS="$ac_save_LIBS"
3859
3860 fi
3861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3862   echo "$ac_t""yes" 1>&6
3863   LIBS="$LIBS -ldl";
3864         cat >> confdefs.h <<\EOF
3865 #define HAVE_DLOPEN 1
3866 EOF
3867
3868 else
3869   echo "$ac_t""no" 1>&6
3870 fi
3871
3872 fi
3873 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3874
3875 ############################################
3876 # check if the compiler can do immediate structures
3877 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3878 echo "configure:3879: checking for immediate structures" >&5
3879 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3880   echo $ac_n "(cached) $ac_c" 1>&6
3881 else
3882   
3883     cat > conftest.$ac_ext <<EOF
3884 #line 3885 "configure"
3885 #include "confdefs.h"
3886
3887 #include <stdio.h>
3888 int main() {
3889
3890    typedef struct {unsigned x;} FOOBAR;
3891    #define X_FOOBAR(x) ((FOOBAR) { x })
3892    #define FOO_ONE X_FOOBAR(1)
3893    FOOBAR f = FOO_ONE;   
3894    static struct {
3895         FOOBAR y; 
3896         } f2[] = {
3897                 {FOO_ONE}
3898         };   
3899
3900 ; return 0; }
3901 EOF
3902 if { (eval echo configure:3903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3903   rm -rf conftest*
3904   samba_cv_immediate_structures=yes
3905 else
3906   echo "configure: failed program was:" >&5
3907   cat conftest.$ac_ext >&5
3908   rm -rf conftest*
3909   samba_cv_immediate_structures=no
3910 fi
3911 rm -f conftest*
3912 fi
3913
3914 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3915 if test x"$samba_cv_immediate_structures" = x"yes"; then
3916    cat >> confdefs.h <<\EOF
3917 #define HAVE_IMMEDIATE_STRUCTURES 1
3918 EOF
3919
3920 fi
3921
3922 ############################################
3923 # check for unix domain sockets
3924 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3925 echo "configure:3926: checking for unix domain sockets" >&5
3926 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3927   echo $ac_n "(cached) $ac_c" 1>&6
3928 else
3929   
3930     cat > conftest.$ac_ext <<EOF
3931 #line 3932 "configure"
3932 #include "confdefs.h"
3933
3934 #include <sys/types.h>
3935 #include <stdlib.h>
3936 #include <stddef.h>
3937 #include <sys/socket.h>
3938 #include <sys/un.h>
3939 int main() {
3940
3941   struct sockaddr_un sunaddr; 
3942   sunaddr.sun_family = AF_UNIX;
3943
3944 ; return 0; }
3945 EOF
3946 if { (eval echo configure:3947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3947   rm -rf conftest*
3948   samba_cv_unixsocket=yes
3949 else
3950   echo "configure: failed program was:" >&5
3951   cat conftest.$ac_ext >&5
3952   rm -rf conftest*
3953   samba_cv_unixsocket=no
3954 fi
3955 rm -f conftest*
3956 fi
3957
3958 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3959 if test x"$samba_cv_unixsocket" = x"yes"; then
3960    cat >> confdefs.h <<\EOF
3961 #define HAVE_UNIXSOCKET 1
3962 EOF
3963
3964 fi
3965
3966
3967 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3968 echo "configure:3969: checking for socklen_t type" >&5
3969 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3970   echo $ac_n "(cached) $ac_c" 1>&6
3971 else
3972   
3973     cat > conftest.$ac_ext <<EOF
3974 #line 3975 "configure"
3975 #include "confdefs.h"
3976
3977 #include <sys/types.h>
3978 #if STDC_HEADERS
3979 #include <stdlib.h>
3980 #include <stddef.h>
3981 #endif
3982 #include <sys/socket.h>
3983 int main() {
3984 socklen_t i = 0
3985 ; return 0; }
3986 EOF
3987 if { (eval echo configure:3988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3988   rm -rf conftest*
3989   samba_cv_socklen_t=yes
3990 else
3991   echo "configure: failed program was:" >&5
3992   cat conftest.$ac_ext >&5
3993   rm -rf conftest*
3994   samba_cv_socklen_t=no
3995 fi
3996 rm -f conftest*
3997 fi
3998
3999 echo "$ac_t""$samba_cv_socklen_t" 1>&6
4000 if test x"$samba_cv_socklen_t" = x"yes"; then
4001    cat >> confdefs.h <<\EOF
4002 #define HAVE_SOCKLEN_T_TYPE 1
4003 EOF
4004
4005 fi
4006
4007 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
4008 echo "configure:4009: checking for sig_atomic_t type" >&5
4009 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
4010   echo $ac_n "(cached) $ac_c" 1>&6
4011 else
4012   
4013     cat > conftest.$ac_ext <<EOF
4014 #line 4015 "configure"
4015 #include "confdefs.h"
4016
4017 #include <sys/types.h>
4018 #if STDC_HEADERS
4019 #include <stdlib.h>
4020 #include <stddef.h>
4021 #endif
4022 #include <signal.h>
4023 int main() {
4024 sig_atomic_t i = 0
4025 ; return 0; }
4026 EOF
4027 if { (eval echo configure:4028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4028   rm -rf conftest*
4029   samba_cv_sig_atomic_t=yes
4030 else
4031   echo "configure: failed program was:" >&5
4032   cat conftest.$ac_ext >&5
4033   rm -rf conftest*
4034   samba_cv_sig_atomic_t=no
4035 fi
4036 rm -f conftest*
4037 fi
4038
4039 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4040 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4041    cat >> confdefs.h <<\EOF
4042 #define HAVE_SIG_ATOMIC_T_TYPE 1
4043 EOF
4044
4045 fi
4046
4047 # stupid headers have the functions but no declaration. grrrr.
4048
4049  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4050 echo "configure:4051: checking for errno declaration" >&5
4051 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4052   echo $ac_n "(cached) $ac_c" 1>&6
4053 else
4054   
4055     cat > conftest.$ac_ext <<EOF
4056 #line 4057 "configure"
4057 #include "confdefs.h"
4058 #include <errno.h>
4059 int main() {
4060 int i = (int)errno
4061 ; return 0; }
4062 EOF
4063 if { (eval echo configure:4064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4064   rm -rf conftest*
4065   ac_cv_have_errno_decl=yes
4066 else
4067   echo "configure: failed program was:" >&5
4068   cat conftest.$ac_ext >&5
4069   rm -rf conftest*
4070   ac_cv_have_errno_decl=no
4071 fi
4072 rm -f conftest*
4073 fi
4074
4075 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4076  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4077     cat >> confdefs.h <<\EOF
4078 #define HAVE_ERRNO_DECL 1
4079 EOF
4080
4081  fi
4082
4083
4084  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4085 echo "configure:4086: checking for setresuid declaration" >&5
4086 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4087   echo $ac_n "(cached) $ac_c" 1>&6
4088 else
4089   
4090     cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4093 #include <unistd.h>
4094 int main() {
4095 int i = (int)setresuid
4096 ; return 0; }
4097 EOF
4098 if { (eval echo configure:4099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4099   rm -rf conftest*
4100   ac_cv_have_setresuid_decl=yes
4101 else
4102   echo "configure: failed program was:" >&5
4103   cat conftest.$ac_ext >&5
4104   rm -rf conftest*
4105   ac_cv_have_setresuid_decl=no
4106 fi
4107 rm -f conftest*
4108 fi
4109
4110 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4111  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4112     cat >> confdefs.h <<\EOF
4113 #define HAVE_SETRESUID_DECL 1
4114 EOF
4115
4116  fi
4117
4118
4119  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4120 echo "configure:4121: checking for setresgid declaration" >&5
4121 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4122   echo $ac_n "(cached) $ac_c" 1>&6
4123 else
4124   
4125     cat > conftest.$ac_ext <<EOF
4126 #line 4127 "configure"
4127 #include "confdefs.h"
4128 #include <unistd.h>
4129 int main() {
4130 int i = (int)setresgid
4131 ; return 0; }
4132 EOF
4133 if { (eval echo configure:4134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4134   rm -rf conftest*
4135   ac_cv_have_setresgid_decl=yes
4136 else
4137   echo "configure: failed program was:" >&5
4138   cat conftest.$ac_ext >&5
4139   rm -rf conftest*
4140   ac_cv_have_setresgid_decl=no
4141 fi
4142 rm -f conftest*
4143 fi
4144
4145 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4146  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4147     cat >> confdefs.h <<\EOF
4148 #define HAVE_SETRESGID_DECL 1
4149 EOF
4150
4151  fi
4152
4153
4154  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4155 echo "configure:4156: checking for asprintf declaration" >&5
4156 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4157   echo $ac_n "(cached) $ac_c" 1>&6
4158 else
4159   
4160     cat > conftest.$ac_ext <<EOF
4161 #line 4162 "configure"
4162 #include "confdefs.h"
4163 #include <stdio.h>
4164 int main() {
4165 int i = (int)asprintf
4166 ; return 0; }
4167 EOF
4168 if { (eval echo configure:4169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4169   rm -rf conftest*
4170   ac_cv_have_asprintf_decl=yes
4171 else
4172   echo "configure: failed program was:" >&5
4173   cat conftest.$ac_ext >&5
4174   rm -rf conftest*
4175   ac_cv_have_asprintf_decl=no
4176 fi
4177 rm -f conftest*
4178 fi
4179
4180 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4181  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4182     cat >> confdefs.h <<\EOF
4183 #define HAVE_ASPRINTF_DECL 1
4184 EOF
4185
4186  fi
4187
4188
4189  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4190 echo "configure:4191: checking for vasprintf declaration" >&5
4191 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4192   echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194   
4195     cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198 #include <stdio.h>
4199 int main() {
4200 int i = (int)vasprintf
4201 ; return 0; }
4202 EOF
4203 if { (eval echo configure:4204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4204   rm -rf conftest*
4205   ac_cv_have_vasprintf_decl=yes
4206 else
4207   echo "configure: failed program was:" >&5
4208   cat conftest.$ac_ext >&5
4209   rm -rf conftest*
4210   ac_cv_have_vasprintf_decl=no
4211 fi
4212 rm -f conftest*
4213 fi
4214
4215 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4216  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4217     cat >> confdefs.h <<\EOF
4218 #define HAVE_VASPRINTF_DECL 1
4219 EOF
4220
4221  fi
4222
4223
4224  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4225 echo "configure:4226: checking for vsnprintf declaration" >&5
4226 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4227   echo $ac_n "(cached) $ac_c" 1>&6
4228 else
4229   
4230     cat > conftest.$ac_ext <<EOF
4231 #line 4232 "configure"
4232 #include "confdefs.h"
4233 #include <stdio.h>
4234 int main() {
4235 int i = (int)vsnprintf
4236 ; return 0; }
4237 EOF
4238 if { (eval echo configure:4239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4239   rm -rf conftest*
4240   ac_cv_have_vsnprintf_decl=yes
4241 else
4242   echo "configure: failed program was:" >&5
4243   cat conftest.$ac_ext >&5
4244   rm -rf conftest*
4245   ac_cv_have_vsnprintf_decl=no
4246 fi
4247 rm -f conftest*
4248 fi
4249
4250 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4251  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4252     cat >> confdefs.h <<\EOF
4253 #define HAVE_VSNPRINTF_DECL 1
4254 EOF
4255
4256  fi
4257
4258
4259  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4260 echo "configure:4261: checking for snprintf declaration" >&5
4261 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4262   echo $ac_n "(cached) $ac_c" 1>&6
4263 else
4264   
4265     cat > conftest.$ac_ext <<EOF
4266 #line 4267 "configure"
4267 #include "confdefs.h"
4268 #include <stdio.h>
4269 int main() {
4270 int i = (int)snprintf
4271 ; return 0; }
4272 EOF
4273 if { (eval echo configure:4274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4274   rm -rf conftest*
4275   ac_cv_have_snprintf_decl=yes
4276 else
4277   echo "configure: failed program was:" >&5
4278   cat conftest.$ac_ext >&5
4279   rm -rf conftest*
4280   ac_cv_have_snprintf_decl=no
4281 fi
4282 rm -f conftest*
4283 fi
4284
4285 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4286  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4287     cat >> confdefs.h <<\EOF
4288 #define HAVE_SNPRINTF_DECL 1
4289 EOF
4290
4291  fi
4292
4293
4294 # and glibc has setresuid under linux but the function does
4295 # nothing until kernel 2.1.44! very dumb.
4296 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4297 echo "configure:4298: checking for real setresuid" >&5
4298 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4299   echo $ac_n "(cached) $ac_c" 1>&6
4300 else
4301   
4302     if test "$cross_compiling" = yes; then
4303   samba_cv_have_setresuid=cross
4304 else
4305   cat > conftest.$ac_ext <<EOF
4306 #line 4307 "configure"
4307 #include "confdefs.h"
4308 #include <errno.h>
4309 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4310 EOF
4311 if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4312 then
4313   samba_cv_have_setresuid=yes
4314 else
4315   echo "configure: failed program was:" >&5
4316   cat conftest.$ac_ext >&5
4317   rm -fr conftest*
4318   samba_cv_have_setresuid=no
4319 fi
4320 rm -fr conftest*
4321 fi
4322
4323 fi
4324
4325 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4326 if test x"$samba_cv_have_setresuid" = x"yes"; then
4327     cat >> confdefs.h <<\EOF
4328 #define HAVE_SETRESUID 1
4329 EOF
4330
4331 fi
4332
4333 # Do the same check for setresguid...
4334 #
4335 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4336 echo "configure:4337: checking for real setresgid" >&5
4337 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4338   echo $ac_n "(cached) $ac_c" 1>&6
4339 else
4340   
4341     if test "$cross_compiling" = yes; then
4342   samba_cv_have_setresgid=cross
4343 else
4344   cat > conftest.$ac_ext <<EOF
4345 #line 4346 "configure"
4346 #include "confdefs.h"
4347 #include <unistd.h>
4348 #include <errno.h>
4349 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4350 EOF
4351 if { (eval echo configure:4352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4352 then
4353   samba_cv_have_setresgid=yes
4354 else
4355   echo "configure: failed program was:" >&5
4356   cat conftest.$ac_ext >&5
4357   rm -fr conftest*
4358   samba_cv_have_setresgid=no
4359 fi
4360 rm -fr conftest*
4361 fi
4362
4363 fi
4364
4365 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4366 if test x"$samba_cv_have_setresgid" = x"yes"; then
4367     cat >> confdefs.h <<\EOF
4368 #define HAVE_SETRESGID 1
4369 EOF
4370
4371 fi
4372
4373 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4374 echo "configure:4375: checking for 8-bit clean memcmp" >&5
4375 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4376   echo $ac_n "(cached) $ac_c" 1>&6
4377 else
4378   if test "$cross_compiling" = yes; then
4379   ac_cv_func_memcmp_clean=no
4380 else
4381   cat > conftest.$ac_ext <<EOF
4382 #line 4383 "configure"
4383 #include "confdefs.h"
4384
4385 main()
4386 {
4387   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4388   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4389 }
4390
4391 EOF
4392 if { (eval echo configure:4393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4393 then
4394   ac_cv_func_memcmp_clean=yes
4395 else
4396   echo "configure: failed program was:" >&5
4397   cat conftest.$ac_ext >&5
4398   rm -fr conftest*
4399   ac_cv_func_memcmp_clean=no
4400 fi
4401 rm -fr conftest*
4402 fi
4403
4404 fi
4405
4406 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4407 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4408
4409
4410 ###############################################
4411 # test for where we get crypt() from
4412 for ac_func in crypt
4413 do
4414 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4415 echo "configure:4416: checking for $ac_func" >&5
4416 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4417   echo $ac_n "(cached) $ac_c" 1>&6
4418 else
4419   cat > conftest.$ac_ext <<EOF
4420 #line 4421 "configure"
4421 #include "confdefs.h"
4422 /* System header to define __stub macros and hopefully few prototypes,
4423     which can conflict with char $ac_func(); below.  */
4424 #include <assert.h>
4425 /* Override any gcc2 internal prototype to avoid an error.  */
4426 /* We use char because int might match the return type of a gcc2
4427     builtin and then its argument prototype would still apply.  */
4428 char $ac_func();
4429
4430 int main() {
4431
4432 /* The GNU C library defines this for functions which it implements
4433     to always fail with ENOSYS.  Some functions are actually named
4434     something starting with __ and the normal name is an alias.  */
4435 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4436 choke me
4437 #else
4438 $ac_func();
4439 #endif
4440
4441 ; return 0; }
4442 EOF
4443 if { (eval echo configure:4444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4444   rm -rf conftest*
4445   eval "ac_cv_func_$ac_func=yes"
4446 else
4447   echo "configure: failed program was:" >&5
4448   cat conftest.$ac_ext >&5
4449   rm -rf conftest*
4450   eval "ac_cv_func_$ac_func=no"
4451 fi
4452 rm -f conftest*
4453 fi
4454
4455 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4456   echo "$ac_t""yes" 1>&6
4457     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4458   cat >> confdefs.h <<EOF
4459 #define $ac_tr_func 1
4460 EOF
4461  
4462 else
4463   echo "$ac_t""no" 1>&6
4464 fi
4465 done
4466
4467 if test x"$ac_cv_func_crypt" = x"no"; then
4468     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4469 echo "configure:4470: checking for crypt in -lcrypt" >&5
4470 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4471 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4472   echo $ac_n "(cached) $ac_c" 1>&6
4473 else
4474   ac_save_LIBS="$LIBS"
4475 LIBS="-lcrypt  $LIBS"
4476 cat > conftest.$ac_ext <<EOF
4477 #line 4478 "configure"
4478 #include "confdefs.h"
4479 /* Override any gcc2 internal prototype to avoid an error.  */
4480 /* We use char because int might match the return type of a gcc2
4481     builtin and then its argument prototype would still apply.  */
4482 char crypt();
4483
4484 int main() {
4485 crypt()
4486 ; return 0; }
4487 EOF
4488 if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4489   rm -rf conftest*
4490   eval "ac_cv_lib_$ac_lib_var=yes"
4491 else
4492   echo "configure: failed program was:" >&5
4493   cat conftest.$ac_ext >&5
4494   rm -rf conftest*
4495   eval "ac_cv_lib_$ac_lib_var=no"
4496 fi
4497 rm -f conftest*
4498 LIBS="$ac_save_LIBS"
4499
4500 fi
4501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4502   echo "$ac_t""yes" 1>&6
4503   LIBS="$LIBS -lcrypt";
4504         cat >> confdefs.h <<\EOF
4505 #define HAVE_CRYPT 1
4506 EOF
4507
4508 else
4509   echo "$ac_t""no" 1>&6
4510 fi
4511
4512 fi
4513
4514
4515 ###############################################
4516 # Readline included by default unless explicitly asked not to
4517 test "${with_readline+set}" != "set" && with_readline=yes
4518
4519 # test for where we get readline() from
4520 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4521 echo "configure:4522: checking whether to use readline" >&5
4522 # Check whether --with-readline or --without-readline was given.
4523 if test "${with_readline+set}" = set; then
4524   withval="$with_readline"
4525     case "$with_readline" in
4526   yes)
4527     echo "$ac_t""yes" 1>&6
4528
4529     for ac_hdr in readline.h history.h readline/readline.h
4530 do
4531 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4532 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4533 echo "configure:4534: checking for $ac_hdr" >&5
4534 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4535   echo $ac_n "(cached) $ac_c" 1>&6
4536 else
4537   cat > conftest.$ac_ext <<EOF
4538 #line 4539 "configure"
4539 #include "confdefs.h"
4540 #include <$ac_hdr>
4541 EOF
4542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4543 { (eval echo configure:4544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4545 if test -z "$ac_err"; then
4546   rm -rf conftest*
4547   eval "ac_cv_header_$ac_safe=yes"
4548 else
4549   echo "$ac_err" >&5
4550   echo "configure: failed program was:" >&5
4551   cat conftest.$ac_ext >&5
4552   rm -rf conftest*
4553   eval "ac_cv_header_$ac_safe=no"
4554 fi
4555 rm -f conftest*
4556 fi
4557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4558   echo "$ac_t""yes" 1>&6
4559     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4560   cat >> confdefs.h <<EOF
4561 #define $ac_tr_hdr 1
4562 EOF
4563  
4564 else
4565   echo "$ac_t""no" 1>&6
4566 fi
4567 done
4568
4569     for ac_hdr in readline/history.h
4570 do
4571 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4572 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4573 echo "configure:4574: checking for $ac_hdr" >&5
4574 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4575   echo $ac_n "(cached) $ac_c" 1>&6
4576 else
4577   cat > conftest.$ac_ext <<EOF
4578 #line 4579 "configure"
4579 #include "confdefs.h"
4580 #include <$ac_hdr>
4581 EOF
4582 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4583 { (eval echo configure:4584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4584 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4585 if test -z "$ac_err"; then
4586   rm -rf conftest*
4587   eval "ac_cv_header_$ac_safe=yes"
4588 else
4589   echo "$ac_err" >&5
4590   echo "configure: failed program was:" >&5
4591   cat conftest.$ac_ext >&5
4592   rm -rf conftest*
4593   eval "ac_cv_header_$ac_safe=no"
4594 fi
4595 rm -f conftest*
4596 fi
4597 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4598   echo "$ac_t""yes" 1>&6
4599     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4600   cat >> confdefs.h <<EOF
4601 #define $ac_tr_hdr 1
4602 EOF
4603  
4604 else
4605   echo "$ac_t""no" 1>&6
4606 fi
4607 done
4608
4609
4610     for ac_hdr in readline.h readline/readline.h
4611 do
4612 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4613 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4614 echo "configure:4615: checking for $ac_hdr" >&5
4615 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4616   echo $ac_n "(cached) $ac_c" 1>&6
4617 else
4618   cat > conftest.$ac_ext <<EOF
4619 #line 4620 "configure"
4620 #include "confdefs.h"
4621 #include <$ac_hdr>
4622 EOF
4623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4624 { (eval echo configure:4625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4626 if test -z "$ac_err"; then
4627   rm -rf conftest*
4628   eval "ac_cv_header_$ac_safe=yes"
4629 else
4630   echo "$ac_err" >&5
4631   echo "configure: failed program was:" >&5
4632   cat conftest.$ac_ext >&5
4633   rm -rf conftest*
4634   eval "ac_cv_header_$ac_safe=no"
4635 fi
4636 rm -f conftest*
4637 fi
4638 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4639   echo "$ac_t""yes" 1>&6
4640     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4641   cat >> confdefs.h <<EOF
4642 #define $ac_tr_hdr 1
4643 EOF
4644  
4645       for termlib in ncurses curses termcap terminfo termlib; do
4646        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4647 echo "configure:4648: checking for tgetent in -l${termlib}" >&5
4648 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4649 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4650   echo $ac_n "(cached) $ac_c" 1>&6
4651 else
4652   ac_save_LIBS="$LIBS"
4653 LIBS="-l${termlib}  $LIBS"
4654 cat > conftest.$ac_ext <<EOF
4655 #line 4656 "configure"
4656 #include "confdefs.h"
4657 /* Override any gcc2 internal prototype to avoid an error.  */
4658 /* We use char because int might match the return type of a gcc2
4659     builtin and then its argument prototype would still apply.  */
4660 char tgetent();
4661
4662 int main() {
4663 tgetent()
4664 ; return 0; }
4665 EOF
4666 if { (eval echo configure:4667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4667   rm -rf conftest*
4668   eval "ac_cv_lib_$ac_lib_var=yes"
4669 else
4670   echo "configure: failed program was:" >&5
4671   cat conftest.$ac_ext >&5
4672   rm -rf conftest*
4673   eval "ac_cv_lib_$ac_lib_var=no"
4674 fi
4675 rm -f conftest*
4676 LIBS="$ac_save_LIBS"
4677
4678 fi
4679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4680   echo "$ac_t""yes" 1>&6
4681   TERMLIBS="-l${termlib}"; break
4682 else
4683   echo "$ac_t""no" 1>&6
4684 fi
4685
4686       done
4687       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4688 echo "configure:4689: checking for rl_callback_handler_install in -lreadline" >&5
4689 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4690 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4691   echo $ac_n "(cached) $ac_c" 1>&6
4692 else
4693   ac_save_LIBS="$LIBS"
4694 LIBS="-lreadline $TERMLIBS $LIBS"
4695 cat > conftest.$ac_ext <<EOF
4696 #line 4697 "configure"
4697 #include "confdefs.h"
4698 /* Override any gcc2 internal prototype to avoid an error.  */
4699 /* We use char because int might match the return type of a gcc2
4700     builtin and then its argument prototype would still apply.  */
4701 char rl_callback_handler_install();
4702
4703 int main() {
4704 rl_callback_handler_install()
4705 ; return 0; }
4706 EOF
4707 if { (eval echo configure:4708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4708   rm -rf conftest*
4709   eval "ac_cv_lib_$ac_lib_var=yes"
4710 else
4711   echo "configure: failed program was:" >&5
4712   cat conftest.$ac_ext >&5
4713   rm -rf conftest*
4714   eval "ac_cv_lib_$ac_lib_var=no"
4715 fi
4716 rm -f conftest*
4717 LIBS="$ac_save_LIBS"
4718
4719 fi
4720 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4721   echo "$ac_t""yes" 1>&6
4722   TERMLIBS="-lreadline $TERMLIBS"
4723        cat >> confdefs.h <<\EOF
4724 #define HAVE_LIBREADLINE 1
4725 EOF
4726
4727        break
4728 else
4729   echo "$ac_t""no" 1>&6
4730 TERMLIBS=
4731 fi
4732
4733 else
4734   echo "$ac_t""no" 1>&6
4735 fi
4736 done
4737
4738     ;;
4739   no)
4740     echo "$ac_t""no" 1>&6
4741     ;;
4742   *)
4743     echo "$ac_t""yes" 1>&6
4744
4745     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4746     # alternate readline path
4747     _ldflags=${LDFLAGS}
4748     _cppflags=${CPPFLAGS}
4749
4750     # Add additional search path
4751     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4752     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4753
4754     for ac_hdr in readline.h history.h readline/readline.h
4755 do
4756 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4757 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4758 echo "configure:4759: checking for $ac_hdr" >&5
4759 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4760   echo $ac_n "(cached) $ac_c" 1>&6
4761 else
4762   cat > conftest.$ac_ext <<EOF
4763 #line 4764 "configure"
4764 #include "confdefs.h"
4765 #include <$ac_hdr>
4766 EOF
4767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4768 { (eval echo configure:4769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4770 if test -z "$ac_err"; then
4771   rm -rf conftest*
4772   eval "ac_cv_header_$ac_safe=yes"
4773 else
4774   echo "$ac_err" >&5
4775   echo "configure: failed program was:" >&5
4776   cat conftest.$ac_ext >&5
4777   rm -rf conftest*
4778   eval "ac_cv_header_$ac_safe=no"
4779 fi
4780 rm -f conftest*
4781 fi
4782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4783   echo "$ac_t""yes" 1>&6
4784     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4785   cat >> confdefs.h <<EOF
4786 #define $ac_tr_hdr 1
4787 EOF
4788  
4789 else
4790   echo "$ac_t""no" 1>&6
4791 fi
4792 done
4793
4794     for ac_hdr in readline/history.h
4795 do
4796 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4797 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4798 echo "configure:4799: checking for $ac_hdr" >&5
4799 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4800   echo $ac_n "(cached) $ac_c" 1>&6
4801 else
4802   cat > conftest.$ac_ext <<EOF
4803 #line 4804 "configure"
4804 #include "confdefs.h"
4805 #include <$ac_hdr>
4806 EOF
4807 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4808 { (eval echo configure:4809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4809 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4810 if test -z "$ac_err"; then
4811   rm -rf conftest*
4812   eval "ac_cv_header_$ac_safe=yes"
4813 else
4814   echo "$ac_err" >&5
4815   echo "configure: failed program was:" >&5
4816   cat conftest.$ac_ext >&5
4817   rm -rf conftest*
4818   eval "ac_cv_header_$ac_safe=no"
4819 fi
4820 rm -f conftest*
4821 fi
4822 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4823   echo "$ac_t""yes" 1>&6
4824     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4825   cat >> confdefs.h <<EOF
4826 #define $ac_tr_hdr 1
4827 EOF
4828  
4829 else
4830   echo "$ac_t""no" 1>&6
4831 fi
4832 done
4833
4834
4835     for ac_hdr in readline.h readline/readline.h
4836 do
4837 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4838 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4839 echo "configure:4840: checking for $ac_hdr" >&5
4840 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4841   echo $ac_n "(cached) $ac_c" 1>&6
4842 else
4843   cat > conftest.$ac_ext <<EOF
4844 #line 4845 "configure"
4845 #include "confdefs.h"
4846 #include <$ac_hdr>
4847 EOF
4848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4849 { (eval echo configure:4850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4850 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4851 if test -z "$ac_err"; then
4852   rm -rf conftest*
4853   eval "ac_cv_header_$ac_safe=yes"
4854 else
4855   echo "$ac_err" >&5
4856   echo "configure: failed program was:" >&5
4857   cat conftest.$ac_ext >&5
4858   rm -rf conftest*
4859   eval "ac_cv_header_$ac_safe=no"
4860 fi
4861 rm -f conftest*
4862 fi
4863 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4864   echo "$ac_t""yes" 1>&6
4865     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4866   cat >> confdefs.h <<EOF
4867 #define $ac_tr_hdr 1
4868 EOF
4869  
4870       for termlib in ncurses curses termcap terminfo termlib; do
4871        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4872 echo "configure:4873: checking for tgetent in -l${termlib}" >&5
4873 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4874 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4875   echo $ac_n "(cached) $ac_c" 1>&6
4876 else
4877   ac_save_LIBS="$LIBS"
4878 LIBS="-l${termlib}  $LIBS"
4879 cat > conftest.$ac_ext <<EOF
4880 #line 4881 "configure"
4881 #include "confdefs.h"
4882 /* Override any gcc2 internal prototype to avoid an error.  */
4883 /* We use char because int might match the return type of a gcc2
4884     builtin and then its argument prototype would still apply.  */
4885 char tgetent();
4886
4887 int main() {
4888 tgetent()
4889 ; return 0; }
4890 EOF
4891 if { (eval echo configure:4892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4892   rm -rf conftest*
4893   eval "ac_cv_lib_$ac_lib_var=yes"
4894 else
4895   echo "configure: failed program was:" >&5
4896   cat conftest.$ac_ext >&5
4897   rm -rf conftest*
4898   eval "ac_cv_lib_$ac_lib_var=no"
4899 fi
4900 rm -f conftest*
4901 LIBS="$ac_save_LIBS"
4902
4903 fi
4904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4905   echo "$ac_t""yes" 1>&6
4906   TERMLIBS="-l${termlib}"; break
4907 else
4908   echo "$ac_t""no" 1>&6
4909 fi
4910
4911       done
4912       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4913 echo "configure:4914: checking for rl_callback_handler_install in -lreadline" >&5
4914 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4915 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4916   echo $ac_n "(cached) $ac_c" 1>&6
4917 else
4918   ac_save_LIBS="$LIBS"
4919 LIBS="-lreadline $TERMLIBS $LIBS"
4920 cat > conftest.$ac_ext <<EOF
4921 #line 4922 "configure"
4922 #include "confdefs.h"
4923 /* Override any gcc2 internal prototype to avoid an error.  */
4924 /* We use char because int might match the return type of a gcc2
4925     builtin and then its argument prototype would still apply.  */
4926 char rl_callback_handler_install();
4927
4928 int main() {
4929 rl_callback_handler_install()
4930 ; return 0; }
4931 EOF
4932 if { (eval echo configure:4933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4933   rm -rf conftest*
4934   eval "ac_cv_lib_$ac_lib_var=yes"
4935 else
4936   echo "configure: failed program was:" >&5
4937   cat conftest.$ac_ext >&5
4938   rm -rf conftest*
4939   eval "ac_cv_lib_$ac_lib_var=no"
4940 fi
4941 rm -f conftest*
4942 LIBS="$ac_save_LIBS"
4943
4944 fi
4945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4946   echo "$ac_t""yes" 1>&6
4947   TERMLDFLAGS="-L$with_readline/lib"
4948        TERMCPPFLAGS="-I$with_readline/include"
4949        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4950        TERMLIBS="-lreadline $TERMLIBS"
4951        cat >> confdefs.h <<\EOF
4952 #define HAVE_LIBREADLINE 1
4953 EOF
4954
4955        break
4956 else
4957   echo "$ac_t""no" 1>&6
4958 TERMLIBS= CPPFLAGS=$_cppflags
4959 fi
4960
4961 else
4962   echo "$ac_t""no" 1>&6
4963 fi
4964 done
4965
4966
4967     LDFLAGS=$_ldflags
4968     ;;
4969   esac
4970 else
4971   echo "$ac_t""no" 1>&6
4972
4973 fi
4974
4975
4976
4977
4978 # The readline API changed slightly from readline3 to readline4, so
4979 # code will generate warnings on one of them unless we have a few
4980 # special cases.
4981 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4982 echo "configure:4983: checking for rl_completion_matches in -lreadline" >&5
4983 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4984 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4985   echo $ac_n "(cached) $ac_c" 1>&6
4986 else
4987   ac_save_LIBS="$LIBS"
4988 LIBS="-lreadline $TERMLIBS $LIBS"
4989 cat > conftest.$ac_ext <<EOF
4990 #line 4991 "configure"
4991 #include "confdefs.h"
4992 /* Override any gcc2 internal prototype to avoid an error.  */
4993 /* We use char because int might match the return type of a gcc2
4994     builtin and then its argument prototype would still apply.  */
4995 char rl_completion_matches();
4996
4997 int main() {
4998 rl_completion_matches()
4999 ; return 0; }
5000 EOF
5001 if { (eval echo configure:5002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5002   rm -rf conftest*
5003   eval "ac_cv_lib_$ac_lib_var=yes"
5004 else
5005   echo "configure: failed program was:" >&5
5006   cat conftest.$ac_ext >&5
5007   rm -rf conftest*
5008   eval "ac_cv_lib_$ac_lib_var=no"
5009 fi
5010 rm -f conftest*
5011 LIBS="$ac_save_LIBS"
5012
5013 fi
5014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5015   echo "$ac_t""yes" 1>&6
5016   cat >> confdefs.h <<\EOF
5017 #define HAVE_NEW_LIBREADLINE 1
5018 EOF
5019
5020 else
5021   echo "$ac_t""no" 1>&6
5022 fi
5023
5024
5025 # The following test taken from the cvs sources
5026 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5027 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5028 # libsocket.so which has a bad implementation of gethostbyname (it
5029 # only looks in /etc/hosts), so we only look for -lsocket if we need
5030 # it.
5031 for ac_func in connect
5032 do
5033 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5034 echo "configure:5035: checking for $ac_func" >&5
5035 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5036   echo $ac_n "(cached) $ac_c" 1>&6
5037 else
5038   cat > conftest.$ac_ext <<EOF
5039 #line 5040 "configure"
5040 #include "confdefs.h"
5041 /* System header to define __stub macros and hopefully few prototypes,
5042     which can conflict with char $ac_func(); below.  */
5043 #include <assert.h>
5044 /* Override any gcc2 internal prototype to avoid an error.  */
5045 /* We use char because int might match the return type of a gcc2
5046     builtin and then its argument prototype would still apply.  */
5047 char $ac_func();
5048
5049 int main() {
5050
5051 /* The GNU C library defines this for functions which it implements
5052     to always fail with ENOSYS.  Some functions are actually named
5053     something starting with __ and the normal name is an alias.  */
5054 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5055 choke me
5056 #else
5057 $ac_func();
5058 #endif
5059
5060 ; return 0; }
5061 EOF
5062 if { (eval echo configure:5063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5063   rm -rf conftest*
5064   eval "ac_cv_func_$ac_func=yes"
5065 else
5066   echo "configure: failed program was:" >&5
5067   cat conftest.$ac_ext >&5
5068   rm -rf conftest*
5069   eval "ac_cv_func_$ac_func=no"
5070 fi
5071 rm -f conftest*
5072 fi
5073
5074 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5075   echo "$ac_t""yes" 1>&6
5076     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5077   cat >> confdefs.h <<EOF
5078 #define $ac_tr_func 1
5079 EOF
5080  
5081 else
5082   echo "$ac_t""no" 1>&6
5083 fi
5084 done
5085
5086 if test x"$ac_cv_func_connect" = x"no"; then
5087     case "$LIBS" in
5088     *-lnsl*) ;;
5089     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5090 echo "configure:5091: checking for printf in -lnsl_s" >&5
5091 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5092 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5093   echo $ac_n "(cached) $ac_c" 1>&6
5094 else
5095   ac_save_LIBS="$LIBS"
5096 LIBS="-lnsl_s  $LIBS"
5097 cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100 /* Override any gcc2 internal prototype to avoid an error.  */
5101 /* We use char because int might match the return type of a gcc2
5102     builtin and then its argument prototype would still apply.  */
5103 char printf();
5104
5105 int main() {
5106 printf()
5107 ; return 0; }
5108 EOF
5109 if { (eval echo configure:5110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5110   rm -rf conftest*
5111   eval "ac_cv_lib_$ac_lib_var=yes"
5112 else
5113   echo "configure: failed program was:" >&5
5114   cat conftest.$ac_ext >&5
5115   rm -rf conftest*
5116   eval "ac_cv_lib_$ac_lib_var=no"
5117 fi
5118 rm -f conftest*
5119 LIBS="$ac_save_LIBS"
5120
5121 fi
5122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5123   echo "$ac_t""yes" 1>&6
5124     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5125     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5126   cat >> confdefs.h <<EOF
5127 #define $ac_tr_lib 1
5128 EOF
5129
5130   LIBS="-lnsl_s $LIBS"
5131
5132 else
5133   echo "$ac_t""no" 1>&6
5134 fi
5135  ;;
5136     esac
5137     case "$LIBS" in
5138     *-lnsl*) ;;
5139     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5140 echo "configure:5141: checking for printf in -lnsl" >&5
5141 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5142 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5143   echo $ac_n "(cached) $ac_c" 1>&6
5144 else
5145   ac_save_LIBS="$LIBS"
5146 LIBS="-lnsl  $LIBS"
5147 cat > conftest.$ac_ext <<EOF
5148 #line 5149 "configure"
5149 #include "confdefs.h"
5150 /* Override any gcc2 internal prototype to avoid an error.  */
5151 /* We use char because int might match the return type of a gcc2
5152     builtin and then its argument prototype would still apply.  */
5153 char printf();
5154
5155 int main() {
5156 printf()
5157 ; return 0; }
5158 EOF
5159 if { (eval echo configure:5160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5160   rm -rf conftest*
5161   eval "ac_cv_lib_$ac_lib_var=yes"
5162 else
5163   echo "configure: failed program was:" >&5
5164   cat conftest.$ac_ext >&5
5165   rm -rf conftest*
5166   eval "ac_cv_lib_$ac_lib_var=no"
5167 fi
5168 rm -f conftest*
5169 LIBS="$ac_save_LIBS"
5170
5171 fi
5172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5173   echo "$ac_t""yes" 1>&6
5174     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5175     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5176   cat >> confdefs.h <<EOF
5177 #define $ac_tr_lib 1
5178 EOF
5179
5180   LIBS="-lnsl $LIBS"
5181
5182 else
5183   echo "$ac_t""no" 1>&6
5184 fi
5185  ;;
5186     esac
5187     case "$LIBS" in
5188     *-lsocket*) ;;
5189     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5190 echo "configure:5191: checking for connect in -lsocket" >&5
5191 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5192 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5193   echo $ac_n "(cached) $ac_c" 1>&6
5194 else
5195   ac_save_LIBS="$LIBS"
5196 LIBS="-lsocket  $LIBS"
5197 cat > conftest.$ac_ext <<EOF
5198 #line 5199 "configure"
5199 #include "confdefs.h"
5200 /* Override any gcc2 internal prototype to avoid an error.  */
5201 /* We use char because int might match the return type of a gcc2
5202     builtin and then its argument prototype would still apply.  */
5203 char connect();
5204
5205 int main() {
5206 connect()
5207 ; return 0; }
5208 EOF
5209 if { (eval echo configure:5210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5210   rm -rf conftest*
5211   eval "ac_cv_lib_$ac_lib_var=yes"
5212 else
5213   echo "configure: failed program was:" >&5
5214   cat conftest.$ac_ext >&5
5215   rm -rf conftest*
5216   eval "ac_cv_lib_$ac_lib_var=no"
5217 fi
5218 rm -f conftest*
5219 LIBS="$ac_save_LIBS"
5220
5221 fi
5222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5223   echo "$ac_t""yes" 1>&6
5224     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5225     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5226   cat >> confdefs.h <<EOF
5227 #define $ac_tr_lib 1
5228 EOF
5229
5230   LIBS="-lsocket $LIBS"
5231
5232 else
5233   echo "$ac_t""no" 1>&6
5234 fi
5235  ;;
5236     esac
5237     case "$LIBS" in
5238     *-linet*) ;;
5239     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5240 echo "configure:5241: checking for connect in -linet" >&5
5241 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5242 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5243   echo $ac_n "(cached) $ac_c" 1>&6
5244 else
5245   ac_save_LIBS="$LIBS"
5246 LIBS="-linet  $LIBS"
5247 cat > conftest.$ac_ext <<EOF
5248 #line 5249 "configure"
5249 #include "confdefs.h"
5250 /* Override any gcc2 internal prototype to avoid an error.  */
5251 /* We use char because int might match the return type of a gcc2
5252     builtin and then its argument prototype would still apply.  */
5253 char connect();
5254
5255 int main() {
5256 connect()
5257 ; return 0; }
5258 EOF
5259 if { (eval echo configure:5260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5260   rm -rf conftest*
5261   eval "ac_cv_lib_$ac_lib_var=yes"
5262 else
5263   echo "configure: failed program was:" >&5
5264   cat conftest.$ac_ext >&5
5265   rm -rf conftest*
5266   eval "ac_cv_lib_$ac_lib_var=no"
5267 fi
5268 rm -f conftest*
5269 LIBS="$ac_save_LIBS"
5270
5271 fi
5272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5273   echo "$ac_t""yes" 1>&6
5274     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5275     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5276   cat >> confdefs.h <<EOF
5277 #define $ac_tr_lib 1
5278 EOF
5279
5280   LIBS="-linet $LIBS"
5281
5282 else
5283   echo "$ac_t""no" 1>&6
5284 fi
5285  ;;
5286     esac
5287             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5288        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5289         # ac_cv_func_connect=yes
5290         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5291         cat >> confdefs.h <<\EOF
5292 #define HAVE_CONNECT 1
5293 EOF
5294
5295     fi
5296 fi
5297
5298 ###############################################
5299 # test for where we get get_yp_default_domain() from
5300 for ac_func in yp_get_default_domain
5301 do
5302 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5303 echo "configure:5304: checking for $ac_func" >&5
5304 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5305   echo $ac_n "(cached) $ac_c" 1>&6
5306 else
5307   cat > conftest.$ac_ext <<EOF
5308 #line 5309 "configure"
5309 #include "confdefs.h"
5310 /* System header to define __stub macros and hopefully few prototypes,
5311     which can conflict with char $ac_func(); below.  */
5312 #include <assert.h>
5313 /* Override any gcc2 internal prototype to avoid an error.  */
5314 /* We use char because int might match the return type of a gcc2
5315     builtin and then its argument prototype would still apply.  */
5316 char $ac_func();
5317
5318 int main() {
5319
5320 /* The GNU C library defines this for functions which it implements
5321     to always fail with ENOSYS.  Some functions are actually named
5322     something starting with __ and the normal name is an alias.  */
5323 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5324 choke me
5325 #else
5326 $ac_func();
5327 #endif
5328
5329 ; return 0; }
5330 EOF
5331 if { (eval echo configure:5332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5332   rm -rf conftest*
5333   eval "ac_cv_func_$ac_func=yes"
5334 else
5335   echo "configure: failed program was:" >&5
5336   cat conftest.$ac_ext >&5
5337   rm -rf conftest*
5338   eval "ac_cv_func_$ac_func=no"
5339 fi
5340 rm -f conftest*
5341 fi
5342
5343 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5344   echo "$ac_t""yes" 1>&6
5345     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5346   cat >> confdefs.h <<EOF
5347 #define $ac_tr_func 1
5348 EOF
5349  
5350 else
5351   echo "$ac_t""no" 1>&6
5352 fi
5353 done
5354
5355 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5356         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5357 echo "configure:5358: checking for yp_get_default_domain in -lnsl" >&5
5358 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5359 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5360   echo $ac_n "(cached) $ac_c" 1>&6
5361 else
5362   ac_save_LIBS="$LIBS"
5363 LIBS="-lnsl  $LIBS"
5364 cat > conftest.$ac_ext <<EOF
5365 #line 5366 "configure"
5366 #include "confdefs.h"
5367 /* Override any gcc2 internal prototype to avoid an error.  */
5368 /* We use char because int might match the return type of a gcc2
5369     builtin and then its argument prototype would still apply.  */
5370 char yp_get_default_domain();
5371
5372 int main() {
5373 yp_get_default_domain()
5374 ; return 0; }
5375 EOF
5376 if { (eval echo configure:5377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5377   rm -rf conftest*
5378   eval "ac_cv_lib_$ac_lib_var=yes"
5379 else
5380   echo "configure: failed program was:" >&5
5381   cat conftest.$ac_ext >&5
5382   rm -rf conftest*
5383   eval "ac_cv_lib_$ac_lib_var=no"
5384 fi
5385 rm -f conftest*
5386 LIBS="$ac_save_LIBS"
5387
5388 fi
5389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5390   echo "$ac_t""yes" 1>&6
5391   LIBS="$LIBS -lnsl";
5392         cat >> confdefs.h <<\EOF
5393 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5394 EOF
5395
5396 else
5397   echo "$ac_t""no" 1>&6
5398 fi
5399  
5400 fi
5401
5402 # Check if we have execl, if not we need to compile smbrun.
5403 for ac_func in execl
5404 do
5405 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5406 echo "configure:5407: checking for $ac_func" >&5
5407 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5408   echo $ac_n "(cached) $ac_c" 1>&6
5409 else
5410   cat > conftest.$ac_ext <<EOF
5411 #line 5412 "configure"
5412 #include "confdefs.h"
5413 /* System header to define __stub macros and hopefully few prototypes,
5414     which can conflict with char $ac_func(); below.  */
5415 #include <assert.h>
5416 /* Override any gcc2 internal prototype to avoid an error.  */
5417 /* We use char because int might match the return type of a gcc2
5418     builtin and then its argument prototype would still apply.  */
5419 char $ac_func();
5420
5421 int main() {
5422
5423 /* The GNU C library defines this for functions which it implements
5424     to always fail with ENOSYS.  Some functions are actually named
5425     something starting with __ and the normal name is an alias.  */
5426 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5427 choke me
5428 #else
5429 $ac_func();
5430 #endif
5431
5432 ; return 0; }
5433 EOF
5434 if { (eval echo configure:5435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5435   rm -rf conftest*
5436   eval "ac_cv_func_$ac_func=yes"
5437 else
5438   echo "configure: failed program was:" >&5
5439   cat conftest.$ac_ext >&5
5440   rm -rf conftest*
5441   eval "ac_cv_func_$ac_func=no"
5442 fi
5443 rm -f conftest*
5444 fi
5445
5446 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5447   echo "$ac_t""yes" 1>&6
5448     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5449   cat >> confdefs.h <<EOF
5450 #define $ac_tr_func 1
5451 EOF
5452  
5453 else
5454   echo "$ac_t""no" 1>&6
5455 fi
5456 done
5457
5458 if test x"$ac_cv_func_execl" = x"no"; then
5459     RUNPROG="bin/smbrun"
5460 else
5461     RUNPROG=""
5462 fi
5463
5464 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5465 do
5466 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5467 echo "configure:5468: checking for $ac_func" >&5
5468 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5469   echo $ac_n "(cached) $ac_c" 1>&6
5470 else
5471   cat > conftest.$ac_ext <<EOF
5472 #line 5473 "configure"
5473 #include "confdefs.h"
5474 /* System header to define __stub macros and hopefully few prototypes,
5475     which can conflict with char $ac_func(); below.  */
5476 #include <assert.h>
5477 /* Override any gcc2 internal prototype to avoid an error.  */
5478 /* We use char because int might match the return type of a gcc2
5479     builtin and then its argument prototype would still apply.  */
5480 char $ac_func();
5481
5482 int main() {
5483
5484 /* The GNU C library defines this for functions which it implements
5485     to always fail with ENOSYS.  Some functions are actually named
5486     something starting with __ and the normal name is an alias.  */
5487 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5488 choke me
5489 #else
5490 $ac_func();
5491 #endif
5492
5493 ; return 0; }
5494 EOF
5495 if { (eval echo configure:5496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5496   rm -rf conftest*
5497   eval "ac_cv_func_$ac_func=yes"
5498 else
5499   echo "configure: failed program was:" >&5
5500   cat conftest.$ac_ext >&5
5501   rm -rf conftest*
5502   eval "ac_cv_func_$ac_func=no"
5503 fi
5504 rm -f conftest*
5505 fi
5506
5507 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5508   echo "$ac_t""yes" 1>&6
5509     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5510   cat >> confdefs.h <<EOF
5511 #define $ac_tr_func 1
5512 EOF
5513  
5514 else
5515   echo "$ac_t""no" 1>&6
5516 fi
5517 done
5518
5519 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5520 do
5521 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5522 echo "configure:5523: checking for $ac_func" >&5
5523 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5524   echo $ac_n "(cached) $ac_c" 1>&6
5525 else
5526   cat > conftest.$ac_ext <<EOF
5527 #line 5528 "configure"
5528 #include "confdefs.h"
5529 /* System header to define __stub macros and hopefully few prototypes,
5530     which can conflict with char $ac_func(); below.  */
5531 #include <assert.h>
5532 /* Override any gcc2 internal prototype to avoid an error.  */
5533 /* We use char because int might match the return type of a gcc2
5534     builtin and then its argument prototype would still apply.  */
5535 char $ac_func();
5536
5537 int main() {
5538
5539 /* The GNU C library defines this for functions which it implements
5540     to always fail with ENOSYS.  Some functions are actually named
5541     something starting with __ and the normal name is an alias.  */
5542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5543 choke me
5544 #else
5545 $ac_func();
5546 #endif
5547
5548 ; return 0; }
5549 EOF
5550 if { (eval echo configure:5551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5551   rm -rf conftest*
5552   eval "ac_cv_func_$ac_func=yes"
5553 else
5554   echo "configure: failed program was:" >&5
5555   cat conftest.$ac_ext >&5
5556   rm -rf conftest*
5557   eval "ac_cv_func_$ac_func=no"
5558 fi
5559 rm -f conftest*
5560 fi
5561
5562 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5563   echo "$ac_t""yes" 1>&6
5564     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5565   cat >> confdefs.h <<EOF
5566 #define $ac_tr_func 1
5567 EOF
5568  
5569 else
5570   echo "$ac_t""no" 1>&6
5571 fi
5572 done
5573
5574 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5575 do
5576 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5577 echo "configure:5578: checking for $ac_func" >&5
5578 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5579   echo $ac_n "(cached) $ac_c" 1>&6
5580 else
5581   cat > conftest.$ac_ext <<EOF
5582 #line 5583 "configure"
5583 #include "confdefs.h"
5584 /* System header to define __stub macros and hopefully few prototypes,
5585     which can conflict with char $ac_func(); below.  */
5586 #include <assert.h>
5587 /* Override any gcc2 internal prototype to avoid an error.  */
5588 /* We use char because int might match the return type of a gcc2
5589     builtin and then its argument prototype would still apply.  */
5590 char $ac_func();
5591
5592 int main() {
5593
5594 /* The GNU C library defines this for functions which it implements
5595     to always fail with ENOSYS.  Some functions are actually named
5596     something starting with __ and the normal name is an alias.  */
5597 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5598 choke me
5599 #else
5600 $ac_func();
5601 #endif
5602
5603 ; return 0; }
5604 EOF
5605 if { (eval echo configure:5606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5606   rm -rf conftest*
5607   eval "ac_cv_func_$ac_func=yes"
5608 else
5609   echo "configure: failed program was:" >&5
5610   cat conftest.$ac_ext >&5
5611   rm -rf conftest*
5612   eval "ac_cv_func_$ac_func=no"
5613 fi
5614 rm -f conftest*
5615 fi
5616
5617 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5618   echo "$ac_t""yes" 1>&6
5619     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5620   cat >> confdefs.h <<EOF
5621 #define $ac_tr_func 1
5622 EOF
5623  
5624 else
5625   echo "$ac_t""no" 1>&6
5626 fi
5627 done
5628
5629 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5630 do
5631 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5632 echo "configure:5633: checking for $ac_func" >&5
5633 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5634   echo $ac_n "(cached) $ac_c" 1>&6
5635 else
5636   cat > conftest.$ac_ext <<EOF
5637 #line 5638 "configure"
5638 #include "confdefs.h"
5639 /* System header to define __stub macros and hopefully few prototypes,
5640     which can conflict with char $ac_func(); below.  */
5641 #include <assert.h>
5642 /* Override any gcc2 internal prototype to avoid an error.  */
5643 /* We use char because int might match the return type of a gcc2
5644     builtin and then its argument prototype would still apply.  */
5645 char $ac_func();
5646
5647 int main() {
5648
5649 /* The GNU C library defines this for functions which it implements
5650     to always fail with ENOSYS.  Some functions are actually named
5651     something starting with __ and the normal name is an alias.  */
5652 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5653 choke me
5654 #else
5655 $ac_func();
5656 #endif
5657
5658 ; return 0; }
5659 EOF
5660 if { (eval echo configure:5661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5661   rm -rf conftest*
5662   eval "ac_cv_func_$ac_func=yes"
5663 else
5664   echo "configure: failed program was:" >&5
5665   cat conftest.$ac_ext >&5
5666   rm -rf conftest*
5667   eval "ac_cv_func_$ac_func=no"
5668 fi
5669 rm -f conftest*
5670 fi
5671
5672 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5673   echo "$ac_t""yes" 1>&6
5674     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5675   cat >> confdefs.h <<EOF
5676 #define $ac_tr_func 1
5677 EOF
5678  
5679 else
5680   echo "$ac_t""no" 1>&6
5681 fi
5682 done
5683
5684 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5685 do
5686 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5687 echo "configure:5688: checking for $ac_func" >&5
5688 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5689   echo $ac_n "(cached) $ac_c" 1>&6
5690 else
5691   cat > conftest.$ac_ext <<EOF
5692 #line 5693 "configure"
5693 #include "confdefs.h"
5694 /* System header to define __stub macros and hopefully few prototypes,
5695     which can conflict with char $ac_func(); below.  */
5696 #include <assert.h>
5697 /* Override any gcc2 internal prototype to avoid an error.  */
5698 /* We use char because int might match the return type of a gcc2
5699     builtin and then its argument prototype would still apply.  */
5700 char $ac_func();
5701
5702 int main() {
5703
5704 /* The GNU C library defines this for functions which it implements
5705     to always fail with ENOSYS.  Some functions are actually named
5706     something starting with __ and the normal name is an alias.  */
5707 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5708 choke me
5709 #else
5710 $ac_func();
5711 #endif
5712
5713 ; return 0; }
5714 EOF
5715 if { (eval echo configure:5716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5716   rm -rf conftest*
5717   eval "ac_cv_func_$ac_func=yes"
5718 else
5719   echo "configure: failed program was:" >&5
5720   cat conftest.$ac_ext >&5
5721   rm -rf conftest*
5722   eval "ac_cv_func_$ac_func=no"
5723 fi
5724 rm -f conftest*
5725 fi
5726
5727 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5728   echo "$ac_t""yes" 1>&6
5729     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5730   cat >> confdefs.h <<EOF
5731 #define $ac_tr_func 1
5732 EOF
5733  
5734 else
5735   echo "$ac_t""no" 1>&6
5736 fi
5737 done
5738
5739 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5740 do
5741 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5742 echo "configure:5743: checking for $ac_func" >&5
5743 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5744   echo $ac_n "(cached) $ac_c" 1>&6
5745 else
5746   cat > conftest.$ac_ext <<EOF
5747 #line 5748 "configure"
5748 #include "confdefs.h"
5749 /* System header to define __stub macros and hopefully few prototypes,
5750     which can conflict with char $ac_func(); below.  */
5751 #include <assert.h>
5752 /* Override any gcc2 internal prototype to avoid an error.  */
5753 /* We use char because int might match the return type of a gcc2
5754     builtin and then its argument prototype would still apply.  */
5755 char $ac_func();
5756
5757 int main() {
5758
5759 /* The GNU C library defines this for functions which it implements
5760     to always fail with ENOSYS.  Some functions are actually named
5761     something starting with __ and the normal name is an alias.  */
5762 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5763 choke me
5764 #else
5765 $ac_func();
5766 #endif
5767
5768 ; return 0; }
5769 EOF
5770 if { (eval echo configure:5771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5771   rm -rf conftest*
5772   eval "ac_cv_func_$ac_func=yes"
5773 else
5774   echo "configure: failed program was:" >&5
5775   cat conftest.$ac_ext >&5
5776   rm -rf conftest*
5777   eval "ac_cv_func_$ac_func=no"
5778 fi
5779 rm -f conftest*
5780 fi
5781
5782 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5783   echo "$ac_t""yes" 1>&6
5784     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5785   cat >> confdefs.h <<EOF
5786 #define $ac_tr_func 1
5787 EOF
5788  
5789 else
5790   echo "$ac_t""no" 1>&6
5791 fi
5792 done
5793
5794 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5795 do
5796 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5797 echo "configure:5798: checking for $ac_func" >&5
5798 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5799   echo $ac_n "(cached) $ac_c" 1>&6
5800 else
5801   cat > conftest.$ac_ext <<EOF
5802 #line 5803 "configure"
5803 #include "confdefs.h"
5804 /* System header to define __stub macros and hopefully few prototypes,
5805     which can conflict with char $ac_func(); below.  */
5806 #include <assert.h>
5807 /* Override any gcc2 internal prototype to avoid an error.  */
5808 /* We use char because int might match the return type of a gcc2
5809     builtin and then its argument prototype would still apply.  */
5810 char $ac_func();
5811
5812 int main() {
5813
5814 /* The GNU C library defines this for functions which it implements
5815     to always fail with ENOSYS.  Some functions are actually named
5816     something starting with __ and the normal name is an alias.  */
5817 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5818 choke me
5819 #else
5820 $ac_func();
5821 #endif
5822
5823 ; return 0; }
5824 EOF
5825 if { (eval echo configure:5826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5826   rm -rf conftest*
5827   eval "ac_cv_func_$ac_func=yes"
5828 else
5829   echo "configure: failed program was:" >&5
5830   cat conftest.$ac_ext >&5
5831   rm -rf conftest*
5832   eval "ac_cv_func_$ac_func=no"
5833 fi
5834 rm -f conftest*
5835 fi
5836
5837 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5838   echo "$ac_t""yes" 1>&6
5839     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5840   cat >> confdefs.h <<EOF
5841 #define $ac_tr_func 1
5842 EOF
5843  
5844 else
5845   echo "$ac_t""no" 1>&6
5846 fi
5847 done
5848
5849 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5850 do
5851 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5852 echo "configure:5853: checking for $ac_func" >&5
5853 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5854   echo $ac_n "(cached) $ac_c" 1>&6
5855 else
5856   cat > conftest.$ac_ext <<EOF
5857 #line 5858 "configure"
5858 #include "confdefs.h"
5859 /* System header to define __stub macros and hopefully few prototypes,
5860     which can conflict with char $ac_func(); below.  */
5861 #include <assert.h>
5862 /* Override any gcc2 internal prototype to avoid an error.  */
5863 /* We use char because int might match the return type of a gcc2
5864     builtin and then its argument prototype would still apply.  */
5865 char $ac_func();
5866
5867 int main() {
5868
5869 /* The GNU C library defines this for functions which it implements
5870     to always fail with ENOSYS.  Some functions are actually named
5871     something starting with __ and the normal name is an alias.  */
5872 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5873 choke me
5874 #else
5875 $ac_func();
5876 #endif
5877
5878 ; return 0; }
5879 EOF
5880 if { (eval echo configure:5881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5881   rm -rf conftest*
5882   eval "ac_cv_func_$ac_func=yes"
5883 else
5884   echo "configure: failed program was:" >&5
5885   cat conftest.$ac_ext >&5
5886   rm -rf conftest*
5887   eval "ac_cv_func_$ac_func=no"
5888 fi
5889 rm -f conftest*
5890 fi
5891
5892 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5893   echo "$ac_t""yes" 1>&6
5894     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5895   cat >> confdefs.h <<EOF
5896 #define $ac_tr_func 1
5897 EOF
5898  
5899 else
5900   echo "$ac_t""no" 1>&6
5901 fi
5902 done
5903
5904 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5905 do
5906 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5907 echo "configure:5908: checking for $ac_func" >&5
5908 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5909   echo $ac_n "(cached) $ac_c" 1>&6
5910 else
5911   cat > conftest.$ac_ext <<EOF
5912 #line 5913 "configure"
5913 #include "confdefs.h"
5914 /* System header to define __stub macros and hopefully few prototypes,
5915     which can conflict with char $ac_func(); below.  */
5916 #include <assert.h>
5917 /* Override any gcc2 internal prototype to avoid an error.  */
5918 /* We use char because int might match the return type of a gcc2
5919     builtin and then its argument prototype would still apply.  */
5920 char $ac_func();
5921
5922 int main() {
5923
5924 /* The GNU C library defines this for functions which it implements
5925     to always fail with ENOSYS.  Some functions are actually named
5926     something starting with __ and the normal name is an alias.  */
5927 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5928 choke me
5929 #else
5930 $ac_func();
5931 #endif
5932
5933 ; return 0; }
5934 EOF
5935 if { (eval echo configure:5936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5936   rm -rf conftest*
5937   eval "ac_cv_func_$ac_func=yes"
5938 else
5939   echo "configure: failed program was:" >&5
5940   cat conftest.$ac_ext >&5
5941   rm -rf conftest*
5942   eval "ac_cv_func_$ac_func=no"
5943 fi
5944 rm -f conftest*
5945 fi
5946
5947 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5948   echo "$ac_t""yes" 1>&6
5949     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5950   cat >> confdefs.h <<EOF
5951 #define $ac_tr_func 1
5952 EOF
5953  
5954 else
5955   echo "$ac_t""no" 1>&6
5956 fi
5957 done
5958
5959 for ac_func in syslog vsyslog
5960 do
5961 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5962 echo "configure:5963: checking for $ac_func" >&5
5963 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5964   echo $ac_n "(cached) $ac_c" 1>&6
5965 else
5966   cat > conftest.$ac_ext <<EOF
5967 #line 5968 "configure"
5968 #include "confdefs.h"
5969 /* System header to define __stub macros and hopefully few prototypes,
5970     which can conflict with char $ac_func(); below.  */
5971 #include <assert.h>
5972 /* Override any gcc2 internal prototype to avoid an error.  */
5973 /* We use char because int might match the return type of a gcc2
5974     builtin and then its argument prototype would still apply.  */
5975 char $ac_func();
5976
5977 int main() {
5978
5979 /* The GNU C library defines this for functions which it implements
5980     to always fail with ENOSYS.  Some functions are actually named
5981     something starting with __ and the normal name is an alias.  */
5982 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5983 choke me
5984 #else
5985 $ac_func();
5986 #endif
5987
5988 ; return 0; }
5989 EOF
5990 if { (eval echo configure:5991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5991   rm -rf conftest*
5992   eval "ac_cv_func_$ac_func=yes"
5993 else
5994   echo "configure: failed program was:" >&5
5995   cat conftest.$ac_ext >&5
5996   rm -rf conftest*
5997   eval "ac_cv_func_$ac_func=no"
5998 fi
5999 rm -f conftest*
6000 fi
6001
6002 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6003   echo "$ac_t""yes" 1>&6
6004     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6005   cat >> confdefs.h <<EOF
6006 #define $ac_tr_func 1
6007 EOF
6008  
6009 else
6010   echo "$ac_t""no" 1>&6
6011 fi
6012 done
6013
6014 # setbuffer is needed for smbtorture
6015 for ac_func in setbuffer
6016 do
6017 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6018 echo "configure:6019: checking for $ac_func" >&5
6019 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6020   echo $ac_n "(cached) $ac_c" 1>&6
6021 else
6022   cat > conftest.$ac_ext <<EOF
6023 #line 6024 "configure"
6024 #include "confdefs.h"
6025 /* System header to define __stub macros and hopefully few prototypes,
6026     which can conflict with char $ac_func(); below.  */
6027 #include <assert.h>
6028 /* Override any gcc2 internal prototype to avoid an error.  */
6029 /* We use char because int might match the return type of a gcc2
6030     builtin and then its argument prototype would still apply.  */
6031 char $ac_func();
6032
6033 int main() {
6034
6035 /* The GNU C library defines this for functions which it implements
6036     to always fail with ENOSYS.  Some functions are actually named
6037     something starting with __ and the normal name is an alias.  */
6038 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6039 choke me
6040 #else
6041 $ac_func();
6042 #endif
6043
6044 ; return 0; }
6045 EOF
6046 if { (eval echo configure:6047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6047   rm -rf conftest*
6048   eval "ac_cv_func_$ac_func=yes"
6049 else
6050   echo "configure: failed program was:" >&5
6051   cat conftest.$ac_ext >&5
6052   rm -rf conftest*
6053   eval "ac_cv_func_$ac_func=no"
6054 fi
6055 rm -f conftest*
6056 fi
6057
6058 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6059   echo "$ac_t""yes" 1>&6
6060     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6061   cat >> confdefs.h <<EOF
6062 #define $ac_tr_func 1
6063 EOF
6064  
6065 else
6066   echo "$ac_t""no" 1>&6
6067 fi
6068 done
6069
6070
6071 # syscall() is needed for smbwrapper.
6072 for ac_func in syscall
6073 do
6074 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6075 echo "configure:6076: checking for $ac_func" >&5
6076 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6077   echo $ac_n "(cached) $ac_c" 1>&6
6078 else
6079   cat > conftest.$ac_ext <<EOF
6080 #line 6081 "configure"
6081 #include "confdefs.h"
6082 /* System header to define __stub macros and hopefully few prototypes,
6083     which can conflict with char $ac_func(); below.  */
6084 #include <assert.h>
6085 /* Override any gcc2 internal prototype to avoid an error.  */
6086 /* We use char because int might match the return type of a gcc2
6087     builtin and then its argument prototype would still apply.  */
6088 char $ac_func();
6089
6090 int main() {
6091
6092 /* The GNU C library defines this for functions which it implements
6093     to always fail with ENOSYS.  Some functions are actually named
6094     something starting with __ and the normal name is an alias.  */
6095 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6096 choke me
6097 #else
6098 $ac_func();
6099 #endif
6100
6101 ; return 0; }
6102 EOF
6103 if { (eval echo configure:6104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6104   rm -rf conftest*
6105   eval "ac_cv_func_$ac_func=yes"
6106 else
6107   echo "configure: failed program was:" >&5
6108   cat conftest.$ac_ext >&5
6109   rm -rf conftest*
6110   eval "ac_cv_func_$ac_func=no"
6111 fi
6112 rm -f conftest*
6113 fi
6114
6115 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6116   echo "$ac_t""yes" 1>&6
6117     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6118   cat >> confdefs.h <<EOF
6119 #define $ac_tr_func 1
6120 EOF
6121  
6122 else
6123   echo "$ac_t""no" 1>&6
6124 fi
6125 done
6126
6127
6128 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6129 do
6130 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6131 echo "configure:6132: checking for $ac_func" >&5
6132 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6133   echo $ac_n "(cached) $ac_c" 1>&6
6134 else
6135   cat > conftest.$ac_ext <<EOF
6136 #line 6137 "configure"
6137 #include "confdefs.h"
6138 /* System header to define __stub macros and hopefully few prototypes,
6139     which can conflict with char $ac_func(); below.  */
6140 #include <assert.h>
6141 /* Override any gcc2 internal prototype to avoid an error.  */
6142 /* We use char because int might match the return type of a gcc2
6143     builtin and then its argument prototype would still apply.  */
6144 char $ac_func();
6145
6146 int main() {
6147
6148 /* The GNU C library defines this for functions which it implements
6149     to always fail with ENOSYS.  Some functions are actually named
6150     something starting with __ and the normal name is an alias.  */
6151 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6152 choke me
6153 #else
6154 $ac_func();
6155 #endif
6156
6157 ; return 0; }
6158 EOF
6159 if { (eval echo configure:6160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6160   rm -rf conftest*
6161   eval "ac_cv_func_$ac_func=yes"
6162 else
6163   echo "configure: failed program was:" >&5
6164   cat conftest.$ac_ext >&5
6165   rm -rf conftest*
6166   eval "ac_cv_func_$ac_func=no"
6167 fi
6168 rm -f conftest*
6169 fi
6170
6171 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6172   echo "$ac_t""yes" 1>&6
6173     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6174   cat >> confdefs.h <<EOF
6175 #define $ac_tr_func 1
6176 EOF
6177  
6178 else
6179   echo "$ac_t""no" 1>&6
6180 fi
6181 done
6182
6183 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6184 do
6185 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6186 echo "configure:6187: checking for $ac_func" >&5
6187 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6188   echo $ac_n "(cached) $ac_c" 1>&6
6189 else
6190   cat > conftest.$ac_ext <<EOF
6191 #line 6192 "configure"
6192 #include "confdefs.h"
6193 /* System header to define __stub macros and hopefully few prototypes,
6194     which can conflict with char $ac_func(); below.  */
6195 #include <assert.h>
6196 /* Override any gcc2 internal prototype to avoid an error.  */
6197 /* We use char because int might match the return type of a gcc2
6198     builtin and then its argument prototype would still apply.  */
6199 char $ac_func();
6200
6201 int main() {
6202
6203 /* The GNU C library defines this for functions which it implements
6204     to always fail with ENOSYS.  Some functions are actually named
6205     something starting with __ and the normal name is an alias.  */
6206 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6207 choke me
6208 #else
6209 $ac_func();
6210 #endif
6211
6212 ; return 0; }
6213 EOF
6214 if { (eval echo configure:6215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6215   rm -rf conftest*
6216   eval "ac_cv_func_$ac_func=yes"
6217 else
6218   echo "configure: failed program was:" >&5
6219   cat conftest.$ac_ext >&5
6220   rm -rf conftest*
6221   eval "ac_cv_func_$ac_func=no"
6222 fi
6223 rm -f conftest*
6224 fi
6225
6226 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6227   echo "$ac_t""yes" 1>&6
6228     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6229   cat >> confdefs.h <<EOF
6230 #define $ac_tr_func 1
6231 EOF
6232  
6233 else
6234   echo "$ac_t""no" 1>&6
6235 fi
6236 done
6237
6238 for ac_func in __getcwd _getcwd
6239 do
6240 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6241 echo "configure:6242: checking for $ac_func" >&5
6242 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6243   echo $ac_n "(cached) $ac_c" 1>&6
6244 else
6245   cat > conftest.$ac_ext <<EOF
6246 #line 6247 "configure"
6247 #include "confdefs.h"
6248 /* System header to define __stub macros and hopefully few prototypes,
6249     which can conflict with char $ac_func(); below.  */
6250 #include <assert.h>
6251 /* Override any gcc2 internal prototype to avoid an error.  */
6252 /* We use char because int might match the return type of a gcc2
6253     builtin and then its argument prototype would still apply.  */
6254 char $ac_func();
6255
6256 int main() {
6257
6258 /* The GNU C library defines this for functions which it implements
6259     to always fail with ENOSYS.  Some functions are actually named
6260     something starting with __ and the normal name is an alias.  */
6261 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6262 choke me
6263 #else
6264 $ac_func();
6265 #endif
6266
6267 ; return 0; }
6268 EOF
6269 if { (eval echo configure:6270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6270   rm -rf conftest*
6271   eval "ac_cv_func_$ac_func=yes"
6272 else
6273   echo "configure: failed program was:" >&5
6274   cat conftest.$ac_ext >&5
6275   rm -rf conftest*
6276   eval "ac_cv_func_$ac_func=no"
6277 fi
6278 rm -f conftest*
6279 fi
6280
6281 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6282   echo "$ac_t""yes" 1>&6
6283     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6284   cat >> confdefs.h <<EOF
6285 #define $ac_tr_func 1
6286 EOF
6287  
6288 else
6289   echo "$ac_t""no" 1>&6
6290 fi
6291 done
6292
6293 for ac_func in __xstat __fxstat __lxstat
6294 do
6295 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6296 echo "configure:6297: checking for $ac_func" >&5
6297 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6298   echo $ac_n "(cached) $ac_c" 1>&6
6299 else
6300   cat > conftest.$ac_ext <<EOF
6301 #line 6302 "configure"
6302 #include "confdefs.h"
6303 /* System header to define __stub macros and hopefully few prototypes,
6304     which can conflict with char $ac_func(); below.  */
6305 #include <assert.h>
6306 /* Override any gcc2 internal prototype to avoid an error.  */
6307 /* We use char because int might match the return type of a gcc2
6308     builtin and then its argument prototype would still apply.  */
6309 char $ac_func();
6310
6311 int main() {
6312
6313 /* The GNU C library defines this for functions which it implements
6314     to always fail with ENOSYS.  Some functions are actually named
6315     something starting with __ and the normal name is an alias.  */
6316 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6317 choke me
6318 #else
6319 $ac_func();
6320 #endif
6321
6322 ; return 0; }
6323 EOF
6324 if { (eval echo configure:6325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6325   rm -rf conftest*
6326   eval "ac_cv_func_$ac_func=yes"
6327 else
6328   echo "configure: failed program was:" >&5
6329   cat conftest.$ac_ext >&5
6330   rm -rf conftest*
6331   eval "ac_cv_func_$ac_func=no"
6332 fi
6333 rm -f conftest*
6334 fi
6335
6336 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6337   echo "$ac_t""yes" 1>&6
6338     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6339   cat >> confdefs.h <<EOF
6340 #define $ac_tr_func 1
6341 EOF
6342  
6343 else
6344   echo "$ac_t""no" 1>&6
6345 fi
6346 done
6347
6348 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6349 do
6350 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6351 echo "configure:6352: checking for $ac_func" >&5
6352 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6353   echo $ac_n "(cached) $ac_c" 1>&6
6354 else
6355   cat > conftest.$ac_ext <<EOF
6356 #line 6357 "configure"
6357 #include "confdefs.h"
6358 /* System header to define __stub macros and hopefully few prototypes,
6359     which can conflict with char $ac_func(); below.  */
6360 #include <assert.h>
6361 /* Override any gcc2 internal prototype to avoid an error.  */
6362 /* We use char because int might match the return type of a gcc2
6363     builtin and then its argument prototype would still apply.  */
6364 char $ac_func();
6365
6366 int main() {
6367
6368 /* The GNU C library defines this for functions which it implements
6369     to always fail with ENOSYS.  Some functions are actually named
6370     something starting with __ and the normal name is an alias.  */
6371 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6372 choke me
6373 #else
6374 $ac_func();
6375 #endif
6376
6377 ; return 0; }
6378 EOF
6379 if { (eval echo configure:6380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6380   rm -rf conftest*
6381   eval "ac_cv_func_$ac_func=yes"
6382 else
6383   echo "configure: failed program was:" >&5
6384   cat conftest.$ac_ext >&5
6385   rm -rf conftest*
6386   eval "ac_cv_func_$ac_func=no"
6387 fi
6388 rm -f conftest*
6389 fi
6390
6391 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6392   echo "$ac_t""yes" 1>&6
6393     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6394   cat >> confdefs.h <<EOF
6395 #define $ac_tr_func 1
6396 EOF
6397  
6398 else
6399   echo "$ac_t""no" 1>&6
6400 fi
6401 done
6402
6403 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6404 do
6405 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6406 echo "configure:6407: checking for $ac_func" >&5
6407 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6408   echo $ac_n "(cached) $ac_c" 1>&6
6409 else
6410   cat > conftest.$ac_ext <<EOF
6411 #line 6412 "configure"
6412 #include "confdefs.h"
6413 /* System header to define __stub macros and hopefully few prototypes,
6414     which can conflict with char $ac_func(); below.  */
6415 #include <assert.h>
6416 /* Override any gcc2 internal prototype to avoid an error.  */
6417 /* We use char because int might match the return type of a gcc2
6418     builtin and then its argument prototype would still apply.  */
6419 char $ac_func();
6420
6421 int main() {
6422
6423 /* The GNU C library defines this for functions which it implements
6424     to always fail with ENOSYS.  Some functions are actually named
6425     something starting with __ and the normal name is an alias.  */
6426 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6427 choke me
6428 #else
6429 $ac_func();
6430 #endif
6431
6432 ; return 0; }
6433 EOF
6434 if { (eval echo configure:6435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6435   rm -rf conftest*
6436   eval "ac_cv_func_$ac_func=yes"
6437 else
6438   echo "configure: failed program was:" >&5
6439   cat conftest.$ac_ext >&5
6440   rm -rf conftest*
6441   eval "ac_cv_func_$ac_func=no"
6442 fi
6443 rm -f conftest*
6444 fi
6445
6446 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6447   echo "$ac_t""yes" 1>&6
6448     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6449   cat >> confdefs.h <<EOF
6450 #define $ac_tr_func 1
6451 EOF
6452  
6453 else
6454   echo "$ac_t""no" 1>&6
6455 fi
6456 done
6457
6458 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6459 do
6460 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6461 echo "configure:6462: checking for $ac_func" >&5
6462 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6463   echo $ac_n "(cached) $ac_c" 1>&6
6464 else
6465   cat > conftest.$ac_ext <<EOF
6466 #line 6467 "configure"
6467 #include "confdefs.h"
6468 /* System header to define __stub macros and hopefully few prototypes,
6469     which can conflict with char $ac_func(); below.  */
6470 #include <assert.h>
6471 /* Override any gcc2 internal prototype to avoid an error.  */
6472 /* We use char because int might match the return type of a gcc2
6473     builtin and then its argument prototype would still apply.  */
6474 char $ac_func();
6475
6476 int main() {
6477
6478 /* The GNU C library defines this for functions which it implements
6479     to always fail with ENOSYS.  Some functions are actually named
6480     something starting with __ and the normal name is an alias.  */
6481 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6482 choke me
6483 #else
6484 $ac_func();
6485 #endif
6486
6487 ; return 0; }
6488 EOF
6489 if { (eval echo configure:6490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6490   rm -rf conftest*
6491   eval "ac_cv_func_$ac_func=yes"
6492 else
6493   echo "configure: failed program was:" >&5
6494   cat conftest.$ac_ext >&5
6495   rm -rf conftest*
6496   eval "ac_cv_func_$ac_func=no"
6497 fi
6498 rm -f conftest*
6499 fi
6500
6501 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6502   echo "$ac_t""yes" 1>&6
6503     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6504   cat >> confdefs.h <<EOF
6505 #define $ac_tr_func 1
6506 EOF
6507  
6508 else
6509   echo "$ac_t""no" 1>&6
6510 fi
6511 done
6512
6513 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6514 do
6515 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6516 echo "configure:6517: checking for $ac_func" >&5
6517 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6518   echo $ac_n "(cached) $ac_c" 1>&6
6519 else
6520   cat > conftest.$ac_ext <<EOF
6521 #line 6522 "configure"
6522 #include "confdefs.h"
6523 /* System header to define __stub macros and hopefully few prototypes,
6524     which can conflict with char $ac_func(); below.  */
6525 #include <assert.h>
6526 /* Override any gcc2 internal prototype to avoid an error.  */
6527 /* We use char because int might match the return type of a gcc2
6528     builtin and then its argument prototype would still apply.  */
6529 char $ac_func();
6530
6531 int main() {
6532
6533 /* The GNU C library defines this for functions which it implements
6534     to always fail with ENOSYS.  Some functions are actually named
6535     something starting with __ and the normal name is an alias.  */
6536 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6537 choke me
6538 #else
6539 $ac_func();
6540 #endif
6541
6542 ; return 0; }
6543 EOF
6544 if { (eval echo configure:6545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6545   rm -rf conftest*
6546   eval "ac_cv_func_$ac_func=yes"
6547 else
6548   echo "configure: failed program was:" >&5
6549   cat conftest.$ac_ext >&5
6550   rm -rf conftest*
6551   eval "ac_cv_func_$ac_func=no"
6552 fi
6553 rm -f conftest*
6554 fi
6555
6556 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6557   echo "$ac_t""yes" 1>&6
6558     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6559   cat >> confdefs.h <<EOF
6560 #define $ac_tr_func 1
6561 EOF
6562  
6563 else
6564   echo "$ac_t""no" 1>&6
6565 fi
6566 done
6567
6568 for ac_func in _write __write _fork __fork
6569 do
6570 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6571 echo "configure:6572: checking for $ac_func" >&5
6572 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6573   echo $ac_n "(cached) $ac_c" 1>&6
6574 else
6575   cat > conftest.$ac_ext <<EOF
6576 #line 6577 "configure"
6577 #include "confdefs.h"
6578 /* System header to define __stub macros and hopefully few prototypes,
6579     which can conflict with char $ac_func(); below.  */
6580 #include <assert.h>
6581 /* Override any gcc2 internal prototype to avoid an error.  */
6582 /* We use char because int might match the return type of a gcc2
6583     builtin and then its argument prototype would still apply.  */
6584 char $ac_func();
6585
6586 int main() {
6587
6588 /* The GNU C library defines this for functions which it implements
6589     to always fail with ENOSYS.  Some functions are actually named
6590     something starting with __ and the normal name is an alias.  */
6591 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6592 choke me
6593 #else
6594 $ac_func();
6595 #endif
6596
6597 ; return 0; }
6598 EOF
6599 if { (eval echo configure:6600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6600   rm -rf conftest*
6601   eval "ac_cv_func_$ac_func=yes"
6602 else
6603   echo "configure: failed program was:" >&5
6604   cat conftest.$ac_ext >&5
6605   rm -rf conftest*
6606   eval "ac_cv_func_$ac_func=no"
6607 fi
6608 rm -f conftest*
6609 fi
6610
6611 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6612   echo "$ac_t""yes" 1>&6
6613     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6614   cat >> confdefs.h <<EOF
6615 #define $ac_tr_func 1
6616 EOF
6617  
6618 else
6619   echo "$ac_t""no" 1>&6
6620 fi
6621 done
6622
6623 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6624 do
6625 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6626 echo "configure:6627: checking for $ac_func" >&5
6627 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6628   echo $ac_n "(cached) $ac_c" 1>&6
6629 else
6630   cat > conftest.$ac_ext <<EOF
6631 #line 6632 "configure"
6632 #include "confdefs.h"
6633 /* System header to define __stub macros and hopefully few prototypes,
6634     which can conflict with char $ac_func(); below.  */
6635 #include <assert.h>
6636 /* Override any gcc2 internal prototype to avoid an error.  */
6637 /* We use char because int might match the return type of a gcc2
6638     builtin and then its argument prototype would still apply.  */
6639 char $ac_func();
6640
6641 int main() {
6642
6643 /* The GNU C library defines this for functions which it implements
6644     to always fail with ENOSYS.  Some functions are actually named
6645     something starting with __ and the normal name is an alias.  */
6646 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6647 choke me
6648 #else
6649 $ac_func();
6650 #endif
6651
6652 ; return 0; }
6653 EOF
6654 if { (eval echo configure:6655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6655   rm -rf conftest*
6656   eval "ac_cv_func_$ac_func=yes"
6657 else
6658   echo "configure: failed program was:" >&5
6659   cat conftest.$ac_ext >&5
6660   rm -rf conftest*
6661   eval "ac_cv_func_$ac_func=no"
6662 fi
6663 rm -f conftest*
6664 fi
6665
6666 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6667   echo "$ac_t""yes" 1>&6
6668     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6669   cat >> confdefs.h <<EOF
6670 #define $ac_tr_func 1
6671 EOF
6672  
6673 else
6674   echo "$ac_t""no" 1>&6
6675 fi
6676 done
6677
6678 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6679 do
6680 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6681 echo "configure:6682: checking for $ac_func" >&5
6682 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6683   echo $ac_n "(cached) $ac_c" 1>&6
6684 else
6685   cat > conftest.$ac_ext <<EOF
6686 #line 6687 "configure"
6687 #include "confdefs.h"
6688 /* System header to define __stub macros and hopefully few prototypes,
6689     which can conflict with char $ac_func(); below.  */
6690 #include <assert.h>
6691 /* Override any gcc2 internal prototype to avoid an error.  */
6692 /* We use char because int might match the return type of a gcc2
6693     builtin and then its argument prototype would still apply.  */
6694 char $ac_func();
6695
6696 int main() {
6697
6698 /* The GNU C library defines this for functions which it implements
6699     to always fail with ENOSYS.  Some functions are actually named
6700     something starting with __ and the normal name is an alias.  */
6701 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6702 choke me
6703 #else
6704 $ac_func();
6705 #endif
6706
6707 ; return 0; }
6708 EOF
6709 if { (eval echo configure:6710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6710   rm -rf conftest*
6711   eval "ac_cv_func_$ac_func=yes"
6712 else
6713   echo "configure: failed program was:" >&5
6714   cat conftest.$ac_ext >&5
6715   rm -rf conftest*
6716   eval "ac_cv_func_$ac_func=no"
6717 fi
6718 rm -f conftest*
6719 fi
6720
6721 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6722   echo "$ac_t""yes" 1>&6
6723     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6724   cat >> confdefs.h <<EOF
6725 #define $ac_tr_func 1
6726 EOF
6727  
6728 else
6729   echo "$ac_t""no" 1>&6
6730 fi
6731 done
6732
6733 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6734 do
6735 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6736 echo "configure:6737: checking for $ac_func" >&5
6737 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6738   echo $ac_n "(cached) $ac_c" 1>&6
6739 else
6740   cat > conftest.$ac_ext <<EOF
6741 #line 6742 "configure"
6742 #include "confdefs.h"
6743 /* System header to define __stub macros and hopefully few prototypes,
6744     which can conflict with char $ac_func(); below.  */
6745 #include <assert.h>
6746 /* Override any gcc2 internal prototype to avoid an error.  */
6747 /* We use char because int might match the return type of a gcc2
6748     builtin and then its argument prototype would still apply.  */
6749 char $ac_func();
6750
6751 int main() {
6752
6753 /* The GNU C library defines this for functions which it implements
6754     to always fail with ENOSYS.  Some functions are actually named
6755     something starting with __ and the normal name is an alias.  */
6756 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6757 choke me
6758 #else
6759 $ac_func();
6760 #endif
6761
6762 ; return 0; }
6763 EOF
6764 if { (eval echo configure:6765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6765   rm -rf conftest*
6766   eval "ac_cv_func_$ac_func=yes"
6767 else
6768   echo "configure: failed program was:" >&5
6769   cat conftest.$ac_ext >&5
6770   rm -rf conftest*
6771   eval "ac_cv_func_$ac_func=no"
6772 fi
6773 rm -f conftest*
6774 fi
6775
6776 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6777   echo "$ac_t""yes" 1>&6
6778     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6779   cat >> confdefs.h <<EOF
6780 #define $ac_tr_func 1
6781 EOF
6782  
6783 else
6784   echo "$ac_t""no" 1>&6
6785 fi
6786 done
6787
6788 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6789 do
6790 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6791 echo "configure:6792: checking for $ac_func" >&5
6792 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6793   echo $ac_n "(cached) $ac_c" 1>&6
6794 else
6795   cat > conftest.$ac_ext <<EOF
6796 #line 6797 "configure"
6797 #include "confdefs.h"
6798 /* System header to define __stub macros and hopefully few prototypes,
6799     which can conflict with char $ac_func(); below.  */
6800 #include <assert.h>
6801 /* Override any gcc2 internal prototype to avoid an error.  */
6802 /* We use char because int might match the return type of a gcc2
6803     builtin and then its argument prototype would still apply.  */
6804 char $ac_func();
6805
6806 int main() {
6807
6808 /* The GNU C library defines this for functions which it implements
6809     to always fail with ENOSYS.  Some functions are actually named
6810     something starting with __ and the normal name is an alias.  */
6811 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6812 choke me
6813 #else
6814 $ac_func();
6815 #endif
6816
6817 ; return 0; }
6818 EOF
6819 if { (eval echo configure:6820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6820   rm -rf conftest*
6821   eval "ac_cv_func_$ac_func=yes"
6822 else
6823   echo "configure: failed program was:" >&5
6824   cat conftest.$ac_ext >&5
6825   rm -rf conftest*
6826   eval "ac_cv_func_$ac_func=no"
6827 fi
6828 rm -f conftest*
6829 fi
6830
6831 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6832   echo "$ac_t""yes" 1>&6
6833     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6834   cat >> confdefs.h <<EOF
6835 #define $ac_tr_func 1
6836 EOF
6837  
6838 else
6839   echo "$ac_t""no" 1>&6
6840 fi
6841 done
6842
6843 for ac_func in open64 _open64 __open64 creat64
6844 do
6845 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6846 echo "configure:6847: checking for $ac_func" >&5
6847 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6848   echo $ac_n "(cached) $ac_c" 1>&6
6849 else
6850   cat > conftest.$ac_ext <<EOF
6851 #line 6852 "configure"
6852 #include "confdefs.h"
6853 /* System header to define __stub macros and hopefully few prototypes,
6854     which can conflict with char $ac_func(); below.  */
6855 #include <assert.h>
6856 /* Override any gcc2 internal prototype to avoid an error.  */
6857 /* We use char because int might match the return type of a gcc2
6858     builtin and then its argument prototype would still apply.  */
6859 char $ac_func();
6860
6861 int main() {
6862
6863 /* The GNU C library defines this for functions which it implements
6864     to always fail with ENOSYS.  Some functions are actually named
6865     something starting with __ and the normal name is an alias.  */
6866 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6867 choke me
6868 #else
6869 $ac_func();
6870 #endif
6871
6872 ; return 0; }
6873 EOF
6874 if { (eval echo configure:6875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6875   rm -rf conftest*
6876   eval "ac_cv_func_$ac_func=yes"
6877 else
6878   echo "configure: failed program was:" >&5
6879   cat conftest.$ac_ext >&5
6880   rm -rf conftest*
6881   eval "ac_cv_func_$ac_func=no"
6882 fi
6883 rm -f conftest*
6884 fi
6885
6886 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6887   echo "$ac_t""yes" 1>&6
6888     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6889   cat >> confdefs.h <<EOF
6890 #define $ac_tr_func 1
6891 EOF
6892  
6893 else
6894   echo "$ac_t""no" 1>&6
6895 fi
6896 done
6897
6898
6899 #
6900 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6901 #
6902
6903 if test x$ac_cv_func_stat64 = xno ; then
6904   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6905 echo "configure:6906: checking for stat64 in <sys/stat.h>" >&5
6906   cat > conftest.$ac_ext <<EOF
6907 #line 6908 "configure"
6908 #include "confdefs.h"
6909
6910 #if defined(HAVE_UNISTD_H)
6911 #include <unistd.h>
6912 #endif
6913 #include <sys/stat.h>
6914
6915 int main() {
6916 struct stat64 st64; exit(stat64(".",&st64));
6917 ; return 0; }
6918 EOF
6919 if { (eval echo configure:6920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6920   rm -rf conftest*
6921   ac_cv_func_stat64=yes
6922 else
6923   echo "configure: failed program was:" >&5
6924   cat conftest.$ac_ext >&5
6925 fi
6926 rm -f conftest*
6927   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6928   if test x$ac_cv_func_stat64 = xyes ; then
6929     cat >> confdefs.h <<\EOF
6930 #define HAVE_STAT64 1
6931 EOF
6932
6933   fi
6934 fi
6935
6936 if test x$ac_cv_func_lstat64 = xno ; then
6937   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6938 echo "configure:6939: checking for lstat64 in <sys/stat.h>" >&5
6939   cat > conftest.$ac_ext <<EOF
6940 #line 6941 "configure"
6941 #include "confdefs.h"
6942
6943 #if defined(HAVE_UNISTD_H)
6944 #include <unistd.h>
6945 #endif
6946 #include <sys/stat.h>
6947
6948 int main() {
6949 struct stat64 st64; exit(lstat64(".",&st64));
6950 ; return 0; }
6951 EOF
6952 if { (eval echo configure:6953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6953   rm -rf conftest*
6954   ac_cv_func_lstat64=yes
6955 else
6956   echo "configure: failed program was:" >&5
6957   cat conftest.$ac_ext >&5
6958 fi
6959 rm -f conftest*
6960   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6961   if test x$ac_cv_func_lstat64 = xyes ; then
6962     cat >> confdefs.h <<\EOF
6963 #define HAVE_LSTAT64 1
6964 EOF
6965
6966   fi
6967 fi
6968
6969 if test x$ac_cv_func_fstat64 = xno ; then
6970   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6971 echo "configure:6972: checking for fstat64 in <sys/stat.h>" >&5
6972   cat > conftest.$ac_ext <<EOF
6973 #line 6974 "configure"
6974 #include "confdefs.h"
6975
6976 #if defined(HAVE_UNISTD_H)
6977 #include <unistd.h>
6978 #endif
6979 #include <sys/stat.h>
6980
6981 int main() {
6982 struct stat64 st64; exit(fstat64(0,&st64));
6983 ; return 0; }
6984 EOF
6985 if { (eval echo configure:6986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6986   rm -rf conftest*
6987   ac_cv_func_fstat64=yes
6988 else
6989   echo "configure: failed program was:" >&5
6990   cat conftest.$ac_ext >&5
6991 fi
6992 rm -f conftest*
6993   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6994   if test x$ac_cv_func_fstat64 = xyes ; then
6995     cat >> confdefs.h <<\EOF
6996 #define HAVE_FSTAT64 1
6997 EOF
6998
6999   fi
7000 fi
7001
7002 #####################################
7003 # we might need the resolv library on some systems
7004 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
7005 echo "configure:7006: checking for dn_expand in -lresolv" >&5
7006 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
7007 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7008   echo $ac_n "(cached) $ac_c" 1>&6
7009 else
7010   ac_save_LIBS="$LIBS"
7011 LIBS="-lresolv  $LIBS"
7012 cat > conftest.$ac_ext <<EOF
7013 #line 7014 "configure"
7014 #include "confdefs.h"
7015 /* Override any gcc2 internal prototype to avoid an error.  */
7016 /* We use char because int might match the return type of a gcc2
7017     builtin and then its argument prototype would still apply.  */
7018 char dn_expand();
7019
7020 int main() {
7021 dn_expand()
7022 ; return 0; }
7023 EOF
7024 if { (eval echo configure:7025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7025   rm -rf conftest*
7026   eval "ac_cv_lib_$ac_lib_var=yes"
7027 else
7028   echo "configure: failed program was:" >&5
7029   cat conftest.$ac_ext >&5
7030   rm -rf conftest*
7031   eval "ac_cv_lib_$ac_lib_var=no"
7032 fi
7033 rm -f conftest*
7034 LIBS="$ac_save_LIBS"
7035
7036 fi
7037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7038   echo "$ac_t""yes" 1>&6
7039     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7040     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7041   cat >> confdefs.h <<EOF
7042 #define $ac_tr_lib 1
7043 EOF
7044
7045   LIBS="-lresolv $LIBS"
7046
7047 else
7048   echo "$ac_t""no" 1>&6
7049 fi
7050
7051
7052 #
7053 # Check for the functions putprpwnam, set_auth_parameters,
7054 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7055 # Needed for OSF1 and HPUX.
7056 #
7057
7058 case "$LIBS" in
7059   *-lsecurity*) for ac_func in putprpwnam
7060 do
7061 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7062 echo "configure:7063: checking for $ac_func" >&5
7063 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7064   echo $ac_n "(cached) $ac_c" 1>&6
7065 else
7066   cat > conftest.$ac_ext <<EOF
7067 #line 7068 "configure"
7068 #include "confdefs.h"
7069 /* System header to define __stub macros and hopefully few prototypes,
7070     which can conflict with char $ac_func(); below.  */
7071 #include <assert.h>
7072 /* Override any gcc2 internal prototype to avoid an error.  */
7073 /* We use char because int might match the return type of a gcc2
7074     builtin and then its argument prototype would still apply.  */
7075 char $ac_func();
7076
7077 int main() {
7078
7079 /* The GNU C library defines this for functions which it implements
7080     to always fail with ENOSYS.  Some functions are actually named
7081     something starting with __ and the normal name is an alias.  */
7082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7083 choke me
7084 #else
7085 $ac_func();
7086 #endif
7087
7088 ; return 0; }
7089 EOF
7090 if { (eval echo configure:7091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7091   rm -rf conftest*
7092   eval "ac_cv_func_$ac_func=yes"
7093 else
7094   echo "configure: failed program was:" >&5
7095   cat conftest.$ac_ext >&5
7096   rm -rf conftest*
7097   eval "ac_cv_func_$ac_func=no"
7098 fi
7099 rm -f conftest*
7100 fi
7101
7102 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7103   echo "$ac_t""yes" 1>&6
7104     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7105   cat >> confdefs.h <<EOF
7106 #define $ac_tr_func 1
7107 EOF
7108  
7109 else
7110   echo "$ac_t""no" 1>&6
7111 fi
7112 done
7113  ;;
7114   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7115 echo "configure:7116: checking for putprpwnam in -lsecurity" >&5
7116 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7117 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7118   echo $ac_n "(cached) $ac_c" 1>&6
7119 else
7120   ac_save_LIBS="$LIBS"
7121 LIBS="-lsecurity  $LIBS"
7122 cat > conftest.$ac_ext <<EOF
7123 #line 7124 "configure"
7124 #include "confdefs.h"
7125 /* Override any gcc2 internal prototype to avoid an error.  */
7126 /* We use char because int might match the return type of a gcc2
7127     builtin and then its argument prototype would still apply.  */
7128 char putprpwnam();
7129
7130 int main() {
7131 putprpwnam()
7132 ; return 0; }
7133 EOF
7134 if { (eval echo configure:7135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7135   rm -rf conftest*
7136   eval "ac_cv_lib_$ac_lib_var=yes"
7137 else
7138   echo "configure: failed program was:" >&5
7139   cat conftest.$ac_ext >&5
7140   rm -rf conftest*
7141   eval "ac_cv_lib_$ac_lib_var=no"
7142 fi
7143 rm -f conftest*
7144 LIBS="$ac_save_LIBS"
7145
7146 fi
7147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7148   echo "$ac_t""yes" 1>&6
7149     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7150     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7151   cat >> confdefs.h <<EOF
7152 #define $ac_tr_lib 1
7153 EOF
7154
7155   LIBS="-lsecurity $LIBS"
7156
7157 else
7158   echo "$ac_t""no" 1>&6
7159 fi
7160  
7161      for ac_func in putprpwnam
7162 do
7163 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7164 echo "configure:7165: checking for $ac_func" >&5
7165 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7166   echo $ac_n "(cached) $ac_c" 1>&6
7167 else
7168   cat > conftest.$ac_ext <<EOF
7169 #line 7170 "configure"
7170 #include "confdefs.h"
7171 /* System header to define __stub macros and hopefully few prototypes,
7172     which can conflict with char $ac_func(); below.  */
7173 #include <assert.h>
7174 /* Override any gcc2 internal prototype to avoid an error.  */
7175 /* We use char because int might match the return type of a gcc2
7176     builtin and then its argument prototype would still apply.  */
7177 char $ac_func();
7178
7179 int main() {
7180
7181 /* The GNU C library defines this for functions which it implements
7182     to always fail with ENOSYS.  Some functions are actually named
7183     something starting with __ and the normal name is an alias.  */
7184 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7185 choke me
7186 #else
7187 $ac_func();
7188 #endif
7189
7190 ; return 0; }
7191 EOF
7192 if { (eval echo configure:7193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7193   rm -rf conftest*
7194   eval "ac_cv_func_$ac_func=yes"
7195 else
7196   echo "configure: failed program was:" >&5
7197   cat conftest.$ac_ext >&5
7198   rm -rf conftest*
7199   eval "ac_cv_func_$ac_func=no"
7200 fi
7201 rm -f conftest*
7202 fi
7203
7204 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7205   echo "$ac_t""yes" 1>&6
7206     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7207   cat >> confdefs.h <<EOF
7208 #define $ac_tr_func 1
7209 EOF
7210  
7211 else
7212   echo "$ac_t""no" 1>&6
7213 fi
7214 done
7215
7216   ;;
7217   esac
7218
7219 case "$LIBS" in
7220   *-lsec*) for ac_func in putprpwnam
7221 do
7222 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7223 echo "configure:7224: checking for $ac_func" >&5
7224 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7225   echo $ac_n "(cached) $ac_c" 1>&6
7226 else
7227   cat > conftest.$ac_ext <<EOF
7228 #line 7229 "configure"
7229 #include "confdefs.h"
7230 /* System header to define __stub macros and hopefully few prototypes,
7231     which can conflict with char $ac_func(); below.  */
7232 #include <assert.h>
7233 /* Override any gcc2 internal prototype to avoid an error.  */
7234 /* We use char because int might match the return type of a gcc2
7235     builtin and then its argument prototype would still apply.  */
7236 char $ac_func();
7237
7238 int main() {
7239
7240 /* The GNU C library defines this for functions which it implements
7241     to always fail with ENOSYS.  Some functions are actually named
7242     something starting with __ and the normal name is an alias.  */
7243 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7244 choke me
7245 #else
7246 $ac_func();
7247 #endif
7248
7249 ; return 0; }
7250 EOF
7251 if { (eval echo configure:7252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7252   rm -rf conftest*
7253   eval "ac_cv_func_$ac_func=yes"
7254 else
7255   echo "configure: failed program was:" >&5
7256   cat conftest.$ac_ext >&5
7257   rm -rf conftest*
7258   eval "ac_cv_func_$ac_func=no"
7259 fi
7260 rm -f conftest*
7261 fi
7262
7263 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7264   echo "$ac_t""yes" 1>&6
7265     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7266   cat >> confdefs.h <<EOF
7267 #define $ac_tr_func 1
7268 EOF
7269  
7270 else
7271   echo "$ac_t""no" 1>&6
7272 fi
7273 done
7274  ;;
7275   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7276 echo "configure:7277: checking for putprpwnam in -lsec" >&5
7277 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7278 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7279   echo $ac_n "(cached) $ac_c" 1>&6
7280 else
7281   ac_save_LIBS="$LIBS"
7282 LIBS="-lsec  $LIBS"
7283 cat > conftest.$ac_ext <<EOF
7284 #line 7285 "configure"
7285 #include "confdefs.h"
7286 /* Override any gcc2 internal prototype to avoid an error.  */
7287 /* We use char because int might match the return type of a gcc2
7288     builtin and then its argument prototype would still apply.  */
7289 char putprpwnam();
7290
7291 int main() {
7292 putprpwnam()
7293 ; return 0; }
7294 EOF
7295 if { (eval echo configure:7296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7296   rm -rf conftest*
7297   eval "ac_cv_lib_$ac_lib_var=yes"
7298 else
7299   echo "configure: failed program was:" >&5
7300   cat conftest.$ac_ext >&5
7301   rm -rf conftest*
7302   eval "ac_cv_lib_$ac_lib_var=no"
7303 fi
7304 rm -f conftest*
7305 LIBS="$ac_save_LIBS"
7306
7307 fi
7308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7309   echo "$ac_t""yes" 1>&6
7310     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7311     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7312   cat >> confdefs.h <<EOF
7313 #define $ac_tr_lib 1
7314 EOF
7315
7316   LIBS="-lsec $LIBS"
7317
7318 else
7319   echo "$ac_t""no" 1>&6
7320 fi
7321  
7322      for ac_func in putprpwnam
7323 do
7324 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7325 echo "configure:7326: checking for $ac_func" >&5
7326 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7327   echo $ac_n "(cached) $ac_c" 1>&6
7328 else
7329   cat > conftest.$ac_ext <<EOF
7330 #line 7331 "configure"
7331 #include "confdefs.h"
7332 /* System header to define __stub macros and hopefully few prototypes,
7333     which can conflict with char $ac_func(); below.  */
7334 #include <assert.h>
7335 /* Override any gcc2 internal prototype to avoid an error.  */
7336 /* We use char because int might match the return type of a gcc2
7337     builtin and then its argument prototype would still apply.  */
7338 char $ac_func();
7339
7340 int main() {
7341
7342 /* The GNU C library defines this for functions which it implements
7343     to always fail with ENOSYS.  Some functions are actually named
7344     something starting with __ and the normal name is an alias.  */
7345 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7346 choke me
7347 #else
7348 $ac_func();
7349 #endif
7350
7351 ; return 0; }
7352 EOF
7353 if { (eval echo configure:7354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7354   rm -rf conftest*
7355   eval "ac_cv_func_$ac_func=yes"
7356 else
7357   echo "configure: failed program was:" >&5
7358   cat conftest.$ac_ext >&5
7359   rm -rf conftest*
7360   eval "ac_cv_func_$ac_func=no"
7361 fi
7362 rm -f conftest*
7363 fi
7364
7365 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7366   echo "$ac_t""yes" 1>&6
7367     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7368   cat >> confdefs.h <<EOF
7369 #define $ac_tr_func 1
7370 EOF
7371  
7372 else
7373   echo "$ac_t""no" 1>&6
7374 fi
7375 done
7376
7377   ;;
7378   esac
7379
7380
7381 case "$LIBS" in
7382   *-lsecurity*) for ac_func in set_auth_parameters
7383 do
7384 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7385 echo "configure:7386: checking for $ac_func" >&5
7386 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7387   echo $ac_n "(cached) $ac_c" 1>&6
7388 else
7389   cat > conftest.$ac_ext <<EOF
7390 #line 7391 "configure"
7391 #include "confdefs.h"
7392 /* System header to define __stub macros and hopefully few prototypes,
7393     which can conflict with char $ac_func(); below.  */
7394 #include <assert.h>
7395 /* Override any gcc2 internal prototype to avoid an error.  */
7396 /* We use char because int might match the return type of a gcc2
7397     builtin and then its argument prototype would still apply.  */
7398 char $ac_func();
7399
7400 int main() {
7401
7402 /* The GNU C library defines this for functions which it implements
7403     to always fail with ENOSYS.  Some functions are actually named
7404     something starting with __ and the normal name is an alias.  */
7405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7406 choke me
7407 #else
7408 $ac_func();
7409 #endif
7410
7411 ; return 0; }
7412 EOF
7413 if { (eval echo configure:7414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7414   rm -rf conftest*
7415   eval "ac_cv_func_$ac_func=yes"
7416 else
7417   echo "configure: failed program was:" >&5
7418   cat conftest.$ac_ext >&5
7419   rm -rf conftest*
7420   eval "ac_cv_func_$ac_func=no"
7421 fi
7422 rm -f conftest*
7423 fi
7424
7425 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7426   echo "$ac_t""yes" 1>&6
7427     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7428   cat >> confdefs.h <<EOF
7429 #define $ac_tr_func 1
7430 EOF
7431  
7432 else
7433   echo "$ac_t""no" 1>&6
7434 fi
7435 done
7436  ;;
7437   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7438 echo "configure:7439: checking for set_auth_parameters in -lsecurity" >&5
7439 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7440 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7441   echo $ac_n "(cached) $ac_c" 1>&6
7442 else
7443   ac_save_LIBS="$LIBS"
7444 LIBS="-lsecurity  $LIBS"
7445 cat > conftest.$ac_ext <<EOF
7446 #line 7447 "configure"
7447 #include "confdefs.h"
7448 /* Override any gcc2 internal prototype to avoid an error.  */
7449 /* We use char because int might match the return type of a gcc2
7450     builtin and then its argument prototype would still apply.  */
7451 char set_auth_parameters();
7452
7453 int main() {
7454 set_auth_parameters()
7455 ; return 0; }
7456 EOF
7457 if { (eval echo configure:7458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7458   rm -rf conftest*
7459   eval "ac_cv_lib_$ac_lib_var=yes"
7460 else
7461   echo "configure: failed program was:" >&5
7462   cat conftest.$ac_ext >&5
7463   rm -rf conftest*
7464   eval "ac_cv_lib_$ac_lib_var=no"
7465 fi
7466 rm -f conftest*
7467 LIBS="$ac_save_LIBS"
7468
7469 fi
7470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7471   echo "$ac_t""yes" 1>&6
7472     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7473     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7474   cat >> confdefs.h <<EOF
7475 #define $ac_tr_lib 1
7476 EOF
7477
7478   LIBS="-lsecurity $LIBS"
7479
7480 else
7481   echo "$ac_t""no" 1>&6
7482 fi
7483  
7484      for ac_func in set_auth_parameters
7485 do
7486 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7487 echo "configure:7488: checking for $ac_func" >&5
7488 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7489   echo $ac_n "(cached) $ac_c" 1>&6
7490 else
7491   cat > conftest.$ac_ext <<EOF
7492 #line 7493 "configure"
7493 #include "confdefs.h"
7494 /* System header to define __stub macros and hopefully few prototypes,
7495     which can conflict with char $ac_func(); below.  */
7496 #include <assert.h>
7497 /* Override any gcc2 internal prototype to avoid an error.  */
7498 /* We use char because int might match the return type of a gcc2
7499     builtin and then its argument prototype would still apply.  */
7500 char $ac_func();
7501
7502 int main() {
7503
7504 /* The GNU C library defines this for functions which it implements
7505     to always fail with ENOSYS.  Some functions are actually named
7506     something starting with __ and the normal name is an alias.  */
7507 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7508 choke me
7509 #else
7510 $ac_func();
7511 #endif
7512
7513 ; return 0; }
7514 EOF
7515 if { (eval echo configure:7516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7516   rm -rf conftest*
7517   eval "ac_cv_func_$ac_func=yes"
7518 else
7519   echo "configure: failed program was:" >&5
7520   cat conftest.$ac_ext >&5
7521   rm -rf conftest*
7522   eval "ac_cv_func_$ac_func=no"
7523 fi
7524 rm -f conftest*
7525 fi
7526
7527 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7528   echo "$ac_t""yes" 1>&6
7529     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7530   cat >> confdefs.h <<EOF
7531 #define $ac_tr_func 1
7532 EOF
7533  
7534 else
7535   echo "$ac_t""no" 1>&6
7536 fi
7537 done
7538
7539   ;;
7540   esac
7541
7542 case "$LIBS" in
7543   *-lsec*) for ac_func in set_auth_parameters
7544 do
7545 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7546 echo "configure:7547: checking for $ac_func" >&5
7547 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7548   echo $ac_n "(cached) $ac_c" 1>&6
7549 else
7550   cat > conftest.$ac_ext <<EOF
7551 #line 7552 "configure"
7552 #include "confdefs.h"
7553 /* System header to define __stub macros and hopefully few prototypes,
7554     which can conflict with char $ac_func(); below.  */
7555 #include <assert.h>
7556 /* Override any gcc2 internal prototype to avoid an error.  */
7557 /* We use char because int might match the return type of a gcc2
7558     builtin and then its argument prototype would still apply.  */
7559 char $ac_func();
7560
7561 int main() {
7562
7563 /* The GNU C library defines this for functions which it implements
7564     to always fail with ENOSYS.  Some functions are actually named
7565     something starting with __ and the normal name is an alias.  */
7566 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7567 choke me
7568 #else
7569 $ac_func();
7570 #endif
7571
7572 ; return 0; }
7573 EOF
7574 if { (eval echo configure:7575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7575   rm -rf conftest*
7576   eval "ac_cv_func_$ac_func=yes"
7577 else
7578   echo "configure: failed program was:" >&5
7579   cat conftest.$ac_ext >&5
7580   rm -rf conftest*
7581   eval "ac_cv_func_$ac_func=no"
7582 fi
7583 rm -f conftest*
7584 fi
7585
7586 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7587   echo "$ac_t""yes" 1>&6
7588     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7589   cat >> confdefs.h <<EOF
7590 #define $ac_tr_func 1
7591 EOF
7592  
7593 else
7594   echo "$ac_t""no" 1>&6
7595 fi
7596 done
7597  ;;
7598   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7599 echo "configure:7600: checking for set_auth_parameters in -lsec" >&5
7600 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7601 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7602   echo $ac_n "(cached) $ac_c" 1>&6
7603 else
7604   ac_save_LIBS="$LIBS"
7605 LIBS="-lsec  $LIBS"
7606 cat > conftest.$ac_ext <<EOF
7607 #line 7608 "configure"
7608 #include "confdefs.h"
7609 /* Override any gcc2 internal prototype to avoid an error.  */
7610 /* We use char because int might match the return type of a gcc2
7611     builtin and then its argument prototype would still apply.  */
7612 char set_auth_parameters();
7613
7614 int main() {
7615 set_auth_parameters()
7616 ; return 0; }
7617 EOF
7618 if { (eval echo configure:7619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7619   rm -rf conftest*
7620   eval "ac_cv_lib_$ac_lib_var=yes"
7621 else
7622   echo "configure: failed program was:" >&5
7623   cat conftest.$ac_ext >&5
7624   rm -rf conftest*
7625   eval "ac_cv_lib_$ac_lib_var=no"
7626 fi
7627 rm -f conftest*
7628 LIBS="$ac_save_LIBS"
7629
7630 fi
7631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7632   echo "$ac_t""yes" 1>&6
7633     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7634     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7635   cat >> confdefs.h <<EOF
7636 #define $ac_tr_lib 1
7637 EOF
7638
7639   LIBS="-lsec $LIBS"
7640
7641 else
7642   echo "$ac_t""no" 1>&6
7643 fi
7644  
7645      for ac_func in set_auth_parameters
7646 do
7647 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7648 echo "configure:7649: checking for $ac_func" >&5
7649 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7650   echo $ac_n "(cached) $ac_c" 1>&6
7651 else
7652   cat > conftest.$ac_ext <<EOF
7653 #line 7654 "configure"
7654 #include "confdefs.h"
7655 /* System header to define __stub macros and hopefully few prototypes,
7656     which can conflict with char $ac_func(); below.  */
7657 #include <assert.h>
7658 /* Override any gcc2 internal prototype to avoid an error.  */
7659 /* We use char because int might match the return type of a gcc2
7660     builtin and then its argument prototype would still apply.  */
7661 char $ac_func();
7662
7663 int main() {
7664
7665 /* The GNU C library defines this for functions which it implements
7666     to always fail with ENOSYS.  Some functions are actually named
7667     something starting with __ and the normal name is an alias.  */
7668 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7669 choke me
7670 #else
7671 $ac_func();
7672 #endif
7673
7674 ; return 0; }
7675 EOF
7676 if { (eval echo configure:7677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7677   rm -rf conftest*
7678   eval "ac_cv_func_$ac_func=yes"
7679 else
7680   echo "configure: failed program was:" >&5
7681   cat conftest.$ac_ext >&5
7682   rm -rf conftest*
7683   eval "ac_cv_func_$ac_func=no"
7684 fi
7685 rm -f conftest*
7686 fi
7687
7688 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7689   echo "$ac_t""yes" 1>&6
7690     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7691   cat >> confdefs.h <<EOF
7692 #define $ac_tr_func 1
7693 EOF
7694  
7695 else
7696   echo "$ac_t""no" 1>&6
7697 fi
7698 done
7699
7700   ;;
7701   esac
7702
7703
7704 # UnixWare 7.x has its getspnam in -lgen
7705 case "$LIBS" in
7706   *-lgen*) for ac_func in getspnam
7707 do
7708 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7709 echo "configure:7710: checking for $ac_func" >&5
7710 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7711   echo $ac_n "(cached) $ac_c" 1>&6
7712 else
7713   cat > conftest.$ac_ext <<EOF
7714 #line 7715 "configure"
7715 #include "confdefs.h"
7716 /* System header to define __stub macros and hopefully few prototypes,
7717     which can conflict with char $ac_func(); below.  */
7718 #include <assert.h>
7719 /* Override any gcc2 internal prototype to avoid an error.  */
7720 /* We use char because int might match the return type of a gcc2
7721     builtin and then its argument prototype would still apply.  */
7722 char $ac_func();
7723
7724 int main() {
7725
7726 /* The GNU C library defines this for functions which it implements
7727     to always fail with ENOSYS.  Some functions are actually named
7728     something starting with __ and the normal name is an alias.  */
7729 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7730 choke me
7731 #else
7732 $ac_func();
7733 #endif
7734
7735 ; return 0; }
7736 EOF
7737 if { (eval echo configure:7738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7738   rm -rf conftest*
7739   eval "ac_cv_func_$ac_func=yes"
7740 else
7741   echo "configure: failed program was:" >&5
7742   cat conftest.$ac_ext >&5
7743   rm -rf conftest*
7744   eval "ac_cv_func_$ac_func=no"
7745 fi
7746 rm -f conftest*
7747 fi
7748
7749 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7750   echo "$ac_t""yes" 1>&6
7751     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7752   cat >> confdefs.h <<EOF
7753 #define $ac_tr_func 1
7754 EOF
7755  
7756 else
7757   echo "$ac_t""no" 1>&6
7758 fi
7759 done
7760  ;;
7761   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7762 echo "configure:7763: checking for getspnam in -lgen" >&5
7763 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7764 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7765   echo $ac_n "(cached) $ac_c" 1>&6
7766 else
7767   ac_save_LIBS="$LIBS"
7768 LIBS="-lgen  $LIBS"
7769 cat > conftest.$ac_ext <<EOF
7770 #line 7771 "configure"
7771 #include "confdefs.h"
7772 /* Override any gcc2 internal prototype to avoid an error.  */
7773 /* We use char because int might match the return type of a gcc2
7774     builtin and then its argument prototype would still apply.  */
7775 char getspnam();
7776
7777 int main() {
7778 getspnam()
7779 ; return 0; }
7780 EOF
7781 if { (eval echo configure:7782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7782   rm -rf conftest*
7783   eval "ac_cv_lib_$ac_lib_var=yes"
7784 else
7785   echo "configure: failed program was:" >&5
7786   cat conftest.$ac_ext >&5
7787   rm -rf conftest*
7788   eval "ac_cv_lib_$ac_lib_var=no"
7789 fi
7790 rm -f conftest*
7791 LIBS="$ac_save_LIBS"
7792
7793 fi
7794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7795   echo "$ac_t""yes" 1>&6
7796     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7797     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7798   cat >> confdefs.h <<EOF
7799 #define $ac_tr_lib 1
7800 EOF
7801
7802   LIBS="-lgen $LIBS"
7803
7804 else
7805   echo "$ac_t""no" 1>&6
7806 fi
7807  
7808      for ac_func in getspnam
7809 do
7810 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7811 echo "configure:7812: checking for $ac_func" >&5
7812 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7813   echo $ac_n "(cached) $ac_c" 1>&6
7814 else
7815   cat > conftest.$ac_ext <<EOF
7816 #line 7817 "configure"
7817 #include "confdefs.h"
7818 /* System header to define __stub macros and hopefully few prototypes,
7819     which can conflict with char $ac_func(); below.  */
7820 #include <assert.h>
7821 /* Override any gcc2 internal prototype to avoid an error.  */
7822 /* We use char because int might match the return type of a gcc2
7823     builtin and then its argument prototype would still apply.  */
7824 char $ac_func();
7825
7826 int main() {
7827
7828 /* The GNU C library defines this for functions which it implements
7829     to always fail with ENOSYS.  Some functions are actually named
7830     something starting with __ and the normal name is an alias.  */
7831 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7832 choke me
7833 #else
7834 $ac_func();
7835 #endif
7836
7837 ; return 0; }
7838 EOF
7839 if { (eval echo configure:7840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7840   rm -rf conftest*
7841   eval "ac_cv_func_$ac_func=yes"
7842 else
7843   echo "configure: failed program was:" >&5
7844   cat conftest.$ac_ext >&5
7845   rm -rf conftest*
7846   eval "ac_cv_func_$ac_func=no"
7847 fi
7848 rm -f conftest*
7849 fi
7850
7851 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7852   echo "$ac_t""yes" 1>&6
7853     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7854   cat >> confdefs.h <<EOF
7855 #define $ac_tr_func 1
7856 EOF
7857  
7858 else
7859   echo "$ac_t""no" 1>&6
7860 fi
7861 done
7862
7863   ;;
7864   esac
7865
7866
7867 case "$LIBS" in
7868   *-lsecurity*) for ac_func in getspnam
7869 do
7870 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7871 echo "configure:7872: checking for $ac_func" >&5
7872 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7873   echo $ac_n "(cached) $ac_c" 1>&6
7874 else
7875   cat > conftest.$ac_ext <<EOF
7876 #line 7877 "configure"
7877 #include "confdefs.h"
7878 /* System header to define __stub macros and hopefully few prototypes,
7879     which can conflict with char $ac_func(); below.  */
7880 #include <assert.h>
7881 /* Override any gcc2 internal prototype to avoid an error.  */
7882 /* We use char because int might match the return type of a gcc2
7883     builtin and then its argument prototype would still apply.  */
7884 char $ac_func();
7885
7886 int main() {
7887
7888 /* The GNU C library defines this for functions which it implements
7889     to always fail with ENOSYS.  Some functions are actually named
7890     something starting with __ and the normal name is an alias.  */
7891 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7892 choke me
7893 #else
7894 $ac_func();
7895 #endif
7896
7897 ; return 0; }
7898 EOF
7899 if { (eval echo configure:7900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7900   rm -rf conftest*
7901   eval "ac_cv_func_$ac_func=yes"
7902 else
7903   echo "configure: failed program was:" >&5
7904   cat conftest.$ac_ext >&5
7905   rm -rf conftest*
7906   eval "ac_cv_func_$ac_func=no"
7907 fi
7908 rm -f conftest*
7909 fi
7910
7911 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7912   echo "$ac_t""yes" 1>&6
7913     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7914   cat >> confdefs.h <<EOF
7915 #define $ac_tr_func 1
7916 EOF
7917  
7918 else
7919   echo "$ac_t""no" 1>&6
7920 fi
7921 done
7922  ;;
7923   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7924 echo "configure:7925: checking for getspnam in -lsecurity" >&5
7925 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7926 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7927   echo $ac_n "(cached) $ac_c" 1>&6
7928 else
7929   ac_save_LIBS="$LIBS"
7930 LIBS="-lsecurity  $LIBS"
7931 cat > conftest.$ac_ext <<EOF
7932 #line 7933 "configure"
7933 #include "confdefs.h"
7934 /* Override any gcc2 internal prototype to avoid an error.  */
7935 /* We use char because int might match the return type of a gcc2
7936     builtin and then its argument prototype would still apply.  */
7937 char getspnam();
7938
7939 int main() {
7940 getspnam()
7941 ; return 0; }
7942 EOF
7943 if { (eval echo configure:7944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7944   rm -rf conftest*
7945   eval "ac_cv_lib_$ac_lib_var=yes"
7946 else
7947   echo "configure: failed program was:" >&5
7948   cat conftest.$ac_ext >&5
7949   rm -rf conftest*
7950   eval "ac_cv_lib_$ac_lib_var=no"
7951 fi
7952 rm -f conftest*
7953 LIBS="$ac_save_LIBS"
7954
7955 fi
7956 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7957   echo "$ac_t""yes" 1>&6
7958     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7959     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7960   cat >> confdefs.h <<EOF
7961 #define $ac_tr_lib 1
7962 EOF
7963
7964   LIBS="-lsecurity $LIBS"
7965
7966 else
7967   echo "$ac_t""no" 1>&6
7968 fi
7969  
7970      for ac_func in getspnam
7971 do
7972 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7973 echo "configure:7974: checking for $ac_func" >&5
7974 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7975   echo $ac_n "(cached) $ac_c" 1>&6
7976 else
7977   cat > conftest.$ac_ext <<EOF
7978 #line 7979 "configure"
7979 #include "confdefs.h"
7980 /* System header to define __stub macros and hopefully few prototypes,
7981     which can conflict with char $ac_func(); below.  */
7982 #include <assert.h>
7983 /* Override any gcc2 internal prototype to avoid an error.  */
7984 /* We use char because int might match the return type of a gcc2
7985     builtin and then its argument prototype would still apply.  */
7986 char $ac_func();
7987
7988 int main() {
7989
7990 /* The GNU C library defines this for functions which it implements
7991     to always fail with ENOSYS.  Some functions are actually named
7992     something starting with __ and the normal name is an alias.  */
7993 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7994 choke me
7995 #else
7996 $ac_func();
7997 #endif
7998
7999 ; return 0; }
8000 EOF
8001 if { (eval echo configure:8002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8002   rm -rf conftest*
8003   eval "ac_cv_func_$ac_func=yes"
8004 else
8005   echo "configure: failed program was:" >&5
8006   cat conftest.$ac_ext >&5
8007   rm -rf conftest*
8008   eval "ac_cv_func_$ac_func=no"
8009 fi
8010 rm -f conftest*
8011 fi
8012
8013 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8014   echo "$ac_t""yes" 1>&6
8015     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8016   cat >> confdefs.h <<EOF
8017 #define $ac_tr_func 1
8018 EOF
8019  
8020 else
8021   echo "$ac_t""no" 1>&6
8022 fi
8023 done
8024
8025   ;;
8026   esac
8027
8028 case "$LIBS" in
8029   *-lsec*) for ac_func in getspnam
8030 do
8031 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8032 echo "configure:8033: checking for $ac_func" >&5
8033 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8034   echo $ac_n "(cached) $ac_c" 1>&6
8035 else
8036   cat > conftest.$ac_ext <<EOF
8037 #line 8038 "configure"
8038 #include "confdefs.h"
8039 /* System header to define __stub macros and hopefully few prototypes,
8040     which can conflict with char $ac_func(); below.  */
8041 #include <assert.h>
8042 /* Override any gcc2 internal prototype to avoid an error.  */
8043 /* We use char because int might match the return type of a gcc2
8044     builtin and then its argument prototype would still apply.  */
8045 char $ac_func();
8046
8047 int main() {
8048
8049 /* The GNU C library defines this for functions which it implements
8050     to always fail with ENOSYS.  Some functions are actually named
8051     something starting with __ and the normal name is an alias.  */
8052 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8053 choke me
8054 #else
8055 $ac_func();
8056 #endif
8057
8058 ; return 0; }
8059 EOF
8060 if { (eval echo configure:8061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8061   rm -rf conftest*
8062   eval "ac_cv_func_$ac_func=yes"
8063 else
8064   echo "configure: failed program was:" >&5
8065   cat conftest.$ac_ext >&5
8066   rm -rf conftest*
8067   eval "ac_cv_func_$ac_func=no"
8068 fi
8069 rm -f conftest*
8070 fi
8071
8072 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8073   echo "$ac_t""yes" 1>&6
8074     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8075   cat >> confdefs.h <<EOF
8076 #define $ac_tr_func 1
8077 EOF
8078  
8079 else
8080   echo "$ac_t""no" 1>&6
8081 fi
8082 done
8083  ;;
8084   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8085 echo "configure:8086: checking for getspnam in -lsec" >&5
8086 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8087 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8088   echo $ac_n "(cached) $ac_c" 1>&6
8089 else
8090   ac_save_LIBS="$LIBS"
8091 LIBS="-lsec  $LIBS"
8092 cat > conftest.$ac_ext <<EOF
8093 #line 8094 "configure"
8094 #include "confdefs.h"
8095 /* Override any gcc2 internal prototype to avoid an error.  */
8096 /* We use char because int might match the return type of a gcc2
8097     builtin and then its argument prototype would still apply.  */
8098 char getspnam();
8099
8100 int main() {
8101 getspnam()
8102 ; return 0; }
8103 EOF
8104 if { (eval echo configure:8105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8105   rm -rf conftest*
8106   eval "ac_cv_lib_$ac_lib_var=yes"
8107 else
8108   echo "configure: failed program was:" >&5
8109   cat conftest.$ac_ext >&5
8110   rm -rf conftest*
8111   eval "ac_cv_lib_$ac_lib_var=no"
8112 fi
8113 rm -f conftest*
8114 LIBS="$ac_save_LIBS"
8115
8116 fi
8117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8118   echo "$ac_t""yes" 1>&6
8119     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8120     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8121   cat >> confdefs.h <<EOF
8122 #define $ac_tr_lib 1
8123 EOF
8124
8125   LIBS="-lsec $LIBS"
8126
8127 else
8128   echo "$ac_t""no" 1>&6
8129 fi
8130  
8131      for ac_func in getspnam
8132 do
8133 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8134 echo "configure:8135: checking for $ac_func" >&5
8135 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8136   echo $ac_n "(cached) $ac_c" 1>&6
8137 else
8138   cat > conftest.$ac_ext <<EOF
8139 #line 8140 "configure"
8140 #include "confdefs.h"
8141 /* System header to define __stub macros and hopefully few prototypes,
8142     which can conflict with char $ac_func(); below.  */
8143 #include <assert.h>
8144 /* Override any gcc2 internal prototype to avoid an error.  */
8145 /* We use char because int might match the return type of a gcc2
8146     builtin and then its argument prototype would still apply.  */
8147 char $ac_func();
8148
8149 int main() {
8150
8151 /* The GNU C library defines this for functions which it implements
8152     to always fail with ENOSYS.  Some functions are actually named
8153     something starting with __ and the normal name is an alias.  */
8154 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8155 choke me
8156 #else
8157 $ac_func();
8158 #endif
8159
8160 ; return 0; }
8161 EOF
8162 if { (eval echo configure:8163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8163   rm -rf conftest*
8164   eval "ac_cv_func_$ac_func=yes"
8165 else
8166   echo "configure: failed program was:" >&5
8167   cat conftest.$ac_ext >&5
8168   rm -rf conftest*
8169   eval "ac_cv_func_$ac_func=no"
8170 fi
8171 rm -f conftest*
8172 fi
8173
8174 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8175   echo "$ac_t""yes" 1>&6
8176     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8177   cat >> confdefs.h <<EOF
8178 #define $ac_tr_func 1
8179 EOF
8180  
8181 else
8182   echo "$ac_t""no" 1>&6
8183 fi
8184 done
8185
8186   ;;
8187   esac
8188
8189
8190 case "$LIBS" in
8191   *-lsecurity*) for ac_func in bigcrypt
8192 do
8193 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8194 echo "configure:8195: checking for $ac_func" >&5
8195 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8196   echo $ac_n "(cached) $ac_c" 1>&6
8197 else
8198   cat > conftest.$ac_ext <<EOF
8199 #line 8200 "configure"
8200 #include "confdefs.h"
8201 /* System header to define __stub macros and hopefully few prototypes,
8202     which can conflict with char $ac_func(); below.  */
8203 #include <assert.h>
8204 /* Override any gcc2 internal prototype to avoid an error.  */
8205 /* We use char because int might match the return type of a gcc2
8206     builtin and then its argument prototype would still apply.  */
8207 char $ac_func();
8208
8209 int main() {
8210
8211 /* The GNU C library defines this for functions which it implements
8212     to always fail with ENOSYS.  Some functions are actually named
8213     something starting with __ and the normal name is an alias.  */
8214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8215 choke me
8216 #else
8217 $ac_func();
8218 #endif
8219
8220 ; return 0; }
8221 EOF
8222 if { (eval echo configure:8223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8223   rm -rf conftest*
8224   eval "ac_cv_func_$ac_func=yes"
8225 else
8226   echo "configure: failed program was:" >&5
8227   cat conftest.$ac_ext >&5
8228   rm -rf conftest*
8229   eval "ac_cv_func_$ac_func=no"
8230 fi
8231 rm -f conftest*
8232 fi
8233
8234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8235   echo "$ac_t""yes" 1>&6
8236     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8237   cat >> confdefs.h <<EOF
8238 #define $ac_tr_func 1
8239 EOF
8240  
8241 else
8242   echo "$ac_t""no" 1>&6
8243 fi
8244 done
8245  ;;
8246   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8247 echo "configure:8248: checking for bigcrypt in -lsecurity" >&5
8248 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8249 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8250   echo $ac_n "(cached) $ac_c" 1>&6
8251 else
8252   ac_save_LIBS="$LIBS"
8253 LIBS="-lsecurity  $LIBS"
8254 cat > conftest.$ac_ext <<EOF
8255 #line 8256 "configure"
8256 #include "confdefs.h"
8257 /* Override any gcc2 internal prototype to avoid an error.  */
8258 /* We use char because int might match the return type of a gcc2
8259     builtin and then its argument prototype would still apply.  */
8260 char bigcrypt();
8261
8262 int main() {
8263 bigcrypt()
8264 ; return 0; }
8265 EOF
8266 if { (eval echo configure:8267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8267   rm -rf conftest*
8268   eval "ac_cv_lib_$ac_lib_var=yes"
8269 else
8270   echo "configure: failed program was:" >&5
8271   cat conftest.$ac_ext >&5
8272   rm -rf conftest*
8273   eval "ac_cv_lib_$ac_lib_var=no"
8274 fi
8275 rm -f conftest*
8276 LIBS="$ac_save_LIBS"
8277
8278 fi
8279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8280   echo "$ac_t""yes" 1>&6
8281     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8282     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8283   cat >> confdefs.h <<EOF
8284 #define $ac_tr_lib 1
8285 EOF
8286
8287   LIBS="-lsecurity $LIBS"
8288
8289 else
8290   echo "$ac_t""no" 1>&6
8291 fi
8292  
8293      for ac_func in bigcrypt
8294 do
8295 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8296 echo "configure:8297: checking for $ac_func" >&5
8297 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8298   echo $ac_n "(cached) $ac_c" 1>&6
8299 else
8300   cat > conftest.$ac_ext <<EOF
8301 #line 8302 "configure"
8302 #include "confdefs.h"
8303 /* System header to define __stub macros and hopefully few prototypes,
8304     which can conflict with char $ac_func(); below.  */
8305 #include <assert.h>
8306 /* Override any gcc2 internal prototype to avoid an error.  */
8307 /* We use char because int might match the return type of a gcc2
8308     builtin and then its argument prototype would still apply.  */
8309 char $ac_func();
8310
8311 int main() {
8312
8313 /* The GNU C library defines this for functions which it implements
8314     to always fail with ENOSYS.  Some functions are actually named
8315     something starting with __ and the normal name is an alias.  */
8316 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8317 choke me
8318 #else
8319 $ac_func();
8320 #endif
8321
8322 ; return 0; }
8323 EOF
8324 if { (eval echo configure:8325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8325   rm -rf conftest*
8326   eval "ac_cv_func_$ac_func=yes"
8327 else
8328   echo "configure: failed program was:" >&5
8329   cat conftest.$ac_ext >&5
8330   rm -rf conftest*
8331   eval "ac_cv_func_$ac_func=no"
8332 fi
8333 rm -f conftest*
8334 fi
8335
8336 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8337   echo "$ac_t""yes" 1>&6
8338     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8339   cat >> confdefs.h <<EOF
8340 #define $ac_tr_func 1
8341 EOF
8342  
8343 else
8344   echo "$ac_t""no" 1>&6
8345 fi
8346 done
8347
8348   ;;
8349   esac
8350
8351 case "$LIBS" in
8352   *-lsec*) for ac_func in bigcrypt
8353 do
8354 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8355 echo "configure:8356: checking for $ac_func" >&5
8356 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8357   echo $ac_n "(cached) $ac_c" 1>&6
8358 else
8359   cat > conftest.$ac_ext <<EOF
8360 #line 8361 "configure"
8361 #include "confdefs.h"
8362 /* System header to define __stub macros and hopefully few prototypes,
8363     which can conflict with char $ac_func(); below.  */
8364 #include <assert.h>
8365 /* Override any gcc2 internal prototype to avoid an error.  */
8366 /* We use char because int might match the return type of a gcc2
8367     builtin and then its argument prototype would still apply.  */
8368 char $ac_func();
8369
8370 int main() {
8371
8372 /* The GNU C library defines this for functions which it implements
8373     to always fail with ENOSYS.  Some functions are actually named
8374     something starting with __ and the normal name is an alias.  */
8375 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8376 choke me
8377 #else
8378 $ac_func();
8379 #endif
8380
8381 ; return 0; }
8382 EOF
8383 if { (eval echo configure:8384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8384   rm -rf conftest*
8385   eval "ac_cv_func_$ac_func=yes"
8386 else
8387   echo "configure: failed program was:" >&5
8388   cat conftest.$ac_ext >&5
8389   rm -rf conftest*
8390   eval "ac_cv_func_$ac_func=no"
8391 fi
8392 rm -f conftest*
8393 fi
8394
8395 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8396   echo "$ac_t""yes" 1>&6
8397     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8398   cat >> confdefs.h <<EOF
8399 #define $ac_tr_func 1
8400 EOF
8401  
8402 else
8403   echo "$ac_t""no" 1>&6
8404 fi
8405 done
8406  ;;
8407   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8408 echo "configure:8409: checking for bigcrypt in -lsec" >&5
8409 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8410 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8411   echo $ac_n "(cached) $ac_c" 1>&6
8412 else
8413   ac_save_LIBS="$LIBS"
8414 LIBS="-lsec  $LIBS"
8415 cat > conftest.$ac_ext <<EOF
8416 #line 8417 "configure"
8417 #include "confdefs.h"
8418 /* Override any gcc2 internal prototype to avoid an error.  */
8419 /* We use char because int might match the return type of a gcc2
8420     builtin and then its argument prototype would still apply.  */
8421 char bigcrypt();
8422
8423 int main() {
8424 bigcrypt()
8425 ; return 0; }
8426 EOF
8427 if { (eval echo configure:8428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8428   rm -rf conftest*
8429   eval "ac_cv_lib_$ac_lib_var=yes"
8430 else
8431   echo "configure: failed program was:" >&5
8432   cat conftest.$ac_ext >&5
8433   rm -rf conftest*
8434   eval "ac_cv_lib_$ac_lib_var=no"
8435 fi
8436 rm -f conftest*
8437 LIBS="$ac_save_LIBS"
8438
8439 fi
8440 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8441   echo "$ac_t""yes" 1>&6
8442     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8443     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8444   cat >> confdefs.h <<EOF
8445 #define $ac_tr_lib 1
8446 EOF
8447
8448   LIBS="-lsec $LIBS"
8449
8450 else
8451   echo "$ac_t""no" 1>&6
8452 fi
8453  
8454      for ac_func in bigcrypt
8455 do
8456 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8457 echo "configure:8458: checking for $ac_func" >&5
8458 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8459   echo $ac_n "(cached) $ac_c" 1>&6
8460 else
8461   cat > conftest.$ac_ext <<EOF
8462 #line 8463 "configure"
8463 #include "confdefs.h"
8464 /* System header to define __stub macros and hopefully few prototypes,
8465     which can conflict with char $ac_func(); below.  */
8466 #include <assert.h>
8467 /* Override any gcc2 internal prototype to avoid an error.  */
8468 /* We use char because int might match the return type of a gcc2
8469     builtin and then its argument prototype would still apply.  */
8470 char $ac_func();
8471
8472 int main() {
8473
8474 /* The GNU C library defines this for functions which it implements
8475     to always fail with ENOSYS.  Some functions are actually named
8476     something starting with __ and the normal name is an alias.  */
8477 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8478 choke me
8479 #else
8480 $ac_func();
8481 #endif
8482
8483 ; return 0; }
8484 EOF
8485 if { (eval echo configure:8486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8486   rm -rf conftest*
8487   eval "ac_cv_func_$ac_func=yes"
8488 else
8489   echo "configure: failed program was:" >&5
8490   cat conftest.$ac_ext >&5
8491   rm -rf conftest*
8492   eval "ac_cv_func_$ac_func=no"
8493 fi
8494 rm -f conftest*
8495 fi
8496
8497 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8498   echo "$ac_t""yes" 1>&6
8499     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8500   cat >> confdefs.h <<EOF
8501 #define $ac_tr_func 1
8502 EOF
8503  
8504 else
8505   echo "$ac_t""no" 1>&6
8506 fi
8507 done
8508
8509   ;;
8510   esac
8511
8512
8513 case "$LIBS" in
8514   *-lsecurity*) for ac_func in getprpwnam
8515 do
8516 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8517 echo "configure:8518: checking for $ac_func" >&5
8518 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8519   echo $ac_n "(cached) $ac_c" 1>&6
8520 else
8521   cat > conftest.$ac_ext <<EOF
8522 #line 8523 "configure"
8523 #include "confdefs.h"
8524 /* System header to define __stub macros and hopefully few prototypes,
8525     which can conflict with char $ac_func(); below.  */
8526 #include <assert.h>
8527 /* Override any gcc2 internal prototype to avoid an error.  */
8528 /* We use char because int might match the return type of a gcc2
8529     builtin and then its argument prototype would still apply.  */
8530 char $ac_func();
8531
8532 int main() {
8533
8534 /* The GNU C library defines this for functions which it implements
8535     to always fail with ENOSYS.  Some functions are actually named
8536     something starting with __ and the normal name is an alias.  */
8537 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8538 choke me
8539 #else
8540 $ac_func();
8541 #endif
8542
8543 ; return 0; }
8544 EOF
8545 if { (eval echo configure:8546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8546   rm -rf conftest*
8547   eval "ac_cv_func_$ac_func=yes"
8548 else
8549   echo "configure: failed program was:" >&5
8550   cat conftest.$ac_ext >&5
8551   rm -rf conftest*
8552   eval "ac_cv_func_$ac_func=no"
8553 fi
8554 rm -f conftest*
8555 fi
8556
8557 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8558   echo "$ac_t""yes" 1>&6
8559     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8560   cat >> confdefs.h <<EOF
8561 #define $ac_tr_func 1
8562 EOF
8563  
8564 else
8565   echo "$ac_t""no" 1>&6
8566 fi
8567 done
8568  ;;
8569   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8570 echo "configure:8571: checking for getprpwnam in -lsecurity" >&5
8571 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8572 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8573   echo $ac_n "(cached) $ac_c" 1>&6
8574 else
8575   ac_save_LIBS="$LIBS"
8576 LIBS="-lsecurity  $LIBS"
8577 cat > conftest.$ac_ext <<EOF
8578 #line 8579 "configure"
8579 #include "confdefs.h"
8580 /* Override any gcc2 internal prototype to avoid an error.  */
8581 /* We use char because int might match the return type of a gcc2
8582     builtin and then its argument prototype would still apply.  */
8583 char getprpwnam();
8584
8585 int main() {
8586 getprpwnam()
8587 ; return 0; }
8588 EOF
8589 if { (eval echo configure:8590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8590   rm -rf conftest*
8591   eval "ac_cv_lib_$ac_lib_var=yes"
8592 else
8593   echo "configure: failed program was:" >&5
8594   cat conftest.$ac_ext >&5
8595   rm -rf conftest*
8596   eval "ac_cv_lib_$ac_lib_var=no"
8597 fi
8598 rm -f conftest*
8599 LIBS="$ac_save_LIBS"
8600
8601 fi
8602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8603   echo "$ac_t""yes" 1>&6
8604     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8605     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8606   cat >> confdefs.h <<EOF
8607 #define $ac_tr_lib 1
8608 EOF
8609
8610   LIBS="-lsecurity $LIBS"
8611
8612 else
8613   echo "$ac_t""no" 1>&6
8614 fi
8615  
8616      for ac_func in getprpwnam
8617 do
8618 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8619 echo "configure:8620: checking for $ac_func" >&5
8620 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8621   echo $ac_n "(cached) $ac_c" 1>&6
8622 else
8623   cat > conftest.$ac_ext <<EOF
8624 #line 8625 "configure"
8625 #include "confdefs.h"
8626 /* System header to define __stub macros and hopefully few prototypes,
8627     which can conflict with char $ac_func(); below.  */
8628 #include <assert.h>
8629 /* Override any gcc2 internal prototype to avoid an error.  */
8630 /* We use char because int might match the return type of a gcc2
8631     builtin and then its argument prototype would still apply.  */
8632 char $ac_func();
8633
8634 int main() {
8635
8636 /* The GNU C library defines this for functions which it implements
8637     to always fail with ENOSYS.  Some functions are actually named
8638     something starting with __ and the normal name is an alias.  */
8639 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8640 choke me
8641 #else
8642 $ac_func();
8643 #endif
8644
8645 ; return 0; }
8646 EOF
8647 if { (eval echo configure:8648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8648   rm -rf conftest*
8649   eval "ac_cv_func_$ac_func=yes"
8650 else
8651   echo "configure: failed program was:" >&5
8652   cat conftest.$ac_ext >&5
8653   rm -rf conftest*
8654   eval "ac_cv_func_$ac_func=no"
8655 fi
8656 rm -f conftest*
8657 fi
8658
8659 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8660   echo "$ac_t""yes" 1>&6
8661     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8662   cat >> confdefs.h <<EOF
8663 #define $ac_tr_func 1
8664 EOF
8665  
8666 else
8667   echo "$ac_t""no" 1>&6
8668 fi
8669 done
8670
8671   ;;
8672   esac
8673
8674 case "$LIBS" in
8675   *-lsec*) for ac_func in getprpwnam
8676 do
8677 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8678 echo "configure:8679: checking for $ac_func" >&5
8679 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8680   echo $ac_n "(cached) $ac_c" 1>&6
8681 else
8682   cat > conftest.$ac_ext <<EOF
8683 #line 8684 "configure"
8684 #include "confdefs.h"
8685 /* System header to define __stub macros and hopefully few prototypes,
8686     which can conflict with char $ac_func(); below.  */
8687 #include <assert.h>
8688 /* Override any gcc2 internal prototype to avoid an error.  */
8689 /* We use char because int might match the return type of a gcc2
8690     builtin and then its argument prototype would still apply.  */
8691 char $ac_func();
8692
8693 int main() {
8694
8695 /* The GNU C library defines this for functions which it implements
8696     to always fail with ENOSYS.  Some functions are actually named
8697     something starting with __ and the normal name is an alias.  */
8698 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8699 choke me
8700 #else
8701 $ac_func();
8702 #endif
8703
8704 ; return 0; }
8705 EOF
8706 if { (eval echo configure:8707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8707   rm -rf conftest*
8708   eval "ac_cv_func_$ac_func=yes"
8709 else
8710   echo "configure: failed program was:" >&5
8711   cat conftest.$ac_ext >&5
8712   rm -rf conftest*
8713   eval "ac_cv_func_$ac_func=no"
8714 fi
8715 rm -f conftest*
8716 fi
8717
8718 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8719   echo "$ac_t""yes" 1>&6
8720     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8721   cat >> confdefs.h <<EOF
8722 #define $ac_tr_func 1
8723 EOF
8724  
8725 else
8726   echo "$ac_t""no" 1>&6
8727 fi
8728 done
8729  ;;
8730   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8731 echo "configure:8732: checking for getprpwnam in -lsec" >&5
8732 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8733 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8734   echo $ac_n "(cached) $ac_c" 1>&6
8735 else
8736   ac_save_LIBS="$LIBS"
8737 LIBS="-lsec  $LIBS"
8738 cat > conftest.$ac_ext <<EOF
8739 #line 8740 "configure"
8740 #include "confdefs.h"
8741 /* Override any gcc2 internal prototype to avoid an error.  */
8742 /* We use char because int might match the return type of a gcc2
8743     builtin and then its argument prototype would still apply.  */
8744 char getprpwnam();
8745
8746 int main() {
8747 getprpwnam()
8748 ; return 0; }
8749 EOF
8750 if { (eval echo configure:8751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8751   rm -rf conftest*
8752   eval "ac_cv_lib_$ac_lib_var=yes"
8753 else
8754   echo "configure: failed program was:" >&5
8755   cat conftest.$ac_ext >&5
8756   rm -rf conftest*
8757   eval "ac_cv_lib_$ac_lib_var=no"
8758 fi
8759 rm -f conftest*
8760 LIBS="$ac_save_LIBS"
8761
8762 fi
8763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8764   echo "$ac_t""yes" 1>&6
8765     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8766     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8767   cat >> confdefs.h <<EOF
8768 #define $ac_tr_lib 1
8769 EOF
8770
8771   LIBS="-lsec $LIBS"
8772
8773 else
8774   echo "$ac_t""no" 1>&6
8775 fi
8776  
8777      for ac_func in getprpwnam
8778 do
8779 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8780 echo "configure:8781: checking for $ac_func" >&5
8781 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8782   echo $ac_n "(cached) $ac_c" 1>&6
8783 else
8784   cat > conftest.$ac_ext <<EOF
8785 #line 8786 "configure"
8786 #include "confdefs.h"
8787 /* System header to define __stub macros and hopefully few prototypes,
8788     which can conflict with char $ac_func(); below.  */
8789 #include <assert.h>
8790 /* Override any gcc2 internal prototype to avoid an error.  */
8791 /* We use char because int might match the return type of a gcc2
8792     builtin and then its argument prototype would still apply.  */
8793 char $ac_func();
8794
8795 int main() {
8796
8797 /* The GNU C library defines this for functions which it implements
8798     to always fail with ENOSYS.  Some functions are actually named
8799     something starting with __ and the normal name is an alias.  */
8800 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8801 choke me
8802 #else
8803 $ac_func();
8804 #endif
8805
8806 ; return 0; }
8807 EOF
8808 if { (eval echo configure:8809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8809   rm -rf conftest*
8810   eval "ac_cv_func_$ac_func=yes"
8811 else
8812   echo "configure: failed program was:" >&5
8813   cat conftest.$ac_ext >&5
8814   rm -rf conftest*
8815   eval "ac_cv_func_$ac_func=no"
8816 fi
8817 rm -f conftest*
8818 fi
8819
8820 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8821   echo "$ac_t""yes" 1>&6
8822     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8823   cat >> confdefs.h <<EOF
8824 #define $ac_tr_func 1
8825 EOF
8826  
8827 else
8828   echo "$ac_t""no" 1>&6
8829 fi
8830 done
8831
8832   ;;
8833   esac
8834
8835
8836 # this bit needs to be modified for each OS that is suported by
8837 # smbwrapper. You need to specify how to created a shared library and
8838 # how to compile C code to produce PIC object files
8839
8840 # these are the defaults, good for lots of systems
8841 HOST_OS="$host_os"
8842 LDSHFLAGS="-shared"
8843 SONAMEFLAG="#"
8844 SHLD="\${CC}"
8845 PICFLAG=""
8846 PICSUFFIX="po"
8847 POBAD_CC="#"
8848 SHLIBEXT="so"
8849 # Assume non-shared by default and override below
8850 BLDSHARED="false"
8851 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8852 echo "configure:8853: checking ability to build shared libraries" >&5
8853
8854 # and these are for particular systems
8855 case "$host_os" in
8856                 *linux*)   cat >> confdefs.h <<\EOF
8857 #define LINUX 1
8858 EOF
8859
8860                         BLDSHARED="true"
8861                         LDSHFLAGS="-shared" 
8862                         DYNEXP="-Wl,--export-dynamic"
8863                         PICFLAG="-fPIC"
8864                         SONAMEFLAG="-Wl,-soname="
8865                         cat >> confdefs.h <<\EOF
8866 #define STAT_ST_BLOCKSIZE 512
8867 EOF
8868
8869                 ;;
8870                 *solaris*) cat >> confdefs.h <<\EOF
8871 #define SUNOS5 1
8872 EOF
8873
8874                         BLDSHARED="true"
8875                         LDSHFLAGS="-G"
8876                         SONAMEFLAG="-h "
8877                         if test "${GCC}" = "yes"; then
8878                                 PICFLAG="-fPIC"
8879                                 if test "${ac_cv_prog_gnu_ld}" = "yes"; then
8880                                         DYNEXP="-Wl,-E"
8881                                 fi
8882                         else
8883                                 PICFLAG="-KPIC"
8884                                 ## ${CFLAGS} added for building 64-bit shared 
8885                                 ## libs using Sun's Compiler
8886                                 LDSHFLAGS="-G \${CFLAGS}"
8887                                 POBAD_CC=""
8888                                 PICSUFFIX="po.o"
8889                         fi
8890                         cat >> confdefs.h <<\EOF
8891 #define STAT_ST_BLOCKSIZE 512
8892 EOF
8893
8894                 ;;
8895                 *sunos*) cat >> confdefs.h <<\EOF
8896 #define SUNOS4 1
8897 EOF
8898
8899                         BLDSHARED="true"
8900                         LDSHFLAGS="-G"
8901                         SONAMEFLAG="-Wl,-h,"
8902                         PICFLAG="-KPIC"   # Is this correct for SunOS
8903                 ;;
8904                 *bsd*)  BLDSHARED="true"
8905                         LDSHFLAGS="-shared"
8906                         DYNEXP="-Wl,-Bdynamic"
8907                         SONAMEFLAG="-Wl,-soname,"
8908                         PICFLAG="-fPIC"
8909                         cat >> confdefs.h <<\EOF
8910 #define STAT_ST_BLOCKSIZE 512
8911 EOF
8912
8913                 ;;
8914                 *irix*) cat >> confdefs.h <<\EOF
8915 #define IRIX 1
8916 EOF
8917
8918                         case "$host_os" in
8919                         *irix6*) cat >> confdefs.h <<\EOF
8920 #define IRIX6 1
8921 EOF
8922
8923                         ;;
8924                         esac
8925                         ATTEMPT_WRAP32_BUILD=yes
8926                         BLDSHARED="true"
8927                         LDSHFLAGS="-set_version sgi1.0 -shared"
8928                         SONAMEFLAG="-soname "
8929                         SHLD="\${LD}"
8930                         if test "${GCC}" = "yes"; then
8931                                 PICFLAG="-fPIC"
8932                         else 
8933                                 PICFLAG="-KPIC"
8934                         fi
8935                         cat >> confdefs.h <<\EOF
8936 #define STAT_ST_BLOCKSIZE 512
8937 EOF
8938
8939                 ;;
8940                 *aix*) cat >> confdefs.h <<\EOF
8941 #define AIX 1
8942 EOF
8943
8944                         BLDSHARED="true"
8945                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8946                         DYNEXP="-Wl,-brtl,-bexpall"
8947                         if test "${GCC}" = "yes"; then
8948                                 PICFLAG="-O2"
8949                         else
8950                         PICFLAG="-O2 -qmaxmem=6000"
8951                                 ## for funky AIX compiler using strncpy()
8952                                 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT"
8953                         fi
8954
8955                         cat >> confdefs.h <<\EOF
8956 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8957 EOF
8958
8959                 ;;
8960                 *hpux*) cat >> confdefs.h <<\EOF
8961 #define HPUX 1
8962 EOF
8963
8964                         SHLIBEXT="sl"
8965                         # Use special PIC flags for the native HP-UX compiler.
8966                         if test $ac_cv_prog_cc_Ae = yes; then
8967                                 BLDSHARED="true"
8968                                 SHLD="/usr/bin/ld"
8969                                 LDSHFLAGS="-B symbolic -b -z"
8970                                 SONAMEFLAG="+h "
8971                                 PICFLAG="+z"
8972                         fi
8973                         DYNEXP="-Wl,-E"
8974                         cat >> confdefs.h <<\EOF
8975 #define STAT_ST_BLOCKSIZE 8192
8976 EOF
8977
8978                 ;;
8979                 *qnx*) cat >> confdefs.h <<\EOF
8980 #define QNX 1
8981 EOF
8982 ;;
8983                 *osf*) cat >> confdefs.h <<\EOF
8984 #define OSF1 1
8985 EOF
8986
8987                         BLDSHARED="true"
8988                         LDSHFLAGS="-shared"
8989                         SONAMEFLAG="-Wl,-soname,"
8990                         PICFLAG="-fPIC"
8991                 ;;
8992                 *sco*) cat >> confdefs.h <<\EOF
8993 #define SCO 1
8994 EOF
8995 ;;
8996                 *unixware*) cat >> confdefs.h <<\EOF
8997 #define UNIXWARE 1
8998 EOF
8999
9000                         BLDSHARED="true"
9001                         LDSHFLAGS="-shared"
9002                         SONAMEFLAG="-Wl,-soname,"
9003                         PICFLAG="-KPIC"
9004                 ;;
9005                 *next2*) cat >> confdefs.h <<\EOF
9006 #define NEXT2 1
9007 EOF
9008 ;;
9009                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
9010 set dummy groff; ac_word=$2
9011 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9012 echo "configure:9013: checking for $ac_word" >&5
9013 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
9014   echo $ac_n "(cached) $ac_c" 1>&6
9015 else
9016   if test -n "$ROFF"; then
9017   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
9018 else
9019   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
9020   ac_dummy="$PATH"
9021   for ac_dir in $ac_dummy; do
9022     test -z "$ac_dir" && ac_dir=.
9023     if test -f $ac_dir/$ac_word; then
9024       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9025       break
9026     fi
9027   done
9028   IFS="$ac_save_ifs"
9029 fi
9030 fi
9031 ROFF="$ac_cv_prog_ROFF"
9032 if test -n "$ROFF"; then
9033   echo "$ac_t""$ROFF" 1>&6
9034 else
9035   echo "$ac_t""no" 1>&6
9036 fi
9037 ;;
9038                 *sysv4*)
9039                         case "$host" in
9040                                 *-univel-*)     if  test "$GCC" != yes ; then
9041                                                 cat >> confdefs.h <<\EOF
9042 #define HAVE_MEMSET 1
9043 EOF
9044
9045                                         fi
9046                                         LDSHFLAGS="-G"
9047                                         DYNEXP="-Bexport"
9048                                 ;;
9049                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
9050 #define RELIANTUNIX 1
9051 EOF
9052 ;;
9053                         esac
9054                 ;;
9055
9056                 *sysv5*)
9057                         if  test "$GCC" != yes ; then
9058                                 cat >> confdefs.h <<\EOF
9059 #define HAVE_MEMSET 1
9060 EOF
9061
9062                         fi
9063                         LDSHFLAGS="-G"
9064                 ;;
9065 esac
9066
9067 echo "$ac_t""$BLDSHARED" 1>&6
9068 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9069 echo "configure:9070: checking linker flags for shared libraries" >&5
9070 echo "$ac_t""$LDSHFLAGS" 1>&6
9071 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9072 echo "configure:9073: checking compiler flags for position-independent code" >&5
9073 echo "$ac_t""$PICFLAGS" 1>&6
9074
9075 #######################################################
9076 # test whether building a shared library actually works
9077 if test $BLDSHARED = true; then
9078 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9079 echo "configure:9080: checking whether building shared libraries actually works" >&5
9080 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9081   echo $ac_n "(cached) $ac_c" 1>&6
9082 else
9083   
9084    ac_cv_shlib_works=no
9085    # try building a trivial shared library
9086    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9087      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
9088      ac_cv_shlib_works=yes
9089    rm -f shlib.so shlib.po
9090
9091 fi
9092
9093 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9094 if test $ac_cv_shlib_works = no; then
9095    BLDSHARED=false
9096 fi
9097 fi
9098
9099
9100 # this updates our target list if we can build shared libs
9101 if test $BLDSHARED = true; then
9102    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9103 else
9104    LIBSMBCLIENT_SHARED=
9105 fi
9106
9107 ################
9108
9109 echo $ac_n "checking for long long""... $ac_c" 1>&6
9110 echo "configure:9111: checking for long long" >&5
9111 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9112   echo $ac_n "(cached) $ac_c" 1>&6
9113 else
9114   
9115 if test "$cross_compiling" = yes; then
9116   samba_cv_have_longlong=cross
9117 else
9118   cat > conftest.$ac_ext <<EOF
9119 #line 9120 "configure"
9120 #include "confdefs.h"
9121 #include <stdio.h>
9122 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9123 EOF
9124 if { (eval echo configure:9125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9125 then
9126   samba_cv_have_longlong=yes
9127 else
9128   echo "configure: failed program was:" >&5
9129   cat conftest.$ac_ext >&5
9130   rm -fr conftest*
9131   samba_cv_have_longlong=no
9132 fi
9133 rm -fr conftest*
9134 fi
9135
9136 fi
9137
9138 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9139 if test x"$samba_cv_have_longlong" = x"yes"; then
9140     cat >> confdefs.h <<\EOF
9141 #define HAVE_LONGLONG 1
9142 EOF
9143
9144 fi
9145
9146 #
9147 # Check if the compiler supports the LL prefix on long long integers.
9148 # AIX needs this.
9149
9150 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9151 echo "configure:9152: checking for LL suffix on long long integers" >&5
9152 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9153   echo $ac_n "(cached) $ac_c" 1>&6
9154 else
9155   
9156     cat > conftest.$ac_ext <<EOF
9157 #line 9158 "configure"
9158 #include "confdefs.h"
9159 #include <stdio.h>
9160 int main() {
9161 long long i = 0x8000000000LL
9162 ; return 0; }
9163 EOF
9164 if { (eval echo configure:9165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9165   rm -rf conftest*
9166   samba_cv_compiler_supports_ll=yes
9167 else
9168   echo "configure: failed program was:" >&5
9169   cat conftest.$ac_ext >&5
9170   rm -rf conftest*
9171   samba_cv_compiler_supports_ll=no
9172 fi
9173 rm -f conftest*
9174 fi
9175
9176 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9177 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9178    cat >> confdefs.h <<\EOF
9179 #define COMPILER_SUPPORTS_LL 1
9180 EOF
9181
9182 fi
9183
9184   
9185 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9186 echo "configure:9187: checking for 64 bit off_t" >&5
9187 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9188   echo $ac_n "(cached) $ac_c" 1>&6
9189 else
9190   
9191 if test "$cross_compiling" = yes; then
9192   samba_cv_SIZEOF_OFF_T=cross
9193 else
9194   cat > conftest.$ac_ext <<EOF
9195 #line 9196 "configure"
9196 #include "confdefs.h"
9197 #include <stdio.h>
9198 #include <sys/stat.h>
9199 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9200 EOF
9201 if { (eval echo configure:9202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9202 then
9203   samba_cv_SIZEOF_OFF_T=yes
9204 else
9205   echo "configure: failed program was:" >&5
9206   cat conftest.$ac_ext >&5
9207   rm -fr conftest*
9208   samba_cv_SIZEOF_OFF_T=no
9209 fi
9210 rm -fr conftest*
9211 fi
9212
9213 fi
9214
9215 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9216 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9217     cat >> confdefs.h <<\EOF
9218 #define SIZEOF_OFF_T 8
9219 EOF
9220
9221 fi
9222
9223 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9224 echo "configure:9225: checking for off64_t" >&5
9225 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9226   echo $ac_n "(cached) $ac_c" 1>&6
9227 else
9228   
9229 if test "$cross_compiling" = yes; then
9230   samba_cv_HAVE_OFF64_T=cross
9231 else
9232   cat > conftest.$ac_ext <<EOF
9233 #line 9234 "configure"
9234 #include "confdefs.h"
9235
9236 #if defined(HAVE_UNISTD_H)
9237 #include <unistd.h>
9238 #endif
9239 #include <stdio.h>
9240 #include <sys/stat.h>
9241 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9242 EOF
9243 if { (eval echo configure:9244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9244 then
9245   samba_cv_HAVE_OFF64_T=yes
9246 else
9247   echo "configure: failed program was:" >&5
9248   cat conftest.$ac_ext >&5
9249   rm -fr conftest*
9250   samba_cv_HAVE_OFF64_T=no
9251 fi
9252 rm -fr conftest*
9253 fi
9254
9255 fi
9256
9257 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9258 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9259     cat >> confdefs.h <<\EOF
9260 #define HAVE_OFF64_T 1
9261 EOF
9262
9263 fi
9264
9265 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9266 echo "configure:9267: checking for 64 bit ino_t" >&5
9267 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9268   echo $ac_n "(cached) $ac_c" 1>&6
9269 else
9270   
9271 if test "$cross_compiling" = yes; then
9272   samba_cv_SIZEOF_INO_T=cross
9273 else
9274   cat > conftest.$ac_ext <<EOF
9275 #line 9276 "configure"
9276 #include "confdefs.h"
9277 #include <stdio.h>
9278 #include <sys/stat.h>
9279 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9280 EOF
9281 if { (eval echo configure:9282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9282 then
9283   samba_cv_SIZEOF_INO_T=yes
9284 else
9285   echo "configure: failed program was:" >&5
9286   cat conftest.$ac_ext >&5
9287   rm -fr conftest*
9288   samba_cv_SIZEOF_INO_T=no
9289 fi
9290 rm -fr conftest*
9291 fi
9292
9293 fi
9294
9295 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9296 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9297     cat >> confdefs.h <<\EOF
9298 #define SIZEOF_INO_T 8
9299 EOF
9300
9301 fi
9302
9303 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9304 echo "configure:9305: checking for ino64_t" >&5
9305 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9306   echo $ac_n "(cached) $ac_c" 1>&6
9307 else
9308   
9309 if test "$cross_compiling" = yes; then
9310   samba_cv_HAVE_INO64_T=cross
9311 else
9312   cat > conftest.$ac_ext <<EOF
9313 #line 9314 "configure"
9314 #include "confdefs.h"
9315
9316 #if defined(HAVE_UNISTD_H)
9317 #include <unistd.h>
9318 #endif
9319 #include <stdio.h>
9320 #include <sys/stat.h>
9321 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9322 EOF
9323 if { (eval echo configure:9324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9324 then
9325   samba_cv_HAVE_INO64_T=yes
9326 else
9327   echo "configure: failed program was:" >&5
9328   cat conftest.$ac_ext >&5
9329   rm -fr conftest*
9330   samba_cv_HAVE_INO64_T=no
9331 fi
9332 rm -fr conftest*
9333 fi
9334
9335 fi
9336
9337 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9338 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9339     cat >> confdefs.h <<\EOF
9340 #define HAVE_INO64_T 1
9341 EOF
9342
9343 fi
9344
9345 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9346 echo "configure:9347: checking for dev64_t" >&5
9347 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9348   echo $ac_n "(cached) $ac_c" 1>&6
9349 else
9350   
9351 if test "$cross_compiling" = yes; then
9352   samba_cv_HAVE_DEV64_T=cross
9353 else
9354   cat > conftest.$ac_ext <<EOF
9355 #line 9356 "configure"
9356 #include "confdefs.h"
9357
9358 #if defined(HAVE_UNISTD_H)
9359 #include <unistd.h>
9360 #endif
9361 #include <stdio.h>
9362 #include <sys/stat.h>
9363 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9364 EOF
9365 if { (eval echo configure:9366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9366 then
9367   samba_cv_HAVE_DEV64_T=yes
9368 else
9369   echo "configure: failed program was:" >&5
9370   cat conftest.$ac_ext >&5
9371   rm -fr conftest*
9372   samba_cv_HAVE_DEV64_T=no
9373 fi
9374 rm -fr conftest*
9375 fi
9376
9377 fi
9378
9379 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9380 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9381     cat >> confdefs.h <<\EOF
9382 #define HAVE_DEV64_T 1
9383 EOF
9384
9385 fi
9386
9387 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9388 echo "configure:9389: checking for struct dirent64" >&5
9389 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9390   echo $ac_n "(cached) $ac_c" 1>&6
9391 else
9392   
9393 cat > conftest.$ac_ext <<EOF
9394 #line 9395 "configure"
9395 #include "confdefs.h"
9396
9397 #if defined(HAVE_UNISTD_H)
9398 #include <unistd.h>
9399 #endif
9400 #include <sys/types.h>
9401 #include <dirent.h>
9402 int main() {
9403 struct dirent64 de;
9404 ; return 0; }
9405 EOF
9406 if { (eval echo configure:9407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9407   rm -rf conftest*
9408   samba_cv_HAVE_STRUCT_DIRENT64=yes
9409 else
9410   echo "configure: failed program was:" >&5
9411   cat conftest.$ac_ext >&5
9412   rm -rf conftest*
9413   samba_cv_HAVE_STRUCT_DIRENT64=no
9414 fi
9415 rm -f conftest*
9416 fi
9417
9418 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9419 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
9420     cat >> confdefs.h <<\EOF
9421 #define HAVE_STRUCT_DIRENT64 1
9422 EOF
9423
9424 fi
9425
9426 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9427 echo "configure:9428: checking for major macro" >&5
9428 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9429   echo $ac_n "(cached) $ac_c" 1>&6
9430 else
9431   
9432 if test "$cross_compiling" = yes; then
9433   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9434 else
9435   cat > conftest.$ac_ext <<EOF
9436 #line 9437 "configure"
9437 #include "confdefs.h"
9438
9439 #if defined(HAVE_UNISTD_H)
9440 #include <unistd.h>
9441 #endif
9442 #include <sys/types.h>
9443 main() { dev_t dev; int i = major(dev); return 0; }
9444 EOF
9445 if { (eval echo configure:9446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9446 then
9447   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9448 else
9449   echo "configure: failed program was:" >&5
9450   cat conftest.$ac_ext >&5
9451   rm -fr conftest*
9452   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9453 fi
9454 rm -fr conftest*
9455 fi
9456
9457 fi
9458
9459 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9460 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9461     cat >> confdefs.h <<\EOF
9462 #define HAVE_DEVICE_MAJOR_FN 1
9463 EOF
9464
9465 fi
9466
9467 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9468 echo "configure:9469: checking for minor macro" >&5
9469 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9470   echo $ac_n "(cached) $ac_c" 1>&6
9471 else
9472   
9473 if test "$cross_compiling" = yes; then
9474   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9475 else
9476   cat > conftest.$ac_ext <<EOF
9477 #line 9478 "configure"
9478 #include "confdefs.h"
9479
9480 #if defined(HAVE_UNISTD_H)
9481 #include <unistd.h>
9482 #endif
9483 #include <sys/types.h>
9484 main() { dev_t dev; int i = minor(dev); return 0; }
9485 EOF
9486 if { (eval echo configure:9487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9487 then
9488   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9489 else
9490   echo "configure: failed program was:" >&5
9491   cat conftest.$ac_ext >&5
9492   rm -fr conftest*
9493   samba_cv_HAVE_DEVICE_MINOR_FN=no
9494 fi
9495 rm -fr conftest*
9496 fi
9497
9498 fi
9499
9500 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9501 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9502     cat >> confdefs.h <<\EOF
9503 #define HAVE_DEVICE_MINOR_FN 1
9504 EOF
9505
9506 fi
9507
9508 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9509 echo "configure:9510: checking for unsigned char" >&5
9510 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9511   echo $ac_n "(cached) $ac_c" 1>&6
9512 else
9513   
9514 if test "$cross_compiling" = yes; then
9515   samba_cv_HAVE_UNSIGNED_CHAR=cross
9516 else
9517   cat > conftest.$ac_ext <<EOF
9518 #line 9519 "configure"
9519 #include "confdefs.h"
9520 #include <stdio.h>
9521 main() { char c; c=250; exit((c > 0)?0:1); }
9522 EOF
9523 if { (eval echo configure:9524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9524 then
9525   samba_cv_HAVE_UNSIGNED_CHAR=yes
9526 else
9527   echo "configure: failed program was:" >&5
9528   cat conftest.$ac_ext >&5
9529   rm -fr conftest*
9530   samba_cv_HAVE_UNSIGNED_CHAR=no
9531 fi
9532 rm -fr conftest*
9533 fi
9534
9535 fi
9536
9537 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9538 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9539     cat >> confdefs.h <<\EOF
9540 #define HAVE_UNSIGNED_CHAR 1
9541 EOF
9542
9543 fi
9544
9545 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9546 echo "configure:9547: checking for sin_len in sock" >&5
9547 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9548   echo $ac_n "(cached) $ac_c" 1>&6
9549 else
9550   
9551 cat > conftest.$ac_ext <<EOF
9552 #line 9553 "configure"
9553 #include "confdefs.h"
9554 #include <sys/types.h>
9555 #include <sys/socket.h>
9556 #include <netinet/in.h>
9557 int main() {
9558 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9559 ; return 0; }
9560 EOF
9561 if { (eval echo configure:9562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9562   rm -rf conftest*
9563   samba_cv_HAVE_SOCK_SIN_LEN=yes
9564 else
9565   echo "configure: failed program was:" >&5
9566   cat conftest.$ac_ext >&5
9567   rm -rf conftest*
9568   samba_cv_HAVE_SOCK_SIN_LEN=no
9569 fi
9570 rm -f conftest*
9571 fi
9572
9573 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9574 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9575     cat >> confdefs.h <<\EOF
9576 #define HAVE_SOCK_SIN_LEN 1
9577 EOF
9578
9579 fi
9580
9581 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9582 echo "configure:9583: checking whether seekdir returns void" >&5
9583 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9584   echo $ac_n "(cached) $ac_c" 1>&6
9585 else
9586   
9587 cat > conftest.$ac_ext <<EOF
9588 #line 9589 "configure"
9589 #include "confdefs.h"
9590 #include <sys/types.h>
9591 #include <dirent.h>
9592 void seekdir(DIR *d, long loc) { return; }
9593 int main() {
9594 return 0;
9595 ; return 0; }
9596 EOF
9597 if { (eval echo configure:9598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9598   rm -rf conftest*
9599   samba_cv_SEEKDIR_RETURNS_VOID=yes
9600 else
9601   echo "configure: failed program was:" >&5
9602   cat conftest.$ac_ext >&5
9603   rm -rf conftest*
9604   samba_cv_SEEKDIR_RETURNS_VOID=no
9605 fi
9606 rm -f conftest*
9607 fi
9608
9609 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9610 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9611     cat >> confdefs.h <<\EOF
9612 #define SEEKDIR_RETURNS_VOID 1
9613 EOF
9614
9615 fi
9616
9617 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9618 echo "configure:9619: checking for __FILE__ macro" >&5
9619 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9620   echo $ac_n "(cached) $ac_c" 1>&6
9621 else
9622   
9623 cat > conftest.$ac_ext <<EOF
9624 #line 9625 "configure"
9625 #include "confdefs.h"
9626 #include <stdio.h>
9627 int main() {
9628 printf("%s\n", __FILE__);
9629 ; return 0; }
9630 EOF
9631 if { (eval echo configure:9632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9632   rm -rf conftest*
9633   samba_cv_HAVE_FILE_MACRO=yes
9634 else
9635   echo "configure: failed program was:" >&5
9636   cat conftest.$ac_ext >&5
9637   rm -rf conftest*
9638   samba_cv_HAVE_FILE_MACRO=no
9639 fi
9640 rm -f conftest*
9641 fi
9642
9643 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9644 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9645     cat >> confdefs.h <<\EOF
9646 #define HAVE_FILE_MACRO 1
9647 EOF
9648
9649 fi
9650
9651 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9652 echo "configure:9653: checking for __FUNCTION__ macro" >&5
9653 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9654   echo $ac_n "(cached) $ac_c" 1>&6
9655 else
9656   
9657 cat > conftest.$ac_ext <<EOF
9658 #line 9659 "configure"
9659 #include "confdefs.h"
9660 #include <stdio.h>
9661 int main() {
9662 printf("%s\n", __FUNCTION__);
9663 ; return 0; }
9664 EOF
9665 if { (eval echo configure:9666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9666   rm -rf conftest*
9667   samba_cv_HAVE_FUNCTION_MACRO=yes
9668 else
9669   echo "configure: failed program was:" >&5
9670   cat conftest.$ac_ext >&5
9671   rm -rf conftest*
9672   samba_cv_HAVE_FUNCTION_MACRO=no
9673 fi
9674 rm -f conftest*
9675 fi
9676
9677 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9678 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9679     cat >> confdefs.h <<\EOF
9680 #define HAVE_FUNCTION_MACRO 1
9681 EOF
9682
9683 fi
9684
9685 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9686 echo "configure:9687: checking if gettimeofday takes tz argument" >&5
9687 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9688   echo $ac_n "(cached) $ac_c" 1>&6
9689 else
9690   
9691 if test "$cross_compiling" = yes; then
9692   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9693 else
9694   cat > conftest.$ac_ext <<EOF
9695 #line 9696 "configure"
9696 #include "confdefs.h"
9697
9698 #include <sys/time.h>
9699 #include <unistd.h>
9700 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9701 EOF
9702 if { (eval echo configure:9703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9703 then
9704   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9705 else
9706   echo "configure: failed program was:" >&5
9707   cat conftest.$ac_ext >&5
9708   rm -fr conftest*
9709   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9710 fi
9711 rm -fr conftest*
9712 fi
9713
9714 fi
9715
9716 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9717 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9718     cat >> confdefs.h <<\EOF
9719 #define HAVE_GETTIMEOFDAY_TZ 1
9720 EOF
9721
9722 fi
9723
9724 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9725 echo "configure:9726: checking for __va_copy" >&5
9726 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9727   echo $ac_n "(cached) $ac_c" 1>&6
9728 else
9729   
9730 cat > conftest.$ac_ext <<EOF
9731 #line 9732 "configure"
9732 #include "confdefs.h"
9733 #include <stdarg.h>
9734 va_list ap1,ap2;
9735 int main() {
9736 __va_copy(ap1,ap2);
9737 ; return 0; }
9738 EOF
9739 if { (eval echo configure:9740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9740   rm -rf conftest*
9741   samba_cv_HAVE_VA_COPY=yes
9742 else
9743   echo "configure: failed program was:" >&5
9744   cat conftest.$ac_ext >&5
9745   rm -rf conftest*
9746   samba_cv_HAVE_VA_COPY=no
9747 fi
9748 rm -f conftest*
9749 fi
9750
9751 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9752 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9753     cat >> confdefs.h <<\EOF
9754 #define HAVE_VA_COPY 1
9755 EOF
9756
9757 fi
9758
9759 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9760 echo "configure:9761: checking for C99 vsnprintf" >&5
9761 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9762   echo $ac_n "(cached) $ac_c" 1>&6
9763 else
9764   
9765 if test "$cross_compiling" = yes; then
9766   samba_cv_HAVE_C99_VSNPRINTF=cross
9767 else
9768   cat > conftest.$ac_ext <<EOF
9769 #line 9770 "configure"
9770 #include "confdefs.h"
9771
9772 #include <sys/types.h>
9773 #include <stdarg.h>
9774 void foo(const char *format, ...) { 
9775        va_list ap;
9776        int len;
9777        char buf[5];
9778
9779        va_start(ap, format);
9780        len = vsnprintf(buf, 0, format, ap);
9781        va_end(ap);
9782        if (len != 5) exit(1);
9783
9784        va_start(ap, format);
9785        len = vsnprintf(0, 0, format, ap);
9786        va_end(ap);
9787        if (len != 5) exit(1);
9788
9789        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9790
9791        exit(0);
9792 }
9793 main() { foo("hello"); }
9794
9795 EOF
9796 if { (eval echo configure:9797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9797 then
9798   samba_cv_HAVE_C99_VSNPRINTF=yes
9799 else
9800   echo "configure: failed program was:" >&5
9801   cat conftest.$ac_ext >&5
9802   rm -fr conftest*
9803   samba_cv_HAVE_C99_VSNPRINTF=no
9804 fi
9805 rm -fr conftest*
9806 fi
9807
9808 fi
9809
9810 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9811 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9812     cat >> confdefs.h <<\EOF
9813 #define HAVE_C99_VSNPRINTF 1
9814 EOF
9815
9816 fi
9817
9818 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9819 echo "configure:9820: checking for broken readdir" >&5
9820 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9821   echo $ac_n "(cached) $ac_c" 1>&6
9822 else
9823   
9824 if test "$cross_compiling" = yes; then
9825   samba_cv_HAVE_BROKEN_READDIR=cross
9826 else
9827   cat > conftest.$ac_ext <<EOF
9828 #line 9829 "configure"
9829 #include "confdefs.h"
9830 #include <sys/types.h>
9831 #include <dirent.h>
9832 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9833 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9834 di->d_name[0] == 0) exit(0); exit(1);} 
9835 EOF
9836 if { (eval echo configure:9837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9837 then
9838   samba_cv_HAVE_BROKEN_READDIR=yes
9839 else
9840   echo "configure: failed program was:" >&5
9841   cat conftest.$ac_ext >&5
9842   rm -fr conftest*
9843   samba_cv_HAVE_BROKEN_READDIR=no
9844 fi
9845 rm -fr conftest*
9846 fi
9847
9848 fi
9849
9850 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9851 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9852     cat >> confdefs.h <<\EOF
9853 #define HAVE_BROKEN_READDIR 1
9854 EOF
9855
9856 fi
9857
9858 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9859 echo "configure:9860: checking for utimbuf" >&5
9860 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9861   echo $ac_n "(cached) $ac_c" 1>&6
9862 else
9863   
9864 cat > conftest.$ac_ext <<EOF
9865 #line 9866 "configure"
9866 #include "confdefs.h"
9867 #include <sys/types.h>
9868 #include <utime.h>
9869 int main() {
9870 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9871 ; return 0; }
9872 EOF
9873 if { (eval echo configure:9874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9874   rm -rf conftest*
9875   samba_cv_HAVE_UTIMBUF=yes
9876 else
9877   echo "configure: failed program was:" >&5
9878   cat conftest.$ac_ext >&5
9879   rm -rf conftest*
9880   samba_cv_HAVE_UTIMBUF=no
9881 fi
9882 rm -f conftest*
9883 fi
9884
9885 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9886 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9887     cat >> confdefs.h <<\EOF
9888 #define HAVE_UTIMBUF 1
9889 EOF
9890
9891 fi
9892
9893
9894 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9895 do
9896 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9897 echo "configure:9898: checking for $ac_func" >&5
9898 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9899   echo $ac_n "(cached) $ac_c" 1>&6
9900 else
9901   cat > conftest.$ac_ext <<EOF
9902 #line 9903 "configure"
9903 #include "confdefs.h"
9904 /* System header to define __stub macros and hopefully few prototypes,
9905     which can conflict with char $ac_func(); below.  */
9906 #include <assert.h>
9907 /* Override any gcc2 internal prototype to avoid an error.  */
9908 /* We use char because int might match the return type of a gcc2
9909     builtin and then its argument prototype would still apply.  */
9910 char $ac_func();
9911
9912 int main() {
9913
9914 /* The GNU C library defines this for functions which it implements
9915     to always fail with ENOSYS.  Some functions are actually named
9916     something starting with __ and the normal name is an alias.  */
9917 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9918 choke me
9919 #else
9920 $ac_func();
9921 #endif
9922
9923 ; return 0; }
9924 EOF
9925 if { (eval echo configure:9926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9926   rm -rf conftest*
9927   eval "ac_cv_func_$ac_func=yes"
9928 else
9929   echo "configure: failed program was:" >&5
9930   cat conftest.$ac_ext >&5
9931   rm -rf conftest*
9932   eval "ac_cv_func_$ac_func=no"
9933 fi
9934 rm -f conftest*
9935 fi
9936
9937 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9938   echo "$ac_t""yes" 1>&6
9939     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9940   cat >> confdefs.h <<EOF
9941 #define $ac_tr_func 1
9942 EOF
9943  
9944 else
9945   echo "$ac_t""no" 1>&6
9946 fi
9947 done
9948
9949
9950 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9951 echo "configure:9952: checking for ut_name in utmp" >&5
9952 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9953   echo $ac_n "(cached) $ac_c" 1>&6
9954 else
9955   
9956 cat > conftest.$ac_ext <<EOF
9957 #line 9958 "configure"
9958 #include "confdefs.h"
9959 #include <sys/types.h>
9960 #include <utmp.h>
9961 int main() {
9962 struct utmp ut;  ut.ut_name[0] = 'a';
9963 ; return 0; }
9964 EOF
9965 if { (eval echo configure:9966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9966   rm -rf conftest*
9967   samba_cv_HAVE_UT_UT_NAME=yes
9968 else
9969   echo "configure: failed program was:" >&5
9970   cat conftest.$ac_ext >&5
9971   rm -rf conftest*
9972   samba_cv_HAVE_UT_UT_NAME=no
9973 fi
9974 rm -f conftest*
9975 fi
9976
9977 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9978 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9979     cat >> confdefs.h <<\EOF
9980 #define HAVE_UT_UT_NAME 1
9981 EOF
9982
9983 fi 
9984
9985 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9986 echo "configure:9987: checking for ut_user in utmp" >&5
9987 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9988   echo $ac_n "(cached) $ac_c" 1>&6
9989 else
9990   
9991 cat > conftest.$ac_ext <<EOF
9992 #line 9993 "configure"
9993 #include "confdefs.h"
9994 #include <sys/types.h>
9995 #include <utmp.h>
9996 int main() {
9997 struct utmp ut;  ut.ut_user[0] = 'a';
9998 ; return 0; }
9999 EOF
10000 if { (eval echo configure:10001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10001   rm -rf conftest*
10002   samba_cv_HAVE_UT_UT_USER=yes
10003 else
10004   echo "configure: failed program was:" >&5
10005   cat conftest.$ac_ext >&5
10006   rm -rf conftest*
10007   samba_cv_HAVE_UT_UT_USER=no
10008 fi
10009 rm -f conftest*
10010 fi
10011
10012 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
10013 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
10014     cat >> confdefs.h <<\EOF
10015 #define HAVE_UT_UT_USER 1
10016 EOF
10017
10018 fi 
10019
10020 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
10021 echo "configure:10022: checking for ut_id in utmp" >&5
10022 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10023   echo $ac_n "(cached) $ac_c" 1>&6
10024 else
10025   
10026 cat > conftest.$ac_ext <<EOF
10027 #line 10028 "configure"
10028 #include "confdefs.h"
10029 #include <sys/types.h>
10030 #include <utmp.h>
10031 int main() {
10032 struct utmp ut;  ut.ut_id[0] = 'a';
10033 ; return 0; }
10034 EOF
10035 if { (eval echo configure:10036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10036   rm -rf conftest*
10037   samba_cv_HAVE_UT_UT_ID=yes
10038 else
10039   echo "configure: failed program was:" >&5
10040   cat conftest.$ac_ext >&5
10041   rm -rf conftest*
10042   samba_cv_HAVE_UT_UT_ID=no
10043 fi
10044 rm -f conftest*
10045 fi
10046
10047 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10048 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10049     cat >> confdefs.h <<\EOF
10050 #define HAVE_UT_UT_ID 1
10051 EOF
10052
10053 fi 
10054
10055 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10056 echo "configure:10057: checking for ut_host in utmp" >&5
10057 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10058   echo $ac_n "(cached) $ac_c" 1>&6
10059 else
10060   
10061 cat > conftest.$ac_ext <<EOF
10062 #line 10063 "configure"
10063 #include "confdefs.h"
10064 #include <sys/types.h>
10065 #include <utmp.h>
10066 int main() {
10067 struct utmp ut;  ut.ut_host[0] = 'a';
10068 ; return 0; }
10069 EOF
10070 if { (eval echo configure:10071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10071   rm -rf conftest*
10072   samba_cv_HAVE_UT_UT_HOST=yes
10073 else
10074   echo "configure: failed program was:" >&5
10075   cat conftest.$ac_ext >&5
10076   rm -rf conftest*
10077   samba_cv_HAVE_UT_UT_HOST=no
10078 fi
10079 rm -f conftest*
10080 fi
10081
10082 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10083 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10084     cat >> confdefs.h <<\EOF
10085 #define HAVE_UT_UT_HOST 1
10086 EOF
10087
10088 fi 
10089
10090 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10091 echo "configure:10092: checking for ut_time in utmp" >&5
10092 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10093   echo $ac_n "(cached) $ac_c" 1>&6
10094 else
10095   
10096 cat > conftest.$ac_ext <<EOF
10097 #line 10098 "configure"
10098 #include "confdefs.h"
10099 #include <sys/types.h>
10100 #include <utmp.h>
10101 int main() {
10102 struct utmp ut;  time_t t; ut.ut_time = t;
10103 ; return 0; }
10104 EOF
10105 if { (eval echo configure:10106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10106   rm -rf conftest*
10107   samba_cv_HAVE_UT_UT_TIME=yes
10108 else
10109   echo "configure: failed program was:" >&5
10110   cat conftest.$ac_ext >&5
10111   rm -rf conftest*
10112   samba_cv_HAVE_UT_UT_TIME=no
10113 fi
10114 rm -f conftest*
10115 fi
10116
10117 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10118 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10119     cat >> confdefs.h <<\EOF
10120 #define HAVE_UT_UT_TIME 1
10121 EOF
10122
10123 fi 
10124
10125 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10126 echo "configure:10127: checking for ut_tv in utmp" >&5
10127 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10128   echo $ac_n "(cached) $ac_c" 1>&6
10129 else
10130   
10131 cat > conftest.$ac_ext <<EOF
10132 #line 10133 "configure"
10133 #include "confdefs.h"
10134 #include <sys/types.h>
10135 #include <utmp.h>
10136 int main() {
10137 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10138 ; return 0; }
10139 EOF
10140 if { (eval echo configure:10141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10141   rm -rf conftest*
10142   samba_cv_HAVE_UT_UT_TV=yes
10143 else
10144   echo "configure: failed program was:" >&5
10145   cat conftest.$ac_ext >&5
10146   rm -rf conftest*
10147   samba_cv_HAVE_UT_UT_TV=no
10148 fi
10149 rm -f conftest*
10150 fi
10151
10152 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10153 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10154     cat >> confdefs.h <<\EOF
10155 #define HAVE_UT_UT_TV 1
10156 EOF
10157
10158 fi 
10159
10160 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10161 echo "configure:10162: checking for ut_type in utmp" >&5
10162 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10163   echo $ac_n "(cached) $ac_c" 1>&6
10164 else
10165   
10166 cat > conftest.$ac_ext <<EOF
10167 #line 10168 "configure"
10168 #include "confdefs.h"
10169 #include <sys/types.h>
10170 #include <utmp.h>
10171 int main() {
10172 struct utmp ut;  ut.ut_type = 0;
10173 ; return 0; }
10174 EOF
10175 if { (eval echo configure:10176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10176   rm -rf conftest*
10177   samba_cv_HAVE_UT_UT_TYPE=yes
10178 else
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -rf conftest*
10182   samba_cv_HAVE_UT_UT_TYPE=no
10183 fi
10184 rm -f conftest*
10185 fi
10186
10187 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10188 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10189     cat >> confdefs.h <<\EOF
10190 #define HAVE_UT_UT_TYPE 1
10191 EOF
10192
10193 fi 
10194
10195 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10196 echo "configure:10197: checking for ut_pid in utmp" >&5
10197 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10198   echo $ac_n "(cached) $ac_c" 1>&6
10199 else
10200   
10201 cat > conftest.$ac_ext <<EOF
10202 #line 10203 "configure"
10203 #include "confdefs.h"
10204 #include <sys/types.h>
10205 #include <utmp.h>
10206 int main() {
10207 struct utmp ut;  ut.ut_pid = 0;
10208 ; return 0; }
10209 EOF
10210 if { (eval echo configure:10211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10211   rm -rf conftest*
10212   samba_cv_HAVE_UT_UT_PID=yes
10213 else
10214   echo "configure: failed program was:" >&5
10215   cat conftest.$ac_ext >&5
10216   rm -rf conftest*
10217   samba_cv_HAVE_UT_UT_PID=no
10218 fi
10219 rm -f conftest*
10220 fi
10221
10222 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10223 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10224     cat >> confdefs.h <<\EOF
10225 #define HAVE_UT_UT_PID 1
10226 EOF
10227
10228 fi 
10229
10230 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10231 echo "configure:10232: checking for ut_exit in utmp" >&5
10232 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10233   echo $ac_n "(cached) $ac_c" 1>&6
10234 else
10235   
10236 cat > conftest.$ac_ext <<EOF
10237 #line 10238 "configure"
10238 #include "confdefs.h"
10239 #include <sys/types.h>
10240 #include <utmp.h>
10241 int main() {
10242 struct utmp ut;  ut.ut_exit.e_exit = 0;
10243 ; return 0; }
10244 EOF
10245 if { (eval echo configure:10246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10246   rm -rf conftest*
10247   samba_cv_HAVE_UT_UT_EXIT=yes
10248 else
10249   echo "configure: failed program was:" >&5
10250   cat conftest.$ac_ext >&5
10251   rm -rf conftest*
10252   samba_cv_HAVE_UT_UT_EXIT=no
10253 fi
10254 rm -f conftest*
10255 fi
10256
10257 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10258 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10259     cat >> confdefs.h <<\EOF
10260 #define HAVE_UT_UT_EXIT 1
10261 EOF
10262
10263 fi 
10264
10265 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10266 echo "configure:10267: checking for ut_addr in utmp" >&5
10267 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10268   echo $ac_n "(cached) $ac_c" 1>&6
10269 else
10270   
10271 cat > conftest.$ac_ext <<EOF
10272 #line 10273 "configure"
10273 #include "confdefs.h"
10274 #include <sys/types.h>
10275 #include <utmp.h>
10276 int main() {
10277 struct utmp ut;  ut.ut_addr = 0;
10278 ; return 0; }
10279 EOF
10280 if { (eval echo configure:10281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10281   rm -rf conftest*
10282   samba_cv_HAVE_UT_UT_ADDR=yes
10283 else
10284   echo "configure: failed program was:" >&5
10285   cat conftest.$ac_ext >&5
10286   rm -rf conftest*
10287   samba_cv_HAVE_UT_UT_ADDR=no
10288 fi
10289 rm -f conftest*
10290 fi
10291
10292 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10293 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10294     cat >> confdefs.h <<\EOF
10295 #define HAVE_UT_UT_ADDR 1
10296 EOF
10297
10298 fi 
10299
10300 if test x$ac_cv_func_pututline = xyes ; then
10301   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10302 echo "configure:10303: checking whether pututline returns pointer" >&5
10303 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10304   echo $ac_n "(cached) $ac_c" 1>&6
10305 else
10306   
10307   cat > conftest.$ac_ext <<EOF
10308 #line 10309 "configure"
10309 #include "confdefs.h"
10310 #include <sys/types.h>
10311 #include <utmp.h>
10312 int main() {
10313 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10314 ; return 0; }
10315 EOF
10316 if { (eval echo configure:10317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10317   rm -rf conftest*
10318   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10319 else
10320   echo "configure: failed program was:" >&5
10321   cat conftest.$ac_ext >&5
10322   rm -rf conftest*
10323   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10324 fi
10325 rm -f conftest*
10326 fi
10327
10328 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10329   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10330       cat >> confdefs.h <<\EOF
10331 #define PUTUTLINE_RETURNS_UTMP 1
10332 EOF
10333
10334   fi
10335 fi
10336
10337 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10338 echo "configure:10339: checking for ut_syslen in utmpx" >&5
10339 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10340   echo $ac_n "(cached) $ac_c" 1>&6
10341 else
10342   
10343 cat > conftest.$ac_ext <<EOF
10344 #line 10345 "configure"
10345 #include "confdefs.h"
10346 #include <sys/types.h>
10347 #include <utmpx.h>
10348 int main() {
10349 struct utmpx ux;  ux.ut_syslen = 0;
10350 ; return 0; }
10351 EOF
10352 if { (eval echo configure:10353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10353   rm -rf conftest*
10354   samba_cv_HAVE_UX_UT_SYSLEN=yes
10355 else
10356   echo "configure: failed program was:" >&5
10357   cat conftest.$ac_ext >&5
10358   rm -rf conftest*
10359   samba_cv_HAVE_UX_UT_SYSLEN=no
10360 fi
10361 rm -f conftest*
10362 fi
10363
10364 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10365 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10366     cat >> confdefs.h <<\EOF
10367 #define HAVE_UX_UT_SYSLEN 1
10368 EOF
10369
10370 fi 
10371
10372
10373 #################################################
10374 # check for libiconv support
10375 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10376 echo "configure:10377: checking whether to use libiconv" >&5
10377 # Check whether --with-libiconv or --without-libiconv was given.
10378 if test "${with_libiconv+set}" = set; then
10379   withval="$with_libiconv"
10380    case "$withval" in
10381   no)
10382     echo "$ac_t""no" 1>&6
10383     ;;
10384   *)
10385     echo "$ac_t""yes" 1>&6
10386     CFLAGS="$CFLAGS -I$withval/include"
10387     LDFLAGS="$LDFLAGS -L$withval/lib"
10388     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10389 echo "configure:10390: checking for iconv_open in -liconv" >&5
10390 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10391 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10392   echo $ac_n "(cached) $ac_c" 1>&6
10393 else
10394   ac_save_LIBS="$LIBS"
10395 LIBS="-liconv  $LIBS"
10396 cat > conftest.$ac_ext <<EOF
10397 #line 10398 "configure"
10398 #include "confdefs.h"
10399 /* Override any gcc2 internal prototype to avoid an error.  */
10400 /* We use char because int might match the return type of a gcc2
10401     builtin and then its argument prototype would still apply.  */
10402 char iconv_open();
10403
10404 int main() {
10405 iconv_open()
10406 ; return 0; }
10407 EOF
10408 if { (eval echo configure:10409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10409   rm -rf conftest*
10410   eval "ac_cv_lib_$ac_lib_var=yes"
10411 else
10412   echo "configure: failed program was:" >&5
10413   cat conftest.$ac_ext >&5
10414   rm -rf conftest*
10415   eval "ac_cv_lib_$ac_lib_var=no"
10416 fi
10417 rm -f conftest*
10418 LIBS="$ac_save_LIBS"
10419
10420 fi
10421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10422   echo "$ac_t""yes" 1>&6
10423     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10424     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10425   cat >> confdefs.h <<EOF
10426 #define $ac_tr_lib 1
10427 EOF
10428
10429   LIBS="-liconv $LIBS"
10430
10431 else
10432   echo "$ac_t""no" 1>&6
10433 fi
10434
10435     cat >> confdefs.h <<EOF
10436 #define WITH_LIBICONV "${withval}"
10437 EOF
10438
10439     ;;
10440   esac 
10441 else
10442   echo "$ac_t""no" 1>&6
10443
10444 fi
10445
10446
10447
10448 ############
10449 # check for iconv in libc
10450 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10451 echo "configure:10452: checking for working iconv" >&5
10452 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10453   echo $ac_n "(cached) $ac_c" 1>&6
10454 else
10455   
10456 if test "$cross_compiling" = yes; then
10457   samba_cv_HAVE_NATIVE_ICONV=cross
10458 else
10459   cat > conftest.$ac_ext <<EOF
10460 #line 10461 "configure"
10461 #include "confdefs.h"
10462
10463 #include <iconv.h>
10464 main() {
10465        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10466        if (cd == 0 || cd == (iconv_t)-1) return -1;
10467        return 0;
10468 }
10469
10470 EOF
10471 if { (eval echo configure:10472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10472 then
10473   samba_cv_HAVE_NATIVE_ICONV=yes
10474 else
10475   echo "configure: failed program was:" >&5
10476   cat conftest.$ac_ext >&5
10477   rm -fr conftest*
10478   samba_cv_HAVE_NATIVE_ICONV=no
10479 fi
10480 rm -fr conftest*
10481 fi
10482
10483 fi
10484
10485 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10486 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10487     cat >> confdefs.h <<\EOF
10488 #define HAVE_NATIVE_ICONV 1
10489 EOF
10490
10491 fi
10492
10493
10494 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10495 echo "configure:10496: checking for Linux kernel oplocks" >&5
10496 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10497   echo $ac_n "(cached) $ac_c" 1>&6
10498 else
10499   
10500 if test "$cross_compiling" = yes; then
10501   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10502 else
10503   cat > conftest.$ac_ext <<EOF
10504 #line 10505 "configure"
10505 #include "confdefs.h"
10506
10507 #include <sys/types.h>
10508 #include <fcntl.h>
10509 #ifndef F_GETLEASE
10510 #define F_GETLEASE      1025
10511 #endif
10512 main() {
10513        int fd = open("/dev/null", O_RDONLY);
10514        return fcntl(fd, F_GETLEASE, 0) == -1;
10515 }
10516
10517 EOF
10518 if { (eval echo configure:10519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10519 then
10520   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10521 else
10522   echo "configure: failed program was:" >&5
10523   cat conftest.$ac_ext >&5
10524   rm -fr conftest*
10525   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10526 fi
10527 rm -fr conftest*
10528 fi
10529
10530 fi
10531
10532 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10533 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10534     cat >> confdefs.h <<\EOF
10535 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10536 EOF
10537
10538 fi
10539
10540 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10541 echo "configure:10542: checking for kernel change notify support" >&5
10542 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10543   echo $ac_n "(cached) $ac_c" 1>&6
10544 else
10545   
10546 if test "$cross_compiling" = yes; then
10547   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10548 else
10549   cat > conftest.$ac_ext <<EOF
10550 #line 10551 "configure"
10551 #include "confdefs.h"
10552
10553 #include <sys/types.h>
10554 #include <fcntl.h>
10555 #include <signal.h>
10556 #ifndef F_NOTIFY
10557 #define F_NOTIFY 1026
10558 #endif
10559 main() {
10560         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10561 }
10562
10563 EOF
10564 if { (eval echo configure:10565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10565 then
10566   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10567 else
10568   echo "configure: failed program was:" >&5
10569   cat conftest.$ac_ext >&5
10570   rm -fr conftest*
10571   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10572 fi
10573 rm -fr conftest*
10574 fi
10575
10576 fi
10577
10578 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10579 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10580     cat >> confdefs.h <<\EOF
10581 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10582 EOF
10583
10584 fi
10585
10586 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10587 echo "configure:10588: checking for kernel share modes" >&5
10588 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10589   echo $ac_n "(cached) $ac_c" 1>&6
10590 else
10591   
10592 if test "$cross_compiling" = yes; then
10593   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10594 else
10595   cat > conftest.$ac_ext <<EOF
10596 #line 10597 "configure"
10597 #include "confdefs.h"
10598
10599 #include <sys/types.h>
10600 #include <fcntl.h>
10601 #include <signal.h>
10602 #include <sys/file.h>
10603 #ifndef LOCK_MAND
10604 #define LOCK_MAND       32
10605 #define LOCK_READ       64
10606 #endif
10607 main() {
10608         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10609 }
10610
10611 EOF
10612 if { (eval echo configure:10613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10613 then
10614   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10615 else
10616   echo "configure: failed program was:" >&5
10617   cat conftest.$ac_ext >&5
10618   rm -fr conftest*
10619   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10620 fi
10621 rm -fr conftest*
10622 fi
10623
10624 fi
10625
10626 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10627 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10628     cat >> confdefs.h <<\EOF
10629 #define HAVE_KERNEL_SHARE_MODES 1
10630 EOF
10631
10632 fi
10633
10634
10635
10636
10637 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10638 echo "configure:10639: checking for IRIX kernel oplock type definitions" >&5
10639 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10640   echo $ac_n "(cached) $ac_c" 1>&6
10641 else
10642   
10643 cat > conftest.$ac_ext <<EOF
10644 #line 10645 "configure"
10645 #include "confdefs.h"
10646 #include <sys/types.h>
10647 #include <fcntl.h>
10648 int main() {
10649 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10650 ; return 0; }
10651 EOF
10652 if { (eval echo configure:10653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10653   rm -rf conftest*
10654   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10655 else
10656   echo "configure: failed program was:" >&5
10657   cat conftest.$ac_ext >&5
10658   rm -rf conftest*
10659   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10660 fi
10661 rm -f conftest*
10662 fi
10663
10664 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10665 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10666     cat >> confdefs.h <<\EOF
10667 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10668 EOF
10669
10670 fi
10671
10672 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10673 echo "configure:10674: checking for irix specific capabilities" >&5
10674 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10675   echo $ac_n "(cached) $ac_c" 1>&6
10676 else
10677   
10678 if test "$cross_compiling" = yes; then
10679   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10680 else
10681   cat > conftest.$ac_ext <<EOF
10682 #line 10683 "configure"
10683 #include "confdefs.h"
10684 #include <sys/types.h>
10685 #include <sys/capability.h>
10686 main() {
10687  cap_t cap;
10688  if ((cap = cap_get_proc()) == NULL)
10689    exit(1);
10690  cap->cap_effective |= CAP_NETWORK_MGT;
10691  cap->cap_inheritable |= CAP_NETWORK_MGT;
10692  cap_set_proc(cap);
10693  exit(0);
10694 }
10695
10696 EOF
10697 if { (eval echo configure:10698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10698 then
10699   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10700 else
10701   echo "configure: failed program was:" >&5
10702   cat conftest.$ac_ext >&5
10703   rm -fr conftest*
10704   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10705 fi
10706 rm -fr conftest*
10707 fi
10708
10709 fi
10710
10711 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10712 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10713     cat >> confdefs.h <<\EOF
10714 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10715 EOF
10716
10717 fi
10718
10719 #
10720 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10721 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10722 #
10723
10724 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10725 echo "configure:10726: checking for int16 typedef included by rpc/rpc.h" >&5
10726 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10727   echo $ac_n "(cached) $ac_c" 1>&6
10728 else
10729   
10730 cat > conftest.$ac_ext <<EOF
10731 #line 10732 "configure"
10732 #include "confdefs.h"
10733 #include <sys/types.h>
10734 #if defined(HAVE_RPC_RPC_H)
10735 #include <rpc/rpc.h>
10736 #endif
10737 int main() {
10738 int16 testvar;
10739 ; return 0; }
10740 EOF
10741 if { (eval echo configure:10742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10742   rm -rf conftest*
10743   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10744 else
10745   echo "configure: failed program was:" >&5
10746   cat conftest.$ac_ext >&5
10747   rm -rf conftest*
10748   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10749 fi
10750 rm -f conftest*
10751 fi
10752
10753 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10754 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10755     cat >> confdefs.h <<\EOF
10756 #define HAVE_INT16_FROM_RPC_RPC_H 1
10757 EOF
10758
10759 fi
10760
10761 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10762 echo "configure:10763: checking for uint16 typedef included by rpc/rpc.h" >&5
10763 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10764   echo $ac_n "(cached) $ac_c" 1>&6
10765 else
10766   
10767 cat > conftest.$ac_ext <<EOF
10768 #line 10769 "configure"
10769 #include "confdefs.h"
10770 #include <sys/types.h>
10771 #if defined(HAVE_RPC_RPC_H)
10772 #include <rpc/rpc.h>
10773 #endif
10774 int main() {
10775 uint16 testvar;
10776 ; return 0; }
10777 EOF
10778 if { (eval echo configure:10779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10779   rm -rf conftest*
10780   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10781 else
10782   echo "configure: failed program was:" >&5
10783   cat conftest.$ac_ext >&5
10784   rm -rf conftest*
10785   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10786 fi
10787 rm -f conftest*
10788 fi
10789
10790 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10791 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10792     cat >> confdefs.h <<\EOF
10793 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10794 EOF
10795
10796 fi
10797
10798 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10799 echo "configure:10800: checking for int32 typedef included by rpc/rpc.h" >&5
10800 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10801   echo $ac_n "(cached) $ac_c" 1>&6
10802 else
10803   
10804 cat > conftest.$ac_ext <<EOF
10805 #line 10806 "configure"
10806 #include "confdefs.h"
10807 #include <sys/types.h>
10808 #if defined(HAVE_RPC_RPC_H)
10809 #include <rpc/rpc.h>
10810 #endif
10811 int main() {
10812 int32 testvar;
10813 ; return 0; }
10814 EOF
10815 if { (eval echo configure:10816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10816   rm -rf conftest*
10817   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10818 else
10819   echo "configure: failed program was:" >&5
10820   cat conftest.$ac_ext >&5
10821   rm -rf conftest*
10822   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10823 fi
10824 rm -f conftest*
10825 fi
10826
10827 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10828 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10829     cat >> confdefs.h <<\EOF
10830 #define HAVE_INT32_FROM_RPC_RPC_H 1
10831 EOF
10832
10833 fi
10834
10835 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10836 echo "configure:10837: checking for uint32 typedef included by rpc/rpc.h" >&5
10837 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10838   echo $ac_n "(cached) $ac_c" 1>&6
10839 else
10840   
10841 cat > conftest.$ac_ext <<EOF
10842 #line 10843 "configure"
10843 #include "confdefs.h"
10844 #include <sys/types.h>
10845 #if defined(HAVE_RPC_RPC_H)
10846 #include <rpc/rpc.h>
10847 #endif
10848 int main() {
10849 uint32 testvar;
10850 ; return 0; }
10851 EOF
10852 if { (eval echo configure:10853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10853   rm -rf conftest*
10854   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10855 else
10856   echo "configure: failed program was:" >&5
10857   cat conftest.$ac_ext >&5
10858   rm -rf conftest*
10859   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10860 fi
10861 rm -f conftest*
10862 fi
10863
10864 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10865 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10866     cat >> confdefs.h <<\EOF
10867 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10868 EOF
10869
10870 fi
10871
10872
10873 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10874 echo "configure:10875: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10875 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10876   echo $ac_n "(cached) $ac_c" 1>&6
10877 else
10878   
10879 cat > conftest.$ac_ext <<EOF
10880 #line 10881 "configure"
10881 #include "confdefs.h"
10882 #include <sys/types.h>
10883 #ifdef HAVE_SYS_SECURITY_H
10884 #include <sys/security.h>
10885 #include <prot.h>
10886 #endif  /* HAVE_SYS_SECURITY_H */
10887 #if defined(HAVE_RPC_RPC_H)
10888 #include <rpc/rpc.h>
10889 #endif
10890 int main() {
10891 int testvar;
10892 ; return 0; }
10893 EOF
10894 if { (eval echo configure:10895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10895   rm -rf conftest*
10896   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10897 else
10898   echo "configure: failed program was:" >&5
10899   cat conftest.$ac_ext >&5
10900   rm -rf conftest*
10901   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10902 fi
10903 rm -f conftest*
10904 fi
10905
10906 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10907 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10908     cat >> confdefs.h <<\EOF
10909 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10910 EOF
10911
10912 fi
10913
10914 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10915 echo "configure:10916: checking for test routines" >&5
10916 if test "$cross_compiling" = yes; then
10917   echo "configure: warning: cannot run when cross-compiling" 1>&2
10918 else
10919   cat > conftest.$ac_ext <<EOF
10920 #line 10921 "configure"
10921 #include "confdefs.h"
10922 #include "${srcdir-.}/tests/trivial.c"
10923 EOF
10924 if { (eval echo configure:10925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10925 then
10926   echo "$ac_t""yes" 1>&6
10927 else
10928   echo "configure: failed program was:" >&5
10929   cat conftest.$ac_ext >&5
10930   rm -fr conftest*
10931   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10932 fi
10933 rm -fr conftest*
10934 fi
10935
10936
10937 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10938 echo "configure:10939: checking for ftruncate extend" >&5
10939 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10940   echo $ac_n "(cached) $ac_c" 1>&6
10941 else
10942   
10943 if test "$cross_compiling" = yes; then
10944   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10945 else
10946   cat > conftest.$ac_ext <<EOF
10947 #line 10948 "configure"
10948 #include "confdefs.h"
10949 #include "${srcdir-.}/tests/ftruncate.c"
10950 EOF
10951 if { (eval echo configure:10952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10952 then
10953   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10954 else
10955   echo "configure: failed program was:" >&5
10956   cat conftest.$ac_ext >&5
10957   rm -fr conftest*
10958   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10959 fi
10960 rm -fr conftest*
10961 fi
10962
10963 fi
10964
10965 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10966 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10967     cat >> confdefs.h <<\EOF
10968 #define HAVE_FTRUNCATE_EXTEND 1
10969 EOF
10970
10971 fi
10972
10973 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10974 echo "configure:10975: checking for AF_LOCAL socket support" >&5
10975 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10976   echo $ac_n "(cached) $ac_c" 1>&6
10977 else
10978   
10979 if test "$cross_compiling" = yes; then
10980   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10981 else
10982   cat > conftest.$ac_ext <<EOF
10983 #line 10984 "configure"
10984 #include "confdefs.h"
10985 #include "${srcdir-.}/tests/unixsock.c"
10986 EOF
10987 if { (eval echo configure:10988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10988 then
10989   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10990 else
10991   echo "configure: failed program was:" >&5
10992   cat conftest.$ac_ext >&5
10993   rm -fr conftest*
10994   samba_cv_HAVE_WORKING_AF_LOCAL=no
10995 fi
10996 rm -fr conftest*
10997 fi
10998
10999 fi
11000
11001 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
11002 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
11003 then
11004     cat >> confdefs.h <<\EOF
11005 #define HAVE_WORKING_AF_LOCAL 1
11006 EOF
11007
11008 fi
11009
11010 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
11011 echo "configure:11012: checking for broken getgroups" >&5
11012 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
11013   echo $ac_n "(cached) $ac_c" 1>&6
11014 else
11015   
11016 if test "$cross_compiling" = yes; then
11017   samba_cv_HAVE_BROKEN_GETGROUPS=cross
11018 else
11019   cat > conftest.$ac_ext <<EOF
11020 #line 11021 "configure"
11021 #include "confdefs.h"
11022 #include "${srcdir-.}/tests/getgroups.c"
11023 EOF
11024 if { (eval echo configure:11025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11025 then
11026   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11027 else
11028   echo "configure: failed program was:" >&5
11029   cat conftest.$ac_ext >&5
11030   rm -fr conftest*
11031   samba_cv_HAVE_BROKEN_GETGROUPS=no
11032 fi
11033 rm -fr conftest*
11034 fi
11035
11036 fi
11037
11038 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11039 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11040     cat >> confdefs.h <<\EOF
11041 #define HAVE_BROKEN_GETGROUPS 1
11042 EOF
11043
11044 fi
11045
11046 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11047 echo "configure:11048: checking whether getpass should be replaced" >&5
11048 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11049   echo $ac_n "(cached) $ac_c" 1>&6
11050 else
11051   
11052 SAVE_CPPFLAGS="$CPPFLAGS"
11053 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt  -I${srcdir-.}/smbwrapper"
11054 cat > conftest.$ac_ext <<EOF
11055 #line 11056 "configure"
11056 #include "confdefs.h"
11057
11058 #define REPLACE_GETPASS 1
11059 #define NO_CONFIG_H 1
11060 #define main dont_declare_main
11061 #include "${srcdir-.}/lib/getsmbpass.c"
11062 #undef main
11063
11064 int main() {
11065
11066 ; return 0; }
11067 EOF
11068 if { (eval echo configure:11069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11069   rm -rf conftest*
11070   samba_cv_REPLACE_GETPASS=yes
11071 else
11072   echo "configure: failed program was:" >&5
11073   cat conftest.$ac_ext >&5
11074   rm -rf conftest*
11075   samba_cv_REPLACE_GETPASS=no
11076 fi
11077 rm -f conftest*
11078 CPPFLAGS="$SAVE_CPPFLAGS"
11079
11080 fi
11081
11082 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11083 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11084         cat >> confdefs.h <<\EOF
11085 #define REPLACE_GETPASS 1
11086 EOF
11087
11088 fi
11089
11090 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11091 echo "configure:11092: checking for broken inet_ntoa" >&5
11092 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11093   echo $ac_n "(cached) $ac_c" 1>&6
11094 else
11095   
11096 if test "$cross_compiling" = yes; then
11097   samba_cv_REPLACE_INET_NTOA=cross
11098 else
11099   cat > conftest.$ac_ext <<EOF
11100 #line 11101 "configure"
11101 #include "confdefs.h"
11102
11103 #include <stdio.h>
11104 #include <sys/types.h>
11105 #include <netinet/in.h>
11106 #ifdef HAVE_ARPA_INET_H
11107 #include <arpa/inet.h>
11108 #endif
11109 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11110 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11111     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11112 exit(1);}
11113 EOF
11114 if { (eval echo configure:11115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11115 then
11116   samba_cv_REPLACE_INET_NTOA=yes
11117 else
11118   echo "configure: failed program was:" >&5
11119   cat conftest.$ac_ext >&5
11120   rm -fr conftest*
11121   samba_cv_REPLACE_INET_NTOA=no
11122 fi
11123 rm -fr conftest*
11124 fi
11125
11126 fi
11127
11128 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11129 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11130     cat >> confdefs.h <<\EOF
11131 #define REPLACE_INET_NTOA 1
11132 EOF
11133
11134 fi
11135
11136 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11137 echo "configure:11138: checking for secure mkstemp" >&5
11138 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11139   echo $ac_n "(cached) $ac_c" 1>&6
11140 else
11141   
11142 if test "$cross_compiling" = yes; then
11143   samba_cv_HAVE_SECURE_MKSTEMP=cross
11144 else
11145   cat > conftest.$ac_ext <<EOF
11146 #line 11147 "configure"
11147 #include "confdefs.h"
11148 #include <stdlib.h>
11149 #include <sys/types.h>
11150 #include <sys/stat.h>
11151 #include <unistd.h>
11152 main() { 
11153   struct stat st;
11154   char tpl[20]="/tmp/test.XXXXXX"; 
11155   int fd = mkstemp(tpl); 
11156   if (fd == -1) exit(1);
11157   unlink(tpl);
11158   if (fstat(fd, &st) != 0) exit(1);
11159   if ((st.st_mode & 0777) != 0600) exit(1);
11160   exit(0);
11161 }
11162 EOF
11163 if { (eval echo configure:11164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11164 then
11165   samba_cv_HAVE_SECURE_MKSTEMP=yes
11166 else
11167   echo "configure: failed program was:" >&5
11168   cat conftest.$ac_ext >&5
11169   rm -fr conftest*
11170   samba_cv_HAVE_SECURE_MKSTEMP=no
11171 fi
11172 rm -fr conftest*
11173 fi
11174
11175 fi
11176
11177 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11178 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11179     cat >> confdefs.h <<\EOF
11180 #define HAVE_SECURE_MKSTEMP 1
11181 EOF
11182
11183 fi
11184
11185 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11186 echo "configure:11187: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11187 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11188   echo $ac_n "(cached) $ac_c" 1>&6
11189 else
11190   
11191 if test "$cross_compiling" = yes; then
11192   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11193 else
11194   cat > conftest.$ac_ext <<EOF
11195 #line 11196 "configure"
11196 #include "confdefs.h"
11197 #include <unistd.h>
11198 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11199 EOF
11200 if { (eval echo configure:11201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11201 then
11202   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11203 else
11204   echo "configure: failed program was:" >&5
11205   cat conftest.$ac_ext >&5
11206   rm -fr conftest*
11207   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11208 fi
11209 rm -fr conftest*
11210 fi
11211
11212 fi
11213
11214 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11215 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11216     cat >> confdefs.h <<\EOF
11217 #define SYSCONF_SC_NGROUPS_MAX 1
11218 EOF
11219
11220 fi
11221
11222 echo $ac_n "checking for root""... $ac_c" 1>&6
11223 echo "configure:11224: checking for root" >&5
11224 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11225   echo $ac_n "(cached) $ac_c" 1>&6
11226 else
11227   
11228 if test "$cross_compiling" = yes; then
11229   samba_cv_HAVE_ROOT=cross
11230 else
11231   cat > conftest.$ac_ext <<EOF
11232 #line 11233 "configure"
11233 #include "confdefs.h"
11234 main() { exit(getuid() != 0); }
11235 EOF
11236 if { (eval echo configure:11237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11237 then
11238   samba_cv_HAVE_ROOT=yes
11239 else
11240   echo "configure: failed program was:" >&5
11241   cat conftest.$ac_ext >&5
11242   rm -fr conftest*
11243   samba_cv_HAVE_ROOT=no
11244 fi
11245 rm -fr conftest*
11246 fi
11247
11248 fi
11249
11250 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11251 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11252     cat >> confdefs.h <<\EOF
11253 #define HAVE_ROOT 1
11254 EOF
11255
11256 else
11257     echo "configure: warning: running as non-root will disable some tests" 1>&2
11258 fi
11259
11260 ##################
11261 # look for a method of finding the list of network interfaces
11262 iface=no;
11263 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11264 echo "configure:11265: checking for iface AIX" >&5
11265 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11266   echo $ac_n "(cached) $ac_c" 1>&6
11267 else
11268   
11269 if test "$cross_compiling" = yes; then
11270   samba_cv_HAVE_IFACE_AIX=cross
11271 else
11272   cat > conftest.$ac_ext <<EOF
11273 #line 11274 "configure"
11274 #include "confdefs.h"
11275
11276 #define HAVE_IFACE_AIX 1
11277 #define AUTOCONF_TEST 1
11278 #include "confdefs.h"
11279 #include "${srcdir-.}/lib/interfaces.c"
11280 EOF
11281 if { (eval echo configure:11282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11282 then
11283   samba_cv_HAVE_IFACE_AIX=yes
11284 else
11285   echo "configure: failed program was:" >&5
11286   cat conftest.$ac_ext >&5
11287   rm -fr conftest*
11288   samba_cv_HAVE_IFACE_AIX=no
11289 fi
11290 rm -fr conftest*
11291 fi
11292
11293 fi
11294
11295 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11296 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11297     iface=yes;cat >> confdefs.h <<\EOF
11298 #define HAVE_IFACE_AIX 1
11299 EOF
11300
11301 fi
11302
11303 if test $iface = no; then
11304 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11305 echo "configure:11306: checking for iface ifconf" >&5
11306 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11307   echo $ac_n "(cached) $ac_c" 1>&6
11308 else
11309   
11310 if test "$cross_compiling" = yes; then
11311   samba_cv_HAVE_IFACE_IFCONF=cross
11312 else
11313   cat > conftest.$ac_ext <<EOF
11314 #line 11315 "configure"
11315 #include "confdefs.h"
11316
11317 #define HAVE_IFACE_IFCONF 1
11318 #define AUTOCONF_TEST 1
11319 #include "confdefs.h"
11320 #include "${srcdir-.}/lib/interfaces.c"
11321 EOF
11322 if { (eval echo configure:11323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11323 then
11324   samba_cv_HAVE_IFACE_IFCONF=yes
11325 else
11326   echo "configure: failed program was:" >&5
11327   cat conftest.$ac_ext >&5
11328   rm -fr conftest*
11329   samba_cv_HAVE_IFACE_IFCONF=no
11330 fi
11331 rm -fr conftest*
11332 fi
11333
11334 fi
11335
11336 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11337 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11338     iface=yes;cat >> confdefs.h <<\EOF
11339 #define HAVE_IFACE_IFCONF 1
11340 EOF
11341
11342 fi
11343 fi
11344
11345 if test $iface = no; then
11346 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11347 echo "configure:11348: checking for iface ifreq" >&5
11348 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11349   echo $ac_n "(cached) $ac_c" 1>&6
11350 else
11351   
11352 if test "$cross_compiling" = yes; then
11353   samba_cv_HAVE_IFACE_IFREQ=cross
11354 else
11355   cat > conftest.$ac_ext <<EOF
11356 #line 11357 "configure"
11357 #include "confdefs.h"
11358
11359 #define HAVE_IFACE_IFREQ 1
11360 #define AUTOCONF_TEST 1
11361 #include "confdefs.h"
11362 #include "${srcdir-.}/lib/interfaces.c"
11363 EOF
11364 if { (eval echo configure:11365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11365 then
11366   samba_cv_HAVE_IFACE_IFREQ=yes
11367 else
11368   echo "configure: failed program was:" >&5
11369   cat conftest.$ac_ext >&5
11370   rm -fr conftest*
11371   samba_cv_HAVE_IFACE_IFREQ=no
11372 fi
11373 rm -fr conftest*
11374 fi
11375
11376 fi
11377
11378 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11379 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11380     iface=yes;cat >> confdefs.h <<\EOF
11381 #define HAVE_IFACE_IFREQ 1
11382 EOF
11383
11384 fi
11385 fi
11386
11387
11388 ################################################
11389 # look for a method of setting the effective uid
11390 seteuid=no;
11391 if test $seteuid = no; then
11392 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11393 echo "configure:11394: checking for setresuid" >&5
11394 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11395   echo $ac_n "(cached) $ac_c" 1>&6
11396 else
11397   
11398 if test "$cross_compiling" = yes; then
11399   samba_cv_USE_SETRESUID=cross
11400 else
11401   cat > conftest.$ac_ext <<EOF
11402 #line 11403 "configure"
11403 #include "confdefs.h"
11404
11405 #define AUTOCONF_TEST 1
11406 #define USE_SETRESUID 1
11407 #include "confdefs.h"
11408 #include "${srcdir-.}/lib/util_sec.c"
11409 EOF
11410 if { (eval echo configure:11411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11411 then
11412   samba_cv_USE_SETRESUID=yes
11413 else
11414   echo "configure: failed program was:" >&5
11415   cat conftest.$ac_ext >&5
11416   rm -fr conftest*
11417   samba_cv_USE_SETRESUID=no
11418 fi
11419 rm -fr conftest*
11420 fi
11421
11422 fi
11423
11424 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11425 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11426     seteuid=yes;cat >> confdefs.h <<\EOF
11427 #define USE_SETRESUID 1
11428 EOF
11429
11430 fi
11431 fi
11432
11433
11434 if test $seteuid = no; then
11435 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11436 echo "configure:11437: checking for setreuid" >&5
11437 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11438   echo $ac_n "(cached) $ac_c" 1>&6
11439 else
11440   
11441 if test "$cross_compiling" = yes; then
11442   samba_cv_USE_SETREUID=cross
11443 else
11444   cat > conftest.$ac_ext <<EOF
11445 #line 11446 "configure"
11446 #include "confdefs.h"
11447
11448 #define AUTOCONF_TEST 1
11449 #define USE_SETREUID 1
11450 #include "confdefs.h"
11451 #include "${srcdir-.}/lib/util_sec.c"
11452 EOF
11453 if { (eval echo configure:11454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11454 then
11455   samba_cv_USE_SETREUID=yes
11456 else
11457   echo "configure: failed program was:" >&5
11458   cat conftest.$ac_ext >&5
11459   rm -fr conftest*
11460   samba_cv_USE_SETREUID=no
11461 fi
11462 rm -fr conftest*
11463 fi
11464
11465 fi
11466
11467 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11468 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11469     seteuid=yes;cat >> confdefs.h <<\EOF
11470 #define USE_SETREUID 1
11471 EOF
11472
11473 fi
11474 fi
11475
11476 if test $seteuid = no; then
11477 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11478 echo "configure:11479: checking for seteuid" >&5
11479 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11480   echo $ac_n "(cached) $ac_c" 1>&6
11481 else
11482   
11483 if test "$cross_compiling" = yes; then
11484   samba_cv_USE_SETEUID=cross
11485 else
11486   cat > conftest.$ac_ext <<EOF
11487 #line 11488 "configure"
11488 #include "confdefs.h"
11489
11490 #define AUTOCONF_TEST 1
11491 #define USE_SETEUID 1
11492 #include "confdefs.h"
11493 #include "${srcdir-.}/lib/util_sec.c"
11494 EOF
11495 if { (eval echo configure:11496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11496 then
11497   samba_cv_USE_SETEUID=yes
11498 else
11499   echo "configure: failed program was:" >&5
11500   cat conftest.$ac_ext >&5
11501   rm -fr conftest*
11502   samba_cv_USE_SETEUID=no
11503 fi
11504 rm -fr conftest*
11505 fi
11506
11507 fi
11508
11509 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11510 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11511     seteuid=yes;cat >> confdefs.h <<\EOF
11512 #define USE_SETEUID 1
11513 EOF
11514
11515 fi
11516 fi
11517
11518 if test $seteuid = no; then
11519 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11520 echo "configure:11521: checking for setuidx" >&5
11521 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11522   echo $ac_n "(cached) $ac_c" 1>&6
11523 else
11524   
11525 if test "$cross_compiling" = yes; then
11526   samba_cv_USE_SETUIDX=cross
11527 else
11528   cat > conftest.$ac_ext <<EOF
11529 #line 11530 "configure"
11530 #include "confdefs.h"
11531
11532 #define AUTOCONF_TEST 1
11533 #define USE_SETUIDX 1
11534 #include "confdefs.h"
11535 #include "${srcdir-.}/lib/util_sec.c"
11536 EOF
11537 if { (eval echo configure:11538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11538 then
11539   samba_cv_USE_SETUIDX=yes
11540 else
11541   echo "configure: failed program was:" >&5
11542   cat conftest.$ac_ext >&5
11543   rm -fr conftest*
11544   samba_cv_USE_SETUIDX=no
11545 fi
11546 rm -fr conftest*
11547 fi
11548
11549 fi
11550
11551 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11552 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11553     seteuid=yes;cat >> confdefs.h <<\EOF
11554 #define USE_SETUIDX 1
11555 EOF
11556
11557 fi
11558 fi
11559
11560
11561 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11562 echo "configure:11563: checking for working mmap" >&5
11563 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11564   echo $ac_n "(cached) $ac_c" 1>&6
11565 else
11566   
11567 if test "$cross_compiling" = yes; then
11568   samba_cv_HAVE_MMAP=cross
11569 else
11570   cat > conftest.$ac_ext <<EOF
11571 #line 11572 "configure"
11572 #include "confdefs.h"
11573 #include "${srcdir-.}/tests/shared_mmap.c"
11574 EOF
11575 if { (eval echo configure:11576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11576 then
11577   samba_cv_HAVE_MMAP=yes
11578 else
11579   echo "configure: failed program was:" >&5
11580   cat conftest.$ac_ext >&5
11581   rm -fr conftest*
11582   samba_cv_HAVE_MMAP=no
11583 fi
11584 rm -fr conftest*
11585 fi
11586
11587 fi
11588
11589 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11590 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11591     cat >> confdefs.h <<\EOF
11592 #define HAVE_MMAP 1
11593 EOF
11594
11595 fi
11596
11597 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11598 echo "configure:11599: checking for ftruncate needs root" >&5
11599 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11600   echo $ac_n "(cached) $ac_c" 1>&6
11601 else
11602   
11603 if test "$cross_compiling" = yes; then
11604   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11605 else
11606   cat > conftest.$ac_ext <<EOF
11607 #line 11608 "configure"
11608 #include "confdefs.h"
11609 #include "${srcdir-.}/tests/ftruncroot.c"
11610 EOF
11611 if { (eval echo configure:11612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11612 then
11613   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11614 else
11615   echo "configure: failed program was:" >&5
11616   cat conftest.$ac_ext >&5
11617   rm -fr conftest*
11618   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11619 fi
11620 rm -fr conftest*
11621 fi
11622
11623 fi
11624
11625 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11626 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11627     cat >> confdefs.h <<\EOF
11628 #define FTRUNCATE_NEEDS_ROOT 1
11629 EOF
11630
11631 fi
11632
11633 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11634 echo "configure:11635: checking for fcntl locking" >&5
11635 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11636   echo $ac_n "(cached) $ac_c" 1>&6
11637 else
11638   
11639 if test "$cross_compiling" = yes; then
11640   samba_cv_HAVE_FCNTL_LOCK=cross
11641 else
11642   cat > conftest.$ac_ext <<EOF
11643 #line 11644 "configure"
11644 #include "confdefs.h"
11645 #include "${srcdir-.}/tests/fcntl_lock.c"
11646 EOF
11647 if { (eval echo configure:11648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11648 then
11649   samba_cv_HAVE_FCNTL_LOCK=yes
11650 else
11651   echo "configure: failed program was:" >&5
11652   cat conftest.$ac_ext >&5
11653   rm -fr conftest*
11654   samba_cv_HAVE_FCNTL_LOCK=no
11655 fi
11656 rm -fr conftest*
11657 fi
11658
11659 fi
11660
11661 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11662 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11663     cat >> confdefs.h <<\EOF
11664 #define HAVE_FCNTL_LOCK 1
11665 EOF
11666
11667 fi
11668
11669 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11670 echo "configure:11671: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11671 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11672   echo $ac_n "(cached) $ac_c" 1>&6
11673 else
11674   
11675 if test "$cross_compiling" = yes; then
11676   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11677 else
11678   cat > conftest.$ac_ext <<EOF
11679 #line 11680 "configure"
11680 #include "confdefs.h"
11681 #include "${srcdir-.}/tests/fcntl_lock64.c"
11682 EOF
11683 if { (eval echo configure:11684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11684 then
11685   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11686 else
11687   echo "configure: failed program was:" >&5
11688   cat conftest.$ac_ext >&5
11689   rm -fr conftest*
11690   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11691 fi
11692 rm -fr conftest*
11693 fi
11694
11695 fi
11696
11697 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11698 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11699     cat >> confdefs.h <<\EOF
11700 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11701 EOF
11702
11703
11704 else
11705
11706
11707   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11708 echo "configure:11709: checking for 64 bit fcntl locking" >&5
11709 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11710   echo $ac_n "(cached) $ac_c" 1>&6
11711 else
11712   
11713   if test "$cross_compiling" = yes; then
11714   samba_cv_HAVE_STRUCT_FLOCK64=cross
11715 else
11716   cat > conftest.$ac_ext <<EOF
11717 #line 11718 "configure"
11718 #include "confdefs.h"
11719
11720 #if defined(HAVE_UNISTD_H)
11721 #include <unistd.h>
11722 #endif
11723 #include <stdio.h>
11724 #include <stdlib.h>
11725
11726 #ifdef HAVE_FCNTL_H
11727 #include <fcntl.h>
11728 #endif
11729
11730 #ifdef HAVE_SYS_FCNTL_H
11731 #include <sys/fcntl.h>
11732 #endif
11733 main() { struct flock64 fl64;
11734 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11735 exit(0);
11736 #else
11737 exit(1);
11738 #endif
11739 }
11740 EOF
11741 if { (eval echo configure:11742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11742 then
11743   samba_cv_HAVE_STRUCT_FLOCK64=yes
11744 else
11745   echo "configure: failed program was:" >&5
11746   cat conftest.$ac_ext >&5
11747   rm -fr conftest*
11748   samba_cv_HAVE_STRUCT_FLOCK64=no
11749 fi
11750 rm -fr conftest*
11751 fi
11752
11753 fi
11754
11755 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11756
11757   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11758       cat >> confdefs.h <<\EOF
11759 #define HAVE_STRUCT_FLOCK64 1
11760 EOF
11761
11762   fi
11763 fi
11764
11765 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11766 echo "configure:11767: checking for st_blocks in struct stat" >&5
11767 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11768   echo $ac_n "(cached) $ac_c" 1>&6
11769 else
11770   
11771 cat > conftest.$ac_ext <<EOF
11772 #line 11773 "configure"
11773 #include "confdefs.h"
11774 #include <sys/types.h>
11775 #include <sys/stat.h>
11776 #include <unistd.h>
11777 int main() {
11778 struct stat st;  st.st_blocks = 0;
11779 ; return 0; }
11780 EOF
11781 if { (eval echo configure:11782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11782   rm -rf conftest*
11783   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11784 else
11785   echo "configure: failed program was:" >&5
11786   cat conftest.$ac_ext >&5
11787   rm -rf conftest*
11788   samba_cv_HAVE_STAT_ST_BLOCKS=no
11789 fi
11790 rm -f conftest*
11791 fi
11792
11793 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11794 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11795     cat >> confdefs.h <<\EOF
11796 #define HAVE_STAT_ST_BLOCKS 1
11797 EOF
11798
11799 fi 
11800
11801 case "$host_os" in
11802 *linux*)
11803 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11804 echo "configure:11805: checking for broken RedHat 7.2 system header files" >&5
11805 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11806   echo $ac_n "(cached) $ac_c" 1>&6
11807 else
11808   
11809 cat > conftest.$ac_ext <<EOF
11810 #line 11811 "configure"
11811 #include "confdefs.h"
11812
11813 #ifdef HAVE_SYS_VFS_H
11814 #include <sys/vfs.h>
11815 #endif
11816 #ifdef HAVE_SYS_CAPABILITY_H
11817 #include <sys/capability.h>
11818 #endif
11819
11820 int main() {
11821 int i;
11822 ; return 0; }
11823 EOF
11824 if { (eval echo configure:11825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11825   rm -rf conftest*
11826   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11827 else
11828   echo "configure: failed program was:" >&5
11829   cat conftest.$ac_ext >&5
11830   rm -rf conftest*
11831   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11832 fi
11833 rm -f conftest*
11834 fi
11835
11836 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11837 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11838    cat >> confdefs.h <<\EOF
11839 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11840 EOF
11841
11842 fi
11843 ;;
11844 esac
11845
11846 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11847 echo "configure:11848: checking for broken nisplus include files" >&5
11848 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11849   echo $ac_n "(cached) $ac_c" 1>&6
11850 else
11851   
11852 cat > conftest.$ac_ext <<EOF
11853 #line 11854 "configure"
11854 #include "confdefs.h"
11855 #include <sys/acl.h>
11856 #if defined(HAVE_RPCSVC_NIS_H)
11857 #include <rpcsvc/nis.h>
11858 #endif
11859 int main() {
11860 int i;
11861 ; return 0; }
11862 EOF
11863 if { (eval echo configure:11864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11864   rm -rf conftest*
11865   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11866 else
11867   echo "configure: failed program was:" >&5
11868   cat conftest.$ac_ext >&5
11869   rm -rf conftest*
11870   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11871 fi
11872 rm -f conftest*
11873 fi
11874
11875 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11876 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11877     cat >> confdefs.h <<\EOF
11878 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11879 EOF
11880
11881 fi
11882
11883
11884 #################################################
11885 # check for smbwrapper support
11886 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11887 echo "configure:11888: checking whether to use smbwrapper" >&5
11888 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11889 if test "${with_smbwrapper+set}" = set; then
11890   withval="$with_smbwrapper"
11891    case "$withval" in
11892   yes)
11893     echo "$ac_t""yes" 1>&6
11894     cat >> confdefs.h <<\EOF
11895 #define WITH_SMBWRAPPER 1
11896 EOF
11897
11898         WRAPPROG="bin/smbsh"
11899         WRAP="bin/smbwrapper.$SHLIBEXT"
11900
11901         if test x$ATTEMPT_WRAP32_BUILD = x; then
11902                 WRAP32=""
11903         else
11904                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11905         fi
11906
11907 # Conditions under which smbwrapper should not be built.
11908
11909         if test x$PICFLAG = x; then
11910            echo No support for PIC code - disabling smbwrapper and smbsh
11911            WRAPPROG=""
11912            WRAP=""
11913            WRAP32=""
11914         elif test x$ac_cv_func_syscall = xno; then
11915            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11916            WRAPPROG=""
11917            WRAP=""
11918            WRAP32=""
11919         fi
11920     ;;
11921   *)
11922     echo "$ac_t""no" 1>&6
11923     ;;
11924   esac 
11925 else
11926   echo "$ac_t""no" 1>&6
11927
11928 fi
11929
11930
11931 #################################################
11932 # check for AFS clear-text auth support
11933 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11934 echo "configure:11935: checking whether to use AFS clear-text auth" >&5
11935 # Check whether --with-afs or --without-afs was given.
11936 if test "${with_afs+set}" = set; then
11937   withval="$with_afs"
11938    case "$withval" in
11939   yes)
11940     echo "$ac_t""yes" 1>&6
11941     cat >> confdefs.h <<\EOF
11942 #define WITH_AFS 1
11943 EOF
11944
11945     ;;
11946   *)
11947     echo "$ac_t""no" 1>&6
11948     ;;
11949   esac 
11950 else
11951   echo "$ac_t""no" 1>&6
11952
11953 fi
11954
11955
11956
11957 #################################################
11958 # check for the DFS clear-text auth system
11959 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11960 echo "configure:11961: checking whether to use DFS clear-text auth" >&5
11961 # Check whether --with-dfs or --without-dfs was given.
11962 if test "${with_dfs+set}" = set; then
11963   withval="$with_dfs"
11964    case "$withval" in
11965   yes)
11966     echo "$ac_t""yes" 1>&6
11967     cat >> confdefs.h <<\EOF
11968 #define WITH_DFS 1
11969 EOF
11970
11971     ;;
11972   *)
11973     echo "$ac_t""no" 1>&6
11974     ;;
11975   esac 
11976 else
11977   echo "$ac_t""no" 1>&6
11978
11979 fi
11980
11981
11982
11983 #################################################
11984 # see if this box has the RedHat location for kerberos
11985 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11986 echo "configure:11987: checking for /usr/kerberos" >&5
11987 if test -d /usr/kerberos; then
11988     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11989     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11990     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11991     echo "$ac_t""yes" 1>&6
11992 else
11993     echo "$ac_t""no" 1>&6
11994 fi
11995
11996 #################################################
11997 # check for location of Kerberos 5 install
11998 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11999 echo "configure:12000: checking for kerberos 5 install path" >&5
12000 # Check whether --with-krb5 or --without-krb5 was given.
12001 if test "${with_krb5+set}" = set; then
12002   withval="$with_krb5"
12003    case "$withval" in
12004   no)
12005     echo "$ac_t""no" 1>&6
12006     ;;
12007   *)
12008     echo "$ac_t""yes" 1>&6
12009     LIBS="$LIBS -lkrb5"
12010     CFLAGS="$CFLAGS -I$withval/include"
12011     CPPFLAGS="$CPPFLAGS -I$withval/include"
12012     LDFLAGS="$LDFLAGS -L$withval/lib"
12013     ;;
12014   esac 
12015 else
12016   echo "$ac_t""no" 1>&6
12017
12018 fi
12019
12020
12021 # now check for krb5.h. Some systems have the libraries without the headers!
12022 # note that this check is done here to allow for different kerberos
12023 # include paths
12024 for ac_hdr in krb5.h
12025 do
12026 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12027 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12028 echo "configure:12029: checking for $ac_hdr" >&5
12029 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12030   echo $ac_n "(cached) $ac_c" 1>&6
12031 else
12032   cat > conftest.$ac_ext <<EOF
12033 #line 12034 "configure"
12034 #include "confdefs.h"
12035 #include <$ac_hdr>
12036 EOF
12037 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12038 { (eval echo configure:12039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12039 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12040 if test -z "$ac_err"; then
12041   rm -rf conftest*
12042   eval "ac_cv_header_$ac_safe=yes"
12043 else
12044   echo "$ac_err" >&5
12045   echo "configure: failed program was:" >&5
12046   cat conftest.$ac_ext >&5
12047   rm -rf conftest*
12048   eval "ac_cv_header_$ac_safe=no"
12049 fi
12050 rm -f conftest*
12051 fi
12052 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12053   echo "$ac_t""yes" 1>&6
12054     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12055   cat >> confdefs.h <<EOF
12056 #define $ac_tr_hdr 1
12057 EOF
12058  
12059 else
12060   echo "$ac_t""no" 1>&6
12061 fi
12062 done
12063
12064
12065 # now check for gssapi headers.  This is also done here to allow for
12066 # different kerberos include paths
12067 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12068 do
12069 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12070 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12071 echo "configure:12072: checking for $ac_hdr" >&5
12072 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12073   echo $ac_n "(cached) $ac_c" 1>&6
12074 else
12075   cat > conftest.$ac_ext <<EOF
12076 #line 12077 "configure"
12077 #include "confdefs.h"
12078 #include <$ac_hdr>
12079 EOF
12080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12081 { (eval echo configure:12082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12083 if test -z "$ac_err"; then
12084   rm -rf conftest*
12085   eval "ac_cv_header_$ac_safe=yes"
12086 else
12087   echo "$ac_err" >&5
12088   echo "configure: failed program was:" >&5
12089   cat conftest.$ac_ext >&5
12090   rm -rf conftest*
12091   eval "ac_cv_header_$ac_safe=no"
12092 fi
12093 rm -f conftest*
12094 fi
12095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12096   echo "$ac_t""yes" 1>&6
12097     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12098   cat >> confdefs.h <<EOF
12099 #define $ac_tr_hdr 1
12100 EOF
12101  
12102 else
12103   echo "$ac_t""no" 1>&6
12104 fi
12105 done
12106
12107
12108 ##################################################################
12109 # we might need the k5crypto and com_err libraries on some systems
12110 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12111 echo "configure:12112: checking for _et_list in -lcom_err" >&5
12112 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12113 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12114   echo $ac_n "(cached) $ac_c" 1>&6
12115 else
12116   ac_save_LIBS="$LIBS"
12117 LIBS="-lcom_err  $LIBS"
12118 cat > conftest.$ac_ext <<EOF
12119 #line 12120 "configure"
12120 #include "confdefs.h"
12121 /* Override any gcc2 internal prototype to avoid an error.  */
12122 /* We use char because int might match the return type of a gcc2
12123     builtin and then its argument prototype would still apply.  */
12124 char _et_list();
12125
12126 int main() {
12127 _et_list()
12128 ; return 0; }
12129 EOF
12130 if { (eval echo configure:12131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12131   rm -rf conftest*
12132   eval "ac_cv_lib_$ac_lib_var=yes"
12133 else
12134   echo "configure: failed program was:" >&5
12135   cat conftest.$ac_ext >&5
12136   rm -rf conftest*
12137   eval "ac_cv_lib_$ac_lib_var=no"
12138 fi
12139 rm -f conftest*
12140 LIBS="$ac_save_LIBS"
12141
12142 fi
12143 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12144   echo "$ac_t""yes" 1>&6
12145   LIBS="$LIBS -lcom_err"
12146 else
12147   echo "$ac_t""no" 1>&6
12148 fi
12149
12150 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12151 echo "configure:12152: checking for krb5_encrypt_data in -lk5crypto" >&5
12152 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12153 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12154   echo $ac_n "(cached) $ac_c" 1>&6
12155 else
12156   ac_save_LIBS="$LIBS"
12157 LIBS="-lk5crypto  $LIBS"
12158 cat > conftest.$ac_ext <<EOF
12159 #line 12160 "configure"
12160 #include "confdefs.h"
12161 /* Override any gcc2 internal prototype to avoid an error.  */
12162 /* We use char because int might match the return type of a gcc2
12163     builtin and then its argument prototype would still apply.  */
12164 char krb5_encrypt_data();
12165
12166 int main() {
12167 krb5_encrypt_data()
12168 ; return 0; }
12169 EOF
12170 if { (eval echo configure:12171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12171   rm -rf conftest*
12172   eval "ac_cv_lib_$ac_lib_var=yes"
12173 else
12174   echo "configure: failed program was:" >&5
12175   cat conftest.$ac_ext >&5
12176   rm -rf conftest*
12177   eval "ac_cv_lib_$ac_lib_var=no"
12178 fi
12179 rm -f conftest*
12180 LIBS="$ac_save_LIBS"
12181
12182 fi
12183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12184   echo "$ac_t""yes" 1>&6
12185   LIBS="$LIBS -lk5crypto"
12186 else
12187   echo "$ac_t""no" 1>&6
12188 fi
12189
12190
12191 ########################################################
12192 # now see if we can find the krb5 libs in standard paths
12193 # or as specified above
12194 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12195 echo "configure:12196: checking for krb5_mk_req_extended in -lkrb5" >&5
12196 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12197 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12198   echo $ac_n "(cached) $ac_c" 1>&6
12199 else
12200   ac_save_LIBS="$LIBS"
12201 LIBS="-lkrb5  $LIBS"
12202 cat > conftest.$ac_ext <<EOF
12203 #line 12204 "configure"
12204 #include "confdefs.h"
12205 /* Override any gcc2 internal prototype to avoid an error.  */
12206 /* We use char because int might match the return type of a gcc2
12207     builtin and then its argument prototype would still apply.  */
12208 char krb5_mk_req_extended();
12209
12210 int main() {
12211 krb5_mk_req_extended()
12212 ; return 0; }
12213 EOF
12214 if { (eval echo configure:12215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12215   rm -rf conftest*
12216   eval "ac_cv_lib_$ac_lib_var=yes"
12217 else
12218   echo "configure: failed program was:" >&5
12219   cat conftest.$ac_ext >&5
12220   rm -rf conftest*
12221   eval "ac_cv_lib_$ac_lib_var=no"
12222 fi
12223 rm -f conftest*
12224 LIBS="$ac_save_LIBS"
12225
12226 fi
12227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12228   echo "$ac_t""yes" 1>&6
12229   LIBS="$LIBS -lkrb5";
12230         cat >> confdefs.h <<\EOF
12231 #define HAVE_KRB5 1
12232 EOF
12233
12234 else
12235   echo "$ac_t""no" 1>&6
12236 fi
12237
12238
12239 ########################################################
12240 # now see if we can find the gssapi libs in standard paths
12241 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12242 echo "configure:12243: checking for gss_display_status in -lgssapi_krb5" >&5
12243 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12244 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12245   echo $ac_n "(cached) $ac_c" 1>&6
12246 else
12247   ac_save_LIBS="$LIBS"
12248 LIBS="-lgssapi_krb5  $LIBS"
12249 cat > conftest.$ac_ext <<EOF
12250 #line 12251 "configure"
12251 #include "confdefs.h"
12252 /* Override any gcc2 internal prototype to avoid an error.  */
12253 /* We use char because int might match the return type of a gcc2
12254     builtin and then its argument prototype would still apply.  */
12255 char gss_display_status();
12256
12257 int main() {
12258 gss_display_status()
12259 ; return 0; }
12260 EOF
12261 if { (eval echo configure:12262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12262   rm -rf conftest*
12263   eval "ac_cv_lib_$ac_lib_var=yes"
12264 else
12265   echo "configure: failed program was:" >&5
12266   cat conftest.$ac_ext >&5
12267   rm -rf conftest*
12268   eval "ac_cv_lib_$ac_lib_var=no"
12269 fi
12270 rm -f conftest*
12271 LIBS="$ac_save_LIBS"
12272
12273 fi
12274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12275   echo "$ac_t""yes" 1>&6
12276   LIBS="$LIBS -lgssapi_krb5";
12277         cat >> confdefs.h <<\EOF
12278 #define HAVE_GSSAPI 1
12279 EOF
12280
12281 else
12282   echo "$ac_t""no" 1>&6
12283 fi
12284
12285
12286 ##################################################################
12287 # we might need the lber lib on some systems. To avoid link errors
12288 # this test must be before the libldap test
12289 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12290 echo "configure:12291: checking for ber_scanf in -llber" >&5
12291 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12292 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12293   echo $ac_n "(cached) $ac_c" 1>&6
12294 else
12295   ac_save_LIBS="$LIBS"
12296 LIBS="-llber  $LIBS"
12297 cat > conftest.$ac_ext <<EOF
12298 #line 12299 "configure"
12299 #include "confdefs.h"
12300 /* Override any gcc2 internal prototype to avoid an error.  */
12301 /* We use char because int might match the return type of a gcc2
12302     builtin and then its argument prototype would still apply.  */
12303 char ber_scanf();
12304
12305 int main() {
12306 ber_scanf()
12307 ; return 0; }
12308 EOF
12309 if { (eval echo configure:12310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12310   rm -rf conftest*
12311   eval "ac_cv_lib_$ac_lib_var=yes"
12312 else
12313   echo "configure: failed program was:" >&5
12314   cat conftest.$ac_ext >&5
12315   rm -rf conftest*
12316   eval "ac_cv_lib_$ac_lib_var=no"
12317 fi
12318 rm -f conftest*
12319 LIBS="$ac_save_LIBS"
12320
12321 fi
12322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12323   echo "$ac_t""yes" 1>&6
12324   LIBS="$LIBS -llber"
12325 else
12326   echo "$ac_t""no" 1>&6
12327 fi
12328
12329
12330 ########################################################
12331 # now see if we can find the ldap libs in standard paths
12332 if test x$have_ldap != xyes; then
12333 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12334 echo "configure:12335: checking for ldap_domain2hostlist in -lldap" >&5
12335 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12336 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12337   echo $ac_n "(cached) $ac_c" 1>&6
12338 else
12339   ac_save_LIBS="$LIBS"
12340 LIBS="-lldap  $LIBS"
12341 cat > conftest.$ac_ext <<EOF
12342 #line 12343 "configure"
12343 #include "confdefs.h"
12344 /* Override any gcc2 internal prototype to avoid an error.  */
12345 /* We use char because int might match the return type of a gcc2
12346     builtin and then its argument prototype would still apply.  */
12347 char ldap_domain2hostlist();
12348
12349 int main() {
12350 ldap_domain2hostlist()
12351 ; return 0; }
12352 EOF
12353 if { (eval echo configure:12354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12354   rm -rf conftest*
12355   eval "ac_cv_lib_$ac_lib_var=yes"
12356 else
12357   echo "configure: failed program was:" >&5
12358   cat conftest.$ac_ext >&5
12359   rm -rf conftest*
12360   eval "ac_cv_lib_$ac_lib_var=no"
12361 fi
12362 rm -f conftest*
12363 LIBS="$ac_save_LIBS"
12364
12365 fi
12366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12367   echo "$ac_t""yes" 1>&6
12368   LIBS="$LIBS -lldap";
12369         cat >> confdefs.h <<\EOF
12370 #define HAVE_LDAP 1
12371 EOF
12372
12373 else
12374   echo "$ac_t""no" 1>&6
12375 fi
12376
12377
12378         ########################################################
12379         # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
12380         # Check found in pam_ldap 145.
12381         for ac_func in ldap_set_rebind_proc
12382 do
12383 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12384 echo "configure:12385: checking for $ac_func" >&5
12385 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12386   echo $ac_n "(cached) $ac_c" 1>&6
12387 else
12388   cat > conftest.$ac_ext <<EOF
12389 #line 12390 "configure"
12390 #include "confdefs.h"
12391 /* System header to define __stub macros and hopefully few prototypes,
12392     which can conflict with char $ac_func(); below.  */
12393 #include <assert.h>
12394 /* Override any gcc2 internal prototype to avoid an error.  */
12395 /* We use char because int might match the return type of a gcc2
12396     builtin and then its argument prototype would still apply.  */
12397 char $ac_func();
12398
12399 int main() {
12400
12401 /* The GNU C library defines this for functions which it implements
12402     to always fail with ENOSYS.  Some functions are actually named
12403     something starting with __ and the normal name is an alias.  */
12404 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12405 choke me
12406 #else
12407 $ac_func();
12408 #endif
12409
12410 ; return 0; }
12411 EOF
12412 if { (eval echo configure:12413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12413   rm -rf conftest*
12414   eval "ac_cv_func_$ac_func=yes"
12415 else
12416   echo "configure: failed program was:" >&5
12417   cat conftest.$ac_ext >&5
12418   rm -rf conftest*
12419   eval "ac_cv_func_$ac_func=no"
12420 fi
12421 rm -f conftest*
12422 fi
12423
12424 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12425   echo "$ac_t""yes" 1>&6
12426     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12427   cat >> confdefs.h <<EOF
12428 #define $ac_tr_func 1
12429 EOF
12430  
12431 else
12432   echo "$ac_t""no" 1>&6
12433 fi
12434 done
12435
12436         echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6
12437 echo "configure:12438: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
12438 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then
12439   echo $ac_n "(cached) $ac_c" 1>&6
12440 else
12441   
12442         cat > conftest.$ac_ext <<EOF
12443 #line 12444 "configure"
12444 #include "confdefs.h"
12445
12446         #include <lber.h>
12447         #include <ldap.h>
12448 int main() {
12449 ldap_set_rebind_proc(0, 0, 0);
12450 ; return 0; }
12451 EOF
12452 if { (eval echo configure:12453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12453   rm -rf conftest*
12454   pam_ldap_cv_ldap_set_rebind_proc=3
12455 else
12456   echo "configure: failed program was:" >&5
12457   cat conftest.$ac_ext >&5
12458   rm -rf conftest*
12459   pam_ldap_cv_ldap_set_rebind_proc=2
12460 fi
12461 rm -f conftest* 
12462 fi
12463
12464 echo "$ac_t""$pam_ldap_cv_ldap_set_rebind_proc" 1>&6
12465         cat >> confdefs.h <<EOF
12466 #define LDAP_SET_REBIND_PROC_ARGS $pam_ldap_cv_ldap_set_rebind_proc
12467 EOF
12468
12469 fi
12470
12471 #################################################
12472 # check for automount support
12473 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12474 echo "configure:12475: checking whether to use AUTOMOUNT" >&5
12475 # Check whether --with-automount or --without-automount was given.
12476 if test "${with_automount+set}" = set; then
12477   withval="$with_automount"
12478    case "$withval" in
12479   yes)
12480     echo "$ac_t""yes" 1>&6
12481     cat >> confdefs.h <<\EOF
12482 #define WITH_AUTOMOUNT 1
12483 EOF
12484
12485     ;;
12486   *)
12487     echo "$ac_t""no" 1>&6
12488     ;;
12489   esac 
12490 else
12491   echo "$ac_t""no" 1>&6
12492
12493 fi
12494
12495
12496 #################################################
12497 # check for smbmount support
12498 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12499 echo "configure:12500: checking whether to use SMBMOUNT" >&5
12500 # Check whether --with-smbmount or --without-smbmount was given.
12501 if test "${with_smbmount+set}" = set; then
12502   withval="$with_smbmount"
12503    case "$withval" in
12504   yes)
12505         case "$host_os" in
12506         *linux*)
12507                 echo "$ac_t""yes" 1>&6
12508                 cat >> confdefs.h <<\EOF
12509 #define WITH_SMBMOUNT 1
12510 EOF
12511
12512                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12513                 ;;
12514         *)
12515                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12516                 ;;
12517         esac
12518     ;;
12519   *)
12520     echo "$ac_t""no" 1>&6
12521     MPROGS=
12522     ;;
12523   esac 
12524 else
12525   echo "$ac_t""no" 1>&6
12526   MPROGS=
12527
12528 fi
12529
12530
12531
12532 #################################################
12533 # check for a PAM clear-text auth, accounts, password and session support
12534 with_pam_for_crypt=no
12535 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12536 echo "configure:12537: checking whether to use PAM" >&5
12537 # Check whether --with-pam or --without-pam was given.
12538 if test "${with_pam+set}" = set; then
12539   withval="$with_pam"
12540    case "$withval" in
12541   yes)
12542     echo "$ac_t""yes" 1>&6
12543     cat >> confdefs.h <<\EOF
12544 #define WITH_PAM 1
12545 EOF
12546
12547     LIBS="$LIBS -lpam"
12548     with_pam_for_crypt=yes
12549     ;;
12550   *)
12551     echo "$ac_t""no" 1>&6
12552     ;;
12553   esac 
12554 else
12555   echo "$ac_t""no" 1>&6
12556
12557 fi
12558
12559
12560 # we can't build a pam module if we don't have pam.
12561 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12562 echo "configure:12563: checking for pam_get_data in -lpam" >&5
12563 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12564 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12565   echo $ac_n "(cached) $ac_c" 1>&6
12566 else
12567   ac_save_LIBS="$LIBS"
12568 LIBS="-lpam  $LIBS"
12569 cat > conftest.$ac_ext <<EOF
12570 #line 12571 "configure"
12571 #include "confdefs.h"
12572 /* Override any gcc2 internal prototype to avoid an error.  */
12573 /* We use char because int might match the return type of a gcc2
12574     builtin and then its argument prototype would still apply.  */
12575 char pam_get_data();
12576
12577 int main() {
12578 pam_get_data()
12579 ; return 0; }
12580 EOF
12581 if { (eval echo configure:12582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12582   rm -rf conftest*
12583   eval "ac_cv_lib_$ac_lib_var=yes"
12584 else
12585   echo "configure: failed program was:" >&5
12586   cat conftest.$ac_ext >&5
12587   rm -rf conftest*
12588   eval "ac_cv_lib_$ac_lib_var=no"
12589 fi
12590 rm -f conftest*
12591 LIBS="$ac_save_LIBS"
12592
12593 fi
12594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12595   echo "$ac_t""yes" 1>&6
12596   cat >> confdefs.h <<\EOF
12597 #define HAVE_LIBPAM 1
12598 EOF
12599
12600 else
12601   echo "$ac_t""no" 1>&6
12602 fi
12603
12604
12605 #################################################
12606 # check for pam_smbpass support
12607 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12608 echo "configure:12609: checking whether to use pam_smbpass" >&5
12609 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12610 if test "${with_pam_smbpass+set}" = set; then
12611   withval="$with_pam_smbpass"
12612    case "$withval" in
12613   yes)
12614     echo "$ac_t""yes" 1>&6
12615
12616 # Conditions under which pam_smbpass should not be built.
12617
12618        if test x$PICFLAG = x; then
12619           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12620           PAM_MOD=""
12621        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12622           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12623           PAM_MOD=""
12624        else
12625           PAM_MOD="bin/pam_smbpass.so"
12626        fi
12627     ;;
12628   *)
12629     echo "$ac_t""no" 1>&6
12630     ;;
12631   esac 
12632 else
12633   echo "$ac_t""no" 1>&6
12634
12635 fi
12636
12637
12638
12639 ###############################################
12640 # test for where we get crypt() from, but only
12641 # if not using PAM
12642 if test $with_pam_for_crypt = no; then
12643 for ac_func in crypt
12644 do
12645 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12646 echo "configure:12647: checking for $ac_func" >&5
12647 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12648   echo $ac_n "(cached) $ac_c" 1>&6
12649 else
12650   cat > conftest.$ac_ext <<EOF
12651 #line 12652 "configure"
12652 #include "confdefs.h"
12653 /* System header to define __stub macros and hopefully few prototypes,
12654     which can conflict with char $ac_func(); below.  */
12655 #include <assert.h>
12656 /* Override any gcc2 internal prototype to avoid an error.  */
12657 /* We use char because int might match the return type of a gcc2
12658     builtin and then its argument prototype would still apply.  */
12659 char $ac_func();
12660
12661 int main() {
12662
12663 /* The GNU C library defines this for functions which it implements
12664     to always fail with ENOSYS.  Some functions are actually named
12665     something starting with __ and the normal name is an alias.  */
12666 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12667 choke me
12668 #else
12669 $ac_func();
12670 #endif
12671
12672 ; return 0; }
12673 EOF
12674 if { (eval echo configure:12675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12675   rm -rf conftest*
12676   eval "ac_cv_func_$ac_func=yes"
12677 else
12678   echo "configure: failed program was:" >&5
12679   cat conftest.$ac_ext >&5
12680   rm -rf conftest*
12681   eval "ac_cv_func_$ac_func=no"
12682 fi
12683 rm -f conftest*
12684 fi
12685
12686 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12687   echo "$ac_t""yes" 1>&6
12688     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12689   cat >> confdefs.h <<EOF
12690 #define $ac_tr_func 1
12691 EOF
12692  
12693 else
12694   echo "$ac_t""no" 1>&6
12695 fi
12696 done
12697
12698 if test x"$ac_cv_func_crypt" = x"no"; then
12699     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12700 echo "configure:12701: checking for crypt in -lcrypt" >&5
12701 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12702 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12703   echo $ac_n "(cached) $ac_c" 1>&6
12704 else
12705   ac_save_LIBS="$LIBS"
12706 LIBS="-lcrypt  $LIBS"
12707 cat > conftest.$ac_ext <<EOF
12708 #line 12709 "configure"
12709 #include "confdefs.h"
12710 /* Override any gcc2 internal prototype to avoid an error.  */
12711 /* We use char because int might match the return type of a gcc2
12712     builtin and then its argument prototype would still apply.  */
12713 char crypt();
12714
12715 int main() {
12716 crypt()
12717 ; return 0; }
12718 EOF
12719 if { (eval echo configure:12720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12720   rm -rf conftest*
12721   eval "ac_cv_lib_$ac_lib_var=yes"
12722 else
12723   echo "configure: failed program was:" >&5
12724   cat conftest.$ac_ext >&5
12725   rm -rf conftest*
12726   eval "ac_cv_lib_$ac_lib_var=no"
12727 fi
12728 rm -f conftest*
12729 LIBS="$ac_save_LIBS"
12730
12731 fi
12732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12733   echo "$ac_t""yes" 1>&6
12734   LIBS="$LIBS -lcrypt";
12735         cat >> confdefs.h <<\EOF
12736 #define HAVE_CRYPT 1
12737 EOF
12738
12739 else
12740   echo "$ac_t""no" 1>&6
12741 fi
12742
12743 fi
12744 fi
12745
12746 ##
12747 ## moved after the check for -lcrypt in order to
12748 ## ensure that the necessary libraries are included
12749 ## check checking for truncated salt.  Wrapped by the
12750 ## $with_pam_for_crypt variable as above   --jerry
12751 ##
12752 if test $with_pam_for_crypt = no; then
12753 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12754 echo "configure:12755: checking for a crypt that needs truncated salt" >&5
12755 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12756   echo $ac_n "(cached) $ac_c" 1>&6
12757 else
12758   
12759 if test "$cross_compiling" = yes; then
12760   samba_cv_HAVE_TRUNCATED_SALT=cross
12761 else
12762   cat > conftest.$ac_ext <<EOF
12763 #line 12764 "configure"
12764 #include "confdefs.h"
12765 #include "${srcdir-.}/tests/crypttest.c"
12766 EOF
12767 if { (eval echo configure:12768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12768 then
12769   samba_cv_HAVE_TRUNCATED_SALT=no
12770 else
12771   echo "configure: failed program was:" >&5
12772   cat conftest.$ac_ext >&5
12773   rm -fr conftest*
12774   samba_cv_HAVE_TRUNCATED_SALT=yes
12775 fi
12776 rm -fr conftest*
12777 fi
12778
12779 fi
12780
12781 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12782 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12783         cat >> confdefs.h <<\EOF
12784 #define HAVE_TRUNCATED_SALT 1
12785 EOF
12786
12787 fi
12788 fi
12789
12790
12791
12792 ########################################################################################
12793 ##
12794 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12795 ##
12796 ########################################################################################
12797
12798 #################################################
12799 # check for a TDB password database
12800 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12801 echo "configure:12802: checking whether to use TDB SAM database" >&5
12802 # Check whether --with-tdbsam or --without-tdbsam was given.
12803 if test "${with_tdbsam+set}" = set; then
12804   withval="$with_tdbsam"
12805    case "$withval" in
12806   yes)
12807     echo "$ac_t""yes" 1>&6
12808     cat >> confdefs.h <<\EOF
12809 #define WITH_TDB_SAM 1
12810 EOF
12811
12812     ;;
12813   *)
12814     echo "$ac_t""no" 1>&6
12815     ;;
12816   esac 
12817 else
12818   echo "$ac_t""no" 1>&6
12819
12820 fi
12821
12822
12823 #################################################
12824 # check for a NISPLUS password database
12825 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12826 echo "configure:12827: checking whether to use NISPLUS SAM database" >&5
12827 # Check whether --with-nisplussam or --without-nisplussam was given.
12828 if test "${with_nisplussam+set}" = set; then
12829   withval="$with_nisplussam"
12830    case "$withval" in
12831   yes)
12832     echo "$ac_t""yes" 1>&6
12833     cat >> confdefs.h <<\EOF
12834 #define WITH_NISPLUS_SAM 1
12835 EOF
12836
12837     ;;
12838   *)
12839     echo "$ac_t""no" 1>&6
12840     ;;
12841   esac 
12842 else
12843   echo "$ac_t""no" 1>&6
12844
12845 fi
12846
12847
12848 ########################################################################################
12849 ##
12850 ## END OF TESTS FOR SAM BACKENDS.  
12851 ##
12852 ########################################################################################
12853
12854 #################################################
12855 # check for a NISPLUS_HOME support 
12856 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12857 echo "configure:12858: checking whether to use NISPLUS_HOME" >&5
12858 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12859 if test "${with_nisplus_home+set}" = set; then
12860   withval="$with_nisplus_home"
12861    case "$withval" in
12862   yes)
12863     echo "$ac_t""yes" 1>&6
12864     cat >> confdefs.h <<\EOF
12865 #define WITH_NISPLUS_HOME 1
12866 EOF
12867
12868     ;;
12869   *)
12870     echo "$ac_t""no" 1>&6
12871     ;;
12872   esac 
12873 else
12874   echo "$ac_t""no" 1>&6
12875
12876 fi
12877
12878
12879 #################################################
12880 # check for syslog logging
12881 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12882 echo "configure:12883: checking whether to use syslog logging" >&5
12883 # Check whether --with-syslog or --without-syslog was given.
12884 if test "${with_syslog+set}" = set; then
12885   withval="$with_syslog"
12886    case "$withval" in
12887   yes)
12888     echo "$ac_t""yes" 1>&6
12889     cat >> confdefs.h <<\EOF
12890 #define WITH_SYSLOG 1
12891 EOF
12892
12893     ;;
12894   *)
12895     echo "$ac_t""no" 1>&6
12896     ;;
12897   esac 
12898 else
12899   echo "$ac_t""no" 1>&6
12900
12901 fi
12902
12903
12904 #################################################
12905 # check for a shared memory profiling support
12906 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12907 echo "configure:12908: checking whether to use profiling" >&5
12908 # Check whether --with-profiling-data or --without-profiling-data was given.
12909 if test "${with_profiling_data+set}" = set; then
12910   withval="$with_profiling_data"
12911    case "$withval" in
12912   yes)
12913     echo "$ac_t""yes" 1>&6
12914     cat >> confdefs.h <<\EOF
12915 #define WITH_PROFILE 1
12916 EOF
12917
12918     ;;
12919   *)
12920     echo "$ac_t""no" 1>&6
12921     ;;
12922   esac 
12923 else
12924   echo "$ac_t""no" 1>&6
12925
12926 fi
12927
12928
12929
12930 #################################################
12931 # check for experimental disk-quotas support
12932 QUOTAOBJS=smbd/noquotas.o
12933
12934 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12935 echo "configure:12936: checking whether to support disk-quotas" >&5
12936 # Check whether --with-quotas or --without-quotas was given.
12937 if test "${with_quotas+set}" = set; then
12938   withval="$with_quotas"
12939    case "$withval" in
12940   yes)
12941     echo "$ac_t""yes" 1>&6
12942     case "$host_os" in
12943       *linux*)
12944         # Check for kernel 2.4.x quota braindamage...
12945         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12946 echo "configure:12947: checking for linux 2.4.x quota braindamage.." >&5
12947 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12948   echo $ac_n "(cached) $ac_c" 1>&6
12949 else
12950   
12951         cat > conftest.$ac_ext <<EOF
12952 #line 12953 "configure"
12953 #include "confdefs.h"
12954 #include <stdio.h>
12955 #include <sys/types.h>
12956 #include <asm/types.h>
12957 #include <linux/quota.h>
12958 #include <mntent.h>
12959 #include <linux/unistd.h>
12960 int main() {
12961 struct mem_dqblk D;
12962 ; return 0; }
12963 EOF
12964 if { (eval echo configure:12965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12965   rm -rf conftest*
12966   samba_cv_linux_2_4_quota_braindamage=yes
12967 else
12968   echo "configure: failed program was:" >&5
12969   cat conftest.$ac_ext >&5
12970   rm -rf conftest*
12971   samba_cv_linux_2_4_quota_braindamage=no
12972 fi
12973 rm -f conftest*
12974 fi
12975
12976 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12977 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12978         cat >> confdefs.h <<\EOF
12979 #define LINUX_QUOTAS_2 1
12980 EOF
12981
12982 else
12983         cat >> confdefs.h <<\EOF
12984 #define LINUX_QUOTAS_1 1
12985 EOF
12986
12987 fi
12988         ;;
12989       *)
12990         ;;
12991     esac
12992     QUOTAOBJS=smbd/quotas.o
12993     cat >> confdefs.h <<\EOF
12994 #define WITH_QUOTAS 1
12995 EOF
12996
12997     ;;
12998   *)
12999     echo "$ac_t""no" 1>&6
13000     ;;
13001   esac 
13002 else
13003   echo "$ac_t""no" 1>&6
13004
13005 fi
13006
13007
13008
13009 #################################################
13010 # check for experimental utmp accounting
13011
13012 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
13013 echo "configure:13014: checking whether to support utmp accounting" >&5
13014 # Check whether --with-utmp or --without-utmp was given.
13015 if test "${with_utmp+set}" = set; then
13016   withval="$with_utmp"
13017    case "$withval" in
13018   yes)
13019     echo "$ac_t""yes" 1>&6
13020     cat >> confdefs.h <<\EOF
13021 #define WITH_UTMP 1
13022 EOF
13023
13024     ;;
13025   *)
13026     echo "$ac_t""no" 1>&6
13027     ;;
13028   esac 
13029 else
13030   echo "$ac_t""no" 1>&6
13031
13032 fi
13033
13034
13035 #################################################
13036 # choose native language(s) of man pages
13037 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13038 echo "configure:13039: checking chosen man pages' language(s)" >&5
13039 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13040 if test "${with_manpages_langs+set}" = set; then
13041   withval="$with_manpages_langs"
13042    case "$withval" in
13043   yes|no)
13044     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13045     manlangs="en"
13046   ;;
13047   *)
13048     manlangs="$withval"
13049   ;;
13050   esac
13051
13052   echo "$ac_t""$manlangs" 1>&6
13053   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
13054   
13055 else
13056   manlangs="en"
13057   echo "$ac_t""$manlangs" 1>&6
13058   
13059
13060 fi
13061
13062
13063 #################################################
13064 # should we build libsmbclient?
13065
13066 LIBSMBCLIENT_SHARED=
13067 LIBSMBCLIENT=
13068 echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
13069 echo "configure:13070: checking whether to build the libsmbclient shared library" >&5
13070 # Check whether --with-libsmbclient or --without-libsmbclient was given.
13071 if test "${with_libsmbclient+set}" = set; then
13072   withval="$with_libsmbclient"
13073    case "$withval" in
13074   no) 
13075      echo "$ac_t""no" 1>&6
13076      ;;
13077   *)
13078      if test $BLDSHARED = true; then
13079         LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
13080         LIBSMBCLIENT=libsmbclient
13081         echo "$ac_t""yes" 1>&6
13082      else
13083         echo "$ac_t""no shared library support" 1>&6
13084      fi
13085      ;;
13086   esac 
13087 else
13088   echo "$ac_t""yes" 1>&6
13089
13090 fi
13091
13092
13093
13094 #################################################
13095 # these tests are taken from the GNU fileutils package
13096 echo "checking how to get filesystem space usage" 1>&6
13097 echo "configure:13098: checking how to get filesystem space usage" >&5
13098 space=no
13099
13100 # Test for statvfs64.
13101 if test $space = no; then
13102   # SVR4
13103   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13104 echo "configure:13105: checking statvfs64 function (SVR4)" >&5
13105 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13106   echo $ac_n "(cached) $ac_c" 1>&6
13107 else
13108   if test "$cross_compiling" = yes; then
13109   fu_cv_sys_stat_statvfs64=cross
13110 else
13111   cat > conftest.$ac_ext <<EOF
13112 #line 13113 "configure"
13113 #include "confdefs.h"
13114
13115 #if defined(HAVE_UNISTD_H)
13116 #include <unistd.h>
13117 #endif
13118 #include <sys/types.h>
13119 #include <sys/statvfs.h>
13120   main ()
13121   {
13122     struct statvfs64 fsd;
13123     exit (statvfs64 (".", &fsd));
13124   }
13125 EOF
13126 if { (eval echo configure:13127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13127 then
13128   fu_cv_sys_stat_statvfs64=yes
13129 else
13130   echo "configure: failed program was:" >&5
13131   cat conftest.$ac_ext >&5
13132   rm -fr conftest*
13133   fu_cv_sys_stat_statvfs64=no
13134 fi
13135 rm -fr conftest*
13136 fi
13137
13138 fi
13139
13140 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13141   if test $fu_cv_sys_stat_statvfs64 = yes; then
13142     space=yes
13143     cat >> confdefs.h <<\EOF
13144 #define STAT_STATVFS64 1
13145 EOF
13146
13147   fi
13148 fi
13149
13150 # Perform only the link test since it seems there are no variants of the
13151 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13152 # because that got a false positive on SCO OSR5.  Adding the declaration
13153 # of a `struct statvfs' causes this test to fail (as it should) on such
13154 # systems.  That system is reported to work fine with STAT_STATFS4 which
13155 # is what it gets when this test fails.
13156 if test $space = no; then
13157   # SVR4
13158   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13159 echo "configure:13160: checking statvfs function (SVR4)" >&5
13160 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13161   echo $ac_n "(cached) $ac_c" 1>&6
13162 else
13163   cat > conftest.$ac_ext <<EOF
13164 #line 13165 "configure"
13165 #include "confdefs.h"
13166 #include <sys/types.h>
13167 #include <sys/statvfs.h>
13168 int main() {
13169 struct statvfs fsd; statvfs (0, &fsd);
13170 ; return 0; }
13171 EOF
13172 if { (eval echo configure:13173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13173   rm -rf conftest*
13174   fu_cv_sys_stat_statvfs=yes
13175 else
13176   echo "configure: failed program was:" >&5
13177   cat conftest.$ac_ext >&5
13178   rm -rf conftest*
13179   fu_cv_sys_stat_statvfs=no
13180 fi
13181 rm -f conftest*
13182 fi
13183
13184 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13185   if test $fu_cv_sys_stat_statvfs = yes; then
13186     space=yes
13187     cat >> confdefs.h <<\EOF
13188 #define STAT_STATVFS 1
13189 EOF
13190
13191   fi
13192 fi
13193
13194 if test $space = no; then
13195   # DEC Alpha running OSF/1
13196   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13197 echo "configure:13198: checking for 3-argument statfs function (DEC OSF/1)" >&5
13198   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13199   echo $ac_n "(cached) $ac_c" 1>&6
13200 else
13201   if test "$cross_compiling" = yes; then
13202   fu_cv_sys_stat_statfs3_osf1=no
13203 else
13204   cat > conftest.$ac_ext <<EOF
13205 #line 13206 "configure"
13206 #include "confdefs.h"
13207
13208 #include <sys/param.h>
13209 #include <sys/types.h>
13210 #include <sys/mount.h>
13211   main ()
13212   {
13213     struct statfs fsd;
13214     fsd.f_fsize = 0;
13215     exit (statfs (".", &fsd, sizeof (struct statfs)));
13216   }
13217 EOF
13218 if { (eval echo configure:13219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13219 then
13220   fu_cv_sys_stat_statfs3_osf1=yes
13221 else
13222   echo "configure: failed program was:" >&5
13223   cat conftest.$ac_ext >&5
13224   rm -fr conftest*
13225   fu_cv_sys_stat_statfs3_osf1=no
13226 fi
13227 rm -fr conftest*
13228 fi
13229
13230 fi
13231
13232   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13233   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13234     space=yes
13235     cat >> confdefs.h <<\EOF
13236 #define STAT_STATFS3_OSF1 1
13237 EOF
13238
13239   fi
13240 fi
13241
13242 if test $space = no; then
13243 # AIX
13244   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13245 echo "configure:13246: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13246   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13247   echo $ac_n "(cached) $ac_c" 1>&6
13248 else
13249   if test "$cross_compiling" = yes; then
13250   fu_cv_sys_stat_statfs2_bsize=no
13251 else
13252   cat > conftest.$ac_ext <<EOF
13253 #line 13254 "configure"
13254 #include "confdefs.h"
13255
13256 #ifdef HAVE_SYS_PARAM_H
13257 #include <sys/param.h>
13258 #endif
13259 #ifdef HAVE_SYS_MOUNT_H
13260 #include <sys/mount.h>
13261 #endif
13262 #ifdef HAVE_SYS_VFS_H
13263 #include <sys/vfs.h>
13264 #endif
13265   main ()
13266   {
13267   struct statfs fsd;
13268   fsd.f_bsize = 0;
13269   exit (statfs (".", &fsd));
13270   }
13271 EOF
13272 if { (eval echo configure:13273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13273 then
13274   fu_cv_sys_stat_statfs2_bsize=yes
13275 else
13276   echo "configure: failed program was:" >&5
13277   cat conftest.$ac_ext >&5
13278   rm -fr conftest*
13279   fu_cv_sys_stat_statfs2_bsize=no
13280 fi
13281 rm -fr conftest*
13282 fi
13283
13284 fi
13285
13286   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13287   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13288     space=yes
13289     cat >> confdefs.h <<\EOF
13290 #define STAT_STATFS2_BSIZE 1
13291 EOF
13292
13293   fi
13294 fi
13295
13296 if test $space = no; then
13297 # SVR3
13298   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13299 echo "configure:13300: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13300   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13301   echo $ac_n "(cached) $ac_c" 1>&6
13302 else
13303   if test "$cross_compiling" = yes; then
13304   fu_cv_sys_stat_statfs4=no
13305 else
13306   cat > conftest.$ac_ext <<EOF
13307 #line 13308 "configure"
13308 #include "confdefs.h"
13309 #include <sys/types.h>
13310 #include <sys/statfs.h>
13311   main ()
13312   {
13313   struct statfs fsd;
13314   exit (statfs (".", &fsd, sizeof fsd, 0));
13315   }
13316 EOF
13317 if { (eval echo configure:13318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13318 then
13319   fu_cv_sys_stat_statfs4=yes
13320 else
13321   echo "configure: failed program was:" >&5
13322   cat conftest.$ac_ext >&5
13323   rm -fr conftest*
13324   fu_cv_sys_stat_statfs4=no
13325 fi
13326 rm -fr conftest*
13327 fi
13328
13329 fi
13330
13331   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13332   if test $fu_cv_sys_stat_statfs4 = yes; then
13333     space=yes
13334     cat >> confdefs.h <<\EOF
13335 #define STAT_STATFS4 1
13336 EOF
13337
13338   fi
13339 fi
13340
13341 if test $space = no; then
13342 # 4.4BSD and NetBSD
13343   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13344 echo "configure:13345: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13345   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13346   echo $ac_n "(cached) $ac_c" 1>&6
13347 else
13348   if test "$cross_compiling" = yes; then
13349   fu_cv_sys_stat_statfs2_fsize=no
13350 else
13351   cat > conftest.$ac_ext <<EOF
13352 #line 13353 "configure"
13353 #include "confdefs.h"
13354 #include <sys/types.h>
13355 #ifdef HAVE_SYS_PARAM_H
13356 #include <sys/param.h>
13357 #endif
13358 #ifdef HAVE_SYS_MOUNT_H
13359 #include <sys/mount.h>
13360 #endif
13361   main ()
13362   {
13363   struct statfs fsd;
13364   fsd.f_fsize = 0;
13365   exit (statfs (".", &fsd));
13366   }
13367 EOF
13368 if { (eval echo configure:13369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13369 then
13370   fu_cv_sys_stat_statfs2_fsize=yes
13371 else
13372   echo "configure: failed program was:" >&5
13373   cat conftest.$ac_ext >&5
13374   rm -fr conftest*
13375   fu_cv_sys_stat_statfs2_fsize=no
13376 fi
13377 rm -fr conftest*
13378 fi
13379
13380 fi
13381
13382   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13383   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13384     space=yes
13385     cat >> confdefs.h <<\EOF
13386 #define STAT_STATFS2_FSIZE 1
13387 EOF
13388
13389   fi
13390 fi
13391
13392 if test $space = no; then
13393   # Ultrix
13394   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13395 echo "configure:13396: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13396   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13397   echo $ac_n "(cached) $ac_c" 1>&6
13398 else
13399   if test "$cross_compiling" = yes; then
13400   fu_cv_sys_stat_fs_data=no
13401 else
13402   cat > conftest.$ac_ext <<EOF
13403 #line 13404 "configure"
13404 #include "confdefs.h"
13405 #include <sys/types.h>
13406 #ifdef HAVE_SYS_PARAM_H
13407 #include <sys/param.h>
13408 #endif
13409 #ifdef HAVE_SYS_MOUNT_H
13410 #include <sys/mount.h>
13411 #endif
13412 #ifdef HAVE_SYS_FS_TYPES_H
13413 #include <sys/fs_types.h>
13414 #endif
13415   main ()
13416   {
13417   struct fs_data fsd;
13418   /* Ultrix's statfs returns 1 for success,
13419      0 for not mounted, -1 for failure.  */
13420   exit (statfs (".", &fsd) != 1);
13421   }
13422 EOF
13423 if { (eval echo configure:13424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13424 then
13425   fu_cv_sys_stat_fs_data=yes
13426 else
13427   echo "configure: failed program was:" >&5
13428   cat conftest.$ac_ext >&5
13429   rm -fr conftest*
13430   fu_cv_sys_stat_fs_data=no
13431 fi
13432 rm -fr conftest*
13433 fi
13434
13435 fi
13436
13437   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13438   if test $fu_cv_sys_stat_fs_data = yes; then
13439     space=yes
13440     cat >> confdefs.h <<\EOF
13441 #define STAT_STATFS2_FS_DATA 1
13442 EOF
13443
13444   fi
13445 fi
13446
13447 #
13448 # As a gating factor for large file support, in order to
13449 # use <4GB files we must have the following minimal support
13450 # available.
13451 # long long, and a 64 bit off_t or off64_t.
13452 # If we don't have all of these then disable large
13453 # file support.
13454 #
13455 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13456 echo "configure:13457: checking if large file support can be enabled" >&5
13457 cat > conftest.$ac_ext <<EOF
13458 #line 13459 "configure"
13459 #include "confdefs.h"
13460
13461 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13462 #include <sys/types.h>
13463 #else
13464 __COMPILE_ERROR_
13465 #endif
13466
13467 int main() {
13468 int i
13469 ; return 0; }
13470 EOF
13471 if { (eval echo configure:13472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13472   rm -rf conftest*
13473   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13474 else
13475   echo "configure: failed program was:" >&5
13476   cat conftest.$ac_ext >&5
13477   rm -rf conftest*
13478   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13479 fi
13480 rm -f conftest*
13481 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13482     cat >> confdefs.h <<\EOF
13483 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13484 EOF
13485
13486 fi
13487 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13488
13489 # Check whether --with-spinlocks or --without-spinlocks was given.
13490 if test "${with_spinlocks+set}" = set; then
13491   withval="$with_spinlocks"
13492   :
13493 fi
13494
13495 if test "x$with_spinlocks" = "xyes"; then
13496     cat >> confdefs.h <<\EOF
13497 #define USE_SPINLOCKS 1
13498 EOF
13499
13500
13501     case "$host_cpu" in
13502         sparc)
13503             cat >> confdefs.h <<\EOF
13504 #define SPARC_SPINLOCKS 1
13505 EOF
13506
13507             ;;
13508
13509         i386|i486|i586|i686)
13510             cat >> confdefs.h <<\EOF
13511 #define INTEL_SPINLOCKS 1
13512 EOF
13513
13514             ;;
13515
13516         mips)
13517             cat >> confdefs.h <<\EOF
13518 #define MIPS_SPINLOCKS 1
13519 EOF
13520
13521             ;;
13522
13523         powerpc)
13524             cat >> confdefs.h <<\EOF
13525 #define POWERPC_SPINLOCKS 1
13526 EOF
13527
13528             ;;
13529     esac
13530 fi
13531
13532 #################################################
13533 # check for ACL support
13534
13535 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13536 echo "configure:13537: checking whether to support ACLs" >&5
13537 # Check whether --with-acl-support or --without-acl-support was given.
13538 if test "${with_acl_support+set}" = set; then
13539   withval="$with_acl_support"
13540    case "$withval" in
13541   yes)
13542
13543         case "$host_os" in
13544         *sysv5*)
13545                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13546                 cat >> confdefs.h <<\EOF
13547 #define HAVE_UNIXWARE_ACLS 1
13548 EOF
13549
13550                 ;;
13551         *solaris*)
13552                 echo "$ac_t""Using solaris ACLs" 1>&6
13553                 cat >> confdefs.h <<\EOF
13554 #define HAVE_SOLARIS_ACLS 1
13555 EOF
13556
13557                 ;;
13558         *hpux*)
13559                 echo "$ac_t""Using HPUX ACLs" 1>&6
13560                 cat >> confdefs.h <<\EOF
13561 #define HAVE_HPUX_ACLS 1
13562 EOF
13563
13564                 ;;
13565         *irix*)
13566                 echo "$ac_t""Using IRIX ACLs" 1>&6
13567                 cat >> confdefs.h <<\EOF
13568 #define HAVE_IRIX_ACLS 1
13569 EOF
13570
13571                 ;;
13572         *aix*)
13573                 echo "$ac_t""Using AIX ACLs" 1>&6
13574                 cat >> confdefs.h <<\EOF
13575 #define HAVE_AIX_ACLS 1
13576 EOF
13577
13578                 ;;
13579         *osf*)
13580                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13581                 cat >> confdefs.h <<\EOF
13582 #define HAVE_TRU64_ACLS 1
13583 EOF
13584
13585                 LIBS="$LIBS -lpacl"
13586                 ;;
13587         *)
13588                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13589 echo "configure:13590: checking for acl_get_file in -lacl" >&5
13590 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13591 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13592   echo $ac_n "(cached) $ac_c" 1>&6
13593 else
13594   ac_save_LIBS="$LIBS"
13595 LIBS="-lacl  $LIBS"
13596 cat > conftest.$ac_ext <<EOF
13597 #line 13598 "configure"
13598 #include "confdefs.h"
13599 /* Override any gcc2 internal prototype to avoid an error.  */
13600 /* We use char because int might match the return type of a gcc2
13601     builtin and then its argument prototype would still apply.  */
13602 char acl_get_file();
13603
13604 int main() {
13605 acl_get_file()
13606 ; return 0; }
13607 EOF
13608 if { (eval echo configure:13609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13609   rm -rf conftest*
13610   eval "ac_cv_lib_$ac_lib_var=yes"
13611 else
13612   echo "configure: failed program was:" >&5
13613   cat conftest.$ac_ext >&5
13614   rm -rf conftest*
13615   eval "ac_cv_lib_$ac_lib_var=no"
13616 fi
13617 rm -f conftest*
13618 LIBS="$ac_save_LIBS"
13619
13620 fi
13621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13622   echo "$ac_t""yes" 1>&6
13623     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13624     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13625   cat >> confdefs.h <<EOF
13626 #define $ac_tr_lib 1
13627 EOF
13628
13629   LIBS="-lacl $LIBS"
13630
13631 else
13632   echo "$ac_t""no" 1>&6
13633 fi
13634
13635                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13636 echo "configure:13637: checking for ACL support" >&5
13637 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13638   echo $ac_n "(cached) $ac_c" 1>&6
13639 else
13640   
13641                 cat > conftest.$ac_ext <<EOF
13642 #line 13643 "configure"
13643 #include "confdefs.h"
13644 #include <sys/types.h>
13645 #include <sys/acl.h>
13646 int main() {
13647  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13648 ; return 0; }
13649 EOF
13650 if { (eval echo configure:13651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13651   rm -rf conftest*
13652   samba_cv_HAVE_POSIX_ACLS=yes
13653 else
13654   echo "configure: failed program was:" >&5
13655   cat conftest.$ac_ext >&5
13656   rm -rf conftest*
13657   samba_cv_HAVE_POSIX_ACLS=no
13658 fi
13659 rm -f conftest*
13660 fi
13661
13662 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13663                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13664                                 echo "$ac_t""Using posix ACLs" 1>&6
13665                                 cat >> confdefs.h <<\EOF
13666 #define HAVE_POSIX_ACLS 1
13667 EOF
13668
13669                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13670 echo "configure:13671: checking for acl_get_perm_np" >&5
13671 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13672   echo $ac_n "(cached) $ac_c" 1>&6
13673 else
13674   
13675                                 cat > conftest.$ac_ext <<EOF
13676 #line 13677 "configure"
13677 #include "confdefs.h"
13678 #include <sys/types.h>
13679 #include <sys/acl.h>
13680 int main() {
13681  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13682 ; return 0; }
13683 EOF
13684 if { (eval echo configure:13685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13685   rm -rf conftest*
13686   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13687 else
13688   echo "configure: failed program was:" >&5
13689   cat conftest.$ac_ext >&5
13690   rm -rf conftest*
13691   samba_cv_HAVE_ACL_GET_PERM_NP=no
13692 fi
13693 rm -f conftest*
13694 fi
13695
13696 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13697                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13698                                         cat >> confdefs.h <<\EOF
13699 #define HAVE_ACL_GET_PERM_NP 1
13700 EOF
13701
13702                                 fi
13703                         fi
13704             ;;
13705         esac
13706         ;;
13707   *)
13708     echo "$ac_t""no" 1>&6
13709     cat >> confdefs.h <<\EOF
13710 #define HAVE_NO_ACLS 1
13711 EOF
13712
13713     ;;
13714   esac 
13715 else
13716   cat >> confdefs.h <<\EOF
13717 #define HAVE_NO_ACLS 1
13718 EOF
13719
13720   echo "$ac_t""no" 1>&6
13721
13722 fi
13723
13724
13725 #################################################
13726 # Check whether winbind is supported on this platform.  If so we need to
13727 # build and install client programs (WINBIND_TARGETS), sbin programs
13728 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13729
13730 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13731 echo "configure:13732: checking whether to build winbind" >&5
13732
13733 # Initially, the value of $host_os decides whether winbind is supported
13734
13735 case "$host_os" in
13736         *linux*|*irix*)
13737                 HAVE_WINBIND=yes
13738                 ;;
13739         *solaris*)
13740                 HAVE_WINBIND=yes
13741                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13742                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
13743                 ;;
13744         *hpux11*)
13745                 HAVE_WINBIND=yes
13746                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13747                 ;;
13748         *)
13749                 HAVE_WINBIND=no
13750                 winbind_no_reason=", unsupported on $host_os"
13751                 ;;
13752 esac
13753
13754 # Check the setting of --with-winbindd
13755
13756 # Check whether --with-winbind or --without-winbind was given.
13757 if test "${with_winbind+set}" = set; then
13758   withval="$with_winbind"
13759    
13760   case "$withval" in
13761         yes)
13762                 HAVE_WINBIND=yes
13763                 ;;
13764         no)
13765                 HAVE_WINBIND=no
13766                 winbind_reason=""
13767                 ;;
13768   esac 
13769 fi
13770
13771
13772 # We need unix domain sockets for winbind
13773
13774 if test x"$HAVE_WINBIND" = x"yes"; then
13775         if test x"$samba_cv_unixsocket" = x"no"; then
13776                 winbind_no_reason=", no unix domain socket support on $host_os"
13777                 HAVE_WINBIND=no
13778         fi
13779 fi
13780
13781 # Display test results
13782
13783 WINBIND_TARGETS=""
13784 WINBIND_STARGETS=""
13785 WINBIND_LTARGETS=""
13786 WINBIND_PAM_PROGS=""
13787
13788 if test x"$HAVE_WINBIND" = x"yes"; then
13789         echo "$ac_t""yes" 1>&6
13790
13791         WINBIND_TARGETS="bin/wbinfo"
13792         WINBIND_STARGETS="bin/winbindd"
13793         if test x"$BLDSHARED" = x"true"; then
13794                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13795                 if test x"$with_pam" = x"yes"; then
13796                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13797                 fi
13798         fi
13799 else
13800         echo "$ac_t""no$winbind_no_reason" 1>&6
13801 fi
13802
13803
13804 # Check for FreeBSD problem with getgroups
13805 # It returns EGID too many times in the list of groups
13806 # and causes a security problem
13807 echo $ac_n "checking whether or not getgroups returns EGID too many times""... $ac_c" 1>&6
13808 echo "configure:13809: checking whether or not getgroups returns EGID too many times" >&5
13809 if eval "test \"`echo '$''{'samba_cv_have_getgroups_too_many_egids'+set}'`\" = set"; then
13810   echo $ac_n "(cached) $ac_c" 1>&6
13811 else
13812   if test "$cross_compiling" = yes; then
13813   samba_cv_have_getgroups_too_many_egids=cross
13814 else
13815   cat > conftest.$ac_ext <<EOF
13816 #line 13817 "configure"
13817 #include "confdefs.h"
13818
13819 #include <sys/types.h>
13820 #include <stdio.h>
13821
13822 int main(int argc, char *argv[])
13823 {
13824   gid_t groups[10];
13825   int n = 10;
13826
13827   n = getgroups(n, &groups);
13828   /* Could actually pass back the number of EGIDs there ... */
13829   exit((n > 1 && groups[0] == getegid() && groups[1] == getegid()) ? 1 : 0);
13830 }
13831 EOF
13832 if { (eval echo configure:13833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13833 then
13834   samba_cv_have_getgroups_too_many_egids=no
13835 else
13836   echo "configure: failed program was:" >&5
13837   cat conftest.$ac_ext >&5
13838   rm -fr conftest*
13839   samba_cv_have_getgroups_too_many_egids=yes
13840 fi
13841 rm -fr conftest*
13842 fi
13843
13844 fi
13845
13846 echo "$ac_t""$samba_cv_have_getgroups_too_many_egids" 1>&6
13847 if test x"$samba_cv_have_getgroups_too_many_egids" = x"yes"; then
13848     cat >> confdefs.h <<\EOF
13849 #define HAVE_GETGROUPS_TOO_MANY_EGIDS 1
13850 EOF
13851
13852 fi
13853
13854
13855
13856 # Substitution time!
13857
13858
13859
13860
13861
13862
13863
13864
13865 # Solaris has some extra fields in struct passwd that need to be
13866 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
13867 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
13868 # this. 
13869
13870 #AC_CHECK_MEMBER(struct passwd.pw_comment,
13871 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
13872 #               [#include <pwd.h>])
13873
13874 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
13875 echo "configure:13876: checking whether struct passwd has pw_comment" >&5
13876 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
13877   echo $ac_n "(cached) $ac_c" 1>&6
13878 else
13879   
13880     cat > conftest.$ac_ext <<EOF
13881 #line 13882 "configure"
13882 #include "confdefs.h"
13883 #include <pwd.h>
13884 int main() {
13885 struct passwd p; p.pw_comment;
13886 ; return 0; }
13887 EOF
13888 if { (eval echo configure:13889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13889   rm -rf conftest*
13890   samba_cv_passwd_pw_comment=yes
13891 else
13892   echo "configure: failed program was:" >&5
13893   cat conftest.$ac_ext >&5
13894   rm -rf conftest*
13895   samba_cv_passwd_pw_comment=no
13896 fi
13897 rm -f conftest*
13898 fi
13899
13900 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
13901 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
13902    cat >> confdefs.h <<\EOF
13903 #define HAVE_PASSWD_PW_COMMENT 1
13904 EOF
13905
13906 fi
13907
13908 #AC_CHECK_MEMBER(struct passwd.pw_age,
13909 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
13910 #               [#include <pwd.h>])
13911
13912 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
13913 echo "configure:13914: checking whether struct passwd has pw_age" >&5
13914 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
13915   echo $ac_n "(cached) $ac_c" 1>&6
13916 else
13917   
13918     cat > conftest.$ac_ext <<EOF
13919 #line 13920 "configure"
13920 #include "confdefs.h"
13921 #include <pwd.h>
13922 int main() {
13923 struct passwd p; p.pw_age;
13924 ; return 0; }
13925 EOF
13926 if { (eval echo configure:13927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13927   rm -rf conftest*
13928   samba_cv_passwd_pw_age=yes
13929 else
13930   echo "configure: failed program was:" >&5
13931   cat conftest.$ac_ext >&5
13932   rm -rf conftest*
13933   samba_cv_passwd_pw_age=no
13934 fi
13935 rm -f conftest*
13936 fi
13937
13938 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
13939 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
13940    cat >> confdefs.h <<\EOF
13941 #define HAVE_PASSWD_PW_AGE 1
13942 EOF
13943
13944 fi
13945
13946 #################################################
13947 # Check to see if we should use the included popt 
13948
13949 # Check whether --with-included-popt or --without-included-popt was given.
13950 if test "${with_included_popt+set}" = set; then
13951   withval="$with_included_popt"
13952    
13953   case "$withval" in
13954         yes)
13955                 INCLUDED_POPT=yes
13956                 ;;
13957         no)
13958                 INCLUDED_POPT=no
13959                 ;;
13960   esac 
13961 fi
13962
13963 if test x"$INCLUDED_POPT" != x"yes"; then
13964     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13965 echo "configure:13966: checking for poptGetContext in -lpopt" >&5
13966 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13967 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13968   echo $ac_n "(cached) $ac_c" 1>&6
13969 else
13970   ac_save_LIBS="$LIBS"
13971 LIBS="-lpopt  $LIBS"
13972 cat > conftest.$ac_ext <<EOF
13973 #line 13974 "configure"
13974 #include "confdefs.h"
13975 /* Override any gcc2 internal prototype to avoid an error.  */
13976 /* We use char because int might match the return type of a gcc2
13977     builtin and then its argument prototype would still apply.  */
13978 char poptGetContext();
13979
13980 int main() {
13981 poptGetContext()
13982 ; return 0; }
13983 EOF
13984 if { (eval echo configure:13985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13985   rm -rf conftest*
13986   eval "ac_cv_lib_$ac_lib_var=yes"
13987 else
13988   echo "configure: failed program was:" >&5
13989   cat conftest.$ac_ext >&5
13990   rm -rf conftest*
13991   eval "ac_cv_lib_$ac_lib_var=no"
13992 fi
13993 rm -f conftest*
13994 LIBS="$ac_save_LIBS"
13995
13996 fi
13997 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13998   echo "$ac_t""yes" 1>&6
13999   INCLUDED_POPT=no
14000 else
14001   echo "$ac_t""no" 1>&6
14002 INCLUDED_POPT=yes
14003 fi
14004
14005 fi
14006
14007 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
14008 echo "configure:14009: checking whether to use included popt" >&5
14009 if test x"$INCLUDED_POPT" = x"yes"; then
14010     echo "$ac_t""$srcdir/popt" 1>&6
14011     BUILD_POPT='$(POPT_OBJS)'
14012     FLAGS1="-I$srcdir/popt"
14013 else
14014     echo "$ac_t""no" 1>&6
14015     LIBS="$LIBS -lpopt"
14016 fi
14017
14018
14019
14020 #################################################
14021 # do extra things if we are running insure
14022
14023 if test "${ac_cv_prog_CC}" = "insure"; then
14024         CPPFLAGS="$CPPFLAGS -D__INSURE__"
14025 fi
14026
14027 #################################################
14028 # final configure stuff
14029
14030 echo $ac_n "checking configure summary""... $ac_c" 1>&6
14031 echo "configure:14032: checking configure summary" >&5
14032 if test "$cross_compiling" = yes; then
14033   echo "configure: warning: cannot run when cross-compiling" 1>&2
14034 else
14035   cat > conftest.$ac_ext <<EOF
14036 #line 14037 "configure"
14037 #include "confdefs.h"
14038 #include "${srcdir-.}/tests/summary.c"
14039 EOF
14040 if { (eval echo configure:14041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14041 then
14042   echo "$ac_t""yes" 1>&6
14043 else
14044   echo "configure: failed program was:" >&5
14045   cat conftest.$ac_ext >&5
14046   rm -fr conftest*
14047   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
14048 fi
14049 rm -fr conftest*
14050 fi
14051
14052
14053 builddir=`pwd`
14054
14055
14056 trap '' 1 2 15
14057 cat > confcache <<\EOF
14058 # This file is a shell script that caches the results of configure
14059 # tests run on this system so they can be shared between configure
14060 # scripts and configure runs.  It is not useful on other systems.
14061 # If it contains results you don't want to keep, you may remove or edit it.
14062 #
14063 # By default, configure uses ./config.cache as the cache file,
14064 # creating it if it does not exist already.  You can give configure
14065 # the --cache-file=FILE option to use a different cache file; that is
14066 # what configure does when it calls configure scripts in
14067 # subdirectories, so they share the cache.
14068 # Giving --cache-file=/dev/null disables caching, for debugging configure.
14069 # config.status only pays attention to the cache file if you give it the
14070 # --recheck option to rerun configure.
14071 #
14072 EOF
14073 # The following way of writing the cache mishandles newlines in values,
14074 # but we know of no workaround that is simple, portable, and efficient.
14075 # So, don't put newlines in cache variables' values.
14076 # Ultrix sh set writes to stderr and can't be redirected directly,
14077 # and sets the high bit in the cache file unless we assign to the vars.
14078 (set) 2>&1 |
14079   case `(ac_space=' '; set | grep ac_space) 2>&1` in
14080   *ac_space=\ *)
14081     # `set' does not quote correctly, so add quotes (double-quote substitution
14082     # turns \\\\ into \\, and sed turns \\ into \).
14083     sed -n \
14084       -e "s/'/'\\\\''/g" \
14085       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
14086     ;;
14087   *)
14088     # `set' quotes correctly as required by POSIX, so do not add quotes.
14089     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
14090     ;;
14091   esac >> confcache
14092 if cmp -s $cache_file confcache; then
14093   :
14094 else
14095   if test -w $cache_file; then
14096     echo "updating cache $cache_file"
14097     cat confcache > $cache_file
14098   else
14099     echo "not updating unwritable cache $cache_file"
14100   fi
14101 fi
14102 rm -f confcache
14103
14104 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14105
14106 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14107 # Let make expand exec_prefix.
14108 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14109
14110 # Any assignment to VPATH causes Sun make to only execute
14111 # the first set of double-colon rules, so remove it if not needed.
14112 # If there is a colon in the path, we need to keep it.
14113 if test "x$srcdir" = x.; then
14114   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14115 fi
14116
14117 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14118
14119 DEFS=-DHAVE_CONFIG_H
14120
14121 # Without the "./", some shells look in PATH for config.status.
14122 : ${CONFIG_STATUS=./config.status}
14123
14124 echo creating $CONFIG_STATUS
14125 rm -f $CONFIG_STATUS
14126 cat > $CONFIG_STATUS <<EOF
14127 #! /bin/sh
14128 # Generated automatically by configure.
14129 # Run this file to recreate the current configuration.
14130 # This directory was configured as follows,
14131 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14132 #
14133 # $0 $ac_configure_args
14134 #
14135 # Compiler output produced by configure, useful for debugging
14136 # configure, is in ./config.log if it exists.
14137
14138 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14139 for ac_option
14140 do
14141   case "\$ac_option" in
14142   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14143     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14144     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14145   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14146     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14147     exit 0 ;;
14148   -help | --help | --hel | --he | --h)
14149     echo "\$ac_cs_usage"; exit 0 ;;
14150   *) echo "\$ac_cs_usage"; exit 1 ;;
14151   esac
14152 done
14153
14154 ac_given_srcdir=$srcdir
14155 ac_given_INSTALL="$INSTALL"
14156
14157 trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14158 EOF
14159 cat >> $CONFIG_STATUS <<EOF
14160
14161 # Protect against being on the right side of a sed subst in config.status.
14162 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14163  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14164 $ac_vpsub
14165 $extrasub
14166 s%@SHELL@%$SHELL%g
14167 s%@CFLAGS@%$CFLAGS%g
14168 s%@CPPFLAGS@%$CPPFLAGS%g
14169 s%@CXXFLAGS@%$CXXFLAGS%g
14170 s%@FFLAGS@%$FFLAGS%g
14171 s%@DEFS@%$DEFS%g
14172 s%@LDFLAGS@%$LDFLAGS%g
14173 s%@LIBS@%$LIBS%g
14174 s%@exec_prefix@%$exec_prefix%g
14175 s%@prefix@%$prefix%g
14176 s%@program_transform_name@%$program_transform_name%g
14177 s%@bindir@%$bindir%g
14178 s%@sbindir@%$sbindir%g
14179 s%@libexecdir@%$libexecdir%g
14180 s%@datadir@%$datadir%g
14181 s%@sysconfdir@%$sysconfdir%g
14182 s%@sharedstatedir@%$sharedstatedir%g
14183 s%@localstatedir@%$localstatedir%g
14184 s%@libdir@%$libdir%g
14185 s%@includedir@%$includedir%g
14186 s%@oldincludedir@%$oldincludedir%g
14187 s%@infodir@%$infodir%g
14188 s%@mandir@%$mandir%g
14189 s%@codepagedir@%$codepagedir%g
14190 s%@configdir@%$configdir%g
14191 s%@lockdir@%$lockdir%g
14192 s%@piddir@%$piddir%g
14193 s%@logfilebase@%$logfilebase%g
14194 s%@privatedir@%$privatedir%g
14195 s%@swatdir@%$swatdir%g
14196 s%@RUNPROG@%$RUNPROG%g
14197 s%@MPROGS@%$MPROGS%g
14198 s%@LDSHFLAGS@%$LDSHFLAGS%g
14199 s%@SONAMEFLAG@%$SONAMEFLAG%g
14200 s%@SHLD@%$SHLD%g
14201 s%@HOST_OS@%$HOST_OS%g
14202 s%@PAM_MOD@%$PAM_MOD%g
14203 s%@WRAP@%$WRAP%g
14204 s%@WRAP32@%$WRAP32%g
14205 s%@WRAPPROG@%$WRAPPROG%g
14206 s%@PICFLAG@%$PICFLAG%g
14207 s%@PICSUFFIX@%$PICSUFFIX%g
14208 s%@POBAD_CC@%$POBAD_CC%g
14209 s%@SHLIBEXT@%$SHLIBEXT%g
14210 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14211 s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g
14212 s%@CC@%$CC%g
14213 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14214 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14215 s%@INSTALL_DATA@%$INSTALL_DATA%g
14216 s%@AWK@%$AWK%g
14217 s%@BROKEN_CC@%$BROKEN_CC%g
14218 s%@host@%$host%g
14219 s%@host_alias@%$host_alias%g
14220 s%@host_cpu@%$host_cpu%g
14221 s%@host_vendor@%$host_vendor%g
14222 s%@host_os@%$host_os%g
14223 s%@target@%$target%g
14224 s%@target_alias@%$target_alias%g
14225 s%@target_cpu@%$target_cpu%g
14226 s%@target_vendor@%$target_vendor%g
14227 s%@target_os@%$target_os%g
14228 s%@build@%$build%g
14229 s%@build_alias@%$build_alias%g
14230 s%@build_cpu@%$build_cpu%g
14231 s%@build_vendor@%$build_vendor%g
14232 s%@build_os@%$build_os%g
14233 s%@CPP@%$CPP%g
14234 s%@CUPS_CONFIG@%$CUPS_CONFIG%g
14235 s%@LIBOBJS@%$LIBOBJS%g
14236 s%@TERMLIBS@%$TERMLIBS%g
14237 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14238 s%@ROFF@%$ROFF%g
14239 s%@DYNEXP@%$DYNEXP%g
14240 s%@QUOTAOBJS@%$QUOTAOBJS%g
14241 s%@manlangs@%$manlangs%g
14242 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14243 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14244 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14245 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
14246 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
14247 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
14248 s%@BUILD_POPT@%$BUILD_POPT%g
14249 s%@FLAGS1@%$FLAGS1%g
14250 s%@builddir@%$builddir%g
14251
14252 CEOF
14253 EOF
14254
14255 cat >> $CONFIG_STATUS <<\EOF
14256
14257 # Split the substitutions into bite-sized pieces for seds with
14258 # small command number limits, like on Digital OSF/1 and HP-UX.
14259 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14260 ac_file=1 # Number of current file.
14261 ac_beg=1 # First line for current file.
14262 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14263 ac_more_lines=:
14264 ac_sed_cmds=""
14265 while $ac_more_lines; do
14266   if test $ac_beg -gt 1; then
14267     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14268   else
14269     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14270   fi
14271   if test ! -s conftest.s$ac_file; then
14272     ac_more_lines=false
14273     rm -f conftest.s$ac_file
14274   else
14275     if test -z "$ac_sed_cmds"; then
14276       ac_sed_cmds="sed -f conftest.s$ac_file"
14277     else
14278       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14279     fi
14280     ac_file=`expr $ac_file + 1`
14281     ac_beg=$ac_end
14282     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14283   fi
14284 done
14285 if test -z "$ac_sed_cmds"; then
14286   ac_sed_cmds=cat
14287 fi
14288 EOF
14289
14290 cat >> $CONFIG_STATUS <<EOF
14291
14292 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb"}
14293 EOF
14294 cat >> $CONFIG_STATUS <<\EOF
14295 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14296   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14297   case "$ac_file" in
14298   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14299        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14300   *) ac_file_in="${ac_file}.in" ;;
14301   esac
14302
14303   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14304
14305   # Remove last slash and all that follows it.  Not all systems have dirname.
14306   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14307   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14308     # The file is in a subdirectory.
14309     test ! -d "$ac_dir" && mkdir "$ac_dir"
14310     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14311     # A "../" for each directory in $ac_dir_suffix.
14312     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14313   else
14314     ac_dir_suffix= ac_dots=
14315   fi
14316
14317   case "$ac_given_srcdir" in
14318   .)  srcdir=.
14319       if test -z "$ac_dots"; then top_srcdir=.
14320       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14321   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14322   *) # Relative path.
14323     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14324     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14325   esac
14326
14327   case "$ac_given_INSTALL" in
14328   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14329   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14330   esac
14331
14332   echo creating "$ac_file"
14333   rm -f "$ac_file"
14334   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14335   case "$ac_file" in
14336   *Makefile*) ac_comsub="1i\\
14337 # $configure_input" ;;
14338   *) ac_comsub= ;;
14339   esac
14340
14341   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14342   sed -e "$ac_comsub
14343 s%@configure_input@%$configure_input%g
14344 s%@srcdir@%$srcdir%g
14345 s%@top_srcdir@%$top_srcdir%g
14346 s%@INSTALL@%$INSTALL%g
14347 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14348 fi; done
14349 rm -f conftest.s*
14350
14351 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14352 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14353 #
14354 # ac_d sets the value in "#define NAME VALUE" lines.
14355 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14356 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14357 ac_dC='\3'
14358 ac_dD='%g'
14359 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14360 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14361 ac_uB='\([      ]\)%\1#\2define\3'
14362 ac_uC=' '
14363 ac_uD='\4%g'
14364 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14365 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14366 ac_eB='$%\1#\2define\3'
14367 ac_eC=' '
14368 ac_eD='%g'
14369
14370 if test "${CONFIG_HEADERS+set}" != set; then
14371 EOF
14372 cat >> $CONFIG_STATUS <<EOF
14373   CONFIG_HEADERS="include/config.h"
14374 EOF
14375 cat >> $CONFIG_STATUS <<\EOF
14376 fi
14377 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14378   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14379   case "$ac_file" in
14380   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14381        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14382   *) ac_file_in="${ac_file}.in" ;;
14383   esac
14384
14385   echo creating $ac_file
14386
14387   rm -f conftest.frag conftest.in conftest.out
14388   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14389   cat $ac_file_inputs > conftest.in
14390
14391 EOF
14392
14393 # Transform confdefs.h into a sed script conftest.vals that substitutes
14394 # the proper values into config.h.in to produce config.h.  And first:
14395 # Protect against being on the right side of a sed subst in config.status.
14396 # Protect against being in an unquoted here document in config.status.
14397 rm -f conftest.vals
14398 cat > conftest.hdr <<\EOF
14399 s/[\\&%]/\\&/g
14400 s%[\\$`]%\\&%g
14401 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14402 s%ac_d%ac_u%gp
14403 s%ac_u%ac_e%gp
14404 EOF
14405 sed -n -f conftest.hdr confdefs.h > conftest.vals
14406 rm -f conftest.hdr
14407
14408 # This sed command replaces #undef with comments.  This is necessary, for
14409 # example, in the case of _POSIX_SOURCE, which is predefined and required
14410 # on some systems where configure will not decide to define it.
14411 cat >> conftest.vals <<\EOF
14412 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14413 EOF
14414
14415 # Break up conftest.vals because some shells have a limit on
14416 # the size of here documents, and old seds have small limits too.
14417
14418 rm -f conftest.tail
14419 while :
14420 do
14421   ac_lines=`grep -c . conftest.vals`
14422   # grep -c gives empty output for an empty file on some AIX systems.
14423   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14424   # Write a limited-size here document to conftest.frag.
14425   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14426   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14427   echo 'CEOF
14428   sed -f conftest.frag conftest.in > conftest.out
14429   rm -f conftest.in
14430   mv conftest.out conftest.in
14431 ' >> $CONFIG_STATUS
14432   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14433   rm -f conftest.vals
14434   mv conftest.tail conftest.vals
14435 done
14436 rm -f conftest.vals
14437
14438 cat >> $CONFIG_STATUS <<\EOF
14439   rm -f conftest.frag conftest.h
14440   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14441   cat conftest.in >> conftest.h
14442   rm -f conftest.in
14443   if cmp -s $ac_file conftest.h 2>/dev/null; then
14444     echo "$ac_file is unchanged"
14445     rm -f conftest.h
14446   else
14447     # Remove last slash and all that follows it.  Not all systems have dirname.
14448       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14449       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14450       # The file is in a subdirectory.
14451       test ! -d "$ac_dir" && mkdir "$ac_dir"
14452     fi
14453     rm -f $ac_file
14454     mv conftest.h $ac_file
14455   fi
14456 fi; done
14457
14458 EOF
14459 cat >> $CONFIG_STATUS <<EOF
14460
14461 EOF
14462 cat >> $CONFIG_STATUS <<\EOF
14463
14464 exit 0
14465 EOF
14466 chmod +x $CONFIG_STATUS
14467 rm -fr confdefs* $ac_clean_files
14468 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14469
14470
14471 #################################################
14472 # Print very concise instructions on building/use
14473 if test "x$enable_dmalloc" = xyes
14474 then
14475         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14476         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14477 fi