Rerun configure
[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                         cat >> confdefs.h <<\EOF
8685 #define SCO 1
8686 EOF
8687
8688                 ;;
8689                 *unixware*) cat >> confdefs.h <<\EOF
8690 #define UNIXWARE 1
8691 EOF
8692
8693                         BLDSHARED="true"
8694                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8695                         PICFLAG="-KPIC"
8696                 ;;
8697                 *next2*) cat >> confdefs.h <<\EOF
8698 #define NEXT2 1
8699 EOF
8700 ;;
8701                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8702 set dummy groff; ac_word=$2
8703 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8704 echo "configure:8705: checking for $ac_word" >&5
8705 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8706   echo $ac_n "(cached) $ac_c" 1>&6
8707 else
8708   if test -n "$ROFF"; then
8709   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8710 else
8711   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8712   ac_dummy="$PATH"
8713   for ac_dir in $ac_dummy; do
8714     test -z "$ac_dir" && ac_dir=.
8715     if test -f $ac_dir/$ac_word; then
8716       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8717       break
8718     fi
8719   done
8720   IFS="$ac_save_ifs"
8721 fi
8722 fi
8723 ROFF="$ac_cv_prog_ROFF"
8724 if test -n "$ROFF"; then
8725   echo "$ac_t""$ROFF" 1>&6
8726 else
8727   echo "$ac_t""no" 1>&6
8728 fi
8729 ;;
8730                 *sysv4*)
8731                         case "$host" in
8732                                 *-univel-*)
8733                                         if  test "$GCC" != yes ; then
8734                                                 cat >> confdefs.h <<\EOF
8735 #define HAVE_MEMSET 1
8736 EOF
8737
8738                                         fi
8739                                         LDSHFLAGS="-G"
8740                                         DYNEXP="-Bexport"
8741                                 ;;
8742                                 *mips-sni-sysv4*)
8743                                         cat >> confdefs.h <<\EOF
8744 #define RELIANTUNIX 1
8745 EOF
8746
8747                                 ;;
8748                         esac
8749                 ;;
8750
8751                 *sysv5*)
8752                         if  test "$GCC" != yes ; then
8753                                 cat >> confdefs.h <<\EOF
8754 #define HAVE_MEMSET 1
8755 EOF
8756
8757                         fi
8758                         LDSHFLAGS="-G"
8759                 ;;
8760 esac
8761
8762 echo "$ac_t""$BLDSHARED" 1>&6
8763 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
8764 echo "configure:8765: checking linker flags for shared libraries" >&5
8765 echo "$ac_t""$LDSHFLAGS" 1>&6
8766 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
8767 echo "configure:8768: checking compiler flags for position-independent code" >&5
8768 echo "$ac_t""$PICFLAGS" 1>&6
8769
8770 #######################################################
8771 # test whether building a shared library actually works
8772 if test $BLDSHARED = true; then
8773 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
8774 echo "configure:8775: checking whether building shared libraries actually works" >&5
8775 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
8776   echo $ac_n "(cached) $ac_c" 1>&6
8777 else
8778   
8779    ac_cv_shlib_works=no
8780    # try building a trivial shared library
8781    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
8782      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
8783      ac_cv_shlib_works=yes
8784    rm -f shlib.so shlib.po
8785
8786 fi
8787
8788 echo "$ac_t""$ac_cv_shlib_works" 1>&6
8789 if test $ac_cv_shlib_works = no; then
8790    BLDSHARED=false
8791 fi
8792 fi
8793
8794
8795 # this updates our target list if we can build shared libs
8796 if test $BLDSHARED = true; then
8797    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8798 else
8799    LIBSMBCLIENT_SHARED=
8800 fi
8801
8802 ################
8803
8804 echo $ac_n "checking for long long""... $ac_c" 1>&6
8805 echo "configure:8806: checking for long long" >&5
8806 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8807   echo $ac_n "(cached) $ac_c" 1>&6
8808 else
8809   
8810 if test "$cross_compiling" = yes; then
8811   samba_cv_have_longlong=cross
8812 else
8813   cat > conftest.$ac_ext <<EOF
8814 #line 8815 "configure"
8815 #include "confdefs.h"
8816 #include <stdio.h>
8817 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8818 EOF
8819 if { (eval echo configure:8820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8820 then
8821   samba_cv_have_longlong=yes
8822 else
8823   echo "configure: failed program was:" >&5
8824   cat conftest.$ac_ext >&5
8825   rm -fr conftest*
8826   samba_cv_have_longlong=no
8827 fi
8828 rm -fr conftest*
8829 fi
8830
8831 fi
8832
8833 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8834 if test x"$samba_cv_have_longlong" = x"yes"; then
8835     cat >> confdefs.h <<\EOF
8836 #define HAVE_LONGLONG 1
8837 EOF
8838
8839 fi
8840
8841 #
8842 # Check if the compiler supports the LL prefix on long long integers.
8843 # AIX needs this.
8844
8845 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8846 echo "configure:8847: checking for LL suffix on long long integers" >&5
8847 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8848   echo $ac_n "(cached) $ac_c" 1>&6
8849 else
8850   
8851     cat > conftest.$ac_ext <<EOF
8852 #line 8853 "configure"
8853 #include "confdefs.h"
8854 #include <stdio.h>
8855 int main() {
8856 long long i = 0x8000000000LL
8857 ; return 0; }
8858 EOF
8859 if { (eval echo configure:8860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8860   rm -rf conftest*
8861   samba_cv_compiler_supports_ll=yes
8862 else
8863   echo "configure: failed program was:" >&5
8864   cat conftest.$ac_ext >&5
8865   rm -rf conftest*
8866   samba_cv_compiler_supports_ll=no
8867 fi
8868 rm -f conftest*
8869 fi
8870
8871 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8872 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8873    cat >> confdefs.h <<\EOF
8874 #define COMPILER_SUPPORTS_LL 1
8875 EOF
8876
8877 fi
8878
8879   
8880 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8881 echo "configure:8882: checking for 64 bit off_t" >&5
8882 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8883   echo $ac_n "(cached) $ac_c" 1>&6
8884 else
8885   
8886 if test "$cross_compiling" = yes; then
8887   samba_cv_SIZEOF_OFF_T=cross
8888 else
8889   cat > conftest.$ac_ext <<EOF
8890 #line 8891 "configure"
8891 #include "confdefs.h"
8892 #include <stdio.h>
8893 #include <sys/stat.h>
8894 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8895 EOF
8896 if { (eval echo configure:8897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8897 then
8898   samba_cv_SIZEOF_OFF_T=yes
8899 else
8900   echo "configure: failed program was:" >&5
8901   cat conftest.$ac_ext >&5
8902   rm -fr conftest*
8903   samba_cv_SIZEOF_OFF_T=no
8904 fi
8905 rm -fr conftest*
8906 fi
8907
8908 fi
8909
8910 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8911 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8912     cat >> confdefs.h <<\EOF
8913 #define SIZEOF_OFF_T 8
8914 EOF
8915
8916 fi
8917
8918 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8919 echo "configure:8920: checking for off64_t" >&5
8920 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8921   echo $ac_n "(cached) $ac_c" 1>&6
8922 else
8923   
8924 if test "$cross_compiling" = yes; then
8925   samba_cv_HAVE_OFF64_T=cross
8926 else
8927   cat > conftest.$ac_ext <<EOF
8928 #line 8929 "configure"
8929 #include "confdefs.h"
8930
8931 #if defined(HAVE_UNISTD_H)
8932 #include <unistd.h>
8933 #endif
8934 #include <stdio.h>
8935 #include <sys/stat.h>
8936 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8937 EOF
8938 if { (eval echo configure:8939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8939 then
8940   samba_cv_HAVE_OFF64_T=yes
8941 else
8942   echo "configure: failed program was:" >&5
8943   cat conftest.$ac_ext >&5
8944   rm -fr conftest*
8945   samba_cv_HAVE_OFF64_T=no
8946 fi
8947 rm -fr conftest*
8948 fi
8949
8950 fi
8951
8952 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8953 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8954     cat >> confdefs.h <<\EOF
8955 #define HAVE_OFF64_T 1
8956 EOF
8957
8958 fi
8959
8960 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8961 echo "configure:8962: checking for 64 bit ino_t" >&5
8962 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8963   echo $ac_n "(cached) $ac_c" 1>&6
8964 else
8965   
8966 if test "$cross_compiling" = yes; then
8967   samba_cv_SIZEOF_INO_T=cross
8968 else
8969   cat > conftest.$ac_ext <<EOF
8970 #line 8971 "configure"
8971 #include "confdefs.h"
8972 #include <stdio.h>
8973 #include <sys/stat.h>
8974 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8975 EOF
8976 if { (eval echo configure:8977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8977 then
8978   samba_cv_SIZEOF_INO_T=yes
8979 else
8980   echo "configure: failed program was:" >&5
8981   cat conftest.$ac_ext >&5
8982   rm -fr conftest*
8983   samba_cv_SIZEOF_INO_T=no
8984 fi
8985 rm -fr conftest*
8986 fi
8987
8988 fi
8989
8990 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8991 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8992     cat >> confdefs.h <<\EOF
8993 #define SIZEOF_INO_T 8
8994 EOF
8995
8996 fi
8997
8998 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8999 echo "configure:9000: checking for ino64_t" >&5
9000 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9001   echo $ac_n "(cached) $ac_c" 1>&6
9002 else
9003   
9004 if test "$cross_compiling" = yes; then
9005   samba_cv_HAVE_INO64_T=cross
9006 else
9007   cat > conftest.$ac_ext <<EOF
9008 #line 9009 "configure"
9009 #include "confdefs.h"
9010
9011 #if defined(HAVE_UNISTD_H)
9012 #include <unistd.h>
9013 #endif
9014 #include <stdio.h>
9015 #include <sys/stat.h>
9016 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9017 EOF
9018 if { (eval echo configure:9019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9019 then
9020   samba_cv_HAVE_INO64_T=yes
9021 else
9022   echo "configure: failed program was:" >&5
9023   cat conftest.$ac_ext >&5
9024   rm -fr conftest*
9025   samba_cv_HAVE_INO64_T=no
9026 fi
9027 rm -fr conftest*
9028 fi
9029
9030 fi
9031
9032 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9033 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9034     cat >> confdefs.h <<\EOF
9035 #define HAVE_INO64_T 1
9036 EOF
9037
9038 fi
9039
9040 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9041 echo "configure:9042: checking for dev64_t" >&5
9042 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9043   echo $ac_n "(cached) $ac_c" 1>&6
9044 else
9045   
9046 if test "$cross_compiling" = yes; then
9047   samba_cv_HAVE_DEV64_T=cross
9048 else
9049   cat > conftest.$ac_ext <<EOF
9050 #line 9051 "configure"
9051 #include "confdefs.h"
9052
9053 #if defined(HAVE_UNISTD_H)
9054 #include <unistd.h>
9055 #endif
9056 #include <stdio.h>
9057 #include <sys/stat.h>
9058 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9059 EOF
9060 if { (eval echo configure:9061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9061 then
9062   samba_cv_HAVE_DEV64_T=yes
9063 else
9064   echo "configure: failed program was:" >&5
9065   cat conftest.$ac_ext >&5
9066   rm -fr conftest*
9067   samba_cv_HAVE_DEV64_T=no
9068 fi
9069 rm -fr conftest*
9070 fi
9071
9072 fi
9073
9074 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9075 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9076     cat >> confdefs.h <<\EOF
9077 #define HAVE_DEV64_T 1
9078 EOF
9079
9080 fi
9081
9082 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9083 echo "configure:9084: checking for struct dirent64" >&5
9084 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9085   echo $ac_n "(cached) $ac_c" 1>&6
9086 else
9087   
9088 cat > conftest.$ac_ext <<EOF
9089 #line 9090 "configure"
9090 #include "confdefs.h"
9091
9092 #if defined(HAVE_UNISTD_H)
9093 #include <unistd.h>
9094 #endif
9095 #include <sys/types.h>
9096 #include <dirent.h>
9097 int main() {
9098 struct dirent64 de;
9099 ; return 0; }
9100 EOF
9101 if { (eval echo configure:9102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9102   rm -rf conftest*
9103   samba_cv_HAVE_STRUCT_DIRENT64=yes
9104 else
9105   echo "configure: failed program was:" >&5
9106   cat conftest.$ac_ext >&5
9107   rm -rf conftest*
9108   samba_cv_HAVE_STRUCT_DIRENT64=no
9109 fi
9110 rm -f conftest*
9111 fi
9112
9113 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9114 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9115     cat >> confdefs.h <<\EOF
9116 #define HAVE_STRUCT_DIRENT64 1
9117 EOF
9118
9119 fi
9120
9121 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9122 echo "configure:9123: checking for major macro" >&5
9123 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9124   echo $ac_n "(cached) $ac_c" 1>&6
9125 else
9126   
9127 if test "$cross_compiling" = yes; then
9128   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9129 else
9130   cat > conftest.$ac_ext <<EOF
9131 #line 9132 "configure"
9132 #include "confdefs.h"
9133
9134 #if defined(HAVE_UNISTD_H)
9135 #include <unistd.h>
9136 #endif
9137 #include <sys/types.h>
9138 main() { dev_t dev; int i = major(dev); return 0; }
9139 EOF
9140 if { (eval echo configure:9141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9141 then
9142   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9143 else
9144   echo "configure: failed program was:" >&5
9145   cat conftest.$ac_ext >&5
9146   rm -fr conftest*
9147   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9148 fi
9149 rm -fr conftest*
9150 fi
9151
9152 fi
9153
9154 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9155 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9156     cat >> confdefs.h <<\EOF
9157 #define HAVE_DEVICE_MAJOR_FN 1
9158 EOF
9159
9160 fi
9161
9162 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9163 echo "configure:9164: checking for minor macro" >&5
9164 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9165   echo $ac_n "(cached) $ac_c" 1>&6
9166 else
9167   
9168 if test "$cross_compiling" = yes; then
9169   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9170 else
9171   cat > conftest.$ac_ext <<EOF
9172 #line 9173 "configure"
9173 #include "confdefs.h"
9174
9175 #if defined(HAVE_UNISTD_H)
9176 #include <unistd.h>
9177 #endif
9178 #include <sys/types.h>
9179 main() { dev_t dev; int i = minor(dev); return 0; }
9180 EOF
9181 if { (eval echo configure:9182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9182 then
9183   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9184 else
9185   echo "configure: failed program was:" >&5
9186   cat conftest.$ac_ext >&5
9187   rm -fr conftest*
9188   samba_cv_HAVE_DEVICE_MINOR_FN=no
9189 fi
9190 rm -fr conftest*
9191 fi
9192
9193 fi
9194
9195 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9196 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9197     cat >> confdefs.h <<\EOF
9198 #define HAVE_DEVICE_MINOR_FN 1
9199 EOF
9200
9201 fi
9202
9203 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9204 echo "configure:9205: checking for unsigned char" >&5
9205 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9206   echo $ac_n "(cached) $ac_c" 1>&6
9207 else
9208   
9209 if test "$cross_compiling" = yes; then
9210   samba_cv_HAVE_UNSIGNED_CHAR=cross
9211 else
9212   cat > conftest.$ac_ext <<EOF
9213 #line 9214 "configure"
9214 #include "confdefs.h"
9215 #include <stdio.h>
9216 main() { char c; c=250; exit((c > 0)?0:1); }
9217 EOF
9218 if { (eval echo configure:9219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9219 then
9220   samba_cv_HAVE_UNSIGNED_CHAR=yes
9221 else
9222   echo "configure: failed program was:" >&5
9223   cat conftest.$ac_ext >&5
9224   rm -fr conftest*
9225   samba_cv_HAVE_UNSIGNED_CHAR=no
9226 fi
9227 rm -fr conftest*
9228 fi
9229
9230 fi
9231
9232 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9233 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9234     cat >> confdefs.h <<\EOF
9235 #define HAVE_UNSIGNED_CHAR 1
9236 EOF
9237
9238 fi
9239
9240 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9241 echo "configure:9242: checking for sin_len in sock" >&5
9242 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9243   echo $ac_n "(cached) $ac_c" 1>&6
9244 else
9245   
9246 cat > conftest.$ac_ext <<EOF
9247 #line 9248 "configure"
9248 #include "confdefs.h"
9249 #include <sys/types.h>
9250 #include <sys/socket.h>
9251 #include <netinet/in.h>
9252 int main() {
9253 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9254 ; return 0; }
9255 EOF
9256 if { (eval echo configure:9257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9257   rm -rf conftest*
9258   samba_cv_HAVE_SOCK_SIN_LEN=yes
9259 else
9260   echo "configure: failed program was:" >&5
9261   cat conftest.$ac_ext >&5
9262   rm -rf conftest*
9263   samba_cv_HAVE_SOCK_SIN_LEN=no
9264 fi
9265 rm -f conftest*
9266 fi
9267
9268 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9269 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9270     cat >> confdefs.h <<\EOF
9271 #define HAVE_SOCK_SIN_LEN 1
9272 EOF
9273
9274 fi
9275
9276 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9277 echo "configure:9278: checking whether seekdir returns void" >&5
9278 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9279   echo $ac_n "(cached) $ac_c" 1>&6
9280 else
9281   
9282 cat > conftest.$ac_ext <<EOF
9283 #line 9284 "configure"
9284 #include "confdefs.h"
9285 #include <sys/types.h>
9286 #include <dirent.h>
9287 void seekdir(DIR *d, long loc) { return; }
9288 int main() {
9289 return 0;
9290 ; return 0; }
9291 EOF
9292 if { (eval echo configure:9293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9293   rm -rf conftest*
9294   samba_cv_SEEKDIR_RETURNS_VOID=yes
9295 else
9296   echo "configure: failed program was:" >&5
9297   cat conftest.$ac_ext >&5
9298   rm -rf conftest*
9299   samba_cv_SEEKDIR_RETURNS_VOID=no
9300 fi
9301 rm -f conftest*
9302 fi
9303
9304 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9305 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9306     cat >> confdefs.h <<\EOF
9307 #define SEEKDIR_RETURNS_VOID 1
9308 EOF
9309
9310 fi
9311
9312 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9313 echo "configure:9314: checking for __FILE__ macro" >&5
9314 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9315   echo $ac_n "(cached) $ac_c" 1>&6
9316 else
9317   
9318 cat > conftest.$ac_ext <<EOF
9319 #line 9320 "configure"
9320 #include "confdefs.h"
9321 #include <stdio.h>
9322 int main() {
9323 printf("%s\n", __FILE__);
9324 ; return 0; }
9325 EOF
9326 if { (eval echo configure:9327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9327   rm -rf conftest*
9328   samba_cv_HAVE_FILE_MACRO=yes
9329 else
9330   echo "configure: failed program was:" >&5
9331   cat conftest.$ac_ext >&5
9332   rm -rf conftest*
9333   samba_cv_HAVE_FILE_MACRO=no
9334 fi
9335 rm -f conftest*
9336 fi
9337
9338 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9339 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9340     cat >> confdefs.h <<\EOF
9341 #define HAVE_FILE_MACRO 1
9342 EOF
9343
9344 fi
9345
9346 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9347 echo "configure:9348: checking for __FUNCTION__ macro" >&5
9348 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9349   echo $ac_n "(cached) $ac_c" 1>&6
9350 else
9351   
9352 cat > conftest.$ac_ext <<EOF
9353 #line 9354 "configure"
9354 #include "confdefs.h"
9355 #include <stdio.h>
9356 int main() {
9357 printf("%s\n", __FUNCTION__);
9358 ; return 0; }
9359 EOF
9360 if { (eval echo configure:9361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9361   rm -rf conftest*
9362   samba_cv_HAVE_FUNCTION_MACRO=yes
9363 else
9364   echo "configure: failed program was:" >&5
9365   cat conftest.$ac_ext >&5
9366   rm -rf conftest*
9367   samba_cv_HAVE_FUNCTION_MACRO=no
9368 fi
9369 rm -f conftest*
9370 fi
9371
9372 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9373 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9374     cat >> confdefs.h <<\EOF
9375 #define HAVE_FUNCTION_MACRO 1
9376 EOF
9377
9378 fi
9379
9380 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9381 echo "configure:9382: checking if gettimeofday takes tz argument" >&5
9382 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9383   echo $ac_n "(cached) $ac_c" 1>&6
9384 else
9385   
9386 if test "$cross_compiling" = yes; then
9387   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9388 else
9389   cat > conftest.$ac_ext <<EOF
9390 #line 9391 "configure"
9391 #include "confdefs.h"
9392
9393 #include <sys/time.h>
9394 #include <unistd.h>
9395 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9396 EOF
9397 if { (eval echo configure:9398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9398 then
9399   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9400 else
9401   echo "configure: failed program was:" >&5
9402   cat conftest.$ac_ext >&5
9403   rm -fr conftest*
9404   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9405 fi
9406 rm -fr conftest*
9407 fi
9408
9409 fi
9410
9411 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9412 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9413     cat >> confdefs.h <<\EOF
9414 #define HAVE_GETTIMEOFDAY_TZ 1
9415 EOF
9416
9417 fi
9418
9419 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9420 echo "configure:9421: checking for C99 vsnprintf" >&5
9421 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9422   echo $ac_n "(cached) $ac_c" 1>&6
9423 else
9424   
9425 if test "$cross_compiling" = yes; then
9426   samba_cv_HAVE_C99_VSNPRINTF=cross
9427 else
9428   cat > conftest.$ac_ext <<EOF
9429 #line 9430 "configure"
9430 #include "confdefs.h"
9431
9432 #include <sys/types.h>
9433 #include <stdarg.h>
9434 void foo(const char *format, ...) { 
9435        va_list ap;
9436        int len;
9437        char buf[5];
9438
9439        va_start(ap, format);
9440        len = vsnprintf(buf, 0, format, ap);
9441        va_end(ap);
9442        if (len != 5) exit(1);
9443
9444        va_start(ap, format);
9445        len = vsnprintf(0, 0, format, ap);
9446        va_end(ap);
9447        if (len != 5) exit(1);
9448
9449        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9450
9451        exit(0);
9452 }
9453 main() { foo("hello"); }
9454
9455 EOF
9456 if { (eval echo configure:9457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9457 then
9458   samba_cv_HAVE_C99_VSNPRINTF=yes
9459 else
9460   echo "configure: failed program was:" >&5
9461   cat conftest.$ac_ext >&5
9462   rm -fr conftest*
9463   samba_cv_HAVE_C99_VSNPRINTF=no
9464 fi
9465 rm -fr conftest*
9466 fi
9467
9468 fi
9469
9470 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9471 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9472     cat >> confdefs.h <<\EOF
9473 #define HAVE_C99_VSNPRINTF 1
9474 EOF
9475
9476 fi
9477
9478 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9479 echo "configure:9480: checking for broken readdir" >&5
9480 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9481   echo $ac_n "(cached) $ac_c" 1>&6
9482 else
9483   
9484 if test "$cross_compiling" = yes; then
9485   samba_cv_HAVE_BROKEN_READDIR=cross
9486 else
9487   cat > conftest.$ac_ext <<EOF
9488 #line 9489 "configure"
9489 #include "confdefs.h"
9490 #include <sys/types.h>
9491 #include <dirent.h>
9492 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9493 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9494 di->d_name[0] == 0) exit(0); exit(1);} 
9495 EOF
9496 if { (eval echo configure:9497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9497 then
9498   samba_cv_HAVE_BROKEN_READDIR=yes
9499 else
9500   echo "configure: failed program was:" >&5
9501   cat conftest.$ac_ext >&5
9502   rm -fr conftest*
9503   samba_cv_HAVE_BROKEN_READDIR=no
9504 fi
9505 rm -fr conftest*
9506 fi
9507
9508 fi
9509
9510 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9511 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9512     cat >> confdefs.h <<\EOF
9513 #define HAVE_BROKEN_READDIR 1
9514 EOF
9515
9516 fi
9517
9518 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9519 echo "configure:9520: checking for utimbuf" >&5
9520 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9521   echo $ac_n "(cached) $ac_c" 1>&6
9522 else
9523   
9524 cat > conftest.$ac_ext <<EOF
9525 #line 9526 "configure"
9526 #include "confdefs.h"
9527 #include <sys/types.h>
9528 #include <utime.h>
9529 int main() {
9530 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9531 ; return 0; }
9532 EOF
9533 if { (eval echo configure:9534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9534   rm -rf conftest*
9535   samba_cv_HAVE_UTIMBUF=yes
9536 else
9537   echo "configure: failed program was:" >&5
9538   cat conftest.$ac_ext >&5
9539   rm -rf conftest*
9540   samba_cv_HAVE_UTIMBUF=no
9541 fi
9542 rm -f conftest*
9543 fi
9544
9545 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9546 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9547     cat >> confdefs.h <<\EOF
9548 #define HAVE_UTIMBUF 1
9549 EOF
9550
9551 fi
9552
9553
9554 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9555 do
9556 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9557 echo "configure:9558: checking for $ac_func" >&5
9558 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9559   echo $ac_n "(cached) $ac_c" 1>&6
9560 else
9561   cat > conftest.$ac_ext <<EOF
9562 #line 9563 "configure"
9563 #include "confdefs.h"
9564 /* System header to define __stub macros and hopefully few prototypes,
9565     which can conflict with char $ac_func(); below.  */
9566 #include <assert.h>
9567 /* Override any gcc2 internal prototype to avoid an error.  */
9568 /* We use char because int might match the return type of a gcc2
9569     builtin and then its argument prototype would still apply.  */
9570 char $ac_func();
9571
9572 int main() {
9573
9574 /* The GNU C library defines this for functions which it implements
9575     to always fail with ENOSYS.  Some functions are actually named
9576     something starting with __ and the normal name is an alias.  */
9577 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9578 choke me
9579 #else
9580 $ac_func();
9581 #endif
9582
9583 ; return 0; }
9584 EOF
9585 if { (eval echo configure:9586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9586   rm -rf conftest*
9587   eval "ac_cv_func_$ac_func=yes"
9588 else
9589   echo "configure: failed program was:" >&5
9590   cat conftest.$ac_ext >&5
9591   rm -rf conftest*
9592   eval "ac_cv_func_$ac_func=no"
9593 fi
9594 rm -f conftest*
9595 fi
9596
9597 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9598   echo "$ac_t""yes" 1>&6
9599     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9600   cat >> confdefs.h <<EOF
9601 #define $ac_tr_func 1
9602 EOF
9603  
9604 else
9605   echo "$ac_t""no" 1>&6
9606 fi
9607 done
9608
9609
9610 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9611 echo "configure:9612: checking for ut_name in utmp" >&5
9612 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9613   echo $ac_n "(cached) $ac_c" 1>&6
9614 else
9615   
9616 cat > conftest.$ac_ext <<EOF
9617 #line 9618 "configure"
9618 #include "confdefs.h"
9619 #include <sys/types.h>
9620 #include <utmp.h>
9621 int main() {
9622 struct utmp ut;  ut.ut_name[0] = 'a';
9623 ; return 0; }
9624 EOF
9625 if { (eval echo configure:9626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9626   rm -rf conftest*
9627   samba_cv_HAVE_UT_UT_NAME=yes
9628 else
9629   echo "configure: failed program was:" >&5
9630   cat conftest.$ac_ext >&5
9631   rm -rf conftest*
9632   samba_cv_HAVE_UT_UT_NAME=no
9633 fi
9634 rm -f conftest*
9635 fi
9636
9637 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9638 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9639     cat >> confdefs.h <<\EOF
9640 #define HAVE_UT_UT_NAME 1
9641 EOF
9642
9643 fi 
9644
9645 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9646 echo "configure:9647: checking for ut_user in utmp" >&5
9647 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9648   echo $ac_n "(cached) $ac_c" 1>&6
9649 else
9650   
9651 cat > conftest.$ac_ext <<EOF
9652 #line 9653 "configure"
9653 #include "confdefs.h"
9654 #include <sys/types.h>
9655 #include <utmp.h>
9656 int main() {
9657 struct utmp ut;  ut.ut_user[0] = 'a';
9658 ; return 0; }
9659 EOF
9660 if { (eval echo configure:9661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9661   rm -rf conftest*
9662   samba_cv_HAVE_UT_UT_USER=yes
9663 else
9664   echo "configure: failed program was:" >&5
9665   cat conftest.$ac_ext >&5
9666   rm -rf conftest*
9667   samba_cv_HAVE_UT_UT_USER=no
9668 fi
9669 rm -f conftest*
9670 fi
9671
9672 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9673 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9674     cat >> confdefs.h <<\EOF
9675 #define HAVE_UT_UT_USER 1
9676 EOF
9677
9678 fi 
9679
9680 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9681 echo "configure:9682: checking for ut_id in utmp" >&5
9682 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9683   echo $ac_n "(cached) $ac_c" 1>&6
9684 else
9685   
9686 cat > conftest.$ac_ext <<EOF
9687 #line 9688 "configure"
9688 #include "confdefs.h"
9689 #include <sys/types.h>
9690 #include <utmp.h>
9691 int main() {
9692 struct utmp ut;  ut.ut_id[0] = 'a';
9693 ; return 0; }
9694 EOF
9695 if { (eval echo configure:9696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9696   rm -rf conftest*
9697   samba_cv_HAVE_UT_UT_ID=yes
9698 else
9699   echo "configure: failed program was:" >&5
9700   cat conftest.$ac_ext >&5
9701   rm -rf conftest*
9702   samba_cv_HAVE_UT_UT_ID=no
9703 fi
9704 rm -f conftest*
9705 fi
9706
9707 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9708 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9709     cat >> confdefs.h <<\EOF
9710 #define HAVE_UT_UT_ID 1
9711 EOF
9712
9713 fi 
9714
9715 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9716 echo "configure:9717: checking for ut_host in utmp" >&5
9717 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9718   echo $ac_n "(cached) $ac_c" 1>&6
9719 else
9720   
9721 cat > conftest.$ac_ext <<EOF
9722 #line 9723 "configure"
9723 #include "confdefs.h"
9724 #include <sys/types.h>
9725 #include <utmp.h>
9726 int main() {
9727 struct utmp ut;  ut.ut_host[0] = 'a';
9728 ; return 0; }
9729 EOF
9730 if { (eval echo configure:9731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9731   rm -rf conftest*
9732   samba_cv_HAVE_UT_UT_HOST=yes
9733 else
9734   echo "configure: failed program was:" >&5
9735   cat conftest.$ac_ext >&5
9736   rm -rf conftest*
9737   samba_cv_HAVE_UT_UT_HOST=no
9738 fi
9739 rm -f conftest*
9740 fi
9741
9742 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9743 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9744     cat >> confdefs.h <<\EOF
9745 #define HAVE_UT_UT_HOST 1
9746 EOF
9747
9748 fi 
9749
9750 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9751 echo "configure:9752: checking for ut_time in utmp" >&5
9752 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9753   echo $ac_n "(cached) $ac_c" 1>&6
9754 else
9755   
9756 cat > conftest.$ac_ext <<EOF
9757 #line 9758 "configure"
9758 #include "confdefs.h"
9759 #include <sys/types.h>
9760 #include <utmp.h>
9761 int main() {
9762 struct utmp ut;  time_t t; ut.ut_time = t;
9763 ; return 0; }
9764 EOF
9765 if { (eval echo configure:9766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9766   rm -rf conftest*
9767   samba_cv_HAVE_UT_UT_TIME=yes
9768 else
9769   echo "configure: failed program was:" >&5
9770   cat conftest.$ac_ext >&5
9771   rm -rf conftest*
9772   samba_cv_HAVE_UT_UT_TIME=no
9773 fi
9774 rm -f conftest*
9775 fi
9776
9777 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9778 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9779     cat >> confdefs.h <<\EOF
9780 #define HAVE_UT_UT_TIME 1
9781 EOF
9782
9783 fi 
9784
9785 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9786 echo "configure:9787: checking for ut_tv in utmp" >&5
9787 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9788   echo $ac_n "(cached) $ac_c" 1>&6
9789 else
9790   
9791 cat > conftest.$ac_ext <<EOF
9792 #line 9793 "configure"
9793 #include "confdefs.h"
9794 #include <sys/types.h>
9795 #include <utmp.h>
9796 int main() {
9797 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9798 ; return 0; }
9799 EOF
9800 if { (eval echo configure:9801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9801   rm -rf conftest*
9802   samba_cv_HAVE_UT_UT_TV=yes
9803 else
9804   echo "configure: failed program was:" >&5
9805   cat conftest.$ac_ext >&5
9806   rm -rf conftest*
9807   samba_cv_HAVE_UT_UT_TV=no
9808 fi
9809 rm -f conftest*
9810 fi
9811
9812 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9813 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9814     cat >> confdefs.h <<\EOF
9815 #define HAVE_UT_UT_TV 1
9816 EOF
9817
9818 fi 
9819
9820 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9821 echo "configure:9822: checking for ut_type in utmp" >&5
9822 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9823   echo $ac_n "(cached) $ac_c" 1>&6
9824 else
9825   
9826 cat > conftest.$ac_ext <<EOF
9827 #line 9828 "configure"
9828 #include "confdefs.h"
9829 #include <sys/types.h>
9830 #include <utmp.h>
9831 int main() {
9832 struct utmp ut;  ut.ut_type = 0;
9833 ; return 0; }
9834 EOF
9835 if { (eval echo configure:9836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9836   rm -rf conftest*
9837   samba_cv_HAVE_UT_UT_TYPE=yes
9838 else
9839   echo "configure: failed program was:" >&5
9840   cat conftest.$ac_ext >&5
9841   rm -rf conftest*
9842   samba_cv_HAVE_UT_UT_TYPE=no
9843 fi
9844 rm -f conftest*
9845 fi
9846
9847 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9848 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9849     cat >> confdefs.h <<\EOF
9850 #define HAVE_UT_UT_TYPE 1
9851 EOF
9852
9853 fi 
9854
9855 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9856 echo "configure:9857: checking for ut_pid in utmp" >&5
9857 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9858   echo $ac_n "(cached) $ac_c" 1>&6
9859 else
9860   
9861 cat > conftest.$ac_ext <<EOF
9862 #line 9863 "configure"
9863 #include "confdefs.h"
9864 #include <sys/types.h>
9865 #include <utmp.h>
9866 int main() {
9867 struct utmp ut;  ut.ut_pid = 0;
9868 ; return 0; }
9869 EOF
9870 if { (eval echo configure:9871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9871   rm -rf conftest*
9872   samba_cv_HAVE_UT_UT_PID=yes
9873 else
9874   echo "configure: failed program was:" >&5
9875   cat conftest.$ac_ext >&5
9876   rm -rf conftest*
9877   samba_cv_HAVE_UT_UT_PID=no
9878 fi
9879 rm -f conftest*
9880 fi
9881
9882 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9883 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9884     cat >> confdefs.h <<\EOF
9885 #define HAVE_UT_UT_PID 1
9886 EOF
9887
9888 fi 
9889
9890 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9891 echo "configure:9892: checking for ut_exit in utmp" >&5
9892 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9893   echo $ac_n "(cached) $ac_c" 1>&6
9894 else
9895   
9896 cat > conftest.$ac_ext <<EOF
9897 #line 9898 "configure"
9898 #include "confdefs.h"
9899 #include <sys/types.h>
9900 #include <utmp.h>
9901 int main() {
9902 struct utmp ut;  ut.ut_exit.e_exit = 0;
9903 ; return 0; }
9904 EOF
9905 if { (eval echo configure:9906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9906   rm -rf conftest*
9907   samba_cv_HAVE_UT_UT_EXIT=yes
9908 else
9909   echo "configure: failed program was:" >&5
9910   cat conftest.$ac_ext >&5
9911   rm -rf conftest*
9912   samba_cv_HAVE_UT_UT_EXIT=no
9913 fi
9914 rm -f conftest*
9915 fi
9916
9917 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9918 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9919     cat >> confdefs.h <<\EOF
9920 #define HAVE_UT_UT_EXIT 1
9921 EOF
9922
9923 fi 
9924
9925 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9926 echo "configure:9927: checking for ut_addr in utmp" >&5
9927 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9928   echo $ac_n "(cached) $ac_c" 1>&6
9929 else
9930   
9931 cat > conftest.$ac_ext <<EOF
9932 #line 9933 "configure"
9933 #include "confdefs.h"
9934 #include <sys/types.h>
9935 #include <utmp.h>
9936 int main() {
9937 struct utmp ut;  ut.ut_addr = 0;
9938 ; return 0; }
9939 EOF
9940 if { (eval echo configure:9941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9941   rm -rf conftest*
9942   samba_cv_HAVE_UT_UT_ADDR=yes
9943 else
9944   echo "configure: failed program was:" >&5
9945   cat conftest.$ac_ext >&5
9946   rm -rf conftest*
9947   samba_cv_HAVE_UT_UT_ADDR=no
9948 fi
9949 rm -f conftest*
9950 fi
9951
9952 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9953 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9954     cat >> confdefs.h <<\EOF
9955 #define HAVE_UT_UT_ADDR 1
9956 EOF
9957
9958 fi 
9959
9960 if test x$ac_cv_func_pututline = xyes ; then
9961   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9962 echo "configure:9963: checking whether pututline returns pointer" >&5
9963 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9964   echo $ac_n "(cached) $ac_c" 1>&6
9965 else
9966   
9967   cat > conftest.$ac_ext <<EOF
9968 #line 9969 "configure"
9969 #include "confdefs.h"
9970 #include <sys/types.h>
9971 #include <utmp.h>
9972 int main() {
9973 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9974 ; return 0; }
9975 EOF
9976 if { (eval echo configure:9977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9977   rm -rf conftest*
9978   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9979 else
9980   echo "configure: failed program was:" >&5
9981   cat conftest.$ac_ext >&5
9982   rm -rf conftest*
9983   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9984 fi
9985 rm -f conftest*
9986 fi
9987
9988 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9989   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9990       cat >> confdefs.h <<\EOF
9991 #define PUTUTLINE_RETURNS_UTMP 1
9992 EOF
9993
9994   fi
9995 fi
9996
9997 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9998 echo "configure:9999: checking for ut_syslen in utmpx" >&5
9999 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10000   echo $ac_n "(cached) $ac_c" 1>&6
10001 else
10002   
10003 cat > conftest.$ac_ext <<EOF
10004 #line 10005 "configure"
10005 #include "confdefs.h"
10006 #include <sys/types.h>
10007 #include <utmpx.h>
10008 int main() {
10009 struct utmpx ux;  ux.ut_syslen = 0;
10010 ; return 0; }
10011 EOF
10012 if { (eval echo configure:10013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10013   rm -rf conftest*
10014   samba_cv_HAVE_UX_UT_SYSLEN=yes
10015 else
10016   echo "configure: failed program was:" >&5
10017   cat conftest.$ac_ext >&5
10018   rm -rf conftest*
10019   samba_cv_HAVE_UX_UT_SYSLEN=no
10020 fi
10021 rm -f conftest*
10022 fi
10023
10024 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10025 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10026     cat >> confdefs.h <<\EOF
10027 #define HAVE_UX_UT_SYSLEN 1
10028 EOF
10029
10030 fi 
10031
10032
10033 #################################################
10034 # check for libiconv support
10035 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10036 echo "configure:10037: checking whether to use libiconv" >&5
10037 # Check whether --with-libiconv or --without-libiconv was given.
10038 if test "${with_libiconv+set}" = set; then
10039   withval="$with_libiconv"
10040    case "$withval" in
10041   no)
10042     echo "$ac_t""no" 1>&6
10043     ;;
10044   *)
10045     echo "$ac_t""yes" 1>&6
10046     CFLAGS="$CFLAGS -I$withval/include"
10047     LDFLAGS="$LDFLAGS -L$withval/lib"
10048     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10049 echo "configure:10050: checking for iconv_open in -liconv" >&5
10050 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10051 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10052   echo $ac_n "(cached) $ac_c" 1>&6
10053 else
10054   ac_save_LIBS="$LIBS"
10055 LIBS="-liconv  $LIBS"
10056 cat > conftest.$ac_ext <<EOF
10057 #line 10058 "configure"
10058 #include "confdefs.h"
10059 /* Override any gcc2 internal prototype to avoid an error.  */
10060 /* We use char because int might match the return type of a gcc2
10061     builtin and then its argument prototype would still apply.  */
10062 char iconv_open();
10063
10064 int main() {
10065 iconv_open()
10066 ; return 0; }
10067 EOF
10068 if { (eval echo configure:10069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10069   rm -rf conftest*
10070   eval "ac_cv_lib_$ac_lib_var=yes"
10071 else
10072   echo "configure: failed program was:" >&5
10073   cat conftest.$ac_ext >&5
10074   rm -rf conftest*
10075   eval "ac_cv_lib_$ac_lib_var=no"
10076 fi
10077 rm -f conftest*
10078 LIBS="$ac_save_LIBS"
10079
10080 fi
10081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10082   echo "$ac_t""yes" 1>&6
10083     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10084     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10085   cat >> confdefs.h <<EOF
10086 #define $ac_tr_lib 1
10087 EOF
10088
10089   LIBS="-liconv $LIBS"
10090
10091 else
10092   echo "$ac_t""no" 1>&6
10093 fi
10094
10095     cat >> confdefs.h <<EOF
10096 #define WITH_LIBICONV "${withval}"
10097 EOF
10098
10099     ;;
10100   esac 
10101 else
10102   echo "$ac_t""no" 1>&6
10103
10104 fi
10105
10106
10107
10108 ############
10109 # check for iconv in libc
10110 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10111 echo "configure:10112: checking for working iconv" >&5
10112 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10113   echo $ac_n "(cached) $ac_c" 1>&6
10114 else
10115   
10116 if test "$cross_compiling" = yes; then
10117   samba_cv_HAVE_NATIVE_ICONV=cross
10118 else
10119   cat > conftest.$ac_ext <<EOF
10120 #line 10121 "configure"
10121 #include "confdefs.h"
10122
10123 #include <iconv.h>
10124 main() {
10125        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10126        if (cd == 0 || cd == (iconv_t)-1) return -1;
10127        return 0;
10128 }
10129
10130 EOF
10131 if { (eval echo configure:10132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10132 then
10133   samba_cv_HAVE_NATIVE_ICONV=yes
10134 else
10135   echo "configure: failed program was:" >&5
10136   cat conftest.$ac_ext >&5
10137   rm -fr conftest*
10138   samba_cv_HAVE_NATIVE_ICONV=no
10139 fi
10140 rm -fr conftest*
10141 fi
10142
10143 fi
10144
10145 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10146 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10147     cat >> confdefs.h <<\EOF
10148 #define HAVE_NATIVE_ICONV 1
10149 EOF
10150
10151 fi
10152
10153
10154 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10155 echo "configure:10156: checking for Linux kernel oplocks" >&5
10156 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10157   echo $ac_n "(cached) $ac_c" 1>&6
10158 else
10159   
10160 if test "$cross_compiling" = yes; then
10161   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10162 else
10163   cat > conftest.$ac_ext <<EOF
10164 #line 10165 "configure"
10165 #include "confdefs.h"
10166
10167 #include <sys/types.h>
10168 #include <fcntl.h>
10169 #ifndef F_GETLEASE
10170 #define F_GETLEASE      1025
10171 #endif
10172 main() {
10173        int fd = open("/dev/null", O_RDONLY);
10174        return fcntl(fd, F_GETLEASE, 0) == -1;
10175 }
10176
10177 EOF
10178 if { (eval echo configure:10179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10179 then
10180   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10181 else
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184   rm -fr conftest*
10185   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10186 fi
10187 rm -fr conftest*
10188 fi
10189
10190 fi
10191
10192 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10193 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10194     cat >> confdefs.h <<\EOF
10195 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10196 EOF
10197
10198 fi
10199
10200 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10201 echo "configure:10202: checking for kernel change notify support" >&5
10202 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10203   echo $ac_n "(cached) $ac_c" 1>&6
10204 else
10205   
10206 if test "$cross_compiling" = yes; then
10207   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10208 else
10209   cat > conftest.$ac_ext <<EOF
10210 #line 10211 "configure"
10211 #include "confdefs.h"
10212
10213 #include <sys/types.h>
10214 #include <fcntl.h>
10215 #include <signal.h>
10216 #ifndef F_NOTIFY
10217 #define F_NOTIFY 1026
10218 #endif
10219 main() {
10220         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10221 }
10222
10223 EOF
10224 if { (eval echo configure:10225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10225 then
10226   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10227 else
10228   echo "configure: failed program was:" >&5
10229   cat conftest.$ac_ext >&5
10230   rm -fr conftest*
10231   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10232 fi
10233 rm -fr conftest*
10234 fi
10235
10236 fi
10237
10238 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10239 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10240     cat >> confdefs.h <<\EOF
10241 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10242 EOF
10243
10244 fi
10245
10246 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10247 echo "configure:10248: checking for kernel share modes" >&5
10248 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10249   echo $ac_n "(cached) $ac_c" 1>&6
10250 else
10251   
10252 if test "$cross_compiling" = yes; then
10253   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10254 else
10255   cat > conftest.$ac_ext <<EOF
10256 #line 10257 "configure"
10257 #include "confdefs.h"
10258
10259 #include <sys/types.h>
10260 #include <fcntl.h>
10261 #include <signal.h>
10262 #include <sys/file.h>
10263 #ifndef LOCK_MAND
10264 #define LOCK_MAND       32
10265 #define LOCK_READ       64
10266 #endif
10267 main() {
10268         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10269 }
10270
10271 EOF
10272 if { (eval echo configure:10273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10273 then
10274   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10275 else
10276   echo "configure: failed program was:" >&5
10277   cat conftest.$ac_ext >&5
10278   rm -fr conftest*
10279   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10280 fi
10281 rm -fr conftest*
10282 fi
10283
10284 fi
10285
10286 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10287 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10288     cat >> confdefs.h <<\EOF
10289 #define HAVE_KERNEL_SHARE_MODES 1
10290 EOF
10291
10292 fi
10293
10294
10295
10296
10297 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10298 echo "configure:10299: checking for IRIX kernel oplock type definitions" >&5
10299 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10300   echo $ac_n "(cached) $ac_c" 1>&6
10301 else
10302   
10303 cat > conftest.$ac_ext <<EOF
10304 #line 10305 "configure"
10305 #include "confdefs.h"
10306 #include <sys/types.h>
10307 #include <fcntl.h>
10308 int main() {
10309 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10310 ; return 0; }
10311 EOF
10312 if { (eval echo configure:10313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10313   rm -rf conftest*
10314   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10315 else
10316   echo "configure: failed program was:" >&5
10317   cat conftest.$ac_ext >&5
10318   rm -rf conftest*
10319   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10320 fi
10321 rm -f conftest*
10322 fi
10323
10324 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10325 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10326     cat >> confdefs.h <<\EOF
10327 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10328 EOF
10329
10330 fi
10331
10332 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10333 echo "configure:10334: checking for irix specific capabilities" >&5
10334 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10335   echo $ac_n "(cached) $ac_c" 1>&6
10336 else
10337   
10338 if test "$cross_compiling" = yes; then
10339   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10340 else
10341   cat > conftest.$ac_ext <<EOF
10342 #line 10343 "configure"
10343 #include "confdefs.h"
10344 #include <sys/types.h>
10345 #include <sys/capability.h>
10346 main() {
10347  cap_t cap;
10348  if ((cap = cap_get_proc()) == NULL)
10349    exit(1);
10350  cap->cap_effective |= CAP_NETWORK_MGT;
10351  cap->cap_inheritable |= CAP_NETWORK_MGT;
10352  cap_set_proc(cap);
10353  exit(0);
10354 }
10355
10356 EOF
10357 if { (eval echo configure:10358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10358 then
10359   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10360 else
10361   echo "configure: failed program was:" >&5
10362   cat conftest.$ac_ext >&5
10363   rm -fr conftest*
10364   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10365 fi
10366 rm -fr conftest*
10367 fi
10368
10369 fi
10370
10371 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10372 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10373     cat >> confdefs.h <<\EOF
10374 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10375 EOF
10376
10377 fi
10378
10379 #
10380 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10381 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10382 #
10383
10384 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10385 echo "configure:10386: checking for int16 typedef included by rpc/rpc.h" >&5
10386 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10387   echo $ac_n "(cached) $ac_c" 1>&6
10388 else
10389   
10390 cat > conftest.$ac_ext <<EOF
10391 #line 10392 "configure"
10392 #include "confdefs.h"
10393 #include <sys/types.h>
10394 #if defined(HAVE_RPC_RPC_H)
10395 #include <rpc/rpc.h>
10396 #endif
10397 int main() {
10398 int16 testvar;
10399 ; return 0; }
10400 EOF
10401 if { (eval echo configure:10402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10402   rm -rf conftest*
10403   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10404 else
10405   echo "configure: failed program was:" >&5
10406   cat conftest.$ac_ext >&5
10407   rm -rf conftest*
10408   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10409 fi
10410 rm -f conftest*
10411 fi
10412
10413 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10414 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10415     cat >> confdefs.h <<\EOF
10416 #define HAVE_INT16_FROM_RPC_RPC_H 1
10417 EOF
10418
10419 fi
10420
10421 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10422 echo "configure:10423: checking for uint16 typedef included by rpc/rpc.h" >&5
10423 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10424   echo $ac_n "(cached) $ac_c" 1>&6
10425 else
10426   
10427 cat > conftest.$ac_ext <<EOF
10428 #line 10429 "configure"
10429 #include "confdefs.h"
10430 #include <sys/types.h>
10431 #if defined(HAVE_RPC_RPC_H)
10432 #include <rpc/rpc.h>
10433 #endif
10434 int main() {
10435 uint16 testvar;
10436 ; return 0; }
10437 EOF
10438 if { (eval echo configure:10439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10439   rm -rf conftest*
10440   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10441 else
10442   echo "configure: failed program was:" >&5
10443   cat conftest.$ac_ext >&5
10444   rm -rf conftest*
10445   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10446 fi
10447 rm -f conftest*
10448 fi
10449
10450 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10451 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10452     cat >> confdefs.h <<\EOF
10453 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10454 EOF
10455
10456 fi
10457
10458 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10459 echo "configure:10460: checking for int32 typedef included by rpc/rpc.h" >&5
10460 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10461   echo $ac_n "(cached) $ac_c" 1>&6
10462 else
10463   
10464 cat > conftest.$ac_ext <<EOF
10465 #line 10466 "configure"
10466 #include "confdefs.h"
10467 #include <sys/types.h>
10468 #if defined(HAVE_RPC_RPC_H)
10469 #include <rpc/rpc.h>
10470 #endif
10471 int main() {
10472 int32 testvar;
10473 ; return 0; }
10474 EOF
10475 if { (eval echo configure:10476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10476   rm -rf conftest*
10477   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10478 else
10479   echo "configure: failed program was:" >&5
10480   cat conftest.$ac_ext >&5
10481   rm -rf conftest*
10482   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10483 fi
10484 rm -f conftest*
10485 fi
10486
10487 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10488 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10489     cat >> confdefs.h <<\EOF
10490 #define HAVE_INT32_FROM_RPC_RPC_H 1
10491 EOF
10492
10493 fi
10494
10495 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10496 echo "configure:10497: checking for uint32 typedef included by rpc/rpc.h" >&5
10497 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10498   echo $ac_n "(cached) $ac_c" 1>&6
10499 else
10500   
10501 cat > conftest.$ac_ext <<EOF
10502 #line 10503 "configure"
10503 #include "confdefs.h"
10504 #include <sys/types.h>
10505 #if defined(HAVE_RPC_RPC_H)
10506 #include <rpc/rpc.h>
10507 #endif
10508 int main() {
10509 uint32 testvar;
10510 ; return 0; }
10511 EOF
10512 if { (eval echo configure:10513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10513   rm -rf conftest*
10514   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10515 else
10516   echo "configure: failed program was:" >&5
10517   cat conftest.$ac_ext >&5
10518   rm -rf conftest*
10519   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10520 fi
10521 rm -f conftest*
10522 fi
10523
10524 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10525 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10526     cat >> confdefs.h <<\EOF
10527 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10528 EOF
10529
10530 fi
10531
10532
10533 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10534 echo "configure:10535: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10535 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10536   echo $ac_n "(cached) $ac_c" 1>&6
10537 else
10538   
10539 cat > conftest.$ac_ext <<EOF
10540 #line 10541 "configure"
10541 #include "confdefs.h"
10542 #include <sys/types.h>
10543 #ifdef HAVE_SYS_SECURITY_H
10544 #include <sys/security.h>
10545 #include <prot.h>
10546 #endif  /* HAVE_SYS_SECURITY_H */
10547 #if defined(HAVE_RPC_RPC_H)
10548 #include <rpc/rpc.h>
10549 #endif
10550 int main() {
10551 int testvar;
10552 ; return 0; }
10553 EOF
10554 if { (eval echo configure:10555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10555   rm -rf conftest*
10556   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10557 else
10558   echo "configure: failed program was:" >&5
10559   cat conftest.$ac_ext >&5
10560   rm -rf conftest*
10561   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10562 fi
10563 rm -f conftest*
10564 fi
10565
10566 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10567 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10568     cat >> confdefs.h <<\EOF
10569 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10570 EOF
10571
10572 fi
10573
10574 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10575 echo "configure:10576: checking for test routines" >&5
10576 if test "$cross_compiling" = yes; then
10577   echo "configure: warning: cannot run when cross-compiling" 1>&2
10578 else
10579   cat > conftest.$ac_ext <<EOF
10580 #line 10581 "configure"
10581 #include "confdefs.h"
10582 #include "${srcdir-.}/tests/trivial.c"
10583 EOF
10584 if { (eval echo configure:10585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10585 then
10586   echo "$ac_t""yes" 1>&6
10587 else
10588   echo "configure: failed program was:" >&5
10589   cat conftest.$ac_ext >&5
10590   rm -fr conftest*
10591   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10592 fi
10593 rm -fr conftest*
10594 fi
10595
10596
10597 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10598 echo "configure:10599: checking for ftruncate extend" >&5
10599 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10600   echo $ac_n "(cached) $ac_c" 1>&6
10601 else
10602   
10603 if test "$cross_compiling" = yes; then
10604   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10605 else
10606   cat > conftest.$ac_ext <<EOF
10607 #line 10608 "configure"
10608 #include "confdefs.h"
10609 #include "${srcdir-.}/tests/ftruncate.c"
10610 EOF
10611 if { (eval echo configure:10612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10612 then
10613   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10614 else
10615   echo "configure: failed program was:" >&5
10616   cat conftest.$ac_ext >&5
10617   rm -fr conftest*
10618   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10619 fi
10620 rm -fr conftest*
10621 fi
10622
10623 fi
10624
10625 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10626 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10627     cat >> confdefs.h <<\EOF
10628 #define HAVE_FTRUNCATE_EXTEND 1
10629 EOF
10630
10631 fi
10632
10633 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10634 echo "configure:10635: checking for AF_LOCAL socket support" >&5
10635 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10636   echo $ac_n "(cached) $ac_c" 1>&6
10637 else
10638   
10639 if test "$cross_compiling" = yes; then
10640   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10641 else
10642   cat > conftest.$ac_ext <<EOF
10643 #line 10644 "configure"
10644 #include "confdefs.h"
10645 #include "${srcdir-.}/tests/unixsock.c"
10646 EOF
10647 if { (eval echo configure:10648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10648 then
10649   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10650 else
10651   echo "configure: failed program was:" >&5
10652   cat conftest.$ac_ext >&5
10653   rm -fr conftest*
10654   samba_cv_HAVE_WORKING_AF_LOCAL=no
10655 fi
10656 rm -fr conftest*
10657 fi
10658
10659 fi
10660
10661 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10662 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10663 then
10664     cat >> confdefs.h <<\EOF
10665 #define HAVE_WORKING_AF_LOCAL 1
10666 EOF
10667
10668 fi
10669
10670 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10671 echo "configure:10672: checking for broken getgroups" >&5
10672 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10673   echo $ac_n "(cached) $ac_c" 1>&6
10674 else
10675   
10676 if test "$cross_compiling" = yes; then
10677   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10678 else
10679   cat > conftest.$ac_ext <<EOF
10680 #line 10681 "configure"
10681 #include "confdefs.h"
10682 #include "${srcdir-.}/tests/getgroups.c"
10683 EOF
10684 if { (eval echo configure:10685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10685 then
10686   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10687 else
10688   echo "configure: failed program was:" >&5
10689   cat conftest.$ac_ext >&5
10690   rm -fr conftest*
10691   samba_cv_HAVE_BROKEN_GETGROUPS=no
10692 fi
10693 rm -fr conftest*
10694 fi
10695
10696 fi
10697
10698 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10699 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10700     cat >> confdefs.h <<\EOF
10701 #define HAVE_BROKEN_GETGROUPS 1
10702 EOF
10703
10704 fi
10705
10706 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10707 echo "configure:10708: checking whether getpass should be replaced" >&5
10708 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10709   echo $ac_n "(cached) $ac_c" 1>&6
10710 else
10711   
10712 SAVE_CPPFLAGS="$CPPFLAGS"
10713 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10714 cat > conftest.$ac_ext <<EOF
10715 #line 10716 "configure"
10716 #include "confdefs.h"
10717
10718 #define REPLACE_GETPASS 1
10719 #define NO_CONFIG_H 1
10720 #define main dont_declare_main
10721 #include "${srcdir-.}/lib/getsmbpass.c"
10722 #undef main
10723
10724 int main() {
10725
10726 ; return 0; }
10727 EOF
10728 if { (eval echo configure:10729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10729   rm -rf conftest*
10730   samba_cv_REPLACE_GETPASS=yes
10731 else
10732   echo "configure: failed program was:" >&5
10733   cat conftest.$ac_ext >&5
10734   rm -rf conftest*
10735   samba_cv_REPLACE_GETPASS=no
10736 fi
10737 rm -f conftest*
10738 CPPFLAGS="$SAVE_CPPFLAGS"
10739
10740 fi
10741
10742 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10743 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10744         cat >> confdefs.h <<\EOF
10745 #define REPLACE_GETPASS 1
10746 EOF
10747
10748 fi
10749
10750 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10751 echo "configure:10752: checking for broken inet_ntoa" >&5
10752 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10753   echo $ac_n "(cached) $ac_c" 1>&6
10754 else
10755   
10756 if test "$cross_compiling" = yes; then
10757   samba_cv_REPLACE_INET_NTOA=cross
10758 else
10759   cat > conftest.$ac_ext <<EOF
10760 #line 10761 "configure"
10761 #include "confdefs.h"
10762
10763 #include <stdio.h>
10764 #include <sys/types.h>
10765 #include <netinet/in.h>
10766 #ifdef HAVE_ARPA_INET_H
10767 #include <arpa/inet.h>
10768 #endif
10769 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10770 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10771     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10772 exit(1);}
10773 EOF
10774 if { (eval echo configure:10775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10775 then
10776   samba_cv_REPLACE_INET_NTOA=yes
10777 else
10778   echo "configure: failed program was:" >&5
10779   cat conftest.$ac_ext >&5
10780   rm -fr conftest*
10781   samba_cv_REPLACE_INET_NTOA=no
10782 fi
10783 rm -fr conftest*
10784 fi
10785
10786 fi
10787
10788 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10789 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10790     cat >> confdefs.h <<\EOF
10791 #define REPLACE_INET_NTOA 1
10792 EOF
10793
10794 fi
10795
10796 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10797 echo "configure:10798: checking for secure mkstemp" >&5
10798 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10799   echo $ac_n "(cached) $ac_c" 1>&6
10800 else
10801   
10802 if test "$cross_compiling" = yes; then
10803   samba_cv_HAVE_SECURE_MKSTEMP=cross
10804 else
10805   cat > conftest.$ac_ext <<EOF
10806 #line 10807 "configure"
10807 #include "confdefs.h"
10808 #include <stdlib.h>
10809 #include <sys/types.h>
10810 #include <sys/stat.h>
10811 #include <unistd.h>
10812 main() { 
10813   struct stat st;
10814   char tpl[20]="/tmp/test.XXXXXX"; 
10815   int fd = mkstemp(tpl); 
10816   if (fd == -1) exit(1);
10817   unlink(tpl);
10818   if (fstat(fd, &st) != 0) exit(1);
10819   if ((st.st_mode & 0777) != 0600) exit(1);
10820   exit(0);
10821 }
10822 EOF
10823 if { (eval echo configure:10824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10824 then
10825   samba_cv_HAVE_SECURE_MKSTEMP=yes
10826 else
10827   echo "configure: failed program was:" >&5
10828   cat conftest.$ac_ext >&5
10829   rm -fr conftest*
10830   samba_cv_HAVE_SECURE_MKSTEMP=no
10831 fi
10832 rm -fr conftest*
10833 fi
10834
10835 fi
10836
10837 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10838 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10839     cat >> confdefs.h <<\EOF
10840 #define HAVE_SECURE_MKSTEMP 1
10841 EOF
10842
10843 fi
10844
10845 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10846 echo "configure:10847: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10847 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10848   echo $ac_n "(cached) $ac_c" 1>&6
10849 else
10850   
10851 if test "$cross_compiling" = yes; then
10852   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10853 else
10854   cat > conftest.$ac_ext <<EOF
10855 #line 10856 "configure"
10856 #include "confdefs.h"
10857 #include <unistd.h>
10858 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10859 EOF
10860 if { (eval echo configure:10861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10861 then
10862   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10863 else
10864   echo "configure: failed program was:" >&5
10865   cat conftest.$ac_ext >&5
10866   rm -fr conftest*
10867   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10868 fi
10869 rm -fr conftest*
10870 fi
10871
10872 fi
10873
10874 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10875 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10876     cat >> confdefs.h <<\EOF
10877 #define SYSCONF_SC_NGROUPS_MAX 1
10878 EOF
10879
10880 fi
10881
10882 echo $ac_n "checking for root""... $ac_c" 1>&6
10883 echo "configure:10884: checking for root" >&5
10884 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10885   echo $ac_n "(cached) $ac_c" 1>&6
10886 else
10887   
10888 if test "$cross_compiling" = yes; then
10889   samba_cv_HAVE_ROOT=cross
10890 else
10891   cat > conftest.$ac_ext <<EOF
10892 #line 10893 "configure"
10893 #include "confdefs.h"
10894 main() { exit(getuid() != 0); }
10895 EOF
10896 if { (eval echo configure:10897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10897 then
10898   samba_cv_HAVE_ROOT=yes
10899 else
10900   echo "configure: failed program was:" >&5
10901   cat conftest.$ac_ext >&5
10902   rm -fr conftest*
10903   samba_cv_HAVE_ROOT=no
10904 fi
10905 rm -fr conftest*
10906 fi
10907
10908 fi
10909
10910 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10911 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10912     cat >> confdefs.h <<\EOF
10913 #define HAVE_ROOT 1
10914 EOF
10915
10916 else
10917     echo "configure: warning: running as non-root will disable some tests" 1>&2
10918 fi
10919
10920 ##################
10921 # look for a method of finding the list of network interfaces
10922 iface=no;
10923 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10924 echo "configure:10925: checking for iface AIX" >&5
10925 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10926   echo $ac_n "(cached) $ac_c" 1>&6
10927 else
10928   
10929 if test "$cross_compiling" = yes; then
10930   samba_cv_HAVE_IFACE_AIX=cross
10931 else
10932   cat > conftest.$ac_ext <<EOF
10933 #line 10934 "configure"
10934 #include "confdefs.h"
10935
10936 #define HAVE_IFACE_AIX 1
10937 #define AUTOCONF_TEST 1
10938 #include "confdefs.h"
10939 #include "${srcdir-.}/lib/interfaces.c"
10940 EOF
10941 if { (eval echo configure:10942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10942 then
10943   samba_cv_HAVE_IFACE_AIX=yes
10944 else
10945   echo "configure: failed program was:" >&5
10946   cat conftest.$ac_ext >&5
10947   rm -fr conftest*
10948   samba_cv_HAVE_IFACE_AIX=no
10949 fi
10950 rm -fr conftest*
10951 fi
10952
10953 fi
10954
10955 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10956 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10957     iface=yes;cat >> confdefs.h <<\EOF
10958 #define HAVE_IFACE_AIX 1
10959 EOF
10960
10961 fi
10962
10963 if test $iface = no; then
10964 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10965 echo "configure:10966: checking for iface ifconf" >&5
10966 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10967   echo $ac_n "(cached) $ac_c" 1>&6
10968 else
10969   
10970 if test "$cross_compiling" = yes; then
10971   samba_cv_HAVE_IFACE_IFCONF=cross
10972 else
10973   cat > conftest.$ac_ext <<EOF
10974 #line 10975 "configure"
10975 #include "confdefs.h"
10976
10977 #define HAVE_IFACE_IFCONF 1
10978 #define AUTOCONF_TEST 1
10979 #include "confdefs.h"
10980 #include "${srcdir-.}/lib/interfaces.c"
10981 EOF
10982 if { (eval echo configure:10983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10983 then
10984   samba_cv_HAVE_IFACE_IFCONF=yes
10985 else
10986   echo "configure: failed program was:" >&5
10987   cat conftest.$ac_ext >&5
10988   rm -fr conftest*
10989   samba_cv_HAVE_IFACE_IFCONF=no
10990 fi
10991 rm -fr conftest*
10992 fi
10993
10994 fi
10995
10996 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10997 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10998     iface=yes;cat >> confdefs.h <<\EOF
10999 #define HAVE_IFACE_IFCONF 1
11000 EOF
11001
11002 fi
11003 fi
11004
11005 if test $iface = no; then
11006 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11007 echo "configure:11008: checking for iface ifreq" >&5
11008 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11009   echo $ac_n "(cached) $ac_c" 1>&6
11010 else
11011   
11012 if test "$cross_compiling" = yes; then
11013   samba_cv_HAVE_IFACE_IFREQ=cross
11014 else
11015   cat > conftest.$ac_ext <<EOF
11016 #line 11017 "configure"
11017 #include "confdefs.h"
11018
11019 #define HAVE_IFACE_IFREQ 1
11020 #define AUTOCONF_TEST 1
11021 #include "confdefs.h"
11022 #include "${srcdir-.}/lib/interfaces.c"
11023 EOF
11024 if { (eval echo configure:11025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11025 then
11026   samba_cv_HAVE_IFACE_IFREQ=yes
11027 else
11028   echo "configure: failed program was:" >&5
11029   cat conftest.$ac_ext >&5
11030   rm -fr conftest*
11031   samba_cv_HAVE_IFACE_IFREQ=no
11032 fi
11033 rm -fr conftest*
11034 fi
11035
11036 fi
11037
11038 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11039 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11040     iface=yes;cat >> confdefs.h <<\EOF
11041 #define HAVE_IFACE_IFREQ 1
11042 EOF
11043
11044 fi
11045 fi
11046
11047
11048 ################################################
11049 # look for a method of setting the effective uid
11050 seteuid=no;
11051 if test $seteuid = no; then
11052 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11053 echo "configure:11054: checking for setresuid" >&5
11054 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11055   echo $ac_n "(cached) $ac_c" 1>&6
11056 else
11057   
11058 if test "$cross_compiling" = yes; then
11059   samba_cv_USE_SETRESUID=cross
11060 else
11061   cat > conftest.$ac_ext <<EOF
11062 #line 11063 "configure"
11063 #include "confdefs.h"
11064
11065 #define AUTOCONF_TEST 1
11066 #define USE_SETRESUID 1
11067 #include "confdefs.h"
11068 #include "${srcdir-.}/lib/util_sec.c"
11069 EOF
11070 if { (eval echo configure:11071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11071 then
11072   samba_cv_USE_SETRESUID=yes
11073 else
11074   echo "configure: failed program was:" >&5
11075   cat conftest.$ac_ext >&5
11076   rm -fr conftest*
11077   samba_cv_USE_SETRESUID=no
11078 fi
11079 rm -fr conftest*
11080 fi
11081
11082 fi
11083
11084 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11085 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11086     seteuid=yes;cat >> confdefs.h <<\EOF
11087 #define USE_SETRESUID 1
11088 EOF
11089
11090 fi
11091 fi
11092
11093
11094 if test $seteuid = no; then
11095 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11096 echo "configure:11097: checking for setreuid" >&5
11097 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11098   echo $ac_n "(cached) $ac_c" 1>&6
11099 else
11100   
11101 if test "$cross_compiling" = yes; then
11102   samba_cv_USE_SETREUID=cross
11103 else
11104   cat > conftest.$ac_ext <<EOF
11105 #line 11106 "configure"
11106 #include "confdefs.h"
11107
11108 #define AUTOCONF_TEST 1
11109 #define USE_SETREUID 1
11110 #include "confdefs.h"
11111 #include "${srcdir-.}/lib/util_sec.c"
11112 EOF
11113 if { (eval echo configure:11114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11114 then
11115   samba_cv_USE_SETREUID=yes
11116 else
11117   echo "configure: failed program was:" >&5
11118   cat conftest.$ac_ext >&5
11119   rm -fr conftest*
11120   samba_cv_USE_SETREUID=no
11121 fi
11122 rm -fr conftest*
11123 fi
11124
11125 fi
11126
11127 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11128 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11129     seteuid=yes;cat >> confdefs.h <<\EOF
11130 #define USE_SETREUID 1
11131 EOF
11132
11133 fi
11134 fi
11135
11136 if test $seteuid = no; then
11137 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11138 echo "configure:11139: checking for seteuid" >&5
11139 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11140   echo $ac_n "(cached) $ac_c" 1>&6
11141 else
11142   
11143 if test "$cross_compiling" = yes; then
11144   samba_cv_USE_SETEUID=cross
11145 else
11146   cat > conftest.$ac_ext <<EOF
11147 #line 11148 "configure"
11148 #include "confdefs.h"
11149
11150 #define AUTOCONF_TEST 1
11151 #define USE_SETEUID 1
11152 #include "confdefs.h"
11153 #include "${srcdir-.}/lib/util_sec.c"
11154 EOF
11155 if { (eval echo configure:11156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11156 then
11157   samba_cv_USE_SETEUID=yes
11158 else
11159   echo "configure: failed program was:" >&5
11160   cat conftest.$ac_ext >&5
11161   rm -fr conftest*
11162   samba_cv_USE_SETEUID=no
11163 fi
11164 rm -fr conftest*
11165 fi
11166
11167 fi
11168
11169 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11170 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11171     seteuid=yes;cat >> confdefs.h <<\EOF
11172 #define USE_SETEUID 1
11173 EOF
11174
11175 fi
11176 fi
11177
11178 if test $seteuid = no; then
11179 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11180 echo "configure:11181: checking for setuidx" >&5
11181 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11182   echo $ac_n "(cached) $ac_c" 1>&6
11183 else
11184   
11185 if test "$cross_compiling" = yes; then
11186   samba_cv_USE_SETUIDX=cross
11187 else
11188   cat > conftest.$ac_ext <<EOF
11189 #line 11190 "configure"
11190 #include "confdefs.h"
11191
11192 #define AUTOCONF_TEST 1
11193 #define USE_SETUIDX 1
11194 #include "confdefs.h"
11195 #include "${srcdir-.}/lib/util_sec.c"
11196 EOF
11197 if { (eval echo configure:11198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11198 then
11199   samba_cv_USE_SETUIDX=yes
11200 else
11201   echo "configure: failed program was:" >&5
11202   cat conftest.$ac_ext >&5
11203   rm -fr conftest*
11204   samba_cv_USE_SETUIDX=no
11205 fi
11206 rm -fr conftest*
11207 fi
11208
11209 fi
11210
11211 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11212 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11213     seteuid=yes;cat >> confdefs.h <<\EOF
11214 #define USE_SETUIDX 1
11215 EOF
11216
11217 fi
11218 fi
11219
11220
11221 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11222 echo "configure:11223: checking for working mmap" >&5
11223 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11224   echo $ac_n "(cached) $ac_c" 1>&6
11225 else
11226   
11227 if test "$cross_compiling" = yes; then
11228   samba_cv_HAVE_MMAP=cross
11229 else
11230   cat > conftest.$ac_ext <<EOF
11231 #line 11232 "configure"
11232 #include "confdefs.h"
11233 #include "${srcdir-.}/tests/shared_mmap.c"
11234 EOF
11235 if { (eval echo configure:11236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11236 then
11237   samba_cv_HAVE_MMAP=yes
11238 else
11239   echo "configure: failed program was:" >&5
11240   cat conftest.$ac_ext >&5
11241   rm -fr conftest*
11242   samba_cv_HAVE_MMAP=no
11243 fi
11244 rm -fr conftest*
11245 fi
11246
11247 fi
11248
11249 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11250 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11251     cat >> confdefs.h <<\EOF
11252 #define HAVE_MMAP 1
11253 EOF
11254
11255 fi
11256
11257 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11258 echo "configure:11259: checking for ftruncate needs root" >&5
11259 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11260   echo $ac_n "(cached) $ac_c" 1>&6
11261 else
11262   
11263 if test "$cross_compiling" = yes; then
11264   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11265 else
11266   cat > conftest.$ac_ext <<EOF
11267 #line 11268 "configure"
11268 #include "confdefs.h"
11269 #include "${srcdir-.}/tests/ftruncroot.c"
11270 EOF
11271 if { (eval echo configure:11272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11272 then
11273   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11274 else
11275   echo "configure: failed program was:" >&5
11276   cat conftest.$ac_ext >&5
11277   rm -fr conftest*
11278   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11279 fi
11280 rm -fr conftest*
11281 fi
11282
11283 fi
11284
11285 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11286 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11287     cat >> confdefs.h <<\EOF
11288 #define FTRUNCATE_NEEDS_ROOT 1
11289 EOF
11290
11291 fi
11292
11293 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11294 echo "configure:11295: checking for fcntl locking" >&5
11295 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11296   echo $ac_n "(cached) $ac_c" 1>&6
11297 else
11298   
11299 if test "$cross_compiling" = yes; then
11300   samba_cv_HAVE_FCNTL_LOCK=cross
11301 else
11302   cat > conftest.$ac_ext <<EOF
11303 #line 11304 "configure"
11304 #include "confdefs.h"
11305 #include "${srcdir-.}/tests/fcntl_lock.c"
11306 EOF
11307 if { (eval echo configure:11308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11308 then
11309   samba_cv_HAVE_FCNTL_LOCK=yes
11310 else
11311   echo "configure: failed program was:" >&5
11312   cat conftest.$ac_ext >&5
11313   rm -fr conftest*
11314   samba_cv_HAVE_FCNTL_LOCK=no
11315 fi
11316 rm -fr conftest*
11317 fi
11318
11319 fi
11320
11321 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11322 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11323     cat >> confdefs.h <<\EOF
11324 #define HAVE_FCNTL_LOCK 1
11325 EOF
11326
11327 fi
11328
11329 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11330 echo "configure:11331: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11331 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11332   echo $ac_n "(cached) $ac_c" 1>&6
11333 else
11334   
11335 if test "$cross_compiling" = yes; then
11336   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11337 else
11338   cat > conftest.$ac_ext <<EOF
11339 #line 11340 "configure"
11340 #include "confdefs.h"
11341 #include "${srcdir-.}/tests/fcntl_lock64.c"
11342 EOF
11343 if { (eval echo configure:11344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11344 then
11345   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11346 else
11347   echo "configure: failed program was:" >&5
11348   cat conftest.$ac_ext >&5
11349   rm -fr conftest*
11350   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11351 fi
11352 rm -fr conftest*
11353 fi
11354
11355 fi
11356
11357 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11358 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11359     cat >> confdefs.h <<\EOF
11360 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11361 EOF
11362
11363
11364 else
11365
11366
11367   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11368 echo "configure:11369: checking for 64 bit fcntl locking" >&5
11369 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11370   echo $ac_n "(cached) $ac_c" 1>&6
11371 else
11372   
11373   if test "$cross_compiling" = yes; then
11374   samba_cv_HAVE_STRUCT_FLOCK64=cross
11375 else
11376   cat > conftest.$ac_ext <<EOF
11377 #line 11378 "configure"
11378 #include "confdefs.h"
11379
11380 #if defined(HAVE_UNISTD_H)
11381 #include <unistd.h>
11382 #endif
11383 #include <stdio.h>
11384 #include <stdlib.h>
11385
11386 #ifdef HAVE_FCNTL_H
11387 #include <fcntl.h>
11388 #endif
11389
11390 #ifdef HAVE_SYS_FCNTL_H
11391 #include <sys/fcntl.h>
11392 #endif
11393 main() { struct flock64 fl64;
11394 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11395 exit(0);
11396 #else
11397 exit(1);
11398 #endif
11399 }
11400 EOF
11401 if { (eval echo configure:11402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11402 then
11403   samba_cv_HAVE_STRUCT_FLOCK64=yes
11404 else
11405   echo "configure: failed program was:" >&5
11406   cat conftest.$ac_ext >&5
11407   rm -fr conftest*
11408   samba_cv_HAVE_STRUCT_FLOCK64=no
11409 fi
11410 rm -fr conftest*
11411 fi
11412
11413 fi
11414
11415 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11416
11417   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11418       cat >> confdefs.h <<\EOF
11419 #define HAVE_STRUCT_FLOCK64 1
11420 EOF
11421
11422   fi
11423 fi
11424
11425 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11426 echo "configure:11427: checking for st_blocks in struct stat" >&5
11427 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11428   echo $ac_n "(cached) $ac_c" 1>&6
11429 else
11430   
11431 cat > conftest.$ac_ext <<EOF
11432 #line 11433 "configure"
11433 #include "confdefs.h"
11434 #include <sys/types.h>
11435 #include <sys/stat.h>
11436 #include <unistd.h>
11437 int main() {
11438 struct stat st;  st.st_blocks = 0;
11439 ; return 0; }
11440 EOF
11441 if { (eval echo configure:11442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11442   rm -rf conftest*
11443   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11444 else
11445   echo "configure: failed program was:" >&5
11446   cat conftest.$ac_ext >&5
11447   rm -rf conftest*
11448   samba_cv_HAVE_STAT_ST_BLOCKS=no
11449 fi
11450 rm -f conftest*
11451 fi
11452
11453 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11454 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11455     cat >> confdefs.h <<\EOF
11456 #define HAVE_STAT_ST_BLOCKS 1
11457 EOF
11458
11459 fi 
11460
11461 case "$host_os" in
11462 *linux*)
11463 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11464 echo "configure:11465: checking for broken RedHat 7.2 system header files" >&5
11465 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11466   echo $ac_n "(cached) $ac_c" 1>&6
11467 else
11468   
11469 cat > conftest.$ac_ext <<EOF
11470 #line 11471 "configure"
11471 #include "confdefs.h"
11472
11473 #ifdef HAVE_SYS_VFS_H
11474 #include <sys/vfs.h>
11475 #endif
11476 #ifdef HAVE_SYS_CAPABILITY_H
11477 #include <sys/capability.h>
11478 #endif
11479
11480 int main() {
11481 int i;
11482 ; return 0; }
11483 EOF
11484 if { (eval echo configure:11485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11485   rm -rf conftest*
11486   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11487 else
11488   echo "configure: failed program was:" >&5
11489   cat conftest.$ac_ext >&5
11490   rm -rf conftest*
11491   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11492 fi
11493 rm -f conftest*
11494 fi
11495
11496 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11497 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11498    cat >> confdefs.h <<\EOF
11499 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11500 EOF
11501
11502 fi
11503 ;;
11504 esac
11505
11506 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11507 echo "configure:11508: checking for broken nisplus include files" >&5
11508 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11509   echo $ac_n "(cached) $ac_c" 1>&6
11510 else
11511   
11512 cat > conftest.$ac_ext <<EOF
11513 #line 11514 "configure"
11514 #include "confdefs.h"
11515 #include <sys/acl.h>
11516 #if defined(HAVE_RPCSVC_NIS_H)
11517 #include <rpcsvc/nis.h>
11518 #endif
11519 int main() {
11520 int i;
11521 ; return 0; }
11522 EOF
11523 if { (eval echo configure:11524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11524   rm -rf conftest*
11525   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11526 else
11527   echo "configure: failed program was:" >&5
11528   cat conftest.$ac_ext >&5
11529   rm -rf conftest*
11530   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11531 fi
11532 rm -f conftest*
11533 fi
11534
11535 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11536 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11537     cat >> confdefs.h <<\EOF
11538 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11539 EOF
11540
11541 fi
11542
11543
11544 #################################################
11545 # check for smbwrapper support
11546 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11547 echo "configure:11548: checking whether to use smbwrapper" >&5
11548 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11549 if test "${with_smbwrapper+set}" = set; then
11550   withval="$with_smbwrapper"
11551    case "$withval" in
11552   yes)
11553     echo "$ac_t""yes" 1>&6
11554     cat >> confdefs.h <<\EOF
11555 #define WITH_SMBWRAPPER 1
11556 EOF
11557
11558         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11559
11560         if test x$ATTEMPT_WRAP32_BUILD = x; then
11561                 WRAP32=""
11562         else
11563                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11564         fi
11565
11566 # Conditions under which smbwrapper should not be built.
11567
11568         if test x$PICFLAG = x; then
11569            echo No support for PIC code - disabling smbwrapper and smbsh
11570            WRAP=""
11571            WRAP32=""
11572         elif test x$ac_cv_func_syscall = xno; then
11573            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11574            WRAP=""
11575            WRAP32=""
11576         fi
11577     ;;
11578   *)
11579     echo "$ac_t""no" 1>&6
11580     ;;
11581   esac 
11582 else
11583   echo "$ac_t""no" 1>&6
11584
11585 fi
11586
11587
11588 #################################################
11589 # check for AFS clear-text auth support
11590 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11591 echo "configure:11592: checking whether to use AFS clear-text auth" >&5
11592 # Check whether --with-afs or --without-afs was given.
11593 if test "${with_afs+set}" = set; then
11594   withval="$with_afs"
11595    case "$withval" in
11596   yes)
11597     echo "$ac_t""yes" 1>&6
11598     cat >> confdefs.h <<\EOF
11599 #define WITH_AFS 1
11600 EOF
11601
11602     ;;
11603   *)
11604     echo "$ac_t""no" 1>&6
11605     ;;
11606   esac 
11607 else
11608   echo "$ac_t""no" 1>&6
11609
11610 fi
11611
11612
11613
11614 #################################################
11615 # check for the DFS clear-text auth system
11616 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11617 echo "configure:11618: checking whether to use DFS clear-text auth" >&5
11618 # Check whether --with-dfs or --without-dfs was given.
11619 if test "${with_dfs+set}" = set; then
11620   withval="$with_dfs"
11621    case "$withval" in
11622   yes)
11623     echo "$ac_t""yes" 1>&6
11624     cat >> confdefs.h <<\EOF
11625 #define WITH_DFS 1
11626 EOF
11627
11628     ;;
11629   *)
11630     echo "$ac_t""no" 1>&6
11631     ;;
11632   esac 
11633 else
11634   echo "$ac_t""no" 1>&6
11635
11636 fi
11637
11638
11639
11640 #################################################
11641 # see if this box has the RedHat location for kerberos
11642 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11643 echo "configure:11644: checking for /usr/kerberos" >&5
11644 if test -d /usr/kerberos; then
11645     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11646     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11647     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11648     echo "$ac_t""yes" 1>&6
11649 else
11650     echo "$ac_t""no" 1>&6
11651 fi
11652
11653 #################################################
11654 # check for location of Kerberos 5 install
11655 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11656 echo "configure:11657: checking for kerberos 5 install path" >&5
11657 # Check whether --with-krb5 or --without-krb5 was given.
11658 if test "${with_krb5+set}" = set; then
11659   withval="$with_krb5"
11660    case "$withval" in
11661   no)
11662     echo "$ac_t""no" 1>&6
11663     ;;
11664   *)
11665     echo "$ac_t""yes" 1>&6
11666     LIBS="$LIBS -lkrb5"
11667     CFLAGS="$CFLAGS -I$withval/include"
11668     CPPFLAGS="$CPPFLAGS -I$withval/include"
11669     LDFLAGS="$LDFLAGS -L$withval/lib"
11670     ;;
11671   esac 
11672 else
11673   echo "$ac_t""no" 1>&6
11674
11675 fi
11676
11677
11678 # now check for krb5.h. Some systems have the libraries without the headers!
11679 # note that this check is done here to allow for different kerberos
11680 # include paths
11681 for ac_hdr in krb5.h
11682 do
11683 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11684 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11685 echo "configure:11686: checking for $ac_hdr" >&5
11686 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11687   echo $ac_n "(cached) $ac_c" 1>&6
11688 else
11689   cat > conftest.$ac_ext <<EOF
11690 #line 11691 "configure"
11691 #include "confdefs.h"
11692 #include <$ac_hdr>
11693 EOF
11694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11695 { (eval echo configure:11696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11697 if test -z "$ac_err"; then
11698   rm -rf conftest*
11699   eval "ac_cv_header_$ac_safe=yes"
11700 else
11701   echo "$ac_err" >&5
11702   echo "configure: failed program was:" >&5
11703   cat conftest.$ac_ext >&5
11704   rm -rf conftest*
11705   eval "ac_cv_header_$ac_safe=no"
11706 fi
11707 rm -f conftest*
11708 fi
11709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11710   echo "$ac_t""yes" 1>&6
11711     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11712   cat >> confdefs.h <<EOF
11713 #define $ac_tr_hdr 1
11714 EOF
11715  
11716 else
11717   echo "$ac_t""no" 1>&6
11718 fi
11719 done
11720
11721
11722 # now check for gssapi headers.  This is also done here to allow for
11723 # different kerberos include paths
11724 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
11725 do
11726 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11727 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11728 echo "configure:11729: checking for $ac_hdr" >&5
11729 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11730   echo $ac_n "(cached) $ac_c" 1>&6
11731 else
11732   cat > conftest.$ac_ext <<EOF
11733 #line 11734 "configure"
11734 #include "confdefs.h"
11735 #include <$ac_hdr>
11736 EOF
11737 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11738 { (eval echo configure:11739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11739 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11740 if test -z "$ac_err"; then
11741   rm -rf conftest*
11742   eval "ac_cv_header_$ac_safe=yes"
11743 else
11744   echo "$ac_err" >&5
11745   echo "configure: failed program was:" >&5
11746   cat conftest.$ac_ext >&5
11747   rm -rf conftest*
11748   eval "ac_cv_header_$ac_safe=no"
11749 fi
11750 rm -f conftest*
11751 fi
11752 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11753   echo "$ac_t""yes" 1>&6
11754     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11755   cat >> confdefs.h <<EOF
11756 #define $ac_tr_hdr 1
11757 EOF
11758  
11759 else
11760   echo "$ac_t""no" 1>&6
11761 fi
11762 done
11763
11764
11765 ##################################################################
11766 # we might need the k5crypto and com_err libraries on some systems
11767 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11768 echo "configure:11769: checking for _et_list in -lcom_err" >&5
11769 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11770 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11771   echo $ac_n "(cached) $ac_c" 1>&6
11772 else
11773   ac_save_LIBS="$LIBS"
11774 LIBS="-lcom_err  $LIBS"
11775 cat > conftest.$ac_ext <<EOF
11776 #line 11777 "configure"
11777 #include "confdefs.h"
11778 /* Override any gcc2 internal prototype to avoid an error.  */
11779 /* We use char because int might match the return type of a gcc2
11780     builtin and then its argument prototype would still apply.  */
11781 char _et_list();
11782
11783 int main() {
11784 _et_list()
11785 ; return 0; }
11786 EOF
11787 if { (eval echo configure:11788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11788   rm -rf conftest*
11789   eval "ac_cv_lib_$ac_lib_var=yes"
11790 else
11791   echo "configure: failed program was:" >&5
11792   cat conftest.$ac_ext >&5
11793   rm -rf conftest*
11794   eval "ac_cv_lib_$ac_lib_var=no"
11795 fi
11796 rm -f conftest*
11797 LIBS="$ac_save_LIBS"
11798
11799 fi
11800 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11801   echo "$ac_t""yes" 1>&6
11802   LIBS="$LIBS -lcom_err"
11803 else
11804   echo "$ac_t""no" 1>&6
11805 fi
11806
11807 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11808 echo "configure:11809: checking for krb5_encrypt_data in -lk5crypto" >&5
11809 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11810 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11811   echo $ac_n "(cached) $ac_c" 1>&6
11812 else
11813   ac_save_LIBS="$LIBS"
11814 LIBS="-lk5crypto  $LIBS"
11815 cat > conftest.$ac_ext <<EOF
11816 #line 11817 "configure"
11817 #include "confdefs.h"
11818 /* Override any gcc2 internal prototype to avoid an error.  */
11819 /* We use char because int might match the return type of a gcc2
11820     builtin and then its argument prototype would still apply.  */
11821 char krb5_encrypt_data();
11822
11823 int main() {
11824 krb5_encrypt_data()
11825 ; return 0; }
11826 EOF
11827 if { (eval echo configure:11828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11828   rm -rf conftest*
11829   eval "ac_cv_lib_$ac_lib_var=yes"
11830 else
11831   echo "configure: failed program was:" >&5
11832   cat conftest.$ac_ext >&5
11833   rm -rf conftest*
11834   eval "ac_cv_lib_$ac_lib_var=no"
11835 fi
11836 rm -f conftest*
11837 LIBS="$ac_save_LIBS"
11838
11839 fi
11840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11841   echo "$ac_t""yes" 1>&6
11842   LIBS="$LIBS -lk5crypto"
11843 else
11844   echo "$ac_t""no" 1>&6
11845 fi
11846
11847
11848 ########################################################
11849 # now see if we can find the krb5 libs in standard paths
11850 # or as specified above
11851 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11852 echo "configure:11853: checking for krb5_mk_req_extended in -lkrb5" >&5
11853 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11854 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11855   echo $ac_n "(cached) $ac_c" 1>&6
11856 else
11857   ac_save_LIBS="$LIBS"
11858 LIBS="-lkrb5  $LIBS"
11859 cat > conftest.$ac_ext <<EOF
11860 #line 11861 "configure"
11861 #include "confdefs.h"
11862 /* Override any gcc2 internal prototype to avoid an error.  */
11863 /* We use char because int might match the return type of a gcc2
11864     builtin and then its argument prototype would still apply.  */
11865 char krb5_mk_req_extended();
11866
11867 int main() {
11868 krb5_mk_req_extended()
11869 ; return 0; }
11870 EOF
11871 if { (eval echo configure:11872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11872   rm -rf conftest*
11873   eval "ac_cv_lib_$ac_lib_var=yes"
11874 else
11875   echo "configure: failed program was:" >&5
11876   cat conftest.$ac_ext >&5
11877   rm -rf conftest*
11878   eval "ac_cv_lib_$ac_lib_var=no"
11879 fi
11880 rm -f conftest*
11881 LIBS="$ac_save_LIBS"
11882
11883 fi
11884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11885   echo "$ac_t""yes" 1>&6
11886   LIBS="$LIBS -lkrb5";
11887         cat >> confdefs.h <<\EOF
11888 #define HAVE_KRB5 1
11889 EOF
11890
11891 else
11892   echo "$ac_t""no" 1>&6
11893 fi
11894
11895
11896 ########################################################
11897 # now see if we can find the gssapi libs in standard paths
11898 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
11899 echo "configure:11900: checking for gss_display_status in -lgssapi_krb5" >&5
11900 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
11901 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11902   echo $ac_n "(cached) $ac_c" 1>&6
11903 else
11904   ac_save_LIBS="$LIBS"
11905 LIBS="-lgssapi_krb5  $LIBS"
11906 cat > conftest.$ac_ext <<EOF
11907 #line 11908 "configure"
11908 #include "confdefs.h"
11909 /* Override any gcc2 internal prototype to avoid an error.  */
11910 /* We use char because int might match the return type of a gcc2
11911     builtin and then its argument prototype would still apply.  */
11912 char gss_display_status();
11913
11914 int main() {
11915 gss_display_status()
11916 ; return 0; }
11917 EOF
11918 if { (eval echo configure:11919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11919   rm -rf conftest*
11920   eval "ac_cv_lib_$ac_lib_var=yes"
11921 else
11922   echo "configure: failed program was:" >&5
11923   cat conftest.$ac_ext >&5
11924   rm -rf conftest*
11925   eval "ac_cv_lib_$ac_lib_var=no"
11926 fi
11927 rm -f conftest*
11928 LIBS="$ac_save_LIBS"
11929
11930 fi
11931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11932   echo "$ac_t""yes" 1>&6
11933   LIBS="$LIBS -lgssapi_krb5";
11934         cat >> confdefs.h <<\EOF
11935 #define HAVE_GSSAPI 1
11936 EOF
11937
11938 else
11939   echo "$ac_t""no" 1>&6
11940 fi
11941
11942
11943 ##################################################################
11944 # we might need the lber lib on some systems. To avoid link errors
11945 # this test must be before the libldap test
11946 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
11947 echo "configure:11948: checking for ber_scanf in -llber" >&5
11948 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
11949 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11950   echo $ac_n "(cached) $ac_c" 1>&6
11951 else
11952   ac_save_LIBS="$LIBS"
11953 LIBS="-llber  $LIBS"
11954 cat > conftest.$ac_ext <<EOF
11955 #line 11956 "configure"
11956 #include "confdefs.h"
11957 /* Override any gcc2 internal prototype to avoid an error.  */
11958 /* We use char because int might match the return type of a gcc2
11959     builtin and then its argument prototype would still apply.  */
11960 char ber_scanf();
11961
11962 int main() {
11963 ber_scanf()
11964 ; return 0; }
11965 EOF
11966 if { (eval echo configure:11967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11967   rm -rf conftest*
11968   eval "ac_cv_lib_$ac_lib_var=yes"
11969 else
11970   echo "configure: failed program was:" >&5
11971   cat conftest.$ac_ext >&5
11972   rm -rf conftest*
11973   eval "ac_cv_lib_$ac_lib_var=no"
11974 fi
11975 rm -f conftest*
11976 LIBS="$ac_save_LIBS"
11977
11978 fi
11979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11980   echo "$ac_t""yes" 1>&6
11981   LIBS="$LIBS -llber"
11982 else
11983   echo "$ac_t""no" 1>&6
11984 fi
11985
11986
11987 ########################################################
11988 # now see if we can find the ldap libs in standard paths
11989 if test x$have_ldap != xyes; then
11990 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
11991 echo "configure:11992: checking for ldap_domain2hostlist in -lldap" >&5
11992 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
11993 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11994   echo $ac_n "(cached) $ac_c" 1>&6
11995 else
11996   ac_save_LIBS="$LIBS"
11997 LIBS="-lldap  $LIBS"
11998 cat > conftest.$ac_ext <<EOF
11999 #line 12000 "configure"
12000 #include "confdefs.h"
12001 /* Override any gcc2 internal prototype to avoid an error.  */
12002 /* We use char because int might match the return type of a gcc2
12003     builtin and then its argument prototype would still apply.  */
12004 char ldap_domain2hostlist();
12005
12006 int main() {
12007 ldap_domain2hostlist()
12008 ; return 0; }
12009 EOF
12010 if { (eval echo configure:12011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12011   rm -rf conftest*
12012   eval "ac_cv_lib_$ac_lib_var=yes"
12013 else
12014   echo "configure: failed program was:" >&5
12015   cat conftest.$ac_ext >&5
12016   rm -rf conftest*
12017   eval "ac_cv_lib_$ac_lib_var=no"
12018 fi
12019 rm -f conftest*
12020 LIBS="$ac_save_LIBS"
12021
12022 fi
12023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12024   echo "$ac_t""yes" 1>&6
12025   LIBS="$LIBS -lldap";
12026         cat >> confdefs.h <<\EOF
12027 #define HAVE_LDAP 1
12028 EOF
12029
12030 else
12031   echo "$ac_t""no" 1>&6
12032 fi
12033
12034 fi
12035
12036 #################################################
12037 # check for automount support
12038 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12039 echo "configure:12040: checking whether to use AUTOMOUNT" >&5
12040 # Check whether --with-automount or --without-automount was given.
12041 if test "${with_automount+set}" = set; then
12042   withval="$with_automount"
12043    case "$withval" in
12044   yes)
12045     echo "$ac_t""yes" 1>&6
12046     cat >> confdefs.h <<\EOF
12047 #define WITH_AUTOMOUNT 1
12048 EOF
12049
12050     ;;
12051   *)
12052     echo "$ac_t""no" 1>&6
12053     ;;
12054   esac 
12055 else
12056   echo "$ac_t""no" 1>&6
12057
12058 fi
12059
12060
12061 #################################################
12062 # check for smbmount support
12063 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12064 echo "configure:12065: checking whether to use SMBMOUNT" >&5
12065 # Check whether --with-smbmount or --without-smbmount was given.
12066 if test "${with_smbmount+set}" = set; then
12067   withval="$with_smbmount"
12068    case "$withval" in
12069   yes)
12070         case "$host_os" in
12071         *linux*)
12072                 echo "$ac_t""yes" 1>&6
12073                 cat >> confdefs.h <<\EOF
12074 #define WITH_SMBMOUNT 1
12075 EOF
12076
12077                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12078                 ;;
12079         *)
12080                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12081                 ;;
12082         esac
12083     ;;
12084   *)
12085     echo "$ac_t""no" 1>&6
12086     MPROGS=
12087     ;;
12088   esac 
12089 else
12090   echo "$ac_t""no" 1>&6
12091   MPROGS=
12092
12093 fi
12094
12095
12096
12097 #################################################
12098 # check for a PAM clear-text auth, accounts, password and session support
12099 with_pam_for_crypt=no
12100 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12101 echo "configure:12102: checking whether to use PAM" >&5
12102 # Check whether --with-pam or --without-pam was given.
12103 if test "${with_pam+set}" = set; then
12104   withval="$with_pam"
12105    case "$withval" in
12106   yes)
12107     echo "$ac_t""yes" 1>&6
12108     cat >> confdefs.h <<\EOF
12109 #define WITH_PAM 1
12110 EOF
12111
12112     LIBS="$LIBS -lpam"
12113     with_pam_for_crypt=yes
12114     ;;
12115   *)
12116     echo "$ac_t""no" 1>&6
12117     ;;
12118   esac 
12119 else
12120   echo "$ac_t""no" 1>&6
12121
12122 fi
12123
12124
12125 # we can't build a pam module if we don't have pam.
12126 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12127 echo "configure:12128: checking for pam_get_data in -lpam" >&5
12128 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12129 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12130   echo $ac_n "(cached) $ac_c" 1>&6
12131 else
12132   ac_save_LIBS="$LIBS"
12133 LIBS="-lpam  $LIBS"
12134 cat > conftest.$ac_ext <<EOF
12135 #line 12136 "configure"
12136 #include "confdefs.h"
12137 /* Override any gcc2 internal prototype to avoid an error.  */
12138 /* We use char because int might match the return type of a gcc2
12139     builtin and then its argument prototype would still apply.  */
12140 char pam_get_data();
12141
12142 int main() {
12143 pam_get_data()
12144 ; return 0; }
12145 EOF
12146 if { (eval echo configure:12147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12147   rm -rf conftest*
12148   eval "ac_cv_lib_$ac_lib_var=yes"
12149 else
12150   echo "configure: failed program was:" >&5
12151   cat conftest.$ac_ext >&5
12152   rm -rf conftest*
12153   eval "ac_cv_lib_$ac_lib_var=no"
12154 fi
12155 rm -f conftest*
12156 LIBS="$ac_save_LIBS"
12157
12158 fi
12159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12160   echo "$ac_t""yes" 1>&6
12161   cat >> confdefs.h <<\EOF
12162 #define HAVE_LIBPAM 1
12163 EOF
12164
12165 else
12166   echo "$ac_t""no" 1>&6
12167 fi
12168
12169
12170 #################################################
12171 # check for pam_smbpass support
12172 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12173 echo "configure:12174: checking whether to use pam_smbpass" >&5
12174 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12175 if test "${with_pam_smbpass+set}" = set; then
12176   withval="$with_pam_smbpass"
12177    case "$withval" in
12178   yes)
12179     echo "$ac_t""yes" 1>&6
12180
12181 # Conditions under which pam_smbpass should not be built.
12182
12183        if test x$PICFLAG = x; then
12184           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12185           PAM_MOD=""
12186        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12187           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12188           PAM_MOD=""
12189        else
12190           PAM_MOD="bin/pam_smbpass.so"
12191        fi
12192     ;;
12193   *)
12194     echo "$ac_t""no" 1>&6
12195     ;;
12196   esac 
12197 else
12198   echo "$ac_t""no" 1>&6
12199
12200 fi
12201
12202
12203
12204 ###############################################
12205 # test for where we get crypt() from, but only
12206 # if not using PAM
12207 if test $with_pam_for_crypt = no; then
12208 for ac_func in crypt
12209 do
12210 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12211 echo "configure:12212: checking for $ac_func" >&5
12212 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12213   echo $ac_n "(cached) $ac_c" 1>&6
12214 else
12215   cat > conftest.$ac_ext <<EOF
12216 #line 12217 "configure"
12217 #include "confdefs.h"
12218 /* System header to define __stub macros and hopefully few prototypes,
12219     which can conflict with char $ac_func(); below.  */
12220 #include <assert.h>
12221 /* Override any gcc2 internal prototype to avoid an error.  */
12222 /* We use char because int might match the return type of a gcc2
12223     builtin and then its argument prototype would still apply.  */
12224 char $ac_func();
12225
12226 int main() {
12227
12228 /* The GNU C library defines this for functions which it implements
12229     to always fail with ENOSYS.  Some functions are actually named
12230     something starting with __ and the normal name is an alias.  */
12231 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12232 choke me
12233 #else
12234 $ac_func();
12235 #endif
12236
12237 ; return 0; }
12238 EOF
12239 if { (eval echo configure:12240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12240   rm -rf conftest*
12241   eval "ac_cv_func_$ac_func=yes"
12242 else
12243   echo "configure: failed program was:" >&5
12244   cat conftest.$ac_ext >&5
12245   rm -rf conftest*
12246   eval "ac_cv_func_$ac_func=no"
12247 fi
12248 rm -f conftest*
12249 fi
12250
12251 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12252   echo "$ac_t""yes" 1>&6
12253     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12254   cat >> confdefs.h <<EOF
12255 #define $ac_tr_func 1
12256 EOF
12257  
12258 else
12259   echo "$ac_t""no" 1>&6
12260 fi
12261 done
12262
12263 if test x"$ac_cv_func_crypt" = x"no"; then
12264     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12265 echo "configure:12266: checking for crypt in -lcrypt" >&5
12266 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12267 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12268   echo $ac_n "(cached) $ac_c" 1>&6
12269 else
12270   ac_save_LIBS="$LIBS"
12271 LIBS="-lcrypt  $LIBS"
12272 cat > conftest.$ac_ext <<EOF
12273 #line 12274 "configure"
12274 #include "confdefs.h"
12275 /* Override any gcc2 internal prototype to avoid an error.  */
12276 /* We use char because int might match the return type of a gcc2
12277     builtin and then its argument prototype would still apply.  */
12278 char crypt();
12279
12280 int main() {
12281 crypt()
12282 ; return 0; }
12283 EOF
12284 if { (eval echo configure:12285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12285   rm -rf conftest*
12286   eval "ac_cv_lib_$ac_lib_var=yes"
12287 else
12288   echo "configure: failed program was:" >&5
12289   cat conftest.$ac_ext >&5
12290   rm -rf conftest*
12291   eval "ac_cv_lib_$ac_lib_var=no"
12292 fi
12293 rm -f conftest*
12294 LIBS="$ac_save_LIBS"
12295
12296 fi
12297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12298   echo "$ac_t""yes" 1>&6
12299   LIBS="$LIBS -lcrypt";
12300         cat >> confdefs.h <<\EOF
12301 #define HAVE_CRYPT 1
12302 EOF
12303
12304 else
12305   echo "$ac_t""no" 1>&6
12306 fi
12307
12308 fi
12309 fi
12310
12311 ##
12312 ## moved after the check for -lcrypt in order to
12313 ## ensure that the necessary libraries are included
12314 ## check checking for truncated salt.  Wrapped by the
12315 ## $with_pam_for_crypt variable as above   --jerry
12316 ##
12317 if test $with_pam_for_crypt = no; then
12318 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12319 echo "configure:12320: checking for a crypt that needs truncated salt" >&5
12320 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12321   echo $ac_n "(cached) $ac_c" 1>&6
12322 else
12323   
12324 if test "$cross_compiling" = yes; then
12325   samba_cv_HAVE_TRUNCATED_SALT=cross
12326 else
12327   cat > conftest.$ac_ext <<EOF
12328 #line 12329 "configure"
12329 #include "confdefs.h"
12330 #include "${srcdir-.}/tests/crypttest.c"
12331 EOF
12332 if { (eval echo configure:12333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12333 then
12334   samba_cv_HAVE_TRUNCATED_SALT=no
12335 else
12336   echo "configure: failed program was:" >&5
12337   cat conftest.$ac_ext >&5
12338   rm -fr conftest*
12339   samba_cv_HAVE_TRUNCATED_SALT=yes
12340 fi
12341 rm -fr conftest*
12342 fi
12343
12344 fi
12345
12346 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12347 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12348         cat >> confdefs.h <<\EOF
12349 #define HAVE_TRUNCATED_SALT 1
12350 EOF
12351
12352 fi
12353 fi
12354
12355
12356
12357 ########################################################################################
12358 ##
12359 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12360 ##
12361 ########################################################################################
12362
12363 #################################################
12364 # check for a TDB password database
12365 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12366 echo "configure:12367: checking whether to use TDB SAM database" >&5
12367 # Check whether --with-tdbsam or --without-tdbsam was given.
12368 if test "${with_tdbsam+set}" = set; then
12369   withval="$with_tdbsam"
12370    case "$withval" in
12371   yes)
12372     echo "$ac_t""yes" 1>&6
12373     cat >> confdefs.h <<\EOF
12374 #define WITH_TDB_SAM 1
12375 EOF
12376
12377     ;;
12378   *)
12379     echo "$ac_t""no" 1>&6
12380     ;;
12381   esac 
12382 else
12383   echo "$ac_t""no" 1>&6
12384
12385 fi
12386
12387
12388 #################################################
12389 # check for a LDAP password database
12390 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
12391 echo "configure:12392: checking whether to use LDAP SAM database" >&5
12392 # Check whether --with-ldapsam or --without-ldapsam was given.
12393 if test "${with_ldapsam+set}" = set; then
12394   withval="$with_ldapsam"
12395    case "$withval" in
12396   yes)
12397     echo "$ac_t""yes" 1>&6
12398     cat >> confdefs.h <<\EOF
12399 #define WITH_LDAP_SAM 1
12400 EOF
12401
12402     LIBS="-lldap -llber $LIBS"
12403     ;;
12404   *)
12405     echo "$ac_t""no" 1>&6
12406     ;;
12407   esac 
12408 else
12409   echo "$ac_t""no" 1>&6
12410
12411 fi
12412
12413
12414 #################################################
12415 # check for a NISPLUS password database
12416 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12417 echo "configure:12418: checking whether to use NISPLUS SAM database" >&5
12418 # Check whether --with-nisplussam or --without-nisplussam was given.
12419 if test "${with_nisplussam+set}" = set; then
12420   withval="$with_nisplussam"
12421    case "$withval" in
12422   yes)
12423     echo "$ac_t""yes" 1>&6
12424     cat >> confdefs.h <<\EOF
12425 #define WITH_NISPLUS_SAM 1
12426 EOF
12427
12428     ;;
12429   *)
12430     echo "$ac_t""no" 1>&6
12431     ;;
12432   esac 
12433 else
12434   echo "$ac_t""no" 1>&6
12435
12436 fi
12437
12438
12439 ########################################################################################
12440 ##
12441 ## END OF TESTS FOR SAM BACKENDS.  
12442 ##
12443 ########################################################################################
12444
12445 #################################################
12446 # check for a NISPLUS_HOME support 
12447 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12448 echo "configure:12449: checking whether to use NISPLUS_HOME" >&5
12449 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12450 if test "${with_nisplus_home+set}" = set; then
12451   withval="$with_nisplus_home"
12452    case "$withval" in
12453   yes)
12454     echo "$ac_t""yes" 1>&6
12455     cat >> confdefs.h <<\EOF
12456 #define WITH_NISPLUS_HOME 1
12457 EOF
12458
12459     ;;
12460   *)
12461     echo "$ac_t""no" 1>&6
12462     ;;
12463   esac 
12464 else
12465   echo "$ac_t""no" 1>&6
12466
12467 fi
12468
12469
12470 #################################################
12471 # check for the secure socket layer
12472 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12473 echo "configure:12474: checking whether to use SSL" >&5
12474 # Check whether --with-ssl or --without-ssl was given.
12475 if test "${with_ssl+set}" = set; then
12476   withval="$with_ssl"
12477    case "$withval" in
12478   yes)
12479     echo "$ac_t""yes" 1>&6
12480     cat >> confdefs.h <<\EOF
12481 #define WITH_SSL 1
12482 EOF
12483
12484     withval="/usr/local/ssl"     # default
12485
12486     if test "${with_sslinc+set}" = set; then
12487
12488         withval="$with_sslinc"
12489         case "$withval" in
12490         yes|no)
12491           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12492           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12493         ;;
12494         * )
12495           CFLAGS="-I${withval} $CFLAGS"
12496         ;;
12497         esac
12498
12499     else
12500
12501         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12502
12503     fi
12504
12505     if test "${with_ssllib+set}" = set; then
12506
12507         withval="$with_ssllib"
12508         case "$withval" in
12509         yes|no)
12510           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12511           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12512         ;;
12513         * )
12514           LDFLAGS="-L${withval}/lib $LDFLAGS"
12515         ;;
12516         esac
12517
12518     else
12519
12520         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12521
12522     fi
12523
12524     LIBS="-lssl -lcrypto $LIBS"
12525
12526 #    if test ! -d ${withval}; then
12527 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12528 #      exit 1
12529 #    fi 
12530
12531     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12532
12533     ;;
12534   *)
12535     echo "$ac_t""no" 1>&6
12536     ;;
12537   esac 
12538 else
12539   echo "$ac_t""no" 1>&6
12540
12541 fi
12542
12543
12544 #################################################
12545 # check for syslog logging
12546 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12547 echo "configure:12548: checking whether to use syslog logging" >&5
12548 # Check whether --with-syslog or --without-syslog was given.
12549 if test "${with_syslog+set}" = set; then
12550   withval="$with_syslog"
12551    case "$withval" in
12552   yes)
12553     echo "$ac_t""yes" 1>&6
12554     cat >> confdefs.h <<\EOF
12555 #define WITH_SYSLOG 1
12556 EOF
12557
12558     ;;
12559   *)
12560     echo "$ac_t""no" 1>&6
12561     ;;
12562   esac 
12563 else
12564   echo "$ac_t""no" 1>&6
12565
12566 fi
12567
12568
12569 #################################################
12570 # check for a shared memory profiling support
12571 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12572 echo "configure:12573: checking whether to use profiling" >&5
12573 # Check whether --with-profiling-data or --without-profiling-data was given.
12574 if test "${with_profiling_data+set}" = set; then
12575   withval="$with_profiling_data"
12576    case "$withval" in
12577   yes)
12578     echo "$ac_t""yes" 1>&6
12579     cat >> confdefs.h <<\EOF
12580 #define WITH_PROFILE 1
12581 EOF
12582
12583     ;;
12584   *)
12585     echo "$ac_t""no" 1>&6
12586     ;;
12587   esac 
12588 else
12589   echo "$ac_t""no" 1>&6
12590
12591 fi
12592
12593
12594
12595 #################################################
12596 # check for experimental disk-quotas support
12597 QUOTAOBJS=smbd/noquotas.o
12598
12599 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12600 echo "configure:12601: checking whether to support disk-quotas" >&5
12601 # Check whether --with-quotas or --without-quotas was given.
12602 if test "${with_quotas+set}" = set; then
12603   withval="$with_quotas"
12604    case "$withval" in
12605   yes)
12606     echo "$ac_t""yes" 1>&6
12607     case "$host_os" in
12608       *linux*)
12609         # Check for kernel 2.4.x quota braindamage...
12610         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12611 echo "configure:12612: checking for linux 2.4.x quota braindamage.." >&5
12612 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12613   echo $ac_n "(cached) $ac_c" 1>&6
12614 else
12615   
12616         cat > conftest.$ac_ext <<EOF
12617 #line 12618 "configure"
12618 #include "confdefs.h"
12619 #include <stdio.h>
12620 #include <sys/types.h>
12621 #include <asm/types.h>
12622 #include <linux/quota.h>
12623 #include <mntent.h>
12624 #include <linux/unistd.h>
12625 int main() {
12626 struct mem_dqblk D;
12627 ; return 0; }
12628 EOF
12629 if { (eval echo configure:12630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12630   rm -rf conftest*
12631   samba_cv_linux_2_4_quota_braindamage=yes
12632 else
12633   echo "configure: failed program was:" >&5
12634   cat conftest.$ac_ext >&5
12635   rm -rf conftest*
12636   samba_cv_linux_2_4_quota_braindamage=no
12637 fi
12638 rm -f conftest*
12639 fi
12640
12641 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12642 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12643         cat >> confdefs.h <<\EOF
12644 #define LINUX_QUOTAS_2 1
12645 EOF
12646
12647 else
12648         cat >> confdefs.h <<\EOF
12649 #define LINUX_QUOTAS_1 1
12650 EOF
12651
12652 fi
12653         ;;
12654       *)
12655         ;;
12656     esac
12657     QUOTAOBJS=smbd/quotas.o
12658     cat >> confdefs.h <<\EOF
12659 #define WITH_QUOTAS 1
12660 EOF
12661
12662     ;;
12663   *)
12664     echo "$ac_t""no" 1>&6
12665     ;;
12666   esac 
12667 else
12668   echo "$ac_t""no" 1>&6
12669
12670 fi
12671
12672
12673
12674 #################################################
12675 # check for experimental utmp accounting
12676
12677 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12678 echo "configure:12679: checking whether to support utmp accounting" >&5
12679 # Check whether --with-utmp or --without-utmp was given.
12680 if test "${with_utmp+set}" = set; then
12681   withval="$with_utmp"
12682    case "$withval" in
12683   yes)
12684     echo "$ac_t""yes" 1>&6
12685     cat >> confdefs.h <<\EOF
12686 #define WITH_UTMP 1
12687 EOF
12688
12689     ;;
12690   *)
12691     echo "$ac_t""no" 1>&6
12692     ;;
12693   esac 
12694 else
12695   echo "$ac_t""no" 1>&6
12696
12697 fi
12698
12699
12700 #################################################
12701 # set private directory location
12702 # Check whether --with-privatedir or --without-privatedir was given.
12703 if test "${with_privatedir+set}" = set; then
12704   withval="$with_privatedir"
12705    case "$withval" in
12706   yes|no)
12707   #
12708   # Just in case anybody calls it without argument
12709   #
12710     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12711     privatedir='${prefix}/private'
12712   ;;
12713   * )
12714     privatedir="$withval"
12715     ;;
12716   esac
12717   
12718 else
12719   privatedir='${prefix}/private'
12720    
12721
12722 fi
12723
12724
12725 #################################################
12726 # set lock directory location
12727 # Check whether --with-lockdir or --without-lockdir was given.
12728 if test "${with_lockdir+set}" = set; then
12729   withval="$with_lockdir"
12730    case "$withval" in
12731   yes|no)
12732   #
12733   # Just in case anybody calls it without argument
12734   #
12735     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12736     lockdir='$(VARDIR)/locks'
12737   ;;
12738   * )
12739     lockdir="$withval"
12740     ;;
12741   esac
12742   
12743 else
12744   lockdir='$(VARDIR)/locks'
12745    
12746
12747 fi
12748
12749
12750 #################################################
12751 # set SWAT directory location
12752 # Check whether --with-swatdir or --without-swatdir was given.
12753 if test "${with_swatdir+set}" = set; then
12754   withval="$with_swatdir"
12755    case "$withval" in
12756   yes|no)
12757   #
12758   # Just in case anybody does it
12759   #
12760     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12761     swatdir='${prefix}/swat'
12762   ;;
12763   * )
12764     swatdir="$withval"
12765     ;;
12766   esac
12767   
12768 else
12769   swatdir='${prefix}/swat'
12770    
12771
12772 fi
12773
12774
12775 #################################################
12776 # choose native language(s) of man pages
12777 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12778 echo "configure:12779: checking chosen man pages' language(s)" >&5
12779 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12780 if test "${with_manpages_langs+set}" = set; then
12781   withval="$with_manpages_langs"
12782    case "$withval" in
12783   yes|no)
12784     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12785     manlangs="en"
12786   ;;
12787   *)
12788     manlangs="$withval"
12789   ;;
12790   esac
12791
12792   echo "$ac_t""$manlangs" 1>&6
12793   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12794   
12795 else
12796   manlangs="en"
12797   echo "$ac_t""$manlangs" 1>&6
12798   
12799
12800 fi
12801
12802
12803 #################################################
12804 # these tests are taken from the GNU fileutils package
12805 echo "checking how to get filesystem space usage" 1>&6
12806 echo "configure:12807: checking how to get filesystem space usage" >&5
12807 space=no
12808
12809 # Test for statvfs64.
12810 if test $space = no; then
12811   # SVR4
12812   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12813 echo "configure:12814: checking statvfs64 function (SVR4)" >&5
12814 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12815   echo $ac_n "(cached) $ac_c" 1>&6
12816 else
12817   if test "$cross_compiling" = yes; then
12818   fu_cv_sys_stat_statvfs64=cross
12819 else
12820   cat > conftest.$ac_ext <<EOF
12821 #line 12822 "configure"
12822 #include "confdefs.h"
12823
12824 #if defined(HAVE_UNISTD_H)
12825 #include <unistd.h>
12826 #endif
12827 #include <sys/types.h>
12828 #include <sys/statvfs.h>
12829   main ()
12830   {
12831     struct statvfs64 fsd;
12832     exit (statvfs64 (".", &fsd));
12833   }
12834 EOF
12835 if { (eval echo configure:12836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12836 then
12837   fu_cv_sys_stat_statvfs64=yes
12838 else
12839   echo "configure: failed program was:" >&5
12840   cat conftest.$ac_ext >&5
12841   rm -fr conftest*
12842   fu_cv_sys_stat_statvfs64=no
12843 fi
12844 rm -fr conftest*
12845 fi
12846
12847 fi
12848
12849 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12850   if test $fu_cv_sys_stat_statvfs64 = yes; then
12851     space=yes
12852     cat >> confdefs.h <<\EOF
12853 #define STAT_STATVFS64 1
12854 EOF
12855
12856   fi
12857 fi
12858
12859 # Perform only the link test since it seems there are no variants of the
12860 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12861 # because that got a false positive on SCO OSR5.  Adding the declaration
12862 # of a `struct statvfs' causes this test to fail (as it should) on such
12863 # systems.  That system is reported to work fine with STAT_STATFS4 which
12864 # is what it gets when this test fails.
12865 if test $space = no; then
12866   # SVR4
12867   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12868 echo "configure:12869: checking statvfs function (SVR4)" >&5
12869 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12870   echo $ac_n "(cached) $ac_c" 1>&6
12871 else
12872   cat > conftest.$ac_ext <<EOF
12873 #line 12874 "configure"
12874 #include "confdefs.h"
12875 #include <sys/types.h>
12876 #include <sys/statvfs.h>
12877 int main() {
12878 struct statvfs fsd; statvfs (0, &fsd);
12879 ; return 0; }
12880 EOF
12881 if { (eval echo configure:12882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12882   rm -rf conftest*
12883   fu_cv_sys_stat_statvfs=yes
12884 else
12885   echo "configure: failed program was:" >&5
12886   cat conftest.$ac_ext >&5
12887   rm -rf conftest*
12888   fu_cv_sys_stat_statvfs=no
12889 fi
12890 rm -f conftest*
12891 fi
12892
12893 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12894   if test $fu_cv_sys_stat_statvfs = yes; then
12895     space=yes
12896     cat >> confdefs.h <<\EOF
12897 #define STAT_STATVFS 1
12898 EOF
12899
12900   fi
12901 fi
12902
12903 if test $space = no; then
12904   # DEC Alpha running OSF/1
12905   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12906 echo "configure:12907: checking for 3-argument statfs function (DEC OSF/1)" >&5
12907   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12908   echo $ac_n "(cached) $ac_c" 1>&6
12909 else
12910   if test "$cross_compiling" = yes; then
12911   fu_cv_sys_stat_statfs3_osf1=no
12912 else
12913   cat > conftest.$ac_ext <<EOF
12914 #line 12915 "configure"
12915 #include "confdefs.h"
12916
12917 #include <sys/param.h>
12918 #include <sys/types.h>
12919 #include <sys/mount.h>
12920   main ()
12921   {
12922     struct statfs fsd;
12923     fsd.f_fsize = 0;
12924     exit (statfs (".", &fsd, sizeof (struct statfs)));
12925   }
12926 EOF
12927 if { (eval echo configure:12928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12928 then
12929   fu_cv_sys_stat_statfs3_osf1=yes
12930 else
12931   echo "configure: failed program was:" >&5
12932   cat conftest.$ac_ext >&5
12933   rm -fr conftest*
12934   fu_cv_sys_stat_statfs3_osf1=no
12935 fi
12936 rm -fr conftest*
12937 fi
12938
12939 fi
12940
12941   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12942   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12943     space=yes
12944     cat >> confdefs.h <<\EOF
12945 #define STAT_STATFS3_OSF1 1
12946 EOF
12947
12948   fi
12949 fi
12950
12951 if test $space = no; then
12952 # AIX
12953   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12954 echo "configure:12955: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12955   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12956   echo $ac_n "(cached) $ac_c" 1>&6
12957 else
12958   if test "$cross_compiling" = yes; then
12959   fu_cv_sys_stat_statfs2_bsize=no
12960 else
12961   cat > conftest.$ac_ext <<EOF
12962 #line 12963 "configure"
12963 #include "confdefs.h"
12964
12965 #ifdef HAVE_SYS_PARAM_H
12966 #include <sys/param.h>
12967 #endif
12968 #ifdef HAVE_SYS_MOUNT_H
12969 #include <sys/mount.h>
12970 #endif
12971 #ifdef HAVE_SYS_VFS_H
12972 #include <sys/vfs.h>
12973 #endif
12974   main ()
12975   {
12976   struct statfs fsd;
12977   fsd.f_bsize = 0;
12978   exit (statfs (".", &fsd));
12979   }
12980 EOF
12981 if { (eval echo configure:12982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12982 then
12983   fu_cv_sys_stat_statfs2_bsize=yes
12984 else
12985   echo "configure: failed program was:" >&5
12986   cat conftest.$ac_ext >&5
12987   rm -fr conftest*
12988   fu_cv_sys_stat_statfs2_bsize=no
12989 fi
12990 rm -fr conftest*
12991 fi
12992
12993 fi
12994
12995   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12996   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12997     space=yes
12998     cat >> confdefs.h <<\EOF
12999 #define STAT_STATFS2_BSIZE 1
13000 EOF
13001
13002   fi
13003 fi
13004
13005 if test $space = no; then
13006 # SVR3
13007   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13008 echo "configure:13009: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13009   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13010   echo $ac_n "(cached) $ac_c" 1>&6
13011 else
13012   if test "$cross_compiling" = yes; then
13013   fu_cv_sys_stat_statfs4=no
13014 else
13015   cat > conftest.$ac_ext <<EOF
13016 #line 13017 "configure"
13017 #include "confdefs.h"
13018 #include <sys/types.h>
13019 #include <sys/statfs.h>
13020   main ()
13021   {
13022   struct statfs fsd;
13023   exit (statfs (".", &fsd, sizeof fsd, 0));
13024   }
13025 EOF
13026 if { (eval echo configure:13027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13027 then
13028   fu_cv_sys_stat_statfs4=yes
13029 else
13030   echo "configure: failed program was:" >&5
13031   cat conftest.$ac_ext >&5
13032   rm -fr conftest*
13033   fu_cv_sys_stat_statfs4=no
13034 fi
13035 rm -fr conftest*
13036 fi
13037
13038 fi
13039
13040   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13041   if test $fu_cv_sys_stat_statfs4 = yes; then
13042     space=yes
13043     cat >> confdefs.h <<\EOF
13044 #define STAT_STATFS4 1
13045 EOF
13046
13047   fi
13048 fi
13049
13050 if test $space = no; then
13051 # 4.4BSD and NetBSD
13052   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13053 echo "configure:13054: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13054   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13055   echo $ac_n "(cached) $ac_c" 1>&6
13056 else
13057   if test "$cross_compiling" = yes; then
13058   fu_cv_sys_stat_statfs2_fsize=no
13059 else
13060   cat > conftest.$ac_ext <<EOF
13061 #line 13062 "configure"
13062 #include "confdefs.h"
13063 #include <sys/types.h>
13064 #ifdef HAVE_SYS_PARAM_H
13065 #include <sys/param.h>
13066 #endif
13067 #ifdef HAVE_SYS_MOUNT_H
13068 #include <sys/mount.h>
13069 #endif
13070   main ()
13071   {
13072   struct statfs fsd;
13073   fsd.f_fsize = 0;
13074   exit (statfs (".", &fsd));
13075   }
13076 EOF
13077 if { (eval echo configure:13078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13078 then
13079   fu_cv_sys_stat_statfs2_fsize=yes
13080 else
13081   echo "configure: failed program was:" >&5
13082   cat conftest.$ac_ext >&5
13083   rm -fr conftest*
13084   fu_cv_sys_stat_statfs2_fsize=no
13085 fi
13086 rm -fr conftest*
13087 fi
13088
13089 fi
13090
13091   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13092   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13093     space=yes
13094     cat >> confdefs.h <<\EOF
13095 #define STAT_STATFS2_FSIZE 1
13096 EOF
13097
13098   fi
13099 fi
13100
13101 if test $space = no; then
13102   # Ultrix
13103   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13104 echo "configure:13105: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13105   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13106   echo $ac_n "(cached) $ac_c" 1>&6
13107 else
13108   if test "$cross_compiling" = yes; then
13109   fu_cv_sys_stat_fs_data=no
13110 else
13111   cat > conftest.$ac_ext <<EOF
13112 #line 13113 "configure"
13113 #include "confdefs.h"
13114 #include <sys/types.h>
13115 #ifdef HAVE_SYS_PARAM_H
13116 #include <sys/param.h>
13117 #endif
13118 #ifdef HAVE_SYS_MOUNT_H
13119 #include <sys/mount.h>
13120 #endif
13121 #ifdef HAVE_SYS_FS_TYPES_H
13122 #include <sys/fs_types.h>
13123 #endif
13124   main ()
13125   {
13126   struct fs_data fsd;
13127   /* Ultrix's statfs returns 1 for success,
13128      0 for not mounted, -1 for failure.  */
13129   exit (statfs (".", &fsd) != 1);
13130   }
13131 EOF
13132 if { (eval echo configure:13133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13133 then
13134   fu_cv_sys_stat_fs_data=yes
13135 else
13136   echo "configure: failed program was:" >&5
13137   cat conftest.$ac_ext >&5
13138   rm -fr conftest*
13139   fu_cv_sys_stat_fs_data=no
13140 fi
13141 rm -fr conftest*
13142 fi
13143
13144 fi
13145
13146   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13147   if test $fu_cv_sys_stat_fs_data = yes; then
13148     space=yes
13149     cat >> confdefs.h <<\EOF
13150 #define STAT_STATFS2_FS_DATA 1
13151 EOF
13152
13153   fi
13154 fi
13155
13156 #
13157 # As a gating factor for large file support, in order to
13158 # use <4GB files we must have the following minimal support
13159 # available.
13160 # long long, and a 64 bit off_t or off64_t.
13161 # If we don't have all of these then disable large
13162 # file support.
13163 #
13164 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13165 echo "configure:13166: checking if large file support can be enabled" >&5
13166 cat > conftest.$ac_ext <<EOF
13167 #line 13168 "configure"
13168 #include "confdefs.h"
13169
13170 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13171 #include <sys/types.h>
13172 #else
13173 __COMPILE_ERROR_
13174 #endif
13175
13176 int main() {
13177 int i
13178 ; return 0; }
13179 EOF
13180 if { (eval echo configure:13181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13181   rm -rf conftest*
13182   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13183 else
13184   echo "configure: failed program was:" >&5
13185   cat conftest.$ac_ext >&5
13186   rm -rf conftest*
13187   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13188 fi
13189 rm -f conftest*
13190 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13191     cat >> confdefs.h <<\EOF
13192 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13193 EOF
13194
13195 fi
13196 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13197
13198 # Check whether --with-spinlocks or --without-spinlocks was given.
13199 if test "${with_spinlocks+set}" = set; then
13200   withval="$with_spinlocks"
13201   :
13202 fi
13203
13204 if test "x$with_spinlocks" = "xyes"; then
13205     cat >> confdefs.h <<\EOF
13206 #define USE_SPINLOCKS 1
13207 EOF
13208
13209
13210     case "$host_cpu" in
13211         sparc)
13212             cat >> confdefs.h <<\EOF
13213 #define SPARC_SPINLOCKS 1
13214 EOF
13215
13216             ;;
13217
13218         i386|i486|i586|i686)
13219             cat >> confdefs.h <<\EOF
13220 #define INTEL_SPINLOCKS 1
13221 EOF
13222
13223             ;;
13224
13225         mips)
13226             cat >> confdefs.h <<\EOF
13227 #define MIPS_SPINLOCKS 1
13228 EOF
13229
13230             ;;
13231
13232         powerpc)
13233             cat >> confdefs.h <<\EOF
13234 #define POWERPC_SPINLOCKS 1
13235 EOF
13236
13237             ;;
13238     esac
13239 fi
13240
13241 #################################################
13242 # check for ACL support
13243
13244 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13245 echo "configure:13246: checking whether to support ACLs" >&5
13246 # Check whether --with-acl-support or --without-acl-support was given.
13247 if test "${with_acl_support+set}" = set; then
13248   withval="$with_acl_support"
13249    case "$withval" in
13250   yes)
13251
13252         case "$host_os" in
13253         *sysv5*)
13254                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13255                 cat >> confdefs.h <<\EOF
13256 #define HAVE_UNIXWARE_ACLS 1
13257 EOF
13258
13259                 ;;
13260         *solaris*)
13261                 echo "$ac_t""Using solaris ACLs" 1>&6
13262                 cat >> confdefs.h <<\EOF
13263 #define HAVE_SOLARIS_ACLS 1
13264 EOF
13265
13266                 ;;
13267         *hpux*)
13268                 echo "$ac_t""Using HPUX ACLs" 1>&6
13269                 cat >> confdefs.h <<\EOF
13270 #define HAVE_HPUX_ACLS 1
13271 EOF
13272
13273                 ;;
13274         *irix*)
13275                 echo "$ac_t""Using IRIX ACLs" 1>&6
13276                 cat >> confdefs.h <<\EOF
13277 #define HAVE_IRIX_ACLS 1
13278 EOF
13279
13280                 ;;
13281         *aix*)
13282                 echo "$ac_t""Using AIX ACLs" 1>&6
13283                 cat >> confdefs.h <<\EOF
13284 #define HAVE_AIX_ACLS 1
13285 EOF
13286
13287                 ;;
13288         *osf*)
13289                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13290                 cat >> confdefs.h <<\EOF
13291 #define HAVE_TRU64_ACLS 1
13292 EOF
13293
13294                 LIBS="$LIBS -lpacl"
13295                 ;;
13296         *)
13297                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13298 echo "configure:13299: checking for acl_get_file in -lacl" >&5
13299 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13300 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13301   echo $ac_n "(cached) $ac_c" 1>&6
13302 else
13303   ac_save_LIBS="$LIBS"
13304 LIBS="-lacl  $LIBS"
13305 cat > conftest.$ac_ext <<EOF
13306 #line 13307 "configure"
13307 #include "confdefs.h"
13308 /* Override any gcc2 internal prototype to avoid an error.  */
13309 /* We use char because int might match the return type of a gcc2
13310     builtin and then its argument prototype would still apply.  */
13311 char acl_get_file();
13312
13313 int main() {
13314 acl_get_file()
13315 ; return 0; }
13316 EOF
13317 if { (eval echo configure:13318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13318   rm -rf conftest*
13319   eval "ac_cv_lib_$ac_lib_var=yes"
13320 else
13321   echo "configure: failed program was:" >&5
13322   cat conftest.$ac_ext >&5
13323   rm -rf conftest*
13324   eval "ac_cv_lib_$ac_lib_var=no"
13325 fi
13326 rm -f conftest*
13327 LIBS="$ac_save_LIBS"
13328
13329 fi
13330 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13331   echo "$ac_t""yes" 1>&6
13332     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13333     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13334   cat >> confdefs.h <<EOF
13335 #define $ac_tr_lib 1
13336 EOF
13337
13338   LIBS="-lacl $LIBS"
13339
13340 else
13341   echo "$ac_t""no" 1>&6
13342 fi
13343
13344                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13345 echo "configure:13346: checking for ACL support" >&5
13346 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13347   echo $ac_n "(cached) $ac_c" 1>&6
13348 else
13349   
13350                 cat > conftest.$ac_ext <<EOF
13351 #line 13352 "configure"
13352 #include "confdefs.h"
13353 #include <sys/types.h>
13354 #include <sys/acl.h>
13355 int main() {
13356  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13357 ; return 0; }
13358 EOF
13359 if { (eval echo configure:13360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13360   rm -rf conftest*
13361   samba_cv_HAVE_POSIX_ACLS=yes
13362 else
13363   echo "configure: failed program was:" >&5
13364   cat conftest.$ac_ext >&5
13365   rm -rf conftest*
13366   samba_cv_HAVE_POSIX_ACLS=no
13367 fi
13368 rm -f conftest*
13369 fi
13370
13371 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13372                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13373                                 echo "$ac_t""Using posix ACLs" 1>&6
13374                                 cat >> confdefs.h <<\EOF
13375 #define HAVE_POSIX_ACLS 1
13376 EOF
13377
13378                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13379 echo "configure:13380: checking for acl_get_perm_np" >&5
13380 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13381   echo $ac_n "(cached) $ac_c" 1>&6
13382 else
13383   
13384                                 cat > conftest.$ac_ext <<EOF
13385 #line 13386 "configure"
13386 #include "confdefs.h"
13387 #include <sys/types.h>
13388 #include <sys/acl.h>
13389 int main() {
13390  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13391 ; return 0; }
13392 EOF
13393 if { (eval echo configure:13394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13394   rm -rf conftest*
13395   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13396 else
13397   echo "configure: failed program was:" >&5
13398   cat conftest.$ac_ext >&5
13399   rm -rf conftest*
13400   samba_cv_HAVE_ACL_GET_PERM_NP=no
13401 fi
13402 rm -f conftest*
13403 fi
13404
13405 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13406                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13407                                         cat >> confdefs.h <<\EOF
13408 #define HAVE_ACL_GET_PERM_NP 1
13409 EOF
13410
13411                                 fi
13412                         fi
13413             ;;
13414         esac
13415         ;;
13416   *)
13417     echo "$ac_t""no" 1>&6
13418     cat >> confdefs.h <<\EOF
13419 #define HAVE_NO_ACLS 1
13420 EOF
13421
13422     ;;
13423   esac 
13424 else
13425   cat >> confdefs.h <<\EOF
13426 #define HAVE_NO_ACLS 1
13427 EOF
13428
13429   echo "$ac_t""no" 1>&6
13430
13431 fi
13432
13433
13434 #################################################
13435 # Check whether winbind is supported on this platform.  If so we need to
13436 # build and install client programs (WINBIND_TARGETS), sbin programs
13437 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13438
13439 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13440 echo "configure:13441: checking whether to build winbind" >&5
13441
13442 # Initially, the value of $host_os decides whether winbind is supported
13443
13444 case "$host_os" in 
13445         *linux*|*solaris*|*irix*)
13446                 HAVE_WINBIND=yes
13447                 ;;
13448         *)
13449                 HAVE_WINBIND=no
13450                 winbind_no_reason=", unsupported on $host_os"
13451                 ;;
13452 esac
13453
13454 # Check the setting of --with-winbindd
13455
13456 # Check whether --with-winbind or --without-winbind was given.
13457 if test "${with_winbind+set}" = set; then
13458   withval="$with_winbind"
13459    
13460   case "$withval" in
13461         yes)
13462                 HAVE_WINBIND=yes
13463                 ;;
13464         no)
13465                 HAVE_WINBIND=no
13466                 winbind_reason=""
13467                 ;;
13468   esac 
13469 fi
13470
13471
13472 # We need unix domain sockets for winbind
13473
13474 if test x"$HAVE_WINBIND" = x"yes"; then
13475         if test x"$samba_cv_unixsocket" = x"no"; then
13476                 winbind_no_reason=", no unix domain socket support on $host_os"
13477                 HAVE_WINBIND=no
13478         fi
13479 fi
13480
13481 # Display test results
13482
13483 WINBIND_TARGETS=""
13484 WINBIND_STARGETS=""
13485 WINBIND_LTARGETS=""
13486 WINBIND_PAM_PROGS=""
13487
13488 if test x"$HAVE_WINBIND" = x"yes"; then
13489         echo "$ac_t""yes" 1>&6
13490
13491         WINBIND_TARGETS="bin/wbinfo"
13492         WINBIND_STARGETS="bin/winbindd"
13493         if test x"$BLDSHARED" = x"true"; then
13494                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13495                 if test x"$with_pam" = x"yes"; then
13496                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13497                 fi
13498         fi
13499 else
13500         echo "$ac_t""no$winbind_no_reason" 1>&6
13501 fi
13502
13503 # Substitution time!
13504
13505
13506
13507
13508
13509
13510 #################################################
13511 # Check to see if we should use the included popt 
13512
13513 # Check whether --with-included-popt or --without-included-popt was given.
13514 if test "${with_included_popt+set}" = set; then
13515   withval="$with_included_popt"
13516    
13517   case "$withval" in
13518         yes)
13519                 INCLUDED_POPT=yes
13520                 ;;
13521         no)
13522                 INCLUDED_POPT=no
13523                 ;;
13524   esac 
13525 fi
13526
13527 if test x"$INCLUDED_POPT" != x"yes"; then
13528     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13529 echo "configure:13530: checking for poptGetContext in -lpopt" >&5
13530 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13531 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13532   echo $ac_n "(cached) $ac_c" 1>&6
13533 else
13534   ac_save_LIBS="$LIBS"
13535 LIBS="-lpopt  $LIBS"
13536 cat > conftest.$ac_ext <<EOF
13537 #line 13538 "configure"
13538 #include "confdefs.h"
13539 /* Override any gcc2 internal prototype to avoid an error.  */
13540 /* We use char because int might match the return type of a gcc2
13541     builtin and then its argument prototype would still apply.  */
13542 char poptGetContext();
13543
13544 int main() {
13545 poptGetContext()
13546 ; return 0; }
13547 EOF
13548 if { (eval echo configure:13549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13549   rm -rf conftest*
13550   eval "ac_cv_lib_$ac_lib_var=yes"
13551 else
13552   echo "configure: failed program was:" >&5
13553   cat conftest.$ac_ext >&5
13554   rm -rf conftest*
13555   eval "ac_cv_lib_$ac_lib_var=no"
13556 fi
13557 rm -f conftest*
13558 LIBS="$ac_save_LIBS"
13559
13560 fi
13561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13562   echo "$ac_t""yes" 1>&6
13563   INCLUDED_POPT=no
13564 else
13565   echo "$ac_t""no" 1>&6
13566 INCLUDED_POPT=yes
13567 fi
13568
13569 fi
13570
13571 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13572 echo "configure:13573: checking whether to use included popt" >&5
13573 if test x"$INCLUDED_POPT" = x"yes"; then
13574     echo "$ac_t""$srcdir/popt" 1>&6
13575     BUILD_POPT='$(POPT_OBJS)'
13576     FLAGS1="-I$srcdir/popt"
13577 else
13578     echo "$ac_t""no" 1>&6
13579     LIBS="$LIBS -lpopt"
13580 fi
13581
13582
13583
13584 #################################################
13585 # final configure stuff
13586
13587 echo "checking configure summary"
13588 if test "$cross_compiling" = yes; then
13589   :
13590 else
13591   cat > conftest.$ac_ext <<EOF
13592 #line 13593 "configure"
13593 #include "confdefs.h"
13594 #include "${srcdir-.}/tests/summary.c"
13595 EOF
13596 if { (eval echo configure:13597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13597 then
13598   echo "configure OK";
13599 else
13600   echo "configure: failed program was:" >&5
13601   cat conftest.$ac_ext >&5
13602   rm -fr conftest*
13603   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
13604 fi
13605 rm -fr conftest*
13606 fi
13607
13608
13609 builddir=`pwd`
13610
13611
13612 trap '' 1 2 15
13613 cat > confcache <<\EOF
13614 # This file is a shell script that caches the results of configure
13615 # tests run on this system so they can be shared between configure
13616 # scripts and configure runs.  It is not useful on other systems.
13617 # If it contains results you don't want to keep, you may remove or edit it.
13618 #
13619 # By default, configure uses ./config.cache as the cache file,
13620 # creating it if it does not exist already.  You can give configure
13621 # the --cache-file=FILE option to use a different cache file; that is
13622 # what configure does when it calls configure scripts in
13623 # subdirectories, so they share the cache.
13624 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13625 # config.status only pays attention to the cache file if you give it the
13626 # --recheck option to rerun configure.
13627 #
13628 EOF
13629 # The following way of writing the cache mishandles newlines in values,
13630 # but we know of no workaround that is simple, portable, and efficient.
13631 # So, don't put newlines in cache variables' values.
13632 # Ultrix sh set writes to stderr and can't be redirected directly,
13633 # and sets the high bit in the cache file unless we assign to the vars.
13634 (set) 2>&1 |
13635   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13636   *ac_space=\ *)
13637     # `set' does not quote correctly, so add quotes (double-quote substitution
13638     # turns \\\\ into \\, and sed turns \\ into \).
13639     sed -n \
13640       -e "s/'/'\\\\''/g" \
13641       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13642     ;;
13643   *)
13644     # `set' quotes correctly as required by POSIX, so do not add quotes.
13645     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13646     ;;
13647   esac >> confcache
13648 if cmp -s $cache_file confcache; then
13649   :
13650 else
13651   if test -w $cache_file; then
13652     echo "updating cache $cache_file"
13653     cat confcache > $cache_file
13654   else
13655     echo "not updating unwritable cache $cache_file"
13656   fi
13657 fi
13658 rm -f confcache
13659
13660 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13661
13662 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13663 # Let make expand exec_prefix.
13664 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13665
13666 # Any assignment to VPATH causes Sun make to only execute
13667 # the first set of double-colon rules, so remove it if not needed.
13668 # If there is a colon in the path, we need to keep it.
13669 if test "x$srcdir" = x.; then
13670   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13671 fi
13672
13673 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13674
13675 DEFS=-DHAVE_CONFIG_H
13676
13677 # Without the "./", some shells look in PATH for config.status.
13678 : ${CONFIG_STATUS=./config.status}
13679
13680 echo creating $CONFIG_STATUS
13681 rm -f $CONFIG_STATUS
13682 cat > $CONFIG_STATUS <<EOF
13683 #! /bin/sh
13684 # Generated automatically by configure.
13685 # Run this file to recreate the current configuration.
13686 # This directory was configured as follows,
13687 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13688 #
13689 # $0 $ac_configure_args
13690 #
13691 # Compiler output produced by configure, useful for debugging
13692 # configure, is in ./config.log if it exists.
13693
13694 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13695 for ac_option
13696 do
13697   case "\$ac_option" in
13698   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13699     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13700     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13701   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13702     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13703     exit 0 ;;
13704   -help | --help | --hel | --he | --h)
13705     echo "\$ac_cs_usage"; exit 0 ;;
13706   *) echo "\$ac_cs_usage"; exit 1 ;;
13707   esac
13708 done
13709
13710 ac_given_srcdir=$srcdir
13711 ac_given_INSTALL="$INSTALL"
13712
13713 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13714 EOF
13715 cat >> $CONFIG_STATUS <<EOF
13716
13717 # Protect against being on the right side of a sed subst in config.status.
13718 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13719  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13720 $ac_vpsub
13721 $extrasub
13722 s%@SHELL@%$SHELL%g
13723 s%@CFLAGS@%$CFLAGS%g
13724 s%@CPPFLAGS@%$CPPFLAGS%g
13725 s%@CXXFLAGS@%$CXXFLAGS%g
13726 s%@FFLAGS@%$FFLAGS%g
13727 s%@DEFS@%$DEFS%g
13728 s%@LDFLAGS@%$LDFLAGS%g
13729 s%@LIBS@%$LIBS%g
13730 s%@exec_prefix@%$exec_prefix%g
13731 s%@prefix@%$prefix%g
13732 s%@program_transform_name@%$program_transform_name%g
13733 s%@bindir@%$bindir%g
13734 s%@sbindir@%$sbindir%g
13735 s%@libexecdir@%$libexecdir%g
13736 s%@datadir@%$datadir%g
13737 s%@sysconfdir@%$sysconfdir%g
13738 s%@sharedstatedir@%$sharedstatedir%g
13739 s%@localstatedir@%$localstatedir%g
13740 s%@libdir@%$libdir%g
13741 s%@includedir@%$includedir%g
13742 s%@oldincludedir@%$oldincludedir%g
13743 s%@infodir@%$infodir%g
13744 s%@mandir@%$mandir%g
13745 s%@RUNPROG@%$RUNPROG%g
13746 s%@MPROGS@%$MPROGS%g
13747 s%@LDSHFLAGS@%$LDSHFLAGS%g
13748 s%@SHLD@%$SHLD%g
13749 s%@HOST_OS@%$HOST_OS%g
13750 s%@PAM_MOD@%$PAM_MOD%g
13751 s%@WRAP@%$WRAP%g
13752 s%@WRAP32@%$WRAP32%g
13753 s%@PICFLAG@%$PICFLAG%g
13754 s%@PICSUFFIX@%$PICSUFFIX%g
13755 s%@POBAD_CC@%$POBAD_CC%g
13756 s%@SHLIBEXT@%$SHLIBEXT%g
13757 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13758 s%@CC@%$CC%g
13759 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13760 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13761 s%@INSTALL_DATA@%$INSTALL_DATA%g
13762 s%@AWK@%$AWK%g
13763 s%@BROKEN_CC@%$BROKEN_CC%g
13764 s%@host@%$host%g
13765 s%@host_alias@%$host_alias%g
13766 s%@host_cpu@%$host_cpu%g
13767 s%@host_vendor@%$host_vendor%g
13768 s%@host_os@%$host_os%g
13769 s%@target@%$target%g
13770 s%@target_alias@%$target_alias%g
13771 s%@target_cpu@%$target_cpu%g
13772 s%@target_vendor@%$target_vendor%g
13773 s%@target_os@%$target_os%g
13774 s%@build@%$build%g
13775 s%@build_alias@%$build_alias%g
13776 s%@build_cpu@%$build_cpu%g
13777 s%@build_vendor@%$build_vendor%g
13778 s%@build_os@%$build_os%g
13779 s%@CPP@%$CPP%g
13780 s%@LIBOBJS@%$LIBOBJS%g
13781 s%@TERMLIBS@%$TERMLIBS%g
13782 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13783 s%@ROFF@%$ROFF%g
13784 s%@DYNEXP@%$DYNEXP%g
13785 s%@QUOTAOBJS@%$QUOTAOBJS%g
13786 s%@privatedir@%$privatedir%g
13787 s%@lockdir@%$lockdir%g
13788 s%@swatdir@%$swatdir%g
13789 s%@manlangs@%$manlangs%g
13790 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13791 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13792 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13793 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
13794 s%@BUILD_POPT@%$BUILD_POPT%g
13795 s%@FLAGS1@%$FLAGS1%g
13796 s%@builddir@%$builddir%g
13797
13798 CEOF
13799 EOF
13800
13801 cat >> $CONFIG_STATUS <<\EOF
13802
13803 # Split the substitutions into bite-sized pieces for seds with
13804 # small command number limits, like on Digital OSF/1 and HP-UX.
13805 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13806 ac_file=1 # Number of current file.
13807 ac_beg=1 # First line for current file.
13808 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13809 ac_more_lines=:
13810 ac_sed_cmds=""
13811 while $ac_more_lines; do
13812   if test $ac_beg -gt 1; then
13813     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13814   else
13815     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13816   fi
13817   if test ! -s conftest.s$ac_file; then
13818     ac_more_lines=false
13819     rm -f conftest.s$ac_file
13820   else
13821     if test -z "$ac_sed_cmds"; then
13822       ac_sed_cmds="sed -f conftest.s$ac_file"
13823     else
13824       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13825     fi
13826     ac_file=`expr $ac_file + 1`
13827     ac_beg=$ac_end
13828     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13829   fi
13830 done
13831 if test -z "$ac_sed_cmds"; then
13832   ac_sed_cmds=cat
13833 fi
13834 EOF
13835
13836 cat >> $CONFIG_STATUS <<EOF
13837
13838 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13839 EOF
13840 cat >> $CONFIG_STATUS <<\EOF
13841 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13842   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13843   case "$ac_file" in
13844   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13845        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13846   *) ac_file_in="${ac_file}.in" ;;
13847   esac
13848
13849   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13850
13851   # Remove last slash and all that follows it.  Not all systems have dirname.
13852   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13853   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13854     # The file is in a subdirectory.
13855     test ! -d "$ac_dir" && mkdir "$ac_dir"
13856     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13857     # A "../" for each directory in $ac_dir_suffix.
13858     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13859   else
13860     ac_dir_suffix= ac_dots=
13861   fi
13862
13863   case "$ac_given_srcdir" in
13864   .)  srcdir=.
13865       if test -z "$ac_dots"; then top_srcdir=.
13866       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13867   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13868   *) # Relative path.
13869     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13870     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13871   esac
13872
13873   case "$ac_given_INSTALL" in
13874   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13875   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13876   esac
13877
13878   echo creating "$ac_file"
13879   rm -f "$ac_file"
13880   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13881   case "$ac_file" in
13882   *Makefile*) ac_comsub="1i\\
13883 # $configure_input" ;;
13884   *) ac_comsub= ;;
13885   esac
13886
13887   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13888   sed -e "$ac_comsub
13889 s%@configure_input@%$configure_input%g
13890 s%@srcdir@%$srcdir%g
13891 s%@top_srcdir@%$top_srcdir%g
13892 s%@INSTALL@%$INSTALL%g
13893 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13894 fi; done
13895 rm -f conftest.s*
13896
13897 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13898 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13899 #
13900 # ac_d sets the value in "#define NAME VALUE" lines.
13901 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13902 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13903 ac_dC='\3'
13904 ac_dD='%g'
13905 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13906 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13907 ac_uB='\([      ]\)%\1#\2define\3'
13908 ac_uC=' '
13909 ac_uD='\4%g'
13910 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13911 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13912 ac_eB='$%\1#\2define\3'
13913 ac_eC=' '
13914 ac_eD='%g'
13915
13916 if test "${CONFIG_HEADERS+set}" != set; then
13917 EOF
13918 cat >> $CONFIG_STATUS <<EOF
13919   CONFIG_HEADERS="include/config.h"
13920 EOF
13921 cat >> $CONFIG_STATUS <<\EOF
13922 fi
13923 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13924   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13925   case "$ac_file" in
13926   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13927        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13928   *) ac_file_in="${ac_file}.in" ;;
13929   esac
13930
13931   echo creating $ac_file
13932
13933   rm -f conftest.frag conftest.in conftest.out
13934   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13935   cat $ac_file_inputs > conftest.in
13936
13937 EOF
13938
13939 # Transform confdefs.h into a sed script conftest.vals that substitutes
13940 # the proper values into config.h.in to produce config.h.  And first:
13941 # Protect against being on the right side of a sed subst in config.status.
13942 # Protect against being in an unquoted here document in config.status.
13943 rm -f conftest.vals
13944 cat > conftest.hdr <<\EOF
13945 s/[\\&%]/\\&/g
13946 s%[\\$`]%\\&%g
13947 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13948 s%ac_d%ac_u%gp
13949 s%ac_u%ac_e%gp
13950 EOF
13951 sed -n -f conftest.hdr confdefs.h > conftest.vals
13952 rm -f conftest.hdr
13953
13954 # This sed command replaces #undef with comments.  This is necessary, for
13955 # example, in the case of _POSIX_SOURCE, which is predefined and required
13956 # on some systems where configure will not decide to define it.
13957 cat >> conftest.vals <<\EOF
13958 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13959 EOF
13960
13961 # Break up conftest.vals because some shells have a limit on
13962 # the size of here documents, and old seds have small limits too.
13963
13964 rm -f conftest.tail
13965 while :
13966 do
13967   ac_lines=`grep -c . conftest.vals`
13968   # grep -c gives empty output for an empty file on some AIX systems.
13969   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13970   # Write a limited-size here document to conftest.frag.
13971   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13972   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13973   echo 'CEOF
13974   sed -f conftest.frag conftest.in > conftest.out
13975   rm -f conftest.in
13976   mv conftest.out conftest.in
13977 ' >> $CONFIG_STATUS
13978   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13979   rm -f conftest.vals
13980   mv conftest.tail conftest.vals
13981 done
13982 rm -f conftest.vals
13983
13984 cat >> $CONFIG_STATUS <<\EOF
13985   rm -f conftest.frag conftest.h
13986   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13987   cat conftest.in >> conftest.h
13988   rm -f conftest.in
13989   if cmp -s $ac_file conftest.h 2>/dev/null; then
13990     echo "$ac_file is unchanged"
13991     rm -f conftest.h
13992   else
13993     # Remove last slash and all that follows it.  Not all systems have dirname.
13994       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13995       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13996       # The file is in a subdirectory.
13997       test ! -d "$ac_dir" && mkdir "$ac_dir"
13998     fi
13999     rm -f $ac_file
14000     mv conftest.h $ac_file
14001   fi
14002 fi; done
14003
14004 EOF
14005 cat >> $CONFIG_STATUS <<EOF
14006
14007 EOF
14008 cat >> $CONFIG_STATUS <<\EOF
14009
14010 exit 0
14011 EOF
14012 chmod +x $CONFIG_STATUS
14013 rm -fr confdefs* $ac_clean_files
14014 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14015
14016
14017 #################################################
14018 # Print very concise instructions on building/use
14019 if test "x$enable_dmalloc" = xyes
14020 then
14021         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14022         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14023 fi