Get rid of the unused WL variable from the previous patch. I think these were
[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   --enable-debug          turn on debugging [default=no]"
17 ac_help="$ac_help
18   --enable-developer      turn on developer warnings and debugging [default=no]"
19 ac_help="$ac_help
20   --enable-krb5developer      turn on developer warnings and debugging, except -Wstrict-prototypes [default=no]"
21 ac_help="$ac_help
22   --enable-dmalloc          enable heap debugging [default=no]"
23 ac_help="$ac_help
24   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
25 ac_help="$ac_help
26   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
27 ac_help="$ac_help
28   --with-smbwrapper       Include SMB wrapper support (default=no) "
29 ac_help="$ac_help
30   --with-afs              Include AFS clear-text auth support (default=no) "
31 ac_help="$ac_help
32   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
33 ac_help="$ac_help
34   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
35 ac_help="$ac_help
36   --with-automount        Include AUTOMOUNT support (default=no)"
37 ac_help="$ac_help
38   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
39 ac_help="$ac_help
40   --with-pam              Include PAM support (default=no)"
41 ac_help="$ac_help
42   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
43 ac_help="$ac_help
44   --with-tdbsam           Include experimental TDB SAM support (default=no)"
45 ac_help="$ac_help
46   --with-ldapsam          Include experimental LDAP SAM support (default=no)"
47 ac_help="$ac_help
48   --with-nisplussam       Include NISPLUS SAM support (default=no)"
49 ac_help="$ac_help
50   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
51 ac_help="$ac_help
52   --with-ssl              Include SSL support (default=no)
53   --with-sslinc=DIR          Where the SSL includes are (defaults to /usr/local/ssl/include)
54   --with-ssllib=DIR          Where the SSL libraries are (defaults to /usr/local/ssl/lib)"
55 ac_help="$ac_help
56   --with-syslog           Include experimental SYSLOG support (default=no)"
57 ac_help="$ac_help
58   --with-profiling-data   Include gathering source code profile information (default=no)"
59 ac_help="$ac_help
60   --with-quotas           Include experimental disk-quota support (default=no)"
61 ac_help="$ac_help
62   --with-utmp             Include experimental utmp accounting (default=no)"
63 ac_help="$ac_help
64   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
65 ac_help="$ac_help
66   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
67 ac_help="$ac_help
68   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
69 ac_help="$ac_help
70   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
71 ac_help="$ac_help
72   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
73 ac_help="$ac_help
74   --with-acl-support      Include ACL support (default=no)"
75 ac_help="$ac_help
76   --with-winbind          Build winbind (default, if supported by OS)"
77 ac_help="$ac_help
78   --with-included-popt    use bundled popt library, not from system"
79
80 # Initialize some variables set by options.
81 # The variables have the same names as the options, with
82 # dashes changed to underlines.
83 build=NONE
84 cache_file=./config.cache
85 exec_prefix=NONE
86 host=NONE
87 no_create=
88 nonopt=NONE
89 no_recursion=
90 prefix=NONE
91 program_prefix=NONE
92 program_suffix=NONE
93 program_transform_name=s,x,x,
94 silent=
95 site=
96 srcdir=
97 target=NONE
98 verbose=
99 x_includes=NONE
100 x_libraries=NONE
101 bindir='${exec_prefix}/bin'
102 sbindir='${exec_prefix}/sbin'
103 libexecdir='${exec_prefix}/libexec'
104 datadir='${prefix}/share'
105 sysconfdir='${prefix}/etc'
106 sharedstatedir='${prefix}/com'
107 localstatedir='${prefix}/var'
108 libdir='${exec_prefix}/lib'
109 includedir='${prefix}/include'
110 oldincludedir='/usr/include'
111 infodir='${prefix}/info'
112 mandir='${prefix}/man'
113
114 # Initialize some other variables.
115 subdirs=
116 MFLAGS= MAKEFLAGS=
117 SHELL=${CONFIG_SHELL-/bin/sh}
118 # Maximum number of lines to put in a shell here document.
119 ac_max_here_lines=12
120
121 ac_prev=
122 for ac_option
123 do
124
125   # If the previous option needs an argument, assign it.
126   if test -n "$ac_prev"; then
127     eval "$ac_prev=\$ac_option"
128     ac_prev=
129     continue
130   fi
131
132   case "$ac_option" in
133   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
134   *) ac_optarg= ;;
135   esac
136
137   # Accept the important Cygnus configure options, so we can diagnose typos.
138
139   case "$ac_option" in
140
141   -bindir | --bindir | --bindi | --bind | --bin | --bi)
142     ac_prev=bindir ;;
143   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
144     bindir="$ac_optarg" ;;
145
146   -build | --build | --buil | --bui | --bu)
147     ac_prev=build ;;
148   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
149     build="$ac_optarg" ;;
150
151   -cache-file | --cache-file | --cache-fil | --cache-fi \
152   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
153     ac_prev=cache_file ;;
154   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
155   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
156     cache_file="$ac_optarg" ;;
157
158   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
159     ac_prev=datadir ;;
160   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
161   | --da=*)
162     datadir="$ac_optarg" ;;
163
164   -disable-* | --disable-*)
165     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
166     # Reject names that are not valid shell variable names.
167     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
168       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
169     fi
170     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
171     eval "enable_${ac_feature}=no" ;;
172
173   -enable-* | --enable-*)
174     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
175     # Reject names that are not valid shell variable names.
176     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
177       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
178     fi
179     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
180     case "$ac_option" in
181       *=*) ;;
182       *) ac_optarg=yes ;;
183     esac
184     eval "enable_${ac_feature}='$ac_optarg'" ;;
185
186   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
187   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
188   | --exec | --exe | --ex)
189     ac_prev=exec_prefix ;;
190   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
191   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
192   | --exec=* | --exe=* | --ex=*)
193     exec_prefix="$ac_optarg" ;;
194
195   -gas | --gas | --ga | --g)
196     # Obsolete; use --with-gas.
197     with_gas=yes ;;
198
199   -help | --help | --hel | --he)
200     # Omit some internal or obsolete options to make the list less imposing.
201     # This message is too long to be a string in the A/UX 3.1 sh.
202     cat << EOF
203 Usage: configure [options] [host]
204 Options: [defaults in brackets after descriptions]
205 Configuration:
206   --cache-file=FILE       cache test results in FILE
207   --help                  print this message
208   --no-create             do not create output files
209   --quiet, --silent       do not print \`checking...' messages
210   --version               print the version of autoconf that created configure
211 Directory and file names:
212   --prefix=PREFIX         install architecture-independent files in PREFIX
213                           [$ac_default_prefix]
214   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
215                           [same as prefix]
216   --bindir=DIR            user executables in DIR [EPREFIX/bin]
217   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
218   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
219   --datadir=DIR           read-only architecture-independent data in DIR
220                           [PREFIX/share]
221   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
222   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
223                           [PREFIX/com]
224   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
225   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
226   --includedir=DIR        C header files in DIR [PREFIX/include]
227   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
228   --infodir=DIR           info documentation in DIR [PREFIX/info]
229   --mandir=DIR            man documentation in DIR [PREFIX/man]
230   --srcdir=DIR            find the sources in DIR [configure dir or ..]
231   --program-prefix=PREFIX prepend PREFIX to installed program names
232   --program-suffix=SUFFIX append SUFFIX to installed program names
233   --program-transform-name=PROGRAM
234                           run sed PROGRAM on installed program names
235 EOF
236     cat << EOF
237 Host type:
238   --build=BUILD           configure for building on BUILD [BUILD=HOST]
239   --host=HOST             configure for HOST [guessed]
240   --target=TARGET         configure for TARGET [TARGET=HOST]
241 Features and packages:
242   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
243   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
244   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
245   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
246   --x-includes=DIR        X include files are in DIR
247   --x-libraries=DIR       X library files are in DIR
248 EOF
249     if test -n "$ac_help"; then
250       echo "--enable and --with options recognized:$ac_help"
251     fi
252     exit 0 ;;
253
254   -host | --host | --hos | --ho)
255     ac_prev=host ;;
256   -host=* | --host=* | --hos=* | --ho=*)
257     host="$ac_optarg" ;;
258
259   -includedir | --includedir | --includedi | --included | --include \
260   | --includ | --inclu | --incl | --inc)
261     ac_prev=includedir ;;
262   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
263   | --includ=* | --inclu=* | --incl=* | --inc=*)
264     includedir="$ac_optarg" ;;
265
266   -infodir | --infodir | --infodi | --infod | --info | --inf)
267     ac_prev=infodir ;;
268   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
269     infodir="$ac_optarg" ;;
270
271   -libdir | --libdir | --libdi | --libd)
272     ac_prev=libdir ;;
273   -libdir=* | --libdir=* | --libdi=* | --libd=*)
274     libdir="$ac_optarg" ;;
275
276   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
277   | --libexe | --libex | --libe)
278     ac_prev=libexecdir ;;
279   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
280   | --libexe=* | --libex=* | --libe=*)
281     libexecdir="$ac_optarg" ;;
282
283   -localstatedir | --localstatedir | --localstatedi | --localstated \
284   | --localstate | --localstat | --localsta | --localst \
285   | --locals | --local | --loca | --loc | --lo)
286     ac_prev=localstatedir ;;
287   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
288   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
289   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
290     localstatedir="$ac_optarg" ;;
291
292   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
293     ac_prev=mandir ;;
294   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
295     mandir="$ac_optarg" ;;
296
297   -nfp | --nfp | --nf)
298     # Obsolete; use --without-fp.
299     with_fp=no ;;
300
301   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
302   | --no-cr | --no-c)
303     no_create=yes ;;
304
305   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
306   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
307     no_recursion=yes ;;
308
309   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
310   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
311   | --oldin | --oldi | --old | --ol | --o)
312     ac_prev=oldincludedir ;;
313   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
314   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
315   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
316     oldincludedir="$ac_optarg" ;;
317
318   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
319     ac_prev=prefix ;;
320   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
321     prefix="$ac_optarg" ;;
322
323   -program-prefix | --program-prefix | --program-prefi | --program-pref \
324   | --program-pre | --program-pr | --program-p)
325     ac_prev=program_prefix ;;
326   -program-prefix=* | --program-prefix=* | --program-prefi=* \
327   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
328     program_prefix="$ac_optarg" ;;
329
330   -program-suffix | --program-suffix | --program-suffi | --program-suff \
331   | --program-suf | --program-su | --program-s)
332     ac_prev=program_suffix ;;
333   -program-suffix=* | --program-suffix=* | --program-suffi=* \
334   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
335     program_suffix="$ac_optarg" ;;
336
337   -program-transform-name | --program-transform-name \
338   | --program-transform-nam | --program-transform-na \
339   | --program-transform-n | --program-transform- \
340   | --program-transform | --program-transfor \
341   | --program-transfo | --program-transf \
342   | --program-trans | --program-tran \
343   | --progr-tra | --program-tr | --program-t)
344     ac_prev=program_transform_name ;;
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     program_transform_name="$ac_optarg" ;;
353
354   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
355   | -silent | --silent | --silen | --sile | --sil)
356     silent=yes ;;
357
358   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
359     ac_prev=sbindir ;;
360   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
361   | --sbi=* | --sb=*)
362     sbindir="$ac_optarg" ;;
363
364   -sharedstatedir | --sharedstatedir | --sharedstatedi \
365   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
366   | --sharedst | --shareds | --shared | --share | --shar \
367   | --sha | --sh)
368     ac_prev=sharedstatedir ;;
369   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
370   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
371   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
372   | --sha=* | --sh=*)
373     sharedstatedir="$ac_optarg" ;;
374
375   -site | --site | --sit)
376     ac_prev=site ;;
377   -site=* | --site=* | --sit=*)
378     site="$ac_optarg" ;;
379
380   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
381     ac_prev=srcdir ;;
382   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
383     srcdir="$ac_optarg" ;;
384
385   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
386   | --syscon | --sysco | --sysc | --sys | --sy)
387     ac_prev=sysconfdir ;;
388   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
389   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
390     sysconfdir="$ac_optarg" ;;
391
392   -target | --target | --targe | --targ | --tar | --ta | --t)
393     ac_prev=target ;;
394   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
395     target="$ac_optarg" ;;
396
397   -v | -verbose | --verbose | --verbos | --verbo | --verb)
398     verbose=yes ;;
399
400   -version | --version | --versio | --versi | --vers)
401     echo "configure generated by autoconf version 2.13"
402     exit 0 ;;
403
404   -with-* | --with-*)
405     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
406     # Reject names that are not valid shell variable names.
407     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
408       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
409     fi
410     ac_package=`echo $ac_package| sed 's/-/_/g'`
411     case "$ac_option" in
412       *=*) ;;
413       *) ac_optarg=yes ;;
414     esac
415     eval "with_${ac_package}='$ac_optarg'" ;;
416
417   -without-* | --without-*)
418     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
419     # Reject names that are not valid shell variable names.
420     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
421       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
422     fi
423     ac_package=`echo $ac_package| sed 's/-/_/g'`
424     eval "with_${ac_package}=no" ;;
425
426   --x)
427     # Obsolete; use --with-x.
428     with_x=yes ;;
429
430   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
431   | --x-incl | --x-inc | --x-in | --x-i)
432     ac_prev=x_includes ;;
433   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
434   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
435     x_includes="$ac_optarg" ;;
436
437   -x-libraries | --x-libraries | --x-librarie | --x-librari \
438   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
439     ac_prev=x_libraries ;;
440   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
441   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
442     x_libraries="$ac_optarg" ;;
443
444   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
445     ;;
446
447   *)
448     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
449       echo "configure: warning: $ac_option: invalid host type" 1>&2
450     fi
451     if test "x$nonopt" != xNONE; then
452       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
453     fi
454     nonopt="$ac_option"
455     ;;
456
457   esac
458 done
459
460 if test -n "$ac_prev"; then
461   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
462 fi
463
464 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
465
466 # File descriptor usage:
467 # 0 standard input
468 # 1 file creation
469 # 2 errors and warnings
470 # 3 some systems may open it to /dev/tty
471 # 4 used on the Kubota Titan
472 # 6 checking for... messages and results
473 # 5 compiler messages saved in config.log
474 if test "$silent" = yes; then
475   exec 6>/dev/null
476 else
477   exec 6>&1
478 fi
479 exec 5>./config.log
480
481 echo "\
482 This file contains any messages produced by compilers while
483 running configure, to aid debugging if configure makes a mistake.
484 " 1>&5
485
486 # Strip out --no-create and --no-recursion so they do not pile up.
487 # Also quote any args containing shell metacharacters.
488 ac_configure_args=
489 for ac_arg
490 do
491   case "$ac_arg" in
492   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
493   | --no-cr | --no-c) ;;
494   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
495   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
496   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
497   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
498   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
499   esac
500 done
501
502 # NLS nuisances.
503 # Only set these to C if already set.  These must not be set unconditionally
504 # because not all systems understand e.g. LANG=C (notably SCO).
505 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
506 # Non-C LC_CTYPE values break the ctype check.
507 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
508 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
509 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
510 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
511
512 # confdefs.h avoids OS command line length limits that DEFS can exceed.
513 rm -rf conftest* confdefs.h
514 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
515 echo > confdefs.h
516
517 # A filename unique to this package, relative to the directory that
518 # configure is in, which we can look for to find out if srcdir is correct.
519 ac_unique_file=include/includes.h
520
521 # Find the source files, if location was not specified.
522 if test -z "$srcdir"; then
523   ac_srcdir_defaulted=yes
524   # Try the directory containing this script, then its parent.
525   ac_prog=$0
526   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
527   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
528   srcdir=$ac_confdir
529   if test ! -r $srcdir/$ac_unique_file; then
530     srcdir=..
531   fi
532 else
533   ac_srcdir_defaulted=no
534 fi
535 if test ! -r $srcdir/$ac_unique_file; then
536   if test "$ac_srcdir_defaulted" = yes; then
537     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
538   else
539     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
540   fi
541 fi
542 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
543
544 # Prefer explicitly selected file to automatically selected ones.
545 if test -z "$CONFIG_SITE"; then
546   if test "x$prefix" != xNONE; then
547     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
548   else
549     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
550   fi
551 fi
552 for ac_site_file in $CONFIG_SITE; do
553   if test -r "$ac_site_file"; then
554     echo "loading site script $ac_site_file"
555     . "$ac_site_file"
556   fi
557 done
558
559 if test -r "$cache_file"; then
560   echo "loading cache $cache_file"
561   . $cache_file
562 else
563   echo "creating cache $cache_file"
564   > $cache_file
565 fi
566
567 ac_ext=c
568 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
569 ac_cpp='$CPP $CPPFLAGS'
570 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
571 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
572 cross_compiling=$ac_cv_prog_cc_cross
573
574 ac_exeext=
575 ac_objext=o
576 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
577   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
578   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
579     ac_n= ac_c='
580 ' ac_t='        '
581   else
582     ac_n=-n ac_c= ac_t=
583   fi
584 else
585   ac_n= ac_c='\c' ac_t=
586 fi
587
588
589
590 # we want to be compatible with older versions of Samba
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608 # compile with optimisation and without debugging by default
609 CFLAGS="-O ${CFLAGS}"
610
611 # Check whether --enable-debug or --disable-debug was given.
612 if test "${enable_debug+set}" = set; then
613   enableval="$enable_debug"
614   if eval "test x$enable_debug = xyes"; then
615         CFLAGS="${CFLAGS} -g"
616     fi
617 fi
618
619
620 # Check whether --enable-developer or --disable-developer was given.
621 if test "${enable_developer+set}" = set; then
622   enableval="$enable_developer"
623   if eval "test x$enable_developer = xyes"; then
624         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
625     fi
626 fi
627
628
629 # Check whether --enable-krb5developer or --disable-krb5developer was given.
630 if test "${enable_krb5developer+set}" = set; then
631   enableval="$enable_krb5developer"
632   if eval "test x$enable_krb5developer = xyes"; then
633         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
634     fi
635 fi
636
637
638 # Check whether --enable-dmalloc or --disable-dmalloc was given.
639 if test "${enable_dmalloc+set}" = set; then
640   enableval="$enable_dmalloc"
641   :
642 fi
643
644
645 if test "x$enable_dmalloc" = xyes
646 then
647         cat >> confdefs.h <<\EOF
648 #define ENABLE_DMALLOC 1
649 EOF
650
651         cat >> confdefs.h <<\EOF
652 #define DMALLOC_FUNC_CHECK 1
653 EOF
654
655         LIBS="$LIBS -ldmalloc"  
656 fi
657
658 # Extract the first word of "gcc", so it can be a program name with args.
659 set dummy gcc; ac_word=$2
660 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
661 echo "configure:662: checking for $ac_word" >&5
662 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
663   echo $ac_n "(cached) $ac_c" 1>&6
664 else
665   if test -n "$CC"; then
666   ac_cv_prog_CC="$CC" # Let the user override the test.
667 else
668   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
669   ac_dummy="$PATH"
670   for ac_dir in $ac_dummy; do
671     test -z "$ac_dir" && ac_dir=.
672     if test -f $ac_dir/$ac_word; then
673       ac_cv_prog_CC="gcc"
674       break
675     fi
676   done
677   IFS="$ac_save_ifs"
678 fi
679 fi
680 CC="$ac_cv_prog_CC"
681 if test -n "$CC"; then
682   echo "$ac_t""$CC" 1>&6
683 else
684   echo "$ac_t""no" 1>&6
685 fi
686
687 if test -z "$CC"; then
688   # Extract the first word of "cc", so it can be a program name with args.
689 set dummy cc; ac_word=$2
690 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
691 echo "configure:692: checking for $ac_word" >&5
692 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
693   echo $ac_n "(cached) $ac_c" 1>&6
694 else
695   if test -n "$CC"; then
696   ac_cv_prog_CC="$CC" # Let the user override the test.
697 else
698   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
699   ac_prog_rejected=no
700   ac_dummy="$PATH"
701   for ac_dir in $ac_dummy; do
702     test -z "$ac_dir" && ac_dir=.
703     if test -f $ac_dir/$ac_word; then
704       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
705         ac_prog_rejected=yes
706         continue
707       fi
708       ac_cv_prog_CC="cc"
709       break
710     fi
711   done
712   IFS="$ac_save_ifs"
713 if test $ac_prog_rejected = yes; then
714   # We found a bogon in the path, so make sure we never use it.
715   set dummy $ac_cv_prog_CC
716   shift
717   if test $# -gt 0; then
718     # We chose a different compiler from the bogus one.
719     # However, it has the same basename, so the bogon will be chosen
720     # first if we set CC to just the basename; use the full file name.
721     shift
722     set dummy "$ac_dir/$ac_word" "$@"
723     shift
724     ac_cv_prog_CC="$@"
725   fi
726 fi
727 fi
728 fi
729 CC="$ac_cv_prog_CC"
730 if test -n "$CC"; then
731   echo "$ac_t""$CC" 1>&6
732 else
733   echo "$ac_t""no" 1>&6
734 fi
735
736   if test -z "$CC"; then
737     case "`uname -s`" in
738     *win32* | *WIN32*)
739       # Extract the first word of "cl", so it can be a program name with args.
740 set dummy cl; ac_word=$2
741 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
742 echo "configure:743: checking for $ac_word" >&5
743 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
744   echo $ac_n "(cached) $ac_c" 1>&6
745 else
746   if test -n "$CC"; then
747   ac_cv_prog_CC="$CC" # Let the user override the test.
748 else
749   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
750   ac_dummy="$PATH"
751   for ac_dir in $ac_dummy; do
752     test -z "$ac_dir" && ac_dir=.
753     if test -f $ac_dir/$ac_word; then
754       ac_cv_prog_CC="cl"
755       break
756     fi
757   done
758   IFS="$ac_save_ifs"
759 fi
760 fi
761 CC="$ac_cv_prog_CC"
762 if test -n "$CC"; then
763   echo "$ac_t""$CC" 1>&6
764 else
765   echo "$ac_t""no" 1>&6
766 fi
767  ;;
768     esac
769   fi
770   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
771 fi
772
773 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
774 echo "configure:775: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
775
776 ac_ext=c
777 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
778 ac_cpp='$CPP $CPPFLAGS'
779 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
780 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
781 cross_compiling=$ac_cv_prog_cc_cross
782
783 cat > conftest.$ac_ext << EOF
784
785 #line 786 "configure"
786 #include "confdefs.h"
787
788 main(){return(0);}
789 EOF
790 if { (eval echo configure:791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
791   ac_cv_prog_cc_works=yes
792   # If we can't run a trivial program, we are probably using a cross compiler.
793   if (./conftest; exit) 2>/dev/null; then
794     ac_cv_prog_cc_cross=no
795   else
796     ac_cv_prog_cc_cross=yes
797   fi
798 else
799   echo "configure: failed program was:" >&5
800   cat conftest.$ac_ext >&5
801   ac_cv_prog_cc_works=no
802 fi
803 rm -fr conftest*
804 ac_ext=c
805 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
806 ac_cpp='$CPP $CPPFLAGS'
807 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
808 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
809 cross_compiling=$ac_cv_prog_cc_cross
810
811 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
812 if test $ac_cv_prog_cc_works = no; then
813   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
814 fi
815 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
816 echo "configure:817: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
817 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
818 cross_compiling=$ac_cv_prog_cc_cross
819
820 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
821 echo "configure:822: checking whether we are using GNU C" >&5
822 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
823   echo $ac_n "(cached) $ac_c" 1>&6
824 else
825   cat > conftest.c <<EOF
826 #ifdef __GNUC__
827   yes;
828 #endif
829 EOF
830 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
831   ac_cv_prog_gcc=yes
832 else
833   ac_cv_prog_gcc=no
834 fi
835 fi
836
837 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
838
839 if test $ac_cv_prog_gcc = yes; then
840   GCC=yes
841 else
842   GCC=
843 fi
844
845 ac_test_CFLAGS="${CFLAGS+set}"
846 ac_save_CFLAGS="$CFLAGS"
847 CFLAGS=
848 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
849 echo "configure:850: checking whether ${CC-cc} accepts -g" >&5
850 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
851   echo $ac_n "(cached) $ac_c" 1>&6
852 else
853   echo 'void f(){}' > conftest.c
854 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
855   ac_cv_prog_cc_g=yes
856 else
857   ac_cv_prog_cc_g=no
858 fi
859 rm -f conftest*
860
861 fi
862
863 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
864 if test "$ac_test_CFLAGS" = set; then
865   CFLAGS="$ac_save_CFLAGS"
866 elif test $ac_cv_prog_cc_g = yes; then
867   if test "$GCC" = yes; then
868     CFLAGS="-g -O2"
869   else
870     CFLAGS="-g"
871   fi
872 else
873   if test "$GCC" = yes; then
874     CFLAGS="-O2"
875   else
876     CFLAGS=
877   fi
878 fi
879
880 ac_aux_dir=
881 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
882   if test -f $ac_dir/install-sh; then
883     ac_aux_dir=$ac_dir
884     ac_install_sh="$ac_aux_dir/install-sh -c"
885     break
886   elif test -f $ac_dir/install.sh; then
887     ac_aux_dir=$ac_dir
888     ac_install_sh="$ac_aux_dir/install.sh -c"
889     break
890   fi
891 done
892 if test -z "$ac_aux_dir"; then
893   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
894 fi
895 ac_config_guess=$ac_aux_dir/config.guess
896 ac_config_sub=$ac_aux_dir/config.sub
897 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
898
899 # Find a good install program.  We prefer a C program (faster),
900 # so one script is as good as another.  But avoid the broken or
901 # incompatible versions:
902 # SysV /etc/install, /usr/sbin/install
903 # SunOS /usr/etc/install
904 # IRIX /sbin/install
905 # AIX /bin/install
906 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
907 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
908 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
909 # ./install, which can be erroneously created by make from ./install.sh.
910 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
911 echo "configure:912: checking for a BSD compatible install" >&5
912 if test -z "$INSTALL"; then
913 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
914   echo $ac_n "(cached) $ac_c" 1>&6
915 else
916     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
917   for ac_dir in $PATH; do
918     # Account for people who put trailing slashes in PATH elements.
919     case "$ac_dir/" in
920     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
921     *)
922       # OSF1 and SCO ODT 3.0 have their own names for install.
923       # Don't use installbsd from OSF since it installs stuff as root
924       # by default.
925       for ac_prog in ginstall scoinst install; do
926         if test -f $ac_dir/$ac_prog; then
927           if test $ac_prog = install &&
928             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
929             # AIX install.  It has an incompatible calling convention.
930             :
931           else
932             ac_cv_path_install="$ac_dir/$ac_prog -c"
933             break 2
934           fi
935         fi
936       done
937       ;;
938     esac
939   done
940   IFS="$ac_save_IFS"
941
942 fi
943   if test "${ac_cv_path_install+set}" = set; then
944     INSTALL="$ac_cv_path_install"
945   else
946     # As a last resort, use the slow shell script.  We don't cache a
947     # path for INSTALL within a source directory, because that will
948     # break other packages using the cache if that directory is
949     # removed, or if the path is relative.
950     INSTALL="$ac_install_sh"
951   fi
952 fi
953 echo "$ac_t""$INSTALL" 1>&6
954
955 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
956 # It thinks the first close brace ends the variable substitution.
957 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
958
959 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
960
961 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
962
963 for ac_prog in gawk mawk nawk awk
964 do
965 # Extract the first word of "$ac_prog", so it can be a program name with args.
966 set dummy $ac_prog; ac_word=$2
967 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
968 echo "configure:969: checking for $ac_word" >&5
969 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
970   echo $ac_n "(cached) $ac_c" 1>&6
971 else
972   if test -n "$AWK"; then
973   ac_cv_prog_AWK="$AWK" # Let the user override the test.
974 else
975   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
976   ac_dummy="$PATH"
977   for ac_dir in $ac_dummy; do
978     test -z "$ac_dir" && ac_dir=.
979     if test -f $ac_dir/$ac_word; then
980       ac_cv_prog_AWK="$ac_prog"
981       break
982     fi
983   done
984   IFS="$ac_save_ifs"
985 fi
986 fi
987 AWK="$ac_cv_prog_AWK"
988 if test -n "$AWK"; then
989   echo "$ac_t""$AWK" 1>&6
990 else
991   echo "$ac_t""no" 1>&6
992 fi
993
994 test -n "$AWK" && break
995 done
996
997
998 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
999 echo "configure:1000: checking for POSIXized ISC" >&5
1000 if test -d /etc/conf/kconfig.d &&
1001   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1002 then
1003   echo "$ac_t""yes" 1>&6
1004   ISC=yes # If later tests want to check for ISC.
1005   cat >> confdefs.h <<\EOF
1006 #define _POSIX_SOURCE 1
1007 EOF
1008
1009   if test "$GCC" = yes; then
1010     CC="$CC -posix"
1011   else
1012     CC="$CC -Xp"
1013   fi
1014 else
1015   echo "$ac_t""no" 1>&6
1016   ISC=
1017 fi
1018
1019
1020 if test "x$CC" != xcc; then
1021   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1022 echo "configure:1023: checking whether $CC and cc understand -c and -o together" >&5
1023 else
1024   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1025 echo "configure:1026: checking whether cc understands -c and -o together" >&5
1026 fi
1027 set dummy $CC; ac_cc="`echo $2 |
1028                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1029 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1030   echo $ac_n "(cached) $ac_c" 1>&6
1031 else
1032   echo 'foo(){}' > conftest.c
1033 # Make sure it works both with $CC and with simple cc.
1034 # We do the test twice because some compilers refuse to overwrite an
1035 # existing .o file with -o, though they will create one.
1036 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1037 if { (eval echo configure:1038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1038    test -f conftest.o && { (eval echo configure:1039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1039 then
1040   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1041   if test "x$CC" != xcc; then
1042     # Test first that cc exists at all.
1043     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1044       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1045       if { (eval echo configure:1046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1046          test -f conftest.o && { (eval echo configure:1047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1047       then
1048         # cc works too.
1049         :
1050       else
1051         # cc exists but doesn't like -o.
1052         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1053       fi
1054     fi
1055   fi
1056 else
1057   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1058 fi
1059 rm -f conftest*
1060
1061 fi
1062 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1063   echo "$ac_t""yes" 1>&6
1064 else
1065   echo "$ac_t""no" 1>&6
1066   cat >> confdefs.h <<\EOF
1067 #define NO_MINUS_C_MINUS_O 1
1068 EOF
1069
1070 fi
1071
1072 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1073       BROKEN_CC=
1074 else
1075       BROKEN_CC=#
1076 fi
1077
1078
1079 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1080 echo "configure:1081: checking that the C compiler understands volatile" >&5
1081 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1082   echo $ac_n "(cached) $ac_c" 1>&6
1083 else
1084   
1085     cat > conftest.$ac_ext <<EOF
1086 #line 1087 "configure"
1087 #include "confdefs.h"
1088 #include <sys/types.h>
1089 int main() {
1090 volatile int i = 0
1091 ; return 0; }
1092 EOF
1093 if { (eval echo configure:1094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1094   rm -rf conftest*
1095   samba_cv_volatile=yes
1096 else
1097   echo "configure: failed program was:" >&5
1098   cat conftest.$ac_ext >&5
1099   rm -rf conftest*
1100   samba_cv_volatile=no
1101 fi
1102 rm -f conftest*
1103 fi
1104
1105 echo "$ac_t""$samba_cv_volatile" 1>&6
1106 if test x"$samba_cv_volatile" = x"yes"; then
1107    cat >> confdefs.h <<\EOF
1108 #define HAVE_VOLATILE 1
1109 EOF
1110
1111 fi
1112
1113
1114
1115 # Do some error checking and defaulting for the host and target type.
1116 # The inputs are:
1117 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1118 #
1119 # The rules are:
1120 # 1. You are not allowed to specify --host, --target, and nonopt at the
1121 #    same time.
1122 # 2. Host defaults to nonopt.
1123 # 3. If nonopt is not specified, then host defaults to the current host,
1124 #    as determined by config.guess.
1125 # 4. Target and build default to nonopt.
1126 # 5. If nonopt is not specified, then target and build default to host.
1127
1128 # The aliases save the names the user supplied, while $host etc.
1129 # will get canonicalized.
1130 case $host---$target---$nonopt in
1131 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1132 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1133 esac
1134
1135
1136 # Make sure we can run config.sub.
1137 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1138 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1139 fi
1140
1141 echo $ac_n "checking host system type""... $ac_c" 1>&6
1142 echo "configure:1143: checking host system type" >&5
1143
1144 host_alias=$host
1145 case "$host_alias" in
1146 NONE)
1147   case $nonopt in
1148   NONE)
1149     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1150     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1151     fi ;;
1152   *) host_alias=$nonopt ;;
1153   esac ;;
1154 esac
1155
1156 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1157 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1158 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1159 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1160 echo "$ac_t""$host" 1>&6
1161
1162 echo $ac_n "checking target system type""... $ac_c" 1>&6
1163 echo "configure:1164: checking target system type" >&5
1164
1165 target_alias=$target
1166 case "$target_alias" in
1167 NONE)
1168   case $nonopt in
1169   NONE) target_alias=$host_alias ;;
1170   *) target_alias=$nonopt ;;
1171   esac ;;
1172 esac
1173
1174 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1175 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1176 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1177 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1178 echo "$ac_t""$target" 1>&6
1179
1180 echo $ac_n "checking build system type""... $ac_c" 1>&6
1181 echo "configure:1182: checking build system type" >&5
1182
1183 build_alias=$build
1184 case "$build_alias" in
1185 NONE)
1186   case $nonopt in
1187   NONE) build_alias=$host_alias ;;
1188   *) build_alias=$nonopt ;;
1189   esac ;;
1190 esac
1191
1192 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1193 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1194 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1195 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1196 echo "$ac_t""$build" 1>&6
1197
1198 test "$host_alias" != "$target_alias" &&
1199   test "$program_prefix$program_suffix$program_transform_name" = \
1200     NONENONEs,x,x, &&
1201   program_prefix=${target_alias}-
1202
1203
1204   case "$host_os" in
1205         *irix6*) cat >> confdefs.h <<\EOF
1206 #include <standards.h>
1207 EOF
1208
1209         ;;
1210 esac
1211
1212
1213     
1214     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1215 echo "configure:1216: checking config.cache system type" >&5
1216     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1217          test x"$ac_cv_host_system_type" != x"$host"; } ||
1218        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1219          test x"$ac_cv_build_system_type" != x"$build"; } ||
1220        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1221          test x"$ac_cv_target_system_type" != x"$target"; }; then
1222         echo "$ac_t""different" 1>&6
1223         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1224     else
1225         echo "$ac_t""same" 1>&6
1226     fi
1227     ac_cv_host_system_type="$host"
1228     ac_cv_build_system_type="$build"
1229     ac_cv_target_system_type="$target"
1230
1231
1232 DYNEXP=
1233
1234 # I'm sure gcc supports -rdynamic
1235 if test "$ac_cv_prog_gcc" = yes; then
1236     DYNEXP="-rdynamic"
1237 fi
1238
1239 #
1240 # Config CPPFLAG settings for strange OS's that must be set
1241 # before other tests.
1242 #
1243 case "$host_os" in
1244 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1245     *hpux*)
1246     
1247       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1248 echo "configure:1249: checking whether ${CC-cc} accepts -Ae" >&5
1249 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1250   echo $ac_n "(cached) $ac_c" 1>&6
1251 else
1252   echo 'void f(){}' > conftest.c
1253 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1254   ac_cv_prog_cc_Ae=yes
1255 else
1256   ac_cv_prog_cc_Ae=no
1257 fi
1258 rm -f conftest*
1259
1260 fi
1261
1262 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1263       # mmap on HPUX is completely broken...
1264       cat >> confdefs.h <<\EOF
1265 #define MMAP_BLACKLIST 1
1266 EOF
1267
1268       if test $ac_cv_prog_cc_Ae = yes; then
1269         CPPFLAGS="$CPPFLAGS -Ae"
1270       fi
1271 #
1272 # Defines needed for HPUX support.
1273 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1274 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1275 #
1276       case `uname -r` in
1277                         *9*|*10*)
1278                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1279                                 cat >> confdefs.h <<\EOF
1280 #define USE_BOTH_CRYPT_CALLS 1
1281 EOF
1282
1283                                 ;;
1284                         *11*)
1285                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1286                                 cat >> confdefs.h <<\EOF
1287 #define USE_BOTH_CRYPT_CALLS 1
1288 EOF
1289
1290                                 ;;
1291       esac
1292       DYNEXP="-Wl,-E"
1293       ;;
1294
1295 #
1296 # CRAY Unicos has broken const handling
1297        *unicos*)
1298           echo "$ac_t""disabling const" 1>&6
1299           CPPFLAGS="$CPPFLAGS -Dconst="
1300           ;;
1301         
1302 #
1303 # AIX4.x doesn't even admit to having large
1304 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1305 #
1306     *aix4*)
1307           echo "$ac_t""enabling large file support" 1>&6
1308       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1309       ;;    
1310 #
1311 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1312 # to the existance of large files..
1313 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1314 # recommendations on large file support, however it makes the
1315 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1316 # recommendation makes the compile fail on gcc2.7. JRA.
1317 #
1318         *solaris*)
1319                 case `uname -r` in
1320                         5.0*|5.1*|5.2*|5.3*|5.5*)
1321                                 echo "$ac_t""no large file support" 1>&6
1322                                 ;;
1323                         5.*)
1324                         echo "$ac_t""enabling large file support" 1>&6
1325                         if test "$ac_cv_prog_gcc" = yes; then
1326                                 ${CC-cc} -v >conftest.c 2>&1
1327                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1328                                 rm -fr conftest.c
1329                                 case "$ac_cv_gcc_compiler_version_number" in
1330                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1331                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1332                                                 ;;
1333                                         *)
1334                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1335                                                 ;;
1336                                 esac
1337                         else
1338                 DYNEXP="-dc -dp"
1339                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1340                         fi
1341                         ;;
1342                 esac
1343                 ;;
1344 #
1345 # Tests needed for SINIX large file support.
1346 #
1347     *sysv4*)
1348       if test $host = mips-sni-sysv4 ; then
1349         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1350 echo "configure:1351: checking for LFS support" >&5
1351         old_CPPFLAGS="$CPPFLAGS"
1352         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1353         if test "$cross_compiling" = yes; then
1354   SINIX_LFS_SUPPORT=cross
1355 else
1356   cat > conftest.$ac_ext <<EOF
1357 #line 1358 "configure"
1358 #include "confdefs.h"
1359
1360 #include <unistd.h>
1361 main () {
1362 #if _LFS64_LARGEFILE == 1
1363 exit(0);
1364 #else
1365 exit(1);
1366 #endif
1367 }
1368 EOF
1369 if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1370 then
1371   SINIX_LFS_SUPPORT=yes
1372 else
1373   echo "configure: failed program was:" >&5
1374   cat conftest.$ac_ext >&5
1375   rm -fr conftest*
1376   SINIX_LFS_SUPPORT=no
1377 fi
1378 rm -fr conftest*
1379 fi
1380
1381         CPPFLAGS="$old_CPPFLAGS"
1382         if test x$SINIX_LFS_SUPPORT = xyes ; then
1383           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1384           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1385           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1386           LIBS="`getconf LFS64_LIBS` $LIBS"
1387         fi
1388       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1389       fi
1390     ;;
1391
1392 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1393 #
1394     *linux*)
1395         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1396 echo "configure:1397: checking for LFS support" >&5
1397         old_CPPFLAGS="$CPPFLAGS"
1398         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1399        if test "$cross_compiling" = yes; then
1400   LINUX_LFS_SUPPORT=cross
1401 else
1402   cat > conftest.$ac_ext <<EOF
1403 #line 1404 "configure"
1404 #include "confdefs.h"
1405
1406 #include <unistd.h>
1407 #include <sys/utsname.h>
1408 main() {
1409 #if _LFS64_LARGEFILE == 1
1410        struct utsname uts;
1411        char *release;
1412        int major, minor;
1413
1414        /* Ensure this is glibc 2.2 or higher */
1415 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1416        int libc_major = __GLIBC__;
1417        int libc_minor = __GLIBC_MINOR__;
1418
1419        if (libc_major < 2)
1420               exit(1);
1421        if (libc_minor < 2)
1422               exit(1);
1423 #endif
1424
1425        /* Ensure this is kernel 2.4 or higher */
1426
1427        uname(&uts);
1428        release = uts.release;
1429        major = atoi(strsep(&release, "."));
1430        minor = atoi(strsep(&release, "."));
1431
1432        if (major > 2 || (major == 2 && minor > 3))
1433                exit(0);
1434        exit(1);
1435 #else
1436        exit(1);
1437 #endif
1438 }
1439
1440 EOF
1441 if { (eval echo configure:1442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1442 then
1443   LINUX_LFS_SUPPORT=yes
1444 else
1445   echo "configure: failed program was:" >&5
1446   cat conftest.$ac_ext >&5
1447   rm -fr conftest*
1448   LINUX_LFS_SUPPORT=no
1449 fi
1450 rm -fr conftest*
1451 fi
1452
1453         CPPFLAGS="$old_CPPFLAGS"
1454         if test x$LINUX_LFS_SUPPORT = xyes ; then
1455           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1456         fi
1457        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1458                 ;;
1459
1460     *hurd*)
1461         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1462 echo "configure:1463: checking for LFS support" >&5
1463         old_CPPFLAGS="$CPPFLAGS"
1464         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1465         if test "$cross_compiling" = yes; then
1466   GLIBC_LFS_SUPPORT=cross
1467 else
1468   cat > conftest.$ac_ext <<EOF
1469 #line 1470 "configure"
1470 #include "confdefs.h"
1471
1472 #include <unistd.h>
1473 main () {
1474 #if _LFS64_LARGEFILE == 1
1475 exit(0);
1476 #else
1477 exit(1);
1478 #endif
1479 }
1480 EOF
1481 if { (eval echo configure:1482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1482 then
1483   GLIBC_LFS_SUPPORT=yes
1484 else
1485   echo "configure: failed program was:" >&5
1486   cat conftest.$ac_ext >&5
1487   rm -fr conftest*
1488   GLIBC_LFS_SUPPORT=no
1489 fi
1490 rm -fr conftest*
1491 fi
1492
1493         CPPFLAGS="$old_CPPFLAGS"
1494         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1495           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1496         fi
1497       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1498     ;;
1499
1500 esac
1501
1502 echo $ac_n "checking for inline""... $ac_c" 1>&6
1503 echo "configure:1504: checking for inline" >&5
1504 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1505   echo $ac_n "(cached) $ac_c" 1>&6
1506 else
1507   ac_cv_c_inline=no
1508 for ac_kw in inline __inline__ __inline; do
1509   cat > conftest.$ac_ext <<EOF
1510 #line 1511 "configure"
1511 #include "confdefs.h"
1512
1513 int main() {
1514 } $ac_kw foo() {
1515 ; return 0; }
1516 EOF
1517 if { (eval echo configure:1518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1518   rm -rf conftest*
1519   ac_cv_c_inline=$ac_kw; break
1520 else
1521   echo "configure: failed program was:" >&5
1522   cat conftest.$ac_ext >&5
1523 fi
1524 rm -f conftest*
1525 done
1526
1527 fi
1528
1529 echo "$ac_t""$ac_cv_c_inline" 1>&6
1530 case "$ac_cv_c_inline" in
1531   inline | yes) ;;
1532   no) cat >> confdefs.h <<\EOF
1533 #define inline 
1534 EOF
1535  ;;
1536   *)  cat >> confdefs.h <<EOF
1537 #define inline $ac_cv_c_inline
1538 EOF
1539  ;;
1540 esac
1541
1542 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1543 echo "configure:1544: checking how to run the C preprocessor" >&5
1544 # On Suns, sometimes $CPP names a directory.
1545 if test -n "$CPP" && test -d "$CPP"; then
1546   CPP=
1547 fi
1548 if test -z "$CPP"; then
1549 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1550   echo $ac_n "(cached) $ac_c" 1>&6
1551 else
1552     # This must be in double quotes, not single quotes, because CPP may get
1553   # substituted into the Makefile and "${CC-cc}" will confuse make.
1554   CPP="${CC-cc} -E"
1555   # On the NeXT, cc -E runs the code through the compiler's parser,
1556   # not just through cpp.
1557   cat > conftest.$ac_ext <<EOF
1558 #line 1559 "configure"
1559 #include "confdefs.h"
1560 #include <assert.h>
1561 Syntax Error
1562 EOF
1563 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1564 { (eval echo configure:1565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1565 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1566 if test -z "$ac_err"; then
1567   :
1568 else
1569   echo "$ac_err" >&5
1570   echo "configure: failed program was:" >&5
1571   cat conftest.$ac_ext >&5
1572   rm -rf conftest*
1573   CPP="${CC-cc} -E -traditional-cpp"
1574   cat > conftest.$ac_ext <<EOF
1575 #line 1576 "configure"
1576 #include "confdefs.h"
1577 #include <assert.h>
1578 Syntax Error
1579 EOF
1580 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1581 { (eval echo configure:1582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1582 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1583 if test -z "$ac_err"; then
1584   :
1585 else
1586   echo "$ac_err" >&5
1587   echo "configure: failed program was:" >&5
1588   cat conftest.$ac_ext >&5
1589   rm -rf conftest*
1590   CPP="${CC-cc} -nologo -E"
1591   cat > conftest.$ac_ext <<EOF
1592 #line 1593 "configure"
1593 #include "confdefs.h"
1594 #include <assert.h>
1595 Syntax Error
1596 EOF
1597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1598 { (eval echo configure:1599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1600 if test -z "$ac_err"; then
1601   :
1602 else
1603   echo "$ac_err" >&5
1604   echo "configure: failed program was:" >&5
1605   cat conftest.$ac_ext >&5
1606   rm -rf conftest*
1607   CPP=/lib/cpp
1608 fi
1609 rm -f conftest*
1610 fi
1611 rm -f conftest*
1612 fi
1613 rm -f conftest*
1614   ac_cv_prog_CPP="$CPP"
1615 fi
1616   CPP="$ac_cv_prog_CPP"
1617 else
1618   ac_cv_prog_CPP="$CPP"
1619 fi
1620 echo "$ac_t""$CPP" 1>&6
1621
1622 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1623 echo "configure:1624: checking for ANSI C header files" >&5
1624 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1625   echo $ac_n "(cached) $ac_c" 1>&6
1626 else
1627   cat > conftest.$ac_ext <<EOF
1628 #line 1629 "configure"
1629 #include "confdefs.h"
1630 #include <stdlib.h>
1631 #include <stdarg.h>
1632 #include <string.h>
1633 #include <float.h>
1634 EOF
1635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1636 { (eval echo configure:1637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1638 if test -z "$ac_err"; then
1639   rm -rf conftest*
1640   ac_cv_header_stdc=yes
1641 else
1642   echo "$ac_err" >&5
1643   echo "configure: failed program was:" >&5
1644   cat conftest.$ac_ext >&5
1645   rm -rf conftest*
1646   ac_cv_header_stdc=no
1647 fi
1648 rm -f conftest*
1649
1650 if test $ac_cv_header_stdc = yes; then
1651   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1652 cat > conftest.$ac_ext <<EOF
1653 #line 1654 "configure"
1654 #include "confdefs.h"
1655 #include <string.h>
1656 EOF
1657 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1658   egrep "memchr" >/dev/null 2>&1; then
1659   :
1660 else
1661   rm -rf conftest*
1662   ac_cv_header_stdc=no
1663 fi
1664 rm -f conftest*
1665
1666 fi
1667
1668 if test $ac_cv_header_stdc = yes; then
1669   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1670 cat > conftest.$ac_ext <<EOF
1671 #line 1672 "configure"
1672 #include "confdefs.h"
1673 #include <stdlib.h>
1674 EOF
1675 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1676   egrep "free" >/dev/null 2>&1; then
1677   :
1678 else
1679   rm -rf conftest*
1680   ac_cv_header_stdc=no
1681 fi
1682 rm -f conftest*
1683
1684 fi
1685
1686 if test $ac_cv_header_stdc = yes; then
1687   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1688 if test "$cross_compiling" = yes; then
1689   :
1690 else
1691   cat > conftest.$ac_ext <<EOF
1692 #line 1693 "configure"
1693 #include "confdefs.h"
1694 #include <ctype.h>
1695 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1696 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1697 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1698 int main () { int i; for (i = 0; i < 256; i++)
1699 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1700 exit (0); }
1701
1702 EOF
1703 if { (eval echo configure:1704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1704 then
1705   :
1706 else
1707   echo "configure: failed program was:" >&5
1708   cat conftest.$ac_ext >&5
1709   rm -fr conftest*
1710   ac_cv_header_stdc=no
1711 fi
1712 rm -fr conftest*
1713 fi
1714
1715 fi
1716 fi
1717
1718 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1719 if test $ac_cv_header_stdc = yes; then
1720   cat >> confdefs.h <<\EOF
1721 #define STDC_HEADERS 1
1722 EOF
1723
1724 fi
1725
1726 ac_header_dirent=no
1727 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1728 do
1729 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1730 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1731 echo "configure:1732: checking for $ac_hdr that defines DIR" >&5
1732 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1733   echo $ac_n "(cached) $ac_c" 1>&6
1734 else
1735   cat > conftest.$ac_ext <<EOF
1736 #line 1737 "configure"
1737 #include "confdefs.h"
1738 #include <sys/types.h>
1739 #include <$ac_hdr>
1740 int main() {
1741 DIR *dirp = 0;
1742 ; return 0; }
1743 EOF
1744 if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1745   rm -rf conftest*
1746   eval "ac_cv_header_dirent_$ac_safe=yes"
1747 else
1748   echo "configure: failed program was:" >&5
1749   cat conftest.$ac_ext >&5
1750   rm -rf conftest*
1751   eval "ac_cv_header_dirent_$ac_safe=no"
1752 fi
1753 rm -f conftest*
1754 fi
1755 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1756   echo "$ac_t""yes" 1>&6
1757     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1758   cat >> confdefs.h <<EOF
1759 #define $ac_tr_hdr 1
1760 EOF
1761  ac_header_dirent=$ac_hdr; break
1762 else
1763   echo "$ac_t""no" 1>&6
1764 fi
1765 done
1766 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1767 if test $ac_header_dirent = dirent.h; then
1768 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1769 echo "configure:1770: checking for opendir in -ldir" >&5
1770 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1771 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1772   echo $ac_n "(cached) $ac_c" 1>&6
1773 else
1774   ac_save_LIBS="$LIBS"
1775 LIBS="-ldir  $LIBS"
1776 cat > conftest.$ac_ext <<EOF
1777 #line 1778 "configure"
1778 #include "confdefs.h"
1779 /* Override any gcc2 internal prototype to avoid an error.  */
1780 /* We use char because int might match the return type of a gcc2
1781     builtin and then its argument prototype would still apply.  */
1782 char opendir();
1783
1784 int main() {
1785 opendir()
1786 ; return 0; }
1787 EOF
1788 if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1789   rm -rf conftest*
1790   eval "ac_cv_lib_$ac_lib_var=yes"
1791 else
1792   echo "configure: failed program was:" >&5
1793   cat conftest.$ac_ext >&5
1794   rm -rf conftest*
1795   eval "ac_cv_lib_$ac_lib_var=no"
1796 fi
1797 rm -f conftest*
1798 LIBS="$ac_save_LIBS"
1799
1800 fi
1801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1802   echo "$ac_t""yes" 1>&6
1803   LIBS="$LIBS -ldir"
1804 else
1805   echo "$ac_t""no" 1>&6
1806 fi
1807
1808 else
1809 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1810 echo "configure:1811: checking for opendir in -lx" >&5
1811 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1812 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1813   echo $ac_n "(cached) $ac_c" 1>&6
1814 else
1815   ac_save_LIBS="$LIBS"
1816 LIBS="-lx  $LIBS"
1817 cat > conftest.$ac_ext <<EOF
1818 #line 1819 "configure"
1819 #include "confdefs.h"
1820 /* Override any gcc2 internal prototype to avoid an error.  */
1821 /* We use char because int might match the return type of a gcc2
1822     builtin and then its argument prototype would still apply.  */
1823 char opendir();
1824
1825 int main() {
1826 opendir()
1827 ; return 0; }
1828 EOF
1829 if { (eval echo configure:1830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1830   rm -rf conftest*
1831   eval "ac_cv_lib_$ac_lib_var=yes"
1832 else
1833   echo "configure: failed program was:" >&5
1834   cat conftest.$ac_ext >&5
1835   rm -rf conftest*
1836   eval "ac_cv_lib_$ac_lib_var=no"
1837 fi
1838 rm -f conftest*
1839 LIBS="$ac_save_LIBS"
1840
1841 fi
1842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1843   echo "$ac_t""yes" 1>&6
1844   LIBS="$LIBS -lx"
1845 else
1846   echo "$ac_t""no" 1>&6
1847 fi
1848
1849 fi
1850
1851 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1852 echo "configure:1853: checking whether time.h and sys/time.h may both be included" >&5
1853 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1854   echo $ac_n "(cached) $ac_c" 1>&6
1855 else
1856   cat > conftest.$ac_ext <<EOF
1857 #line 1858 "configure"
1858 #include "confdefs.h"
1859 #include <sys/types.h>
1860 #include <sys/time.h>
1861 #include <time.h>
1862 int main() {
1863 struct tm *tp;
1864 ; return 0; }
1865 EOF
1866 if { (eval echo configure:1867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1867   rm -rf conftest*
1868   ac_cv_header_time=yes
1869 else
1870   echo "configure: failed program was:" >&5
1871   cat conftest.$ac_ext >&5
1872   rm -rf conftest*
1873   ac_cv_header_time=no
1874 fi
1875 rm -f conftest*
1876 fi
1877
1878 echo "$ac_t""$ac_cv_header_time" 1>&6
1879 if test $ac_cv_header_time = yes; then
1880   cat >> confdefs.h <<\EOF
1881 #define TIME_WITH_SYS_TIME 1
1882 EOF
1883
1884 fi
1885
1886 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1887 echo "configure:1888: checking for sys/wait.h that is POSIX.1 compatible" >&5
1888 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1889   echo $ac_n "(cached) $ac_c" 1>&6
1890 else
1891   cat > conftest.$ac_ext <<EOF
1892 #line 1893 "configure"
1893 #include "confdefs.h"
1894 #include <sys/types.h>
1895 #include <sys/wait.h>
1896 #ifndef WEXITSTATUS
1897 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1898 #endif
1899 #ifndef WIFEXITED
1900 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1901 #endif
1902 int main() {
1903 int s;
1904 wait (&s);
1905 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1906 ; return 0; }
1907 EOF
1908 if { (eval echo configure:1909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1909   rm -rf conftest*
1910   ac_cv_header_sys_wait_h=yes
1911 else
1912   echo "configure: failed program was:" >&5
1913   cat conftest.$ac_ext >&5
1914   rm -rf conftest*
1915   ac_cv_header_sys_wait_h=no
1916 fi
1917 rm -f conftest*
1918 fi
1919
1920 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1921 if test $ac_cv_header_sys_wait_h = yes; then
1922   cat >> confdefs.h <<\EOF
1923 #define HAVE_SYS_WAIT_H 1
1924 EOF
1925
1926 fi
1927
1928 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1929 do
1930 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1931 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1932 echo "configure:1933: checking for $ac_hdr" >&5
1933 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1934   echo $ac_n "(cached) $ac_c" 1>&6
1935 else
1936   cat > conftest.$ac_ext <<EOF
1937 #line 1938 "configure"
1938 #include "confdefs.h"
1939 #include <$ac_hdr>
1940 EOF
1941 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1942 { (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1943 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1944 if test -z "$ac_err"; then
1945   rm -rf conftest*
1946   eval "ac_cv_header_$ac_safe=yes"
1947 else
1948   echo "$ac_err" >&5
1949   echo "configure: failed program was:" >&5
1950   cat conftest.$ac_ext >&5
1951   rm -rf conftest*
1952   eval "ac_cv_header_$ac_safe=no"
1953 fi
1954 rm -f conftest*
1955 fi
1956 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1957   echo "$ac_t""yes" 1>&6
1958     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1959   cat >> confdefs.h <<EOF
1960 #define $ac_tr_hdr 1
1961 EOF
1962  
1963 else
1964   echo "$ac_t""no" 1>&6
1965 fi
1966 done
1967
1968 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1969 do
1970 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1971 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1972 echo "configure:1973: checking for $ac_hdr" >&5
1973 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1974   echo $ac_n "(cached) $ac_c" 1>&6
1975 else
1976   cat > conftest.$ac_ext <<EOF
1977 #line 1978 "configure"
1978 #include "confdefs.h"
1979 #include <$ac_hdr>
1980 EOF
1981 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1982 { (eval echo configure:1983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1983 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1984 if test -z "$ac_err"; then
1985   rm -rf conftest*
1986   eval "ac_cv_header_$ac_safe=yes"
1987 else
1988   echo "$ac_err" >&5
1989   echo "configure: failed program was:" >&5
1990   cat conftest.$ac_ext >&5
1991   rm -rf conftest*
1992   eval "ac_cv_header_$ac_safe=no"
1993 fi
1994 rm -f conftest*
1995 fi
1996 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1997   echo "$ac_t""yes" 1>&6
1998     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1999   cat >> confdefs.h <<EOF
2000 #define $ac_tr_hdr 1
2001 EOF
2002  
2003 else
2004   echo "$ac_t""no" 1>&6
2005 fi
2006 done
2007
2008 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2009 do
2010 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2011 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2012 echo "configure:2013: checking for $ac_hdr" >&5
2013 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2014   echo $ac_n "(cached) $ac_c" 1>&6
2015 else
2016   cat > conftest.$ac_ext <<EOF
2017 #line 2018 "configure"
2018 #include "confdefs.h"
2019 #include <$ac_hdr>
2020 EOF
2021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2022 { (eval echo configure:2023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2024 if test -z "$ac_err"; then
2025   rm -rf conftest*
2026   eval "ac_cv_header_$ac_safe=yes"
2027 else
2028   echo "$ac_err" >&5
2029   echo "configure: failed program was:" >&5
2030   cat conftest.$ac_ext >&5
2031   rm -rf conftest*
2032   eval "ac_cv_header_$ac_safe=no"
2033 fi
2034 rm -f conftest*
2035 fi
2036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2037   echo "$ac_t""yes" 1>&6
2038     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2039   cat >> confdefs.h <<EOF
2040 #define $ac_tr_hdr 1
2041 EOF
2042  
2043 else
2044   echo "$ac_t""no" 1>&6
2045 fi
2046 done
2047
2048 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2049 do
2050 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2051 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2052 echo "configure:2053: checking for $ac_hdr" >&5
2053 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2054   echo $ac_n "(cached) $ac_c" 1>&6
2055 else
2056   cat > conftest.$ac_ext <<EOF
2057 #line 2058 "configure"
2058 #include "confdefs.h"
2059 #include <$ac_hdr>
2060 EOF
2061 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2062 { (eval echo configure:2063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2063 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2064 if test -z "$ac_err"; then
2065   rm -rf conftest*
2066   eval "ac_cv_header_$ac_safe=yes"
2067 else
2068   echo "$ac_err" >&5
2069   echo "configure: failed program was:" >&5
2070   cat conftest.$ac_ext >&5
2071   rm -rf conftest*
2072   eval "ac_cv_header_$ac_safe=no"
2073 fi
2074 rm -f conftest*
2075 fi
2076 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2077   echo "$ac_t""yes" 1>&6
2078     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2079   cat >> confdefs.h <<EOF
2080 #define $ac_tr_hdr 1
2081 EOF
2082  
2083 else
2084   echo "$ac_t""no" 1>&6
2085 fi
2086 done
2087
2088 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
2089 do
2090 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2091 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2092 echo "configure:2093: checking for $ac_hdr" >&5
2093 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2094   echo $ac_n "(cached) $ac_c" 1>&6
2095 else
2096   cat > conftest.$ac_ext <<EOF
2097 #line 2098 "configure"
2098 #include "confdefs.h"
2099 #include <$ac_hdr>
2100 EOF
2101 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2102 { (eval echo configure:2103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2103 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2104 if test -z "$ac_err"; then
2105   rm -rf conftest*
2106   eval "ac_cv_header_$ac_safe=yes"
2107 else
2108   echo "$ac_err" >&5
2109   echo "configure: failed program was:" >&5
2110   cat conftest.$ac_ext >&5
2111   rm -rf conftest*
2112   eval "ac_cv_header_$ac_safe=no"
2113 fi
2114 rm -f conftest*
2115 fi
2116 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2117   echo "$ac_t""yes" 1>&6
2118     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2119   cat >> confdefs.h <<EOF
2120 #define $ac_tr_hdr 1
2121 EOF
2122  
2123 else
2124   echo "$ac_t""no" 1>&6
2125 fi
2126 done
2127
2128 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2129 do
2130 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2131 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2132 echo "configure:2133: checking for $ac_hdr" >&5
2133 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2134   echo $ac_n "(cached) $ac_c" 1>&6
2135 else
2136   cat > conftest.$ac_ext <<EOF
2137 #line 2138 "configure"
2138 #include "confdefs.h"
2139 #include <$ac_hdr>
2140 EOF
2141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2142 { (eval echo configure:2143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2144 if test -z "$ac_err"; then
2145   rm -rf conftest*
2146   eval "ac_cv_header_$ac_safe=yes"
2147 else
2148   echo "$ac_err" >&5
2149   echo "configure: failed program was:" >&5
2150   cat conftest.$ac_ext >&5
2151   rm -rf conftest*
2152   eval "ac_cv_header_$ac_safe=no"
2153 fi
2154 rm -f conftest*
2155 fi
2156 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2157   echo "$ac_t""yes" 1>&6
2158     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2159   cat >> confdefs.h <<EOF
2160 #define $ac_tr_hdr 1
2161 EOF
2162  
2163 else
2164   echo "$ac_t""no" 1>&6
2165 fi
2166 done
2167
2168 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2169 do
2170 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2171 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2172 echo "configure:2173: checking for $ac_hdr" >&5
2173 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2174   echo $ac_n "(cached) $ac_c" 1>&6
2175 else
2176   cat > conftest.$ac_ext <<EOF
2177 #line 2178 "configure"
2178 #include "confdefs.h"
2179 #include <$ac_hdr>
2180 EOF
2181 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2182 { (eval echo configure:2183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2183 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2184 if test -z "$ac_err"; then
2185   rm -rf conftest*
2186   eval "ac_cv_header_$ac_safe=yes"
2187 else
2188   echo "$ac_err" >&5
2189   echo "configure: failed program was:" >&5
2190   cat conftest.$ac_ext >&5
2191   rm -rf conftest*
2192   eval "ac_cv_header_$ac_safe=no"
2193 fi
2194 rm -f conftest*
2195 fi
2196 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2197   echo "$ac_t""yes" 1>&6
2198     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2199   cat >> confdefs.h <<EOF
2200 #define $ac_tr_hdr 1
2201 EOF
2202  
2203 else
2204   echo "$ac_t""no" 1>&6
2205 fi
2206 done
2207
2208 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h
2209 do
2210 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2211 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2212 echo "configure:2213: checking for $ac_hdr" >&5
2213 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2214   echo $ac_n "(cached) $ac_c" 1>&6
2215 else
2216   cat > conftest.$ac_ext <<EOF
2217 #line 2218 "configure"
2218 #include "confdefs.h"
2219 #include <$ac_hdr>
2220 EOF
2221 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2222 { (eval echo configure:2223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2223 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2224 if test -z "$ac_err"; then
2225   rm -rf conftest*
2226   eval "ac_cv_header_$ac_safe=yes"
2227 else
2228   echo "$ac_err" >&5
2229   echo "configure: failed program was:" >&5
2230   cat conftest.$ac_ext >&5
2231   rm -rf conftest*
2232   eval "ac_cv_header_$ac_safe=no"
2233 fi
2234 rm -f conftest*
2235 fi
2236 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2237   echo "$ac_t""yes" 1>&6
2238     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2239   cat >> confdefs.h <<EOF
2240 #define $ac_tr_hdr 1
2241 EOF
2242  
2243 else
2244   echo "$ac_t""no" 1>&6
2245 fi
2246 done
2247
2248
2249 #
2250 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2251 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2252 #
2253 case "$host_os" in
2254     *hpux*)
2255                 cat > conftest.$ac_ext <<EOF
2256 #line 2257 "configure"
2257 #include "confdefs.h"
2258 #include <shadow.h>
2259 int main() {
2260 struct spwd testme
2261 ; return 0; }
2262 EOF
2263 if { (eval echo configure:2264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2264   rm -rf conftest*
2265   ac_cv_header_shadow_h=yes
2266 else
2267   echo "configure: failed program was:" >&5
2268   cat conftest.$ac_ext >&5
2269   rm -rf conftest*
2270   ac_cv_header_shadow_h=no
2271 fi
2272 rm -f conftest*
2273                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2274                    cat >> confdefs.h <<\EOF
2275 #define HAVE_SHADOW_H 1
2276 EOF
2277
2278                 fi
2279         ;;
2280 esac
2281 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2282 do
2283 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2284 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2285 echo "configure:2286: checking for $ac_hdr" >&5
2286 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2287   echo $ac_n "(cached) $ac_c" 1>&6
2288 else
2289   cat > conftest.$ac_ext <<EOF
2290 #line 2291 "configure"
2291 #include "confdefs.h"
2292 #include <$ac_hdr>
2293 EOF
2294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2295 { (eval echo configure:2296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2297 if test -z "$ac_err"; then
2298   rm -rf conftest*
2299   eval "ac_cv_header_$ac_safe=yes"
2300 else
2301   echo "$ac_err" >&5
2302   echo "configure: failed program was:" >&5
2303   cat conftest.$ac_ext >&5
2304   rm -rf conftest*
2305   eval "ac_cv_header_$ac_safe=no"
2306 fi
2307 rm -f conftest*
2308 fi
2309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2310   echo "$ac_t""yes" 1>&6
2311     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2312   cat >> confdefs.h <<EOF
2313 #define $ac_tr_hdr 1
2314 EOF
2315  
2316 else
2317   echo "$ac_t""no" 1>&6
2318 fi
2319 done
2320
2321 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2322 do
2323 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2324 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2325 echo "configure:2326: checking for $ac_hdr" >&5
2326 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2327   echo $ac_n "(cached) $ac_c" 1>&6
2328 else
2329   cat > conftest.$ac_ext <<EOF
2330 #line 2331 "configure"
2331 #include "confdefs.h"
2332 #include <$ac_hdr>
2333 EOF
2334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2335 { (eval echo configure:2336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2337 if test -z "$ac_err"; then
2338   rm -rf conftest*
2339   eval "ac_cv_header_$ac_safe=yes"
2340 else
2341   echo "$ac_err" >&5
2342   echo "configure: failed program was:" >&5
2343   cat conftest.$ac_ext >&5
2344   rm -rf conftest*
2345   eval "ac_cv_header_$ac_safe=no"
2346 fi
2347 rm -f conftest*
2348 fi
2349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2350   echo "$ac_t""yes" 1>&6
2351     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2352   cat >> confdefs.h <<EOF
2353 #define $ac_tr_hdr 1
2354 EOF
2355  
2356 else
2357   echo "$ac_t""no" 1>&6
2358 fi
2359 done
2360
2361 for ac_hdr in stropts.h poll.h
2362 do
2363 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2364 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2365 echo "configure:2366: checking for $ac_hdr" >&5
2366 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2367   echo $ac_n "(cached) $ac_c" 1>&6
2368 else
2369   cat > conftest.$ac_ext <<EOF
2370 #line 2371 "configure"
2371 #include "confdefs.h"
2372 #include <$ac_hdr>
2373 EOF
2374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2375 { (eval echo configure:2376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2377 if test -z "$ac_err"; then
2378   rm -rf conftest*
2379   eval "ac_cv_header_$ac_safe=yes"
2380 else
2381   echo "$ac_err" >&5
2382   echo "configure: failed program was:" >&5
2383   cat conftest.$ac_ext >&5
2384   rm -rf conftest*
2385   eval "ac_cv_header_$ac_safe=no"
2386 fi
2387 rm -f conftest*
2388 fi
2389 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2390   echo "$ac_t""yes" 1>&6
2391     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2392   cat >> confdefs.h <<EOF
2393 #define $ac_tr_hdr 1
2394 EOF
2395  
2396 else
2397   echo "$ac_t""no" 1>&6
2398 fi
2399 done
2400
2401 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2402 do
2403 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2404 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2405 echo "configure:2406: checking for $ac_hdr" >&5
2406 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2407   echo $ac_n "(cached) $ac_c" 1>&6
2408 else
2409   cat > conftest.$ac_ext <<EOF
2410 #line 2411 "configure"
2411 #include "confdefs.h"
2412 #include <$ac_hdr>
2413 EOF
2414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2415 { (eval echo configure:2416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2417 if test -z "$ac_err"; then
2418   rm -rf conftest*
2419   eval "ac_cv_header_$ac_safe=yes"
2420 else
2421   echo "$ac_err" >&5
2422   echo "configure: failed program was:" >&5
2423   cat conftest.$ac_ext >&5
2424   rm -rf conftest*
2425   eval "ac_cv_header_$ac_safe=no"
2426 fi
2427 rm -f conftest*
2428 fi
2429 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2430   echo "$ac_t""yes" 1>&6
2431     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2432   cat >> confdefs.h <<EOF
2433 #define $ac_tr_hdr 1
2434 EOF
2435  
2436 else
2437   echo "$ac_t""no" 1>&6
2438 fi
2439 done
2440
2441 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2442 do
2443 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2444 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2445 echo "configure:2446: checking for $ac_hdr" >&5
2446 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2447   echo $ac_n "(cached) $ac_c" 1>&6
2448 else
2449   cat > conftest.$ac_ext <<EOF
2450 #line 2451 "configure"
2451 #include "confdefs.h"
2452 #include <$ac_hdr>
2453 EOF
2454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2455 { (eval echo configure:2456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2457 if test -z "$ac_err"; then
2458   rm -rf conftest*
2459   eval "ac_cv_header_$ac_safe=yes"
2460 else
2461   echo "$ac_err" >&5
2462   echo "configure: failed program was:" >&5
2463   cat conftest.$ac_ext >&5
2464   rm -rf conftest*
2465   eval "ac_cv_header_$ac_safe=no"
2466 fi
2467 rm -f conftest*
2468 fi
2469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2470   echo "$ac_t""yes" 1>&6
2471     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2472   cat >> confdefs.h <<EOF
2473 #define $ac_tr_hdr 1
2474 EOF
2475  
2476 else
2477   echo "$ac_t""no" 1>&6
2478 fi
2479 done
2480
2481
2482 # For experimental utmp support (lastlog on some BSD-like systems)
2483 for ac_hdr in utmp.h utmpx.h lastlog.h
2484 do
2485 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2486 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2487 echo "configure:2488: checking for $ac_hdr" >&5
2488 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2489   echo $ac_n "(cached) $ac_c" 1>&6
2490 else
2491   cat > conftest.$ac_ext <<EOF
2492 #line 2493 "configure"
2493 #include "confdefs.h"
2494 #include <$ac_hdr>
2495 EOF
2496 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2497 { (eval echo configure:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2498 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2499 if test -z "$ac_err"; then
2500   rm -rf conftest*
2501   eval "ac_cv_header_$ac_safe=yes"
2502 else
2503   echo "$ac_err" >&5
2504   echo "configure: failed program was:" >&5
2505   cat conftest.$ac_ext >&5
2506   rm -rf conftest*
2507   eval "ac_cv_header_$ac_safe=no"
2508 fi
2509 rm -f conftest*
2510 fi
2511 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2512   echo "$ac_t""yes" 1>&6
2513     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2514   cat >> confdefs.h <<EOF
2515 #define $ac_tr_hdr 1
2516 EOF
2517  
2518 else
2519   echo "$ac_t""no" 1>&6
2520 fi
2521 done
2522
2523  
2524 # For quotas on Veritas VxFS filesystems
2525 for ac_hdr in sys/fs/vx_quota.h
2526 do
2527 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2528 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2529 echo "configure:2530: checking for $ac_hdr" >&5
2530 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2531   echo $ac_n "(cached) $ac_c" 1>&6
2532 else
2533   cat > conftest.$ac_ext <<EOF
2534 #line 2535 "configure"
2535 #include "confdefs.h"
2536 #include <$ac_hdr>
2537 EOF
2538 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2539 { (eval echo configure:2540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2540 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2541 if test -z "$ac_err"; then
2542   rm -rf conftest*
2543   eval "ac_cv_header_$ac_safe=yes"
2544 else
2545   echo "$ac_err" >&5
2546   echo "configure: failed program was:" >&5
2547   cat conftest.$ac_ext >&5
2548   rm -rf conftest*
2549   eval "ac_cv_header_$ac_safe=no"
2550 fi
2551 rm -f conftest*
2552 fi
2553 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2554   echo "$ac_t""yes" 1>&6
2555     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2556   cat >> confdefs.h <<EOF
2557 #define $ac_tr_hdr 1
2558 EOF
2559  
2560 else
2561   echo "$ac_t""no" 1>&6
2562 fi
2563 done
2564
2565
2566 # For quotas on Linux XFS filesystems
2567 for ac_hdr in linux/xqm.h
2568 do
2569 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2570 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2571 echo "configure:2572: checking for $ac_hdr" >&5
2572 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2573   echo $ac_n "(cached) $ac_c" 1>&6
2574 else
2575   cat > conftest.$ac_ext <<EOF
2576 #line 2577 "configure"
2577 #include "confdefs.h"
2578 #include <$ac_hdr>
2579 EOF
2580 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2581 { (eval echo configure:2582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2582 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2583 if test -z "$ac_err"; then
2584   rm -rf conftest*
2585   eval "ac_cv_header_$ac_safe=yes"
2586 else
2587   echo "$ac_err" >&5
2588   echo "configure: failed program was:" >&5
2589   cat conftest.$ac_ext >&5
2590   rm -rf conftest*
2591   eval "ac_cv_header_$ac_safe=no"
2592 fi
2593 rm -f conftest*
2594 fi
2595 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2596   echo "$ac_t""yes" 1>&6
2597     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2598   cat >> confdefs.h <<EOF
2599 #define $ac_tr_hdr 1
2600 EOF
2601  
2602 else
2603   echo "$ac_t""no" 1>&6
2604 fi
2605 done
2606
2607
2608 echo $ac_n "checking size of int""... $ac_c" 1>&6
2609 echo "configure:2610: checking size of int" >&5
2610 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2611   echo $ac_n "(cached) $ac_c" 1>&6
2612 else
2613   if test "$cross_compiling" = yes; then
2614   ac_cv_sizeof_int=cross
2615 else
2616   cat > conftest.$ac_ext <<EOF
2617 #line 2618 "configure"
2618 #include "confdefs.h"
2619 #include <stdio.h>
2620 main()
2621 {
2622   FILE *f=fopen("conftestval", "w");
2623   if (!f) exit(1);
2624   fprintf(f, "%d\n", sizeof(int));
2625   exit(0);
2626 }
2627 EOF
2628 if { (eval echo configure:2629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2629 then
2630   ac_cv_sizeof_int=`cat conftestval`
2631 else
2632   echo "configure: failed program was:" >&5
2633   cat conftest.$ac_ext >&5
2634   rm -fr conftest*
2635   ac_cv_sizeof_int=0
2636 fi
2637 rm -fr conftest*
2638 fi
2639
2640 fi
2641 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2642 cat >> confdefs.h <<EOF
2643 #define SIZEOF_INT $ac_cv_sizeof_int
2644 EOF
2645
2646
2647 echo $ac_n "checking size of long""... $ac_c" 1>&6
2648 echo "configure:2649: checking size of long" >&5
2649 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2650   echo $ac_n "(cached) $ac_c" 1>&6
2651 else
2652   if test "$cross_compiling" = yes; then
2653   ac_cv_sizeof_long=cross
2654 else
2655   cat > conftest.$ac_ext <<EOF
2656 #line 2657 "configure"
2657 #include "confdefs.h"
2658 #include <stdio.h>
2659 main()
2660 {
2661   FILE *f=fopen("conftestval", "w");
2662   if (!f) exit(1);
2663   fprintf(f, "%d\n", sizeof(long));
2664   exit(0);
2665 }
2666 EOF
2667 if { (eval echo configure:2668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2668 then
2669   ac_cv_sizeof_long=`cat conftestval`
2670 else
2671   echo "configure: failed program was:" >&5
2672   cat conftest.$ac_ext >&5
2673   rm -fr conftest*
2674   ac_cv_sizeof_long=0
2675 fi
2676 rm -fr conftest*
2677 fi
2678
2679 fi
2680 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2681 cat >> confdefs.h <<EOF
2682 #define SIZEOF_LONG $ac_cv_sizeof_long
2683 EOF
2684
2685
2686 echo $ac_n "checking size of short""... $ac_c" 1>&6
2687 echo "configure:2688: checking size of short" >&5
2688 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2689   echo $ac_n "(cached) $ac_c" 1>&6
2690 else
2691   if test "$cross_compiling" = yes; then
2692   ac_cv_sizeof_short=cross
2693 else
2694   cat > conftest.$ac_ext <<EOF
2695 #line 2696 "configure"
2696 #include "confdefs.h"
2697 #include <stdio.h>
2698 main()
2699 {
2700   FILE *f=fopen("conftestval", "w");
2701   if (!f) exit(1);
2702   fprintf(f, "%d\n", sizeof(short));
2703   exit(0);
2704 }
2705 EOF
2706 if { (eval echo configure:2707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2707 then
2708   ac_cv_sizeof_short=`cat conftestval`
2709 else
2710   echo "configure: failed program was:" >&5
2711   cat conftest.$ac_ext >&5
2712   rm -fr conftest*
2713   ac_cv_sizeof_short=0
2714 fi
2715 rm -fr conftest*
2716 fi
2717
2718 fi
2719 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2720 cat >> confdefs.h <<EOF
2721 #define SIZEOF_SHORT $ac_cv_sizeof_short
2722 EOF
2723
2724
2725
2726 echo $ac_n "checking for working const""... $ac_c" 1>&6
2727 echo "configure:2728: checking for working const" >&5
2728 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2729   echo $ac_n "(cached) $ac_c" 1>&6
2730 else
2731   cat > conftest.$ac_ext <<EOF
2732 #line 2733 "configure"
2733 #include "confdefs.h"
2734
2735 int main() {
2736
2737 /* Ultrix mips cc rejects this.  */
2738 typedef int charset[2]; const charset x;
2739 /* SunOS 4.1.1 cc rejects this.  */
2740 char const *const *ccp;
2741 char **p;
2742 /* NEC SVR4.0.2 mips cc rejects this.  */
2743 struct point {int x, y;};
2744 static struct point const zero = {0,0};
2745 /* AIX XL C 1.02.0.0 rejects this.
2746    It does not let you subtract one const X* pointer from another in an arm
2747    of an if-expression whose if-part is not a constant expression */
2748 const char *g = "string";
2749 ccp = &g + (g ? g-g : 0);
2750 /* HPUX 7.0 cc rejects these. */
2751 ++ccp;
2752 p = (char**) ccp;
2753 ccp = (char const *const *) p;
2754 { /* SCO 3.2v4 cc rejects this.  */
2755   char *t;
2756   char const *s = 0 ? (char *) 0 : (char const *) 0;
2757
2758   *t++ = 0;
2759 }
2760 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2761   int x[] = {25, 17};
2762   const int *foo = &x[0];
2763   ++foo;
2764 }
2765 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2766   typedef const int *iptr;
2767   iptr p = 0;
2768   ++p;
2769 }
2770 { /* AIX XL C 1.02.0.0 rejects this saying
2771      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2772   struct s { int j; const int *ap[3]; };
2773   struct s *b; b->j = 5;
2774 }
2775 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2776   const int foo = 10;
2777 }
2778
2779 ; return 0; }
2780 EOF
2781 if { (eval echo configure:2782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2782   rm -rf conftest*
2783   ac_cv_c_const=yes
2784 else
2785   echo "configure: failed program was:" >&5
2786   cat conftest.$ac_ext >&5
2787   rm -rf conftest*
2788   ac_cv_c_const=no
2789 fi
2790 rm -f conftest*
2791 fi
2792
2793 echo "$ac_t""$ac_cv_c_const" 1>&6
2794 if test $ac_cv_c_const = no; then
2795   cat >> confdefs.h <<\EOF
2796 #define const 
2797 EOF
2798
2799 fi
2800
2801 echo $ac_n "checking for inline""... $ac_c" 1>&6
2802 echo "configure:2803: checking for inline" >&5
2803 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2804   echo $ac_n "(cached) $ac_c" 1>&6
2805 else
2806   ac_cv_c_inline=no
2807 for ac_kw in inline __inline__ __inline; do
2808   cat > conftest.$ac_ext <<EOF
2809 #line 2810 "configure"
2810 #include "confdefs.h"
2811
2812 int main() {
2813 } $ac_kw foo() {
2814 ; return 0; }
2815 EOF
2816 if { (eval echo configure:2817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2817   rm -rf conftest*
2818   ac_cv_c_inline=$ac_kw; break
2819 else
2820   echo "configure: failed program was:" >&5
2821   cat conftest.$ac_ext >&5
2822 fi
2823 rm -f conftest*
2824 done
2825
2826 fi
2827
2828 echo "$ac_t""$ac_cv_c_inline" 1>&6
2829 case "$ac_cv_c_inline" in
2830   inline | yes) ;;
2831   no) cat >> confdefs.h <<\EOF
2832 #define inline 
2833 EOF
2834  ;;
2835   *)  cat >> confdefs.h <<EOF
2836 #define inline $ac_cv_c_inline
2837 EOF
2838  ;;
2839 esac
2840
2841 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2842 echo "configure:2843: checking whether byte ordering is bigendian" >&5
2843 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2844   echo $ac_n "(cached) $ac_c" 1>&6
2845 else
2846   ac_cv_c_bigendian=unknown
2847 # See if sys/param.h defines the BYTE_ORDER macro.
2848 cat > conftest.$ac_ext <<EOF
2849 #line 2850 "configure"
2850 #include "confdefs.h"
2851 #include <sys/types.h>
2852 #include <sys/param.h>
2853 int main() {
2854
2855 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2856  bogus endian macros
2857 #endif
2858 ; return 0; }
2859 EOF
2860 if { (eval echo configure:2861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2861   rm -rf conftest*
2862   # It does; now see whether it defined to BIG_ENDIAN or not.
2863 cat > conftest.$ac_ext <<EOF
2864 #line 2865 "configure"
2865 #include "confdefs.h"
2866 #include <sys/types.h>
2867 #include <sys/param.h>
2868 int main() {
2869
2870 #if BYTE_ORDER != BIG_ENDIAN
2871  not big endian
2872 #endif
2873 ; return 0; }
2874 EOF
2875 if { (eval echo configure:2876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2876   rm -rf conftest*
2877   ac_cv_c_bigendian=yes
2878 else
2879   echo "configure: failed program was:" >&5
2880   cat conftest.$ac_ext >&5
2881   rm -rf conftest*
2882   ac_cv_c_bigendian=no
2883 fi
2884 rm -f conftest*
2885 else
2886   echo "configure: failed program was:" >&5
2887   cat conftest.$ac_ext >&5
2888 fi
2889 rm -f conftest*
2890 if test $ac_cv_c_bigendian = unknown; then
2891 if test "$cross_compiling" = yes; then
2892     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2893 else
2894   cat > conftest.$ac_ext <<EOF
2895 #line 2896 "configure"
2896 #include "confdefs.h"
2897 main () {
2898   /* Are we little or big endian?  From Harbison&Steele.  */
2899   union
2900   {
2901     long l;
2902     char c[sizeof (long)];
2903   } u;
2904   u.l = 1;
2905   exit (u.c[sizeof (long) - 1] == 1);
2906 }
2907 EOF
2908 if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2909 then
2910   ac_cv_c_bigendian=no
2911 else
2912   echo "configure: failed program was:" >&5
2913   cat conftest.$ac_ext >&5
2914   rm -fr conftest*
2915   ac_cv_c_bigendian=yes
2916 fi
2917 rm -fr conftest*
2918 fi
2919
2920 fi
2921 fi
2922
2923 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2924 if test $ac_cv_c_bigendian = yes; then
2925   cat >> confdefs.h <<\EOF
2926 #define WORDS_BIGENDIAN 1
2927 EOF
2928
2929 fi
2930
2931 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2932 echo "configure:2933: checking whether char is unsigned" >&5
2933 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2934   echo $ac_n "(cached) $ac_c" 1>&6
2935 else
2936   if test "$GCC" = yes; then
2937   # GCC predefines this symbol on systems where it applies.
2938 cat > conftest.$ac_ext <<EOF
2939 #line 2940 "configure"
2940 #include "confdefs.h"
2941 #ifdef __CHAR_UNSIGNED__
2942   yes
2943 #endif
2944
2945 EOF
2946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2947   egrep "yes" >/dev/null 2>&1; then
2948   rm -rf conftest*
2949   ac_cv_c_char_unsigned=yes
2950 else
2951   rm -rf conftest*
2952   ac_cv_c_char_unsigned=no
2953 fi
2954 rm -f conftest*
2955
2956 else
2957 if test "$cross_compiling" = yes; then
2958     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2959 else
2960   cat > conftest.$ac_ext <<EOF
2961 #line 2962 "configure"
2962 #include "confdefs.h"
2963 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2964 #if !defined(__STDC__) || __STDC__ != 1
2965 #define volatile
2966 #endif
2967 main() {
2968   volatile char c = 255; exit(c < 0);
2969 }
2970 EOF
2971 if { (eval echo configure:2972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2972 then
2973   ac_cv_c_char_unsigned=yes
2974 else
2975   echo "configure: failed program was:" >&5
2976   cat conftest.$ac_ext >&5
2977   rm -fr conftest*
2978   ac_cv_c_char_unsigned=no
2979 fi
2980 rm -fr conftest*
2981 fi
2982
2983 fi
2984 fi
2985
2986 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2987 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2988   cat >> confdefs.h <<\EOF
2989 #define __CHAR_UNSIGNED__ 1
2990 EOF
2991
2992 fi
2993
2994
2995 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2996 echo "configure:2997: checking return type of signal handlers" >&5
2997 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2998   echo $ac_n "(cached) $ac_c" 1>&6
2999 else
3000   cat > conftest.$ac_ext <<EOF
3001 #line 3002 "configure"
3002 #include "confdefs.h"
3003 #include <sys/types.h>
3004 #include <signal.h>
3005 #ifdef signal
3006 #undef signal
3007 #endif
3008 #ifdef __cplusplus
3009 extern "C" void (*signal (int, void (*)(int)))(int);
3010 #else
3011 void (*signal ()) ();
3012 #endif
3013
3014 int main() {
3015 int i;
3016 ; return 0; }
3017 EOF
3018 if { (eval echo configure:3019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3019   rm -rf conftest*
3020   ac_cv_type_signal=void
3021 else
3022   echo "configure: failed program was:" >&5
3023   cat conftest.$ac_ext >&5
3024   rm -rf conftest*
3025   ac_cv_type_signal=int
3026 fi
3027 rm -f conftest*
3028 fi
3029
3030 echo "$ac_t""$ac_cv_type_signal" 1>&6
3031 cat >> confdefs.h <<EOF
3032 #define RETSIGTYPE $ac_cv_type_signal
3033 EOF
3034
3035
3036 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3037 echo "configure:3038: checking for uid_t in sys/types.h" >&5
3038 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3039   echo $ac_n "(cached) $ac_c" 1>&6
3040 else
3041   cat > conftest.$ac_ext <<EOF
3042 #line 3043 "configure"
3043 #include "confdefs.h"
3044 #include <sys/types.h>
3045 EOF
3046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3047   egrep "uid_t" >/dev/null 2>&1; then
3048   rm -rf conftest*
3049   ac_cv_type_uid_t=yes
3050 else
3051   rm -rf conftest*
3052   ac_cv_type_uid_t=no
3053 fi
3054 rm -f conftest*
3055
3056 fi
3057
3058 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3059 if test $ac_cv_type_uid_t = no; then
3060   cat >> confdefs.h <<\EOF
3061 #define uid_t int
3062 EOF
3063
3064   cat >> confdefs.h <<\EOF
3065 #define gid_t int
3066 EOF
3067
3068 fi
3069
3070 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3071 echo "configure:3072: checking for mode_t" >&5
3072 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3073   echo $ac_n "(cached) $ac_c" 1>&6
3074 else
3075   cat > conftest.$ac_ext <<EOF
3076 #line 3077 "configure"
3077 #include "confdefs.h"
3078 #include <sys/types.h>
3079 #if STDC_HEADERS
3080 #include <stdlib.h>
3081 #include <stddef.h>
3082 #endif
3083 EOF
3084 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3085   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3086   rm -rf conftest*
3087   ac_cv_type_mode_t=yes
3088 else
3089   rm -rf conftest*
3090   ac_cv_type_mode_t=no
3091 fi
3092 rm -f conftest*
3093
3094 fi
3095 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3096 if test $ac_cv_type_mode_t = no; then
3097   cat >> confdefs.h <<\EOF
3098 #define mode_t int
3099 EOF
3100
3101 fi
3102
3103 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3104 echo "configure:3105: checking for off_t" >&5
3105 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3106   echo $ac_n "(cached) $ac_c" 1>&6
3107 else
3108   cat > conftest.$ac_ext <<EOF
3109 #line 3110 "configure"
3110 #include "confdefs.h"
3111 #include <sys/types.h>
3112 #if STDC_HEADERS
3113 #include <stdlib.h>
3114 #include <stddef.h>
3115 #endif
3116 EOF
3117 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3118   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3119   rm -rf conftest*
3120   ac_cv_type_off_t=yes
3121 else
3122   rm -rf conftest*
3123   ac_cv_type_off_t=no
3124 fi
3125 rm -f conftest*
3126
3127 fi
3128 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3129 if test $ac_cv_type_off_t = no; then
3130   cat >> confdefs.h <<\EOF
3131 #define off_t long
3132 EOF
3133
3134 fi
3135
3136 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3137 echo "configure:3138: checking for size_t" >&5
3138 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3139   echo $ac_n "(cached) $ac_c" 1>&6
3140 else
3141   cat > conftest.$ac_ext <<EOF
3142 #line 3143 "configure"
3143 #include "confdefs.h"
3144 #include <sys/types.h>
3145 #if STDC_HEADERS
3146 #include <stdlib.h>
3147 #include <stddef.h>
3148 #endif
3149 EOF
3150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3151   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3152   rm -rf conftest*
3153   ac_cv_type_size_t=yes
3154 else
3155   rm -rf conftest*
3156   ac_cv_type_size_t=no
3157 fi
3158 rm -f conftest*
3159
3160 fi
3161 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3162 if test $ac_cv_type_size_t = no; then
3163   cat >> confdefs.h <<\EOF
3164 #define size_t unsigned
3165 EOF
3166
3167 fi
3168
3169 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3170 echo "configure:3171: checking for pid_t" >&5
3171 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3172   echo $ac_n "(cached) $ac_c" 1>&6
3173 else
3174   cat > conftest.$ac_ext <<EOF
3175 #line 3176 "configure"
3176 #include "confdefs.h"
3177 #include <sys/types.h>
3178 #if STDC_HEADERS
3179 #include <stdlib.h>
3180 #include <stddef.h>
3181 #endif
3182 EOF
3183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3184   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3185   rm -rf conftest*
3186   ac_cv_type_pid_t=yes
3187 else
3188   rm -rf conftest*
3189   ac_cv_type_pid_t=no
3190 fi
3191 rm -f conftest*
3192
3193 fi
3194 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3195 if test $ac_cv_type_pid_t = no; then
3196   cat >> confdefs.h <<\EOF
3197 #define pid_t int
3198 EOF
3199
3200 fi
3201
3202 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3203 echo "configure:3204: checking for st_rdev in struct stat" >&5
3204 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3205   echo $ac_n "(cached) $ac_c" 1>&6
3206 else
3207   cat > conftest.$ac_ext <<EOF
3208 #line 3209 "configure"
3209 #include "confdefs.h"
3210 #include <sys/types.h>
3211 #include <sys/stat.h>
3212 int main() {
3213 struct stat s; s.st_rdev;
3214 ; return 0; }
3215 EOF
3216 if { (eval echo configure:3217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3217   rm -rf conftest*
3218   ac_cv_struct_st_rdev=yes
3219 else
3220   echo "configure: failed program was:" >&5
3221   cat conftest.$ac_ext >&5
3222   rm -rf conftest*
3223   ac_cv_struct_st_rdev=no
3224 fi
3225 rm -f conftest*
3226 fi
3227
3228 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3229 if test $ac_cv_struct_st_rdev = yes; then
3230   cat >> confdefs.h <<\EOF
3231 #define HAVE_ST_RDEV 1
3232 EOF
3233
3234 fi
3235
3236 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3237 echo "configure:3238: checking for d_off in dirent" >&5
3238 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3239   echo $ac_n "(cached) $ac_c" 1>&6
3240 else
3241   cat > conftest.$ac_ext <<EOF
3242 #line 3243 "configure"
3243 #include "confdefs.h"
3244
3245 #include <unistd.h>
3246 #include <sys/types.h>
3247 #include <dirent.h>
3248 int main() {
3249 struct dirent d; d.d_off;
3250 ; return 0; }
3251 EOF
3252 if { (eval echo configure:3253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3253   rm -rf conftest*
3254   ac_cv_dirent_d_off=yes
3255 else
3256   echo "configure: failed program was:" >&5
3257   cat conftest.$ac_ext >&5
3258   rm -rf conftest*
3259   ac_cv_dirent_d_off=no
3260 fi
3261 rm -f conftest*
3262 fi
3263
3264 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3265 if test $ac_cv_dirent_d_off = yes; then
3266   cat >> confdefs.h <<\EOF
3267 #define HAVE_DIRENT_D_OFF 1
3268 EOF
3269
3270 fi
3271
3272 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3273 echo "configure:3274: checking for ino_t" >&5
3274 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3275   echo $ac_n "(cached) $ac_c" 1>&6
3276 else
3277   cat > conftest.$ac_ext <<EOF
3278 #line 3279 "configure"
3279 #include "confdefs.h"
3280 #include <sys/types.h>
3281 #if STDC_HEADERS
3282 #include <stdlib.h>
3283 #include <stddef.h>
3284 #endif
3285 EOF
3286 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3287   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3288   rm -rf conftest*
3289   ac_cv_type_ino_t=yes
3290 else
3291   rm -rf conftest*
3292   ac_cv_type_ino_t=no
3293 fi
3294 rm -f conftest*
3295
3296 fi
3297 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3298 if test $ac_cv_type_ino_t = no; then
3299   cat >> confdefs.h <<\EOF
3300 #define ino_t unsigned
3301 EOF
3302
3303 fi
3304
3305 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3306 echo "configure:3307: checking for loff_t" >&5
3307 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3308   echo $ac_n "(cached) $ac_c" 1>&6
3309 else
3310   cat > conftest.$ac_ext <<EOF
3311 #line 3312 "configure"
3312 #include "confdefs.h"
3313 #include <sys/types.h>
3314 #if STDC_HEADERS
3315 #include <stdlib.h>
3316 #include <stddef.h>
3317 #endif
3318 EOF
3319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3320   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3321   rm -rf conftest*
3322   ac_cv_type_loff_t=yes
3323 else
3324   rm -rf conftest*
3325   ac_cv_type_loff_t=no
3326 fi
3327 rm -f conftest*
3328
3329 fi
3330 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3331 if test $ac_cv_type_loff_t = no; then
3332   cat >> confdefs.h <<\EOF
3333 #define loff_t off_t
3334 EOF
3335
3336 fi
3337
3338 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3339 echo "configure:3340: checking for offset_t" >&5
3340 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3341   echo $ac_n "(cached) $ac_c" 1>&6
3342 else
3343   cat > conftest.$ac_ext <<EOF
3344 #line 3345 "configure"
3345 #include "confdefs.h"
3346 #include <sys/types.h>
3347 #if STDC_HEADERS
3348 #include <stdlib.h>
3349 #include <stddef.h>
3350 #endif
3351 EOF
3352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3353   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3354   rm -rf conftest*
3355   ac_cv_type_offset_t=yes
3356 else
3357   rm -rf conftest*
3358   ac_cv_type_offset_t=no
3359 fi
3360 rm -f conftest*
3361
3362 fi
3363 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3364 if test $ac_cv_type_offset_t = no; then
3365   cat >> confdefs.h <<\EOF
3366 #define offset_t loff_t
3367 EOF
3368
3369 fi
3370
3371 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3372 echo "configure:3373: checking for ssize_t" >&5
3373 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3374   echo $ac_n "(cached) $ac_c" 1>&6
3375 else
3376   cat > conftest.$ac_ext <<EOF
3377 #line 3378 "configure"
3378 #include "confdefs.h"
3379 #include <sys/types.h>
3380 #if STDC_HEADERS
3381 #include <stdlib.h>
3382 #include <stddef.h>
3383 #endif
3384 EOF
3385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3386   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3387   rm -rf conftest*
3388   ac_cv_type_ssize_t=yes
3389 else
3390   rm -rf conftest*
3391   ac_cv_type_ssize_t=no
3392 fi
3393 rm -f conftest*
3394
3395 fi
3396 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3397 if test $ac_cv_type_ssize_t = no; then
3398   cat >> confdefs.h <<\EOF
3399 #define ssize_t int
3400 EOF
3401
3402 fi
3403
3404 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3405 echo "configure:3406: checking for wchar_t" >&5
3406 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3407   echo $ac_n "(cached) $ac_c" 1>&6
3408 else
3409   cat > conftest.$ac_ext <<EOF
3410 #line 3411 "configure"
3411 #include "confdefs.h"
3412 #include <sys/types.h>
3413 #if STDC_HEADERS
3414 #include <stdlib.h>
3415 #include <stddef.h>
3416 #endif
3417 EOF
3418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3419   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3420   rm -rf conftest*
3421   ac_cv_type_wchar_t=yes
3422 else
3423   rm -rf conftest*
3424   ac_cv_type_wchar_t=no
3425 fi
3426 rm -f conftest*
3427
3428 fi
3429 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3430 if test $ac_cv_type_wchar_t = no; then
3431   cat >> confdefs.h <<\EOF
3432 #define wchar_t unsigned short
3433 EOF
3434
3435 fi
3436
3437
3438 ############################################
3439 # for cups support we need libcups, and a handful of header files
3440
3441 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3442 echo "configure:3443: checking for httpConnect in -lcups" >&5
3443 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3444 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3445   echo $ac_n "(cached) $ac_c" 1>&6
3446 else
3447   ac_save_LIBS="$LIBS"
3448 LIBS="-lcups  $LIBS"
3449 cat > conftest.$ac_ext <<EOF
3450 #line 3451 "configure"
3451 #include "confdefs.h"
3452 /* Override any gcc2 internal prototype to avoid an error.  */
3453 /* We use char because int might match the return type of a gcc2
3454     builtin and then its argument prototype would still apply.  */
3455 char httpConnect();
3456
3457 int main() {
3458 httpConnect()
3459 ; return 0; }
3460 EOF
3461 if { (eval echo configure:3462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3462   rm -rf conftest*
3463   eval "ac_cv_lib_$ac_lib_var=yes"
3464 else
3465   echo "configure: failed program was:" >&5
3466   cat conftest.$ac_ext >&5
3467   rm -rf conftest*
3468   eval "ac_cv_lib_$ac_lib_var=no"
3469 fi
3470 rm -f conftest*
3471 LIBS="$ac_save_LIBS"
3472
3473 fi
3474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3475   echo "$ac_t""yes" 1>&6
3476     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3477     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3478   cat >> confdefs.h <<EOF
3479 #define $ac_tr_lib 1
3480 EOF
3481
3482   LIBS="-lcups $LIBS"
3483
3484 else
3485   echo "$ac_t""no" 1>&6
3486 fi
3487
3488
3489 # I wonder if there is a nicer way of doing this?
3490
3491 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3492         for ac_hdr in cups/cups.h cups/language.h
3493 do
3494 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3495 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3496 echo "configure:3497: checking for $ac_hdr" >&5
3497 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3498   echo $ac_n "(cached) $ac_c" 1>&6
3499 else
3500   cat > conftest.$ac_ext <<EOF
3501 #line 3502 "configure"
3502 #include "confdefs.h"
3503 #include <$ac_hdr>
3504 EOF
3505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3506 { (eval echo configure:3507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3508 if test -z "$ac_err"; then
3509   rm -rf conftest*
3510   eval "ac_cv_header_$ac_safe=yes"
3511 else
3512   echo "$ac_err" >&5
3513   echo "configure: failed program was:" >&5
3514   cat conftest.$ac_ext >&5
3515   rm -rf conftest*
3516   eval "ac_cv_header_$ac_safe=no"
3517 fi
3518 rm -f conftest*
3519 fi
3520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3521   echo "$ac_t""yes" 1>&6
3522     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3523   cat >> confdefs.h <<EOF
3524 #define $ac_tr_hdr 1
3525 EOF
3526  
3527 else
3528   echo "$ac_t""no" 1>&6
3529 fi
3530 done
3531
3532         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3533                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3534                         cat >> confdefs.h <<\EOF
3535 #define HAVE_CUPS 1
3536 EOF
3537
3538                 fi
3539         fi
3540 fi
3541
3542 ############################################
3543 # we need libdl for PAM, the password database plugins and the new VFS code
3544 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3545 echo "configure:3546: checking for dlopen in -ldl" >&5
3546 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3547 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3548   echo $ac_n "(cached) $ac_c" 1>&6
3549 else
3550   ac_save_LIBS="$LIBS"
3551 LIBS="-ldl  $LIBS"
3552 cat > conftest.$ac_ext <<EOF
3553 #line 3554 "configure"
3554 #include "confdefs.h"
3555 /* Override any gcc2 internal prototype to avoid an error.  */
3556 /* We use char because int might match the return type of a gcc2
3557     builtin and then its argument prototype would still apply.  */
3558 char dlopen();
3559
3560 int main() {
3561 dlopen()
3562 ; return 0; }
3563 EOF
3564 if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3565   rm -rf conftest*
3566   eval "ac_cv_lib_$ac_lib_var=yes"
3567 else
3568   echo "configure: failed program was:" >&5
3569   cat conftest.$ac_ext >&5
3570   rm -rf conftest*
3571   eval "ac_cv_lib_$ac_lib_var=no"
3572 fi
3573 rm -f conftest*
3574 LIBS="$ac_save_LIBS"
3575
3576 fi
3577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3578   echo "$ac_t""yes" 1>&6
3579   LIBS="$LIBS -ldl";
3580         cat >> confdefs.h <<\EOF
3581 #define HAVE_LIBDL 1
3582 EOF
3583
3584 else
3585   echo "$ac_t""no" 1>&6
3586 fi
3587
3588
3589 ############################################
3590 # check if the compiler can do immediate structures
3591 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3592 echo "configure:3593: checking for immediate structures" >&5
3593 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3594   echo $ac_n "(cached) $ac_c" 1>&6
3595 else
3596   
3597     cat > conftest.$ac_ext <<EOF
3598 #line 3599 "configure"
3599 #include "confdefs.h"
3600
3601 #include <stdio.h>
3602 int main() {
3603
3604    typedef struct {unsigned x;} FOOBAR;
3605    #define X_FOOBAR(x) ((FOOBAR) { x })
3606    #define FOO_ONE X_FOOBAR(1)
3607    FOOBAR f = FOO_ONE;   
3608    static struct {
3609         FOOBAR y; 
3610         } f2[] = {
3611                 {FOO_ONE}
3612         };   
3613
3614 ; return 0; }
3615 EOF
3616 if { (eval echo configure:3617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3617   rm -rf conftest*
3618   samba_cv_immediate_structures=yes
3619 else
3620   echo "configure: failed program was:" >&5
3621   cat conftest.$ac_ext >&5
3622   rm -rf conftest*
3623   samba_cv_immediate_structures=no
3624 fi
3625 rm -f conftest*
3626 fi
3627
3628 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3629 if test x"$samba_cv_immediate_structures" = x"yes"; then
3630    cat >> confdefs.h <<\EOF
3631 #define HAVE_IMMEDIATE_STRUCTURES 1
3632 EOF
3633
3634 fi
3635
3636 ############################################
3637 # check for unix domain sockets
3638 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3639 echo "configure:3640: checking for unix domain sockets" >&5
3640 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3641   echo $ac_n "(cached) $ac_c" 1>&6
3642 else
3643   
3644     cat > conftest.$ac_ext <<EOF
3645 #line 3646 "configure"
3646 #include "confdefs.h"
3647
3648 #include <sys/types.h>
3649 #include <stdlib.h>
3650 #include <stddef.h>
3651 #include <sys/socket.h>
3652 #include <sys/un.h>
3653 int main() {
3654
3655   struct sockaddr_un sunaddr; 
3656   sunaddr.sun_family = AF_UNIX;
3657
3658 ; return 0; }
3659 EOF
3660 if { (eval echo configure:3661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3661   rm -rf conftest*
3662   samba_cv_unixsocket=yes
3663 else
3664   echo "configure: failed program was:" >&5
3665   cat conftest.$ac_ext >&5
3666   rm -rf conftest*
3667   samba_cv_unixsocket=no
3668 fi
3669 rm -f conftest*
3670 fi
3671
3672 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3673 if test x"$samba_cv_unixsocket" = x"yes"; then
3674    cat >> confdefs.h <<\EOF
3675 #define HAVE_UNIXSOCKET 1
3676 EOF
3677
3678 fi
3679
3680
3681 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3682 echo "configure:3683: checking for socklen_t type" >&5
3683 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3684   echo $ac_n "(cached) $ac_c" 1>&6
3685 else
3686   
3687     cat > conftest.$ac_ext <<EOF
3688 #line 3689 "configure"
3689 #include "confdefs.h"
3690
3691 #include <sys/types.h>
3692 #if STDC_HEADERS
3693 #include <stdlib.h>
3694 #include <stddef.h>
3695 #endif
3696 #include <sys/socket.h>
3697 int main() {
3698 socklen_t i = 0
3699 ; return 0; }
3700 EOF
3701 if { (eval echo configure:3702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3702   rm -rf conftest*
3703   samba_cv_socklen_t=yes
3704 else
3705   echo "configure: failed program was:" >&5
3706   cat conftest.$ac_ext >&5
3707   rm -rf conftest*
3708   samba_cv_socklen_t=no
3709 fi
3710 rm -f conftest*
3711 fi
3712
3713 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3714 if test x"$samba_cv_socklen_t" = x"yes"; then
3715    cat >> confdefs.h <<\EOF
3716 #define HAVE_SOCKLEN_T_TYPE 1
3717 EOF
3718
3719 fi
3720
3721 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3722 echo "configure:3723: checking for sig_atomic_t type" >&5
3723 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3724   echo $ac_n "(cached) $ac_c" 1>&6
3725 else
3726   
3727     cat > conftest.$ac_ext <<EOF
3728 #line 3729 "configure"
3729 #include "confdefs.h"
3730
3731 #include <sys/types.h>
3732 #if STDC_HEADERS
3733 #include <stdlib.h>
3734 #include <stddef.h>
3735 #endif
3736 #include <signal.h>
3737 int main() {
3738 sig_atomic_t i = 0
3739 ; return 0; }
3740 EOF
3741 if { (eval echo configure:3742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3742   rm -rf conftest*
3743   samba_cv_sig_atomic_t=yes
3744 else
3745   echo "configure: failed program was:" >&5
3746   cat conftest.$ac_ext >&5
3747   rm -rf conftest*
3748   samba_cv_sig_atomic_t=no
3749 fi
3750 rm -f conftest*
3751 fi
3752
3753 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3754 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3755    cat >> confdefs.h <<\EOF
3756 #define HAVE_SIG_ATOMIC_T_TYPE 1
3757 EOF
3758
3759 fi
3760
3761 # stupid headers have the functions but no declaration. grrrr.
3762
3763  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3764 echo "configure:3765: checking for errno declaration" >&5
3765 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3766   echo $ac_n "(cached) $ac_c" 1>&6
3767 else
3768   
3769     cat > conftest.$ac_ext <<EOF
3770 #line 3771 "configure"
3771 #include "confdefs.h"
3772 #include <errno.h>
3773 int main() {
3774 int i = (int)errno
3775 ; return 0; }
3776 EOF
3777 if { (eval echo configure:3778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3778   rm -rf conftest*
3779   ac_cv_have_errno_decl=yes
3780 else
3781   echo "configure: failed program was:" >&5
3782   cat conftest.$ac_ext >&5
3783   rm -rf conftest*
3784   ac_cv_have_errno_decl=no
3785 fi
3786 rm -f conftest*
3787 fi
3788
3789 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3790  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3791     cat >> confdefs.h <<\EOF
3792 #define HAVE_ERRNO_DECL 1
3793 EOF
3794
3795  fi
3796
3797
3798  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3799 echo "configure:3800: checking for setresuid declaration" >&5
3800 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3801   echo $ac_n "(cached) $ac_c" 1>&6
3802 else
3803   
3804     cat > conftest.$ac_ext <<EOF
3805 #line 3806 "configure"
3806 #include "confdefs.h"
3807 #include <unistd.h>
3808 int main() {
3809 int i = (int)setresuid
3810 ; return 0; }
3811 EOF
3812 if { (eval echo configure:3813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3813   rm -rf conftest*
3814   ac_cv_have_setresuid_decl=yes
3815 else
3816   echo "configure: failed program was:" >&5
3817   cat conftest.$ac_ext >&5
3818   rm -rf conftest*
3819   ac_cv_have_setresuid_decl=no
3820 fi
3821 rm -f conftest*
3822 fi
3823
3824 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3825  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3826     cat >> confdefs.h <<\EOF
3827 #define HAVE_SETRESUID_DECL 1
3828 EOF
3829
3830  fi
3831
3832
3833  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3834 echo "configure:3835: checking for setresgid declaration" >&5
3835 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3836   echo $ac_n "(cached) $ac_c" 1>&6
3837 else
3838   
3839     cat > conftest.$ac_ext <<EOF
3840 #line 3841 "configure"
3841 #include "confdefs.h"
3842 #include <unistd.h>
3843 int main() {
3844 int i = (int)setresgid
3845 ; return 0; }
3846 EOF
3847 if { (eval echo configure:3848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3848   rm -rf conftest*
3849   ac_cv_have_setresgid_decl=yes
3850 else
3851   echo "configure: failed program was:" >&5
3852   cat conftest.$ac_ext >&5
3853   rm -rf conftest*
3854   ac_cv_have_setresgid_decl=no
3855 fi
3856 rm -f conftest*
3857 fi
3858
3859 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3860  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3861     cat >> confdefs.h <<\EOF
3862 #define HAVE_SETRESGID_DECL 1
3863 EOF
3864
3865  fi
3866
3867
3868  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3869 echo "configure:3870: checking for asprintf declaration" >&5
3870 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3871   echo $ac_n "(cached) $ac_c" 1>&6
3872 else
3873   
3874     cat > conftest.$ac_ext <<EOF
3875 #line 3876 "configure"
3876 #include "confdefs.h"
3877 #include <stdio.h>
3878 int main() {
3879 int i = (int)asprintf
3880 ; return 0; }
3881 EOF
3882 if { (eval echo configure:3883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3883   rm -rf conftest*
3884   ac_cv_have_asprintf_decl=yes
3885 else
3886   echo "configure: failed program was:" >&5
3887   cat conftest.$ac_ext >&5
3888   rm -rf conftest*
3889   ac_cv_have_asprintf_decl=no
3890 fi
3891 rm -f conftest*
3892 fi
3893
3894 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3895  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3896     cat >> confdefs.h <<\EOF
3897 #define HAVE_ASPRINTF_DECL 1
3898 EOF
3899
3900  fi
3901
3902
3903  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3904 echo "configure:3905: checking for vasprintf declaration" >&5
3905 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3906   echo $ac_n "(cached) $ac_c" 1>&6
3907 else
3908   
3909     cat > conftest.$ac_ext <<EOF
3910 #line 3911 "configure"
3911 #include "confdefs.h"
3912 #include <stdio.h>
3913 int main() {
3914 int i = (int)vasprintf
3915 ; return 0; }
3916 EOF
3917 if { (eval echo configure:3918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3918   rm -rf conftest*
3919   ac_cv_have_vasprintf_decl=yes
3920 else
3921   echo "configure: failed program was:" >&5
3922   cat conftest.$ac_ext >&5
3923   rm -rf conftest*
3924   ac_cv_have_vasprintf_decl=no
3925 fi
3926 rm -f conftest*
3927 fi
3928
3929 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3930  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3931     cat >> confdefs.h <<\EOF
3932 #define HAVE_VASPRINTF_DECL 1
3933 EOF
3934
3935  fi
3936
3937
3938  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3939 echo "configure:3940: checking for vsnprintf declaration" >&5
3940 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3941   echo $ac_n "(cached) $ac_c" 1>&6
3942 else
3943   
3944     cat > conftest.$ac_ext <<EOF
3945 #line 3946 "configure"
3946 #include "confdefs.h"
3947 #include <stdio.h>
3948 int main() {
3949 int i = (int)vsnprintf
3950 ; return 0; }
3951 EOF
3952 if { (eval echo configure:3953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3953   rm -rf conftest*
3954   ac_cv_have_vsnprintf_decl=yes
3955 else
3956   echo "configure: failed program was:" >&5
3957   cat conftest.$ac_ext >&5
3958   rm -rf conftest*
3959   ac_cv_have_vsnprintf_decl=no
3960 fi
3961 rm -f conftest*
3962 fi
3963
3964 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3965  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3966     cat >> confdefs.h <<\EOF
3967 #define HAVE_VSNPRINTF_DECL 1
3968 EOF
3969
3970  fi
3971
3972
3973  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3974 echo "configure:3975: checking for snprintf declaration" >&5
3975 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3976   echo $ac_n "(cached) $ac_c" 1>&6
3977 else
3978   
3979     cat > conftest.$ac_ext <<EOF
3980 #line 3981 "configure"
3981 #include "confdefs.h"
3982 #include <stdio.h>
3983 int main() {
3984 int i = (int)snprintf
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   ac_cv_have_snprintf_decl=yes
3990 else
3991   echo "configure: failed program was:" >&5
3992   cat conftest.$ac_ext >&5
3993   rm -rf conftest*
3994   ac_cv_have_snprintf_decl=no
3995 fi
3996 rm -f conftest*
3997 fi
3998
3999 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4000  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4001     cat >> confdefs.h <<\EOF
4002 #define HAVE_SNPRINTF_DECL 1
4003 EOF
4004
4005  fi
4006
4007
4008 # and glibc has setresuid under linux but the function does
4009 # nothing until kernel 2.1.44! very dumb.
4010 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4011 echo "configure:4012: checking for real setresuid" >&5
4012 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4013   echo $ac_n "(cached) $ac_c" 1>&6
4014 else
4015   
4016     if test "$cross_compiling" = yes; then
4017   samba_cv_have_setresuid=cross
4018 else
4019   cat > conftest.$ac_ext <<EOF
4020 #line 4021 "configure"
4021 #include "confdefs.h"
4022 #include <errno.h>
4023 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4024 EOF
4025 if { (eval echo configure:4026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4026 then
4027   samba_cv_have_setresuid=yes
4028 else
4029   echo "configure: failed program was:" >&5
4030   cat conftest.$ac_ext >&5
4031   rm -fr conftest*
4032   samba_cv_have_setresuid=no
4033 fi
4034 rm -fr conftest*
4035 fi
4036
4037 fi
4038
4039 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4040 if test x"$samba_cv_have_setresuid" = x"yes"; then
4041     cat >> confdefs.h <<\EOF
4042 #define HAVE_SETRESUID 1
4043 EOF
4044
4045 fi
4046
4047 # Do the same check for setresguid...
4048 #
4049 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4050 echo "configure:4051: checking for real setresgid" >&5
4051 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4052   echo $ac_n "(cached) $ac_c" 1>&6
4053 else
4054   
4055     if test "$cross_compiling" = yes; then
4056   samba_cv_have_setresgid=cross
4057 else
4058   cat > conftest.$ac_ext <<EOF
4059 #line 4060 "configure"
4060 #include "confdefs.h"
4061 #include <unistd.h>
4062 #include <errno.h>
4063 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4064 EOF
4065 if { (eval echo configure:4066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4066 then
4067   samba_cv_have_setresgid=yes
4068 else
4069   echo "configure: failed program was:" >&5
4070   cat conftest.$ac_ext >&5
4071   rm -fr conftest*
4072   samba_cv_have_setresgid=no
4073 fi
4074 rm -fr conftest*
4075 fi
4076
4077 fi
4078
4079 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4080 if test x"$samba_cv_have_setresgid" = x"yes"; then
4081     cat >> confdefs.h <<\EOF
4082 #define HAVE_SETRESGID 1
4083 EOF
4084
4085 fi
4086
4087 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4088 echo "configure:4089: checking for 8-bit clean memcmp" >&5
4089 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4090   echo $ac_n "(cached) $ac_c" 1>&6
4091 else
4092   if test "$cross_compiling" = yes; then
4093   ac_cv_func_memcmp_clean=no
4094 else
4095   cat > conftest.$ac_ext <<EOF
4096 #line 4097 "configure"
4097 #include "confdefs.h"
4098
4099 main()
4100 {
4101   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4102   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4103 }
4104
4105 EOF
4106 if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4107 then
4108   ac_cv_func_memcmp_clean=yes
4109 else
4110   echo "configure: failed program was:" >&5
4111   cat conftest.$ac_ext >&5
4112   rm -fr conftest*
4113   ac_cv_func_memcmp_clean=no
4114 fi
4115 rm -fr conftest*
4116 fi
4117
4118 fi
4119
4120 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4121 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4122
4123
4124 ###############################################
4125 # test for where we get crypt() from
4126 for ac_func in crypt
4127 do
4128 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4129 echo "configure:4130: checking for $ac_func" >&5
4130 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4131   echo $ac_n "(cached) $ac_c" 1>&6
4132 else
4133   cat > conftest.$ac_ext <<EOF
4134 #line 4135 "configure"
4135 #include "confdefs.h"
4136 /* System header to define __stub macros and hopefully few prototypes,
4137     which can conflict with char $ac_func(); below.  */
4138 #include <assert.h>
4139 /* Override any gcc2 internal prototype to avoid an error.  */
4140 /* We use char because int might match the return type of a gcc2
4141     builtin and then its argument prototype would still apply.  */
4142 char $ac_func();
4143
4144 int main() {
4145
4146 /* The GNU C library defines this for functions which it implements
4147     to always fail with ENOSYS.  Some functions are actually named
4148     something starting with __ and the normal name is an alias.  */
4149 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4150 choke me
4151 #else
4152 $ac_func();
4153 #endif
4154
4155 ; return 0; }
4156 EOF
4157 if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4158   rm -rf conftest*
4159   eval "ac_cv_func_$ac_func=yes"
4160 else
4161   echo "configure: failed program was:" >&5
4162   cat conftest.$ac_ext >&5
4163   rm -rf conftest*
4164   eval "ac_cv_func_$ac_func=no"
4165 fi
4166 rm -f conftest*
4167 fi
4168
4169 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4170   echo "$ac_t""yes" 1>&6
4171     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4172   cat >> confdefs.h <<EOF
4173 #define $ac_tr_func 1
4174 EOF
4175  
4176 else
4177   echo "$ac_t""no" 1>&6
4178 fi
4179 done
4180
4181 if test x"$ac_cv_func_crypt" = x"no"; then
4182     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4183 echo "configure:4184: checking for crypt in -lcrypt" >&5
4184 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4185 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4186   echo $ac_n "(cached) $ac_c" 1>&6
4187 else
4188   ac_save_LIBS="$LIBS"
4189 LIBS="-lcrypt  $LIBS"
4190 cat > conftest.$ac_ext <<EOF
4191 #line 4192 "configure"
4192 #include "confdefs.h"
4193 /* Override any gcc2 internal prototype to avoid an error.  */
4194 /* We use char because int might match the return type of a gcc2
4195     builtin and then its argument prototype would still apply.  */
4196 char crypt();
4197
4198 int main() {
4199 crypt()
4200 ; return 0; }
4201 EOF
4202 if { (eval echo configure:4203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4203   rm -rf conftest*
4204   eval "ac_cv_lib_$ac_lib_var=yes"
4205 else
4206   echo "configure: failed program was:" >&5
4207   cat conftest.$ac_ext >&5
4208   rm -rf conftest*
4209   eval "ac_cv_lib_$ac_lib_var=no"
4210 fi
4211 rm -f conftest*
4212 LIBS="$ac_save_LIBS"
4213
4214 fi
4215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4216   echo "$ac_t""yes" 1>&6
4217   LIBS="$LIBS -lcrypt";
4218         cat >> confdefs.h <<\EOF
4219 #define HAVE_CRYPT 1
4220 EOF
4221
4222 else
4223   echo "$ac_t""no" 1>&6
4224 fi
4225
4226 fi
4227
4228
4229 ###############################################
4230 # Readline included by default unless explicitly asked not to
4231 test "${with_readline+set}" != "set" && with_readline=yes
4232
4233 # test for where we get readline() from
4234 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4235 echo "configure:4236: checking whether to use readline" >&5
4236 # Check whether --with-readline or --without-readline was given.
4237 if test "${with_readline+set}" = set; then
4238   withval="$with_readline"
4239     case "$with_readline" in
4240   yes)
4241     echo "$ac_t""yes" 1>&6
4242
4243     for ac_hdr in readline.h history.h readline/readline.h
4244 do
4245 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4246 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4247 echo "configure:4248: checking for $ac_hdr" >&5
4248 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4249   echo $ac_n "(cached) $ac_c" 1>&6
4250 else
4251   cat > conftest.$ac_ext <<EOF
4252 #line 4253 "configure"
4253 #include "confdefs.h"
4254 #include <$ac_hdr>
4255 EOF
4256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4257 { (eval echo configure:4258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4259 if test -z "$ac_err"; then
4260   rm -rf conftest*
4261   eval "ac_cv_header_$ac_safe=yes"
4262 else
4263   echo "$ac_err" >&5
4264   echo "configure: failed program was:" >&5
4265   cat conftest.$ac_ext >&5
4266   rm -rf conftest*
4267   eval "ac_cv_header_$ac_safe=no"
4268 fi
4269 rm -f conftest*
4270 fi
4271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4272   echo "$ac_t""yes" 1>&6
4273     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4274   cat >> confdefs.h <<EOF
4275 #define $ac_tr_hdr 1
4276 EOF
4277  
4278 else
4279   echo "$ac_t""no" 1>&6
4280 fi
4281 done
4282
4283     for ac_hdr in readline/history.h
4284 do
4285 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4286 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4287 echo "configure:4288: checking for $ac_hdr" >&5
4288 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4289   echo $ac_n "(cached) $ac_c" 1>&6
4290 else
4291   cat > conftest.$ac_ext <<EOF
4292 #line 4293 "configure"
4293 #include "confdefs.h"
4294 #include <$ac_hdr>
4295 EOF
4296 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4297 { (eval echo configure:4298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4298 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4299 if test -z "$ac_err"; then
4300   rm -rf conftest*
4301   eval "ac_cv_header_$ac_safe=yes"
4302 else
4303   echo "$ac_err" >&5
4304   echo "configure: failed program was:" >&5
4305   cat conftest.$ac_ext >&5
4306   rm -rf conftest*
4307   eval "ac_cv_header_$ac_safe=no"
4308 fi
4309 rm -f conftest*
4310 fi
4311 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4312   echo "$ac_t""yes" 1>&6
4313     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4314   cat >> confdefs.h <<EOF
4315 #define $ac_tr_hdr 1
4316 EOF
4317  
4318 else
4319   echo "$ac_t""no" 1>&6
4320 fi
4321 done
4322
4323
4324     for ac_hdr in readline.h readline/readline.h
4325 do
4326 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4327 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4328 echo "configure:4329: checking for $ac_hdr" >&5
4329 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4330   echo $ac_n "(cached) $ac_c" 1>&6
4331 else
4332   cat > conftest.$ac_ext <<EOF
4333 #line 4334 "configure"
4334 #include "confdefs.h"
4335 #include <$ac_hdr>
4336 EOF
4337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4338 { (eval echo configure:4339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4340 if test -z "$ac_err"; then
4341   rm -rf conftest*
4342   eval "ac_cv_header_$ac_safe=yes"
4343 else
4344   echo "$ac_err" >&5
4345   echo "configure: failed program was:" >&5
4346   cat conftest.$ac_ext >&5
4347   rm -rf conftest*
4348   eval "ac_cv_header_$ac_safe=no"
4349 fi
4350 rm -f conftest*
4351 fi
4352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4353   echo "$ac_t""yes" 1>&6
4354     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4355   cat >> confdefs.h <<EOF
4356 #define $ac_tr_hdr 1
4357 EOF
4358  
4359       for termlib in ncurses curses termcap terminfo termlib; do
4360        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4361 echo "configure:4362: checking for tgetent in -l${termlib}" >&5
4362 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4363 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4364   echo $ac_n "(cached) $ac_c" 1>&6
4365 else
4366   ac_save_LIBS="$LIBS"
4367 LIBS="-l${termlib}  $LIBS"
4368 cat > conftest.$ac_ext <<EOF
4369 #line 4370 "configure"
4370 #include "confdefs.h"
4371 /* Override any gcc2 internal prototype to avoid an error.  */
4372 /* We use char because int might match the return type of a gcc2
4373     builtin and then its argument prototype would still apply.  */
4374 char tgetent();
4375
4376 int main() {
4377 tgetent()
4378 ; return 0; }
4379 EOF
4380 if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4381   rm -rf conftest*
4382   eval "ac_cv_lib_$ac_lib_var=yes"
4383 else
4384   echo "configure: failed program was:" >&5
4385   cat conftest.$ac_ext >&5
4386   rm -rf conftest*
4387   eval "ac_cv_lib_$ac_lib_var=no"
4388 fi
4389 rm -f conftest*
4390 LIBS="$ac_save_LIBS"
4391
4392 fi
4393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4394   echo "$ac_t""yes" 1>&6
4395   TERMLIBS="-l${termlib}"; break
4396 else
4397   echo "$ac_t""no" 1>&6
4398 fi
4399
4400       done
4401       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4402 echo "configure:4403: checking for rl_callback_handler_install in -lreadline" >&5
4403 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4404 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4405   echo $ac_n "(cached) $ac_c" 1>&6
4406 else
4407   ac_save_LIBS="$LIBS"
4408 LIBS="-lreadline $TERMLIBS $LIBS"
4409 cat > conftest.$ac_ext <<EOF
4410 #line 4411 "configure"
4411 #include "confdefs.h"
4412 /* Override any gcc2 internal prototype to avoid an error.  */
4413 /* We use char because int might match the return type of a gcc2
4414     builtin and then its argument prototype would still apply.  */
4415 char rl_callback_handler_install();
4416
4417 int main() {
4418 rl_callback_handler_install()
4419 ; return 0; }
4420 EOF
4421 if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4422   rm -rf conftest*
4423   eval "ac_cv_lib_$ac_lib_var=yes"
4424 else
4425   echo "configure: failed program was:" >&5
4426   cat conftest.$ac_ext >&5
4427   rm -rf conftest*
4428   eval "ac_cv_lib_$ac_lib_var=no"
4429 fi
4430 rm -f conftest*
4431 LIBS="$ac_save_LIBS"
4432
4433 fi
4434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4435   echo "$ac_t""yes" 1>&6
4436   TERMLIBS="-lreadline $TERMLIBS"
4437        cat >> confdefs.h <<\EOF
4438 #define HAVE_LIBREADLINE 1
4439 EOF
4440
4441        break
4442 else
4443   echo "$ac_t""no" 1>&6
4444 TERMLIBS=
4445 fi
4446
4447 else
4448   echo "$ac_t""no" 1>&6
4449 fi
4450 done
4451
4452     ;;
4453   no)
4454     echo "$ac_t""no" 1>&6
4455     ;;
4456   *)
4457     echo "$ac_t""yes" 1>&6
4458
4459     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4460     # alternate readline path
4461     _ldflags=${LDFLAGS}
4462     _cppflags=${CPPFLAGS}
4463
4464     # Add additional search path
4465     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4466     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4467
4468     for ac_hdr in readline.h history.h readline/readline.h
4469 do
4470 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4471 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4472 echo "configure:4473: checking for $ac_hdr" >&5
4473 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4474   echo $ac_n "(cached) $ac_c" 1>&6
4475 else
4476   cat > conftest.$ac_ext <<EOF
4477 #line 4478 "configure"
4478 #include "confdefs.h"
4479 #include <$ac_hdr>
4480 EOF
4481 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4482 { (eval echo configure:4483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4483 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4484 if test -z "$ac_err"; then
4485   rm -rf conftest*
4486   eval "ac_cv_header_$ac_safe=yes"
4487 else
4488   echo "$ac_err" >&5
4489   echo "configure: failed program was:" >&5
4490   cat conftest.$ac_ext >&5
4491   rm -rf conftest*
4492   eval "ac_cv_header_$ac_safe=no"
4493 fi
4494 rm -f conftest*
4495 fi
4496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4497   echo "$ac_t""yes" 1>&6
4498     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4499   cat >> confdefs.h <<EOF
4500 #define $ac_tr_hdr 1
4501 EOF
4502  
4503 else
4504   echo "$ac_t""no" 1>&6
4505 fi
4506 done
4507
4508     for ac_hdr in readline/history.h
4509 do
4510 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4511 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4512 echo "configure:4513: checking for $ac_hdr" >&5
4513 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4514   echo $ac_n "(cached) $ac_c" 1>&6
4515 else
4516   cat > conftest.$ac_ext <<EOF
4517 #line 4518 "configure"
4518 #include "confdefs.h"
4519 #include <$ac_hdr>
4520 EOF
4521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4522 { (eval echo configure:4523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4524 if test -z "$ac_err"; then
4525   rm -rf conftest*
4526   eval "ac_cv_header_$ac_safe=yes"
4527 else
4528   echo "$ac_err" >&5
4529   echo "configure: failed program was:" >&5
4530   cat conftest.$ac_ext >&5
4531   rm -rf conftest*
4532   eval "ac_cv_header_$ac_safe=no"
4533 fi
4534 rm -f conftest*
4535 fi
4536 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4537   echo "$ac_t""yes" 1>&6
4538     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4539   cat >> confdefs.h <<EOF
4540 #define $ac_tr_hdr 1
4541 EOF
4542  
4543 else
4544   echo "$ac_t""no" 1>&6
4545 fi
4546 done
4547
4548
4549     for ac_hdr in readline.h readline/readline.h
4550 do
4551 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4552 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4553 echo "configure:4554: checking for $ac_hdr" >&5
4554 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4555   echo $ac_n "(cached) $ac_c" 1>&6
4556 else
4557   cat > conftest.$ac_ext <<EOF
4558 #line 4559 "configure"
4559 #include "confdefs.h"
4560 #include <$ac_hdr>
4561 EOF
4562 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4563 { (eval echo configure:4564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4564 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4565 if test -z "$ac_err"; then
4566   rm -rf conftest*
4567   eval "ac_cv_header_$ac_safe=yes"
4568 else
4569   echo "$ac_err" >&5
4570   echo "configure: failed program was:" >&5
4571   cat conftest.$ac_ext >&5
4572   rm -rf conftest*
4573   eval "ac_cv_header_$ac_safe=no"
4574 fi
4575 rm -f conftest*
4576 fi
4577 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4578   echo "$ac_t""yes" 1>&6
4579     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4580   cat >> confdefs.h <<EOF
4581 #define $ac_tr_hdr 1
4582 EOF
4583  
4584       for termlib in ncurses curses termcap terminfo termlib; do
4585        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4586 echo "configure:4587: checking for tgetent in -l${termlib}" >&5
4587 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4588 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4589   echo $ac_n "(cached) $ac_c" 1>&6
4590 else
4591   ac_save_LIBS="$LIBS"
4592 LIBS="-l${termlib}  $LIBS"
4593 cat > conftest.$ac_ext <<EOF
4594 #line 4595 "configure"
4595 #include "confdefs.h"
4596 /* Override any gcc2 internal prototype to avoid an error.  */
4597 /* We use char because int might match the return type of a gcc2
4598     builtin and then its argument prototype would still apply.  */
4599 char tgetent();
4600
4601 int main() {
4602 tgetent()
4603 ; return 0; }
4604 EOF
4605 if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4606   rm -rf conftest*
4607   eval "ac_cv_lib_$ac_lib_var=yes"
4608 else
4609   echo "configure: failed program was:" >&5
4610   cat conftest.$ac_ext >&5
4611   rm -rf conftest*
4612   eval "ac_cv_lib_$ac_lib_var=no"
4613 fi
4614 rm -f conftest*
4615 LIBS="$ac_save_LIBS"
4616
4617 fi
4618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4619   echo "$ac_t""yes" 1>&6
4620   TERMLIBS="-l${termlib}"; break
4621 else
4622   echo "$ac_t""no" 1>&6
4623 fi
4624
4625       done
4626       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4627 echo "configure:4628: checking for rl_callback_handler_install in -lreadline" >&5
4628 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4629 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4630   echo $ac_n "(cached) $ac_c" 1>&6
4631 else
4632   ac_save_LIBS="$LIBS"
4633 LIBS="-lreadline $TERMLIBS $LIBS"
4634 cat > conftest.$ac_ext <<EOF
4635 #line 4636 "configure"
4636 #include "confdefs.h"
4637 /* Override any gcc2 internal prototype to avoid an error.  */
4638 /* We use char because int might match the return type of a gcc2
4639     builtin and then its argument prototype would still apply.  */
4640 char rl_callback_handler_install();
4641
4642 int main() {
4643 rl_callback_handler_install()
4644 ; return 0; }
4645 EOF
4646 if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4647   rm -rf conftest*
4648   eval "ac_cv_lib_$ac_lib_var=yes"
4649 else
4650   echo "configure: failed program was:" >&5
4651   cat conftest.$ac_ext >&5
4652   rm -rf conftest*
4653   eval "ac_cv_lib_$ac_lib_var=no"
4654 fi
4655 rm -f conftest*
4656 LIBS="$ac_save_LIBS"
4657
4658 fi
4659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4660   echo "$ac_t""yes" 1>&6
4661   TERMLDFLAGS="-L$with_readline/lib"
4662        TERMCPPFLAGS="-I$with_readline/include"
4663        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4664        TERMLIBS="-lreadline $TERMLIBS"
4665        cat >> confdefs.h <<\EOF
4666 #define HAVE_LIBREADLINE 1
4667 EOF
4668
4669        break
4670 else
4671   echo "$ac_t""no" 1>&6
4672 TERMLIBS= CPPFLAGS=$_cppflags
4673 fi
4674
4675 else
4676   echo "$ac_t""no" 1>&6
4677 fi
4678 done
4679
4680
4681     LDFLAGS=$_ldflags
4682     ;;
4683   esac
4684 else
4685   echo "$ac_t""no" 1>&6
4686
4687 fi
4688
4689
4690
4691
4692 # The readline API changed slightly from readline3 to readline4, so
4693 # code will generate warnings on one of them unless we have a few
4694 # special cases.
4695 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4696 echo "configure:4697: checking for rl_completion_matches in -lreadline" >&5
4697 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4698 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4699   echo $ac_n "(cached) $ac_c" 1>&6
4700 else
4701   ac_save_LIBS="$LIBS"
4702 LIBS="-lreadline $TERMLIBS $LIBS"
4703 cat > conftest.$ac_ext <<EOF
4704 #line 4705 "configure"
4705 #include "confdefs.h"
4706 /* Override any gcc2 internal prototype to avoid an error.  */
4707 /* We use char because int might match the return type of a gcc2
4708     builtin and then its argument prototype would still apply.  */
4709 char rl_completion_matches();
4710
4711 int main() {
4712 rl_completion_matches()
4713 ; return 0; }
4714 EOF
4715 if { (eval echo configure:4716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4716   rm -rf conftest*
4717   eval "ac_cv_lib_$ac_lib_var=yes"
4718 else
4719   echo "configure: failed program was:" >&5
4720   cat conftest.$ac_ext >&5
4721   rm -rf conftest*
4722   eval "ac_cv_lib_$ac_lib_var=no"
4723 fi
4724 rm -f conftest*
4725 LIBS="$ac_save_LIBS"
4726
4727 fi
4728 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4729   echo "$ac_t""yes" 1>&6
4730   cat >> confdefs.h <<\EOF
4731 #define HAVE_NEW_LIBREADLINE 1
4732 EOF
4733
4734 else
4735   echo "$ac_t""no" 1>&6
4736 fi
4737
4738
4739 # The following test taken from the cvs sources
4740 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4741 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4742 # libsocket.so which has a bad implementation of gethostbyname (it
4743 # only looks in /etc/hosts), so we only look for -lsocket if we need
4744 # it.
4745 for ac_func in connect
4746 do
4747 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4748 echo "configure:4749: checking for $ac_func" >&5
4749 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4750   echo $ac_n "(cached) $ac_c" 1>&6
4751 else
4752   cat > conftest.$ac_ext <<EOF
4753 #line 4754 "configure"
4754 #include "confdefs.h"
4755 /* System header to define __stub macros and hopefully few prototypes,
4756     which can conflict with char $ac_func(); below.  */
4757 #include <assert.h>
4758 /* Override any gcc2 internal prototype to avoid an error.  */
4759 /* We use char because int might match the return type of a gcc2
4760     builtin and then its argument prototype would still apply.  */
4761 char $ac_func();
4762
4763 int main() {
4764
4765 /* The GNU C library defines this for functions which it implements
4766     to always fail with ENOSYS.  Some functions are actually named
4767     something starting with __ and the normal name is an alias.  */
4768 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4769 choke me
4770 #else
4771 $ac_func();
4772 #endif
4773
4774 ; return 0; }
4775 EOF
4776 if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4777   rm -rf conftest*
4778   eval "ac_cv_func_$ac_func=yes"
4779 else
4780   echo "configure: failed program was:" >&5
4781   cat conftest.$ac_ext >&5
4782   rm -rf conftest*
4783   eval "ac_cv_func_$ac_func=no"
4784 fi
4785 rm -f conftest*
4786 fi
4787
4788 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4789   echo "$ac_t""yes" 1>&6
4790     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4791   cat >> confdefs.h <<EOF
4792 #define $ac_tr_func 1
4793 EOF
4794  
4795 else
4796   echo "$ac_t""no" 1>&6
4797 fi
4798 done
4799
4800 if test x"$ac_cv_func_connect" = x"no"; then
4801     case "$LIBS" in
4802     *-lnsl*) ;;
4803     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4804 echo "configure:4805: checking for printf in -lnsl_s" >&5
4805 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4806 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4807   echo $ac_n "(cached) $ac_c" 1>&6
4808 else
4809   ac_save_LIBS="$LIBS"
4810 LIBS="-lnsl_s  $LIBS"
4811 cat > conftest.$ac_ext <<EOF
4812 #line 4813 "configure"
4813 #include "confdefs.h"
4814 /* Override any gcc2 internal prototype to avoid an error.  */
4815 /* We use char because int might match the return type of a gcc2
4816     builtin and then its argument prototype would still apply.  */
4817 char printf();
4818
4819 int main() {
4820 printf()
4821 ; return 0; }
4822 EOF
4823 if { (eval echo configure:4824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4824   rm -rf conftest*
4825   eval "ac_cv_lib_$ac_lib_var=yes"
4826 else
4827   echo "configure: failed program was:" >&5
4828   cat conftest.$ac_ext >&5
4829   rm -rf conftest*
4830   eval "ac_cv_lib_$ac_lib_var=no"
4831 fi
4832 rm -f conftest*
4833 LIBS="$ac_save_LIBS"
4834
4835 fi
4836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4837   echo "$ac_t""yes" 1>&6
4838     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4839     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4840   cat >> confdefs.h <<EOF
4841 #define $ac_tr_lib 1
4842 EOF
4843
4844   LIBS="-lnsl_s $LIBS"
4845
4846 else
4847   echo "$ac_t""no" 1>&6
4848 fi
4849  ;;
4850     esac
4851     case "$LIBS" in
4852     *-lnsl*) ;;
4853     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4854 echo "configure:4855: checking for printf in -lnsl" >&5
4855 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4856 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4857   echo $ac_n "(cached) $ac_c" 1>&6
4858 else
4859   ac_save_LIBS="$LIBS"
4860 LIBS="-lnsl  $LIBS"
4861 cat > conftest.$ac_ext <<EOF
4862 #line 4863 "configure"
4863 #include "confdefs.h"
4864 /* Override any gcc2 internal prototype to avoid an error.  */
4865 /* We use char because int might match the return type of a gcc2
4866     builtin and then its argument prototype would still apply.  */
4867 char printf();
4868
4869 int main() {
4870 printf()
4871 ; return 0; }
4872 EOF
4873 if { (eval echo configure:4874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4874   rm -rf conftest*
4875   eval "ac_cv_lib_$ac_lib_var=yes"
4876 else
4877   echo "configure: failed program was:" >&5
4878   cat conftest.$ac_ext >&5
4879   rm -rf conftest*
4880   eval "ac_cv_lib_$ac_lib_var=no"
4881 fi
4882 rm -f conftest*
4883 LIBS="$ac_save_LIBS"
4884
4885 fi
4886 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4887   echo "$ac_t""yes" 1>&6
4888     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4889     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4890   cat >> confdefs.h <<EOF
4891 #define $ac_tr_lib 1
4892 EOF
4893
4894   LIBS="-lnsl $LIBS"
4895
4896 else
4897   echo "$ac_t""no" 1>&6
4898 fi
4899  ;;
4900     esac
4901     case "$LIBS" in
4902     *-lsocket*) ;;
4903     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4904 echo "configure:4905: checking for connect in -lsocket" >&5
4905 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4906 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4907   echo $ac_n "(cached) $ac_c" 1>&6
4908 else
4909   ac_save_LIBS="$LIBS"
4910 LIBS="-lsocket  $LIBS"
4911 cat > conftest.$ac_ext <<EOF
4912 #line 4913 "configure"
4913 #include "confdefs.h"
4914 /* Override any gcc2 internal prototype to avoid an error.  */
4915 /* We use char because int might match the return type of a gcc2
4916     builtin and then its argument prototype would still apply.  */
4917 char connect();
4918
4919 int main() {
4920 connect()
4921 ; return 0; }
4922 EOF
4923 if { (eval echo configure:4924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4924   rm -rf conftest*
4925   eval "ac_cv_lib_$ac_lib_var=yes"
4926 else
4927   echo "configure: failed program was:" >&5
4928   cat conftest.$ac_ext >&5
4929   rm -rf conftest*
4930   eval "ac_cv_lib_$ac_lib_var=no"
4931 fi
4932 rm -f conftest*
4933 LIBS="$ac_save_LIBS"
4934
4935 fi
4936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4937   echo "$ac_t""yes" 1>&6
4938     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4939     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4940   cat >> confdefs.h <<EOF
4941 #define $ac_tr_lib 1
4942 EOF
4943
4944   LIBS="-lsocket $LIBS"
4945
4946 else
4947   echo "$ac_t""no" 1>&6
4948 fi
4949  ;;
4950     esac
4951     case "$LIBS" in
4952     *-linet*) ;;
4953     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4954 echo "configure:4955: checking for connect in -linet" >&5
4955 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4956 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4957   echo $ac_n "(cached) $ac_c" 1>&6
4958 else
4959   ac_save_LIBS="$LIBS"
4960 LIBS="-linet  $LIBS"
4961 cat > conftest.$ac_ext <<EOF
4962 #line 4963 "configure"
4963 #include "confdefs.h"
4964 /* Override any gcc2 internal prototype to avoid an error.  */
4965 /* We use char because int might match the return type of a gcc2
4966     builtin and then its argument prototype would still apply.  */
4967 char connect();
4968
4969 int main() {
4970 connect()
4971 ; return 0; }
4972 EOF
4973 if { (eval echo configure:4974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4974   rm -rf conftest*
4975   eval "ac_cv_lib_$ac_lib_var=yes"
4976 else
4977   echo "configure: failed program was:" >&5
4978   cat conftest.$ac_ext >&5
4979   rm -rf conftest*
4980   eval "ac_cv_lib_$ac_lib_var=no"
4981 fi
4982 rm -f conftest*
4983 LIBS="$ac_save_LIBS"
4984
4985 fi
4986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4987   echo "$ac_t""yes" 1>&6
4988     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4989     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4990   cat >> confdefs.h <<EOF
4991 #define $ac_tr_lib 1
4992 EOF
4993
4994   LIBS="-linet $LIBS"
4995
4996 else
4997   echo "$ac_t""no" 1>&6
4998 fi
4999  ;;
5000     esac
5001             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5002        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5003         # ac_cv_func_connect=yes
5004         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5005         cat >> confdefs.h <<\EOF
5006 #define HAVE_CONNECT 1
5007 EOF
5008
5009     fi
5010 fi
5011
5012 ###############################################
5013 # test for where we get get_yp_default_domain() from
5014 for ac_func in yp_get_default_domain
5015 do
5016 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5017 echo "configure:5018: checking for $ac_func" >&5
5018 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5019   echo $ac_n "(cached) $ac_c" 1>&6
5020 else
5021   cat > conftest.$ac_ext <<EOF
5022 #line 5023 "configure"
5023 #include "confdefs.h"
5024 /* System header to define __stub macros and hopefully few prototypes,
5025     which can conflict with char $ac_func(); below.  */
5026 #include <assert.h>
5027 /* Override any gcc2 internal prototype to avoid an error.  */
5028 /* We use char because int might match the return type of a gcc2
5029     builtin and then its argument prototype would still apply.  */
5030 char $ac_func();
5031
5032 int main() {
5033
5034 /* The GNU C library defines this for functions which it implements
5035     to always fail with ENOSYS.  Some functions are actually named
5036     something starting with __ and the normal name is an alias.  */
5037 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5038 choke me
5039 #else
5040 $ac_func();
5041 #endif
5042
5043 ; return 0; }
5044 EOF
5045 if { (eval echo configure:5046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5046   rm -rf conftest*
5047   eval "ac_cv_func_$ac_func=yes"
5048 else
5049   echo "configure: failed program was:" >&5
5050   cat conftest.$ac_ext >&5
5051   rm -rf conftest*
5052   eval "ac_cv_func_$ac_func=no"
5053 fi
5054 rm -f conftest*
5055 fi
5056
5057 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5058   echo "$ac_t""yes" 1>&6
5059     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5060   cat >> confdefs.h <<EOF
5061 #define $ac_tr_func 1
5062 EOF
5063  
5064 else
5065   echo "$ac_t""no" 1>&6
5066 fi
5067 done
5068
5069 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5070         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5071 echo "configure:5072: checking for yp_get_default_domain in -lnsl" >&5
5072 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5073 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5074   echo $ac_n "(cached) $ac_c" 1>&6
5075 else
5076   ac_save_LIBS="$LIBS"
5077 LIBS="-lnsl  $LIBS"
5078 cat > conftest.$ac_ext <<EOF
5079 #line 5080 "configure"
5080 #include "confdefs.h"
5081 /* Override any gcc2 internal prototype to avoid an error.  */
5082 /* We use char because int might match the return type of a gcc2
5083     builtin and then its argument prototype would still apply.  */
5084 char yp_get_default_domain();
5085
5086 int main() {
5087 yp_get_default_domain()
5088 ; return 0; }
5089 EOF
5090 if { (eval echo configure:5091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5091   rm -rf conftest*
5092   eval "ac_cv_lib_$ac_lib_var=yes"
5093 else
5094   echo "configure: failed program was:" >&5
5095   cat conftest.$ac_ext >&5
5096   rm -rf conftest*
5097   eval "ac_cv_lib_$ac_lib_var=no"
5098 fi
5099 rm -f conftest*
5100 LIBS="$ac_save_LIBS"
5101
5102 fi
5103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5104   echo "$ac_t""yes" 1>&6
5105   LIBS="$LIBS -lnsl";
5106         cat >> confdefs.h <<\EOF
5107 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5108 EOF
5109
5110 else
5111   echo "$ac_t""no" 1>&6
5112 fi
5113  
5114 fi
5115
5116 # Check if we have execl, if not we need to compile smbrun.
5117 for ac_func in execl
5118 do
5119 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5120 echo "configure:5121: checking for $ac_func" >&5
5121 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5122   echo $ac_n "(cached) $ac_c" 1>&6
5123 else
5124   cat > conftest.$ac_ext <<EOF
5125 #line 5126 "configure"
5126 #include "confdefs.h"
5127 /* System header to define __stub macros and hopefully few prototypes,
5128     which can conflict with char $ac_func(); below.  */
5129 #include <assert.h>
5130 /* Override any gcc2 internal prototype to avoid an error.  */
5131 /* We use char because int might match the return type of a gcc2
5132     builtin and then its argument prototype would still apply.  */
5133 char $ac_func();
5134
5135 int main() {
5136
5137 /* The GNU C library defines this for functions which it implements
5138     to always fail with ENOSYS.  Some functions are actually named
5139     something starting with __ and the normal name is an alias.  */
5140 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5141 choke me
5142 #else
5143 $ac_func();
5144 #endif
5145
5146 ; return 0; }
5147 EOF
5148 if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5149   rm -rf conftest*
5150   eval "ac_cv_func_$ac_func=yes"
5151 else
5152   echo "configure: failed program was:" >&5
5153   cat conftest.$ac_ext >&5
5154   rm -rf conftest*
5155   eval "ac_cv_func_$ac_func=no"
5156 fi
5157 rm -f conftest*
5158 fi
5159
5160 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5161   echo "$ac_t""yes" 1>&6
5162     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5163   cat >> confdefs.h <<EOF
5164 #define $ac_tr_func 1
5165 EOF
5166  
5167 else
5168   echo "$ac_t""no" 1>&6
5169 fi
5170 done
5171
5172 if test x"$ac_cv_func_execl" = x"no"; then
5173     RUNPROG="bin/smbrun"
5174 else
5175     RUNPROG=""
5176 fi
5177
5178 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5179 do
5180 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5181 echo "configure:5182: checking for $ac_func" >&5
5182 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5183   echo $ac_n "(cached) $ac_c" 1>&6
5184 else
5185   cat > conftest.$ac_ext <<EOF
5186 #line 5187 "configure"
5187 #include "confdefs.h"
5188 /* System header to define __stub macros and hopefully few prototypes,
5189     which can conflict with char $ac_func(); below.  */
5190 #include <assert.h>
5191 /* Override any gcc2 internal prototype to avoid an error.  */
5192 /* We use char because int might match the return type of a gcc2
5193     builtin and then its argument prototype would still apply.  */
5194 char $ac_func();
5195
5196 int main() {
5197
5198 /* The GNU C library defines this for functions which it implements
5199     to always fail with ENOSYS.  Some functions are actually named
5200     something starting with __ and the normal name is an alias.  */
5201 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5202 choke me
5203 #else
5204 $ac_func();
5205 #endif
5206
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_func_$ac_func=yes"
5212 else
5213   echo "configure: failed program was:" >&5
5214   cat conftest.$ac_ext >&5
5215   rm -rf conftest*
5216   eval "ac_cv_func_$ac_func=no"
5217 fi
5218 rm -f conftest*
5219 fi
5220
5221 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5222   echo "$ac_t""yes" 1>&6
5223     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5224   cat >> confdefs.h <<EOF
5225 #define $ac_tr_func 1
5226 EOF
5227  
5228 else
5229   echo "$ac_t""no" 1>&6
5230 fi
5231 done
5232
5233 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5234 do
5235 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5236 echo "configure:5237: checking for $ac_func" >&5
5237 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5238   echo $ac_n "(cached) $ac_c" 1>&6
5239 else
5240   cat > conftest.$ac_ext <<EOF
5241 #line 5242 "configure"
5242 #include "confdefs.h"
5243 /* System header to define __stub macros and hopefully few prototypes,
5244     which can conflict with char $ac_func(); below.  */
5245 #include <assert.h>
5246 /* Override any gcc2 internal prototype to avoid an error.  */
5247 /* We use char because int might match the return type of a gcc2
5248     builtin and then its argument prototype would still apply.  */
5249 char $ac_func();
5250
5251 int main() {
5252
5253 /* The GNU C library defines this for functions which it implements
5254     to always fail with ENOSYS.  Some functions are actually named
5255     something starting with __ and the normal name is an alias.  */
5256 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5257 choke me
5258 #else
5259 $ac_func();
5260 #endif
5261
5262 ; return 0; }
5263 EOF
5264 if { (eval echo configure:5265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5265   rm -rf conftest*
5266   eval "ac_cv_func_$ac_func=yes"
5267 else
5268   echo "configure: failed program was:" >&5
5269   cat conftest.$ac_ext >&5
5270   rm -rf conftest*
5271   eval "ac_cv_func_$ac_func=no"
5272 fi
5273 rm -f conftest*
5274 fi
5275
5276 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5277   echo "$ac_t""yes" 1>&6
5278     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5279   cat >> confdefs.h <<EOF
5280 #define $ac_tr_func 1
5281 EOF
5282  
5283 else
5284   echo "$ac_t""no" 1>&6
5285 fi
5286 done
5287
5288 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5289 do
5290 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5291 echo "configure:5292: checking for $ac_func" >&5
5292 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5293   echo $ac_n "(cached) $ac_c" 1>&6
5294 else
5295   cat > conftest.$ac_ext <<EOF
5296 #line 5297 "configure"
5297 #include "confdefs.h"
5298 /* System header to define __stub macros and hopefully few prototypes,
5299     which can conflict with char $ac_func(); below.  */
5300 #include <assert.h>
5301 /* Override any gcc2 internal prototype to avoid an error.  */
5302 /* We use char because int might match the return type of a gcc2
5303     builtin and then its argument prototype would still apply.  */
5304 char $ac_func();
5305
5306 int main() {
5307
5308 /* The GNU C library defines this for functions which it implements
5309     to always fail with ENOSYS.  Some functions are actually named
5310     something starting with __ and the normal name is an alias.  */
5311 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5312 choke me
5313 #else
5314 $ac_func();
5315 #endif
5316
5317 ; return 0; }
5318 EOF
5319 if { (eval echo configure:5320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5320   rm -rf conftest*
5321   eval "ac_cv_func_$ac_func=yes"
5322 else
5323   echo "configure: failed program was:" >&5
5324   cat conftest.$ac_ext >&5
5325   rm -rf conftest*
5326   eval "ac_cv_func_$ac_func=no"
5327 fi
5328 rm -f conftest*
5329 fi
5330
5331 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5332   echo "$ac_t""yes" 1>&6
5333     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5334   cat >> confdefs.h <<EOF
5335 #define $ac_tr_func 1
5336 EOF
5337  
5338 else
5339   echo "$ac_t""no" 1>&6
5340 fi
5341 done
5342
5343 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5344 do
5345 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5346 echo "configure:5347: checking for $ac_func" >&5
5347 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5348   echo $ac_n "(cached) $ac_c" 1>&6
5349 else
5350   cat > conftest.$ac_ext <<EOF
5351 #line 5352 "configure"
5352 #include "confdefs.h"
5353 /* System header to define __stub macros and hopefully few prototypes,
5354     which can conflict with char $ac_func(); below.  */
5355 #include <assert.h>
5356 /* Override any gcc2 internal prototype to avoid an error.  */
5357 /* We use char because int might match the return type of a gcc2
5358     builtin and then its argument prototype would still apply.  */
5359 char $ac_func();
5360
5361 int main() {
5362
5363 /* The GNU C library defines this for functions which it implements
5364     to always fail with ENOSYS.  Some functions are actually named
5365     something starting with __ and the normal name is an alias.  */
5366 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5367 choke me
5368 #else
5369 $ac_func();
5370 #endif
5371
5372 ; return 0; }
5373 EOF
5374 if { (eval echo configure:5375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5375   rm -rf conftest*
5376   eval "ac_cv_func_$ac_func=yes"
5377 else
5378   echo "configure: failed program was:" >&5
5379   cat conftest.$ac_ext >&5
5380   rm -rf conftest*
5381   eval "ac_cv_func_$ac_func=no"
5382 fi
5383 rm -f conftest*
5384 fi
5385
5386 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5387   echo "$ac_t""yes" 1>&6
5388     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5389   cat >> confdefs.h <<EOF
5390 #define $ac_tr_func 1
5391 EOF
5392  
5393 else
5394   echo "$ac_t""no" 1>&6
5395 fi
5396 done
5397
5398 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5399 do
5400 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5401 echo "configure:5402: checking for $ac_func" >&5
5402 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5403   echo $ac_n "(cached) $ac_c" 1>&6
5404 else
5405   cat > conftest.$ac_ext <<EOF
5406 #line 5407 "configure"
5407 #include "confdefs.h"
5408 /* System header to define __stub macros and hopefully few prototypes,
5409     which can conflict with char $ac_func(); below.  */
5410 #include <assert.h>
5411 /* Override any gcc2 internal prototype to avoid an error.  */
5412 /* We use char because int might match the return type of a gcc2
5413     builtin and then its argument prototype would still apply.  */
5414 char $ac_func();
5415
5416 int main() {
5417
5418 /* The GNU C library defines this for functions which it implements
5419     to always fail with ENOSYS.  Some functions are actually named
5420     something starting with __ and the normal name is an alias.  */
5421 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5422 choke me
5423 #else
5424 $ac_func();
5425 #endif
5426
5427 ; return 0; }
5428 EOF
5429 if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5430   rm -rf conftest*
5431   eval "ac_cv_func_$ac_func=yes"
5432 else
5433   echo "configure: failed program was:" >&5
5434   cat conftest.$ac_ext >&5
5435   rm -rf conftest*
5436   eval "ac_cv_func_$ac_func=no"
5437 fi
5438 rm -f conftest*
5439 fi
5440
5441 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5442   echo "$ac_t""yes" 1>&6
5443     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5444   cat >> confdefs.h <<EOF
5445 #define $ac_tr_func 1
5446 EOF
5447  
5448 else
5449   echo "$ac_t""no" 1>&6
5450 fi
5451 done
5452
5453 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5454 do
5455 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5456 echo "configure:5457: checking for $ac_func" >&5
5457 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5458   echo $ac_n "(cached) $ac_c" 1>&6
5459 else
5460   cat > conftest.$ac_ext <<EOF
5461 #line 5462 "configure"
5462 #include "confdefs.h"
5463 /* System header to define __stub macros and hopefully few prototypes,
5464     which can conflict with char $ac_func(); below.  */
5465 #include <assert.h>
5466 /* Override any gcc2 internal prototype to avoid an error.  */
5467 /* We use char because int might match the return type of a gcc2
5468     builtin and then its argument prototype would still apply.  */
5469 char $ac_func();
5470
5471 int main() {
5472
5473 /* The GNU C library defines this for functions which it implements
5474     to always fail with ENOSYS.  Some functions are actually named
5475     something starting with __ and the normal name is an alias.  */
5476 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5477 choke me
5478 #else
5479 $ac_func();
5480 #endif
5481
5482 ; return 0; }
5483 EOF
5484 if { (eval echo configure:5485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5485   rm -rf conftest*
5486   eval "ac_cv_func_$ac_func=yes"
5487 else
5488   echo "configure: failed program was:" >&5
5489   cat conftest.$ac_ext >&5
5490   rm -rf conftest*
5491   eval "ac_cv_func_$ac_func=no"
5492 fi
5493 rm -f conftest*
5494 fi
5495
5496 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5497   echo "$ac_t""yes" 1>&6
5498     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5499   cat >> confdefs.h <<EOF
5500 #define $ac_tr_func 1
5501 EOF
5502  
5503 else
5504   echo "$ac_t""no" 1>&6
5505 fi
5506 done
5507
5508 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5509 do
5510 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5511 echo "configure:5512: checking for $ac_func" >&5
5512 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5513   echo $ac_n "(cached) $ac_c" 1>&6
5514 else
5515   cat > conftest.$ac_ext <<EOF
5516 #line 5517 "configure"
5517 #include "confdefs.h"
5518 /* System header to define __stub macros and hopefully few prototypes,
5519     which can conflict with char $ac_func(); below.  */
5520 #include <assert.h>
5521 /* Override any gcc2 internal prototype to avoid an error.  */
5522 /* We use char because int might match the return type of a gcc2
5523     builtin and then its argument prototype would still apply.  */
5524 char $ac_func();
5525
5526 int main() {
5527
5528 /* The GNU C library defines this for functions which it implements
5529     to always fail with ENOSYS.  Some functions are actually named
5530     something starting with __ and the normal name is an alias.  */
5531 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5532 choke me
5533 #else
5534 $ac_func();
5535 #endif
5536
5537 ; return 0; }
5538 EOF
5539 if { (eval echo configure:5540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5540   rm -rf conftest*
5541   eval "ac_cv_func_$ac_func=yes"
5542 else
5543   echo "configure: failed program was:" >&5
5544   cat conftest.$ac_ext >&5
5545   rm -rf conftest*
5546   eval "ac_cv_func_$ac_func=no"
5547 fi
5548 rm -f conftest*
5549 fi
5550
5551 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5552   echo "$ac_t""yes" 1>&6
5553     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5554   cat >> confdefs.h <<EOF
5555 #define $ac_tr_func 1
5556 EOF
5557  
5558 else
5559   echo "$ac_t""no" 1>&6
5560 fi
5561 done
5562
5563 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5564 do
5565 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5566 echo "configure:5567: checking for $ac_func" >&5
5567 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5568   echo $ac_n "(cached) $ac_c" 1>&6
5569 else
5570   cat > conftest.$ac_ext <<EOF
5571 #line 5572 "configure"
5572 #include "confdefs.h"
5573 /* System header to define __stub macros and hopefully few prototypes,
5574     which can conflict with char $ac_func(); below.  */
5575 #include <assert.h>
5576 /* Override any gcc2 internal prototype to avoid an error.  */
5577 /* We use char because int might match the return type of a gcc2
5578     builtin and then its argument prototype would still apply.  */
5579 char $ac_func();
5580
5581 int main() {
5582
5583 /* The GNU C library defines this for functions which it implements
5584     to always fail with ENOSYS.  Some functions are actually named
5585     something starting with __ and the normal name is an alias.  */
5586 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5587 choke me
5588 #else
5589 $ac_func();
5590 #endif
5591
5592 ; return 0; }
5593 EOF
5594 if { (eval echo configure:5595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5595   rm -rf conftest*
5596   eval "ac_cv_func_$ac_func=yes"
5597 else
5598   echo "configure: failed program was:" >&5
5599   cat conftest.$ac_ext >&5
5600   rm -rf conftest*
5601   eval "ac_cv_func_$ac_func=no"
5602 fi
5603 rm -f conftest*
5604 fi
5605
5606 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5607   echo "$ac_t""yes" 1>&6
5608     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5609   cat >> confdefs.h <<EOF
5610 #define $ac_tr_func 1
5611 EOF
5612  
5613 else
5614   echo "$ac_t""no" 1>&6
5615 fi
5616 done
5617
5618 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5619 do
5620 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5621 echo "configure:5622: checking for $ac_func" >&5
5622 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5623   echo $ac_n "(cached) $ac_c" 1>&6
5624 else
5625   cat > conftest.$ac_ext <<EOF
5626 #line 5627 "configure"
5627 #include "confdefs.h"
5628 /* System header to define __stub macros and hopefully few prototypes,
5629     which can conflict with char $ac_func(); below.  */
5630 #include <assert.h>
5631 /* Override any gcc2 internal prototype to avoid an error.  */
5632 /* We use char because int might match the return type of a gcc2
5633     builtin and then its argument prototype would still apply.  */
5634 char $ac_func();
5635
5636 int main() {
5637
5638 /* The GNU C library defines this for functions which it implements
5639     to always fail with ENOSYS.  Some functions are actually named
5640     something starting with __ and the normal name is an alias.  */
5641 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5642 choke me
5643 #else
5644 $ac_func();
5645 #endif
5646
5647 ; return 0; }
5648 EOF
5649 if { (eval echo configure:5650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5650   rm -rf conftest*
5651   eval "ac_cv_func_$ac_func=yes"
5652 else
5653   echo "configure: failed program was:" >&5
5654   cat conftest.$ac_ext >&5
5655   rm -rf conftest*
5656   eval "ac_cv_func_$ac_func=no"
5657 fi
5658 rm -f conftest*
5659 fi
5660
5661 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5662   echo "$ac_t""yes" 1>&6
5663     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5664   cat >> confdefs.h <<EOF
5665 #define $ac_tr_func 1
5666 EOF
5667  
5668 else
5669   echo "$ac_t""no" 1>&6
5670 fi
5671 done
5672
5673 for ac_func in syslog vsyslog
5674 do
5675 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5676 echo "configure:5677: checking for $ac_func" >&5
5677 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5678   echo $ac_n "(cached) $ac_c" 1>&6
5679 else
5680   cat > conftest.$ac_ext <<EOF
5681 #line 5682 "configure"
5682 #include "confdefs.h"
5683 /* System header to define __stub macros and hopefully few prototypes,
5684     which can conflict with char $ac_func(); below.  */
5685 #include <assert.h>
5686 /* Override any gcc2 internal prototype to avoid an error.  */
5687 /* We use char because int might match the return type of a gcc2
5688     builtin and then its argument prototype would still apply.  */
5689 char $ac_func();
5690
5691 int main() {
5692
5693 /* The GNU C library defines this for functions which it implements
5694     to always fail with ENOSYS.  Some functions are actually named
5695     something starting with __ and the normal name is an alias.  */
5696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5697 choke me
5698 #else
5699 $ac_func();
5700 #endif
5701
5702 ; return 0; }
5703 EOF
5704 if { (eval echo configure:5705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5705   rm -rf conftest*
5706   eval "ac_cv_func_$ac_func=yes"
5707 else
5708   echo "configure: failed program was:" >&5
5709   cat conftest.$ac_ext >&5
5710   rm -rf conftest*
5711   eval "ac_cv_func_$ac_func=no"
5712 fi
5713 rm -f conftest*
5714 fi
5715
5716 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5717   echo "$ac_t""yes" 1>&6
5718     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5719   cat >> confdefs.h <<EOF
5720 #define $ac_tr_func 1
5721 EOF
5722  
5723 else
5724   echo "$ac_t""no" 1>&6
5725 fi
5726 done
5727
5728 # setbuffer is needed for smbtorture
5729 for ac_func in setbuffer
5730 do
5731 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5732 echo "configure:5733: checking for $ac_func" >&5
5733 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5734   echo $ac_n "(cached) $ac_c" 1>&6
5735 else
5736   cat > conftest.$ac_ext <<EOF
5737 #line 5738 "configure"
5738 #include "confdefs.h"
5739 /* System header to define __stub macros and hopefully few prototypes,
5740     which can conflict with char $ac_func(); below.  */
5741 #include <assert.h>
5742 /* Override any gcc2 internal prototype to avoid an error.  */
5743 /* We use char because int might match the return type of a gcc2
5744     builtin and then its argument prototype would still apply.  */
5745 char $ac_func();
5746
5747 int main() {
5748
5749 /* The GNU C library defines this for functions which it implements
5750     to always fail with ENOSYS.  Some functions are actually named
5751     something starting with __ and the normal name is an alias.  */
5752 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5753 choke me
5754 #else
5755 $ac_func();
5756 #endif
5757
5758 ; return 0; }
5759 EOF
5760 if { (eval echo configure:5761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5761   rm -rf conftest*
5762   eval "ac_cv_func_$ac_func=yes"
5763 else
5764   echo "configure: failed program was:" >&5
5765   cat conftest.$ac_ext >&5
5766   rm -rf conftest*
5767   eval "ac_cv_func_$ac_func=no"
5768 fi
5769 rm -f conftest*
5770 fi
5771
5772 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5773   echo "$ac_t""yes" 1>&6
5774     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5775   cat >> confdefs.h <<EOF
5776 #define $ac_tr_func 1
5777 EOF
5778  
5779 else
5780   echo "$ac_t""no" 1>&6
5781 fi
5782 done
5783
5784
5785 # syscall() is needed for smbwrapper.
5786 for ac_func in syscall
5787 do
5788 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5789 echo "configure:5790: checking for $ac_func" >&5
5790 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5791   echo $ac_n "(cached) $ac_c" 1>&6
5792 else
5793   cat > conftest.$ac_ext <<EOF
5794 #line 5795 "configure"
5795 #include "confdefs.h"
5796 /* System header to define __stub macros and hopefully few prototypes,
5797     which can conflict with char $ac_func(); below.  */
5798 #include <assert.h>
5799 /* Override any gcc2 internal prototype to avoid an error.  */
5800 /* We use char because int might match the return type of a gcc2
5801     builtin and then its argument prototype would still apply.  */
5802 char $ac_func();
5803
5804 int main() {
5805
5806 /* The GNU C library defines this for functions which it implements
5807     to always fail with ENOSYS.  Some functions are actually named
5808     something starting with __ and the normal name is an alias.  */
5809 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5810 choke me
5811 #else
5812 $ac_func();
5813 #endif
5814
5815 ; return 0; }
5816 EOF
5817 if { (eval echo configure:5818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5818   rm -rf conftest*
5819   eval "ac_cv_func_$ac_func=yes"
5820 else
5821   echo "configure: failed program was:" >&5
5822   cat conftest.$ac_ext >&5
5823   rm -rf conftest*
5824   eval "ac_cv_func_$ac_func=no"
5825 fi
5826 rm -f conftest*
5827 fi
5828
5829 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5830   echo "$ac_t""yes" 1>&6
5831     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5832   cat >> confdefs.h <<EOF
5833 #define $ac_tr_func 1
5834 EOF
5835  
5836 else
5837   echo "$ac_t""no" 1>&6
5838 fi
5839 done
5840
5841
5842 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5843 do
5844 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5845 echo "configure:5846: checking for $ac_func" >&5
5846 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5847   echo $ac_n "(cached) $ac_c" 1>&6
5848 else
5849   cat > conftest.$ac_ext <<EOF
5850 #line 5851 "configure"
5851 #include "confdefs.h"
5852 /* System header to define __stub macros and hopefully few prototypes,
5853     which can conflict with char $ac_func(); below.  */
5854 #include <assert.h>
5855 /* Override any gcc2 internal prototype to avoid an error.  */
5856 /* We use char because int might match the return type of a gcc2
5857     builtin and then its argument prototype would still apply.  */
5858 char $ac_func();
5859
5860 int main() {
5861
5862 /* The GNU C library defines this for functions which it implements
5863     to always fail with ENOSYS.  Some functions are actually named
5864     something starting with __ and the normal name is an alias.  */
5865 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5866 choke me
5867 #else
5868 $ac_func();
5869 #endif
5870
5871 ; return 0; }
5872 EOF
5873 if { (eval echo configure:5874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5874   rm -rf conftest*
5875   eval "ac_cv_func_$ac_func=yes"
5876 else
5877   echo "configure: failed program was:" >&5
5878   cat conftest.$ac_ext >&5
5879   rm -rf conftest*
5880   eval "ac_cv_func_$ac_func=no"
5881 fi
5882 rm -f conftest*
5883 fi
5884
5885 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5886   echo "$ac_t""yes" 1>&6
5887     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5888   cat >> confdefs.h <<EOF
5889 #define $ac_tr_func 1
5890 EOF
5891  
5892 else
5893   echo "$ac_t""no" 1>&6
5894 fi
5895 done
5896
5897 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5898 do
5899 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5900 echo "configure:5901: checking for $ac_func" >&5
5901 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5902   echo $ac_n "(cached) $ac_c" 1>&6
5903 else
5904   cat > conftest.$ac_ext <<EOF
5905 #line 5906 "configure"
5906 #include "confdefs.h"
5907 /* System header to define __stub macros and hopefully few prototypes,
5908     which can conflict with char $ac_func(); below.  */
5909 #include <assert.h>
5910 /* Override any gcc2 internal prototype to avoid an error.  */
5911 /* We use char because int might match the return type of a gcc2
5912     builtin and then its argument prototype would still apply.  */
5913 char $ac_func();
5914
5915 int main() {
5916
5917 /* The GNU C library defines this for functions which it implements
5918     to always fail with ENOSYS.  Some functions are actually named
5919     something starting with __ and the normal name is an alias.  */
5920 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5921 choke me
5922 #else
5923 $ac_func();
5924 #endif
5925
5926 ; return 0; }
5927 EOF
5928 if { (eval echo configure:5929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5929   rm -rf conftest*
5930   eval "ac_cv_func_$ac_func=yes"
5931 else
5932   echo "configure: failed program was:" >&5
5933   cat conftest.$ac_ext >&5
5934   rm -rf conftest*
5935   eval "ac_cv_func_$ac_func=no"
5936 fi
5937 rm -f conftest*
5938 fi
5939
5940 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5941   echo "$ac_t""yes" 1>&6
5942     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5943   cat >> confdefs.h <<EOF
5944 #define $ac_tr_func 1
5945 EOF
5946  
5947 else
5948   echo "$ac_t""no" 1>&6
5949 fi
5950 done
5951
5952 for ac_func in __getcwd _getcwd
5953 do
5954 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5955 echo "configure:5956: checking for $ac_func" >&5
5956 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5957   echo $ac_n "(cached) $ac_c" 1>&6
5958 else
5959   cat > conftest.$ac_ext <<EOF
5960 #line 5961 "configure"
5961 #include "confdefs.h"
5962 /* System header to define __stub macros and hopefully few prototypes,
5963     which can conflict with char $ac_func(); below.  */
5964 #include <assert.h>
5965 /* Override any gcc2 internal prototype to avoid an error.  */
5966 /* We use char because int might match the return type of a gcc2
5967     builtin and then its argument prototype would still apply.  */
5968 char $ac_func();
5969
5970 int main() {
5971
5972 /* The GNU C library defines this for functions which it implements
5973     to always fail with ENOSYS.  Some functions are actually named
5974     something starting with __ and the normal name is an alias.  */
5975 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5976 choke me
5977 #else
5978 $ac_func();
5979 #endif
5980
5981 ; return 0; }
5982 EOF
5983 if { (eval echo configure:5984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5984   rm -rf conftest*
5985   eval "ac_cv_func_$ac_func=yes"
5986 else
5987   echo "configure: failed program was:" >&5
5988   cat conftest.$ac_ext >&5
5989   rm -rf conftest*
5990   eval "ac_cv_func_$ac_func=no"
5991 fi
5992 rm -f conftest*
5993 fi
5994
5995 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5996   echo "$ac_t""yes" 1>&6
5997     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5998   cat >> confdefs.h <<EOF
5999 #define $ac_tr_func 1
6000 EOF
6001  
6002 else
6003   echo "$ac_t""no" 1>&6
6004 fi
6005 done
6006
6007 for ac_func in __xstat __fxstat __lxstat
6008 do
6009 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6010 echo "configure:6011: checking for $ac_func" >&5
6011 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6012   echo $ac_n "(cached) $ac_c" 1>&6
6013 else
6014   cat > conftest.$ac_ext <<EOF
6015 #line 6016 "configure"
6016 #include "confdefs.h"
6017 /* System header to define __stub macros and hopefully few prototypes,
6018     which can conflict with char $ac_func(); below.  */
6019 #include <assert.h>
6020 /* Override any gcc2 internal prototype to avoid an error.  */
6021 /* We use char because int might match the return type of a gcc2
6022     builtin and then its argument prototype would still apply.  */
6023 char $ac_func();
6024
6025 int main() {
6026
6027 /* The GNU C library defines this for functions which it implements
6028     to always fail with ENOSYS.  Some functions are actually named
6029     something starting with __ and the normal name is an alias.  */
6030 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6031 choke me
6032 #else
6033 $ac_func();
6034 #endif
6035
6036 ; return 0; }
6037 EOF
6038 if { (eval echo configure:6039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6039   rm -rf conftest*
6040   eval "ac_cv_func_$ac_func=yes"
6041 else
6042   echo "configure: failed program was:" >&5
6043   cat conftest.$ac_ext >&5
6044   rm -rf conftest*
6045   eval "ac_cv_func_$ac_func=no"
6046 fi
6047 rm -f conftest*
6048 fi
6049
6050 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6051   echo "$ac_t""yes" 1>&6
6052     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6053   cat >> confdefs.h <<EOF
6054 #define $ac_tr_func 1
6055 EOF
6056  
6057 else
6058   echo "$ac_t""no" 1>&6
6059 fi
6060 done
6061
6062 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6063 do
6064 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6065 echo "configure:6066: checking for $ac_func" >&5
6066 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6067   echo $ac_n "(cached) $ac_c" 1>&6
6068 else
6069   cat > conftest.$ac_ext <<EOF
6070 #line 6071 "configure"
6071 #include "confdefs.h"
6072 /* System header to define __stub macros and hopefully few prototypes,
6073     which can conflict with char $ac_func(); below.  */
6074 #include <assert.h>
6075 /* Override any gcc2 internal prototype to avoid an error.  */
6076 /* We use char because int might match the return type of a gcc2
6077     builtin and then its argument prototype would still apply.  */
6078 char $ac_func();
6079
6080 int main() {
6081
6082 /* The GNU C library defines this for functions which it implements
6083     to always fail with ENOSYS.  Some functions are actually named
6084     something starting with __ and the normal name is an alias.  */
6085 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6086 choke me
6087 #else
6088 $ac_func();
6089 #endif
6090
6091 ; return 0; }
6092 EOF
6093 if { (eval echo configure:6094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6094   rm -rf conftest*
6095   eval "ac_cv_func_$ac_func=yes"
6096 else
6097   echo "configure: failed program was:" >&5
6098   cat conftest.$ac_ext >&5
6099   rm -rf conftest*
6100   eval "ac_cv_func_$ac_func=no"
6101 fi
6102 rm -f conftest*
6103 fi
6104
6105 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6106   echo "$ac_t""yes" 1>&6
6107     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6108   cat >> confdefs.h <<EOF
6109 #define $ac_tr_func 1
6110 EOF
6111  
6112 else
6113   echo "$ac_t""no" 1>&6
6114 fi
6115 done
6116
6117 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6118 do
6119 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6120 echo "configure:6121: checking for $ac_func" >&5
6121 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6122   echo $ac_n "(cached) $ac_c" 1>&6
6123 else
6124   cat > conftest.$ac_ext <<EOF
6125 #line 6126 "configure"
6126 #include "confdefs.h"
6127 /* System header to define __stub macros and hopefully few prototypes,
6128     which can conflict with char $ac_func(); below.  */
6129 #include <assert.h>
6130 /* Override any gcc2 internal prototype to avoid an error.  */
6131 /* We use char because int might match the return type of a gcc2
6132     builtin and then its argument prototype would still apply.  */
6133 char $ac_func();
6134
6135 int main() {
6136
6137 /* The GNU C library defines this for functions which it implements
6138     to always fail with ENOSYS.  Some functions are actually named
6139     something starting with __ and the normal name is an alias.  */
6140 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6141 choke me
6142 #else
6143 $ac_func();
6144 #endif
6145
6146 ; return 0; }
6147 EOF
6148 if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6149   rm -rf conftest*
6150   eval "ac_cv_func_$ac_func=yes"
6151 else
6152   echo "configure: failed program was:" >&5
6153   cat conftest.$ac_ext >&5
6154   rm -rf conftest*
6155   eval "ac_cv_func_$ac_func=no"
6156 fi
6157 rm -f conftest*
6158 fi
6159
6160 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6161   echo "$ac_t""yes" 1>&6
6162     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6163   cat >> confdefs.h <<EOF
6164 #define $ac_tr_func 1
6165 EOF
6166  
6167 else
6168   echo "$ac_t""no" 1>&6
6169 fi
6170 done
6171
6172 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6173 do
6174 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6175 echo "configure:6176: checking for $ac_func" >&5
6176 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6177   echo $ac_n "(cached) $ac_c" 1>&6
6178 else
6179   cat > conftest.$ac_ext <<EOF
6180 #line 6181 "configure"
6181 #include "confdefs.h"
6182 /* System header to define __stub macros and hopefully few prototypes,
6183     which can conflict with char $ac_func(); below.  */
6184 #include <assert.h>
6185 /* Override any gcc2 internal prototype to avoid an error.  */
6186 /* We use char because int might match the return type of a gcc2
6187     builtin and then its argument prototype would still apply.  */
6188 char $ac_func();
6189
6190 int main() {
6191
6192 /* The GNU C library defines this for functions which it implements
6193     to always fail with ENOSYS.  Some functions are actually named
6194     something starting with __ and the normal name is an alias.  */
6195 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6196 choke me
6197 #else
6198 $ac_func();
6199 #endif
6200
6201 ; return 0; }
6202 EOF
6203 if { (eval echo configure:6204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6204   rm -rf conftest*
6205   eval "ac_cv_func_$ac_func=yes"
6206 else
6207   echo "configure: failed program was:" >&5
6208   cat conftest.$ac_ext >&5
6209   rm -rf conftest*
6210   eval "ac_cv_func_$ac_func=no"
6211 fi
6212 rm -f conftest*
6213 fi
6214
6215 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6216   echo "$ac_t""yes" 1>&6
6217     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6218   cat >> confdefs.h <<EOF
6219 #define $ac_tr_func 1
6220 EOF
6221  
6222 else
6223   echo "$ac_t""no" 1>&6
6224 fi
6225 done
6226
6227 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6228 do
6229 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6230 echo "configure:6231: checking for $ac_func" >&5
6231 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6232   echo $ac_n "(cached) $ac_c" 1>&6
6233 else
6234   cat > conftest.$ac_ext <<EOF
6235 #line 6236 "configure"
6236 #include "confdefs.h"
6237 /* System header to define __stub macros and hopefully few prototypes,
6238     which can conflict with char $ac_func(); below.  */
6239 #include <assert.h>
6240 /* Override any gcc2 internal prototype to avoid an error.  */
6241 /* We use char because int might match the return type of a gcc2
6242     builtin and then its argument prototype would still apply.  */
6243 char $ac_func();
6244
6245 int main() {
6246
6247 /* The GNU C library defines this for functions which it implements
6248     to always fail with ENOSYS.  Some functions are actually named
6249     something starting with __ and the normal name is an alias.  */
6250 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6251 choke me
6252 #else
6253 $ac_func();
6254 #endif
6255
6256 ; return 0; }
6257 EOF
6258 if { (eval echo configure:6259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6259   rm -rf conftest*
6260   eval "ac_cv_func_$ac_func=yes"
6261 else
6262   echo "configure: failed program was:" >&5
6263   cat conftest.$ac_ext >&5
6264   rm -rf conftest*
6265   eval "ac_cv_func_$ac_func=no"
6266 fi
6267 rm -f conftest*
6268 fi
6269
6270 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6271   echo "$ac_t""yes" 1>&6
6272     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6273   cat >> confdefs.h <<EOF
6274 #define $ac_tr_func 1
6275 EOF
6276  
6277 else
6278   echo "$ac_t""no" 1>&6
6279 fi
6280 done
6281
6282 for ac_func in _write __write _fork __fork
6283 do
6284 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6285 echo "configure:6286: checking for $ac_func" >&5
6286 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6287   echo $ac_n "(cached) $ac_c" 1>&6
6288 else
6289   cat > conftest.$ac_ext <<EOF
6290 #line 6291 "configure"
6291 #include "confdefs.h"
6292 /* System header to define __stub macros and hopefully few prototypes,
6293     which can conflict with char $ac_func(); below.  */
6294 #include <assert.h>
6295 /* Override any gcc2 internal prototype to avoid an error.  */
6296 /* We use char because int might match the return type of a gcc2
6297     builtin and then its argument prototype would still apply.  */
6298 char $ac_func();
6299
6300 int main() {
6301
6302 /* The GNU C library defines this for functions which it implements
6303     to always fail with ENOSYS.  Some functions are actually named
6304     something starting with __ and the normal name is an alias.  */
6305 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6306 choke me
6307 #else
6308 $ac_func();
6309 #endif
6310
6311 ; return 0; }
6312 EOF
6313 if { (eval echo configure:6314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6314   rm -rf conftest*
6315   eval "ac_cv_func_$ac_func=yes"
6316 else
6317   echo "configure: failed program was:" >&5
6318   cat conftest.$ac_ext >&5
6319   rm -rf conftest*
6320   eval "ac_cv_func_$ac_func=no"
6321 fi
6322 rm -f conftest*
6323 fi
6324
6325 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6326   echo "$ac_t""yes" 1>&6
6327     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6328   cat >> confdefs.h <<EOF
6329 #define $ac_tr_func 1
6330 EOF
6331  
6332 else
6333   echo "$ac_t""no" 1>&6
6334 fi
6335 done
6336
6337 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6338 do
6339 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6340 echo "configure:6341: checking for $ac_func" >&5
6341 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6342   echo $ac_n "(cached) $ac_c" 1>&6
6343 else
6344   cat > conftest.$ac_ext <<EOF
6345 #line 6346 "configure"
6346 #include "confdefs.h"
6347 /* System header to define __stub macros and hopefully few prototypes,
6348     which can conflict with char $ac_func(); below.  */
6349 #include <assert.h>
6350 /* Override any gcc2 internal prototype to avoid an error.  */
6351 /* We use char because int might match the return type of a gcc2
6352     builtin and then its argument prototype would still apply.  */
6353 char $ac_func();
6354
6355 int main() {
6356
6357 /* The GNU C library defines this for functions which it implements
6358     to always fail with ENOSYS.  Some functions are actually named
6359     something starting with __ and the normal name is an alias.  */
6360 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6361 choke me
6362 #else
6363 $ac_func();
6364 #endif
6365
6366 ; return 0; }
6367 EOF
6368 if { (eval echo configure:6369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6369   rm -rf conftest*
6370   eval "ac_cv_func_$ac_func=yes"
6371 else
6372   echo "configure: failed program was:" >&5
6373   cat conftest.$ac_ext >&5
6374   rm -rf conftest*
6375   eval "ac_cv_func_$ac_func=no"
6376 fi
6377 rm -f conftest*
6378 fi
6379
6380 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6381   echo "$ac_t""yes" 1>&6
6382     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6383   cat >> confdefs.h <<EOF
6384 #define $ac_tr_func 1
6385 EOF
6386  
6387 else
6388   echo "$ac_t""no" 1>&6
6389 fi
6390 done
6391
6392 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6393 do
6394 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6395 echo "configure:6396: checking for $ac_func" >&5
6396 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6397   echo $ac_n "(cached) $ac_c" 1>&6
6398 else
6399   cat > conftest.$ac_ext <<EOF
6400 #line 6401 "configure"
6401 #include "confdefs.h"
6402 /* System header to define __stub macros and hopefully few prototypes,
6403     which can conflict with char $ac_func(); below.  */
6404 #include <assert.h>
6405 /* Override any gcc2 internal prototype to avoid an error.  */
6406 /* We use char because int might match the return type of a gcc2
6407     builtin and then its argument prototype would still apply.  */
6408 char $ac_func();
6409
6410 int main() {
6411
6412 /* The GNU C library defines this for functions which it implements
6413     to always fail with ENOSYS.  Some functions are actually named
6414     something starting with __ and the normal name is an alias.  */
6415 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6416 choke me
6417 #else
6418 $ac_func();
6419 #endif
6420
6421 ; return 0; }
6422 EOF
6423 if { (eval echo configure:6424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6424   rm -rf conftest*
6425   eval "ac_cv_func_$ac_func=yes"
6426 else
6427   echo "configure: failed program was:" >&5
6428   cat conftest.$ac_ext >&5
6429   rm -rf conftest*
6430   eval "ac_cv_func_$ac_func=no"
6431 fi
6432 rm -f conftest*
6433 fi
6434
6435 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6436   echo "$ac_t""yes" 1>&6
6437     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6438   cat >> confdefs.h <<EOF
6439 #define $ac_tr_func 1
6440 EOF
6441  
6442 else
6443   echo "$ac_t""no" 1>&6
6444 fi
6445 done
6446
6447 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6448 do
6449 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6450 echo "configure:6451: checking for $ac_func" >&5
6451 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6452   echo $ac_n "(cached) $ac_c" 1>&6
6453 else
6454   cat > conftest.$ac_ext <<EOF
6455 #line 6456 "configure"
6456 #include "confdefs.h"
6457 /* System header to define __stub macros and hopefully few prototypes,
6458     which can conflict with char $ac_func(); below.  */
6459 #include <assert.h>
6460 /* Override any gcc2 internal prototype to avoid an error.  */
6461 /* We use char because int might match the return type of a gcc2
6462     builtin and then its argument prototype would still apply.  */
6463 char $ac_func();
6464
6465 int main() {
6466
6467 /* The GNU C library defines this for functions which it implements
6468     to always fail with ENOSYS.  Some functions are actually named
6469     something starting with __ and the normal name is an alias.  */
6470 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6471 choke me
6472 #else
6473 $ac_func();
6474 #endif
6475
6476 ; return 0; }
6477 EOF
6478 if { (eval echo configure:6479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6479   rm -rf conftest*
6480   eval "ac_cv_func_$ac_func=yes"
6481 else
6482   echo "configure: failed program was:" >&5
6483   cat conftest.$ac_ext >&5
6484   rm -rf conftest*
6485   eval "ac_cv_func_$ac_func=no"
6486 fi
6487 rm -f conftest*
6488 fi
6489
6490 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6491   echo "$ac_t""yes" 1>&6
6492     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6493   cat >> confdefs.h <<EOF
6494 #define $ac_tr_func 1
6495 EOF
6496  
6497 else
6498   echo "$ac_t""no" 1>&6
6499 fi
6500 done
6501
6502 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6503 do
6504 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6505 echo "configure:6506: checking for $ac_func" >&5
6506 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6507   echo $ac_n "(cached) $ac_c" 1>&6
6508 else
6509   cat > conftest.$ac_ext <<EOF
6510 #line 6511 "configure"
6511 #include "confdefs.h"
6512 /* System header to define __stub macros and hopefully few prototypes,
6513     which can conflict with char $ac_func(); below.  */
6514 #include <assert.h>
6515 /* Override any gcc2 internal prototype to avoid an error.  */
6516 /* We use char because int might match the return type of a gcc2
6517     builtin and then its argument prototype would still apply.  */
6518 char $ac_func();
6519
6520 int main() {
6521
6522 /* The GNU C library defines this for functions which it implements
6523     to always fail with ENOSYS.  Some functions are actually named
6524     something starting with __ and the normal name is an alias.  */
6525 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6526 choke me
6527 #else
6528 $ac_func();
6529 #endif
6530
6531 ; return 0; }
6532 EOF
6533 if { (eval echo configure:6534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6534   rm -rf conftest*
6535   eval "ac_cv_func_$ac_func=yes"
6536 else
6537   echo "configure: failed program was:" >&5
6538   cat conftest.$ac_ext >&5
6539   rm -rf conftest*
6540   eval "ac_cv_func_$ac_func=no"
6541 fi
6542 rm -f conftest*
6543 fi
6544
6545 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6546   echo "$ac_t""yes" 1>&6
6547     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6548   cat >> confdefs.h <<EOF
6549 #define $ac_tr_func 1
6550 EOF
6551  
6552 else
6553   echo "$ac_t""no" 1>&6
6554 fi
6555 done
6556
6557 for ac_func in open64 _open64 __open64 creat64
6558 do
6559 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6560 echo "configure:6561: checking for $ac_func" >&5
6561 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6562   echo $ac_n "(cached) $ac_c" 1>&6
6563 else
6564   cat > conftest.$ac_ext <<EOF
6565 #line 6566 "configure"
6566 #include "confdefs.h"
6567 /* System header to define __stub macros and hopefully few prototypes,
6568     which can conflict with char $ac_func(); below.  */
6569 #include <assert.h>
6570 /* Override any gcc2 internal prototype to avoid an error.  */
6571 /* We use char because int might match the return type of a gcc2
6572     builtin and then its argument prototype would still apply.  */
6573 char $ac_func();
6574
6575 int main() {
6576
6577 /* The GNU C library defines this for functions which it implements
6578     to always fail with ENOSYS.  Some functions are actually named
6579     something starting with __ and the normal name is an alias.  */
6580 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6581 choke me
6582 #else
6583 $ac_func();
6584 #endif
6585
6586 ; return 0; }
6587 EOF
6588 if { (eval echo configure:6589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6589   rm -rf conftest*
6590   eval "ac_cv_func_$ac_func=yes"
6591 else
6592   echo "configure: failed program was:" >&5
6593   cat conftest.$ac_ext >&5
6594   rm -rf conftest*
6595   eval "ac_cv_func_$ac_func=no"
6596 fi
6597 rm -f conftest*
6598 fi
6599
6600 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6601   echo "$ac_t""yes" 1>&6
6602     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6603   cat >> confdefs.h <<EOF
6604 #define $ac_tr_func 1
6605 EOF
6606  
6607 else
6608   echo "$ac_t""no" 1>&6
6609 fi
6610 done
6611
6612
6613 #
6614 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6615 #
6616
6617 if test x$ac_cv_func_stat64 = xno ; then
6618   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6619 echo "configure:6620: checking for stat64 in <sys/stat.h>" >&5
6620   cat > conftest.$ac_ext <<EOF
6621 #line 6622 "configure"
6622 #include "confdefs.h"
6623
6624 #if defined(HAVE_UNISTD_H)
6625 #include <unistd.h>
6626 #endif
6627 #include <sys/stat.h>
6628
6629 int main() {
6630 struct stat64 st64; exit(stat64(".",&st64));
6631 ; return 0; }
6632 EOF
6633 if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6634   rm -rf conftest*
6635   ac_cv_func_stat64=yes
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639 fi
6640 rm -f conftest*
6641   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6642   if test x$ac_cv_func_stat64 = xyes ; then
6643     cat >> confdefs.h <<\EOF
6644 #define HAVE_STAT64 1
6645 EOF
6646
6647   fi
6648 fi
6649
6650 if test x$ac_cv_func_lstat64 = xno ; then
6651   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6652 echo "configure:6653: checking for lstat64 in <sys/stat.h>" >&5
6653   cat > conftest.$ac_ext <<EOF
6654 #line 6655 "configure"
6655 #include "confdefs.h"
6656
6657 #if defined(HAVE_UNISTD_H)
6658 #include <unistd.h>
6659 #endif
6660 #include <sys/stat.h>
6661
6662 int main() {
6663 struct stat64 st64; exit(lstat64(".",&st64));
6664 ; return 0; }
6665 EOF
6666 if { (eval echo configure:6667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6667   rm -rf conftest*
6668   ac_cv_func_lstat64=yes
6669 else
6670   echo "configure: failed program was:" >&5
6671   cat conftest.$ac_ext >&5
6672 fi
6673 rm -f conftest*
6674   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6675   if test x$ac_cv_func_lstat64 = xyes ; then
6676     cat >> confdefs.h <<\EOF
6677 #define HAVE_LSTAT64 1
6678 EOF
6679
6680   fi
6681 fi
6682
6683 if test x$ac_cv_func_fstat64 = xno ; then
6684   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6685 echo "configure:6686: checking for fstat64 in <sys/stat.h>" >&5
6686   cat > conftest.$ac_ext <<EOF
6687 #line 6688 "configure"
6688 #include "confdefs.h"
6689
6690 #if defined(HAVE_UNISTD_H)
6691 #include <unistd.h>
6692 #endif
6693 #include <sys/stat.h>
6694
6695 int main() {
6696 struct stat64 st64; exit(fstat64(0,&st64));
6697 ; return 0; }
6698 EOF
6699 if { (eval echo configure:6700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6700   rm -rf conftest*
6701   ac_cv_func_fstat64=yes
6702 else
6703   echo "configure: failed program was:" >&5
6704   cat conftest.$ac_ext >&5
6705 fi
6706 rm -f conftest*
6707   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6708   if test x$ac_cv_func_fstat64 = xyes ; then
6709     cat >> confdefs.h <<\EOF
6710 #define HAVE_FSTAT64 1
6711 EOF
6712
6713   fi
6714 fi
6715
6716 #####################################
6717 # we might need the resolv library on some systems
6718 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6719 echo "configure:6720: checking for dn_expand in -lresolv" >&5
6720 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6721 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6722   echo $ac_n "(cached) $ac_c" 1>&6
6723 else
6724   ac_save_LIBS="$LIBS"
6725 LIBS="-lresolv  $LIBS"
6726 cat > conftest.$ac_ext <<EOF
6727 #line 6728 "configure"
6728 #include "confdefs.h"
6729 /* Override any gcc2 internal prototype to avoid an error.  */
6730 /* We use char because int might match the return type of a gcc2
6731     builtin and then its argument prototype would still apply.  */
6732 char dn_expand();
6733
6734 int main() {
6735 dn_expand()
6736 ; return 0; }
6737 EOF
6738 if { (eval echo configure:6739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6739   rm -rf conftest*
6740   eval "ac_cv_lib_$ac_lib_var=yes"
6741 else
6742   echo "configure: failed program was:" >&5
6743   cat conftest.$ac_ext >&5
6744   rm -rf conftest*
6745   eval "ac_cv_lib_$ac_lib_var=no"
6746 fi
6747 rm -f conftest*
6748 LIBS="$ac_save_LIBS"
6749
6750 fi
6751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6752   echo "$ac_t""yes" 1>&6
6753     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6754     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6755   cat >> confdefs.h <<EOF
6756 #define $ac_tr_lib 1
6757 EOF
6758
6759   LIBS="-lresolv $LIBS"
6760
6761 else
6762   echo "$ac_t""no" 1>&6
6763 fi
6764
6765
6766 #
6767 # Check for the functions putprpwnam, set_auth_parameters,
6768 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6769 # Needed for OSF1 and HPUX.
6770 #
6771
6772 case "$LIBS" in
6773   *-lsecurity*) for ac_func in putprpwnam
6774 do
6775 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6776 echo "configure:6777: checking for $ac_func" >&5
6777 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6778   echo $ac_n "(cached) $ac_c" 1>&6
6779 else
6780   cat > conftest.$ac_ext <<EOF
6781 #line 6782 "configure"
6782 #include "confdefs.h"
6783 /* System header to define __stub macros and hopefully few prototypes,
6784     which can conflict with char $ac_func(); below.  */
6785 #include <assert.h>
6786 /* Override any gcc2 internal prototype to avoid an error.  */
6787 /* We use char because int might match the return type of a gcc2
6788     builtin and then its argument prototype would still apply.  */
6789 char $ac_func();
6790
6791 int main() {
6792
6793 /* The GNU C library defines this for functions which it implements
6794     to always fail with ENOSYS.  Some functions are actually named
6795     something starting with __ and the normal name is an alias.  */
6796 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6797 choke me
6798 #else
6799 $ac_func();
6800 #endif
6801
6802 ; return 0; }
6803 EOF
6804 if { (eval echo configure:6805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6805   rm -rf conftest*
6806   eval "ac_cv_func_$ac_func=yes"
6807 else
6808   echo "configure: failed program was:" >&5
6809   cat conftest.$ac_ext >&5
6810   rm -rf conftest*
6811   eval "ac_cv_func_$ac_func=no"
6812 fi
6813 rm -f conftest*
6814 fi
6815
6816 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6817   echo "$ac_t""yes" 1>&6
6818     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6819   cat >> confdefs.h <<EOF
6820 #define $ac_tr_func 1
6821 EOF
6822  
6823 else
6824   echo "$ac_t""no" 1>&6
6825 fi
6826 done
6827  ;;
6828   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6829 echo "configure:6830: checking for putprpwnam in -lsecurity" >&5
6830 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6831 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6832   echo $ac_n "(cached) $ac_c" 1>&6
6833 else
6834   ac_save_LIBS="$LIBS"
6835 LIBS="-lsecurity  $LIBS"
6836 cat > conftest.$ac_ext <<EOF
6837 #line 6838 "configure"
6838 #include "confdefs.h"
6839 /* Override any gcc2 internal prototype to avoid an error.  */
6840 /* We use char because int might match the return type of a gcc2
6841     builtin and then its argument prototype would still apply.  */
6842 char putprpwnam();
6843
6844 int main() {
6845 putprpwnam()
6846 ; return 0; }
6847 EOF
6848 if { (eval echo configure:6849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6849   rm -rf conftest*
6850   eval "ac_cv_lib_$ac_lib_var=yes"
6851 else
6852   echo "configure: failed program was:" >&5
6853   cat conftest.$ac_ext >&5
6854   rm -rf conftest*
6855   eval "ac_cv_lib_$ac_lib_var=no"
6856 fi
6857 rm -f conftest*
6858 LIBS="$ac_save_LIBS"
6859
6860 fi
6861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6862   echo "$ac_t""yes" 1>&6
6863     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6864     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6865   cat >> confdefs.h <<EOF
6866 #define $ac_tr_lib 1
6867 EOF
6868
6869   LIBS="-lsecurity $LIBS"
6870
6871 else
6872   echo "$ac_t""no" 1>&6
6873 fi
6874  
6875      for ac_func in putprpwnam
6876 do
6877 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6878 echo "configure:6879: checking for $ac_func" >&5
6879 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6880   echo $ac_n "(cached) $ac_c" 1>&6
6881 else
6882   cat > conftest.$ac_ext <<EOF
6883 #line 6884 "configure"
6884 #include "confdefs.h"
6885 /* System header to define __stub macros and hopefully few prototypes,
6886     which can conflict with char $ac_func(); below.  */
6887 #include <assert.h>
6888 /* Override any gcc2 internal prototype to avoid an error.  */
6889 /* We use char because int might match the return type of a gcc2
6890     builtin and then its argument prototype would still apply.  */
6891 char $ac_func();
6892
6893 int main() {
6894
6895 /* The GNU C library defines this for functions which it implements
6896     to always fail with ENOSYS.  Some functions are actually named
6897     something starting with __ and the normal name is an alias.  */
6898 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6899 choke me
6900 #else
6901 $ac_func();
6902 #endif
6903
6904 ; return 0; }
6905 EOF
6906 if { (eval echo configure:6907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6907   rm -rf conftest*
6908   eval "ac_cv_func_$ac_func=yes"
6909 else
6910   echo "configure: failed program was:" >&5
6911   cat conftest.$ac_ext >&5
6912   rm -rf conftest*
6913   eval "ac_cv_func_$ac_func=no"
6914 fi
6915 rm -f conftest*
6916 fi
6917
6918 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6919   echo "$ac_t""yes" 1>&6
6920     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6921   cat >> confdefs.h <<EOF
6922 #define $ac_tr_func 1
6923 EOF
6924  
6925 else
6926   echo "$ac_t""no" 1>&6
6927 fi
6928 done
6929
6930   ;;
6931   esac
6932
6933 case "$LIBS" in
6934   *-lsec*) for ac_func in putprpwnam
6935 do
6936 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6937 echo "configure:6938: checking for $ac_func" >&5
6938 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6939   echo $ac_n "(cached) $ac_c" 1>&6
6940 else
6941   cat > conftest.$ac_ext <<EOF
6942 #line 6943 "configure"
6943 #include "confdefs.h"
6944 /* System header to define __stub macros and hopefully few prototypes,
6945     which can conflict with char $ac_func(); below.  */
6946 #include <assert.h>
6947 /* Override any gcc2 internal prototype to avoid an error.  */
6948 /* We use char because int might match the return type of a gcc2
6949     builtin and then its argument prototype would still apply.  */
6950 char $ac_func();
6951
6952 int main() {
6953
6954 /* The GNU C library defines this for functions which it implements
6955     to always fail with ENOSYS.  Some functions are actually named
6956     something starting with __ and the normal name is an alias.  */
6957 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6958 choke me
6959 #else
6960 $ac_func();
6961 #endif
6962
6963 ; return 0; }
6964 EOF
6965 if { (eval echo configure:6966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6966   rm -rf conftest*
6967   eval "ac_cv_func_$ac_func=yes"
6968 else
6969   echo "configure: failed program was:" >&5
6970   cat conftest.$ac_ext >&5
6971   rm -rf conftest*
6972   eval "ac_cv_func_$ac_func=no"
6973 fi
6974 rm -f conftest*
6975 fi
6976
6977 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6978   echo "$ac_t""yes" 1>&6
6979     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6980   cat >> confdefs.h <<EOF
6981 #define $ac_tr_func 1
6982 EOF
6983  
6984 else
6985   echo "$ac_t""no" 1>&6
6986 fi
6987 done
6988  ;;
6989   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6990 echo "configure:6991: checking for putprpwnam in -lsec" >&5
6991 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6992 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6993   echo $ac_n "(cached) $ac_c" 1>&6
6994 else
6995   ac_save_LIBS="$LIBS"
6996 LIBS="-lsec  $LIBS"
6997 cat > conftest.$ac_ext <<EOF
6998 #line 6999 "configure"
6999 #include "confdefs.h"
7000 /* Override any gcc2 internal prototype to avoid an error.  */
7001 /* We use char because int might match the return type of a gcc2
7002     builtin and then its argument prototype would still apply.  */
7003 char putprpwnam();
7004
7005 int main() {
7006 putprpwnam()
7007 ; return 0; }
7008 EOF
7009 if { (eval echo configure:7010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7010   rm -rf conftest*
7011   eval "ac_cv_lib_$ac_lib_var=yes"
7012 else
7013   echo "configure: failed program was:" >&5
7014   cat conftest.$ac_ext >&5
7015   rm -rf conftest*
7016   eval "ac_cv_lib_$ac_lib_var=no"
7017 fi
7018 rm -f conftest*
7019 LIBS="$ac_save_LIBS"
7020
7021 fi
7022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7023   echo "$ac_t""yes" 1>&6
7024     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7025     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7026   cat >> confdefs.h <<EOF
7027 #define $ac_tr_lib 1
7028 EOF
7029
7030   LIBS="-lsec $LIBS"
7031
7032 else
7033   echo "$ac_t""no" 1>&6
7034 fi
7035  
7036      for ac_func in putprpwnam
7037 do
7038 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7039 echo "configure:7040: checking for $ac_func" >&5
7040 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7041   echo $ac_n "(cached) $ac_c" 1>&6
7042 else
7043   cat > conftest.$ac_ext <<EOF
7044 #line 7045 "configure"
7045 #include "confdefs.h"
7046 /* System header to define __stub macros and hopefully few prototypes,
7047     which can conflict with char $ac_func(); below.  */
7048 #include <assert.h>
7049 /* Override any gcc2 internal prototype to avoid an error.  */
7050 /* We use char because int might match the return type of a gcc2
7051     builtin and then its argument prototype would still apply.  */
7052 char $ac_func();
7053
7054 int main() {
7055
7056 /* The GNU C library defines this for functions which it implements
7057     to always fail with ENOSYS.  Some functions are actually named
7058     something starting with __ and the normal name is an alias.  */
7059 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7060 choke me
7061 #else
7062 $ac_func();
7063 #endif
7064
7065 ; return 0; }
7066 EOF
7067 if { (eval echo configure:7068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7068   rm -rf conftest*
7069   eval "ac_cv_func_$ac_func=yes"
7070 else
7071   echo "configure: failed program was:" >&5
7072   cat conftest.$ac_ext >&5
7073   rm -rf conftest*
7074   eval "ac_cv_func_$ac_func=no"
7075 fi
7076 rm -f conftest*
7077 fi
7078
7079 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7080   echo "$ac_t""yes" 1>&6
7081     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7082   cat >> confdefs.h <<EOF
7083 #define $ac_tr_func 1
7084 EOF
7085  
7086 else
7087   echo "$ac_t""no" 1>&6
7088 fi
7089 done
7090
7091   ;;
7092   esac
7093
7094
7095 case "$LIBS" in
7096   *-lsecurity*) for ac_func in set_auth_parameters
7097 do
7098 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7099 echo "configure:7100: checking for $ac_func" >&5
7100 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7101   echo $ac_n "(cached) $ac_c" 1>&6
7102 else
7103   cat > conftest.$ac_ext <<EOF
7104 #line 7105 "configure"
7105 #include "confdefs.h"
7106 /* System header to define __stub macros and hopefully few prototypes,
7107     which can conflict with char $ac_func(); below.  */
7108 #include <assert.h>
7109 /* Override any gcc2 internal prototype to avoid an error.  */
7110 /* We use char because int might match the return type of a gcc2
7111     builtin and then its argument prototype would still apply.  */
7112 char $ac_func();
7113
7114 int main() {
7115
7116 /* The GNU C library defines this for functions which it implements
7117     to always fail with ENOSYS.  Some functions are actually named
7118     something starting with __ and the normal name is an alias.  */
7119 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7120 choke me
7121 #else
7122 $ac_func();
7123 #endif
7124
7125 ; return 0; }
7126 EOF
7127 if { (eval echo configure:7128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7128   rm -rf conftest*
7129   eval "ac_cv_func_$ac_func=yes"
7130 else
7131   echo "configure: failed program was:" >&5
7132   cat conftest.$ac_ext >&5
7133   rm -rf conftest*
7134   eval "ac_cv_func_$ac_func=no"
7135 fi
7136 rm -f conftest*
7137 fi
7138
7139 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7140   echo "$ac_t""yes" 1>&6
7141     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7142   cat >> confdefs.h <<EOF
7143 #define $ac_tr_func 1
7144 EOF
7145  
7146 else
7147   echo "$ac_t""no" 1>&6
7148 fi
7149 done
7150  ;;
7151   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7152 echo "configure:7153: checking for set_auth_parameters in -lsecurity" >&5
7153 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7154 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7155   echo $ac_n "(cached) $ac_c" 1>&6
7156 else
7157   ac_save_LIBS="$LIBS"
7158 LIBS="-lsecurity  $LIBS"
7159 cat > conftest.$ac_ext <<EOF
7160 #line 7161 "configure"
7161 #include "confdefs.h"
7162 /* Override any gcc2 internal prototype to avoid an error.  */
7163 /* We use char because int might match the return type of a gcc2
7164     builtin and then its argument prototype would still apply.  */
7165 char set_auth_parameters();
7166
7167 int main() {
7168 set_auth_parameters()
7169 ; return 0; }
7170 EOF
7171 if { (eval echo configure:7172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7172   rm -rf conftest*
7173   eval "ac_cv_lib_$ac_lib_var=yes"
7174 else
7175   echo "configure: failed program was:" >&5
7176   cat conftest.$ac_ext >&5
7177   rm -rf conftest*
7178   eval "ac_cv_lib_$ac_lib_var=no"
7179 fi
7180 rm -f conftest*
7181 LIBS="$ac_save_LIBS"
7182
7183 fi
7184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7185   echo "$ac_t""yes" 1>&6
7186     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7187     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7188   cat >> confdefs.h <<EOF
7189 #define $ac_tr_lib 1
7190 EOF
7191
7192   LIBS="-lsecurity $LIBS"
7193
7194 else
7195   echo "$ac_t""no" 1>&6
7196 fi
7197  
7198      for ac_func in set_auth_parameters
7199 do
7200 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7201 echo "configure:7202: checking for $ac_func" >&5
7202 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7203   echo $ac_n "(cached) $ac_c" 1>&6
7204 else
7205   cat > conftest.$ac_ext <<EOF
7206 #line 7207 "configure"
7207 #include "confdefs.h"
7208 /* System header to define __stub macros and hopefully few prototypes,
7209     which can conflict with char $ac_func(); below.  */
7210 #include <assert.h>
7211 /* Override any gcc2 internal prototype to avoid an error.  */
7212 /* We use char because int might match the return type of a gcc2
7213     builtin and then its argument prototype would still apply.  */
7214 char $ac_func();
7215
7216 int main() {
7217
7218 /* The GNU C library defines this for functions which it implements
7219     to always fail with ENOSYS.  Some functions are actually named
7220     something starting with __ and the normal name is an alias.  */
7221 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7222 choke me
7223 #else
7224 $ac_func();
7225 #endif
7226
7227 ; return 0; }
7228 EOF
7229 if { (eval echo configure:7230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7230   rm -rf conftest*
7231   eval "ac_cv_func_$ac_func=yes"
7232 else
7233   echo "configure: failed program was:" >&5
7234   cat conftest.$ac_ext >&5
7235   rm -rf conftest*
7236   eval "ac_cv_func_$ac_func=no"
7237 fi
7238 rm -f conftest*
7239 fi
7240
7241 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7242   echo "$ac_t""yes" 1>&6
7243     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7244   cat >> confdefs.h <<EOF
7245 #define $ac_tr_func 1
7246 EOF
7247  
7248 else
7249   echo "$ac_t""no" 1>&6
7250 fi
7251 done
7252
7253   ;;
7254   esac
7255
7256 case "$LIBS" in
7257   *-lsec*) for ac_func in set_auth_parameters
7258 do
7259 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7260 echo "configure:7261: checking for $ac_func" >&5
7261 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7262   echo $ac_n "(cached) $ac_c" 1>&6
7263 else
7264   cat > conftest.$ac_ext <<EOF
7265 #line 7266 "configure"
7266 #include "confdefs.h"
7267 /* System header to define __stub macros and hopefully few prototypes,
7268     which can conflict with char $ac_func(); below.  */
7269 #include <assert.h>
7270 /* Override any gcc2 internal prototype to avoid an error.  */
7271 /* We use char because int might match the return type of a gcc2
7272     builtin and then its argument prototype would still apply.  */
7273 char $ac_func();
7274
7275 int main() {
7276
7277 /* The GNU C library defines this for functions which it implements
7278     to always fail with ENOSYS.  Some functions are actually named
7279     something starting with __ and the normal name is an alias.  */
7280 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7281 choke me
7282 #else
7283 $ac_func();
7284 #endif
7285
7286 ; return 0; }
7287 EOF
7288 if { (eval echo configure:7289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7289   rm -rf conftest*
7290   eval "ac_cv_func_$ac_func=yes"
7291 else
7292   echo "configure: failed program was:" >&5
7293   cat conftest.$ac_ext >&5
7294   rm -rf conftest*
7295   eval "ac_cv_func_$ac_func=no"
7296 fi
7297 rm -f conftest*
7298 fi
7299
7300 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7301   echo "$ac_t""yes" 1>&6
7302     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7303   cat >> confdefs.h <<EOF
7304 #define $ac_tr_func 1
7305 EOF
7306  
7307 else
7308   echo "$ac_t""no" 1>&6
7309 fi
7310 done
7311  ;;
7312   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7313 echo "configure:7314: checking for set_auth_parameters in -lsec" >&5
7314 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7315 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7316   echo $ac_n "(cached) $ac_c" 1>&6
7317 else
7318   ac_save_LIBS="$LIBS"
7319 LIBS="-lsec  $LIBS"
7320 cat > conftest.$ac_ext <<EOF
7321 #line 7322 "configure"
7322 #include "confdefs.h"
7323 /* Override any gcc2 internal prototype to avoid an error.  */
7324 /* We use char because int might match the return type of a gcc2
7325     builtin and then its argument prototype would still apply.  */
7326 char set_auth_parameters();
7327
7328 int main() {
7329 set_auth_parameters()
7330 ; return 0; }
7331 EOF
7332 if { (eval echo configure:7333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7333   rm -rf conftest*
7334   eval "ac_cv_lib_$ac_lib_var=yes"
7335 else
7336   echo "configure: failed program was:" >&5
7337   cat conftest.$ac_ext >&5
7338   rm -rf conftest*
7339   eval "ac_cv_lib_$ac_lib_var=no"
7340 fi
7341 rm -f conftest*
7342 LIBS="$ac_save_LIBS"
7343
7344 fi
7345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7346   echo "$ac_t""yes" 1>&6
7347     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7348     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7349   cat >> confdefs.h <<EOF
7350 #define $ac_tr_lib 1
7351 EOF
7352
7353   LIBS="-lsec $LIBS"
7354
7355 else
7356   echo "$ac_t""no" 1>&6
7357 fi
7358  
7359      for ac_func in set_auth_parameters
7360 do
7361 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7362 echo "configure:7363: checking for $ac_func" >&5
7363 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7364   echo $ac_n "(cached) $ac_c" 1>&6
7365 else
7366   cat > conftest.$ac_ext <<EOF
7367 #line 7368 "configure"
7368 #include "confdefs.h"
7369 /* System header to define __stub macros and hopefully few prototypes,
7370     which can conflict with char $ac_func(); below.  */
7371 #include <assert.h>
7372 /* Override any gcc2 internal prototype to avoid an error.  */
7373 /* We use char because int might match the return type of a gcc2
7374     builtin and then its argument prototype would still apply.  */
7375 char $ac_func();
7376
7377 int main() {
7378
7379 /* The GNU C library defines this for functions which it implements
7380     to always fail with ENOSYS.  Some functions are actually named
7381     something starting with __ and the normal name is an alias.  */
7382 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7383 choke me
7384 #else
7385 $ac_func();
7386 #endif
7387
7388 ; return 0; }
7389 EOF
7390 if { (eval echo configure:7391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7391   rm -rf conftest*
7392   eval "ac_cv_func_$ac_func=yes"
7393 else
7394   echo "configure: failed program was:" >&5
7395   cat conftest.$ac_ext >&5
7396   rm -rf conftest*
7397   eval "ac_cv_func_$ac_func=no"
7398 fi
7399 rm -f conftest*
7400 fi
7401
7402 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7403   echo "$ac_t""yes" 1>&6
7404     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7405   cat >> confdefs.h <<EOF
7406 #define $ac_tr_func 1
7407 EOF
7408  
7409 else
7410   echo "$ac_t""no" 1>&6
7411 fi
7412 done
7413
7414   ;;
7415   esac
7416
7417
7418 # UnixWare 7.x has its getspnam in -lgen
7419 case "$LIBS" in
7420   *-lgen*) for ac_func in getspnam
7421 do
7422 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7423 echo "configure:7424: checking for $ac_func" >&5
7424 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7425   echo $ac_n "(cached) $ac_c" 1>&6
7426 else
7427   cat > conftest.$ac_ext <<EOF
7428 #line 7429 "configure"
7429 #include "confdefs.h"
7430 /* System header to define __stub macros and hopefully few prototypes,
7431     which can conflict with char $ac_func(); below.  */
7432 #include <assert.h>
7433 /* Override any gcc2 internal prototype to avoid an error.  */
7434 /* We use char because int might match the return type of a gcc2
7435     builtin and then its argument prototype would still apply.  */
7436 char $ac_func();
7437
7438 int main() {
7439
7440 /* The GNU C library defines this for functions which it implements
7441     to always fail with ENOSYS.  Some functions are actually named
7442     something starting with __ and the normal name is an alias.  */
7443 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7444 choke me
7445 #else
7446 $ac_func();
7447 #endif
7448
7449 ; return 0; }
7450 EOF
7451 if { (eval echo configure:7452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7452   rm -rf conftest*
7453   eval "ac_cv_func_$ac_func=yes"
7454 else
7455   echo "configure: failed program was:" >&5
7456   cat conftest.$ac_ext >&5
7457   rm -rf conftest*
7458   eval "ac_cv_func_$ac_func=no"
7459 fi
7460 rm -f conftest*
7461 fi
7462
7463 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7464   echo "$ac_t""yes" 1>&6
7465     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7466   cat >> confdefs.h <<EOF
7467 #define $ac_tr_func 1
7468 EOF
7469  
7470 else
7471   echo "$ac_t""no" 1>&6
7472 fi
7473 done
7474  ;;
7475   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7476 echo "configure:7477: checking for getspnam in -lgen" >&5
7477 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7478 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7479   echo $ac_n "(cached) $ac_c" 1>&6
7480 else
7481   ac_save_LIBS="$LIBS"
7482 LIBS="-lgen  $LIBS"
7483 cat > conftest.$ac_ext <<EOF
7484 #line 7485 "configure"
7485 #include "confdefs.h"
7486 /* Override any gcc2 internal prototype to avoid an error.  */
7487 /* We use char because int might match the return type of a gcc2
7488     builtin and then its argument prototype would still apply.  */
7489 char getspnam();
7490
7491 int main() {
7492 getspnam()
7493 ; return 0; }
7494 EOF
7495 if { (eval echo configure:7496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7496   rm -rf conftest*
7497   eval "ac_cv_lib_$ac_lib_var=yes"
7498 else
7499   echo "configure: failed program was:" >&5
7500   cat conftest.$ac_ext >&5
7501   rm -rf conftest*
7502   eval "ac_cv_lib_$ac_lib_var=no"
7503 fi
7504 rm -f conftest*
7505 LIBS="$ac_save_LIBS"
7506
7507 fi
7508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7509   echo "$ac_t""yes" 1>&6
7510     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7511     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7512   cat >> confdefs.h <<EOF
7513 #define $ac_tr_lib 1
7514 EOF
7515
7516   LIBS="-lgen $LIBS"
7517
7518 else
7519   echo "$ac_t""no" 1>&6
7520 fi
7521  
7522      for ac_func in getspnam
7523 do
7524 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7525 echo "configure:7526: checking for $ac_func" >&5
7526 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7527   echo $ac_n "(cached) $ac_c" 1>&6
7528 else
7529   cat > conftest.$ac_ext <<EOF
7530 #line 7531 "configure"
7531 #include "confdefs.h"
7532 /* System header to define __stub macros and hopefully few prototypes,
7533     which can conflict with char $ac_func(); below.  */
7534 #include <assert.h>
7535 /* Override any gcc2 internal prototype to avoid an error.  */
7536 /* We use char because int might match the return type of a gcc2
7537     builtin and then its argument prototype would still apply.  */
7538 char $ac_func();
7539
7540 int main() {
7541
7542 /* The GNU C library defines this for functions which it implements
7543     to always fail with ENOSYS.  Some functions are actually named
7544     something starting with __ and the normal name is an alias.  */
7545 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7546 choke me
7547 #else
7548 $ac_func();
7549 #endif
7550
7551 ; return 0; }
7552 EOF
7553 if { (eval echo configure:7554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7554   rm -rf conftest*
7555   eval "ac_cv_func_$ac_func=yes"
7556 else
7557   echo "configure: failed program was:" >&5
7558   cat conftest.$ac_ext >&5
7559   rm -rf conftest*
7560   eval "ac_cv_func_$ac_func=no"
7561 fi
7562 rm -f conftest*
7563 fi
7564
7565 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7566   echo "$ac_t""yes" 1>&6
7567     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7568   cat >> confdefs.h <<EOF
7569 #define $ac_tr_func 1
7570 EOF
7571  
7572 else
7573   echo "$ac_t""no" 1>&6
7574 fi
7575 done
7576
7577   ;;
7578   esac
7579
7580
7581 case "$LIBS" in
7582   *-lsecurity*) for ac_func in getspnam
7583 do
7584 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7585 echo "configure:7586: checking for $ac_func" >&5
7586 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7587   echo $ac_n "(cached) $ac_c" 1>&6
7588 else
7589   cat > conftest.$ac_ext <<EOF
7590 #line 7591 "configure"
7591 #include "confdefs.h"
7592 /* System header to define __stub macros and hopefully few prototypes,
7593     which can conflict with char $ac_func(); below.  */
7594 #include <assert.h>
7595 /* Override any gcc2 internal prototype to avoid an error.  */
7596 /* We use char because int might match the return type of a gcc2
7597     builtin and then its argument prototype would still apply.  */
7598 char $ac_func();
7599
7600 int main() {
7601
7602 /* The GNU C library defines this for functions which it implements
7603     to always fail with ENOSYS.  Some functions are actually named
7604     something starting with __ and the normal name is an alias.  */
7605 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7606 choke me
7607 #else
7608 $ac_func();
7609 #endif
7610
7611 ; return 0; }
7612 EOF
7613 if { (eval echo configure:7614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7614   rm -rf conftest*
7615   eval "ac_cv_func_$ac_func=yes"
7616 else
7617   echo "configure: failed program was:" >&5
7618   cat conftest.$ac_ext >&5
7619   rm -rf conftest*
7620   eval "ac_cv_func_$ac_func=no"
7621 fi
7622 rm -f conftest*
7623 fi
7624
7625 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7626   echo "$ac_t""yes" 1>&6
7627     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7628   cat >> confdefs.h <<EOF
7629 #define $ac_tr_func 1
7630 EOF
7631  
7632 else
7633   echo "$ac_t""no" 1>&6
7634 fi
7635 done
7636  ;;
7637   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7638 echo "configure:7639: checking for getspnam in -lsecurity" >&5
7639 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7640 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7641   echo $ac_n "(cached) $ac_c" 1>&6
7642 else
7643   ac_save_LIBS="$LIBS"
7644 LIBS="-lsecurity  $LIBS"
7645 cat > conftest.$ac_ext <<EOF
7646 #line 7647 "configure"
7647 #include "confdefs.h"
7648 /* Override any gcc2 internal prototype to avoid an error.  */
7649 /* We use char because int might match the return type of a gcc2
7650     builtin and then its argument prototype would still apply.  */
7651 char getspnam();
7652
7653 int main() {
7654 getspnam()
7655 ; return 0; }
7656 EOF
7657 if { (eval echo configure:7658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7658   rm -rf conftest*
7659   eval "ac_cv_lib_$ac_lib_var=yes"
7660 else
7661   echo "configure: failed program was:" >&5
7662   cat conftest.$ac_ext >&5
7663   rm -rf conftest*
7664   eval "ac_cv_lib_$ac_lib_var=no"
7665 fi
7666 rm -f conftest*
7667 LIBS="$ac_save_LIBS"
7668
7669 fi
7670 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7671   echo "$ac_t""yes" 1>&6
7672     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7673     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7674   cat >> confdefs.h <<EOF
7675 #define $ac_tr_lib 1
7676 EOF
7677
7678   LIBS="-lsecurity $LIBS"
7679
7680 else
7681   echo "$ac_t""no" 1>&6
7682 fi
7683  
7684      for ac_func in getspnam
7685 do
7686 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7687 echo "configure:7688: checking for $ac_func" >&5
7688 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7689   echo $ac_n "(cached) $ac_c" 1>&6
7690 else
7691   cat > conftest.$ac_ext <<EOF
7692 #line 7693 "configure"
7693 #include "confdefs.h"
7694 /* System header to define __stub macros and hopefully few prototypes,
7695     which can conflict with char $ac_func(); below.  */
7696 #include <assert.h>
7697 /* Override any gcc2 internal prototype to avoid an error.  */
7698 /* We use char because int might match the return type of a gcc2
7699     builtin and then its argument prototype would still apply.  */
7700 char $ac_func();
7701
7702 int main() {
7703
7704 /* The GNU C library defines this for functions which it implements
7705     to always fail with ENOSYS.  Some functions are actually named
7706     something starting with __ and the normal name is an alias.  */
7707 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7708 choke me
7709 #else
7710 $ac_func();
7711 #endif
7712
7713 ; return 0; }
7714 EOF
7715 if { (eval echo configure:7716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7716   rm -rf conftest*
7717   eval "ac_cv_func_$ac_func=yes"
7718 else
7719   echo "configure: failed program was:" >&5
7720   cat conftest.$ac_ext >&5
7721   rm -rf conftest*
7722   eval "ac_cv_func_$ac_func=no"
7723 fi
7724 rm -f conftest*
7725 fi
7726
7727 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7728   echo "$ac_t""yes" 1>&6
7729     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7730   cat >> confdefs.h <<EOF
7731 #define $ac_tr_func 1
7732 EOF
7733  
7734 else
7735   echo "$ac_t""no" 1>&6
7736 fi
7737 done
7738
7739   ;;
7740   esac
7741
7742 case "$LIBS" in
7743   *-lsec*) for ac_func in getspnam
7744 do
7745 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7746 echo "configure:7747: checking for $ac_func" >&5
7747 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7748   echo $ac_n "(cached) $ac_c" 1>&6
7749 else
7750   cat > conftest.$ac_ext <<EOF
7751 #line 7752 "configure"
7752 #include "confdefs.h"
7753 /* System header to define __stub macros and hopefully few prototypes,
7754     which can conflict with char $ac_func(); below.  */
7755 #include <assert.h>
7756 /* Override any gcc2 internal prototype to avoid an error.  */
7757 /* We use char because int might match the return type of a gcc2
7758     builtin and then its argument prototype would still apply.  */
7759 char $ac_func();
7760
7761 int main() {
7762
7763 /* The GNU C library defines this for functions which it implements
7764     to always fail with ENOSYS.  Some functions are actually named
7765     something starting with __ and the normal name is an alias.  */
7766 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7767 choke me
7768 #else
7769 $ac_func();
7770 #endif
7771
7772 ; return 0; }
7773 EOF
7774 if { (eval echo configure:7775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7775   rm -rf conftest*
7776   eval "ac_cv_func_$ac_func=yes"
7777 else
7778   echo "configure: failed program was:" >&5
7779   cat conftest.$ac_ext >&5
7780   rm -rf conftest*
7781   eval "ac_cv_func_$ac_func=no"
7782 fi
7783 rm -f conftest*
7784 fi
7785
7786 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7787   echo "$ac_t""yes" 1>&6
7788     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7789   cat >> confdefs.h <<EOF
7790 #define $ac_tr_func 1
7791 EOF
7792  
7793 else
7794   echo "$ac_t""no" 1>&6
7795 fi
7796 done
7797  ;;
7798   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7799 echo "configure:7800: checking for getspnam in -lsec" >&5
7800 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7801 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7802   echo $ac_n "(cached) $ac_c" 1>&6
7803 else
7804   ac_save_LIBS="$LIBS"
7805 LIBS="-lsec  $LIBS"
7806 cat > conftest.$ac_ext <<EOF
7807 #line 7808 "configure"
7808 #include "confdefs.h"
7809 /* Override any gcc2 internal prototype to avoid an error.  */
7810 /* We use char because int might match the return type of a gcc2
7811     builtin and then its argument prototype would still apply.  */
7812 char getspnam();
7813
7814 int main() {
7815 getspnam()
7816 ; return 0; }
7817 EOF
7818 if { (eval echo configure:7819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7819   rm -rf conftest*
7820   eval "ac_cv_lib_$ac_lib_var=yes"
7821 else
7822   echo "configure: failed program was:" >&5
7823   cat conftest.$ac_ext >&5
7824   rm -rf conftest*
7825   eval "ac_cv_lib_$ac_lib_var=no"
7826 fi
7827 rm -f conftest*
7828 LIBS="$ac_save_LIBS"
7829
7830 fi
7831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7832   echo "$ac_t""yes" 1>&6
7833     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7834     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7835   cat >> confdefs.h <<EOF
7836 #define $ac_tr_lib 1
7837 EOF
7838
7839   LIBS="-lsec $LIBS"
7840
7841 else
7842   echo "$ac_t""no" 1>&6
7843 fi
7844  
7845      for ac_func in getspnam
7846 do
7847 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7848 echo "configure:7849: checking for $ac_func" >&5
7849 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7850   echo $ac_n "(cached) $ac_c" 1>&6
7851 else
7852   cat > conftest.$ac_ext <<EOF
7853 #line 7854 "configure"
7854 #include "confdefs.h"
7855 /* System header to define __stub macros and hopefully few prototypes,
7856     which can conflict with char $ac_func(); below.  */
7857 #include <assert.h>
7858 /* Override any gcc2 internal prototype to avoid an error.  */
7859 /* We use char because int might match the return type of a gcc2
7860     builtin and then its argument prototype would still apply.  */
7861 char $ac_func();
7862
7863 int main() {
7864
7865 /* The GNU C library defines this for functions which it implements
7866     to always fail with ENOSYS.  Some functions are actually named
7867     something starting with __ and the normal name is an alias.  */
7868 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7869 choke me
7870 #else
7871 $ac_func();
7872 #endif
7873
7874 ; return 0; }
7875 EOF
7876 if { (eval echo configure:7877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7877   rm -rf conftest*
7878   eval "ac_cv_func_$ac_func=yes"
7879 else
7880   echo "configure: failed program was:" >&5
7881   cat conftest.$ac_ext >&5
7882   rm -rf conftest*
7883   eval "ac_cv_func_$ac_func=no"
7884 fi
7885 rm -f conftest*
7886 fi
7887
7888 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7889   echo "$ac_t""yes" 1>&6
7890     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7891   cat >> confdefs.h <<EOF
7892 #define $ac_tr_func 1
7893 EOF
7894  
7895 else
7896   echo "$ac_t""no" 1>&6
7897 fi
7898 done
7899
7900   ;;
7901   esac
7902
7903
7904 case "$LIBS" in
7905   *-lsecurity*) for ac_func in bigcrypt
7906 do
7907 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7908 echo "configure:7909: checking for $ac_func" >&5
7909 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7910   echo $ac_n "(cached) $ac_c" 1>&6
7911 else
7912   cat > conftest.$ac_ext <<EOF
7913 #line 7914 "configure"
7914 #include "confdefs.h"
7915 /* System header to define __stub macros and hopefully few prototypes,
7916     which can conflict with char $ac_func(); below.  */
7917 #include <assert.h>
7918 /* Override any gcc2 internal prototype to avoid an error.  */
7919 /* We use char because int might match the return type of a gcc2
7920     builtin and then its argument prototype would still apply.  */
7921 char $ac_func();
7922
7923 int main() {
7924
7925 /* The GNU C library defines this for functions which it implements
7926     to always fail with ENOSYS.  Some functions are actually named
7927     something starting with __ and the normal name is an alias.  */
7928 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7929 choke me
7930 #else
7931 $ac_func();
7932 #endif
7933
7934 ; return 0; }
7935 EOF
7936 if { (eval echo configure:7937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7937   rm -rf conftest*
7938   eval "ac_cv_func_$ac_func=yes"
7939 else
7940   echo "configure: failed program was:" >&5
7941   cat conftest.$ac_ext >&5
7942   rm -rf conftest*
7943   eval "ac_cv_func_$ac_func=no"
7944 fi
7945 rm -f conftest*
7946 fi
7947
7948 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7949   echo "$ac_t""yes" 1>&6
7950     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7951   cat >> confdefs.h <<EOF
7952 #define $ac_tr_func 1
7953 EOF
7954  
7955 else
7956   echo "$ac_t""no" 1>&6
7957 fi
7958 done
7959  ;;
7960   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7961 echo "configure:7962: checking for bigcrypt in -lsecurity" >&5
7962 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7963 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7964   echo $ac_n "(cached) $ac_c" 1>&6
7965 else
7966   ac_save_LIBS="$LIBS"
7967 LIBS="-lsecurity  $LIBS"
7968 cat > conftest.$ac_ext <<EOF
7969 #line 7970 "configure"
7970 #include "confdefs.h"
7971 /* Override any gcc2 internal prototype to avoid an error.  */
7972 /* We use char because int might match the return type of a gcc2
7973     builtin and then its argument prototype would still apply.  */
7974 char bigcrypt();
7975
7976 int main() {
7977 bigcrypt()
7978 ; return 0; }
7979 EOF
7980 if { (eval echo configure:7981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7981   rm -rf conftest*
7982   eval "ac_cv_lib_$ac_lib_var=yes"
7983 else
7984   echo "configure: failed program was:" >&5
7985   cat conftest.$ac_ext >&5
7986   rm -rf conftest*
7987   eval "ac_cv_lib_$ac_lib_var=no"
7988 fi
7989 rm -f conftest*
7990 LIBS="$ac_save_LIBS"
7991
7992 fi
7993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7994   echo "$ac_t""yes" 1>&6
7995     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7996     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7997   cat >> confdefs.h <<EOF
7998 #define $ac_tr_lib 1
7999 EOF
8000
8001   LIBS="-lsecurity $LIBS"
8002
8003 else
8004   echo "$ac_t""no" 1>&6
8005 fi
8006  
8007      for ac_func in bigcrypt
8008 do
8009 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8010 echo "configure:8011: checking for $ac_func" >&5
8011 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8012   echo $ac_n "(cached) $ac_c" 1>&6
8013 else
8014   cat > conftest.$ac_ext <<EOF
8015 #line 8016 "configure"
8016 #include "confdefs.h"
8017 /* System header to define __stub macros and hopefully few prototypes,
8018     which can conflict with char $ac_func(); below.  */
8019 #include <assert.h>
8020 /* Override any gcc2 internal prototype to avoid an error.  */
8021 /* We use char because int might match the return type of a gcc2
8022     builtin and then its argument prototype would still apply.  */
8023 char $ac_func();
8024
8025 int main() {
8026
8027 /* The GNU C library defines this for functions which it implements
8028     to always fail with ENOSYS.  Some functions are actually named
8029     something starting with __ and the normal name is an alias.  */
8030 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8031 choke me
8032 #else
8033 $ac_func();
8034 #endif
8035
8036 ; return 0; }
8037 EOF
8038 if { (eval echo configure:8039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8039   rm -rf conftest*
8040   eval "ac_cv_func_$ac_func=yes"
8041 else
8042   echo "configure: failed program was:" >&5
8043   cat conftest.$ac_ext >&5
8044   rm -rf conftest*
8045   eval "ac_cv_func_$ac_func=no"
8046 fi
8047 rm -f conftest*
8048 fi
8049
8050 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8051   echo "$ac_t""yes" 1>&6
8052     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8053   cat >> confdefs.h <<EOF
8054 #define $ac_tr_func 1
8055 EOF
8056  
8057 else
8058   echo "$ac_t""no" 1>&6
8059 fi
8060 done
8061
8062   ;;
8063   esac
8064
8065 case "$LIBS" in
8066   *-lsec*) for ac_func in bigcrypt
8067 do
8068 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8069 echo "configure:8070: checking for $ac_func" >&5
8070 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8071   echo $ac_n "(cached) $ac_c" 1>&6
8072 else
8073   cat > conftest.$ac_ext <<EOF
8074 #line 8075 "configure"
8075 #include "confdefs.h"
8076 /* System header to define __stub macros and hopefully few prototypes,
8077     which can conflict with char $ac_func(); below.  */
8078 #include <assert.h>
8079 /* Override any gcc2 internal prototype to avoid an error.  */
8080 /* We use char because int might match the return type of a gcc2
8081     builtin and then its argument prototype would still apply.  */
8082 char $ac_func();
8083
8084 int main() {
8085
8086 /* The GNU C library defines this for functions which it implements
8087     to always fail with ENOSYS.  Some functions are actually named
8088     something starting with __ and the normal name is an alias.  */
8089 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8090 choke me
8091 #else
8092 $ac_func();
8093 #endif
8094
8095 ; return 0; }
8096 EOF
8097 if { (eval echo configure:8098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8098   rm -rf conftest*
8099   eval "ac_cv_func_$ac_func=yes"
8100 else
8101   echo "configure: failed program was:" >&5
8102   cat conftest.$ac_ext >&5
8103   rm -rf conftest*
8104   eval "ac_cv_func_$ac_func=no"
8105 fi
8106 rm -f conftest*
8107 fi
8108
8109 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8110   echo "$ac_t""yes" 1>&6
8111     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8112   cat >> confdefs.h <<EOF
8113 #define $ac_tr_func 1
8114 EOF
8115  
8116 else
8117   echo "$ac_t""no" 1>&6
8118 fi
8119 done
8120  ;;
8121   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8122 echo "configure:8123: checking for bigcrypt in -lsec" >&5
8123 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8124 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8125   echo $ac_n "(cached) $ac_c" 1>&6
8126 else
8127   ac_save_LIBS="$LIBS"
8128 LIBS="-lsec  $LIBS"
8129 cat > conftest.$ac_ext <<EOF
8130 #line 8131 "configure"
8131 #include "confdefs.h"
8132 /* Override any gcc2 internal prototype to avoid an error.  */
8133 /* We use char because int might match the return type of a gcc2
8134     builtin and then its argument prototype would still apply.  */
8135 char bigcrypt();
8136
8137 int main() {
8138 bigcrypt()
8139 ; return 0; }
8140 EOF
8141 if { (eval echo configure:8142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8142   rm -rf conftest*
8143   eval "ac_cv_lib_$ac_lib_var=yes"
8144 else
8145   echo "configure: failed program was:" >&5
8146   cat conftest.$ac_ext >&5
8147   rm -rf conftest*
8148   eval "ac_cv_lib_$ac_lib_var=no"
8149 fi
8150 rm -f conftest*
8151 LIBS="$ac_save_LIBS"
8152
8153 fi
8154 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8155   echo "$ac_t""yes" 1>&6
8156     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8157     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8158   cat >> confdefs.h <<EOF
8159 #define $ac_tr_lib 1
8160 EOF
8161
8162   LIBS="-lsec $LIBS"
8163
8164 else
8165   echo "$ac_t""no" 1>&6
8166 fi
8167  
8168      for ac_func in bigcrypt
8169 do
8170 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8171 echo "configure:8172: checking for $ac_func" >&5
8172 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8173   echo $ac_n "(cached) $ac_c" 1>&6
8174 else
8175   cat > conftest.$ac_ext <<EOF
8176 #line 8177 "configure"
8177 #include "confdefs.h"
8178 /* System header to define __stub macros and hopefully few prototypes,
8179     which can conflict with char $ac_func(); below.  */
8180 #include <assert.h>
8181 /* Override any gcc2 internal prototype to avoid an error.  */
8182 /* We use char because int might match the return type of a gcc2
8183     builtin and then its argument prototype would still apply.  */
8184 char $ac_func();
8185
8186 int main() {
8187
8188 /* The GNU C library defines this for functions which it implements
8189     to always fail with ENOSYS.  Some functions are actually named
8190     something starting with __ and the normal name is an alias.  */
8191 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8192 choke me
8193 #else
8194 $ac_func();
8195 #endif
8196
8197 ; return 0; }
8198 EOF
8199 if { (eval echo configure:8200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8200   rm -rf conftest*
8201   eval "ac_cv_func_$ac_func=yes"
8202 else
8203   echo "configure: failed program was:" >&5
8204   cat conftest.$ac_ext >&5
8205   rm -rf conftest*
8206   eval "ac_cv_func_$ac_func=no"
8207 fi
8208 rm -f conftest*
8209 fi
8210
8211 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8212   echo "$ac_t""yes" 1>&6
8213     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8214   cat >> confdefs.h <<EOF
8215 #define $ac_tr_func 1
8216 EOF
8217  
8218 else
8219   echo "$ac_t""no" 1>&6
8220 fi
8221 done
8222
8223   ;;
8224   esac
8225
8226
8227 case "$LIBS" in
8228   *-lsecurity*) for ac_func in getprpwnam
8229 do
8230 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8231 echo "configure:8232: checking for $ac_func" >&5
8232 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8233   echo $ac_n "(cached) $ac_c" 1>&6
8234 else
8235   cat > conftest.$ac_ext <<EOF
8236 #line 8237 "configure"
8237 #include "confdefs.h"
8238 /* System header to define __stub macros and hopefully few prototypes,
8239     which can conflict with char $ac_func(); below.  */
8240 #include <assert.h>
8241 /* Override any gcc2 internal prototype to avoid an error.  */
8242 /* We use char because int might match the return type of a gcc2
8243     builtin and then its argument prototype would still apply.  */
8244 char $ac_func();
8245
8246 int main() {
8247
8248 /* The GNU C library defines this for functions which it implements
8249     to always fail with ENOSYS.  Some functions are actually named
8250     something starting with __ and the normal name is an alias.  */
8251 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8252 choke me
8253 #else
8254 $ac_func();
8255 #endif
8256
8257 ; return 0; }
8258 EOF
8259 if { (eval echo configure:8260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8260   rm -rf conftest*
8261   eval "ac_cv_func_$ac_func=yes"
8262 else
8263   echo "configure: failed program was:" >&5
8264   cat conftest.$ac_ext >&5
8265   rm -rf conftest*
8266   eval "ac_cv_func_$ac_func=no"
8267 fi
8268 rm -f conftest*
8269 fi
8270
8271 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8272   echo "$ac_t""yes" 1>&6
8273     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8274   cat >> confdefs.h <<EOF
8275 #define $ac_tr_func 1
8276 EOF
8277  
8278 else
8279   echo "$ac_t""no" 1>&6
8280 fi
8281 done
8282  ;;
8283   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8284 echo "configure:8285: checking for getprpwnam in -lsecurity" >&5
8285 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8286 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8287   echo $ac_n "(cached) $ac_c" 1>&6
8288 else
8289   ac_save_LIBS="$LIBS"
8290 LIBS="-lsecurity  $LIBS"
8291 cat > conftest.$ac_ext <<EOF
8292 #line 8293 "configure"
8293 #include "confdefs.h"
8294 /* Override any gcc2 internal prototype to avoid an error.  */
8295 /* We use char because int might match the return type of a gcc2
8296     builtin and then its argument prototype would still apply.  */
8297 char getprpwnam();
8298
8299 int main() {
8300 getprpwnam()
8301 ; return 0; }
8302 EOF
8303 if { (eval echo configure:8304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8304   rm -rf conftest*
8305   eval "ac_cv_lib_$ac_lib_var=yes"
8306 else
8307   echo "configure: failed program was:" >&5
8308   cat conftest.$ac_ext >&5
8309   rm -rf conftest*
8310   eval "ac_cv_lib_$ac_lib_var=no"
8311 fi
8312 rm -f conftest*
8313 LIBS="$ac_save_LIBS"
8314
8315 fi
8316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8317   echo "$ac_t""yes" 1>&6
8318     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8319     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8320   cat >> confdefs.h <<EOF
8321 #define $ac_tr_lib 1
8322 EOF
8323
8324   LIBS="-lsecurity $LIBS"
8325
8326 else
8327   echo "$ac_t""no" 1>&6
8328 fi
8329  
8330      for ac_func in getprpwnam
8331 do
8332 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8333 echo "configure:8334: checking for $ac_func" >&5
8334 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8335   echo $ac_n "(cached) $ac_c" 1>&6
8336 else
8337   cat > conftest.$ac_ext <<EOF
8338 #line 8339 "configure"
8339 #include "confdefs.h"
8340 /* System header to define __stub macros and hopefully few prototypes,
8341     which can conflict with char $ac_func(); below.  */
8342 #include <assert.h>
8343 /* Override any gcc2 internal prototype to avoid an error.  */
8344 /* We use char because int might match the return type of a gcc2
8345     builtin and then its argument prototype would still apply.  */
8346 char $ac_func();
8347
8348 int main() {
8349
8350 /* The GNU C library defines this for functions which it implements
8351     to always fail with ENOSYS.  Some functions are actually named
8352     something starting with __ and the normal name is an alias.  */
8353 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8354 choke me
8355 #else
8356 $ac_func();
8357 #endif
8358
8359 ; return 0; }
8360 EOF
8361 if { (eval echo configure:8362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8362   rm -rf conftest*
8363   eval "ac_cv_func_$ac_func=yes"
8364 else
8365   echo "configure: failed program was:" >&5
8366   cat conftest.$ac_ext >&5
8367   rm -rf conftest*
8368   eval "ac_cv_func_$ac_func=no"
8369 fi
8370 rm -f conftest*
8371 fi
8372
8373 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8374   echo "$ac_t""yes" 1>&6
8375     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8376   cat >> confdefs.h <<EOF
8377 #define $ac_tr_func 1
8378 EOF
8379  
8380 else
8381   echo "$ac_t""no" 1>&6
8382 fi
8383 done
8384
8385   ;;
8386   esac
8387
8388 case "$LIBS" in
8389   *-lsec*) for ac_func in getprpwnam
8390 do
8391 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8392 echo "configure:8393: checking for $ac_func" >&5
8393 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8394   echo $ac_n "(cached) $ac_c" 1>&6
8395 else
8396   cat > conftest.$ac_ext <<EOF
8397 #line 8398 "configure"
8398 #include "confdefs.h"
8399 /* System header to define __stub macros and hopefully few prototypes,
8400     which can conflict with char $ac_func(); below.  */
8401 #include <assert.h>
8402 /* Override any gcc2 internal prototype to avoid an error.  */
8403 /* We use char because int might match the return type of a gcc2
8404     builtin and then its argument prototype would still apply.  */
8405 char $ac_func();
8406
8407 int main() {
8408
8409 /* The GNU C library defines this for functions which it implements
8410     to always fail with ENOSYS.  Some functions are actually named
8411     something starting with __ and the normal name is an alias.  */
8412 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8413 choke me
8414 #else
8415 $ac_func();
8416 #endif
8417
8418 ; return 0; }
8419 EOF
8420 if { (eval echo configure:8421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8421   rm -rf conftest*
8422   eval "ac_cv_func_$ac_func=yes"
8423 else
8424   echo "configure: failed program was:" >&5
8425   cat conftest.$ac_ext >&5
8426   rm -rf conftest*
8427   eval "ac_cv_func_$ac_func=no"
8428 fi
8429 rm -f conftest*
8430 fi
8431
8432 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8433   echo "$ac_t""yes" 1>&6
8434     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8435   cat >> confdefs.h <<EOF
8436 #define $ac_tr_func 1
8437 EOF
8438  
8439 else
8440   echo "$ac_t""no" 1>&6
8441 fi
8442 done
8443  ;;
8444   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8445 echo "configure:8446: checking for getprpwnam in -lsec" >&5
8446 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8447 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8448   echo $ac_n "(cached) $ac_c" 1>&6
8449 else
8450   ac_save_LIBS="$LIBS"
8451 LIBS="-lsec  $LIBS"
8452 cat > conftest.$ac_ext <<EOF
8453 #line 8454 "configure"
8454 #include "confdefs.h"
8455 /* Override any gcc2 internal prototype to avoid an error.  */
8456 /* We use char because int might match the return type of a gcc2
8457     builtin and then its argument prototype would still apply.  */
8458 char getprpwnam();
8459
8460 int main() {
8461 getprpwnam()
8462 ; return 0; }
8463 EOF
8464 if { (eval echo configure:8465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8465   rm -rf conftest*
8466   eval "ac_cv_lib_$ac_lib_var=yes"
8467 else
8468   echo "configure: failed program was:" >&5
8469   cat conftest.$ac_ext >&5
8470   rm -rf conftest*
8471   eval "ac_cv_lib_$ac_lib_var=no"
8472 fi
8473 rm -f conftest*
8474 LIBS="$ac_save_LIBS"
8475
8476 fi
8477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8478   echo "$ac_t""yes" 1>&6
8479     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8480     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8481   cat >> confdefs.h <<EOF
8482 #define $ac_tr_lib 1
8483 EOF
8484
8485   LIBS="-lsec $LIBS"
8486
8487 else
8488   echo "$ac_t""no" 1>&6
8489 fi
8490  
8491      for ac_func in getprpwnam
8492 do
8493 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8494 echo "configure:8495: checking for $ac_func" >&5
8495 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8496   echo $ac_n "(cached) $ac_c" 1>&6
8497 else
8498   cat > conftest.$ac_ext <<EOF
8499 #line 8500 "configure"
8500 #include "confdefs.h"
8501 /* System header to define __stub macros and hopefully few prototypes,
8502     which can conflict with char $ac_func(); below.  */
8503 #include <assert.h>
8504 /* Override any gcc2 internal prototype to avoid an error.  */
8505 /* We use char because int might match the return type of a gcc2
8506     builtin and then its argument prototype would still apply.  */
8507 char $ac_func();
8508
8509 int main() {
8510
8511 /* The GNU C library defines this for functions which it implements
8512     to always fail with ENOSYS.  Some functions are actually named
8513     something starting with __ and the normal name is an alias.  */
8514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8515 choke me
8516 #else
8517 $ac_func();
8518 #endif
8519
8520 ; return 0; }
8521 EOF
8522 if { (eval echo configure:8523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8523   rm -rf conftest*
8524   eval "ac_cv_func_$ac_func=yes"
8525 else
8526   echo "configure: failed program was:" >&5
8527   cat conftest.$ac_ext >&5
8528   rm -rf conftest*
8529   eval "ac_cv_func_$ac_func=no"
8530 fi
8531 rm -f conftest*
8532 fi
8533
8534 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8535   echo "$ac_t""yes" 1>&6
8536     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8537   cat >> confdefs.h <<EOF
8538 #define $ac_tr_func 1
8539 EOF
8540  
8541 else
8542   echo "$ac_t""no" 1>&6
8543 fi
8544 done
8545
8546   ;;
8547   esac
8548
8549
8550 # this bit needs to be modified for each OS that is suported by
8551 # smbwrapper. You need to specify how to created a shared library and
8552 # how to compile C code to produce PIC object files
8553
8554 # these are the defaults, good for lots of systems
8555 HOST_OS="$host_os"
8556 LDSHFLAGS="-shared"
8557 SHLD="\${CC}"
8558 PICFLAG=""
8559 PICSUFFIX="po"
8560 POBAD_CC="#"
8561 SHLIBEXT="so"
8562 # Assume non-shared by default and override below
8563 BLDSHARED="false"
8564 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8565 echo "configure:8566: checking ability to build shared libraries" >&5
8566
8567 # and these are for particular systems
8568 case "$host_os" in
8569                 *linux*)   cat >> confdefs.h <<\EOF
8570 #define LINUX 1
8571 EOF
8572
8573                         BLDSHARED="true"
8574                         LDSHFLAGS="-shared" 
8575                         DYNEXP="-Wl,--export-dynamic"
8576                         PICFLAG="-fPIC"
8577                         cat >> confdefs.h <<\EOF
8578 #define STAT_ST_BLOCKSIZE 512
8579 EOF
8580
8581                 ;;
8582                 *solaris*) 
8583                         cat >> confdefs.h <<\EOF
8584 #define SUNOS5 1
8585 EOF
8586
8587                         BLDSHARED="true"
8588                         LDSHFLAGS="-h \$@ -G"
8589                         if test "${ac_cv_prog_CC}" = "gcc"; then
8590                                 PICFLAG="-fPIC"
8591                         else
8592                                 PICFLAG="-KPIC"
8593                                 POBAD_CC=""
8594                                 PICSUFFIX="po.o"
8595                         fi
8596                         cat >> confdefs.h <<\EOF
8597 #define STAT_ST_BLOCKSIZE 512
8598 EOF
8599
8600                 ;;
8601                 *sunos*) cat >> confdefs.h <<\EOF
8602 #define SUNOS4 1
8603 EOF
8604
8605                         BLDSHARED="true"
8606                         LDSHFLAGS="-Wl,-h,\$@ -G"
8607                         PICFLAG="-KPIC"   # Is this correct for SunOS
8608                 ;;
8609                 *bsd*)  BLDSHARED="true"
8610                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8611                         PICFLAG="-fPIC"
8612                         cat >> confdefs.h <<\EOF
8613 #define STAT_ST_BLOCKSIZE 512
8614 EOF
8615
8616                 ;;
8617                 *irix*) cat >> confdefs.h <<\EOF
8618 #define IRIX 1
8619 EOF
8620
8621                         case "$host_os" in
8622                         *irix6*) cat >> confdefs.h <<\EOF
8623 #define IRIX6 1
8624 EOF
8625
8626                         ;;
8627                         esac
8628                         ATTEMPT_WRAP32_BUILD=yes
8629                         BLDSHARED="true"
8630                         LDSHFLAGS="-soname \$@ -shared"
8631                         SHLD="\${LD}"
8632                         if test "${ac_cv_prog_CC}" = "gcc"; then
8633                                 PICFLAG="-fPIC"
8634                         else 
8635                                 PICFLAG="-KPIC"
8636                         fi
8637                         cat >> confdefs.h <<\EOF
8638 #define STAT_ST_BLOCKSIZE 512
8639 EOF
8640
8641                 ;;
8642                 *aix*) cat >> confdefs.h <<\EOF
8643 #define AIX 1
8644 EOF
8645
8646                         BLDSHARED="true"
8647                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8648                         PICFLAG="-O2 -qmaxmem=6000"
8649                         cat >> confdefs.h <<\EOF
8650 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8651 EOF
8652
8653                 ;;
8654                 *hpux*) cat >> confdefs.h <<\EOF
8655 #define HPUX 1
8656 EOF
8657
8658                         SHLIBEXT="sl"
8659                         # Use special PIC flags for the native HP-UX compiler.
8660                         if test $ac_cv_prog_cc_Ae = yes; then
8661                                 #BLDSHARED="true"
8662                                 LDSHFLAGS="-b -z +h \$@"
8663                                 PICFLAG="+z"
8664                         fi
8665                         DYNEXP="-Wl,-E"
8666                         cat >> confdefs.h <<\EOF
8667 #define STAT_ST_BLOCKSIZE 8192
8668 EOF
8669
8670                 ;;
8671                 *qnx*) cat >> confdefs.h <<\EOF
8672 #define QNX 1
8673 EOF
8674 ;;
8675                 *osf*) cat >> confdefs.h <<\EOF
8676 #define OSF1 1
8677 EOF
8678
8679                         BLDSHARED="true"
8680                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8681                         PICFLAG="-fPIC"
8682                 ;;
8683                 *sco*) 
8684                         DYNEXP="-Wl,-Bexport"
8685                         cat >> confdefs.h <<\EOF
8686 #define SCO 1
8687 EOF
8688
8689                 ;;
8690                 *unixware*) cat >> confdefs.h <<\EOF
8691 #define UNIXWARE 1
8692 EOF
8693
8694                         BLDSHARED="true"
8695                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8696                         PICFLAG="-KPIC"
8697                 ;;
8698                 *next2*) cat >> confdefs.h <<\EOF
8699 #define NEXT2 1
8700 EOF
8701 ;;
8702                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8703 set dummy groff; ac_word=$2
8704 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8705 echo "configure:8706: checking for $ac_word" >&5
8706 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8707   echo $ac_n "(cached) $ac_c" 1>&6
8708 else
8709   if test -n "$ROFF"; then
8710   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8711 else
8712   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8713   ac_dummy="$PATH"
8714   for ac_dir in $ac_dummy; do
8715     test -z "$ac_dir" && ac_dir=.
8716     if test -f $ac_dir/$ac_word; then
8717       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8718       break
8719     fi
8720   done
8721   IFS="$ac_save_ifs"
8722 fi
8723 fi
8724 ROFF="$ac_cv_prog_ROFF"
8725 if test -n "$ROFF"; then
8726   echo "$ac_t""$ROFF" 1>&6
8727 else
8728   echo "$ac_t""no" 1>&6
8729 fi
8730 ;;
8731                 *sysv4*)
8732                         case "$host" in
8733                                 *-univel-*)
8734                                         if  test "$GCC" != yes ; then
8735                                                 cat >> confdefs.h <<\EOF
8736 #define HAVE_MEMSET 1
8737 EOF
8738
8739                                         fi
8740                                         LDSHFLAGS="-G"
8741                                         DYNEXP="-Bexport"
8742                                 ;;
8743                                 *mips-sni-sysv4*)
8744                                         cat >> confdefs.h <<\EOF
8745 #define RELIANTUNIX 1
8746 EOF
8747
8748                                 ;;
8749                         esac
8750                 ;;
8751
8752                 *sysv5*)
8753                         if  test "$GCC" != yes ; then
8754                                 cat >> confdefs.h <<\EOF
8755 #define HAVE_MEMSET 1
8756 EOF
8757
8758                         fi
8759                         LDSHFLAGS="-G"
8760                 ;;
8761 esac
8762
8763 echo "$ac_t""$BLDSHARED" 1>&6
8764 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
8765 echo "configure:8766: checking linker flags for shared libraries" >&5
8766 echo "$ac_t""$LDSHFLAGS" 1>&6
8767 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
8768 echo "configure:8769: checking compiler flags for position-independent code" >&5
8769 echo "$ac_t""$PICFLAGS" 1>&6
8770
8771 #######################################################
8772 # test whether building a shared library actually works
8773 if test $BLDSHARED = true; then
8774 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
8775 echo "configure:8776: checking whether building shared libraries actually works" >&5
8776 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
8777   echo $ac_n "(cached) $ac_c" 1>&6
8778 else
8779   
8780    ac_cv_shlib_works=no
8781    # try building a trivial shared library
8782    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
8783      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
8784      ac_cv_shlib_works=yes
8785    rm -f shlib.so shlib.po
8786
8787 fi
8788
8789 echo "$ac_t""$ac_cv_shlib_works" 1>&6
8790 if test $ac_cv_shlib_works = no; then
8791    BLDSHARED=false
8792 fi
8793 fi
8794
8795
8796 # this updates our target list if we can build shared libs
8797 if test $BLDSHARED = true; then
8798    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8799 else
8800    LIBSMBCLIENT_SHARED=
8801 fi
8802
8803 ################
8804
8805 echo $ac_n "checking for long long""... $ac_c" 1>&6
8806 echo "configure:8807: checking for long long" >&5
8807 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8808   echo $ac_n "(cached) $ac_c" 1>&6
8809 else
8810   
8811 if test "$cross_compiling" = yes; then
8812   samba_cv_have_longlong=cross
8813 else
8814   cat > conftest.$ac_ext <<EOF
8815 #line 8816 "configure"
8816 #include "confdefs.h"
8817 #include <stdio.h>
8818 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8819 EOF
8820 if { (eval echo configure:8821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8821 then
8822   samba_cv_have_longlong=yes
8823 else
8824   echo "configure: failed program was:" >&5
8825   cat conftest.$ac_ext >&5
8826   rm -fr conftest*
8827   samba_cv_have_longlong=no
8828 fi
8829 rm -fr conftest*
8830 fi
8831
8832 fi
8833
8834 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8835 if test x"$samba_cv_have_longlong" = x"yes"; then
8836     cat >> confdefs.h <<\EOF
8837 #define HAVE_LONGLONG 1
8838 EOF
8839
8840 fi
8841
8842 #
8843 # Check if the compiler supports the LL prefix on long long integers.
8844 # AIX needs this.
8845
8846 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8847 echo "configure:8848: checking for LL suffix on long long integers" >&5
8848 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8849   echo $ac_n "(cached) $ac_c" 1>&6
8850 else
8851   
8852     cat > conftest.$ac_ext <<EOF
8853 #line 8854 "configure"
8854 #include "confdefs.h"
8855 #include <stdio.h>
8856 int main() {
8857 long long i = 0x8000000000LL
8858 ; return 0; }
8859 EOF
8860 if { (eval echo configure:8861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8861   rm -rf conftest*
8862   samba_cv_compiler_supports_ll=yes
8863 else
8864   echo "configure: failed program was:" >&5
8865   cat conftest.$ac_ext >&5
8866   rm -rf conftest*
8867   samba_cv_compiler_supports_ll=no
8868 fi
8869 rm -f conftest*
8870 fi
8871
8872 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8873 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8874    cat >> confdefs.h <<\EOF
8875 #define COMPILER_SUPPORTS_LL 1
8876 EOF
8877
8878 fi
8879
8880   
8881 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8882 echo "configure:8883: checking for 64 bit off_t" >&5
8883 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8884   echo $ac_n "(cached) $ac_c" 1>&6
8885 else
8886   
8887 if test "$cross_compiling" = yes; then
8888   samba_cv_SIZEOF_OFF_T=cross
8889 else
8890   cat > conftest.$ac_ext <<EOF
8891 #line 8892 "configure"
8892 #include "confdefs.h"
8893 #include <stdio.h>
8894 #include <sys/stat.h>
8895 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8896 EOF
8897 if { (eval echo configure:8898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8898 then
8899   samba_cv_SIZEOF_OFF_T=yes
8900 else
8901   echo "configure: failed program was:" >&5
8902   cat conftest.$ac_ext >&5
8903   rm -fr conftest*
8904   samba_cv_SIZEOF_OFF_T=no
8905 fi
8906 rm -fr conftest*
8907 fi
8908
8909 fi
8910
8911 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8912 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8913     cat >> confdefs.h <<\EOF
8914 #define SIZEOF_OFF_T 8
8915 EOF
8916
8917 fi
8918
8919 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8920 echo "configure:8921: checking for off64_t" >&5
8921 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8922   echo $ac_n "(cached) $ac_c" 1>&6
8923 else
8924   
8925 if test "$cross_compiling" = yes; then
8926   samba_cv_HAVE_OFF64_T=cross
8927 else
8928   cat > conftest.$ac_ext <<EOF
8929 #line 8930 "configure"
8930 #include "confdefs.h"
8931
8932 #if defined(HAVE_UNISTD_H)
8933 #include <unistd.h>
8934 #endif
8935 #include <stdio.h>
8936 #include <sys/stat.h>
8937 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8938 EOF
8939 if { (eval echo configure:8940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8940 then
8941   samba_cv_HAVE_OFF64_T=yes
8942 else
8943   echo "configure: failed program was:" >&5
8944   cat conftest.$ac_ext >&5
8945   rm -fr conftest*
8946   samba_cv_HAVE_OFF64_T=no
8947 fi
8948 rm -fr conftest*
8949 fi
8950
8951 fi
8952
8953 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8954 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8955     cat >> confdefs.h <<\EOF
8956 #define HAVE_OFF64_T 1
8957 EOF
8958
8959 fi
8960
8961 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8962 echo "configure:8963: checking for 64 bit ino_t" >&5
8963 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8964   echo $ac_n "(cached) $ac_c" 1>&6
8965 else
8966   
8967 if test "$cross_compiling" = yes; then
8968   samba_cv_SIZEOF_INO_T=cross
8969 else
8970   cat > conftest.$ac_ext <<EOF
8971 #line 8972 "configure"
8972 #include "confdefs.h"
8973 #include <stdio.h>
8974 #include <sys/stat.h>
8975 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8976 EOF
8977 if { (eval echo configure:8978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8978 then
8979   samba_cv_SIZEOF_INO_T=yes
8980 else
8981   echo "configure: failed program was:" >&5
8982   cat conftest.$ac_ext >&5
8983   rm -fr conftest*
8984   samba_cv_SIZEOF_INO_T=no
8985 fi
8986 rm -fr conftest*
8987 fi
8988
8989 fi
8990
8991 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8992 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8993     cat >> confdefs.h <<\EOF
8994 #define SIZEOF_INO_T 8
8995 EOF
8996
8997 fi
8998
8999 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9000 echo "configure:9001: checking for ino64_t" >&5
9001 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9002   echo $ac_n "(cached) $ac_c" 1>&6
9003 else
9004   
9005 if test "$cross_compiling" = yes; then
9006   samba_cv_HAVE_INO64_T=cross
9007 else
9008   cat > conftest.$ac_ext <<EOF
9009 #line 9010 "configure"
9010 #include "confdefs.h"
9011
9012 #if defined(HAVE_UNISTD_H)
9013 #include <unistd.h>
9014 #endif
9015 #include <stdio.h>
9016 #include <sys/stat.h>
9017 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9018 EOF
9019 if { (eval echo configure:9020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9020 then
9021   samba_cv_HAVE_INO64_T=yes
9022 else
9023   echo "configure: failed program was:" >&5
9024   cat conftest.$ac_ext >&5
9025   rm -fr conftest*
9026   samba_cv_HAVE_INO64_T=no
9027 fi
9028 rm -fr conftest*
9029 fi
9030
9031 fi
9032
9033 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9034 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9035     cat >> confdefs.h <<\EOF
9036 #define HAVE_INO64_T 1
9037 EOF
9038
9039 fi
9040
9041 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9042 echo "configure:9043: checking for dev64_t" >&5
9043 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9044   echo $ac_n "(cached) $ac_c" 1>&6
9045 else
9046   
9047 if test "$cross_compiling" = yes; then
9048   samba_cv_HAVE_DEV64_T=cross
9049 else
9050   cat > conftest.$ac_ext <<EOF
9051 #line 9052 "configure"
9052 #include "confdefs.h"
9053
9054 #if defined(HAVE_UNISTD_H)
9055 #include <unistd.h>
9056 #endif
9057 #include <stdio.h>
9058 #include <sys/stat.h>
9059 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9060 EOF
9061 if { (eval echo configure:9062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9062 then
9063   samba_cv_HAVE_DEV64_T=yes
9064 else
9065   echo "configure: failed program was:" >&5
9066   cat conftest.$ac_ext >&5
9067   rm -fr conftest*
9068   samba_cv_HAVE_DEV64_T=no
9069 fi
9070 rm -fr conftest*
9071 fi
9072
9073 fi
9074
9075 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9076 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9077     cat >> confdefs.h <<\EOF
9078 #define HAVE_DEV64_T 1
9079 EOF
9080
9081 fi
9082
9083 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9084 echo "configure:9085: checking for struct dirent64" >&5
9085 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9086   echo $ac_n "(cached) $ac_c" 1>&6
9087 else
9088   
9089 cat > conftest.$ac_ext <<EOF
9090 #line 9091 "configure"
9091 #include "confdefs.h"
9092
9093 #if defined(HAVE_UNISTD_H)
9094 #include <unistd.h>
9095 #endif
9096 #include <sys/types.h>
9097 #include <dirent.h>
9098 int main() {
9099 struct dirent64 de;
9100 ; return 0; }
9101 EOF
9102 if { (eval echo configure:9103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9103   rm -rf conftest*
9104   samba_cv_HAVE_STRUCT_DIRENT64=yes
9105 else
9106   echo "configure: failed program was:" >&5
9107   cat conftest.$ac_ext >&5
9108   rm -rf conftest*
9109   samba_cv_HAVE_STRUCT_DIRENT64=no
9110 fi
9111 rm -f conftest*
9112 fi
9113
9114 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9115 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9116     cat >> confdefs.h <<\EOF
9117 #define HAVE_STRUCT_DIRENT64 1
9118 EOF
9119
9120 fi
9121
9122 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9123 echo "configure:9124: checking for major macro" >&5
9124 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9125   echo $ac_n "(cached) $ac_c" 1>&6
9126 else
9127   
9128 if test "$cross_compiling" = yes; then
9129   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9130 else
9131   cat > conftest.$ac_ext <<EOF
9132 #line 9133 "configure"
9133 #include "confdefs.h"
9134
9135 #if defined(HAVE_UNISTD_H)
9136 #include <unistd.h>
9137 #endif
9138 #include <sys/types.h>
9139 main() { dev_t dev; int i = major(dev); return 0; }
9140 EOF
9141 if { (eval echo configure:9142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9142 then
9143   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9144 else
9145   echo "configure: failed program was:" >&5
9146   cat conftest.$ac_ext >&5
9147   rm -fr conftest*
9148   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9149 fi
9150 rm -fr conftest*
9151 fi
9152
9153 fi
9154
9155 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9156 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9157     cat >> confdefs.h <<\EOF
9158 #define HAVE_DEVICE_MAJOR_FN 1
9159 EOF
9160
9161 fi
9162
9163 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9164 echo "configure:9165: checking for minor macro" >&5
9165 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9166   echo $ac_n "(cached) $ac_c" 1>&6
9167 else
9168   
9169 if test "$cross_compiling" = yes; then
9170   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9171 else
9172   cat > conftest.$ac_ext <<EOF
9173 #line 9174 "configure"
9174 #include "confdefs.h"
9175
9176 #if defined(HAVE_UNISTD_H)
9177 #include <unistd.h>
9178 #endif
9179 #include <sys/types.h>
9180 main() { dev_t dev; int i = minor(dev); return 0; }
9181 EOF
9182 if { (eval echo configure:9183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9183 then
9184   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9185 else
9186   echo "configure: failed program was:" >&5
9187   cat conftest.$ac_ext >&5
9188   rm -fr conftest*
9189   samba_cv_HAVE_DEVICE_MINOR_FN=no
9190 fi
9191 rm -fr conftest*
9192 fi
9193
9194 fi
9195
9196 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9197 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9198     cat >> confdefs.h <<\EOF
9199 #define HAVE_DEVICE_MINOR_FN 1
9200 EOF
9201
9202 fi
9203
9204 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9205 echo "configure:9206: checking for unsigned char" >&5
9206 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9207   echo $ac_n "(cached) $ac_c" 1>&6
9208 else
9209   
9210 if test "$cross_compiling" = yes; then
9211   samba_cv_HAVE_UNSIGNED_CHAR=cross
9212 else
9213   cat > conftest.$ac_ext <<EOF
9214 #line 9215 "configure"
9215 #include "confdefs.h"
9216 #include <stdio.h>
9217 main() { char c; c=250; exit((c > 0)?0:1); }
9218 EOF
9219 if { (eval echo configure:9220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9220 then
9221   samba_cv_HAVE_UNSIGNED_CHAR=yes
9222 else
9223   echo "configure: failed program was:" >&5
9224   cat conftest.$ac_ext >&5
9225   rm -fr conftest*
9226   samba_cv_HAVE_UNSIGNED_CHAR=no
9227 fi
9228 rm -fr conftest*
9229 fi
9230
9231 fi
9232
9233 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9234 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9235     cat >> confdefs.h <<\EOF
9236 #define HAVE_UNSIGNED_CHAR 1
9237 EOF
9238
9239 fi
9240
9241 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9242 echo "configure:9243: checking for sin_len in sock" >&5
9243 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9244   echo $ac_n "(cached) $ac_c" 1>&6
9245 else
9246   
9247 cat > conftest.$ac_ext <<EOF
9248 #line 9249 "configure"
9249 #include "confdefs.h"
9250 #include <sys/types.h>
9251 #include <sys/socket.h>
9252 #include <netinet/in.h>
9253 int main() {
9254 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9255 ; return 0; }
9256 EOF
9257 if { (eval echo configure:9258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9258   rm -rf conftest*
9259   samba_cv_HAVE_SOCK_SIN_LEN=yes
9260 else
9261   echo "configure: failed program was:" >&5
9262   cat conftest.$ac_ext >&5
9263   rm -rf conftest*
9264   samba_cv_HAVE_SOCK_SIN_LEN=no
9265 fi
9266 rm -f conftest*
9267 fi
9268
9269 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9270 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9271     cat >> confdefs.h <<\EOF
9272 #define HAVE_SOCK_SIN_LEN 1
9273 EOF
9274
9275 fi
9276
9277 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9278 echo "configure:9279: checking whether seekdir returns void" >&5
9279 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9280   echo $ac_n "(cached) $ac_c" 1>&6
9281 else
9282   
9283 cat > conftest.$ac_ext <<EOF
9284 #line 9285 "configure"
9285 #include "confdefs.h"
9286 #include <sys/types.h>
9287 #include <dirent.h>
9288 void seekdir(DIR *d, long loc) { return; }
9289 int main() {
9290 return 0;
9291 ; return 0; }
9292 EOF
9293 if { (eval echo configure:9294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9294   rm -rf conftest*
9295   samba_cv_SEEKDIR_RETURNS_VOID=yes
9296 else
9297   echo "configure: failed program was:" >&5
9298   cat conftest.$ac_ext >&5
9299   rm -rf conftest*
9300   samba_cv_SEEKDIR_RETURNS_VOID=no
9301 fi
9302 rm -f conftest*
9303 fi
9304
9305 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9306 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9307     cat >> confdefs.h <<\EOF
9308 #define SEEKDIR_RETURNS_VOID 1
9309 EOF
9310
9311 fi
9312
9313 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9314 echo "configure:9315: checking for __FILE__ macro" >&5
9315 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9316   echo $ac_n "(cached) $ac_c" 1>&6
9317 else
9318   
9319 cat > conftest.$ac_ext <<EOF
9320 #line 9321 "configure"
9321 #include "confdefs.h"
9322 #include <stdio.h>
9323 int main() {
9324 printf("%s\n", __FILE__);
9325 ; return 0; }
9326 EOF
9327 if { (eval echo configure:9328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9328   rm -rf conftest*
9329   samba_cv_HAVE_FILE_MACRO=yes
9330 else
9331   echo "configure: failed program was:" >&5
9332   cat conftest.$ac_ext >&5
9333   rm -rf conftest*
9334   samba_cv_HAVE_FILE_MACRO=no
9335 fi
9336 rm -f conftest*
9337 fi
9338
9339 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9340 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9341     cat >> confdefs.h <<\EOF
9342 #define HAVE_FILE_MACRO 1
9343 EOF
9344
9345 fi
9346
9347 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9348 echo "configure:9349: checking for __FUNCTION__ macro" >&5
9349 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9350   echo $ac_n "(cached) $ac_c" 1>&6
9351 else
9352   
9353 cat > conftest.$ac_ext <<EOF
9354 #line 9355 "configure"
9355 #include "confdefs.h"
9356 #include <stdio.h>
9357 int main() {
9358 printf("%s\n", __FUNCTION__);
9359 ; return 0; }
9360 EOF
9361 if { (eval echo configure:9362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9362   rm -rf conftest*
9363   samba_cv_HAVE_FUNCTION_MACRO=yes
9364 else
9365   echo "configure: failed program was:" >&5
9366   cat conftest.$ac_ext >&5
9367   rm -rf conftest*
9368   samba_cv_HAVE_FUNCTION_MACRO=no
9369 fi
9370 rm -f conftest*
9371 fi
9372
9373 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9374 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9375     cat >> confdefs.h <<\EOF
9376 #define HAVE_FUNCTION_MACRO 1
9377 EOF
9378
9379 fi
9380
9381 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9382 echo "configure:9383: checking if gettimeofday takes tz argument" >&5
9383 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9384   echo $ac_n "(cached) $ac_c" 1>&6
9385 else
9386   
9387 if test "$cross_compiling" = yes; then
9388   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9389 else
9390   cat > conftest.$ac_ext <<EOF
9391 #line 9392 "configure"
9392 #include "confdefs.h"
9393
9394 #include <sys/time.h>
9395 #include <unistd.h>
9396 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9397 EOF
9398 if { (eval echo configure:9399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9399 then
9400   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9401 else
9402   echo "configure: failed program was:" >&5
9403   cat conftest.$ac_ext >&5
9404   rm -fr conftest*
9405   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9406 fi
9407 rm -fr conftest*
9408 fi
9409
9410 fi
9411
9412 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9413 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9414     cat >> confdefs.h <<\EOF
9415 #define HAVE_GETTIMEOFDAY_TZ 1
9416 EOF
9417
9418 fi
9419
9420 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9421 echo "configure:9422: checking for C99 vsnprintf" >&5
9422 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9423   echo $ac_n "(cached) $ac_c" 1>&6
9424 else
9425   
9426 if test "$cross_compiling" = yes; then
9427   samba_cv_HAVE_C99_VSNPRINTF=cross
9428 else
9429   cat > conftest.$ac_ext <<EOF
9430 #line 9431 "configure"
9431 #include "confdefs.h"
9432
9433 #include <sys/types.h>
9434 #include <stdarg.h>
9435 void foo(const char *format, ...) { 
9436        va_list ap;
9437        int len;
9438        char buf[5];
9439
9440        va_start(ap, format);
9441        len = vsnprintf(buf, 0, format, ap);
9442        va_end(ap);
9443        if (len != 5) exit(1);
9444
9445        va_start(ap, format);
9446        len = vsnprintf(0, 0, format, ap);
9447        va_end(ap);
9448        if (len != 5) exit(1);
9449
9450        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9451
9452        exit(0);
9453 }
9454 main() { foo("hello"); }
9455
9456 EOF
9457 if { (eval echo configure:9458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9458 then
9459   samba_cv_HAVE_C99_VSNPRINTF=yes
9460 else
9461   echo "configure: failed program was:" >&5
9462   cat conftest.$ac_ext >&5
9463   rm -fr conftest*
9464   samba_cv_HAVE_C99_VSNPRINTF=no
9465 fi
9466 rm -fr conftest*
9467 fi
9468
9469 fi
9470
9471 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9472 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9473     cat >> confdefs.h <<\EOF
9474 #define HAVE_C99_VSNPRINTF 1
9475 EOF
9476
9477 fi
9478
9479 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9480 echo "configure:9481: checking for broken readdir" >&5
9481 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9482   echo $ac_n "(cached) $ac_c" 1>&6
9483 else
9484   
9485 if test "$cross_compiling" = yes; then
9486   samba_cv_HAVE_BROKEN_READDIR=cross
9487 else
9488   cat > conftest.$ac_ext <<EOF
9489 #line 9490 "configure"
9490 #include "confdefs.h"
9491 #include <sys/types.h>
9492 #include <dirent.h>
9493 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9494 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9495 di->d_name[0] == 0) exit(0); exit(1);} 
9496 EOF
9497 if { (eval echo configure:9498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9498 then
9499   samba_cv_HAVE_BROKEN_READDIR=yes
9500 else
9501   echo "configure: failed program was:" >&5
9502   cat conftest.$ac_ext >&5
9503   rm -fr conftest*
9504   samba_cv_HAVE_BROKEN_READDIR=no
9505 fi
9506 rm -fr conftest*
9507 fi
9508
9509 fi
9510
9511 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9512 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9513     cat >> confdefs.h <<\EOF
9514 #define HAVE_BROKEN_READDIR 1
9515 EOF
9516
9517 fi
9518
9519 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9520 echo "configure:9521: checking for utimbuf" >&5
9521 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9522   echo $ac_n "(cached) $ac_c" 1>&6
9523 else
9524   
9525 cat > conftest.$ac_ext <<EOF
9526 #line 9527 "configure"
9527 #include "confdefs.h"
9528 #include <sys/types.h>
9529 #include <utime.h>
9530 int main() {
9531 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9532 ; return 0; }
9533 EOF
9534 if { (eval echo configure:9535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9535   rm -rf conftest*
9536   samba_cv_HAVE_UTIMBUF=yes
9537 else
9538   echo "configure: failed program was:" >&5
9539   cat conftest.$ac_ext >&5
9540   rm -rf conftest*
9541   samba_cv_HAVE_UTIMBUF=no
9542 fi
9543 rm -f conftest*
9544 fi
9545
9546 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9547 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9548     cat >> confdefs.h <<\EOF
9549 #define HAVE_UTIMBUF 1
9550 EOF
9551
9552 fi
9553
9554
9555 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9556 do
9557 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9558 echo "configure:9559: checking for $ac_func" >&5
9559 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9560   echo $ac_n "(cached) $ac_c" 1>&6
9561 else
9562   cat > conftest.$ac_ext <<EOF
9563 #line 9564 "configure"
9564 #include "confdefs.h"
9565 /* System header to define __stub macros and hopefully few prototypes,
9566     which can conflict with char $ac_func(); below.  */
9567 #include <assert.h>
9568 /* Override any gcc2 internal prototype to avoid an error.  */
9569 /* We use char because int might match the return type of a gcc2
9570     builtin and then its argument prototype would still apply.  */
9571 char $ac_func();
9572
9573 int main() {
9574
9575 /* The GNU C library defines this for functions which it implements
9576     to always fail with ENOSYS.  Some functions are actually named
9577     something starting with __ and the normal name is an alias.  */
9578 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9579 choke me
9580 #else
9581 $ac_func();
9582 #endif
9583
9584 ; return 0; }
9585 EOF
9586 if { (eval echo configure:9587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9587   rm -rf conftest*
9588   eval "ac_cv_func_$ac_func=yes"
9589 else
9590   echo "configure: failed program was:" >&5
9591   cat conftest.$ac_ext >&5
9592   rm -rf conftest*
9593   eval "ac_cv_func_$ac_func=no"
9594 fi
9595 rm -f conftest*
9596 fi
9597
9598 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9599   echo "$ac_t""yes" 1>&6
9600     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9601   cat >> confdefs.h <<EOF
9602 #define $ac_tr_func 1
9603 EOF
9604  
9605 else
9606   echo "$ac_t""no" 1>&6
9607 fi
9608 done
9609
9610
9611 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9612 echo "configure:9613: checking for ut_name in utmp" >&5
9613 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9614   echo $ac_n "(cached) $ac_c" 1>&6
9615 else
9616   
9617 cat > conftest.$ac_ext <<EOF
9618 #line 9619 "configure"
9619 #include "confdefs.h"
9620 #include <sys/types.h>
9621 #include <utmp.h>
9622 int main() {
9623 struct utmp ut;  ut.ut_name[0] = 'a';
9624 ; return 0; }
9625 EOF
9626 if { (eval echo configure:9627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9627   rm -rf conftest*
9628   samba_cv_HAVE_UT_UT_NAME=yes
9629 else
9630   echo "configure: failed program was:" >&5
9631   cat conftest.$ac_ext >&5
9632   rm -rf conftest*
9633   samba_cv_HAVE_UT_UT_NAME=no
9634 fi
9635 rm -f conftest*
9636 fi
9637
9638 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9639 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9640     cat >> confdefs.h <<\EOF
9641 #define HAVE_UT_UT_NAME 1
9642 EOF
9643
9644 fi 
9645
9646 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9647 echo "configure:9648: checking for ut_user in utmp" >&5
9648 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9649   echo $ac_n "(cached) $ac_c" 1>&6
9650 else
9651   
9652 cat > conftest.$ac_ext <<EOF
9653 #line 9654 "configure"
9654 #include "confdefs.h"
9655 #include <sys/types.h>
9656 #include <utmp.h>
9657 int main() {
9658 struct utmp ut;  ut.ut_user[0] = 'a';
9659 ; return 0; }
9660 EOF
9661 if { (eval echo configure:9662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9662   rm -rf conftest*
9663   samba_cv_HAVE_UT_UT_USER=yes
9664 else
9665   echo "configure: failed program was:" >&5
9666   cat conftest.$ac_ext >&5
9667   rm -rf conftest*
9668   samba_cv_HAVE_UT_UT_USER=no
9669 fi
9670 rm -f conftest*
9671 fi
9672
9673 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9674 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9675     cat >> confdefs.h <<\EOF
9676 #define HAVE_UT_UT_USER 1
9677 EOF
9678
9679 fi 
9680
9681 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9682 echo "configure:9683: checking for ut_id in utmp" >&5
9683 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9684   echo $ac_n "(cached) $ac_c" 1>&6
9685 else
9686   
9687 cat > conftest.$ac_ext <<EOF
9688 #line 9689 "configure"
9689 #include "confdefs.h"
9690 #include <sys/types.h>
9691 #include <utmp.h>
9692 int main() {
9693 struct utmp ut;  ut.ut_id[0] = 'a';
9694 ; return 0; }
9695 EOF
9696 if { (eval echo configure:9697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9697   rm -rf conftest*
9698   samba_cv_HAVE_UT_UT_ID=yes
9699 else
9700   echo "configure: failed program was:" >&5
9701   cat conftest.$ac_ext >&5
9702   rm -rf conftest*
9703   samba_cv_HAVE_UT_UT_ID=no
9704 fi
9705 rm -f conftest*
9706 fi
9707
9708 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9709 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9710     cat >> confdefs.h <<\EOF
9711 #define HAVE_UT_UT_ID 1
9712 EOF
9713
9714 fi 
9715
9716 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9717 echo "configure:9718: checking for ut_host in utmp" >&5
9718 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9719   echo $ac_n "(cached) $ac_c" 1>&6
9720 else
9721   
9722 cat > conftest.$ac_ext <<EOF
9723 #line 9724 "configure"
9724 #include "confdefs.h"
9725 #include <sys/types.h>
9726 #include <utmp.h>
9727 int main() {
9728 struct utmp ut;  ut.ut_host[0] = 'a';
9729 ; return 0; }
9730 EOF
9731 if { (eval echo configure:9732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9732   rm -rf conftest*
9733   samba_cv_HAVE_UT_UT_HOST=yes
9734 else
9735   echo "configure: failed program was:" >&5
9736   cat conftest.$ac_ext >&5
9737   rm -rf conftest*
9738   samba_cv_HAVE_UT_UT_HOST=no
9739 fi
9740 rm -f conftest*
9741 fi
9742
9743 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9744 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9745     cat >> confdefs.h <<\EOF
9746 #define HAVE_UT_UT_HOST 1
9747 EOF
9748
9749 fi 
9750
9751 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9752 echo "configure:9753: checking for ut_time in utmp" >&5
9753 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9754   echo $ac_n "(cached) $ac_c" 1>&6
9755 else
9756   
9757 cat > conftest.$ac_ext <<EOF
9758 #line 9759 "configure"
9759 #include "confdefs.h"
9760 #include <sys/types.h>
9761 #include <utmp.h>
9762 int main() {
9763 struct utmp ut;  time_t t; ut.ut_time = t;
9764 ; return 0; }
9765 EOF
9766 if { (eval echo configure:9767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9767   rm -rf conftest*
9768   samba_cv_HAVE_UT_UT_TIME=yes
9769 else
9770   echo "configure: failed program was:" >&5
9771   cat conftest.$ac_ext >&5
9772   rm -rf conftest*
9773   samba_cv_HAVE_UT_UT_TIME=no
9774 fi
9775 rm -f conftest*
9776 fi
9777
9778 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9779 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9780     cat >> confdefs.h <<\EOF
9781 #define HAVE_UT_UT_TIME 1
9782 EOF
9783
9784 fi 
9785
9786 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9787 echo "configure:9788: checking for ut_tv in utmp" >&5
9788 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9789   echo $ac_n "(cached) $ac_c" 1>&6
9790 else
9791   
9792 cat > conftest.$ac_ext <<EOF
9793 #line 9794 "configure"
9794 #include "confdefs.h"
9795 #include <sys/types.h>
9796 #include <utmp.h>
9797 int main() {
9798 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9799 ; return 0; }
9800 EOF
9801 if { (eval echo configure:9802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9802   rm -rf conftest*
9803   samba_cv_HAVE_UT_UT_TV=yes
9804 else
9805   echo "configure: failed program was:" >&5
9806   cat conftest.$ac_ext >&5
9807   rm -rf conftest*
9808   samba_cv_HAVE_UT_UT_TV=no
9809 fi
9810 rm -f conftest*
9811 fi
9812
9813 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9814 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9815     cat >> confdefs.h <<\EOF
9816 #define HAVE_UT_UT_TV 1
9817 EOF
9818
9819 fi 
9820
9821 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9822 echo "configure:9823: checking for ut_type in utmp" >&5
9823 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9824   echo $ac_n "(cached) $ac_c" 1>&6
9825 else
9826   
9827 cat > conftest.$ac_ext <<EOF
9828 #line 9829 "configure"
9829 #include "confdefs.h"
9830 #include <sys/types.h>
9831 #include <utmp.h>
9832 int main() {
9833 struct utmp ut;  ut.ut_type = 0;
9834 ; return 0; }
9835 EOF
9836 if { (eval echo configure:9837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9837   rm -rf conftest*
9838   samba_cv_HAVE_UT_UT_TYPE=yes
9839 else
9840   echo "configure: failed program was:" >&5
9841   cat conftest.$ac_ext >&5
9842   rm -rf conftest*
9843   samba_cv_HAVE_UT_UT_TYPE=no
9844 fi
9845 rm -f conftest*
9846 fi
9847
9848 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9849 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9850     cat >> confdefs.h <<\EOF
9851 #define HAVE_UT_UT_TYPE 1
9852 EOF
9853
9854 fi 
9855
9856 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9857 echo "configure:9858: checking for ut_pid in utmp" >&5
9858 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9859   echo $ac_n "(cached) $ac_c" 1>&6
9860 else
9861   
9862 cat > conftest.$ac_ext <<EOF
9863 #line 9864 "configure"
9864 #include "confdefs.h"
9865 #include <sys/types.h>
9866 #include <utmp.h>
9867 int main() {
9868 struct utmp ut;  ut.ut_pid = 0;
9869 ; return 0; }
9870 EOF
9871 if { (eval echo configure:9872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9872   rm -rf conftest*
9873   samba_cv_HAVE_UT_UT_PID=yes
9874 else
9875   echo "configure: failed program was:" >&5
9876   cat conftest.$ac_ext >&5
9877   rm -rf conftest*
9878   samba_cv_HAVE_UT_UT_PID=no
9879 fi
9880 rm -f conftest*
9881 fi
9882
9883 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9884 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9885     cat >> confdefs.h <<\EOF
9886 #define HAVE_UT_UT_PID 1
9887 EOF
9888
9889 fi 
9890
9891 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9892 echo "configure:9893: checking for ut_exit in utmp" >&5
9893 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9894   echo $ac_n "(cached) $ac_c" 1>&6
9895 else
9896   
9897 cat > conftest.$ac_ext <<EOF
9898 #line 9899 "configure"
9899 #include "confdefs.h"
9900 #include <sys/types.h>
9901 #include <utmp.h>
9902 int main() {
9903 struct utmp ut;  ut.ut_exit.e_exit = 0;
9904 ; return 0; }
9905 EOF
9906 if { (eval echo configure:9907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9907   rm -rf conftest*
9908   samba_cv_HAVE_UT_UT_EXIT=yes
9909 else
9910   echo "configure: failed program was:" >&5
9911   cat conftest.$ac_ext >&5
9912   rm -rf conftest*
9913   samba_cv_HAVE_UT_UT_EXIT=no
9914 fi
9915 rm -f conftest*
9916 fi
9917
9918 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9919 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9920     cat >> confdefs.h <<\EOF
9921 #define HAVE_UT_UT_EXIT 1
9922 EOF
9923
9924 fi 
9925
9926 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9927 echo "configure:9928: checking for ut_addr in utmp" >&5
9928 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9929   echo $ac_n "(cached) $ac_c" 1>&6
9930 else
9931   
9932 cat > conftest.$ac_ext <<EOF
9933 #line 9934 "configure"
9934 #include "confdefs.h"
9935 #include <sys/types.h>
9936 #include <utmp.h>
9937 int main() {
9938 struct utmp ut;  ut.ut_addr = 0;
9939 ; return 0; }
9940 EOF
9941 if { (eval echo configure:9942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9942   rm -rf conftest*
9943   samba_cv_HAVE_UT_UT_ADDR=yes
9944 else
9945   echo "configure: failed program was:" >&5
9946   cat conftest.$ac_ext >&5
9947   rm -rf conftest*
9948   samba_cv_HAVE_UT_UT_ADDR=no
9949 fi
9950 rm -f conftest*
9951 fi
9952
9953 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9954 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9955     cat >> confdefs.h <<\EOF
9956 #define HAVE_UT_UT_ADDR 1
9957 EOF
9958
9959 fi 
9960
9961 if test x$ac_cv_func_pututline = xyes ; then
9962   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9963 echo "configure:9964: checking whether pututline returns pointer" >&5
9964 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9965   echo $ac_n "(cached) $ac_c" 1>&6
9966 else
9967   
9968   cat > conftest.$ac_ext <<EOF
9969 #line 9970 "configure"
9970 #include "confdefs.h"
9971 #include <sys/types.h>
9972 #include <utmp.h>
9973 int main() {
9974 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9975 ; return 0; }
9976 EOF
9977 if { (eval echo configure:9978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9978   rm -rf conftest*
9979   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9980 else
9981   echo "configure: failed program was:" >&5
9982   cat conftest.$ac_ext >&5
9983   rm -rf conftest*
9984   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9985 fi
9986 rm -f conftest*
9987 fi
9988
9989 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9990   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9991       cat >> confdefs.h <<\EOF
9992 #define PUTUTLINE_RETURNS_UTMP 1
9993 EOF
9994
9995   fi
9996 fi
9997
9998 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9999 echo "configure:10000: checking for ut_syslen in utmpx" >&5
10000 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10001   echo $ac_n "(cached) $ac_c" 1>&6
10002 else
10003   
10004 cat > conftest.$ac_ext <<EOF
10005 #line 10006 "configure"
10006 #include "confdefs.h"
10007 #include <sys/types.h>
10008 #include <utmpx.h>
10009 int main() {
10010 struct utmpx ux;  ux.ut_syslen = 0;
10011 ; return 0; }
10012 EOF
10013 if { (eval echo configure:10014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10014   rm -rf conftest*
10015   samba_cv_HAVE_UX_UT_SYSLEN=yes
10016 else
10017   echo "configure: failed program was:" >&5
10018   cat conftest.$ac_ext >&5
10019   rm -rf conftest*
10020   samba_cv_HAVE_UX_UT_SYSLEN=no
10021 fi
10022 rm -f conftest*
10023 fi
10024
10025 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10026 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10027     cat >> confdefs.h <<\EOF
10028 #define HAVE_UX_UT_SYSLEN 1
10029 EOF
10030
10031 fi 
10032
10033
10034 #################################################
10035 # check for libiconv support
10036 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10037 echo "configure:10038: checking whether to use libiconv" >&5
10038 # Check whether --with-libiconv or --without-libiconv was given.
10039 if test "${with_libiconv+set}" = set; then
10040   withval="$with_libiconv"
10041    case "$withval" in
10042   no)
10043     echo "$ac_t""no" 1>&6
10044     ;;
10045   *)
10046     echo "$ac_t""yes" 1>&6
10047     CFLAGS="$CFLAGS -I$withval/include"
10048     LDFLAGS="$LDFLAGS -L$withval/lib"
10049     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10050 echo "configure:10051: checking for iconv_open in -liconv" >&5
10051 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10052 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10053   echo $ac_n "(cached) $ac_c" 1>&6
10054 else
10055   ac_save_LIBS="$LIBS"
10056 LIBS="-liconv  $LIBS"
10057 cat > conftest.$ac_ext <<EOF
10058 #line 10059 "configure"
10059 #include "confdefs.h"
10060 /* Override any gcc2 internal prototype to avoid an error.  */
10061 /* We use char because int might match the return type of a gcc2
10062     builtin and then its argument prototype would still apply.  */
10063 char iconv_open();
10064
10065 int main() {
10066 iconv_open()
10067 ; return 0; }
10068 EOF
10069 if { (eval echo configure:10070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10070   rm -rf conftest*
10071   eval "ac_cv_lib_$ac_lib_var=yes"
10072 else
10073   echo "configure: failed program was:" >&5
10074   cat conftest.$ac_ext >&5
10075   rm -rf conftest*
10076   eval "ac_cv_lib_$ac_lib_var=no"
10077 fi
10078 rm -f conftest*
10079 LIBS="$ac_save_LIBS"
10080
10081 fi
10082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10083   echo "$ac_t""yes" 1>&6
10084     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10085     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10086   cat >> confdefs.h <<EOF
10087 #define $ac_tr_lib 1
10088 EOF
10089
10090   LIBS="-liconv $LIBS"
10091
10092 else
10093   echo "$ac_t""no" 1>&6
10094 fi
10095
10096     cat >> confdefs.h <<EOF
10097 #define WITH_LIBICONV "${withval}"
10098 EOF
10099
10100     ;;
10101   esac 
10102 else
10103   echo "$ac_t""no" 1>&6
10104
10105 fi
10106
10107
10108
10109 ############
10110 # check for iconv in libc
10111 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10112 echo "configure:10113: checking for working iconv" >&5
10113 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10114   echo $ac_n "(cached) $ac_c" 1>&6
10115 else
10116   
10117 if test "$cross_compiling" = yes; then
10118   samba_cv_HAVE_NATIVE_ICONV=cross
10119 else
10120   cat > conftest.$ac_ext <<EOF
10121 #line 10122 "configure"
10122 #include "confdefs.h"
10123
10124 #include <iconv.h>
10125 main() {
10126        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10127        if (cd == 0 || cd == (iconv_t)-1) return -1;
10128        return 0;
10129 }
10130
10131 EOF
10132 if { (eval echo configure:10133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10133 then
10134   samba_cv_HAVE_NATIVE_ICONV=yes
10135 else
10136   echo "configure: failed program was:" >&5
10137   cat conftest.$ac_ext >&5
10138   rm -fr conftest*
10139   samba_cv_HAVE_NATIVE_ICONV=no
10140 fi
10141 rm -fr conftest*
10142 fi
10143
10144 fi
10145
10146 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10147 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10148     cat >> confdefs.h <<\EOF
10149 #define HAVE_NATIVE_ICONV 1
10150 EOF
10151
10152 fi
10153
10154
10155 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10156 echo "configure:10157: checking for Linux kernel oplocks" >&5
10157 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10158   echo $ac_n "(cached) $ac_c" 1>&6
10159 else
10160   
10161 if test "$cross_compiling" = yes; then
10162   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10163 else
10164   cat > conftest.$ac_ext <<EOF
10165 #line 10166 "configure"
10166 #include "confdefs.h"
10167
10168 #include <sys/types.h>
10169 #include <fcntl.h>
10170 #ifndef F_GETLEASE
10171 #define F_GETLEASE      1025
10172 #endif
10173 main() {
10174        int fd = open("/dev/null", O_RDONLY);
10175        return fcntl(fd, F_GETLEASE, 0) == -1;
10176 }
10177
10178 EOF
10179 if { (eval echo configure:10180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10180 then
10181   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10182 else
10183   echo "configure: failed program was:" >&5
10184   cat conftest.$ac_ext >&5
10185   rm -fr conftest*
10186   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10187 fi
10188 rm -fr conftest*
10189 fi
10190
10191 fi
10192
10193 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10194 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10195     cat >> confdefs.h <<\EOF
10196 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10197 EOF
10198
10199 fi
10200
10201 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10202 echo "configure:10203: checking for kernel change notify support" >&5
10203 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10204   echo $ac_n "(cached) $ac_c" 1>&6
10205 else
10206   
10207 if test "$cross_compiling" = yes; then
10208   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10209 else
10210   cat > conftest.$ac_ext <<EOF
10211 #line 10212 "configure"
10212 #include "confdefs.h"
10213
10214 #include <sys/types.h>
10215 #include <fcntl.h>
10216 #include <signal.h>
10217 #ifndef F_NOTIFY
10218 #define F_NOTIFY 1026
10219 #endif
10220 main() {
10221         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10222 }
10223
10224 EOF
10225 if { (eval echo configure:10226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10226 then
10227   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10228 else
10229   echo "configure: failed program was:" >&5
10230   cat conftest.$ac_ext >&5
10231   rm -fr conftest*
10232   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10233 fi
10234 rm -fr conftest*
10235 fi
10236
10237 fi
10238
10239 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10240 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10241     cat >> confdefs.h <<\EOF
10242 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10243 EOF
10244
10245 fi
10246
10247 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10248 echo "configure:10249: checking for kernel share modes" >&5
10249 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10250   echo $ac_n "(cached) $ac_c" 1>&6
10251 else
10252   
10253 if test "$cross_compiling" = yes; then
10254   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10255 else
10256   cat > conftest.$ac_ext <<EOF
10257 #line 10258 "configure"
10258 #include "confdefs.h"
10259
10260 #include <sys/types.h>
10261 #include <fcntl.h>
10262 #include <signal.h>
10263 #include <sys/file.h>
10264 #ifndef LOCK_MAND
10265 #define LOCK_MAND       32
10266 #define LOCK_READ       64
10267 #endif
10268 main() {
10269         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10270 }
10271
10272 EOF
10273 if { (eval echo configure:10274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10274 then
10275   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10276 else
10277   echo "configure: failed program was:" >&5
10278   cat conftest.$ac_ext >&5
10279   rm -fr conftest*
10280   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10281 fi
10282 rm -fr conftest*
10283 fi
10284
10285 fi
10286
10287 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10288 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10289     cat >> confdefs.h <<\EOF
10290 #define HAVE_KERNEL_SHARE_MODES 1
10291 EOF
10292
10293 fi
10294
10295
10296
10297
10298 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10299 echo "configure:10300: checking for IRIX kernel oplock type definitions" >&5
10300 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10301   echo $ac_n "(cached) $ac_c" 1>&6
10302 else
10303   
10304 cat > conftest.$ac_ext <<EOF
10305 #line 10306 "configure"
10306 #include "confdefs.h"
10307 #include <sys/types.h>
10308 #include <fcntl.h>
10309 int main() {
10310 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10311 ; return 0; }
10312 EOF
10313 if { (eval echo configure:10314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10314   rm -rf conftest*
10315   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10316 else
10317   echo "configure: failed program was:" >&5
10318   cat conftest.$ac_ext >&5
10319   rm -rf conftest*
10320   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10321 fi
10322 rm -f conftest*
10323 fi
10324
10325 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10326 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10327     cat >> confdefs.h <<\EOF
10328 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10329 EOF
10330
10331 fi
10332
10333 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10334 echo "configure:10335: checking for irix specific capabilities" >&5
10335 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10336   echo $ac_n "(cached) $ac_c" 1>&6
10337 else
10338   
10339 if test "$cross_compiling" = yes; then
10340   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10341 else
10342   cat > conftest.$ac_ext <<EOF
10343 #line 10344 "configure"
10344 #include "confdefs.h"
10345 #include <sys/types.h>
10346 #include <sys/capability.h>
10347 main() {
10348  cap_t cap;
10349  if ((cap = cap_get_proc()) == NULL)
10350    exit(1);
10351  cap->cap_effective |= CAP_NETWORK_MGT;
10352  cap->cap_inheritable |= CAP_NETWORK_MGT;
10353  cap_set_proc(cap);
10354  exit(0);
10355 }
10356
10357 EOF
10358 if { (eval echo configure:10359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10359 then
10360   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10361 else
10362   echo "configure: failed program was:" >&5
10363   cat conftest.$ac_ext >&5
10364   rm -fr conftest*
10365   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10366 fi
10367 rm -fr conftest*
10368 fi
10369
10370 fi
10371
10372 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10373 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10374     cat >> confdefs.h <<\EOF
10375 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10376 EOF
10377
10378 fi
10379
10380 #
10381 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10382 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10383 #
10384
10385 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10386 echo "configure:10387: checking for int16 typedef included by rpc/rpc.h" >&5
10387 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10388   echo $ac_n "(cached) $ac_c" 1>&6
10389 else
10390   
10391 cat > conftest.$ac_ext <<EOF
10392 #line 10393 "configure"
10393 #include "confdefs.h"
10394 #include <sys/types.h>
10395 #if defined(HAVE_RPC_RPC_H)
10396 #include <rpc/rpc.h>
10397 #endif
10398 int main() {
10399 int16 testvar;
10400 ; return 0; }
10401 EOF
10402 if { (eval echo configure:10403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10403   rm -rf conftest*
10404   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10405 else
10406   echo "configure: failed program was:" >&5
10407   cat conftest.$ac_ext >&5
10408   rm -rf conftest*
10409   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10410 fi
10411 rm -f conftest*
10412 fi
10413
10414 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10415 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10416     cat >> confdefs.h <<\EOF
10417 #define HAVE_INT16_FROM_RPC_RPC_H 1
10418 EOF
10419
10420 fi
10421
10422 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10423 echo "configure:10424: checking for uint16 typedef included by rpc/rpc.h" >&5
10424 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10425   echo $ac_n "(cached) $ac_c" 1>&6
10426 else
10427   
10428 cat > conftest.$ac_ext <<EOF
10429 #line 10430 "configure"
10430 #include "confdefs.h"
10431 #include <sys/types.h>
10432 #if defined(HAVE_RPC_RPC_H)
10433 #include <rpc/rpc.h>
10434 #endif
10435 int main() {
10436 uint16 testvar;
10437 ; return 0; }
10438 EOF
10439 if { (eval echo configure:10440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10440   rm -rf conftest*
10441   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10442 else
10443   echo "configure: failed program was:" >&5
10444   cat conftest.$ac_ext >&5
10445   rm -rf conftest*
10446   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10447 fi
10448 rm -f conftest*
10449 fi
10450
10451 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10452 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10453     cat >> confdefs.h <<\EOF
10454 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10455 EOF
10456
10457 fi
10458
10459 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10460 echo "configure:10461: checking for int32 typedef included by rpc/rpc.h" >&5
10461 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10462   echo $ac_n "(cached) $ac_c" 1>&6
10463 else
10464   
10465 cat > conftest.$ac_ext <<EOF
10466 #line 10467 "configure"
10467 #include "confdefs.h"
10468 #include <sys/types.h>
10469 #if defined(HAVE_RPC_RPC_H)
10470 #include <rpc/rpc.h>
10471 #endif
10472 int main() {
10473 int32 testvar;
10474 ; return 0; }
10475 EOF
10476 if { (eval echo configure:10477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10477   rm -rf conftest*
10478   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10479 else
10480   echo "configure: failed program was:" >&5
10481   cat conftest.$ac_ext >&5
10482   rm -rf conftest*
10483   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10484 fi
10485 rm -f conftest*
10486 fi
10487
10488 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10489 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10490     cat >> confdefs.h <<\EOF
10491 #define HAVE_INT32_FROM_RPC_RPC_H 1
10492 EOF
10493
10494 fi
10495
10496 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10497 echo "configure:10498: checking for uint32 typedef included by rpc/rpc.h" >&5
10498 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10499   echo $ac_n "(cached) $ac_c" 1>&6
10500 else
10501   
10502 cat > conftest.$ac_ext <<EOF
10503 #line 10504 "configure"
10504 #include "confdefs.h"
10505 #include <sys/types.h>
10506 #if defined(HAVE_RPC_RPC_H)
10507 #include <rpc/rpc.h>
10508 #endif
10509 int main() {
10510 uint32 testvar;
10511 ; return 0; }
10512 EOF
10513 if { (eval echo configure:10514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10514   rm -rf conftest*
10515   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10516 else
10517   echo "configure: failed program was:" >&5
10518   cat conftest.$ac_ext >&5
10519   rm -rf conftest*
10520   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10521 fi
10522 rm -f conftest*
10523 fi
10524
10525 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10526 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10527     cat >> confdefs.h <<\EOF
10528 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10529 EOF
10530
10531 fi
10532
10533
10534 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10535 echo "configure:10536: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10536 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10537   echo $ac_n "(cached) $ac_c" 1>&6
10538 else
10539   
10540 cat > conftest.$ac_ext <<EOF
10541 #line 10542 "configure"
10542 #include "confdefs.h"
10543 #include <sys/types.h>
10544 #ifdef HAVE_SYS_SECURITY_H
10545 #include <sys/security.h>
10546 #include <prot.h>
10547 #endif  /* HAVE_SYS_SECURITY_H */
10548 #if defined(HAVE_RPC_RPC_H)
10549 #include <rpc/rpc.h>
10550 #endif
10551 int main() {
10552 int testvar;
10553 ; return 0; }
10554 EOF
10555 if { (eval echo configure:10556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10556   rm -rf conftest*
10557   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10558 else
10559   echo "configure: failed program was:" >&5
10560   cat conftest.$ac_ext >&5
10561   rm -rf conftest*
10562   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10563 fi
10564 rm -f conftest*
10565 fi
10566
10567 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10568 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10569     cat >> confdefs.h <<\EOF
10570 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10571 EOF
10572
10573 fi
10574
10575 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10576 echo "configure:10577: checking for test routines" >&5
10577 if test "$cross_compiling" = yes; then
10578   echo "configure: warning: cannot run when cross-compiling" 1>&2
10579 else
10580   cat > conftest.$ac_ext <<EOF
10581 #line 10582 "configure"
10582 #include "confdefs.h"
10583 #include "${srcdir-.}/tests/trivial.c"
10584 EOF
10585 if { (eval echo configure:10586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10586 then
10587   echo "$ac_t""yes" 1>&6
10588 else
10589   echo "configure: failed program was:" >&5
10590   cat conftest.$ac_ext >&5
10591   rm -fr conftest*
10592   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10593 fi
10594 rm -fr conftest*
10595 fi
10596
10597
10598 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10599 echo "configure:10600: checking for ftruncate extend" >&5
10600 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10601   echo $ac_n "(cached) $ac_c" 1>&6
10602 else
10603   
10604 if test "$cross_compiling" = yes; then
10605   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10606 else
10607   cat > conftest.$ac_ext <<EOF
10608 #line 10609 "configure"
10609 #include "confdefs.h"
10610 #include "${srcdir-.}/tests/ftruncate.c"
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_FTRUNCATE_EXTEND=yes
10615 else
10616   echo "configure: failed program was:" >&5
10617   cat conftest.$ac_ext >&5
10618   rm -fr conftest*
10619   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10620 fi
10621 rm -fr conftest*
10622 fi
10623
10624 fi
10625
10626 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10627 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10628     cat >> confdefs.h <<\EOF
10629 #define HAVE_FTRUNCATE_EXTEND 1
10630 EOF
10631
10632 fi
10633
10634 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10635 echo "configure:10636: checking for AF_LOCAL socket support" >&5
10636 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10637   echo $ac_n "(cached) $ac_c" 1>&6
10638 else
10639   
10640 if test "$cross_compiling" = yes; then
10641   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10642 else
10643   cat > conftest.$ac_ext <<EOF
10644 #line 10645 "configure"
10645 #include "confdefs.h"
10646 #include "${srcdir-.}/tests/unixsock.c"
10647 EOF
10648 if { (eval echo configure:10649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10649 then
10650   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10651 else
10652   echo "configure: failed program was:" >&5
10653   cat conftest.$ac_ext >&5
10654   rm -fr conftest*
10655   samba_cv_HAVE_WORKING_AF_LOCAL=no
10656 fi
10657 rm -fr conftest*
10658 fi
10659
10660 fi
10661
10662 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10663 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10664 then
10665     cat >> confdefs.h <<\EOF
10666 #define HAVE_WORKING_AF_LOCAL 1
10667 EOF
10668
10669 fi
10670
10671 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10672 echo "configure:10673: checking for broken getgroups" >&5
10673 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10674   echo $ac_n "(cached) $ac_c" 1>&6
10675 else
10676   
10677 if test "$cross_compiling" = yes; then
10678   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10679 else
10680   cat > conftest.$ac_ext <<EOF
10681 #line 10682 "configure"
10682 #include "confdefs.h"
10683 #include "${srcdir-.}/tests/getgroups.c"
10684 EOF
10685 if { (eval echo configure:10686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10686 then
10687   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10688 else
10689   echo "configure: failed program was:" >&5
10690   cat conftest.$ac_ext >&5
10691   rm -fr conftest*
10692   samba_cv_HAVE_BROKEN_GETGROUPS=no
10693 fi
10694 rm -fr conftest*
10695 fi
10696
10697 fi
10698
10699 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10700 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10701     cat >> confdefs.h <<\EOF
10702 #define HAVE_BROKEN_GETGROUPS 1
10703 EOF
10704
10705 fi
10706
10707 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10708 echo "configure:10709: checking whether getpass should be replaced" >&5
10709 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10710   echo $ac_n "(cached) $ac_c" 1>&6
10711 else
10712   
10713 SAVE_CPPFLAGS="$CPPFLAGS"
10714 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10715 cat > conftest.$ac_ext <<EOF
10716 #line 10717 "configure"
10717 #include "confdefs.h"
10718
10719 #define REPLACE_GETPASS 1
10720 #define NO_CONFIG_H 1
10721 #define main dont_declare_main
10722 #include "${srcdir-.}/lib/getsmbpass.c"
10723 #undef main
10724
10725 int main() {
10726
10727 ; return 0; }
10728 EOF
10729 if { (eval echo configure:10730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10730   rm -rf conftest*
10731   samba_cv_REPLACE_GETPASS=yes
10732 else
10733   echo "configure: failed program was:" >&5
10734   cat conftest.$ac_ext >&5
10735   rm -rf conftest*
10736   samba_cv_REPLACE_GETPASS=no
10737 fi
10738 rm -f conftest*
10739 CPPFLAGS="$SAVE_CPPFLAGS"
10740
10741 fi
10742
10743 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10744 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10745         cat >> confdefs.h <<\EOF
10746 #define REPLACE_GETPASS 1
10747 EOF
10748
10749 fi
10750
10751 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10752 echo "configure:10753: checking for broken inet_ntoa" >&5
10753 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10754   echo $ac_n "(cached) $ac_c" 1>&6
10755 else
10756   
10757 if test "$cross_compiling" = yes; then
10758   samba_cv_REPLACE_INET_NTOA=cross
10759 else
10760   cat > conftest.$ac_ext <<EOF
10761 #line 10762 "configure"
10762 #include "confdefs.h"
10763
10764 #include <stdio.h>
10765 #include <sys/types.h>
10766 #include <netinet/in.h>
10767 #ifdef HAVE_ARPA_INET_H
10768 #include <arpa/inet.h>
10769 #endif
10770 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10771 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10772     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10773 exit(1);}
10774 EOF
10775 if { (eval echo configure:10776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10776 then
10777   samba_cv_REPLACE_INET_NTOA=yes
10778 else
10779   echo "configure: failed program was:" >&5
10780   cat conftest.$ac_ext >&5
10781   rm -fr conftest*
10782   samba_cv_REPLACE_INET_NTOA=no
10783 fi
10784 rm -fr conftest*
10785 fi
10786
10787 fi
10788
10789 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10790 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10791     cat >> confdefs.h <<\EOF
10792 #define REPLACE_INET_NTOA 1
10793 EOF
10794
10795 fi
10796
10797 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10798 echo "configure:10799: checking for secure mkstemp" >&5
10799 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10800   echo $ac_n "(cached) $ac_c" 1>&6
10801 else
10802   
10803 if test "$cross_compiling" = yes; then
10804   samba_cv_HAVE_SECURE_MKSTEMP=cross
10805 else
10806   cat > conftest.$ac_ext <<EOF
10807 #line 10808 "configure"
10808 #include "confdefs.h"
10809 #include <stdlib.h>
10810 #include <sys/types.h>
10811 #include <sys/stat.h>
10812 #include <unistd.h>
10813 main() { 
10814   struct stat st;
10815   char tpl[20]="/tmp/test.XXXXXX"; 
10816   int fd = mkstemp(tpl); 
10817   if (fd == -1) exit(1);
10818   unlink(tpl);
10819   if (fstat(fd, &st) != 0) exit(1);
10820   if ((st.st_mode & 0777) != 0600) exit(1);
10821   exit(0);
10822 }
10823 EOF
10824 if { (eval echo configure:10825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10825 then
10826   samba_cv_HAVE_SECURE_MKSTEMP=yes
10827 else
10828   echo "configure: failed program was:" >&5
10829   cat conftest.$ac_ext >&5
10830   rm -fr conftest*
10831   samba_cv_HAVE_SECURE_MKSTEMP=no
10832 fi
10833 rm -fr conftest*
10834 fi
10835
10836 fi
10837
10838 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10839 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10840     cat >> confdefs.h <<\EOF
10841 #define HAVE_SECURE_MKSTEMP 1
10842 EOF
10843
10844 fi
10845
10846 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10847 echo "configure:10848: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10848 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10849   echo $ac_n "(cached) $ac_c" 1>&6
10850 else
10851   
10852 if test "$cross_compiling" = yes; then
10853   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10854 else
10855   cat > conftest.$ac_ext <<EOF
10856 #line 10857 "configure"
10857 #include "confdefs.h"
10858 #include <unistd.h>
10859 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10860 EOF
10861 if { (eval echo configure:10862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10862 then
10863   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10864 else
10865   echo "configure: failed program was:" >&5
10866   cat conftest.$ac_ext >&5
10867   rm -fr conftest*
10868   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10869 fi
10870 rm -fr conftest*
10871 fi
10872
10873 fi
10874
10875 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10876 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10877     cat >> confdefs.h <<\EOF
10878 #define SYSCONF_SC_NGROUPS_MAX 1
10879 EOF
10880
10881 fi
10882
10883 echo $ac_n "checking for root""... $ac_c" 1>&6
10884 echo "configure:10885: checking for root" >&5
10885 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10886   echo $ac_n "(cached) $ac_c" 1>&6
10887 else
10888   
10889 if test "$cross_compiling" = yes; then
10890   samba_cv_HAVE_ROOT=cross
10891 else
10892   cat > conftest.$ac_ext <<EOF
10893 #line 10894 "configure"
10894 #include "confdefs.h"
10895 main() { exit(getuid() != 0); }
10896 EOF
10897 if { (eval echo configure:10898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10898 then
10899   samba_cv_HAVE_ROOT=yes
10900 else
10901   echo "configure: failed program was:" >&5
10902   cat conftest.$ac_ext >&5
10903   rm -fr conftest*
10904   samba_cv_HAVE_ROOT=no
10905 fi
10906 rm -fr conftest*
10907 fi
10908
10909 fi
10910
10911 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10912 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10913     cat >> confdefs.h <<\EOF
10914 #define HAVE_ROOT 1
10915 EOF
10916
10917 else
10918     echo "configure: warning: running as non-root will disable some tests" 1>&2
10919 fi
10920
10921 ##################
10922 # look for a method of finding the list of network interfaces
10923 iface=no;
10924 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10925 echo "configure:10926: checking for iface AIX" >&5
10926 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10927   echo $ac_n "(cached) $ac_c" 1>&6
10928 else
10929   
10930 if test "$cross_compiling" = yes; then
10931   samba_cv_HAVE_IFACE_AIX=cross
10932 else
10933   cat > conftest.$ac_ext <<EOF
10934 #line 10935 "configure"
10935 #include "confdefs.h"
10936
10937 #define HAVE_IFACE_AIX 1
10938 #define AUTOCONF_TEST 1
10939 #include "confdefs.h"
10940 #include "${srcdir-.}/lib/interfaces.c"
10941 EOF
10942 if { (eval echo configure:10943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10943 then
10944   samba_cv_HAVE_IFACE_AIX=yes
10945 else
10946   echo "configure: failed program was:" >&5
10947   cat conftest.$ac_ext >&5
10948   rm -fr conftest*
10949   samba_cv_HAVE_IFACE_AIX=no
10950 fi
10951 rm -fr conftest*
10952 fi
10953
10954 fi
10955
10956 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10957 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10958     iface=yes;cat >> confdefs.h <<\EOF
10959 #define HAVE_IFACE_AIX 1
10960 EOF
10961
10962 fi
10963
10964 if test $iface = no; then
10965 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10966 echo "configure:10967: checking for iface ifconf" >&5
10967 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10968   echo $ac_n "(cached) $ac_c" 1>&6
10969 else
10970   
10971 if test "$cross_compiling" = yes; then
10972   samba_cv_HAVE_IFACE_IFCONF=cross
10973 else
10974   cat > conftest.$ac_ext <<EOF
10975 #line 10976 "configure"
10976 #include "confdefs.h"
10977
10978 #define HAVE_IFACE_IFCONF 1
10979 #define AUTOCONF_TEST 1
10980 #include "confdefs.h"
10981 #include "${srcdir-.}/lib/interfaces.c"
10982 EOF
10983 if { (eval echo configure:10984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10984 then
10985   samba_cv_HAVE_IFACE_IFCONF=yes
10986 else
10987   echo "configure: failed program was:" >&5
10988   cat conftest.$ac_ext >&5
10989   rm -fr conftest*
10990   samba_cv_HAVE_IFACE_IFCONF=no
10991 fi
10992 rm -fr conftest*
10993 fi
10994
10995 fi
10996
10997 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10998 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10999     iface=yes;cat >> confdefs.h <<\EOF
11000 #define HAVE_IFACE_IFCONF 1
11001 EOF
11002
11003 fi
11004 fi
11005
11006 if test $iface = no; then
11007 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11008 echo "configure:11009: checking for iface ifreq" >&5
11009 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11010   echo $ac_n "(cached) $ac_c" 1>&6
11011 else
11012   
11013 if test "$cross_compiling" = yes; then
11014   samba_cv_HAVE_IFACE_IFREQ=cross
11015 else
11016   cat > conftest.$ac_ext <<EOF
11017 #line 11018 "configure"
11018 #include "confdefs.h"
11019
11020 #define HAVE_IFACE_IFREQ 1
11021 #define AUTOCONF_TEST 1
11022 #include "confdefs.h"
11023 #include "${srcdir-.}/lib/interfaces.c"
11024 EOF
11025 if { (eval echo configure:11026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11026 then
11027   samba_cv_HAVE_IFACE_IFREQ=yes
11028 else
11029   echo "configure: failed program was:" >&5
11030   cat conftest.$ac_ext >&5
11031   rm -fr conftest*
11032   samba_cv_HAVE_IFACE_IFREQ=no
11033 fi
11034 rm -fr conftest*
11035 fi
11036
11037 fi
11038
11039 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11040 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11041     iface=yes;cat >> confdefs.h <<\EOF
11042 #define HAVE_IFACE_IFREQ 1
11043 EOF
11044
11045 fi
11046 fi
11047
11048
11049 ################################################
11050 # look for a method of setting the effective uid
11051 seteuid=no;
11052 if test $seteuid = no; then
11053 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11054 echo "configure:11055: checking for setresuid" >&5
11055 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11056   echo $ac_n "(cached) $ac_c" 1>&6
11057 else
11058   
11059 if test "$cross_compiling" = yes; then
11060   samba_cv_USE_SETRESUID=cross
11061 else
11062   cat > conftest.$ac_ext <<EOF
11063 #line 11064 "configure"
11064 #include "confdefs.h"
11065
11066 #define AUTOCONF_TEST 1
11067 #define USE_SETRESUID 1
11068 #include "confdefs.h"
11069 #include "${srcdir-.}/lib/util_sec.c"
11070 EOF
11071 if { (eval echo configure:11072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11072 then
11073   samba_cv_USE_SETRESUID=yes
11074 else
11075   echo "configure: failed program was:" >&5
11076   cat conftest.$ac_ext >&5
11077   rm -fr conftest*
11078   samba_cv_USE_SETRESUID=no
11079 fi
11080 rm -fr conftest*
11081 fi
11082
11083 fi
11084
11085 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11086 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11087     seteuid=yes;cat >> confdefs.h <<\EOF
11088 #define USE_SETRESUID 1
11089 EOF
11090
11091 fi
11092 fi
11093
11094
11095 if test $seteuid = no; then
11096 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11097 echo "configure:11098: checking for setreuid" >&5
11098 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11099   echo $ac_n "(cached) $ac_c" 1>&6
11100 else
11101   
11102 if test "$cross_compiling" = yes; then
11103   samba_cv_USE_SETREUID=cross
11104 else
11105   cat > conftest.$ac_ext <<EOF
11106 #line 11107 "configure"
11107 #include "confdefs.h"
11108
11109 #define AUTOCONF_TEST 1
11110 #define USE_SETREUID 1
11111 #include "confdefs.h"
11112 #include "${srcdir-.}/lib/util_sec.c"
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_USE_SETREUID=yes
11117 else
11118   echo "configure: failed program was:" >&5
11119   cat conftest.$ac_ext >&5
11120   rm -fr conftest*
11121   samba_cv_USE_SETREUID=no
11122 fi
11123 rm -fr conftest*
11124 fi
11125
11126 fi
11127
11128 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11129 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11130     seteuid=yes;cat >> confdefs.h <<\EOF
11131 #define USE_SETREUID 1
11132 EOF
11133
11134 fi
11135 fi
11136
11137 if test $seteuid = no; then
11138 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11139 echo "configure:11140: checking for seteuid" >&5
11140 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11141   echo $ac_n "(cached) $ac_c" 1>&6
11142 else
11143   
11144 if test "$cross_compiling" = yes; then
11145   samba_cv_USE_SETEUID=cross
11146 else
11147   cat > conftest.$ac_ext <<EOF
11148 #line 11149 "configure"
11149 #include "confdefs.h"
11150
11151 #define AUTOCONF_TEST 1
11152 #define USE_SETEUID 1
11153 #include "confdefs.h"
11154 #include "${srcdir-.}/lib/util_sec.c"
11155 EOF
11156 if { (eval echo configure:11157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11157 then
11158   samba_cv_USE_SETEUID=yes
11159 else
11160   echo "configure: failed program was:" >&5
11161   cat conftest.$ac_ext >&5
11162   rm -fr conftest*
11163   samba_cv_USE_SETEUID=no
11164 fi
11165 rm -fr conftest*
11166 fi
11167
11168 fi
11169
11170 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11171 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11172     seteuid=yes;cat >> confdefs.h <<\EOF
11173 #define USE_SETEUID 1
11174 EOF
11175
11176 fi
11177 fi
11178
11179 if test $seteuid = no; then
11180 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11181 echo "configure:11182: checking for setuidx" >&5
11182 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11183   echo $ac_n "(cached) $ac_c" 1>&6
11184 else
11185   
11186 if test "$cross_compiling" = yes; then
11187   samba_cv_USE_SETUIDX=cross
11188 else
11189   cat > conftest.$ac_ext <<EOF
11190 #line 11191 "configure"
11191 #include "confdefs.h"
11192
11193 #define AUTOCONF_TEST 1
11194 #define USE_SETUIDX 1
11195 #include "confdefs.h"
11196 #include "${srcdir-.}/lib/util_sec.c"
11197 EOF
11198 if { (eval echo configure:11199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11199 then
11200   samba_cv_USE_SETUIDX=yes
11201 else
11202   echo "configure: failed program was:" >&5
11203   cat conftest.$ac_ext >&5
11204   rm -fr conftest*
11205   samba_cv_USE_SETUIDX=no
11206 fi
11207 rm -fr conftest*
11208 fi
11209
11210 fi
11211
11212 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11213 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11214     seteuid=yes;cat >> confdefs.h <<\EOF
11215 #define USE_SETUIDX 1
11216 EOF
11217
11218 fi
11219 fi
11220
11221
11222 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11223 echo "configure:11224: checking for working mmap" >&5
11224 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+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_MMAP=cross
11230 else
11231   cat > conftest.$ac_ext <<EOF
11232 #line 11233 "configure"
11233 #include "confdefs.h"
11234 #include "${srcdir-.}/tests/shared_mmap.c"
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_MMAP=yes
11239 else
11240   echo "configure: failed program was:" >&5
11241   cat conftest.$ac_ext >&5
11242   rm -fr conftest*
11243   samba_cv_HAVE_MMAP=no
11244 fi
11245 rm -fr conftest*
11246 fi
11247
11248 fi
11249
11250 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11251 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11252     cat >> confdefs.h <<\EOF
11253 #define HAVE_MMAP 1
11254 EOF
11255
11256 fi
11257
11258 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11259 echo "configure:11260: checking for ftruncate needs root" >&5
11260 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11261   echo $ac_n "(cached) $ac_c" 1>&6
11262 else
11263   
11264 if test "$cross_compiling" = yes; then
11265   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11266 else
11267   cat > conftest.$ac_ext <<EOF
11268 #line 11269 "configure"
11269 #include "confdefs.h"
11270 #include "${srcdir-.}/tests/ftruncroot.c"
11271 EOF
11272 if { (eval echo configure:11273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11273 then
11274   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11275 else
11276   echo "configure: failed program was:" >&5
11277   cat conftest.$ac_ext >&5
11278   rm -fr conftest*
11279   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11280 fi
11281 rm -fr conftest*
11282 fi
11283
11284 fi
11285
11286 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11287 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11288     cat >> confdefs.h <<\EOF
11289 #define FTRUNCATE_NEEDS_ROOT 1
11290 EOF
11291
11292 fi
11293
11294 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11295 echo "configure:11296: checking for fcntl locking" >&5
11296 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11297   echo $ac_n "(cached) $ac_c" 1>&6
11298 else
11299   
11300 if test "$cross_compiling" = yes; then
11301   samba_cv_HAVE_FCNTL_LOCK=cross
11302 else
11303   cat > conftest.$ac_ext <<EOF
11304 #line 11305 "configure"
11305 #include "confdefs.h"
11306 #include "${srcdir-.}/tests/fcntl_lock.c"
11307 EOF
11308 if { (eval echo configure:11309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11309 then
11310   samba_cv_HAVE_FCNTL_LOCK=yes
11311 else
11312   echo "configure: failed program was:" >&5
11313   cat conftest.$ac_ext >&5
11314   rm -fr conftest*
11315   samba_cv_HAVE_FCNTL_LOCK=no
11316 fi
11317 rm -fr conftest*
11318 fi
11319
11320 fi
11321
11322 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11323 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11324     cat >> confdefs.h <<\EOF
11325 #define HAVE_FCNTL_LOCK 1
11326 EOF
11327
11328 fi
11329
11330 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11331 echo "configure:11332: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11332 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11333   echo $ac_n "(cached) $ac_c" 1>&6
11334 else
11335   
11336 if test "$cross_compiling" = yes; then
11337   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11338 else
11339   cat > conftest.$ac_ext <<EOF
11340 #line 11341 "configure"
11341 #include "confdefs.h"
11342 #include "${srcdir-.}/tests/fcntl_lock64.c"
11343 EOF
11344 if { (eval echo configure:11345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11345 then
11346   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11347 else
11348   echo "configure: failed program was:" >&5
11349   cat conftest.$ac_ext >&5
11350   rm -fr conftest*
11351   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11352 fi
11353 rm -fr conftest*
11354 fi
11355
11356 fi
11357
11358 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11359 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11360     cat >> confdefs.h <<\EOF
11361 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11362 EOF
11363
11364
11365 else
11366
11367
11368   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11369 echo "configure:11370: checking for 64 bit fcntl locking" >&5
11370 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11371   echo $ac_n "(cached) $ac_c" 1>&6
11372 else
11373   
11374   if test "$cross_compiling" = yes; then
11375   samba_cv_HAVE_STRUCT_FLOCK64=cross
11376 else
11377   cat > conftest.$ac_ext <<EOF
11378 #line 11379 "configure"
11379 #include "confdefs.h"
11380
11381 #if defined(HAVE_UNISTD_H)
11382 #include <unistd.h>
11383 #endif
11384 #include <stdio.h>
11385 #include <stdlib.h>
11386
11387 #ifdef HAVE_FCNTL_H
11388 #include <fcntl.h>
11389 #endif
11390
11391 #ifdef HAVE_SYS_FCNTL_H
11392 #include <sys/fcntl.h>
11393 #endif
11394 main() { struct flock64 fl64;
11395 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11396 exit(0);
11397 #else
11398 exit(1);
11399 #endif
11400 }
11401 EOF
11402 if { (eval echo configure:11403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11403 then
11404   samba_cv_HAVE_STRUCT_FLOCK64=yes
11405 else
11406   echo "configure: failed program was:" >&5
11407   cat conftest.$ac_ext >&5
11408   rm -fr conftest*
11409   samba_cv_HAVE_STRUCT_FLOCK64=no
11410 fi
11411 rm -fr conftest*
11412 fi
11413
11414 fi
11415
11416 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11417
11418   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11419       cat >> confdefs.h <<\EOF
11420 #define HAVE_STRUCT_FLOCK64 1
11421 EOF
11422
11423   fi
11424 fi
11425
11426 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11427 echo "configure:11428: checking for st_blocks in struct stat" >&5
11428 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11429   echo $ac_n "(cached) $ac_c" 1>&6
11430 else
11431   
11432 cat > conftest.$ac_ext <<EOF
11433 #line 11434 "configure"
11434 #include "confdefs.h"
11435 #include <sys/types.h>
11436 #include <sys/stat.h>
11437 #include <unistd.h>
11438 int main() {
11439 struct stat st;  st.st_blocks = 0;
11440 ; return 0; }
11441 EOF
11442 if { (eval echo configure:11443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11443   rm -rf conftest*
11444   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11445 else
11446   echo "configure: failed program was:" >&5
11447   cat conftest.$ac_ext >&5
11448   rm -rf conftest*
11449   samba_cv_HAVE_STAT_ST_BLOCKS=no
11450 fi
11451 rm -f conftest*
11452 fi
11453
11454 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11455 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11456     cat >> confdefs.h <<\EOF
11457 #define HAVE_STAT_ST_BLOCKS 1
11458 EOF
11459
11460 fi 
11461
11462 case "$host_os" in
11463 *linux*)
11464 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11465 echo "configure:11466: checking for broken RedHat 7.2 system header files" >&5
11466 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11467   echo $ac_n "(cached) $ac_c" 1>&6
11468 else
11469   
11470 cat > conftest.$ac_ext <<EOF
11471 #line 11472 "configure"
11472 #include "confdefs.h"
11473
11474 #ifdef HAVE_SYS_VFS_H
11475 #include <sys/vfs.h>
11476 #endif
11477 #ifdef HAVE_SYS_CAPABILITY_H
11478 #include <sys/capability.h>
11479 #endif
11480
11481 int main() {
11482 int i;
11483 ; return 0; }
11484 EOF
11485 if { (eval echo configure:11486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11486   rm -rf conftest*
11487   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11488 else
11489   echo "configure: failed program was:" >&5
11490   cat conftest.$ac_ext >&5
11491   rm -rf conftest*
11492   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11493 fi
11494 rm -f conftest*
11495 fi
11496
11497 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11498 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11499    cat >> confdefs.h <<\EOF
11500 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11501 EOF
11502
11503 fi
11504 ;;
11505 esac
11506
11507 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11508 echo "configure:11509: checking for broken nisplus include files" >&5
11509 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11510   echo $ac_n "(cached) $ac_c" 1>&6
11511 else
11512   
11513 cat > conftest.$ac_ext <<EOF
11514 #line 11515 "configure"
11515 #include "confdefs.h"
11516 #include <sys/acl.h>
11517 #if defined(HAVE_RPCSVC_NIS_H)
11518 #include <rpcsvc/nis.h>
11519 #endif
11520 int main() {
11521 int i;
11522 ; return 0; }
11523 EOF
11524 if { (eval echo configure:11525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11525   rm -rf conftest*
11526   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11527 else
11528   echo "configure: failed program was:" >&5
11529   cat conftest.$ac_ext >&5
11530   rm -rf conftest*
11531   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11532 fi
11533 rm -f conftest*
11534 fi
11535
11536 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11537 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11538     cat >> confdefs.h <<\EOF
11539 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11540 EOF
11541
11542 fi
11543
11544
11545 #################################################
11546 # check for smbwrapper support
11547 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11548 echo "configure:11549: checking whether to use smbwrapper" >&5
11549 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11550 if test "${with_smbwrapper+set}" = set; then
11551   withval="$with_smbwrapper"
11552    case "$withval" in
11553   yes)
11554     echo "$ac_t""yes" 1>&6
11555     cat >> confdefs.h <<\EOF
11556 #define WITH_SMBWRAPPER 1
11557 EOF
11558
11559         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11560
11561         if test x$ATTEMPT_WRAP32_BUILD = x; then
11562                 WRAP32=""
11563         else
11564                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11565         fi
11566
11567 # Conditions under which smbwrapper should not be built.
11568
11569         if test x$PICFLAG = x; then
11570            echo No support for PIC code - disabling smbwrapper and smbsh
11571            WRAP=""
11572            WRAP32=""
11573         elif test x$ac_cv_func_syscall = xno; then
11574            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11575            WRAP=""
11576            WRAP32=""
11577         fi
11578     ;;
11579   *)
11580     echo "$ac_t""no" 1>&6
11581     ;;
11582   esac 
11583 else
11584   echo "$ac_t""no" 1>&6
11585
11586 fi
11587
11588
11589 #################################################
11590 # check for AFS clear-text auth support
11591 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11592 echo "configure:11593: checking whether to use AFS clear-text auth" >&5
11593 # Check whether --with-afs or --without-afs was given.
11594 if test "${with_afs+set}" = set; then
11595   withval="$with_afs"
11596    case "$withval" in
11597   yes)
11598     echo "$ac_t""yes" 1>&6
11599     cat >> confdefs.h <<\EOF
11600 #define WITH_AFS 1
11601 EOF
11602
11603     ;;
11604   *)
11605     echo "$ac_t""no" 1>&6
11606     ;;
11607   esac 
11608 else
11609   echo "$ac_t""no" 1>&6
11610
11611 fi
11612
11613
11614
11615 #################################################
11616 # check for the DFS clear-text auth system
11617 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11618 echo "configure:11619: checking whether to use DFS clear-text auth" >&5
11619 # Check whether --with-dfs or --without-dfs was given.
11620 if test "${with_dfs+set}" = set; then
11621   withval="$with_dfs"
11622    case "$withval" in
11623   yes)
11624     echo "$ac_t""yes" 1>&6
11625     cat >> confdefs.h <<\EOF
11626 #define WITH_DFS 1
11627 EOF
11628
11629     ;;
11630   *)
11631     echo "$ac_t""no" 1>&6
11632     ;;
11633   esac 
11634 else
11635   echo "$ac_t""no" 1>&6
11636
11637 fi
11638
11639
11640
11641 #################################################
11642 # see if this box has the RedHat location for kerberos
11643 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11644 echo "configure:11645: checking for /usr/kerberos" >&5
11645 if test -d /usr/kerberos; then
11646     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11647     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11648     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11649     echo "$ac_t""yes" 1>&6
11650 else
11651     echo "$ac_t""no" 1>&6
11652 fi
11653
11654 #################################################
11655 # check for location of Kerberos 5 install
11656 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11657 echo "configure:11658: checking for kerberos 5 install path" >&5
11658 # Check whether --with-krb5 or --without-krb5 was given.
11659 if test "${with_krb5+set}" = set; then
11660   withval="$with_krb5"
11661    case "$withval" in
11662   no)
11663     echo "$ac_t""no" 1>&6
11664     ;;
11665   *)
11666     echo "$ac_t""yes" 1>&6
11667     LIBS="$LIBS -lkrb5"
11668     CFLAGS="$CFLAGS -I$withval/include"
11669     CPPFLAGS="$CPPFLAGS -I$withval/include"
11670     LDFLAGS="$LDFLAGS -L$withval/lib"
11671     ;;
11672   esac 
11673 else
11674   echo "$ac_t""no" 1>&6
11675
11676 fi
11677
11678
11679 # now check for krb5.h. Some systems have the libraries without the headers!
11680 # note that this check is done here to allow for different kerberos
11681 # include paths
11682 for ac_hdr in krb5.h
11683 do
11684 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11685 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11686 echo "configure:11687: checking for $ac_hdr" >&5
11687 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11688   echo $ac_n "(cached) $ac_c" 1>&6
11689 else
11690   cat > conftest.$ac_ext <<EOF
11691 #line 11692 "configure"
11692 #include "confdefs.h"
11693 #include <$ac_hdr>
11694 EOF
11695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11696 { (eval echo configure:11697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11698 if test -z "$ac_err"; then
11699   rm -rf conftest*
11700   eval "ac_cv_header_$ac_safe=yes"
11701 else
11702   echo "$ac_err" >&5
11703   echo "configure: failed program was:" >&5
11704   cat conftest.$ac_ext >&5
11705   rm -rf conftest*
11706   eval "ac_cv_header_$ac_safe=no"
11707 fi
11708 rm -f conftest*
11709 fi
11710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11711   echo "$ac_t""yes" 1>&6
11712     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11713   cat >> confdefs.h <<EOF
11714 #define $ac_tr_hdr 1
11715 EOF
11716  
11717 else
11718   echo "$ac_t""no" 1>&6
11719 fi
11720 done
11721
11722
11723 # now check for gssapi headers.  This is also done here to allow for
11724 # different kerberos include paths
11725 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
11726 do
11727 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11728 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11729 echo "configure:11730: checking for $ac_hdr" >&5
11730 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11731   echo $ac_n "(cached) $ac_c" 1>&6
11732 else
11733   cat > conftest.$ac_ext <<EOF
11734 #line 11735 "configure"
11735 #include "confdefs.h"
11736 #include <$ac_hdr>
11737 EOF
11738 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11739 { (eval echo configure:11740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11740 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11741 if test -z "$ac_err"; then
11742   rm -rf conftest*
11743   eval "ac_cv_header_$ac_safe=yes"
11744 else
11745   echo "$ac_err" >&5
11746   echo "configure: failed program was:" >&5
11747   cat conftest.$ac_ext >&5
11748   rm -rf conftest*
11749   eval "ac_cv_header_$ac_safe=no"
11750 fi
11751 rm -f conftest*
11752 fi
11753 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11754   echo "$ac_t""yes" 1>&6
11755     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11756   cat >> confdefs.h <<EOF
11757 #define $ac_tr_hdr 1
11758 EOF
11759  
11760 else
11761   echo "$ac_t""no" 1>&6
11762 fi
11763 done
11764
11765
11766 ##################################################################
11767 # we might need the k5crypto and com_err libraries on some systems
11768 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11769 echo "configure:11770: checking for _et_list in -lcom_err" >&5
11770 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11771 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11772   echo $ac_n "(cached) $ac_c" 1>&6
11773 else
11774   ac_save_LIBS="$LIBS"
11775 LIBS="-lcom_err  $LIBS"
11776 cat > conftest.$ac_ext <<EOF
11777 #line 11778 "configure"
11778 #include "confdefs.h"
11779 /* Override any gcc2 internal prototype to avoid an error.  */
11780 /* We use char because int might match the return type of a gcc2
11781     builtin and then its argument prototype would still apply.  */
11782 char _et_list();
11783
11784 int main() {
11785 _et_list()
11786 ; return 0; }
11787 EOF
11788 if { (eval echo configure:11789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11789   rm -rf conftest*
11790   eval "ac_cv_lib_$ac_lib_var=yes"
11791 else
11792   echo "configure: failed program was:" >&5
11793   cat conftest.$ac_ext >&5
11794   rm -rf conftest*
11795   eval "ac_cv_lib_$ac_lib_var=no"
11796 fi
11797 rm -f conftest*
11798 LIBS="$ac_save_LIBS"
11799
11800 fi
11801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11802   echo "$ac_t""yes" 1>&6
11803   LIBS="$LIBS -lcom_err"
11804 else
11805   echo "$ac_t""no" 1>&6
11806 fi
11807
11808 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11809 echo "configure:11810: checking for krb5_encrypt_data in -lk5crypto" >&5
11810 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11811 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11812   echo $ac_n "(cached) $ac_c" 1>&6
11813 else
11814   ac_save_LIBS="$LIBS"
11815 LIBS="-lk5crypto  $LIBS"
11816 cat > conftest.$ac_ext <<EOF
11817 #line 11818 "configure"
11818 #include "confdefs.h"
11819 /* Override any gcc2 internal prototype to avoid an error.  */
11820 /* We use char because int might match the return type of a gcc2
11821     builtin and then its argument prototype would still apply.  */
11822 char krb5_encrypt_data();
11823
11824 int main() {
11825 krb5_encrypt_data()
11826 ; return 0; }
11827 EOF
11828 if { (eval echo configure:11829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11829   rm -rf conftest*
11830   eval "ac_cv_lib_$ac_lib_var=yes"
11831 else
11832   echo "configure: failed program was:" >&5
11833   cat conftest.$ac_ext >&5
11834   rm -rf conftest*
11835   eval "ac_cv_lib_$ac_lib_var=no"
11836 fi
11837 rm -f conftest*
11838 LIBS="$ac_save_LIBS"
11839
11840 fi
11841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11842   echo "$ac_t""yes" 1>&6
11843   LIBS="$LIBS -lk5crypto"
11844 else
11845   echo "$ac_t""no" 1>&6
11846 fi
11847
11848
11849 ########################################################
11850 # now see if we can find the krb5 libs in standard paths
11851 # or as specified above
11852 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11853 echo "configure:11854: checking for krb5_mk_req_extended in -lkrb5" >&5
11854 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11855 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11856   echo $ac_n "(cached) $ac_c" 1>&6
11857 else
11858   ac_save_LIBS="$LIBS"
11859 LIBS="-lkrb5  $LIBS"
11860 cat > conftest.$ac_ext <<EOF
11861 #line 11862 "configure"
11862 #include "confdefs.h"
11863 /* Override any gcc2 internal prototype to avoid an error.  */
11864 /* We use char because int might match the return type of a gcc2
11865     builtin and then its argument prototype would still apply.  */
11866 char krb5_mk_req_extended();
11867
11868 int main() {
11869 krb5_mk_req_extended()
11870 ; return 0; }
11871 EOF
11872 if { (eval echo configure:11873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11873   rm -rf conftest*
11874   eval "ac_cv_lib_$ac_lib_var=yes"
11875 else
11876   echo "configure: failed program was:" >&5
11877   cat conftest.$ac_ext >&5
11878   rm -rf conftest*
11879   eval "ac_cv_lib_$ac_lib_var=no"
11880 fi
11881 rm -f conftest*
11882 LIBS="$ac_save_LIBS"
11883
11884 fi
11885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11886   echo "$ac_t""yes" 1>&6
11887   LIBS="$LIBS -lkrb5";
11888         cat >> confdefs.h <<\EOF
11889 #define HAVE_KRB5 1
11890 EOF
11891
11892 else
11893   echo "$ac_t""no" 1>&6
11894 fi
11895
11896
11897 ########################################################
11898 # now see if we can find the gssapi libs in standard paths
11899 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
11900 echo "configure:11901: checking for gss_display_status in -lgssapi_krb5" >&5
11901 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
11902 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11903   echo $ac_n "(cached) $ac_c" 1>&6
11904 else
11905   ac_save_LIBS="$LIBS"
11906 LIBS="-lgssapi_krb5  $LIBS"
11907 cat > conftest.$ac_ext <<EOF
11908 #line 11909 "configure"
11909 #include "confdefs.h"
11910 /* Override any gcc2 internal prototype to avoid an error.  */
11911 /* We use char because int might match the return type of a gcc2
11912     builtin and then its argument prototype would still apply.  */
11913 char gss_display_status();
11914
11915 int main() {
11916 gss_display_status()
11917 ; return 0; }
11918 EOF
11919 if { (eval echo configure:11920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11920   rm -rf conftest*
11921   eval "ac_cv_lib_$ac_lib_var=yes"
11922 else
11923   echo "configure: failed program was:" >&5
11924   cat conftest.$ac_ext >&5
11925   rm -rf conftest*
11926   eval "ac_cv_lib_$ac_lib_var=no"
11927 fi
11928 rm -f conftest*
11929 LIBS="$ac_save_LIBS"
11930
11931 fi
11932 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11933   echo "$ac_t""yes" 1>&6
11934   LIBS="$LIBS -lgssapi_krb5";
11935         cat >> confdefs.h <<\EOF
11936 #define HAVE_GSSAPI 1
11937 EOF
11938
11939 else
11940   echo "$ac_t""no" 1>&6
11941 fi
11942
11943
11944 ##################################################################
11945 # we might need the lber lib on some systems. To avoid link errors
11946 # this test must be before the libldap test
11947 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
11948 echo "configure:11949: checking for ber_scanf in -llber" >&5
11949 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
11950 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11951   echo $ac_n "(cached) $ac_c" 1>&6
11952 else
11953   ac_save_LIBS="$LIBS"
11954 LIBS="-llber  $LIBS"
11955 cat > conftest.$ac_ext <<EOF
11956 #line 11957 "configure"
11957 #include "confdefs.h"
11958 /* Override any gcc2 internal prototype to avoid an error.  */
11959 /* We use char because int might match the return type of a gcc2
11960     builtin and then its argument prototype would still apply.  */
11961 char ber_scanf();
11962
11963 int main() {
11964 ber_scanf()
11965 ; return 0; }
11966 EOF
11967 if { (eval echo configure:11968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11968   rm -rf conftest*
11969   eval "ac_cv_lib_$ac_lib_var=yes"
11970 else
11971   echo "configure: failed program was:" >&5
11972   cat conftest.$ac_ext >&5
11973   rm -rf conftest*
11974   eval "ac_cv_lib_$ac_lib_var=no"
11975 fi
11976 rm -f conftest*
11977 LIBS="$ac_save_LIBS"
11978
11979 fi
11980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11981   echo "$ac_t""yes" 1>&6
11982   LIBS="$LIBS -llber"
11983 else
11984   echo "$ac_t""no" 1>&6
11985 fi
11986
11987
11988 ########################################################
11989 # now see if we can find the ldap libs in standard paths
11990 if test x$have_ldap != xyes; then
11991 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
11992 echo "configure:11993: checking for ldap_domain2hostlist in -lldap" >&5
11993 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
11994 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11995   echo $ac_n "(cached) $ac_c" 1>&6
11996 else
11997   ac_save_LIBS="$LIBS"
11998 LIBS="-lldap  $LIBS"
11999 cat > conftest.$ac_ext <<EOF
12000 #line 12001 "configure"
12001 #include "confdefs.h"
12002 /* Override any gcc2 internal prototype to avoid an error.  */
12003 /* We use char because int might match the return type of a gcc2
12004     builtin and then its argument prototype would still apply.  */
12005 char ldap_domain2hostlist();
12006
12007 int main() {
12008 ldap_domain2hostlist()
12009 ; return 0; }
12010 EOF
12011 if { (eval echo configure:12012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12012   rm -rf conftest*
12013   eval "ac_cv_lib_$ac_lib_var=yes"
12014 else
12015   echo "configure: failed program was:" >&5
12016   cat conftest.$ac_ext >&5
12017   rm -rf conftest*
12018   eval "ac_cv_lib_$ac_lib_var=no"
12019 fi
12020 rm -f conftest*
12021 LIBS="$ac_save_LIBS"
12022
12023 fi
12024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12025   echo "$ac_t""yes" 1>&6
12026   LIBS="$LIBS -lldap";
12027         cat >> confdefs.h <<\EOF
12028 #define HAVE_LDAP 1
12029 EOF
12030
12031 else
12032   echo "$ac_t""no" 1>&6
12033 fi
12034
12035 fi
12036
12037 #################################################
12038 # check for automount support
12039 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12040 echo "configure:12041: checking whether to use AUTOMOUNT" >&5
12041 # Check whether --with-automount or --without-automount was given.
12042 if test "${with_automount+set}" = set; then
12043   withval="$with_automount"
12044    case "$withval" in
12045   yes)
12046     echo "$ac_t""yes" 1>&6
12047     cat >> confdefs.h <<\EOF
12048 #define WITH_AUTOMOUNT 1
12049 EOF
12050
12051     ;;
12052   *)
12053     echo "$ac_t""no" 1>&6
12054     ;;
12055   esac 
12056 else
12057   echo "$ac_t""no" 1>&6
12058
12059 fi
12060
12061
12062 #################################################
12063 # check for smbmount support
12064 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12065 echo "configure:12066: checking whether to use SMBMOUNT" >&5
12066 # Check whether --with-smbmount or --without-smbmount was given.
12067 if test "${with_smbmount+set}" = set; then
12068   withval="$with_smbmount"
12069    case "$withval" in
12070   yes)
12071         case "$host_os" in
12072         *linux*)
12073                 echo "$ac_t""yes" 1>&6
12074                 cat >> confdefs.h <<\EOF
12075 #define WITH_SMBMOUNT 1
12076 EOF
12077
12078                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12079                 ;;
12080         *)
12081                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12082                 ;;
12083         esac
12084     ;;
12085   *)
12086     echo "$ac_t""no" 1>&6
12087     MPROGS=
12088     ;;
12089   esac 
12090 else
12091   echo "$ac_t""no" 1>&6
12092   MPROGS=
12093
12094 fi
12095
12096
12097
12098 #################################################
12099 # check for a PAM clear-text auth, accounts, password and session support
12100 with_pam_for_crypt=no
12101 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12102 echo "configure:12103: checking whether to use PAM" >&5
12103 # Check whether --with-pam or --without-pam was given.
12104 if test "${with_pam+set}" = set; then
12105   withval="$with_pam"
12106    case "$withval" in
12107   yes)
12108     echo "$ac_t""yes" 1>&6
12109     cat >> confdefs.h <<\EOF
12110 #define WITH_PAM 1
12111 EOF
12112
12113     LIBS="$LIBS -lpam"
12114     with_pam_for_crypt=yes
12115     ;;
12116   *)
12117     echo "$ac_t""no" 1>&6
12118     ;;
12119   esac 
12120 else
12121   echo "$ac_t""no" 1>&6
12122
12123 fi
12124
12125
12126 # we can't build a pam module if we don't have pam.
12127 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12128 echo "configure:12129: checking for pam_get_data in -lpam" >&5
12129 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12130 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12131   echo $ac_n "(cached) $ac_c" 1>&6
12132 else
12133   ac_save_LIBS="$LIBS"
12134 LIBS="-lpam  $LIBS"
12135 cat > conftest.$ac_ext <<EOF
12136 #line 12137 "configure"
12137 #include "confdefs.h"
12138 /* Override any gcc2 internal prototype to avoid an error.  */
12139 /* We use char because int might match the return type of a gcc2
12140     builtin and then its argument prototype would still apply.  */
12141 char pam_get_data();
12142
12143 int main() {
12144 pam_get_data()
12145 ; return 0; }
12146 EOF
12147 if { (eval echo configure:12148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12148   rm -rf conftest*
12149   eval "ac_cv_lib_$ac_lib_var=yes"
12150 else
12151   echo "configure: failed program was:" >&5
12152   cat conftest.$ac_ext >&5
12153   rm -rf conftest*
12154   eval "ac_cv_lib_$ac_lib_var=no"
12155 fi
12156 rm -f conftest*
12157 LIBS="$ac_save_LIBS"
12158
12159 fi
12160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12161   echo "$ac_t""yes" 1>&6
12162   cat >> confdefs.h <<\EOF
12163 #define HAVE_LIBPAM 1
12164 EOF
12165
12166 else
12167   echo "$ac_t""no" 1>&6
12168 fi
12169
12170
12171 #################################################
12172 # check for pam_smbpass support
12173 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12174 echo "configure:12175: checking whether to use pam_smbpass" >&5
12175 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12176 if test "${with_pam_smbpass+set}" = set; then
12177   withval="$with_pam_smbpass"
12178    case "$withval" in
12179   yes)
12180     echo "$ac_t""yes" 1>&6
12181
12182 # Conditions under which pam_smbpass should not be built.
12183
12184        if test x$PICFLAG = x; then
12185           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12186           PAM_MOD=""
12187        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12188           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12189           PAM_MOD=""
12190        else
12191           PAM_MOD="bin/pam_smbpass.so"
12192        fi
12193     ;;
12194   *)
12195     echo "$ac_t""no" 1>&6
12196     ;;
12197   esac 
12198 else
12199   echo "$ac_t""no" 1>&6
12200
12201 fi
12202
12203
12204
12205 ###############################################
12206 # test for where we get crypt() from, but only
12207 # if not using PAM
12208 if test $with_pam_for_crypt = no; then
12209 for ac_func in crypt
12210 do
12211 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12212 echo "configure:12213: checking for $ac_func" >&5
12213 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12214   echo $ac_n "(cached) $ac_c" 1>&6
12215 else
12216   cat > conftest.$ac_ext <<EOF
12217 #line 12218 "configure"
12218 #include "confdefs.h"
12219 /* System header to define __stub macros and hopefully few prototypes,
12220     which can conflict with char $ac_func(); below.  */
12221 #include <assert.h>
12222 /* Override any gcc2 internal prototype to avoid an error.  */
12223 /* We use char because int might match the return type of a gcc2
12224     builtin and then its argument prototype would still apply.  */
12225 char $ac_func();
12226
12227 int main() {
12228
12229 /* The GNU C library defines this for functions which it implements
12230     to always fail with ENOSYS.  Some functions are actually named
12231     something starting with __ and the normal name is an alias.  */
12232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12233 choke me
12234 #else
12235 $ac_func();
12236 #endif
12237
12238 ; return 0; }
12239 EOF
12240 if { (eval echo configure:12241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12241   rm -rf conftest*
12242   eval "ac_cv_func_$ac_func=yes"
12243 else
12244   echo "configure: failed program was:" >&5
12245   cat conftest.$ac_ext >&5
12246   rm -rf conftest*
12247   eval "ac_cv_func_$ac_func=no"
12248 fi
12249 rm -f conftest*
12250 fi
12251
12252 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12253   echo "$ac_t""yes" 1>&6
12254     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12255   cat >> confdefs.h <<EOF
12256 #define $ac_tr_func 1
12257 EOF
12258  
12259 else
12260   echo "$ac_t""no" 1>&6
12261 fi
12262 done
12263
12264 if test x"$ac_cv_func_crypt" = x"no"; then
12265     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12266 echo "configure:12267: checking for crypt in -lcrypt" >&5
12267 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12268 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12269   echo $ac_n "(cached) $ac_c" 1>&6
12270 else
12271   ac_save_LIBS="$LIBS"
12272 LIBS="-lcrypt  $LIBS"
12273 cat > conftest.$ac_ext <<EOF
12274 #line 12275 "configure"
12275 #include "confdefs.h"
12276 /* Override any gcc2 internal prototype to avoid an error.  */
12277 /* We use char because int might match the return type of a gcc2
12278     builtin and then its argument prototype would still apply.  */
12279 char crypt();
12280
12281 int main() {
12282 crypt()
12283 ; return 0; }
12284 EOF
12285 if { (eval echo configure:12286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12286   rm -rf conftest*
12287   eval "ac_cv_lib_$ac_lib_var=yes"
12288 else
12289   echo "configure: failed program was:" >&5
12290   cat conftest.$ac_ext >&5
12291   rm -rf conftest*
12292   eval "ac_cv_lib_$ac_lib_var=no"
12293 fi
12294 rm -f conftest*
12295 LIBS="$ac_save_LIBS"
12296
12297 fi
12298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12299   echo "$ac_t""yes" 1>&6
12300   LIBS="$LIBS -lcrypt";
12301         cat >> confdefs.h <<\EOF
12302 #define HAVE_CRYPT 1
12303 EOF
12304
12305 else
12306   echo "$ac_t""no" 1>&6
12307 fi
12308
12309 fi
12310 fi
12311
12312 ##
12313 ## moved after the check for -lcrypt in order to
12314 ## ensure that the necessary libraries are included
12315 ## check checking for truncated salt.  Wrapped by the
12316 ## $with_pam_for_crypt variable as above   --jerry
12317 ##
12318 if test $with_pam_for_crypt = no; then
12319 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12320 echo "configure:12321: checking for a crypt that needs truncated salt" >&5
12321 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12322   echo $ac_n "(cached) $ac_c" 1>&6
12323 else
12324   
12325 if test "$cross_compiling" = yes; then
12326   samba_cv_HAVE_TRUNCATED_SALT=cross
12327 else
12328   cat > conftest.$ac_ext <<EOF
12329 #line 12330 "configure"
12330 #include "confdefs.h"
12331 #include "${srcdir-.}/tests/crypttest.c"
12332 EOF
12333 if { (eval echo configure:12334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12334 then
12335   samba_cv_HAVE_TRUNCATED_SALT=no
12336 else
12337   echo "configure: failed program was:" >&5
12338   cat conftest.$ac_ext >&5
12339   rm -fr conftest*
12340   samba_cv_HAVE_TRUNCATED_SALT=yes
12341 fi
12342 rm -fr conftest*
12343 fi
12344
12345 fi
12346
12347 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12348 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12349         cat >> confdefs.h <<\EOF
12350 #define HAVE_TRUNCATED_SALT 1
12351 EOF
12352
12353 fi
12354 fi
12355
12356
12357
12358 ########################################################################################
12359 ##
12360 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12361 ##
12362 ########################################################################################
12363
12364 #################################################
12365 # check for a TDB password database
12366 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12367 echo "configure:12368: checking whether to use TDB SAM database" >&5
12368 # Check whether --with-tdbsam or --without-tdbsam was given.
12369 if test "${with_tdbsam+set}" = set; then
12370   withval="$with_tdbsam"
12371    case "$withval" in
12372   yes)
12373     echo "$ac_t""yes" 1>&6
12374     cat >> confdefs.h <<\EOF
12375 #define WITH_TDB_SAM 1
12376 EOF
12377
12378     ;;
12379   *)
12380     echo "$ac_t""no" 1>&6
12381     ;;
12382   esac 
12383 else
12384   echo "$ac_t""no" 1>&6
12385
12386 fi
12387
12388
12389 #################################################
12390 # check for a LDAP password database
12391 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
12392 echo "configure:12393: checking whether to use LDAP SAM database" >&5
12393 # Check whether --with-ldapsam or --without-ldapsam was given.
12394 if test "${with_ldapsam+set}" = set; then
12395   withval="$with_ldapsam"
12396    case "$withval" in
12397   yes)
12398     echo "$ac_t""yes" 1>&6
12399     cat >> confdefs.h <<\EOF
12400 #define WITH_LDAP_SAM 1
12401 EOF
12402
12403     LIBS="-lldap -llber $LIBS"
12404     ;;
12405   *)
12406     echo "$ac_t""no" 1>&6
12407     ;;
12408   esac 
12409 else
12410   echo "$ac_t""no" 1>&6
12411
12412 fi
12413
12414
12415 #################################################
12416 # check for a NISPLUS password database
12417 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12418 echo "configure:12419: checking whether to use NISPLUS SAM database" >&5
12419 # Check whether --with-nisplussam or --without-nisplussam was given.
12420 if test "${with_nisplussam+set}" = set; then
12421   withval="$with_nisplussam"
12422    case "$withval" in
12423   yes)
12424     echo "$ac_t""yes" 1>&6
12425     cat >> confdefs.h <<\EOF
12426 #define WITH_NISPLUS_SAM 1
12427 EOF
12428
12429     ;;
12430   *)
12431     echo "$ac_t""no" 1>&6
12432     ;;
12433   esac 
12434 else
12435   echo "$ac_t""no" 1>&6
12436
12437 fi
12438
12439
12440 ########################################################################################
12441 ##
12442 ## END OF TESTS FOR SAM BACKENDS.  
12443 ##
12444 ########################################################################################
12445
12446 #################################################
12447 # check for a NISPLUS_HOME support 
12448 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12449 echo "configure:12450: checking whether to use NISPLUS_HOME" >&5
12450 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12451 if test "${with_nisplus_home+set}" = set; then
12452   withval="$with_nisplus_home"
12453    case "$withval" in
12454   yes)
12455     echo "$ac_t""yes" 1>&6
12456     cat >> confdefs.h <<\EOF
12457 #define WITH_NISPLUS_HOME 1
12458 EOF
12459
12460     ;;
12461   *)
12462     echo "$ac_t""no" 1>&6
12463     ;;
12464   esac 
12465 else
12466   echo "$ac_t""no" 1>&6
12467
12468 fi
12469
12470
12471 #################################################
12472 # check for the secure socket layer
12473 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12474 echo "configure:12475: checking whether to use SSL" >&5
12475 # Check whether --with-ssl or --without-ssl was given.
12476 if test "${with_ssl+set}" = set; then
12477   withval="$with_ssl"
12478    case "$withval" in
12479   yes)
12480     echo "$ac_t""yes" 1>&6
12481     cat >> confdefs.h <<\EOF
12482 #define WITH_SSL 1
12483 EOF
12484
12485     withval="/usr/local/ssl"     # default
12486
12487     if test "${with_sslinc+set}" = set; then
12488
12489         withval="$with_sslinc"
12490         case "$withval" in
12491         yes|no)
12492           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12493           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12494         ;;
12495         * )
12496           CFLAGS="-I${withval} $CFLAGS"
12497         ;;
12498         esac
12499
12500     else
12501
12502         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12503
12504     fi
12505
12506     if test "${with_ssllib+set}" = set; then
12507
12508         withval="$with_ssllib"
12509         case "$withval" in
12510         yes|no)
12511           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12512           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12513         ;;
12514         * )
12515           LDFLAGS="-L${withval}/lib $LDFLAGS"
12516         ;;
12517         esac
12518
12519     else
12520
12521         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12522
12523     fi
12524
12525     LIBS="-lssl -lcrypto $LIBS"
12526
12527 #    if test ! -d ${withval}; then
12528 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12529 #      exit 1
12530 #    fi 
12531
12532     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12533
12534     ;;
12535   *)
12536     echo "$ac_t""no" 1>&6
12537     ;;
12538   esac 
12539 else
12540   echo "$ac_t""no" 1>&6
12541
12542 fi
12543
12544
12545 #################################################
12546 # check for syslog logging
12547 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12548 echo "configure:12549: checking whether to use syslog logging" >&5
12549 # Check whether --with-syslog or --without-syslog was given.
12550 if test "${with_syslog+set}" = set; then
12551   withval="$with_syslog"
12552    case "$withval" in
12553   yes)
12554     echo "$ac_t""yes" 1>&6
12555     cat >> confdefs.h <<\EOF
12556 #define WITH_SYSLOG 1
12557 EOF
12558
12559     ;;
12560   *)
12561     echo "$ac_t""no" 1>&6
12562     ;;
12563   esac 
12564 else
12565   echo "$ac_t""no" 1>&6
12566
12567 fi
12568
12569
12570 #################################################
12571 # check for a shared memory profiling support
12572 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12573 echo "configure:12574: checking whether to use profiling" >&5
12574 # Check whether --with-profiling-data or --without-profiling-data was given.
12575 if test "${with_profiling_data+set}" = set; then
12576   withval="$with_profiling_data"
12577    case "$withval" in
12578   yes)
12579     echo "$ac_t""yes" 1>&6
12580     cat >> confdefs.h <<\EOF
12581 #define WITH_PROFILE 1
12582 EOF
12583
12584     ;;
12585   *)
12586     echo "$ac_t""no" 1>&6
12587     ;;
12588   esac 
12589 else
12590   echo "$ac_t""no" 1>&6
12591
12592 fi
12593
12594
12595
12596 #################################################
12597 # check for experimental disk-quotas support
12598 QUOTAOBJS=smbd/noquotas.o
12599
12600 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12601 echo "configure:12602: checking whether to support disk-quotas" >&5
12602 # Check whether --with-quotas or --without-quotas was given.
12603 if test "${with_quotas+set}" = set; then
12604   withval="$with_quotas"
12605    case "$withval" in
12606   yes)
12607     echo "$ac_t""yes" 1>&6
12608     case "$host_os" in
12609       *linux*)
12610         # Check for kernel 2.4.x quota braindamage...
12611         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12612 echo "configure:12613: checking for linux 2.4.x quota braindamage.." >&5
12613 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12614   echo $ac_n "(cached) $ac_c" 1>&6
12615 else
12616   
12617         cat > conftest.$ac_ext <<EOF
12618 #line 12619 "configure"
12619 #include "confdefs.h"
12620 #include <stdio.h>
12621 #include <sys/types.h>
12622 #include <asm/types.h>
12623 #include <linux/quota.h>
12624 #include <mntent.h>
12625 #include <linux/unistd.h>
12626 int main() {
12627 struct mem_dqblk D;
12628 ; return 0; }
12629 EOF
12630 if { (eval echo configure:12631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12631   rm -rf conftest*
12632   samba_cv_linux_2_4_quota_braindamage=yes
12633 else
12634   echo "configure: failed program was:" >&5
12635   cat conftest.$ac_ext >&5
12636   rm -rf conftest*
12637   samba_cv_linux_2_4_quota_braindamage=no
12638 fi
12639 rm -f conftest*
12640 fi
12641
12642 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12643 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12644         cat >> confdefs.h <<\EOF
12645 #define LINUX_QUOTAS_2 1
12646 EOF
12647
12648 else
12649         cat >> confdefs.h <<\EOF
12650 #define LINUX_QUOTAS_1 1
12651 EOF
12652
12653 fi
12654         ;;
12655       *)
12656         ;;
12657     esac
12658     QUOTAOBJS=smbd/quotas.o
12659     cat >> confdefs.h <<\EOF
12660 #define WITH_QUOTAS 1
12661 EOF
12662
12663     ;;
12664   *)
12665     echo "$ac_t""no" 1>&6
12666     ;;
12667   esac 
12668 else
12669   echo "$ac_t""no" 1>&6
12670
12671 fi
12672
12673
12674
12675 #################################################
12676 # check for experimental utmp accounting
12677
12678 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12679 echo "configure:12680: checking whether to support utmp accounting" >&5
12680 # Check whether --with-utmp or --without-utmp was given.
12681 if test "${with_utmp+set}" = set; then
12682   withval="$with_utmp"
12683    case "$withval" in
12684   yes)
12685     echo "$ac_t""yes" 1>&6
12686     cat >> confdefs.h <<\EOF
12687 #define WITH_UTMP 1
12688 EOF
12689
12690     ;;
12691   *)
12692     echo "$ac_t""no" 1>&6
12693     ;;
12694   esac 
12695 else
12696   echo "$ac_t""no" 1>&6
12697
12698 fi
12699
12700
12701 #################################################
12702 # set private directory location
12703 # Check whether --with-privatedir or --without-privatedir was given.
12704 if test "${with_privatedir+set}" = set; then
12705   withval="$with_privatedir"
12706    case "$withval" in
12707   yes|no)
12708   #
12709   # Just in case anybody calls it without argument
12710   #
12711     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12712     privatedir='${prefix}/private'
12713   ;;
12714   * )
12715     privatedir="$withval"
12716     ;;
12717   esac
12718   
12719 else
12720   privatedir='${prefix}/private'
12721    
12722
12723 fi
12724
12725
12726 #################################################
12727 # set lock directory location
12728 # Check whether --with-lockdir or --without-lockdir was given.
12729 if test "${with_lockdir+set}" = set; then
12730   withval="$with_lockdir"
12731    case "$withval" in
12732   yes|no)
12733   #
12734   # Just in case anybody calls it without argument
12735   #
12736     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12737     lockdir='$(VARDIR)/locks'
12738   ;;
12739   * )
12740     lockdir="$withval"
12741     ;;
12742   esac
12743   
12744 else
12745   lockdir='$(VARDIR)/locks'
12746    
12747
12748 fi
12749
12750
12751 #################################################
12752 # set SWAT directory location
12753 # Check whether --with-swatdir or --without-swatdir was given.
12754 if test "${with_swatdir+set}" = set; then
12755   withval="$with_swatdir"
12756    case "$withval" in
12757   yes|no)
12758   #
12759   # Just in case anybody does it
12760   #
12761     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12762     swatdir='${prefix}/swat'
12763   ;;
12764   * )
12765     swatdir="$withval"
12766     ;;
12767   esac
12768   
12769 else
12770   swatdir='${prefix}/swat'
12771    
12772
12773 fi
12774
12775
12776 #################################################
12777 # choose native language(s) of man pages
12778 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12779 echo "configure:12780: checking chosen man pages' language(s)" >&5
12780 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12781 if test "${with_manpages_langs+set}" = set; then
12782   withval="$with_manpages_langs"
12783    case "$withval" in
12784   yes|no)
12785     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12786     manlangs="en"
12787   ;;
12788   *)
12789     manlangs="$withval"
12790   ;;
12791   esac
12792
12793   echo "$ac_t""$manlangs" 1>&6
12794   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12795   
12796 else
12797   manlangs="en"
12798   echo "$ac_t""$manlangs" 1>&6
12799   
12800
12801 fi
12802
12803
12804 #################################################
12805 # these tests are taken from the GNU fileutils package
12806 echo "checking how to get filesystem space usage" 1>&6
12807 echo "configure:12808: checking how to get filesystem space usage" >&5
12808 space=no
12809
12810 # Test for statvfs64.
12811 if test $space = no; then
12812   # SVR4
12813   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12814 echo "configure:12815: checking statvfs64 function (SVR4)" >&5
12815 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12816   echo $ac_n "(cached) $ac_c" 1>&6
12817 else
12818   if test "$cross_compiling" = yes; then
12819   fu_cv_sys_stat_statvfs64=cross
12820 else
12821   cat > conftest.$ac_ext <<EOF
12822 #line 12823 "configure"
12823 #include "confdefs.h"
12824
12825 #if defined(HAVE_UNISTD_H)
12826 #include <unistd.h>
12827 #endif
12828 #include <sys/types.h>
12829 #include <sys/statvfs.h>
12830   main ()
12831   {
12832     struct statvfs64 fsd;
12833     exit (statvfs64 (".", &fsd));
12834   }
12835 EOF
12836 if { (eval echo configure:12837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12837 then
12838   fu_cv_sys_stat_statvfs64=yes
12839 else
12840   echo "configure: failed program was:" >&5
12841   cat conftest.$ac_ext >&5
12842   rm -fr conftest*
12843   fu_cv_sys_stat_statvfs64=no
12844 fi
12845 rm -fr conftest*
12846 fi
12847
12848 fi
12849
12850 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12851   if test $fu_cv_sys_stat_statvfs64 = yes; then
12852     space=yes
12853     cat >> confdefs.h <<\EOF
12854 #define STAT_STATVFS64 1
12855 EOF
12856
12857   fi
12858 fi
12859
12860 # Perform only the link test since it seems there are no variants of the
12861 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12862 # because that got a false positive on SCO OSR5.  Adding the declaration
12863 # of a `struct statvfs' causes this test to fail (as it should) on such
12864 # systems.  That system is reported to work fine with STAT_STATFS4 which
12865 # is what it gets when this test fails.
12866 if test $space = no; then
12867   # SVR4
12868   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12869 echo "configure:12870: checking statvfs function (SVR4)" >&5
12870 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12871   echo $ac_n "(cached) $ac_c" 1>&6
12872 else
12873   cat > conftest.$ac_ext <<EOF
12874 #line 12875 "configure"
12875 #include "confdefs.h"
12876 #include <sys/types.h>
12877 #include <sys/statvfs.h>
12878 int main() {
12879 struct statvfs fsd; statvfs (0, &fsd);
12880 ; return 0; }
12881 EOF
12882 if { (eval echo configure:12883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12883   rm -rf conftest*
12884   fu_cv_sys_stat_statvfs=yes
12885 else
12886   echo "configure: failed program was:" >&5
12887   cat conftest.$ac_ext >&5
12888   rm -rf conftest*
12889   fu_cv_sys_stat_statvfs=no
12890 fi
12891 rm -f conftest*
12892 fi
12893
12894 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12895   if test $fu_cv_sys_stat_statvfs = yes; then
12896     space=yes
12897     cat >> confdefs.h <<\EOF
12898 #define STAT_STATVFS 1
12899 EOF
12900
12901   fi
12902 fi
12903
12904 if test $space = no; then
12905   # DEC Alpha running OSF/1
12906   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12907 echo "configure:12908: checking for 3-argument statfs function (DEC OSF/1)" >&5
12908   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12909   echo $ac_n "(cached) $ac_c" 1>&6
12910 else
12911   if test "$cross_compiling" = yes; then
12912   fu_cv_sys_stat_statfs3_osf1=no
12913 else
12914   cat > conftest.$ac_ext <<EOF
12915 #line 12916 "configure"
12916 #include "confdefs.h"
12917
12918 #include <sys/param.h>
12919 #include <sys/types.h>
12920 #include <sys/mount.h>
12921   main ()
12922   {
12923     struct statfs fsd;
12924     fsd.f_fsize = 0;
12925     exit (statfs (".", &fsd, sizeof (struct statfs)));
12926   }
12927 EOF
12928 if { (eval echo configure:12929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12929 then
12930   fu_cv_sys_stat_statfs3_osf1=yes
12931 else
12932   echo "configure: failed program was:" >&5
12933   cat conftest.$ac_ext >&5
12934   rm -fr conftest*
12935   fu_cv_sys_stat_statfs3_osf1=no
12936 fi
12937 rm -fr conftest*
12938 fi
12939
12940 fi
12941
12942   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12943   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12944     space=yes
12945     cat >> confdefs.h <<\EOF
12946 #define STAT_STATFS3_OSF1 1
12947 EOF
12948
12949   fi
12950 fi
12951
12952 if test $space = no; then
12953 # AIX
12954   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12955 echo "configure:12956: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12956   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12957   echo $ac_n "(cached) $ac_c" 1>&6
12958 else
12959   if test "$cross_compiling" = yes; then
12960   fu_cv_sys_stat_statfs2_bsize=no
12961 else
12962   cat > conftest.$ac_ext <<EOF
12963 #line 12964 "configure"
12964 #include "confdefs.h"
12965
12966 #ifdef HAVE_SYS_PARAM_H
12967 #include <sys/param.h>
12968 #endif
12969 #ifdef HAVE_SYS_MOUNT_H
12970 #include <sys/mount.h>
12971 #endif
12972 #ifdef HAVE_SYS_VFS_H
12973 #include <sys/vfs.h>
12974 #endif
12975   main ()
12976   {
12977   struct statfs fsd;
12978   fsd.f_bsize = 0;
12979   exit (statfs (".", &fsd));
12980   }
12981 EOF
12982 if { (eval echo configure:12983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12983 then
12984   fu_cv_sys_stat_statfs2_bsize=yes
12985 else
12986   echo "configure: failed program was:" >&5
12987   cat conftest.$ac_ext >&5
12988   rm -fr conftest*
12989   fu_cv_sys_stat_statfs2_bsize=no
12990 fi
12991 rm -fr conftest*
12992 fi
12993
12994 fi
12995
12996   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12997   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12998     space=yes
12999     cat >> confdefs.h <<\EOF
13000 #define STAT_STATFS2_BSIZE 1
13001 EOF
13002
13003   fi
13004 fi
13005
13006 if test $space = no; then
13007 # SVR3
13008   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13009 echo "configure:13010: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13010   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13011   echo $ac_n "(cached) $ac_c" 1>&6
13012 else
13013   if test "$cross_compiling" = yes; then
13014   fu_cv_sys_stat_statfs4=no
13015 else
13016   cat > conftest.$ac_ext <<EOF
13017 #line 13018 "configure"
13018 #include "confdefs.h"
13019 #include <sys/types.h>
13020 #include <sys/statfs.h>
13021   main ()
13022   {
13023   struct statfs fsd;
13024   exit (statfs (".", &fsd, sizeof fsd, 0));
13025   }
13026 EOF
13027 if { (eval echo configure:13028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13028 then
13029   fu_cv_sys_stat_statfs4=yes
13030 else
13031   echo "configure: failed program was:" >&5
13032   cat conftest.$ac_ext >&5
13033   rm -fr conftest*
13034   fu_cv_sys_stat_statfs4=no
13035 fi
13036 rm -fr conftest*
13037 fi
13038
13039 fi
13040
13041   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13042   if test $fu_cv_sys_stat_statfs4 = yes; then
13043     space=yes
13044     cat >> confdefs.h <<\EOF
13045 #define STAT_STATFS4 1
13046 EOF
13047
13048   fi
13049 fi
13050
13051 if test $space = no; then
13052 # 4.4BSD and NetBSD
13053   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13054 echo "configure:13055: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13055   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13056   echo $ac_n "(cached) $ac_c" 1>&6
13057 else
13058   if test "$cross_compiling" = yes; then
13059   fu_cv_sys_stat_statfs2_fsize=no
13060 else
13061   cat > conftest.$ac_ext <<EOF
13062 #line 13063 "configure"
13063 #include "confdefs.h"
13064 #include <sys/types.h>
13065 #ifdef HAVE_SYS_PARAM_H
13066 #include <sys/param.h>
13067 #endif
13068 #ifdef HAVE_SYS_MOUNT_H
13069 #include <sys/mount.h>
13070 #endif
13071   main ()
13072   {
13073   struct statfs fsd;
13074   fsd.f_fsize = 0;
13075   exit (statfs (".", &fsd));
13076   }
13077 EOF
13078 if { (eval echo configure:13079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13079 then
13080   fu_cv_sys_stat_statfs2_fsize=yes
13081 else
13082   echo "configure: failed program was:" >&5
13083   cat conftest.$ac_ext >&5
13084   rm -fr conftest*
13085   fu_cv_sys_stat_statfs2_fsize=no
13086 fi
13087 rm -fr conftest*
13088 fi
13089
13090 fi
13091
13092   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13093   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13094     space=yes
13095     cat >> confdefs.h <<\EOF
13096 #define STAT_STATFS2_FSIZE 1
13097 EOF
13098
13099   fi
13100 fi
13101
13102 if test $space = no; then
13103   # Ultrix
13104   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13105 echo "configure:13106: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13106   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13107   echo $ac_n "(cached) $ac_c" 1>&6
13108 else
13109   if test "$cross_compiling" = yes; then
13110   fu_cv_sys_stat_fs_data=no
13111 else
13112   cat > conftest.$ac_ext <<EOF
13113 #line 13114 "configure"
13114 #include "confdefs.h"
13115 #include <sys/types.h>
13116 #ifdef HAVE_SYS_PARAM_H
13117 #include <sys/param.h>
13118 #endif
13119 #ifdef HAVE_SYS_MOUNT_H
13120 #include <sys/mount.h>
13121 #endif
13122 #ifdef HAVE_SYS_FS_TYPES_H
13123 #include <sys/fs_types.h>
13124 #endif
13125   main ()
13126   {
13127   struct fs_data fsd;
13128   /* Ultrix's statfs returns 1 for success,
13129      0 for not mounted, -1 for failure.  */
13130   exit (statfs (".", &fsd) != 1);
13131   }
13132 EOF
13133 if { (eval echo configure:13134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13134 then
13135   fu_cv_sys_stat_fs_data=yes
13136 else
13137   echo "configure: failed program was:" >&5
13138   cat conftest.$ac_ext >&5
13139   rm -fr conftest*
13140   fu_cv_sys_stat_fs_data=no
13141 fi
13142 rm -fr conftest*
13143 fi
13144
13145 fi
13146
13147   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13148   if test $fu_cv_sys_stat_fs_data = yes; then
13149     space=yes
13150     cat >> confdefs.h <<\EOF
13151 #define STAT_STATFS2_FS_DATA 1
13152 EOF
13153
13154   fi
13155 fi
13156
13157 #
13158 # As a gating factor for large file support, in order to
13159 # use <4GB files we must have the following minimal support
13160 # available.
13161 # long long, and a 64 bit off_t or off64_t.
13162 # If we don't have all of these then disable large
13163 # file support.
13164 #
13165 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13166 echo "configure:13167: checking if large file support can be enabled" >&5
13167 cat > conftest.$ac_ext <<EOF
13168 #line 13169 "configure"
13169 #include "confdefs.h"
13170
13171 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13172 #include <sys/types.h>
13173 #else
13174 __COMPILE_ERROR_
13175 #endif
13176
13177 int main() {
13178 int i
13179 ; return 0; }
13180 EOF
13181 if { (eval echo configure:13182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13182   rm -rf conftest*
13183   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13184 else
13185   echo "configure: failed program was:" >&5
13186   cat conftest.$ac_ext >&5
13187   rm -rf conftest*
13188   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13189 fi
13190 rm -f conftest*
13191 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13192     cat >> confdefs.h <<\EOF
13193 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13194 EOF
13195
13196 fi
13197 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13198
13199 # Check whether --with-spinlocks or --without-spinlocks was given.
13200 if test "${with_spinlocks+set}" = set; then
13201   withval="$with_spinlocks"
13202   :
13203 fi
13204
13205 if test "x$with_spinlocks" = "xyes"; then
13206     cat >> confdefs.h <<\EOF
13207 #define USE_SPINLOCKS 1
13208 EOF
13209
13210
13211     case "$host_cpu" in
13212         sparc)
13213             cat >> confdefs.h <<\EOF
13214 #define SPARC_SPINLOCKS 1
13215 EOF
13216
13217             ;;
13218
13219         i386|i486|i586|i686)
13220             cat >> confdefs.h <<\EOF
13221 #define INTEL_SPINLOCKS 1
13222 EOF
13223
13224             ;;
13225
13226         mips)
13227             cat >> confdefs.h <<\EOF
13228 #define MIPS_SPINLOCKS 1
13229 EOF
13230
13231             ;;
13232
13233         powerpc)
13234             cat >> confdefs.h <<\EOF
13235 #define POWERPC_SPINLOCKS 1
13236 EOF
13237
13238             ;;
13239     esac
13240 fi
13241
13242 #################################################
13243 # check for ACL support
13244
13245 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13246 echo "configure:13247: checking whether to support ACLs" >&5
13247 # Check whether --with-acl-support or --without-acl-support was given.
13248 if test "${with_acl_support+set}" = set; then
13249   withval="$with_acl_support"
13250    case "$withval" in
13251   yes)
13252
13253         case "$host_os" in
13254         *sysv5*)
13255                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13256                 cat >> confdefs.h <<\EOF
13257 #define HAVE_UNIXWARE_ACLS 1
13258 EOF
13259
13260                 ;;
13261         *solaris*)
13262                 echo "$ac_t""Using solaris ACLs" 1>&6
13263                 cat >> confdefs.h <<\EOF
13264 #define HAVE_SOLARIS_ACLS 1
13265 EOF
13266
13267                 ;;
13268         *hpux*)
13269                 echo "$ac_t""Using HPUX ACLs" 1>&6
13270                 cat >> confdefs.h <<\EOF
13271 #define HAVE_HPUX_ACLS 1
13272 EOF
13273
13274                 ;;
13275         *irix*)
13276                 echo "$ac_t""Using IRIX ACLs" 1>&6
13277                 cat >> confdefs.h <<\EOF
13278 #define HAVE_IRIX_ACLS 1
13279 EOF
13280
13281                 ;;
13282         *aix*)
13283                 echo "$ac_t""Using AIX ACLs" 1>&6
13284                 cat >> confdefs.h <<\EOF
13285 #define HAVE_AIX_ACLS 1
13286 EOF
13287
13288                 ;;
13289         *osf*)
13290                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13291                 cat >> confdefs.h <<\EOF
13292 #define HAVE_TRU64_ACLS 1
13293 EOF
13294
13295                 LIBS="$LIBS -lpacl"
13296                 ;;
13297         *)
13298                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13299 echo "configure:13300: checking for acl_get_file in -lacl" >&5
13300 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13301 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13302   echo $ac_n "(cached) $ac_c" 1>&6
13303 else
13304   ac_save_LIBS="$LIBS"
13305 LIBS="-lacl  $LIBS"
13306 cat > conftest.$ac_ext <<EOF
13307 #line 13308 "configure"
13308 #include "confdefs.h"
13309 /* Override any gcc2 internal prototype to avoid an error.  */
13310 /* We use char because int might match the return type of a gcc2
13311     builtin and then its argument prototype would still apply.  */
13312 char acl_get_file();
13313
13314 int main() {
13315 acl_get_file()
13316 ; return 0; }
13317 EOF
13318 if { (eval echo configure:13319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13319   rm -rf conftest*
13320   eval "ac_cv_lib_$ac_lib_var=yes"
13321 else
13322   echo "configure: failed program was:" >&5
13323   cat conftest.$ac_ext >&5
13324   rm -rf conftest*
13325   eval "ac_cv_lib_$ac_lib_var=no"
13326 fi
13327 rm -f conftest*
13328 LIBS="$ac_save_LIBS"
13329
13330 fi
13331 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13332   echo "$ac_t""yes" 1>&6
13333     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13334     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13335   cat >> confdefs.h <<EOF
13336 #define $ac_tr_lib 1
13337 EOF
13338
13339   LIBS="-lacl $LIBS"
13340
13341 else
13342   echo "$ac_t""no" 1>&6
13343 fi
13344
13345                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13346 echo "configure:13347: checking for ACL support" >&5
13347 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13348   echo $ac_n "(cached) $ac_c" 1>&6
13349 else
13350   
13351                 cat > conftest.$ac_ext <<EOF
13352 #line 13353 "configure"
13353 #include "confdefs.h"
13354 #include <sys/types.h>
13355 #include <sys/acl.h>
13356 int main() {
13357  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13358 ; return 0; }
13359 EOF
13360 if { (eval echo configure:13361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13361   rm -rf conftest*
13362   samba_cv_HAVE_POSIX_ACLS=yes
13363 else
13364   echo "configure: failed program was:" >&5
13365   cat conftest.$ac_ext >&5
13366   rm -rf conftest*
13367   samba_cv_HAVE_POSIX_ACLS=no
13368 fi
13369 rm -f conftest*
13370 fi
13371
13372 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13373                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13374                                 echo "$ac_t""Using posix ACLs" 1>&6
13375                                 cat >> confdefs.h <<\EOF
13376 #define HAVE_POSIX_ACLS 1
13377 EOF
13378
13379                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13380 echo "configure:13381: checking for acl_get_perm_np" >&5
13381 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13382   echo $ac_n "(cached) $ac_c" 1>&6
13383 else
13384   
13385                                 cat > conftest.$ac_ext <<EOF
13386 #line 13387 "configure"
13387 #include "confdefs.h"
13388 #include <sys/types.h>
13389 #include <sys/acl.h>
13390 int main() {
13391  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13392 ; return 0; }
13393 EOF
13394 if { (eval echo configure:13395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13395   rm -rf conftest*
13396   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13397 else
13398   echo "configure: failed program was:" >&5
13399   cat conftest.$ac_ext >&5
13400   rm -rf conftest*
13401   samba_cv_HAVE_ACL_GET_PERM_NP=no
13402 fi
13403 rm -f conftest*
13404 fi
13405
13406 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13407                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13408                                         cat >> confdefs.h <<\EOF
13409 #define HAVE_ACL_GET_PERM_NP 1
13410 EOF
13411
13412                                 fi
13413                         fi
13414             ;;
13415         esac
13416         ;;
13417   *)
13418     echo "$ac_t""no" 1>&6
13419     cat >> confdefs.h <<\EOF
13420 #define HAVE_NO_ACLS 1
13421 EOF
13422
13423     ;;
13424   esac 
13425 else
13426   cat >> confdefs.h <<\EOF
13427 #define HAVE_NO_ACLS 1
13428 EOF
13429
13430   echo "$ac_t""no" 1>&6
13431
13432 fi
13433
13434
13435 #################################################
13436 # Check whether winbind is supported on this platform.  If so we need to
13437 # build and install client programs (WINBIND_TARGETS), sbin programs
13438 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13439
13440 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13441 echo "configure:13442: checking whether to build winbind" >&5
13442
13443 # Initially, the value of $host_os decides whether winbind is supported
13444
13445 case "$host_os" in 
13446         *linux*|*solaris*|*irix*)
13447                 HAVE_WINBIND=yes
13448                 ;;
13449         *)
13450                 HAVE_WINBIND=no
13451                 winbind_no_reason=", unsupported on $host_os"
13452                 ;;
13453 esac
13454
13455 # Check the setting of --with-winbindd
13456
13457 # Check whether --with-winbind or --without-winbind was given.
13458 if test "${with_winbind+set}" = set; then
13459   withval="$with_winbind"
13460    
13461   case "$withval" in
13462         yes)
13463                 HAVE_WINBIND=yes
13464                 ;;
13465         no)
13466                 HAVE_WINBIND=no
13467                 winbind_reason=""
13468                 ;;
13469   esac 
13470 fi
13471
13472
13473 # We need unix domain sockets for winbind
13474
13475 if test x"$HAVE_WINBIND" = x"yes"; then
13476         if test x"$samba_cv_unixsocket" = x"no"; then
13477                 winbind_no_reason=", no unix domain socket support on $host_os"
13478                 HAVE_WINBIND=no
13479         fi
13480 fi
13481
13482 # Display test results
13483
13484 WINBIND_TARGETS=""
13485 WINBIND_STARGETS=""
13486 WINBIND_LTARGETS=""
13487 WINBIND_PAM_PROGS=""
13488
13489 if test x"$HAVE_WINBIND" = x"yes"; then
13490         echo "$ac_t""yes" 1>&6
13491
13492         WINBIND_TARGETS="bin/wbinfo"
13493         WINBIND_STARGETS="bin/winbindd"
13494         if test x"$BLDSHARED" = x"true"; then
13495                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13496                 if test x"$with_pam" = x"yes"; then
13497                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13498                 fi
13499         fi
13500 else
13501         echo "$ac_t""no$winbind_no_reason" 1>&6
13502 fi
13503
13504 # Substitution time!
13505
13506
13507
13508
13509
13510
13511 #################################################
13512 # Check to see if we should use the included popt 
13513
13514 # Check whether --with-included-popt or --without-included-popt was given.
13515 if test "${with_included_popt+set}" = set; then
13516   withval="$with_included_popt"
13517    
13518   case "$withval" in
13519         yes)
13520                 INCLUDED_POPT=yes
13521                 ;;
13522         no)
13523                 INCLUDED_POPT=no
13524                 ;;
13525   esac 
13526 fi
13527
13528 if test x"$INCLUDED_POPT" != x"yes"; then
13529     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13530 echo "configure:13531: checking for poptGetContext in -lpopt" >&5
13531 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13532 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13533   echo $ac_n "(cached) $ac_c" 1>&6
13534 else
13535   ac_save_LIBS="$LIBS"
13536 LIBS="-lpopt  $LIBS"
13537 cat > conftest.$ac_ext <<EOF
13538 #line 13539 "configure"
13539 #include "confdefs.h"
13540 /* Override any gcc2 internal prototype to avoid an error.  */
13541 /* We use char because int might match the return type of a gcc2
13542     builtin and then its argument prototype would still apply.  */
13543 char poptGetContext();
13544
13545 int main() {
13546 poptGetContext()
13547 ; return 0; }
13548 EOF
13549 if { (eval echo configure:13550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13550   rm -rf conftest*
13551   eval "ac_cv_lib_$ac_lib_var=yes"
13552 else
13553   echo "configure: failed program was:" >&5
13554   cat conftest.$ac_ext >&5
13555   rm -rf conftest*
13556   eval "ac_cv_lib_$ac_lib_var=no"
13557 fi
13558 rm -f conftest*
13559 LIBS="$ac_save_LIBS"
13560
13561 fi
13562 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13563   echo "$ac_t""yes" 1>&6
13564   INCLUDED_POPT=no
13565 else
13566   echo "$ac_t""no" 1>&6
13567 INCLUDED_POPT=yes
13568 fi
13569
13570 fi
13571
13572 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13573 echo "configure:13574: checking whether to use included popt" >&5
13574 if test x"$INCLUDED_POPT" = x"yes"; then
13575     echo "$ac_t""$srcdir/popt" 1>&6
13576     BUILD_POPT='$(POPT_OBJS)'
13577     FLAGS1="-I$srcdir/popt"
13578 else
13579     echo "$ac_t""no" 1>&6
13580     LIBS="$LIBS -lpopt"
13581 fi
13582
13583
13584
13585 #################################################
13586 # final configure stuff
13587
13588 echo "checking configure summary"
13589 if test "$cross_compiling" = yes; then
13590   :
13591 else
13592   cat > conftest.$ac_ext <<EOF
13593 #line 13594 "configure"
13594 #include "confdefs.h"
13595 #include "${srcdir-.}/tests/summary.c"
13596 EOF
13597 if { (eval echo configure:13598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13598 then
13599   echo "configure OK";
13600 else
13601   echo "configure: failed program was:" >&5
13602   cat conftest.$ac_ext >&5
13603   rm -fr conftest*
13604   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
13605 fi
13606 rm -fr conftest*
13607 fi
13608
13609
13610 builddir=`pwd`
13611
13612
13613 trap '' 1 2 15
13614 cat > confcache <<\EOF
13615 # This file is a shell script that caches the results of configure
13616 # tests run on this system so they can be shared between configure
13617 # scripts and configure runs.  It is not useful on other systems.
13618 # If it contains results you don't want to keep, you may remove or edit it.
13619 #
13620 # By default, configure uses ./config.cache as the cache file,
13621 # creating it if it does not exist already.  You can give configure
13622 # the --cache-file=FILE option to use a different cache file; that is
13623 # what configure does when it calls configure scripts in
13624 # subdirectories, so they share the cache.
13625 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13626 # config.status only pays attention to the cache file if you give it the
13627 # --recheck option to rerun configure.
13628 #
13629 EOF
13630 # The following way of writing the cache mishandles newlines in values,
13631 # but we know of no workaround that is simple, portable, and efficient.
13632 # So, don't put newlines in cache variables' values.
13633 # Ultrix sh set writes to stderr and can't be redirected directly,
13634 # and sets the high bit in the cache file unless we assign to the vars.
13635 (set) 2>&1 |
13636   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13637   *ac_space=\ *)
13638     # `set' does not quote correctly, so add quotes (double-quote substitution
13639     # turns \\\\ into \\, and sed turns \\ into \).
13640     sed -n \
13641       -e "s/'/'\\\\''/g" \
13642       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13643     ;;
13644   *)
13645     # `set' quotes correctly as required by POSIX, so do not add quotes.
13646     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13647     ;;
13648   esac >> confcache
13649 if cmp -s $cache_file confcache; then
13650   :
13651 else
13652   if test -w $cache_file; then
13653     echo "updating cache $cache_file"
13654     cat confcache > $cache_file
13655   else
13656     echo "not updating unwritable cache $cache_file"
13657   fi
13658 fi
13659 rm -f confcache
13660
13661 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13662
13663 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13664 # Let make expand exec_prefix.
13665 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13666
13667 # Any assignment to VPATH causes Sun make to only execute
13668 # the first set of double-colon rules, so remove it if not needed.
13669 # If there is a colon in the path, we need to keep it.
13670 if test "x$srcdir" = x.; then
13671   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13672 fi
13673
13674 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13675
13676 DEFS=-DHAVE_CONFIG_H
13677
13678 # Without the "./", some shells look in PATH for config.status.
13679 : ${CONFIG_STATUS=./config.status}
13680
13681 echo creating $CONFIG_STATUS
13682 rm -f $CONFIG_STATUS
13683 cat > $CONFIG_STATUS <<EOF
13684 #! /bin/sh
13685 # Generated automatically by configure.
13686 # Run this file to recreate the current configuration.
13687 # This directory was configured as follows,
13688 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13689 #
13690 # $0 $ac_configure_args
13691 #
13692 # Compiler output produced by configure, useful for debugging
13693 # configure, is in ./config.log if it exists.
13694
13695 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13696 for ac_option
13697 do
13698   case "\$ac_option" in
13699   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13700     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13701     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13702   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13703     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13704     exit 0 ;;
13705   -help | --help | --hel | --he | --h)
13706     echo "\$ac_cs_usage"; exit 0 ;;
13707   *) echo "\$ac_cs_usage"; exit 1 ;;
13708   esac
13709 done
13710
13711 ac_given_srcdir=$srcdir
13712 ac_given_INSTALL="$INSTALL"
13713
13714 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13715 EOF
13716 cat >> $CONFIG_STATUS <<EOF
13717
13718 # Protect against being on the right side of a sed subst in config.status.
13719 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13720  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13721 $ac_vpsub
13722 $extrasub
13723 s%@SHELL@%$SHELL%g
13724 s%@CFLAGS@%$CFLAGS%g
13725 s%@CPPFLAGS@%$CPPFLAGS%g
13726 s%@CXXFLAGS@%$CXXFLAGS%g
13727 s%@FFLAGS@%$FFLAGS%g
13728 s%@DEFS@%$DEFS%g
13729 s%@LDFLAGS@%$LDFLAGS%g
13730 s%@LIBS@%$LIBS%g
13731 s%@exec_prefix@%$exec_prefix%g
13732 s%@prefix@%$prefix%g
13733 s%@program_transform_name@%$program_transform_name%g
13734 s%@bindir@%$bindir%g
13735 s%@sbindir@%$sbindir%g
13736 s%@libexecdir@%$libexecdir%g
13737 s%@datadir@%$datadir%g
13738 s%@sysconfdir@%$sysconfdir%g
13739 s%@sharedstatedir@%$sharedstatedir%g
13740 s%@localstatedir@%$localstatedir%g
13741 s%@libdir@%$libdir%g
13742 s%@includedir@%$includedir%g
13743 s%@oldincludedir@%$oldincludedir%g
13744 s%@infodir@%$infodir%g
13745 s%@mandir@%$mandir%g
13746 s%@RUNPROG@%$RUNPROG%g
13747 s%@MPROGS@%$MPROGS%g
13748 s%@LDSHFLAGS@%$LDSHFLAGS%g
13749 s%@SHLD@%$SHLD%g
13750 s%@HOST_OS@%$HOST_OS%g
13751 s%@PAM_MOD@%$PAM_MOD%g
13752 s%@WRAP@%$WRAP%g
13753 s%@WRAP32@%$WRAP32%g
13754 s%@PICFLAG@%$PICFLAG%g
13755 s%@PICSUFFIX@%$PICSUFFIX%g
13756 s%@POBAD_CC@%$POBAD_CC%g
13757 s%@SHLIBEXT@%$SHLIBEXT%g
13758 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13759 s%@CC@%$CC%g
13760 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13761 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13762 s%@INSTALL_DATA@%$INSTALL_DATA%g
13763 s%@AWK@%$AWK%g
13764 s%@BROKEN_CC@%$BROKEN_CC%g
13765 s%@host@%$host%g
13766 s%@host_alias@%$host_alias%g
13767 s%@host_cpu@%$host_cpu%g
13768 s%@host_vendor@%$host_vendor%g
13769 s%@host_os@%$host_os%g
13770 s%@target@%$target%g
13771 s%@target_alias@%$target_alias%g
13772 s%@target_cpu@%$target_cpu%g
13773 s%@target_vendor@%$target_vendor%g
13774 s%@target_os@%$target_os%g
13775 s%@build@%$build%g
13776 s%@build_alias@%$build_alias%g
13777 s%@build_cpu@%$build_cpu%g
13778 s%@build_vendor@%$build_vendor%g
13779 s%@build_os@%$build_os%g
13780 s%@CPP@%$CPP%g
13781 s%@LIBOBJS@%$LIBOBJS%g
13782 s%@TERMLIBS@%$TERMLIBS%g
13783 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13784 s%@ROFF@%$ROFF%g
13785 s%@DYNEXP@%$DYNEXP%g
13786 s%@QUOTAOBJS@%$QUOTAOBJS%g
13787 s%@privatedir@%$privatedir%g
13788 s%@lockdir@%$lockdir%g
13789 s%@swatdir@%$swatdir%g
13790 s%@manlangs@%$manlangs%g
13791 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13792 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13793 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13794 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
13795 s%@BUILD_POPT@%$BUILD_POPT%g
13796 s%@FLAGS1@%$FLAGS1%g
13797 s%@builddir@%$builddir%g
13798
13799 CEOF
13800 EOF
13801
13802 cat >> $CONFIG_STATUS <<\EOF
13803
13804 # Split the substitutions into bite-sized pieces for seds with
13805 # small command number limits, like on Digital OSF/1 and HP-UX.
13806 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13807 ac_file=1 # Number of current file.
13808 ac_beg=1 # First line for current file.
13809 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13810 ac_more_lines=:
13811 ac_sed_cmds=""
13812 while $ac_more_lines; do
13813   if test $ac_beg -gt 1; then
13814     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13815   else
13816     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13817   fi
13818   if test ! -s conftest.s$ac_file; then
13819     ac_more_lines=false
13820     rm -f conftest.s$ac_file
13821   else
13822     if test -z "$ac_sed_cmds"; then
13823       ac_sed_cmds="sed -f conftest.s$ac_file"
13824     else
13825       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13826     fi
13827     ac_file=`expr $ac_file + 1`
13828     ac_beg=$ac_end
13829     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13830   fi
13831 done
13832 if test -z "$ac_sed_cmds"; then
13833   ac_sed_cmds=cat
13834 fi
13835 EOF
13836
13837 cat >> $CONFIG_STATUS <<EOF
13838
13839 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13840 EOF
13841 cat >> $CONFIG_STATUS <<\EOF
13842 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13843   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13844   case "$ac_file" in
13845   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13846        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13847   *) ac_file_in="${ac_file}.in" ;;
13848   esac
13849
13850   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13851
13852   # Remove last slash and all that follows it.  Not all systems have dirname.
13853   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13854   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13855     # The file is in a subdirectory.
13856     test ! -d "$ac_dir" && mkdir "$ac_dir"
13857     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13858     # A "../" for each directory in $ac_dir_suffix.
13859     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13860   else
13861     ac_dir_suffix= ac_dots=
13862   fi
13863
13864   case "$ac_given_srcdir" in
13865   .)  srcdir=.
13866       if test -z "$ac_dots"; then top_srcdir=.
13867       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13868   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13869   *) # Relative path.
13870     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13871     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13872   esac
13873
13874   case "$ac_given_INSTALL" in
13875   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13876   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13877   esac
13878
13879   echo creating "$ac_file"
13880   rm -f "$ac_file"
13881   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13882   case "$ac_file" in
13883   *Makefile*) ac_comsub="1i\\
13884 # $configure_input" ;;
13885   *) ac_comsub= ;;
13886   esac
13887
13888   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13889   sed -e "$ac_comsub
13890 s%@configure_input@%$configure_input%g
13891 s%@srcdir@%$srcdir%g
13892 s%@top_srcdir@%$top_srcdir%g
13893 s%@INSTALL@%$INSTALL%g
13894 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13895 fi; done
13896 rm -f conftest.s*
13897
13898 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13899 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13900 #
13901 # ac_d sets the value in "#define NAME VALUE" lines.
13902 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13903 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13904 ac_dC='\3'
13905 ac_dD='%g'
13906 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13907 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13908 ac_uB='\([      ]\)%\1#\2define\3'
13909 ac_uC=' '
13910 ac_uD='\4%g'
13911 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13912 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13913 ac_eB='$%\1#\2define\3'
13914 ac_eC=' '
13915 ac_eD='%g'
13916
13917 if test "${CONFIG_HEADERS+set}" != set; then
13918 EOF
13919 cat >> $CONFIG_STATUS <<EOF
13920   CONFIG_HEADERS="include/config.h"
13921 EOF
13922 cat >> $CONFIG_STATUS <<\EOF
13923 fi
13924 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13925   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13926   case "$ac_file" in
13927   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13928        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13929   *) ac_file_in="${ac_file}.in" ;;
13930   esac
13931
13932   echo creating $ac_file
13933
13934   rm -f conftest.frag conftest.in conftest.out
13935   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13936   cat $ac_file_inputs > conftest.in
13937
13938 EOF
13939
13940 # Transform confdefs.h into a sed script conftest.vals that substitutes
13941 # the proper values into config.h.in to produce config.h.  And first:
13942 # Protect against being on the right side of a sed subst in config.status.
13943 # Protect against being in an unquoted here document in config.status.
13944 rm -f conftest.vals
13945 cat > conftest.hdr <<\EOF
13946 s/[\\&%]/\\&/g
13947 s%[\\$`]%\\&%g
13948 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13949 s%ac_d%ac_u%gp
13950 s%ac_u%ac_e%gp
13951 EOF
13952 sed -n -f conftest.hdr confdefs.h > conftest.vals
13953 rm -f conftest.hdr
13954
13955 # This sed command replaces #undef with comments.  This is necessary, for
13956 # example, in the case of _POSIX_SOURCE, which is predefined and required
13957 # on some systems where configure will not decide to define it.
13958 cat >> conftest.vals <<\EOF
13959 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13960 EOF
13961
13962 # Break up conftest.vals because some shells have a limit on
13963 # the size of here documents, and old seds have small limits too.
13964
13965 rm -f conftest.tail
13966 while :
13967 do
13968   ac_lines=`grep -c . conftest.vals`
13969   # grep -c gives empty output for an empty file on some AIX systems.
13970   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13971   # Write a limited-size here document to conftest.frag.
13972   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13973   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13974   echo 'CEOF
13975   sed -f conftest.frag conftest.in > conftest.out
13976   rm -f conftest.in
13977   mv conftest.out conftest.in
13978 ' >> $CONFIG_STATUS
13979   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13980   rm -f conftest.vals
13981   mv conftest.tail conftest.vals
13982 done
13983 rm -f conftest.vals
13984
13985 cat >> $CONFIG_STATUS <<\EOF
13986   rm -f conftest.frag conftest.h
13987   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13988   cat conftest.in >> conftest.h
13989   rm -f conftest.in
13990   if cmp -s $ac_file conftest.h 2>/dev/null; then
13991     echo "$ac_file is unchanged"
13992     rm -f conftest.h
13993   else
13994     # Remove last slash and all that follows it.  Not all systems have dirname.
13995       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13996       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13997       # The file is in a subdirectory.
13998       test ! -d "$ac_dir" && mkdir "$ac_dir"
13999     fi
14000     rm -f $ac_file
14001     mv conftest.h $ac_file
14002   fi
14003 fi; done
14004
14005 EOF
14006 cat >> $CONFIG_STATUS <<EOF
14007
14008 EOF
14009 cat >> $CONFIG_STATUS <<\EOF
14010
14011 exit 0
14012 EOF
14013 chmod +x $CONFIG_STATUS
14014 rm -fr confdefs* $ac_clean_files
14015 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14016
14017
14018 #################################################
14019 # Print very concise instructions on building/use
14020 if test "x$enable_dmalloc" = xyes
14021 then
14022         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14023         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14024 fi