rerun autoconf
[kai/samba.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --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 #
1233 # Config CPPFLAG settings for strange OS's that must be set
1234 # before other tests.
1235 #
1236 case "$host_os" in
1237 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1238     *hpux*)
1239       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1240 echo "configure:1241: checking whether ${CC-cc} accepts -Ae" >&5
1241 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1242   echo $ac_n "(cached) $ac_c" 1>&6
1243 else
1244   echo 'void f(){}' > conftest.c
1245 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1246   ac_cv_prog_cc_Ae=yes
1247 else
1248   ac_cv_prog_cc_Ae=no
1249 fi
1250 rm -f conftest*
1251
1252 fi
1253
1254 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1255       # mmap on HPUX is completely broken...
1256       cat >> confdefs.h <<\EOF
1257 #define MMAP_BLACKLIST 1
1258 EOF
1259
1260       if test $ac_cv_prog_cc_Ae = yes; then
1261         CPPFLAGS="$CPPFLAGS -Ae"
1262       fi
1263 #
1264 # Defines needed for HPUX support.
1265 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1266 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1267 #
1268       case `uname -r` in
1269                         *9*|*10*)
1270                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1271                                 cat >> confdefs.h <<\EOF
1272 #define USE_BOTH_CRYPT_CALLS 1
1273 EOF
1274
1275                                 ;;
1276                         *11*)
1277                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1278                                 cat >> confdefs.h <<\EOF
1279 #define USE_BOTH_CRYPT_CALLS 1
1280 EOF
1281
1282                                 ;;
1283       esac
1284       ;;
1285
1286 #
1287 # CRAY Unicos has broken const handling
1288        *unicos*)
1289           echo "$ac_t""disabling const" 1>&6
1290           CPPFLAGS="$CPPFLAGS -Dconst="
1291           ;;
1292         
1293 #
1294 # AIX4.x doesn't even admit to having large
1295 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1296 #
1297     *aix4*)
1298           echo "$ac_t""enabling large file support" 1>&6
1299       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1300       ;;    
1301 #
1302 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1303 # to the existance of large files..
1304 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1305 # recommendations on large file support, however it makes the
1306 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1307 # recommendation makes the compile fail on gcc2.7. JRA.
1308 #
1309         *solaris*)
1310                 case `uname -r` in
1311                         5.0*|5.1*|5.2*|5.3*|5.5*)
1312                                 echo "$ac_t""no large file support" 1>&6
1313                                 ;;
1314                         5.*)
1315                         echo "$ac_t""enabling large file support" 1>&6
1316                         if test "$ac_cv_prog_gcc" = yes; then
1317                                 ${CC-cc} -v >conftest.c 2>&1
1318                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1319                                 rm -fr conftest.c
1320                                 case "$ac_cv_gcc_compiler_version_number" in
1321                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1322                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1323                                                 ;;
1324                                         *)
1325                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1326                                                 ;;
1327                                 esac
1328                         else
1329                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1330                         fi
1331                         ;;
1332                 esac
1333                 ;;
1334 #
1335 # Tests needed for SINIX large file support.
1336 #
1337     *sysv4*)
1338       if test $host = mips-sni-sysv4 ; then
1339         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1340 echo "configure:1341: checking for LFS support" >&5
1341         old_CPPFLAGS="$CPPFLAGS"
1342         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1343         if test "$cross_compiling" = yes; then
1344   SINIX_LFS_SUPPORT=cross
1345 else
1346   cat > conftest.$ac_ext <<EOF
1347 #line 1348 "configure"
1348 #include "confdefs.h"
1349
1350 #include <unistd.h>
1351 main () {
1352 #if _LFS64_LARGEFILE == 1
1353 exit(0);
1354 #else
1355 exit(1);
1356 #endif
1357 }
1358 EOF
1359 if { (eval echo configure:1360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1360 then
1361   SINIX_LFS_SUPPORT=yes
1362 else
1363   echo "configure: failed program was:" >&5
1364   cat conftest.$ac_ext >&5
1365   rm -fr conftest*
1366   SINIX_LFS_SUPPORT=no
1367 fi
1368 rm -fr conftest*
1369 fi
1370
1371         CPPFLAGS="$old_CPPFLAGS"
1372         if test x$SINIX_LFS_SUPPORT = xyes ; then
1373           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1374           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1375           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1376           LIBS="`getconf LFS64_LIBS` $LIBS"
1377         fi
1378       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1379       fi
1380     ;;
1381
1382 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1383 #
1384     *linux*)
1385         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1386 echo "configure:1387: checking for LFS support" >&5
1387         old_CPPFLAGS="$CPPFLAGS"
1388         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1389        if test "$cross_compiling" = yes; then
1390   LINUX_LFS_SUPPORT=cross
1391 else
1392   cat > conftest.$ac_ext <<EOF
1393 #line 1394 "configure"
1394 #include "confdefs.h"
1395
1396 #include <unistd.h>
1397 #include <sys/utsname.h>
1398 main() {
1399 #if _LFS64_LARGEFILE == 1
1400        struct utsname uts;
1401        char *release;
1402        int major, minor;
1403
1404        /* Ensure this is glibc 2.2 or higher */
1405 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1406        int libc_major = __GLIBC__;
1407        int libc_minor = __GLIBC_MINOR__;
1408
1409        if (libc_major < 2)
1410               exit(1);
1411        if (libc_minor < 2)
1412               exit(1);
1413 #endif
1414
1415        /* Ensure this is kernel 2.4 or higher */
1416
1417        uname(&uts);
1418        release = uts.release;
1419        major = atoi(strsep(&release, "."));
1420        minor = atoi(strsep(&release, "."));
1421
1422        if (major > 2 || (major == 2 && minor > 3))
1423                exit(0);
1424        exit(1);
1425 #else
1426        exit(1);
1427 #endif
1428 }
1429
1430 EOF
1431 if { (eval echo configure:1432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1432 then
1433   LINUX_LFS_SUPPORT=yes
1434 else
1435   echo "configure: failed program was:" >&5
1436   cat conftest.$ac_ext >&5
1437   rm -fr conftest*
1438   LINUX_LFS_SUPPORT=no
1439 fi
1440 rm -fr conftest*
1441 fi
1442
1443         CPPFLAGS="$old_CPPFLAGS"
1444         if test x$LINUX_LFS_SUPPORT = xyes ; then
1445           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1446         fi
1447        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1448                 ;;
1449
1450     *hurd*)
1451         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1452 echo "configure:1453: checking for LFS support" >&5
1453         old_CPPFLAGS="$CPPFLAGS"
1454         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1455         if test "$cross_compiling" = yes; then
1456   GLIBC_LFS_SUPPORT=cross
1457 else
1458   cat > conftest.$ac_ext <<EOF
1459 #line 1460 "configure"
1460 #include "confdefs.h"
1461
1462 #include <unistd.h>
1463 main () {
1464 #if _LFS64_LARGEFILE == 1
1465 exit(0);
1466 #else
1467 exit(1);
1468 #endif
1469 }
1470 EOF
1471 if { (eval echo configure:1472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1472 then
1473   GLIBC_LFS_SUPPORT=yes
1474 else
1475   echo "configure: failed program was:" >&5
1476   cat conftest.$ac_ext >&5
1477   rm -fr conftest*
1478   GLIBC_LFS_SUPPORT=no
1479 fi
1480 rm -fr conftest*
1481 fi
1482
1483         CPPFLAGS="$old_CPPFLAGS"
1484         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1485           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1486         fi
1487       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1488     ;;
1489
1490 esac
1491
1492 echo $ac_n "checking for inline""... $ac_c" 1>&6
1493 echo "configure:1494: checking for inline" >&5
1494 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1495   echo $ac_n "(cached) $ac_c" 1>&6
1496 else
1497   ac_cv_c_inline=no
1498 for ac_kw in inline __inline__ __inline; do
1499   cat > conftest.$ac_ext <<EOF
1500 #line 1501 "configure"
1501 #include "confdefs.h"
1502
1503 int main() {
1504 } $ac_kw foo() {
1505 ; return 0; }
1506 EOF
1507 if { (eval echo configure:1508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1508   rm -rf conftest*
1509   ac_cv_c_inline=$ac_kw; break
1510 else
1511   echo "configure: failed program was:" >&5
1512   cat conftest.$ac_ext >&5
1513 fi
1514 rm -f conftest*
1515 done
1516
1517 fi
1518
1519 echo "$ac_t""$ac_cv_c_inline" 1>&6
1520 case "$ac_cv_c_inline" in
1521   inline | yes) ;;
1522   no) cat >> confdefs.h <<\EOF
1523 #define inline 
1524 EOF
1525  ;;
1526   *)  cat >> confdefs.h <<EOF
1527 #define inline $ac_cv_c_inline
1528 EOF
1529  ;;
1530 esac
1531
1532 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1533 echo "configure:1534: checking how to run the C preprocessor" >&5
1534 # On Suns, sometimes $CPP names a directory.
1535 if test -n "$CPP" && test -d "$CPP"; then
1536   CPP=
1537 fi
1538 if test -z "$CPP"; then
1539 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1540   echo $ac_n "(cached) $ac_c" 1>&6
1541 else
1542     # This must be in double quotes, not single quotes, because CPP may get
1543   # substituted into the Makefile and "${CC-cc}" will confuse make.
1544   CPP="${CC-cc} -E"
1545   # On the NeXT, cc -E runs the code through the compiler's parser,
1546   # not just through cpp.
1547   cat > conftest.$ac_ext <<EOF
1548 #line 1549 "configure"
1549 #include "confdefs.h"
1550 #include <assert.h>
1551 Syntax Error
1552 EOF
1553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1554 { (eval echo configure:1555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1556 if test -z "$ac_err"; then
1557   :
1558 else
1559   echo "$ac_err" >&5
1560   echo "configure: failed program was:" >&5
1561   cat conftest.$ac_ext >&5
1562   rm -rf conftest*
1563   CPP="${CC-cc} -E -traditional-cpp"
1564   cat > conftest.$ac_ext <<EOF
1565 #line 1566 "configure"
1566 #include "confdefs.h"
1567 #include <assert.h>
1568 Syntax Error
1569 EOF
1570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1571 { (eval echo configure:1572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1573 if test -z "$ac_err"; then
1574   :
1575 else
1576   echo "$ac_err" >&5
1577   echo "configure: failed program was:" >&5
1578   cat conftest.$ac_ext >&5
1579   rm -rf conftest*
1580   CPP="${CC-cc} -nologo -E"
1581   cat > conftest.$ac_ext <<EOF
1582 #line 1583 "configure"
1583 #include "confdefs.h"
1584 #include <assert.h>
1585 Syntax Error
1586 EOF
1587 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1588 { (eval echo configure:1589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1589 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1590 if test -z "$ac_err"; then
1591   :
1592 else
1593   echo "$ac_err" >&5
1594   echo "configure: failed program was:" >&5
1595   cat conftest.$ac_ext >&5
1596   rm -rf conftest*
1597   CPP=/lib/cpp
1598 fi
1599 rm -f conftest*
1600 fi
1601 rm -f conftest*
1602 fi
1603 rm -f conftest*
1604   ac_cv_prog_CPP="$CPP"
1605 fi
1606   CPP="$ac_cv_prog_CPP"
1607 else
1608   ac_cv_prog_CPP="$CPP"
1609 fi
1610 echo "$ac_t""$CPP" 1>&6
1611
1612 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1613 echo "configure:1614: checking for ANSI C header files" >&5
1614 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1615   echo $ac_n "(cached) $ac_c" 1>&6
1616 else
1617   cat > conftest.$ac_ext <<EOF
1618 #line 1619 "configure"
1619 #include "confdefs.h"
1620 #include <stdlib.h>
1621 #include <stdarg.h>
1622 #include <string.h>
1623 #include <float.h>
1624 EOF
1625 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1626 { (eval echo configure:1627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1627 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1628 if test -z "$ac_err"; then
1629   rm -rf conftest*
1630   ac_cv_header_stdc=yes
1631 else
1632   echo "$ac_err" >&5
1633   echo "configure: failed program was:" >&5
1634   cat conftest.$ac_ext >&5
1635   rm -rf conftest*
1636   ac_cv_header_stdc=no
1637 fi
1638 rm -f conftest*
1639
1640 if test $ac_cv_header_stdc = yes; then
1641   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1642 cat > conftest.$ac_ext <<EOF
1643 #line 1644 "configure"
1644 #include "confdefs.h"
1645 #include <string.h>
1646 EOF
1647 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1648   egrep "memchr" >/dev/null 2>&1; then
1649   :
1650 else
1651   rm -rf conftest*
1652   ac_cv_header_stdc=no
1653 fi
1654 rm -f conftest*
1655
1656 fi
1657
1658 if test $ac_cv_header_stdc = yes; then
1659   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1660 cat > conftest.$ac_ext <<EOF
1661 #line 1662 "configure"
1662 #include "confdefs.h"
1663 #include <stdlib.h>
1664 EOF
1665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1666   egrep "free" >/dev/null 2>&1; then
1667   :
1668 else
1669   rm -rf conftest*
1670   ac_cv_header_stdc=no
1671 fi
1672 rm -f conftest*
1673
1674 fi
1675
1676 if test $ac_cv_header_stdc = yes; then
1677   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1678 if test "$cross_compiling" = yes; then
1679   :
1680 else
1681   cat > conftest.$ac_ext <<EOF
1682 #line 1683 "configure"
1683 #include "confdefs.h"
1684 #include <ctype.h>
1685 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1686 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1687 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1688 int main () { int i; for (i = 0; i < 256; i++)
1689 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1690 exit (0); }
1691
1692 EOF
1693 if { (eval echo configure:1694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1694 then
1695   :
1696 else
1697   echo "configure: failed program was:" >&5
1698   cat conftest.$ac_ext >&5
1699   rm -fr conftest*
1700   ac_cv_header_stdc=no
1701 fi
1702 rm -fr conftest*
1703 fi
1704
1705 fi
1706 fi
1707
1708 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1709 if test $ac_cv_header_stdc = yes; then
1710   cat >> confdefs.h <<\EOF
1711 #define STDC_HEADERS 1
1712 EOF
1713
1714 fi
1715
1716 ac_header_dirent=no
1717 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1718 do
1719 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1720 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1721 echo "configure:1722: checking for $ac_hdr that defines DIR" >&5
1722 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1723   echo $ac_n "(cached) $ac_c" 1>&6
1724 else
1725   cat > conftest.$ac_ext <<EOF
1726 #line 1727 "configure"
1727 #include "confdefs.h"
1728 #include <sys/types.h>
1729 #include <$ac_hdr>
1730 int main() {
1731 DIR *dirp = 0;
1732 ; return 0; }
1733 EOF
1734 if { (eval echo configure:1735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1735   rm -rf conftest*
1736   eval "ac_cv_header_dirent_$ac_safe=yes"
1737 else
1738   echo "configure: failed program was:" >&5
1739   cat conftest.$ac_ext >&5
1740   rm -rf conftest*
1741   eval "ac_cv_header_dirent_$ac_safe=no"
1742 fi
1743 rm -f conftest*
1744 fi
1745 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1746   echo "$ac_t""yes" 1>&6
1747     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1748   cat >> confdefs.h <<EOF
1749 #define $ac_tr_hdr 1
1750 EOF
1751  ac_header_dirent=$ac_hdr; break
1752 else
1753   echo "$ac_t""no" 1>&6
1754 fi
1755 done
1756 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1757 if test $ac_header_dirent = dirent.h; then
1758 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1759 echo "configure:1760: checking for opendir in -ldir" >&5
1760 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1761 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1762   echo $ac_n "(cached) $ac_c" 1>&6
1763 else
1764   ac_save_LIBS="$LIBS"
1765 LIBS="-ldir  $LIBS"
1766 cat > conftest.$ac_ext <<EOF
1767 #line 1768 "configure"
1768 #include "confdefs.h"
1769 /* Override any gcc2 internal prototype to avoid an error.  */
1770 /* We use char because int might match the return type of a gcc2
1771     builtin and then its argument prototype would still apply.  */
1772 char opendir();
1773
1774 int main() {
1775 opendir()
1776 ; return 0; }
1777 EOF
1778 if { (eval echo configure:1779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1779   rm -rf conftest*
1780   eval "ac_cv_lib_$ac_lib_var=yes"
1781 else
1782   echo "configure: failed program was:" >&5
1783   cat conftest.$ac_ext >&5
1784   rm -rf conftest*
1785   eval "ac_cv_lib_$ac_lib_var=no"
1786 fi
1787 rm -f conftest*
1788 LIBS="$ac_save_LIBS"
1789
1790 fi
1791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1792   echo "$ac_t""yes" 1>&6
1793   LIBS="$LIBS -ldir"
1794 else
1795   echo "$ac_t""no" 1>&6
1796 fi
1797
1798 else
1799 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1800 echo "configure:1801: checking for opendir in -lx" >&5
1801 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1802 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1803   echo $ac_n "(cached) $ac_c" 1>&6
1804 else
1805   ac_save_LIBS="$LIBS"
1806 LIBS="-lx  $LIBS"
1807 cat > conftest.$ac_ext <<EOF
1808 #line 1809 "configure"
1809 #include "confdefs.h"
1810 /* Override any gcc2 internal prototype to avoid an error.  */
1811 /* We use char because int might match the return type of a gcc2
1812     builtin and then its argument prototype would still apply.  */
1813 char opendir();
1814
1815 int main() {
1816 opendir()
1817 ; return 0; }
1818 EOF
1819 if { (eval echo configure:1820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1820   rm -rf conftest*
1821   eval "ac_cv_lib_$ac_lib_var=yes"
1822 else
1823   echo "configure: failed program was:" >&5
1824   cat conftest.$ac_ext >&5
1825   rm -rf conftest*
1826   eval "ac_cv_lib_$ac_lib_var=no"
1827 fi
1828 rm -f conftest*
1829 LIBS="$ac_save_LIBS"
1830
1831 fi
1832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1833   echo "$ac_t""yes" 1>&6
1834   LIBS="$LIBS -lx"
1835 else
1836   echo "$ac_t""no" 1>&6
1837 fi
1838
1839 fi
1840
1841 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1842 echo "configure:1843: checking whether time.h and sys/time.h may both be included" >&5
1843 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1844   echo $ac_n "(cached) $ac_c" 1>&6
1845 else
1846   cat > conftest.$ac_ext <<EOF
1847 #line 1848 "configure"
1848 #include "confdefs.h"
1849 #include <sys/types.h>
1850 #include <sys/time.h>
1851 #include <time.h>
1852 int main() {
1853 struct tm *tp;
1854 ; return 0; }
1855 EOF
1856 if { (eval echo configure:1857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1857   rm -rf conftest*
1858   ac_cv_header_time=yes
1859 else
1860   echo "configure: failed program was:" >&5
1861   cat conftest.$ac_ext >&5
1862   rm -rf conftest*
1863   ac_cv_header_time=no
1864 fi
1865 rm -f conftest*
1866 fi
1867
1868 echo "$ac_t""$ac_cv_header_time" 1>&6
1869 if test $ac_cv_header_time = yes; then
1870   cat >> confdefs.h <<\EOF
1871 #define TIME_WITH_SYS_TIME 1
1872 EOF
1873
1874 fi
1875
1876 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1877 echo "configure:1878: checking for sys/wait.h that is POSIX.1 compatible" >&5
1878 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1879   echo $ac_n "(cached) $ac_c" 1>&6
1880 else
1881   cat > conftest.$ac_ext <<EOF
1882 #line 1883 "configure"
1883 #include "confdefs.h"
1884 #include <sys/types.h>
1885 #include <sys/wait.h>
1886 #ifndef WEXITSTATUS
1887 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1888 #endif
1889 #ifndef WIFEXITED
1890 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1891 #endif
1892 int main() {
1893 int s;
1894 wait (&s);
1895 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1896 ; return 0; }
1897 EOF
1898 if { (eval echo configure:1899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1899   rm -rf conftest*
1900   ac_cv_header_sys_wait_h=yes
1901 else
1902   echo "configure: failed program was:" >&5
1903   cat conftest.$ac_ext >&5
1904   rm -rf conftest*
1905   ac_cv_header_sys_wait_h=no
1906 fi
1907 rm -f conftest*
1908 fi
1909
1910 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1911 if test $ac_cv_header_sys_wait_h = yes; then
1912   cat >> confdefs.h <<\EOF
1913 #define HAVE_SYS_WAIT_H 1
1914 EOF
1915
1916 fi
1917
1918 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1919 do
1920 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1921 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1922 echo "configure:1923: checking for $ac_hdr" >&5
1923 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1924   echo $ac_n "(cached) $ac_c" 1>&6
1925 else
1926   cat > conftest.$ac_ext <<EOF
1927 #line 1928 "configure"
1928 #include "confdefs.h"
1929 #include <$ac_hdr>
1930 EOF
1931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1932 { (eval echo configure:1933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1934 if test -z "$ac_err"; then
1935   rm -rf conftest*
1936   eval "ac_cv_header_$ac_safe=yes"
1937 else
1938   echo "$ac_err" >&5
1939   echo "configure: failed program was:" >&5
1940   cat conftest.$ac_ext >&5
1941   rm -rf conftest*
1942   eval "ac_cv_header_$ac_safe=no"
1943 fi
1944 rm -f conftest*
1945 fi
1946 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1947   echo "$ac_t""yes" 1>&6
1948     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1949   cat >> confdefs.h <<EOF
1950 #define $ac_tr_hdr 1
1951 EOF
1952  
1953 else
1954   echo "$ac_t""no" 1>&6
1955 fi
1956 done
1957
1958 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1959 do
1960 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1961 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1962 echo "configure:1963: checking for $ac_hdr" >&5
1963 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1964   echo $ac_n "(cached) $ac_c" 1>&6
1965 else
1966   cat > conftest.$ac_ext <<EOF
1967 #line 1968 "configure"
1968 #include "confdefs.h"
1969 #include <$ac_hdr>
1970 EOF
1971 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1972 { (eval echo configure:1973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1973 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1974 if test -z "$ac_err"; then
1975   rm -rf conftest*
1976   eval "ac_cv_header_$ac_safe=yes"
1977 else
1978   echo "$ac_err" >&5
1979   echo "configure: failed program was:" >&5
1980   cat conftest.$ac_ext >&5
1981   rm -rf conftest*
1982   eval "ac_cv_header_$ac_safe=no"
1983 fi
1984 rm -f conftest*
1985 fi
1986 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1987   echo "$ac_t""yes" 1>&6
1988     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1989   cat >> confdefs.h <<EOF
1990 #define $ac_tr_hdr 1
1991 EOF
1992  
1993 else
1994   echo "$ac_t""no" 1>&6
1995 fi
1996 done
1997
1998 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1999 do
2000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2002 echo "configure:2003: checking for $ac_hdr" >&5
2003 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2004   echo $ac_n "(cached) $ac_c" 1>&6
2005 else
2006   cat > conftest.$ac_ext <<EOF
2007 #line 2008 "configure"
2008 #include "confdefs.h"
2009 #include <$ac_hdr>
2010 EOF
2011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2012 { (eval echo configure:2013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2014 if test -z "$ac_err"; then
2015   rm -rf conftest*
2016   eval "ac_cv_header_$ac_safe=yes"
2017 else
2018   echo "$ac_err" >&5
2019   echo "configure: failed program was:" >&5
2020   cat conftest.$ac_ext >&5
2021   rm -rf conftest*
2022   eval "ac_cv_header_$ac_safe=no"
2023 fi
2024 rm -f conftest*
2025 fi
2026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2027   echo "$ac_t""yes" 1>&6
2028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2029   cat >> confdefs.h <<EOF
2030 #define $ac_tr_hdr 1
2031 EOF
2032  
2033 else
2034   echo "$ac_t""no" 1>&6
2035 fi
2036 done
2037
2038 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2039 do
2040 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2041 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2042 echo "configure:2043: checking for $ac_hdr" >&5
2043 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2044   echo $ac_n "(cached) $ac_c" 1>&6
2045 else
2046   cat > conftest.$ac_ext <<EOF
2047 #line 2048 "configure"
2048 #include "confdefs.h"
2049 #include <$ac_hdr>
2050 EOF
2051 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2052 { (eval echo configure:2053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2053 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2054 if test -z "$ac_err"; then
2055   rm -rf conftest*
2056   eval "ac_cv_header_$ac_safe=yes"
2057 else
2058   echo "$ac_err" >&5
2059   echo "configure: failed program was:" >&5
2060   cat conftest.$ac_ext >&5
2061   rm -rf conftest*
2062   eval "ac_cv_header_$ac_safe=no"
2063 fi
2064 rm -f conftest*
2065 fi
2066 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2067   echo "$ac_t""yes" 1>&6
2068     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2069   cat >> confdefs.h <<EOF
2070 #define $ac_tr_hdr 1
2071 EOF
2072  
2073 else
2074   echo "$ac_t""no" 1>&6
2075 fi
2076 done
2077
2078 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
2079 do
2080 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2081 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2082 echo "configure:2083: checking for $ac_hdr" >&5
2083 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2084   echo $ac_n "(cached) $ac_c" 1>&6
2085 else
2086   cat > conftest.$ac_ext <<EOF
2087 #line 2088 "configure"
2088 #include "confdefs.h"
2089 #include <$ac_hdr>
2090 EOF
2091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2092 { (eval echo configure:2093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2094 if test -z "$ac_err"; then
2095   rm -rf conftest*
2096   eval "ac_cv_header_$ac_safe=yes"
2097 else
2098   echo "$ac_err" >&5
2099   echo "configure: failed program was:" >&5
2100   cat conftest.$ac_ext >&5
2101   rm -rf conftest*
2102   eval "ac_cv_header_$ac_safe=no"
2103 fi
2104 rm -f conftest*
2105 fi
2106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2107   echo "$ac_t""yes" 1>&6
2108     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2109   cat >> confdefs.h <<EOF
2110 #define $ac_tr_hdr 1
2111 EOF
2112  
2113 else
2114   echo "$ac_t""no" 1>&6
2115 fi
2116 done
2117
2118 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2119 do
2120 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2121 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2122 echo "configure:2123: checking for $ac_hdr" >&5
2123 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2124   echo $ac_n "(cached) $ac_c" 1>&6
2125 else
2126   cat > conftest.$ac_ext <<EOF
2127 #line 2128 "configure"
2128 #include "confdefs.h"
2129 #include <$ac_hdr>
2130 EOF
2131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2132 { (eval echo configure:2133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2134 if test -z "$ac_err"; then
2135   rm -rf conftest*
2136   eval "ac_cv_header_$ac_safe=yes"
2137 else
2138   echo "$ac_err" >&5
2139   echo "configure: failed program was:" >&5
2140   cat conftest.$ac_ext >&5
2141   rm -rf conftest*
2142   eval "ac_cv_header_$ac_safe=no"
2143 fi
2144 rm -f conftest*
2145 fi
2146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2147   echo "$ac_t""yes" 1>&6
2148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2149   cat >> confdefs.h <<EOF
2150 #define $ac_tr_hdr 1
2151 EOF
2152  
2153 else
2154   echo "$ac_t""no" 1>&6
2155 fi
2156 done
2157
2158 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2159 do
2160 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2161 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2162 echo "configure:2163: checking for $ac_hdr" >&5
2163 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2164   echo $ac_n "(cached) $ac_c" 1>&6
2165 else
2166   cat > conftest.$ac_ext <<EOF
2167 #line 2168 "configure"
2168 #include "confdefs.h"
2169 #include <$ac_hdr>
2170 EOF
2171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2172 { (eval echo configure:2173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2174 if test -z "$ac_err"; then
2175   rm -rf conftest*
2176   eval "ac_cv_header_$ac_safe=yes"
2177 else
2178   echo "$ac_err" >&5
2179   echo "configure: failed program was:" >&5
2180   cat conftest.$ac_ext >&5
2181   rm -rf conftest*
2182   eval "ac_cv_header_$ac_safe=no"
2183 fi
2184 rm -f conftest*
2185 fi
2186 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2187   echo "$ac_t""yes" 1>&6
2188     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2189   cat >> confdefs.h <<EOF
2190 #define $ac_tr_hdr 1
2191 EOF
2192  
2193 else
2194   echo "$ac_t""no" 1>&6
2195 fi
2196 done
2197
2198 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h
2199 do
2200 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2201 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2202 echo "configure:2203: checking for $ac_hdr" >&5
2203 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2204   echo $ac_n "(cached) $ac_c" 1>&6
2205 else
2206   cat > conftest.$ac_ext <<EOF
2207 #line 2208 "configure"
2208 #include "confdefs.h"
2209 #include <$ac_hdr>
2210 EOF
2211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2212 { (eval echo configure:2213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2214 if test -z "$ac_err"; then
2215   rm -rf conftest*
2216   eval "ac_cv_header_$ac_safe=yes"
2217 else
2218   echo "$ac_err" >&5
2219   echo "configure: failed program was:" >&5
2220   cat conftest.$ac_ext >&5
2221   rm -rf conftest*
2222   eval "ac_cv_header_$ac_safe=no"
2223 fi
2224 rm -f conftest*
2225 fi
2226 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2227   echo "$ac_t""yes" 1>&6
2228     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2229   cat >> confdefs.h <<EOF
2230 #define $ac_tr_hdr 1
2231 EOF
2232  
2233 else
2234   echo "$ac_t""no" 1>&6
2235 fi
2236 done
2237
2238
2239 #
2240 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2241 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2242 #
2243 case "$host_os" in
2244     *hpux*)
2245                 cat > conftest.$ac_ext <<EOF
2246 #line 2247 "configure"
2247 #include "confdefs.h"
2248 #include <shadow.h>
2249 int main() {
2250 struct spwd testme
2251 ; return 0; }
2252 EOF
2253 if { (eval echo configure:2254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2254   rm -rf conftest*
2255   ac_cv_header_shadow_h=yes
2256 else
2257   echo "configure: failed program was:" >&5
2258   cat conftest.$ac_ext >&5
2259   rm -rf conftest*
2260   ac_cv_header_shadow_h=no
2261 fi
2262 rm -f conftest*
2263                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2264                    cat >> confdefs.h <<\EOF
2265 #define HAVE_SHADOW_H 1
2266 EOF
2267
2268                 fi
2269         ;;
2270 esac
2271 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2272 do
2273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2275 echo "configure:2276: checking for $ac_hdr" >&5
2276 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2277   echo $ac_n "(cached) $ac_c" 1>&6
2278 else
2279   cat > conftest.$ac_ext <<EOF
2280 #line 2281 "configure"
2281 #include "confdefs.h"
2282 #include <$ac_hdr>
2283 EOF
2284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2285 { (eval echo configure:2286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2287 if test -z "$ac_err"; then
2288   rm -rf conftest*
2289   eval "ac_cv_header_$ac_safe=yes"
2290 else
2291   echo "$ac_err" >&5
2292   echo "configure: failed program was:" >&5
2293   cat conftest.$ac_ext >&5
2294   rm -rf conftest*
2295   eval "ac_cv_header_$ac_safe=no"
2296 fi
2297 rm -f conftest*
2298 fi
2299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2300   echo "$ac_t""yes" 1>&6
2301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2302   cat >> confdefs.h <<EOF
2303 #define $ac_tr_hdr 1
2304 EOF
2305  
2306 else
2307   echo "$ac_t""no" 1>&6
2308 fi
2309 done
2310
2311 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2312 do
2313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2315 echo "configure:2316: checking for $ac_hdr" >&5
2316 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2317   echo $ac_n "(cached) $ac_c" 1>&6
2318 else
2319   cat > conftest.$ac_ext <<EOF
2320 #line 2321 "configure"
2321 #include "confdefs.h"
2322 #include <$ac_hdr>
2323 EOF
2324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2325 { (eval echo configure:2326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2327 if test -z "$ac_err"; then
2328   rm -rf conftest*
2329   eval "ac_cv_header_$ac_safe=yes"
2330 else
2331   echo "$ac_err" >&5
2332   echo "configure: failed program was:" >&5
2333   cat conftest.$ac_ext >&5
2334   rm -rf conftest*
2335   eval "ac_cv_header_$ac_safe=no"
2336 fi
2337 rm -f conftest*
2338 fi
2339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2340   echo "$ac_t""yes" 1>&6
2341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2342   cat >> confdefs.h <<EOF
2343 #define $ac_tr_hdr 1
2344 EOF
2345  
2346 else
2347   echo "$ac_t""no" 1>&6
2348 fi
2349 done
2350
2351 for ac_hdr in stropts.h poll.h
2352 do
2353 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2354 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2355 echo "configure:2356: checking for $ac_hdr" >&5
2356 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2357   echo $ac_n "(cached) $ac_c" 1>&6
2358 else
2359   cat > conftest.$ac_ext <<EOF
2360 #line 2361 "configure"
2361 #include "confdefs.h"
2362 #include <$ac_hdr>
2363 EOF
2364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2365 { (eval echo configure:2366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2367 if test -z "$ac_err"; then
2368   rm -rf conftest*
2369   eval "ac_cv_header_$ac_safe=yes"
2370 else
2371   echo "$ac_err" >&5
2372   echo "configure: failed program was:" >&5
2373   cat conftest.$ac_ext >&5
2374   rm -rf conftest*
2375   eval "ac_cv_header_$ac_safe=no"
2376 fi
2377 rm -f conftest*
2378 fi
2379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2380   echo "$ac_t""yes" 1>&6
2381     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2382   cat >> confdefs.h <<EOF
2383 #define $ac_tr_hdr 1
2384 EOF
2385  
2386 else
2387   echo "$ac_t""no" 1>&6
2388 fi
2389 done
2390
2391 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2392 do
2393 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2394 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2395 echo "configure:2396: checking for $ac_hdr" >&5
2396 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2397   echo $ac_n "(cached) $ac_c" 1>&6
2398 else
2399   cat > conftest.$ac_ext <<EOF
2400 #line 2401 "configure"
2401 #include "confdefs.h"
2402 #include <$ac_hdr>
2403 EOF
2404 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2405 { (eval echo configure:2406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2406 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2407 if test -z "$ac_err"; then
2408   rm -rf conftest*
2409   eval "ac_cv_header_$ac_safe=yes"
2410 else
2411   echo "$ac_err" >&5
2412   echo "configure: failed program was:" >&5
2413   cat conftest.$ac_ext >&5
2414   rm -rf conftest*
2415   eval "ac_cv_header_$ac_safe=no"
2416 fi
2417 rm -f conftest*
2418 fi
2419 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2420   echo "$ac_t""yes" 1>&6
2421     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2422   cat >> confdefs.h <<EOF
2423 #define $ac_tr_hdr 1
2424 EOF
2425  
2426 else
2427   echo "$ac_t""no" 1>&6
2428 fi
2429 done
2430
2431 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2432 do
2433 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2434 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2435 echo "configure:2436: checking for $ac_hdr" >&5
2436 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2437   echo $ac_n "(cached) $ac_c" 1>&6
2438 else
2439   cat > conftest.$ac_ext <<EOF
2440 #line 2441 "configure"
2441 #include "confdefs.h"
2442 #include <$ac_hdr>
2443 EOF
2444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2445 { (eval echo configure:2446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2447 if test -z "$ac_err"; then
2448   rm -rf conftest*
2449   eval "ac_cv_header_$ac_safe=yes"
2450 else
2451   echo "$ac_err" >&5
2452   echo "configure: failed program was:" >&5
2453   cat conftest.$ac_ext >&5
2454   rm -rf conftest*
2455   eval "ac_cv_header_$ac_safe=no"
2456 fi
2457 rm -f conftest*
2458 fi
2459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2460   echo "$ac_t""yes" 1>&6
2461     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2462   cat >> confdefs.h <<EOF
2463 #define $ac_tr_hdr 1
2464 EOF
2465  
2466 else
2467   echo "$ac_t""no" 1>&6
2468 fi
2469 done
2470
2471
2472 # For experimental utmp support (lastlog on some BSD-like systems)
2473 for ac_hdr in utmp.h utmpx.h lastlog.h
2474 do
2475 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2476 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2477 echo "configure:2478: checking for $ac_hdr" >&5
2478 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2479   echo $ac_n "(cached) $ac_c" 1>&6
2480 else
2481   cat > conftest.$ac_ext <<EOF
2482 #line 2483 "configure"
2483 #include "confdefs.h"
2484 #include <$ac_hdr>
2485 EOF
2486 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2487 { (eval echo configure:2488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2488 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2489 if test -z "$ac_err"; then
2490   rm -rf conftest*
2491   eval "ac_cv_header_$ac_safe=yes"
2492 else
2493   echo "$ac_err" >&5
2494   echo "configure: failed program was:" >&5
2495   cat conftest.$ac_ext >&5
2496   rm -rf conftest*
2497   eval "ac_cv_header_$ac_safe=no"
2498 fi
2499 rm -f conftest*
2500 fi
2501 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2502   echo "$ac_t""yes" 1>&6
2503     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2504   cat >> confdefs.h <<EOF
2505 #define $ac_tr_hdr 1
2506 EOF
2507  
2508 else
2509   echo "$ac_t""no" 1>&6
2510 fi
2511 done
2512
2513  
2514 # For quotas on Veritas VxFS filesystems
2515 for ac_hdr in sys/fs/vx_quota.h
2516 do
2517 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2518 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2519 echo "configure:2520: checking for $ac_hdr" >&5
2520 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2521   echo $ac_n "(cached) $ac_c" 1>&6
2522 else
2523   cat > conftest.$ac_ext <<EOF
2524 #line 2525 "configure"
2525 #include "confdefs.h"
2526 #include <$ac_hdr>
2527 EOF
2528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2529 { (eval echo configure:2530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2531 if test -z "$ac_err"; then
2532   rm -rf conftest*
2533   eval "ac_cv_header_$ac_safe=yes"
2534 else
2535   echo "$ac_err" >&5
2536   echo "configure: failed program was:" >&5
2537   cat conftest.$ac_ext >&5
2538   rm -rf conftest*
2539   eval "ac_cv_header_$ac_safe=no"
2540 fi
2541 rm -f conftest*
2542 fi
2543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2544   echo "$ac_t""yes" 1>&6
2545     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2546   cat >> confdefs.h <<EOF
2547 #define $ac_tr_hdr 1
2548 EOF
2549  
2550 else
2551   echo "$ac_t""no" 1>&6
2552 fi
2553 done
2554
2555
2556 # For quotas on Linux XFS filesystems
2557 for ac_hdr in linux/xqm.h
2558 do
2559 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2560 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2561 echo "configure:2562: checking for $ac_hdr" >&5
2562 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2563   echo $ac_n "(cached) $ac_c" 1>&6
2564 else
2565   cat > conftest.$ac_ext <<EOF
2566 #line 2567 "configure"
2567 #include "confdefs.h"
2568 #include <$ac_hdr>
2569 EOF
2570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2571 { (eval echo configure:2572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2573 if test -z "$ac_err"; then
2574   rm -rf conftest*
2575   eval "ac_cv_header_$ac_safe=yes"
2576 else
2577   echo "$ac_err" >&5
2578   echo "configure: failed program was:" >&5
2579   cat conftest.$ac_ext >&5
2580   rm -rf conftest*
2581   eval "ac_cv_header_$ac_safe=no"
2582 fi
2583 rm -f conftest*
2584 fi
2585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2586   echo "$ac_t""yes" 1>&6
2587     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2588   cat >> confdefs.h <<EOF
2589 #define $ac_tr_hdr 1
2590 EOF
2591  
2592 else
2593   echo "$ac_t""no" 1>&6
2594 fi
2595 done
2596
2597
2598 echo $ac_n "checking size of int""... $ac_c" 1>&6
2599 echo "configure:2600: checking size of int" >&5
2600 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2601   echo $ac_n "(cached) $ac_c" 1>&6
2602 else
2603   if test "$cross_compiling" = yes; then
2604   ac_cv_sizeof_int=cross
2605 else
2606   cat > conftest.$ac_ext <<EOF
2607 #line 2608 "configure"
2608 #include "confdefs.h"
2609 #include <stdio.h>
2610 main()
2611 {
2612   FILE *f=fopen("conftestval", "w");
2613   if (!f) exit(1);
2614   fprintf(f, "%d\n", sizeof(int));
2615   exit(0);
2616 }
2617 EOF
2618 if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2619 then
2620   ac_cv_sizeof_int=`cat conftestval`
2621 else
2622   echo "configure: failed program was:" >&5
2623   cat conftest.$ac_ext >&5
2624   rm -fr conftest*
2625   ac_cv_sizeof_int=0
2626 fi
2627 rm -fr conftest*
2628 fi
2629
2630 fi
2631 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2632 cat >> confdefs.h <<EOF
2633 #define SIZEOF_INT $ac_cv_sizeof_int
2634 EOF
2635
2636
2637 echo $ac_n "checking size of long""... $ac_c" 1>&6
2638 echo "configure:2639: checking size of long" >&5
2639 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2640   echo $ac_n "(cached) $ac_c" 1>&6
2641 else
2642   if test "$cross_compiling" = yes; then
2643   ac_cv_sizeof_long=cross
2644 else
2645   cat > conftest.$ac_ext <<EOF
2646 #line 2647 "configure"
2647 #include "confdefs.h"
2648 #include <stdio.h>
2649 main()
2650 {
2651   FILE *f=fopen("conftestval", "w");
2652   if (!f) exit(1);
2653   fprintf(f, "%d\n", sizeof(long));
2654   exit(0);
2655 }
2656 EOF
2657 if { (eval echo configure:2658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2658 then
2659   ac_cv_sizeof_long=`cat conftestval`
2660 else
2661   echo "configure: failed program was:" >&5
2662   cat conftest.$ac_ext >&5
2663   rm -fr conftest*
2664   ac_cv_sizeof_long=0
2665 fi
2666 rm -fr conftest*
2667 fi
2668
2669 fi
2670 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2671 cat >> confdefs.h <<EOF
2672 #define SIZEOF_LONG $ac_cv_sizeof_long
2673 EOF
2674
2675
2676 echo $ac_n "checking size of short""... $ac_c" 1>&6
2677 echo "configure:2678: checking size of short" >&5
2678 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2679   echo $ac_n "(cached) $ac_c" 1>&6
2680 else
2681   if test "$cross_compiling" = yes; then
2682   ac_cv_sizeof_short=cross
2683 else
2684   cat > conftest.$ac_ext <<EOF
2685 #line 2686 "configure"
2686 #include "confdefs.h"
2687 #include <stdio.h>
2688 main()
2689 {
2690   FILE *f=fopen("conftestval", "w");
2691   if (!f) exit(1);
2692   fprintf(f, "%d\n", sizeof(short));
2693   exit(0);
2694 }
2695 EOF
2696 if { (eval echo configure:2697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2697 then
2698   ac_cv_sizeof_short=`cat conftestval`
2699 else
2700   echo "configure: failed program was:" >&5
2701   cat conftest.$ac_ext >&5
2702   rm -fr conftest*
2703   ac_cv_sizeof_short=0
2704 fi
2705 rm -fr conftest*
2706 fi
2707
2708 fi
2709 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2710 cat >> confdefs.h <<EOF
2711 #define SIZEOF_SHORT $ac_cv_sizeof_short
2712 EOF
2713
2714
2715
2716 echo $ac_n "checking for working const""... $ac_c" 1>&6
2717 echo "configure:2718: checking for working const" >&5
2718 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2719   echo $ac_n "(cached) $ac_c" 1>&6
2720 else
2721   cat > conftest.$ac_ext <<EOF
2722 #line 2723 "configure"
2723 #include "confdefs.h"
2724
2725 int main() {
2726
2727 /* Ultrix mips cc rejects this.  */
2728 typedef int charset[2]; const charset x;
2729 /* SunOS 4.1.1 cc rejects this.  */
2730 char const *const *ccp;
2731 char **p;
2732 /* NEC SVR4.0.2 mips cc rejects this.  */
2733 struct point {int x, y;};
2734 static struct point const zero = {0,0};
2735 /* AIX XL C 1.02.0.0 rejects this.
2736    It does not let you subtract one const X* pointer from another in an arm
2737    of an if-expression whose if-part is not a constant expression */
2738 const char *g = "string";
2739 ccp = &g + (g ? g-g : 0);
2740 /* HPUX 7.0 cc rejects these. */
2741 ++ccp;
2742 p = (char**) ccp;
2743 ccp = (char const *const *) p;
2744 { /* SCO 3.2v4 cc rejects this.  */
2745   char *t;
2746   char const *s = 0 ? (char *) 0 : (char const *) 0;
2747
2748   *t++ = 0;
2749 }
2750 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2751   int x[] = {25, 17};
2752   const int *foo = &x[0];
2753   ++foo;
2754 }
2755 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2756   typedef const int *iptr;
2757   iptr p = 0;
2758   ++p;
2759 }
2760 { /* AIX XL C 1.02.0.0 rejects this saying
2761      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2762   struct s { int j; const int *ap[3]; };
2763   struct s *b; b->j = 5;
2764 }
2765 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2766   const int foo = 10;
2767 }
2768
2769 ; return 0; }
2770 EOF
2771 if { (eval echo configure:2772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2772   rm -rf conftest*
2773   ac_cv_c_const=yes
2774 else
2775   echo "configure: failed program was:" >&5
2776   cat conftest.$ac_ext >&5
2777   rm -rf conftest*
2778   ac_cv_c_const=no
2779 fi
2780 rm -f conftest*
2781 fi
2782
2783 echo "$ac_t""$ac_cv_c_const" 1>&6
2784 if test $ac_cv_c_const = no; then
2785   cat >> confdefs.h <<\EOF
2786 #define const 
2787 EOF
2788
2789 fi
2790
2791 echo $ac_n "checking for inline""... $ac_c" 1>&6
2792 echo "configure:2793: checking for inline" >&5
2793 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2794   echo $ac_n "(cached) $ac_c" 1>&6
2795 else
2796   ac_cv_c_inline=no
2797 for ac_kw in inline __inline__ __inline; do
2798   cat > conftest.$ac_ext <<EOF
2799 #line 2800 "configure"
2800 #include "confdefs.h"
2801
2802 int main() {
2803 } $ac_kw foo() {
2804 ; return 0; }
2805 EOF
2806 if { (eval echo configure:2807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2807   rm -rf conftest*
2808   ac_cv_c_inline=$ac_kw; break
2809 else
2810   echo "configure: failed program was:" >&5
2811   cat conftest.$ac_ext >&5
2812 fi
2813 rm -f conftest*
2814 done
2815
2816 fi
2817
2818 echo "$ac_t""$ac_cv_c_inline" 1>&6
2819 case "$ac_cv_c_inline" in
2820   inline | yes) ;;
2821   no) cat >> confdefs.h <<\EOF
2822 #define inline 
2823 EOF
2824  ;;
2825   *)  cat >> confdefs.h <<EOF
2826 #define inline $ac_cv_c_inline
2827 EOF
2828  ;;
2829 esac
2830
2831 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2832 echo "configure:2833: checking whether byte ordering is bigendian" >&5
2833 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2834   echo $ac_n "(cached) $ac_c" 1>&6
2835 else
2836   ac_cv_c_bigendian=unknown
2837 # See if sys/param.h defines the BYTE_ORDER macro.
2838 cat > conftest.$ac_ext <<EOF
2839 #line 2840 "configure"
2840 #include "confdefs.h"
2841 #include <sys/types.h>
2842 #include <sys/param.h>
2843 int main() {
2844
2845 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2846  bogus endian macros
2847 #endif
2848 ; return 0; }
2849 EOF
2850 if { (eval echo configure:2851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2851   rm -rf conftest*
2852   # It does; now see whether it defined to BIG_ENDIAN or not.
2853 cat > conftest.$ac_ext <<EOF
2854 #line 2855 "configure"
2855 #include "confdefs.h"
2856 #include <sys/types.h>
2857 #include <sys/param.h>
2858 int main() {
2859
2860 #if BYTE_ORDER != BIG_ENDIAN
2861  not big endian
2862 #endif
2863 ; return 0; }
2864 EOF
2865 if { (eval echo configure:2866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2866   rm -rf conftest*
2867   ac_cv_c_bigendian=yes
2868 else
2869   echo "configure: failed program was:" >&5
2870   cat conftest.$ac_ext >&5
2871   rm -rf conftest*
2872   ac_cv_c_bigendian=no
2873 fi
2874 rm -f conftest*
2875 else
2876   echo "configure: failed program was:" >&5
2877   cat conftest.$ac_ext >&5
2878 fi
2879 rm -f conftest*
2880 if test $ac_cv_c_bigendian = unknown; then
2881 if test "$cross_compiling" = yes; then
2882     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2883 else
2884   cat > conftest.$ac_ext <<EOF
2885 #line 2886 "configure"
2886 #include "confdefs.h"
2887 main () {
2888   /* Are we little or big endian?  From Harbison&Steele.  */
2889   union
2890   {
2891     long l;
2892     char c[sizeof (long)];
2893   } u;
2894   u.l = 1;
2895   exit (u.c[sizeof (long) - 1] == 1);
2896 }
2897 EOF
2898 if { (eval echo configure:2899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2899 then
2900   ac_cv_c_bigendian=no
2901 else
2902   echo "configure: failed program was:" >&5
2903   cat conftest.$ac_ext >&5
2904   rm -fr conftest*
2905   ac_cv_c_bigendian=yes
2906 fi
2907 rm -fr conftest*
2908 fi
2909
2910 fi
2911 fi
2912
2913 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2914 if test $ac_cv_c_bigendian = yes; then
2915   cat >> confdefs.h <<\EOF
2916 #define WORDS_BIGENDIAN 1
2917 EOF
2918
2919 fi
2920
2921 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2922 echo "configure:2923: checking whether char is unsigned" >&5
2923 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2924   echo $ac_n "(cached) $ac_c" 1>&6
2925 else
2926   if test "$GCC" = yes; then
2927   # GCC predefines this symbol on systems where it applies.
2928 cat > conftest.$ac_ext <<EOF
2929 #line 2930 "configure"
2930 #include "confdefs.h"
2931 #ifdef __CHAR_UNSIGNED__
2932   yes
2933 #endif
2934
2935 EOF
2936 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2937   egrep "yes" >/dev/null 2>&1; then
2938   rm -rf conftest*
2939   ac_cv_c_char_unsigned=yes
2940 else
2941   rm -rf conftest*
2942   ac_cv_c_char_unsigned=no
2943 fi
2944 rm -f conftest*
2945
2946 else
2947 if test "$cross_compiling" = yes; then
2948     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2949 else
2950   cat > conftest.$ac_ext <<EOF
2951 #line 2952 "configure"
2952 #include "confdefs.h"
2953 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2954 #if !defined(__STDC__) || __STDC__ != 1
2955 #define volatile
2956 #endif
2957 main() {
2958   volatile char c = 255; exit(c < 0);
2959 }
2960 EOF
2961 if { (eval echo configure:2962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2962 then
2963   ac_cv_c_char_unsigned=yes
2964 else
2965   echo "configure: failed program was:" >&5
2966   cat conftest.$ac_ext >&5
2967   rm -fr conftest*
2968   ac_cv_c_char_unsigned=no
2969 fi
2970 rm -fr conftest*
2971 fi
2972
2973 fi
2974 fi
2975
2976 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2977 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2978   cat >> confdefs.h <<\EOF
2979 #define __CHAR_UNSIGNED__ 1
2980 EOF
2981
2982 fi
2983
2984
2985 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2986 echo "configure:2987: checking return type of signal handlers" >&5
2987 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2988   echo $ac_n "(cached) $ac_c" 1>&6
2989 else
2990   cat > conftest.$ac_ext <<EOF
2991 #line 2992 "configure"
2992 #include "confdefs.h"
2993 #include <sys/types.h>
2994 #include <signal.h>
2995 #ifdef signal
2996 #undef signal
2997 #endif
2998 #ifdef __cplusplus
2999 extern "C" void (*signal (int, void (*)(int)))(int);
3000 #else
3001 void (*signal ()) ();
3002 #endif
3003
3004 int main() {
3005 int i;
3006 ; return 0; }
3007 EOF
3008 if { (eval echo configure:3009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3009   rm -rf conftest*
3010   ac_cv_type_signal=void
3011 else
3012   echo "configure: failed program was:" >&5
3013   cat conftest.$ac_ext >&5
3014   rm -rf conftest*
3015   ac_cv_type_signal=int
3016 fi
3017 rm -f conftest*
3018 fi
3019
3020 echo "$ac_t""$ac_cv_type_signal" 1>&6
3021 cat >> confdefs.h <<EOF
3022 #define RETSIGTYPE $ac_cv_type_signal
3023 EOF
3024
3025
3026 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3027 echo "configure:3028: checking for uid_t in sys/types.h" >&5
3028 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3029   echo $ac_n "(cached) $ac_c" 1>&6
3030 else
3031   cat > conftest.$ac_ext <<EOF
3032 #line 3033 "configure"
3033 #include "confdefs.h"
3034 #include <sys/types.h>
3035 EOF
3036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3037   egrep "uid_t" >/dev/null 2>&1; then
3038   rm -rf conftest*
3039   ac_cv_type_uid_t=yes
3040 else
3041   rm -rf conftest*
3042   ac_cv_type_uid_t=no
3043 fi
3044 rm -f conftest*
3045
3046 fi
3047
3048 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3049 if test $ac_cv_type_uid_t = no; then
3050   cat >> confdefs.h <<\EOF
3051 #define uid_t int
3052 EOF
3053
3054   cat >> confdefs.h <<\EOF
3055 #define gid_t int
3056 EOF
3057
3058 fi
3059
3060 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3061 echo "configure:3062: checking for mode_t" >&5
3062 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3063   echo $ac_n "(cached) $ac_c" 1>&6
3064 else
3065   cat > conftest.$ac_ext <<EOF
3066 #line 3067 "configure"
3067 #include "confdefs.h"
3068 #include <sys/types.h>
3069 #if STDC_HEADERS
3070 #include <stdlib.h>
3071 #include <stddef.h>
3072 #endif
3073 EOF
3074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3075   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3076   rm -rf conftest*
3077   ac_cv_type_mode_t=yes
3078 else
3079   rm -rf conftest*
3080   ac_cv_type_mode_t=no
3081 fi
3082 rm -f conftest*
3083
3084 fi
3085 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3086 if test $ac_cv_type_mode_t = no; then
3087   cat >> confdefs.h <<\EOF
3088 #define mode_t int
3089 EOF
3090
3091 fi
3092
3093 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3094 echo "configure:3095: checking for off_t" >&5
3095 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3096   echo $ac_n "(cached) $ac_c" 1>&6
3097 else
3098   cat > conftest.$ac_ext <<EOF
3099 #line 3100 "configure"
3100 #include "confdefs.h"
3101 #include <sys/types.h>
3102 #if STDC_HEADERS
3103 #include <stdlib.h>
3104 #include <stddef.h>
3105 #endif
3106 EOF
3107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3108   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3109   rm -rf conftest*
3110   ac_cv_type_off_t=yes
3111 else
3112   rm -rf conftest*
3113   ac_cv_type_off_t=no
3114 fi
3115 rm -f conftest*
3116
3117 fi
3118 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3119 if test $ac_cv_type_off_t = no; then
3120   cat >> confdefs.h <<\EOF
3121 #define off_t long
3122 EOF
3123
3124 fi
3125
3126 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3127 echo "configure:3128: checking for size_t" >&5
3128 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3129   echo $ac_n "(cached) $ac_c" 1>&6
3130 else
3131   cat > conftest.$ac_ext <<EOF
3132 #line 3133 "configure"
3133 #include "confdefs.h"
3134 #include <sys/types.h>
3135 #if STDC_HEADERS
3136 #include <stdlib.h>
3137 #include <stddef.h>
3138 #endif
3139 EOF
3140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3141   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3142   rm -rf conftest*
3143   ac_cv_type_size_t=yes
3144 else
3145   rm -rf conftest*
3146   ac_cv_type_size_t=no
3147 fi
3148 rm -f conftest*
3149
3150 fi
3151 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3152 if test $ac_cv_type_size_t = no; then
3153   cat >> confdefs.h <<\EOF
3154 #define size_t unsigned
3155 EOF
3156
3157 fi
3158
3159 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3160 echo "configure:3161: checking for pid_t" >&5
3161 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3162   echo $ac_n "(cached) $ac_c" 1>&6
3163 else
3164   cat > conftest.$ac_ext <<EOF
3165 #line 3166 "configure"
3166 #include "confdefs.h"
3167 #include <sys/types.h>
3168 #if STDC_HEADERS
3169 #include <stdlib.h>
3170 #include <stddef.h>
3171 #endif
3172 EOF
3173 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3174   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3175   rm -rf conftest*
3176   ac_cv_type_pid_t=yes
3177 else
3178   rm -rf conftest*
3179   ac_cv_type_pid_t=no
3180 fi
3181 rm -f conftest*
3182
3183 fi
3184 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3185 if test $ac_cv_type_pid_t = no; then
3186   cat >> confdefs.h <<\EOF
3187 #define pid_t int
3188 EOF
3189
3190 fi
3191
3192 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3193 echo "configure:3194: checking for st_rdev in struct stat" >&5
3194 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3195   echo $ac_n "(cached) $ac_c" 1>&6
3196 else
3197   cat > conftest.$ac_ext <<EOF
3198 #line 3199 "configure"
3199 #include "confdefs.h"
3200 #include <sys/types.h>
3201 #include <sys/stat.h>
3202 int main() {
3203 struct stat s; s.st_rdev;
3204 ; return 0; }
3205 EOF
3206 if { (eval echo configure:3207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3207   rm -rf conftest*
3208   ac_cv_struct_st_rdev=yes
3209 else
3210   echo "configure: failed program was:" >&5
3211   cat conftest.$ac_ext >&5
3212   rm -rf conftest*
3213   ac_cv_struct_st_rdev=no
3214 fi
3215 rm -f conftest*
3216 fi
3217
3218 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3219 if test $ac_cv_struct_st_rdev = yes; then
3220   cat >> confdefs.h <<\EOF
3221 #define HAVE_ST_RDEV 1
3222 EOF
3223
3224 fi
3225
3226 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3227 echo "configure:3228: checking for d_off in dirent" >&5
3228 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3229   echo $ac_n "(cached) $ac_c" 1>&6
3230 else
3231   cat > conftest.$ac_ext <<EOF
3232 #line 3233 "configure"
3233 #include "confdefs.h"
3234
3235 #include <unistd.h>
3236 #include <sys/types.h>
3237 #include <dirent.h>
3238 int main() {
3239 struct dirent d; d.d_off;
3240 ; return 0; }
3241 EOF
3242 if { (eval echo configure:3243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3243   rm -rf conftest*
3244   ac_cv_dirent_d_off=yes
3245 else
3246   echo "configure: failed program was:" >&5
3247   cat conftest.$ac_ext >&5
3248   rm -rf conftest*
3249   ac_cv_dirent_d_off=no
3250 fi
3251 rm -f conftest*
3252 fi
3253
3254 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3255 if test $ac_cv_dirent_d_off = yes; then
3256   cat >> confdefs.h <<\EOF
3257 #define HAVE_DIRENT_D_OFF 1
3258 EOF
3259
3260 fi
3261
3262 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3263 echo "configure:3264: checking for ino_t" >&5
3264 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3265   echo $ac_n "(cached) $ac_c" 1>&6
3266 else
3267   cat > conftest.$ac_ext <<EOF
3268 #line 3269 "configure"
3269 #include "confdefs.h"
3270 #include <sys/types.h>
3271 #if STDC_HEADERS
3272 #include <stdlib.h>
3273 #include <stddef.h>
3274 #endif
3275 EOF
3276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3277   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3278   rm -rf conftest*
3279   ac_cv_type_ino_t=yes
3280 else
3281   rm -rf conftest*
3282   ac_cv_type_ino_t=no
3283 fi
3284 rm -f conftest*
3285
3286 fi
3287 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3288 if test $ac_cv_type_ino_t = no; then
3289   cat >> confdefs.h <<\EOF
3290 #define ino_t unsigned
3291 EOF
3292
3293 fi
3294
3295 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3296 echo "configure:3297: checking for loff_t" >&5
3297 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3298   echo $ac_n "(cached) $ac_c" 1>&6
3299 else
3300   cat > conftest.$ac_ext <<EOF
3301 #line 3302 "configure"
3302 #include "confdefs.h"
3303 #include <sys/types.h>
3304 #if STDC_HEADERS
3305 #include <stdlib.h>
3306 #include <stddef.h>
3307 #endif
3308 EOF
3309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3310   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3311   rm -rf conftest*
3312   ac_cv_type_loff_t=yes
3313 else
3314   rm -rf conftest*
3315   ac_cv_type_loff_t=no
3316 fi
3317 rm -f conftest*
3318
3319 fi
3320 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3321 if test $ac_cv_type_loff_t = no; then
3322   cat >> confdefs.h <<\EOF
3323 #define loff_t off_t
3324 EOF
3325
3326 fi
3327
3328 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3329 echo "configure:3330: checking for offset_t" >&5
3330 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3331   echo $ac_n "(cached) $ac_c" 1>&6
3332 else
3333   cat > conftest.$ac_ext <<EOF
3334 #line 3335 "configure"
3335 #include "confdefs.h"
3336 #include <sys/types.h>
3337 #if STDC_HEADERS
3338 #include <stdlib.h>
3339 #include <stddef.h>
3340 #endif
3341 EOF
3342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3343   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3344   rm -rf conftest*
3345   ac_cv_type_offset_t=yes
3346 else
3347   rm -rf conftest*
3348   ac_cv_type_offset_t=no
3349 fi
3350 rm -f conftest*
3351
3352 fi
3353 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3354 if test $ac_cv_type_offset_t = no; then
3355   cat >> confdefs.h <<\EOF
3356 #define offset_t loff_t
3357 EOF
3358
3359 fi
3360
3361 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3362 echo "configure:3363: checking for ssize_t" >&5
3363 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3364   echo $ac_n "(cached) $ac_c" 1>&6
3365 else
3366   cat > conftest.$ac_ext <<EOF
3367 #line 3368 "configure"
3368 #include "confdefs.h"
3369 #include <sys/types.h>
3370 #if STDC_HEADERS
3371 #include <stdlib.h>
3372 #include <stddef.h>
3373 #endif
3374 EOF
3375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3376   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3377   rm -rf conftest*
3378   ac_cv_type_ssize_t=yes
3379 else
3380   rm -rf conftest*
3381   ac_cv_type_ssize_t=no
3382 fi
3383 rm -f conftest*
3384
3385 fi
3386 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3387 if test $ac_cv_type_ssize_t = no; then
3388   cat >> confdefs.h <<\EOF
3389 #define ssize_t int
3390 EOF
3391
3392 fi
3393
3394 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3395 echo "configure:3396: checking for wchar_t" >&5
3396 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3397   echo $ac_n "(cached) $ac_c" 1>&6
3398 else
3399   cat > conftest.$ac_ext <<EOF
3400 #line 3401 "configure"
3401 #include "confdefs.h"
3402 #include <sys/types.h>
3403 #if STDC_HEADERS
3404 #include <stdlib.h>
3405 #include <stddef.h>
3406 #endif
3407 EOF
3408 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3409   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3410   rm -rf conftest*
3411   ac_cv_type_wchar_t=yes
3412 else
3413   rm -rf conftest*
3414   ac_cv_type_wchar_t=no
3415 fi
3416 rm -f conftest*
3417
3418 fi
3419 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3420 if test $ac_cv_type_wchar_t = no; then
3421   cat >> confdefs.h <<\EOF
3422 #define wchar_t unsigned short
3423 EOF
3424
3425 fi
3426
3427
3428 ############################################
3429 # for cups support we need libcups, and a handful of header files
3430
3431 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3432 echo "configure:3433: checking for httpConnect in -lcups" >&5
3433 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3434 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3435   echo $ac_n "(cached) $ac_c" 1>&6
3436 else
3437   ac_save_LIBS="$LIBS"
3438 LIBS="-lcups  $LIBS"
3439 cat > conftest.$ac_ext <<EOF
3440 #line 3441 "configure"
3441 #include "confdefs.h"
3442 /* Override any gcc2 internal prototype to avoid an error.  */
3443 /* We use char because int might match the return type of a gcc2
3444     builtin and then its argument prototype would still apply.  */
3445 char httpConnect();
3446
3447 int main() {
3448 httpConnect()
3449 ; return 0; }
3450 EOF
3451 if { (eval echo configure:3452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3452   rm -rf conftest*
3453   eval "ac_cv_lib_$ac_lib_var=yes"
3454 else
3455   echo "configure: failed program was:" >&5
3456   cat conftest.$ac_ext >&5
3457   rm -rf conftest*
3458   eval "ac_cv_lib_$ac_lib_var=no"
3459 fi
3460 rm -f conftest*
3461 LIBS="$ac_save_LIBS"
3462
3463 fi
3464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3465   echo "$ac_t""yes" 1>&6
3466     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3467     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3468   cat >> confdefs.h <<EOF
3469 #define $ac_tr_lib 1
3470 EOF
3471
3472   LIBS="-lcups $LIBS"
3473
3474 else
3475   echo "$ac_t""no" 1>&6
3476 fi
3477
3478
3479 # I wonder if there is a nicer way of doing this?
3480
3481 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3482         for ac_hdr in cups/cups.h cups/language.h
3483 do
3484 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3485 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3486 echo "configure:3487: checking for $ac_hdr" >&5
3487 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3488   echo $ac_n "(cached) $ac_c" 1>&6
3489 else
3490   cat > conftest.$ac_ext <<EOF
3491 #line 3492 "configure"
3492 #include "confdefs.h"
3493 #include <$ac_hdr>
3494 EOF
3495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3496 { (eval echo configure:3497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3498 if test -z "$ac_err"; then
3499   rm -rf conftest*
3500   eval "ac_cv_header_$ac_safe=yes"
3501 else
3502   echo "$ac_err" >&5
3503   echo "configure: failed program was:" >&5
3504   cat conftest.$ac_ext >&5
3505   rm -rf conftest*
3506   eval "ac_cv_header_$ac_safe=no"
3507 fi
3508 rm -f conftest*
3509 fi
3510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3511   echo "$ac_t""yes" 1>&6
3512     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3513   cat >> confdefs.h <<EOF
3514 #define $ac_tr_hdr 1
3515 EOF
3516  
3517 else
3518   echo "$ac_t""no" 1>&6
3519 fi
3520 done
3521
3522         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3523                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3524                         cat >> confdefs.h <<\EOF
3525 #define HAVE_CUPS 1
3526 EOF
3527
3528                 fi
3529         fi
3530 fi
3531
3532 ############################################
3533 # we need libdl for PAM and the new VFS code
3534 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3535 echo "configure:3536: checking for dlopen in -ldl" >&5
3536 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3537 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3538   echo $ac_n "(cached) $ac_c" 1>&6
3539 else
3540   ac_save_LIBS="$LIBS"
3541 LIBS="-ldl  $LIBS"
3542 cat > conftest.$ac_ext <<EOF
3543 #line 3544 "configure"
3544 #include "confdefs.h"
3545 /* Override any gcc2 internal prototype to avoid an error.  */
3546 /* We use char because int might match the return type of a gcc2
3547     builtin and then its argument prototype would still apply.  */
3548 char dlopen();
3549
3550 int main() {
3551 dlopen()
3552 ; return 0; }
3553 EOF
3554 if { (eval echo configure:3555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3555   rm -rf conftest*
3556   eval "ac_cv_lib_$ac_lib_var=yes"
3557 else
3558   echo "configure: failed program was:" >&5
3559   cat conftest.$ac_ext >&5
3560   rm -rf conftest*
3561   eval "ac_cv_lib_$ac_lib_var=no"
3562 fi
3563 rm -f conftest*
3564 LIBS="$ac_save_LIBS"
3565
3566 fi
3567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3568   echo "$ac_t""yes" 1>&6
3569   LIBS="$LIBS -ldl";
3570         cat >> confdefs.h <<\EOF
3571 #define HAVE_LIBDL 1
3572 EOF
3573
3574 else
3575   echo "$ac_t""no" 1>&6
3576 fi
3577
3578
3579 ############################################
3580 # check if the compiler can do immediate structures
3581 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3582 echo "configure:3583: checking for immediate structures" >&5
3583 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3584   echo $ac_n "(cached) $ac_c" 1>&6
3585 else
3586   
3587     cat > conftest.$ac_ext <<EOF
3588 #line 3589 "configure"
3589 #include "confdefs.h"
3590
3591 #include <stdio.h>
3592 int main() {
3593
3594    typedef struct {unsigned x;} FOOBAR;
3595    #define X_FOOBAR(x) ((FOOBAR) { x })
3596    #define FOO_ONE X_FOOBAR(1)
3597    FOOBAR f = FOO_ONE;   
3598    static struct {
3599         FOOBAR y; 
3600         } f2[] = {
3601                 {FOO_ONE}
3602         };   
3603
3604 ; return 0; }
3605 EOF
3606 if { (eval echo configure:3607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3607   rm -rf conftest*
3608   samba_cv_immediate_structures=yes
3609 else
3610   echo "configure: failed program was:" >&5
3611   cat conftest.$ac_ext >&5
3612   rm -rf conftest*
3613   samba_cv_immediate_structures=no
3614 fi
3615 rm -f conftest*
3616 fi
3617
3618 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3619 if test x"$samba_cv_immediate_structures" = x"yes"; then
3620    cat >> confdefs.h <<\EOF
3621 #define HAVE_IMMEDIATE_STRUCTURES 1
3622 EOF
3623
3624 fi
3625
3626 ############################################
3627 # check for unix domain sockets
3628 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3629 echo "configure:3630: checking for unix domain sockets" >&5
3630 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3631   echo $ac_n "(cached) $ac_c" 1>&6
3632 else
3633   
3634     cat > conftest.$ac_ext <<EOF
3635 #line 3636 "configure"
3636 #include "confdefs.h"
3637
3638 #include <sys/types.h>
3639 #include <stdlib.h>
3640 #include <stddef.h>
3641 #include <sys/socket.h>
3642 #include <sys/un.h>
3643 int main() {
3644
3645   struct sockaddr_un sunaddr; 
3646   sunaddr.sun_family = AF_UNIX;
3647
3648 ; return 0; }
3649 EOF
3650 if { (eval echo configure:3651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3651   rm -rf conftest*
3652   samba_cv_unixsocket=yes
3653 else
3654   echo "configure: failed program was:" >&5
3655   cat conftest.$ac_ext >&5
3656   rm -rf conftest*
3657   samba_cv_unixsocket=no
3658 fi
3659 rm -f conftest*
3660 fi
3661
3662 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3663 if test x"$samba_cv_unixsocket" = x"yes"; then
3664    cat >> confdefs.h <<\EOF
3665 #define HAVE_UNIXSOCKET 1
3666 EOF
3667
3668 fi
3669
3670
3671 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3672 echo "configure:3673: checking for socklen_t type" >&5
3673 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3674   echo $ac_n "(cached) $ac_c" 1>&6
3675 else
3676   
3677     cat > conftest.$ac_ext <<EOF
3678 #line 3679 "configure"
3679 #include "confdefs.h"
3680
3681 #include <sys/types.h>
3682 #if STDC_HEADERS
3683 #include <stdlib.h>
3684 #include <stddef.h>
3685 #endif
3686 #include <sys/socket.h>
3687 int main() {
3688 socklen_t i = 0
3689 ; return 0; }
3690 EOF
3691 if { (eval echo configure:3692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3692   rm -rf conftest*
3693   samba_cv_socklen_t=yes
3694 else
3695   echo "configure: failed program was:" >&5
3696   cat conftest.$ac_ext >&5
3697   rm -rf conftest*
3698   samba_cv_socklen_t=no
3699 fi
3700 rm -f conftest*
3701 fi
3702
3703 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3704 if test x"$samba_cv_socklen_t" = x"yes"; then
3705    cat >> confdefs.h <<\EOF
3706 #define HAVE_SOCKLEN_T_TYPE 1
3707 EOF
3708
3709 fi
3710
3711 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3712 echo "configure:3713: checking for sig_atomic_t type" >&5
3713 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3714   echo $ac_n "(cached) $ac_c" 1>&6
3715 else
3716   
3717     cat > conftest.$ac_ext <<EOF
3718 #line 3719 "configure"
3719 #include "confdefs.h"
3720
3721 #include <sys/types.h>
3722 #if STDC_HEADERS
3723 #include <stdlib.h>
3724 #include <stddef.h>
3725 #endif
3726 #include <signal.h>
3727 int main() {
3728 sig_atomic_t i = 0
3729 ; return 0; }
3730 EOF
3731 if { (eval echo configure:3732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3732   rm -rf conftest*
3733   samba_cv_sig_atomic_t=yes
3734 else
3735   echo "configure: failed program was:" >&5
3736   cat conftest.$ac_ext >&5
3737   rm -rf conftest*
3738   samba_cv_sig_atomic_t=no
3739 fi
3740 rm -f conftest*
3741 fi
3742
3743 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3744 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3745    cat >> confdefs.h <<\EOF
3746 #define HAVE_SIG_ATOMIC_T_TYPE 1
3747 EOF
3748
3749 fi
3750
3751 # stupid headers have the functions but no declaration. grrrr.
3752
3753  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3754 echo "configure:3755: checking for errno declaration" >&5
3755 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3756   echo $ac_n "(cached) $ac_c" 1>&6
3757 else
3758   
3759     cat > conftest.$ac_ext <<EOF
3760 #line 3761 "configure"
3761 #include "confdefs.h"
3762 #include <errno.h>
3763 int main() {
3764 int i = (int)errno
3765 ; return 0; }
3766 EOF
3767 if { (eval echo configure:3768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3768   rm -rf conftest*
3769   ac_cv_have_errno_decl=yes
3770 else
3771   echo "configure: failed program was:" >&5
3772   cat conftest.$ac_ext >&5
3773   rm -rf conftest*
3774   ac_cv_have_errno_decl=no
3775 fi
3776 rm -f conftest*
3777 fi
3778
3779 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3780  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3781     cat >> confdefs.h <<\EOF
3782 #define HAVE_ERRNO_DECL 1
3783 EOF
3784
3785  fi
3786
3787
3788  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3789 echo "configure:3790: checking for setresuid declaration" >&5
3790 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3791   echo $ac_n "(cached) $ac_c" 1>&6
3792 else
3793   
3794     cat > conftest.$ac_ext <<EOF
3795 #line 3796 "configure"
3796 #include "confdefs.h"
3797 #include <unistd.h>
3798 int main() {
3799 int i = (int)setresuid
3800 ; return 0; }
3801 EOF
3802 if { (eval echo configure:3803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3803   rm -rf conftest*
3804   ac_cv_have_setresuid_decl=yes
3805 else
3806   echo "configure: failed program was:" >&5
3807   cat conftest.$ac_ext >&5
3808   rm -rf conftest*
3809   ac_cv_have_setresuid_decl=no
3810 fi
3811 rm -f conftest*
3812 fi
3813
3814 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3815  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3816     cat >> confdefs.h <<\EOF
3817 #define HAVE_SETRESUID_DECL 1
3818 EOF
3819
3820  fi
3821
3822
3823  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3824 echo "configure:3825: checking for setresgid declaration" >&5
3825 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3826   echo $ac_n "(cached) $ac_c" 1>&6
3827 else
3828   
3829     cat > conftest.$ac_ext <<EOF
3830 #line 3831 "configure"
3831 #include "confdefs.h"
3832 #include <unistd.h>
3833 int main() {
3834 int i = (int)setresgid
3835 ; return 0; }
3836 EOF
3837 if { (eval echo configure:3838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3838   rm -rf conftest*
3839   ac_cv_have_setresgid_decl=yes
3840 else
3841   echo "configure: failed program was:" >&5
3842   cat conftest.$ac_ext >&5
3843   rm -rf conftest*
3844   ac_cv_have_setresgid_decl=no
3845 fi
3846 rm -f conftest*
3847 fi
3848
3849 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3850  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3851     cat >> confdefs.h <<\EOF
3852 #define HAVE_SETRESGID_DECL 1
3853 EOF
3854
3855  fi
3856
3857
3858  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3859 echo "configure:3860: checking for asprintf declaration" >&5
3860 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3861   echo $ac_n "(cached) $ac_c" 1>&6
3862 else
3863   
3864     cat > conftest.$ac_ext <<EOF
3865 #line 3866 "configure"
3866 #include "confdefs.h"
3867 #include <stdio.h>
3868 int main() {
3869 int i = (int)asprintf
3870 ; return 0; }
3871 EOF
3872 if { (eval echo configure:3873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3873   rm -rf conftest*
3874   ac_cv_have_asprintf_decl=yes
3875 else
3876   echo "configure: failed program was:" >&5
3877   cat conftest.$ac_ext >&5
3878   rm -rf conftest*
3879   ac_cv_have_asprintf_decl=no
3880 fi
3881 rm -f conftest*
3882 fi
3883
3884 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3885  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3886     cat >> confdefs.h <<\EOF
3887 #define HAVE_ASPRINTF_DECL 1
3888 EOF
3889
3890  fi
3891
3892
3893  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3894 echo "configure:3895: checking for vasprintf declaration" >&5
3895 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3896   echo $ac_n "(cached) $ac_c" 1>&6
3897 else
3898   
3899     cat > conftest.$ac_ext <<EOF
3900 #line 3901 "configure"
3901 #include "confdefs.h"
3902 #include <stdio.h>
3903 int main() {
3904 int i = (int)vasprintf
3905 ; return 0; }
3906 EOF
3907 if { (eval echo configure:3908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3908   rm -rf conftest*
3909   ac_cv_have_vasprintf_decl=yes
3910 else
3911   echo "configure: failed program was:" >&5
3912   cat conftest.$ac_ext >&5
3913   rm -rf conftest*
3914   ac_cv_have_vasprintf_decl=no
3915 fi
3916 rm -f conftest*
3917 fi
3918
3919 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3920  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3921     cat >> confdefs.h <<\EOF
3922 #define HAVE_VASPRINTF_DECL 1
3923 EOF
3924
3925  fi
3926
3927
3928  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3929 echo "configure:3930: checking for vsnprintf declaration" >&5
3930 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3931   echo $ac_n "(cached) $ac_c" 1>&6
3932 else
3933   
3934     cat > conftest.$ac_ext <<EOF
3935 #line 3936 "configure"
3936 #include "confdefs.h"
3937 #include <stdio.h>
3938 int main() {
3939 int i = (int)vsnprintf
3940 ; return 0; }
3941 EOF
3942 if { (eval echo configure:3943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3943   rm -rf conftest*
3944   ac_cv_have_vsnprintf_decl=yes
3945 else
3946   echo "configure: failed program was:" >&5
3947   cat conftest.$ac_ext >&5
3948   rm -rf conftest*
3949   ac_cv_have_vsnprintf_decl=no
3950 fi
3951 rm -f conftest*
3952 fi
3953
3954 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3955  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3956     cat >> confdefs.h <<\EOF
3957 #define HAVE_VSNPRINTF_DECL 1
3958 EOF
3959
3960  fi
3961
3962
3963  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3964 echo "configure:3965: checking for snprintf declaration" >&5
3965 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3966   echo $ac_n "(cached) $ac_c" 1>&6
3967 else
3968   
3969     cat > conftest.$ac_ext <<EOF
3970 #line 3971 "configure"
3971 #include "confdefs.h"
3972 #include <stdio.h>
3973 int main() {
3974 int i = (int)snprintf
3975 ; return 0; }
3976 EOF
3977 if { (eval echo configure:3978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3978   rm -rf conftest*
3979   ac_cv_have_snprintf_decl=yes
3980 else
3981   echo "configure: failed program was:" >&5
3982   cat conftest.$ac_ext >&5
3983   rm -rf conftest*
3984   ac_cv_have_snprintf_decl=no
3985 fi
3986 rm -f conftest*
3987 fi
3988
3989 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3990  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3991     cat >> confdefs.h <<\EOF
3992 #define HAVE_SNPRINTF_DECL 1
3993 EOF
3994
3995  fi
3996
3997
3998 # and glibc has setresuid under linux but the function does
3999 # nothing until kernel 2.1.44! very dumb.
4000 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4001 echo "configure:4002: checking for real setresuid" >&5
4002 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4003   echo $ac_n "(cached) $ac_c" 1>&6
4004 else
4005   
4006     if test "$cross_compiling" = yes; then
4007   samba_cv_have_setresuid=cross
4008 else
4009   cat > conftest.$ac_ext <<EOF
4010 #line 4011 "configure"
4011 #include "confdefs.h"
4012 #include <errno.h>
4013 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4014 EOF
4015 if { (eval echo configure:4016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4016 then
4017   samba_cv_have_setresuid=yes
4018 else
4019   echo "configure: failed program was:" >&5
4020   cat conftest.$ac_ext >&5
4021   rm -fr conftest*
4022   samba_cv_have_setresuid=no
4023 fi
4024 rm -fr conftest*
4025 fi
4026
4027 fi
4028
4029 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4030 if test x"$samba_cv_have_setresuid" = x"yes"; then
4031     cat >> confdefs.h <<\EOF
4032 #define HAVE_SETRESUID 1
4033 EOF
4034
4035 fi
4036
4037 # Do the same check for setresguid...
4038 #
4039 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4040 echo "configure:4041: checking for real setresgid" >&5
4041 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4042   echo $ac_n "(cached) $ac_c" 1>&6
4043 else
4044   
4045     if test "$cross_compiling" = yes; then
4046   samba_cv_have_setresgid=cross
4047 else
4048   cat > conftest.$ac_ext <<EOF
4049 #line 4050 "configure"
4050 #include "confdefs.h"
4051 #include <unistd.h>
4052 #include <errno.h>
4053 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4054 EOF
4055 if { (eval echo configure:4056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4056 then
4057   samba_cv_have_setresgid=yes
4058 else
4059   echo "configure: failed program was:" >&5
4060   cat conftest.$ac_ext >&5
4061   rm -fr conftest*
4062   samba_cv_have_setresgid=no
4063 fi
4064 rm -fr conftest*
4065 fi
4066
4067 fi
4068
4069 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4070 if test x"$samba_cv_have_setresgid" = x"yes"; then
4071     cat >> confdefs.h <<\EOF
4072 #define HAVE_SETRESGID 1
4073 EOF
4074
4075 fi
4076
4077 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4078 echo "configure:4079: checking for 8-bit clean memcmp" >&5
4079 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4080   echo $ac_n "(cached) $ac_c" 1>&6
4081 else
4082   if test "$cross_compiling" = yes; then
4083   ac_cv_func_memcmp_clean=no
4084 else
4085   cat > conftest.$ac_ext <<EOF
4086 #line 4087 "configure"
4087 #include "confdefs.h"
4088
4089 main()
4090 {
4091   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4092   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4093 }
4094
4095 EOF
4096 if { (eval echo configure:4097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4097 then
4098   ac_cv_func_memcmp_clean=yes
4099 else
4100   echo "configure: failed program was:" >&5
4101   cat conftest.$ac_ext >&5
4102   rm -fr conftest*
4103   ac_cv_func_memcmp_clean=no
4104 fi
4105 rm -fr conftest*
4106 fi
4107
4108 fi
4109
4110 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4111 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4112
4113
4114 ###############################################
4115 # test for where we get crypt() from
4116 for ac_func in crypt
4117 do
4118 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4119 echo "configure:4120: checking for $ac_func" >&5
4120 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4121   echo $ac_n "(cached) $ac_c" 1>&6
4122 else
4123   cat > conftest.$ac_ext <<EOF
4124 #line 4125 "configure"
4125 #include "confdefs.h"
4126 /* System header to define __stub macros and hopefully few prototypes,
4127     which can conflict with char $ac_func(); below.  */
4128 #include <assert.h>
4129 /* Override any gcc2 internal prototype to avoid an error.  */
4130 /* We use char because int might match the return type of a gcc2
4131     builtin and then its argument prototype would still apply.  */
4132 char $ac_func();
4133
4134 int main() {
4135
4136 /* The GNU C library defines this for functions which it implements
4137     to always fail with ENOSYS.  Some functions are actually named
4138     something starting with __ and the normal name is an alias.  */
4139 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4140 choke me
4141 #else
4142 $ac_func();
4143 #endif
4144
4145 ; return 0; }
4146 EOF
4147 if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4148   rm -rf conftest*
4149   eval "ac_cv_func_$ac_func=yes"
4150 else
4151   echo "configure: failed program was:" >&5
4152   cat conftest.$ac_ext >&5
4153   rm -rf conftest*
4154   eval "ac_cv_func_$ac_func=no"
4155 fi
4156 rm -f conftest*
4157 fi
4158
4159 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4160   echo "$ac_t""yes" 1>&6
4161     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4162   cat >> confdefs.h <<EOF
4163 #define $ac_tr_func 1
4164 EOF
4165  
4166 else
4167   echo "$ac_t""no" 1>&6
4168 fi
4169 done
4170
4171 if test x"$ac_cv_func_crypt" = x"no"; then
4172     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4173 echo "configure:4174: checking for crypt in -lcrypt" >&5
4174 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4175 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4176   echo $ac_n "(cached) $ac_c" 1>&6
4177 else
4178   ac_save_LIBS="$LIBS"
4179 LIBS="-lcrypt  $LIBS"
4180 cat > conftest.$ac_ext <<EOF
4181 #line 4182 "configure"
4182 #include "confdefs.h"
4183 /* Override any gcc2 internal prototype to avoid an error.  */
4184 /* We use char because int might match the return type of a gcc2
4185     builtin and then its argument prototype would still apply.  */
4186 char crypt();
4187
4188 int main() {
4189 crypt()
4190 ; return 0; }
4191 EOF
4192 if { (eval echo configure:4193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4193   rm -rf conftest*
4194   eval "ac_cv_lib_$ac_lib_var=yes"
4195 else
4196   echo "configure: failed program was:" >&5
4197   cat conftest.$ac_ext >&5
4198   rm -rf conftest*
4199   eval "ac_cv_lib_$ac_lib_var=no"
4200 fi
4201 rm -f conftest*
4202 LIBS="$ac_save_LIBS"
4203
4204 fi
4205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4206   echo "$ac_t""yes" 1>&6
4207   LIBS="$LIBS -lcrypt";
4208         cat >> confdefs.h <<\EOF
4209 #define HAVE_CRYPT 1
4210 EOF
4211
4212 else
4213   echo "$ac_t""no" 1>&6
4214 fi
4215
4216 fi
4217
4218
4219 ###############################################
4220 # Readline included by default unless explicitly asked not to
4221 test "${with_readline+set}" != "set" && with_readline=yes
4222
4223 # test for where we get readline() from
4224 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4225 echo "configure:4226: checking whether to use readline" >&5
4226 # Check whether --with-readline or --without-readline was given.
4227 if test "${with_readline+set}" = set; then
4228   withval="$with_readline"
4229     case "$with_readline" in
4230   yes)
4231     echo "$ac_t""yes" 1>&6
4232
4233     for ac_hdr in readline.h history.h readline/readline.h
4234 do
4235 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4236 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4237 echo "configure:4238: checking for $ac_hdr" >&5
4238 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4239   echo $ac_n "(cached) $ac_c" 1>&6
4240 else
4241   cat > conftest.$ac_ext <<EOF
4242 #line 4243 "configure"
4243 #include "confdefs.h"
4244 #include <$ac_hdr>
4245 EOF
4246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4247 { (eval echo configure:4248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4249 if test -z "$ac_err"; then
4250   rm -rf conftest*
4251   eval "ac_cv_header_$ac_safe=yes"
4252 else
4253   echo "$ac_err" >&5
4254   echo "configure: failed program was:" >&5
4255   cat conftest.$ac_ext >&5
4256   rm -rf conftest*
4257   eval "ac_cv_header_$ac_safe=no"
4258 fi
4259 rm -f conftest*
4260 fi
4261 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4262   echo "$ac_t""yes" 1>&6
4263     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4264   cat >> confdefs.h <<EOF
4265 #define $ac_tr_hdr 1
4266 EOF
4267  
4268 else
4269   echo "$ac_t""no" 1>&6
4270 fi
4271 done
4272
4273     for ac_hdr in readline/history.h
4274 do
4275 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4276 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4277 echo "configure:4278: checking for $ac_hdr" >&5
4278 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4279   echo $ac_n "(cached) $ac_c" 1>&6
4280 else
4281   cat > conftest.$ac_ext <<EOF
4282 #line 4283 "configure"
4283 #include "confdefs.h"
4284 #include <$ac_hdr>
4285 EOF
4286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4287 { (eval echo configure:4288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4289 if test -z "$ac_err"; then
4290   rm -rf conftest*
4291   eval "ac_cv_header_$ac_safe=yes"
4292 else
4293   echo "$ac_err" >&5
4294   echo "configure: failed program was:" >&5
4295   cat conftest.$ac_ext >&5
4296   rm -rf conftest*
4297   eval "ac_cv_header_$ac_safe=no"
4298 fi
4299 rm -f conftest*
4300 fi
4301 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4302   echo "$ac_t""yes" 1>&6
4303     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4304   cat >> confdefs.h <<EOF
4305 #define $ac_tr_hdr 1
4306 EOF
4307  
4308 else
4309   echo "$ac_t""no" 1>&6
4310 fi
4311 done
4312
4313
4314     for ac_hdr in readline.h readline/readline.h
4315 do
4316 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4317 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4318 echo "configure:4319: checking for $ac_hdr" >&5
4319 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4320   echo $ac_n "(cached) $ac_c" 1>&6
4321 else
4322   cat > conftest.$ac_ext <<EOF
4323 #line 4324 "configure"
4324 #include "confdefs.h"
4325 #include <$ac_hdr>
4326 EOF
4327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4328 { (eval echo configure:4329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4330 if test -z "$ac_err"; then
4331   rm -rf conftest*
4332   eval "ac_cv_header_$ac_safe=yes"
4333 else
4334   echo "$ac_err" >&5
4335   echo "configure: failed program was:" >&5
4336   cat conftest.$ac_ext >&5
4337   rm -rf conftest*
4338   eval "ac_cv_header_$ac_safe=no"
4339 fi
4340 rm -f conftest*
4341 fi
4342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4343   echo "$ac_t""yes" 1>&6
4344     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4345   cat >> confdefs.h <<EOF
4346 #define $ac_tr_hdr 1
4347 EOF
4348  
4349       for termlib in ncurses curses termcap terminfo termlib; do
4350        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4351 echo "configure:4352: checking for tgetent in -l${termlib}" >&5
4352 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4353 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4354   echo $ac_n "(cached) $ac_c" 1>&6
4355 else
4356   ac_save_LIBS="$LIBS"
4357 LIBS="-l${termlib}  $LIBS"
4358 cat > conftest.$ac_ext <<EOF
4359 #line 4360 "configure"
4360 #include "confdefs.h"
4361 /* Override any gcc2 internal prototype to avoid an error.  */
4362 /* We use char because int might match the return type of a gcc2
4363     builtin and then its argument prototype would still apply.  */
4364 char tgetent();
4365
4366 int main() {
4367 tgetent()
4368 ; return 0; }
4369 EOF
4370 if { (eval echo configure:4371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4371   rm -rf conftest*
4372   eval "ac_cv_lib_$ac_lib_var=yes"
4373 else
4374   echo "configure: failed program was:" >&5
4375   cat conftest.$ac_ext >&5
4376   rm -rf conftest*
4377   eval "ac_cv_lib_$ac_lib_var=no"
4378 fi
4379 rm -f conftest*
4380 LIBS="$ac_save_LIBS"
4381
4382 fi
4383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4384   echo "$ac_t""yes" 1>&6
4385   TERMLIBS="-l${termlib}"; break
4386 else
4387   echo "$ac_t""no" 1>&6
4388 fi
4389
4390       done
4391       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4392 echo "configure:4393: checking for rl_callback_handler_install in -lreadline" >&5
4393 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4394 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4395   echo $ac_n "(cached) $ac_c" 1>&6
4396 else
4397   ac_save_LIBS="$LIBS"
4398 LIBS="-lreadline $TERMLIBS $LIBS"
4399 cat > conftest.$ac_ext <<EOF
4400 #line 4401 "configure"
4401 #include "confdefs.h"
4402 /* Override any gcc2 internal prototype to avoid an error.  */
4403 /* We use char because int might match the return type of a gcc2
4404     builtin and then its argument prototype would still apply.  */
4405 char rl_callback_handler_install();
4406
4407 int main() {
4408 rl_callback_handler_install()
4409 ; return 0; }
4410 EOF
4411 if { (eval echo configure:4412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4412   rm -rf conftest*
4413   eval "ac_cv_lib_$ac_lib_var=yes"
4414 else
4415   echo "configure: failed program was:" >&5
4416   cat conftest.$ac_ext >&5
4417   rm -rf conftest*
4418   eval "ac_cv_lib_$ac_lib_var=no"
4419 fi
4420 rm -f conftest*
4421 LIBS="$ac_save_LIBS"
4422
4423 fi
4424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4425   echo "$ac_t""yes" 1>&6
4426   TERMLIBS="-lreadline $TERMLIBS"
4427        cat >> confdefs.h <<\EOF
4428 #define HAVE_LIBREADLINE 1
4429 EOF
4430
4431        break
4432 else
4433   echo "$ac_t""no" 1>&6
4434 TERMLIBS=
4435 fi
4436
4437 else
4438   echo "$ac_t""no" 1>&6
4439 fi
4440 done
4441
4442     ;;
4443   no)
4444     echo "$ac_t""no" 1>&6
4445     ;;
4446   *)
4447     echo "$ac_t""yes" 1>&6
4448
4449     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4450     # alternate readline path
4451     _ldflags=${LDFLAGS}
4452     _cppflags=${CPPFLAGS}
4453
4454     # Add additional search path
4455     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4456     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4457
4458     for ac_hdr in readline.h history.h readline/readline.h
4459 do
4460 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4461 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4462 echo "configure:4463: checking for $ac_hdr" >&5
4463 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4464   echo $ac_n "(cached) $ac_c" 1>&6
4465 else
4466   cat > conftest.$ac_ext <<EOF
4467 #line 4468 "configure"
4468 #include "confdefs.h"
4469 #include <$ac_hdr>
4470 EOF
4471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4472 { (eval echo configure:4473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4474 if test -z "$ac_err"; then
4475   rm -rf conftest*
4476   eval "ac_cv_header_$ac_safe=yes"
4477 else
4478   echo "$ac_err" >&5
4479   echo "configure: failed program was:" >&5
4480   cat conftest.$ac_ext >&5
4481   rm -rf conftest*
4482   eval "ac_cv_header_$ac_safe=no"
4483 fi
4484 rm -f conftest*
4485 fi
4486 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4487   echo "$ac_t""yes" 1>&6
4488     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4489   cat >> confdefs.h <<EOF
4490 #define $ac_tr_hdr 1
4491 EOF
4492  
4493 else
4494   echo "$ac_t""no" 1>&6
4495 fi
4496 done
4497
4498     for ac_hdr in readline/history.h
4499 do
4500 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4501 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4502 echo "configure:4503: checking for $ac_hdr" >&5
4503 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4504   echo $ac_n "(cached) $ac_c" 1>&6
4505 else
4506   cat > conftest.$ac_ext <<EOF
4507 #line 4508 "configure"
4508 #include "confdefs.h"
4509 #include <$ac_hdr>
4510 EOF
4511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4512 { (eval echo configure:4513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4514 if test -z "$ac_err"; then
4515   rm -rf conftest*
4516   eval "ac_cv_header_$ac_safe=yes"
4517 else
4518   echo "$ac_err" >&5
4519   echo "configure: failed program was:" >&5
4520   cat conftest.$ac_ext >&5
4521   rm -rf conftest*
4522   eval "ac_cv_header_$ac_safe=no"
4523 fi
4524 rm -f conftest*
4525 fi
4526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4527   echo "$ac_t""yes" 1>&6
4528     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4529   cat >> confdefs.h <<EOF
4530 #define $ac_tr_hdr 1
4531 EOF
4532  
4533 else
4534   echo "$ac_t""no" 1>&6
4535 fi
4536 done
4537
4538
4539     for ac_hdr in readline.h readline/readline.h
4540 do
4541 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4542 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4543 echo "configure:4544: checking for $ac_hdr" >&5
4544 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4545   echo $ac_n "(cached) $ac_c" 1>&6
4546 else
4547   cat > conftest.$ac_ext <<EOF
4548 #line 4549 "configure"
4549 #include "confdefs.h"
4550 #include <$ac_hdr>
4551 EOF
4552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4553 { (eval echo configure:4554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4555 if test -z "$ac_err"; then
4556   rm -rf conftest*
4557   eval "ac_cv_header_$ac_safe=yes"
4558 else
4559   echo "$ac_err" >&5
4560   echo "configure: failed program was:" >&5
4561   cat conftest.$ac_ext >&5
4562   rm -rf conftest*
4563   eval "ac_cv_header_$ac_safe=no"
4564 fi
4565 rm -f conftest*
4566 fi
4567 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4568   echo "$ac_t""yes" 1>&6
4569     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4570   cat >> confdefs.h <<EOF
4571 #define $ac_tr_hdr 1
4572 EOF
4573  
4574       for termlib in ncurses curses termcap terminfo termlib; do
4575        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4576 echo "configure:4577: checking for tgetent in -l${termlib}" >&5
4577 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4578 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4579   echo $ac_n "(cached) $ac_c" 1>&6
4580 else
4581   ac_save_LIBS="$LIBS"
4582 LIBS="-l${termlib}  $LIBS"
4583 cat > conftest.$ac_ext <<EOF
4584 #line 4585 "configure"
4585 #include "confdefs.h"
4586 /* Override any gcc2 internal prototype to avoid an error.  */
4587 /* We use char because int might match the return type of a gcc2
4588     builtin and then its argument prototype would still apply.  */
4589 char tgetent();
4590
4591 int main() {
4592 tgetent()
4593 ; return 0; }
4594 EOF
4595 if { (eval echo configure:4596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4596   rm -rf conftest*
4597   eval "ac_cv_lib_$ac_lib_var=yes"
4598 else
4599   echo "configure: failed program was:" >&5
4600   cat conftest.$ac_ext >&5
4601   rm -rf conftest*
4602   eval "ac_cv_lib_$ac_lib_var=no"
4603 fi
4604 rm -f conftest*
4605 LIBS="$ac_save_LIBS"
4606
4607 fi
4608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4609   echo "$ac_t""yes" 1>&6
4610   TERMLIBS="-l${termlib}"; break
4611 else
4612   echo "$ac_t""no" 1>&6
4613 fi
4614
4615       done
4616       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4617 echo "configure:4618: checking for rl_callback_handler_install in -lreadline" >&5
4618 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4619 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4620   echo $ac_n "(cached) $ac_c" 1>&6
4621 else
4622   ac_save_LIBS="$LIBS"
4623 LIBS="-lreadline $TERMLIBS $LIBS"
4624 cat > conftest.$ac_ext <<EOF
4625 #line 4626 "configure"
4626 #include "confdefs.h"
4627 /* Override any gcc2 internal prototype to avoid an error.  */
4628 /* We use char because int might match the return type of a gcc2
4629     builtin and then its argument prototype would still apply.  */
4630 char rl_callback_handler_install();
4631
4632 int main() {
4633 rl_callback_handler_install()
4634 ; return 0; }
4635 EOF
4636 if { (eval echo configure:4637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4637   rm -rf conftest*
4638   eval "ac_cv_lib_$ac_lib_var=yes"
4639 else
4640   echo "configure: failed program was:" >&5
4641   cat conftest.$ac_ext >&5
4642   rm -rf conftest*
4643   eval "ac_cv_lib_$ac_lib_var=no"
4644 fi
4645 rm -f conftest*
4646 LIBS="$ac_save_LIBS"
4647
4648 fi
4649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4650   echo "$ac_t""yes" 1>&6
4651   TERMLDFLAGS="-L$with_readline/lib"
4652        TERMCPPFLAGS="-I$with_readline/include"
4653        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4654        TERMLIBS="-lreadline $TERMLIBS"
4655        cat >> confdefs.h <<\EOF
4656 #define HAVE_LIBREADLINE 1
4657 EOF
4658
4659        break
4660 else
4661   echo "$ac_t""no" 1>&6
4662 TERMLIBS= CPPFLAGS=$_cppflags
4663 fi
4664
4665 else
4666   echo "$ac_t""no" 1>&6
4667 fi
4668 done
4669
4670
4671     LDFLAGS=$_ldflags
4672     ;;
4673   esac
4674 else
4675   echo "$ac_t""no" 1>&6
4676
4677 fi
4678
4679
4680
4681
4682 # The readline API changed slightly from readline3 to readline4, so
4683 # code will generate warnings on one of them unless we have a few
4684 # special cases.
4685 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4686 echo "configure:4687: checking for rl_completion_matches in -lreadline" >&5
4687 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4688 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4689   echo $ac_n "(cached) $ac_c" 1>&6
4690 else
4691   ac_save_LIBS="$LIBS"
4692 LIBS="-lreadline $TERMLIBS $LIBS"
4693 cat > conftest.$ac_ext <<EOF
4694 #line 4695 "configure"
4695 #include "confdefs.h"
4696 /* Override any gcc2 internal prototype to avoid an error.  */
4697 /* We use char because int might match the return type of a gcc2
4698     builtin and then its argument prototype would still apply.  */
4699 char rl_completion_matches();
4700
4701 int main() {
4702 rl_completion_matches()
4703 ; return 0; }
4704 EOF
4705 if { (eval echo configure:4706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4706   rm -rf conftest*
4707   eval "ac_cv_lib_$ac_lib_var=yes"
4708 else
4709   echo "configure: failed program was:" >&5
4710   cat conftest.$ac_ext >&5
4711   rm -rf conftest*
4712   eval "ac_cv_lib_$ac_lib_var=no"
4713 fi
4714 rm -f conftest*
4715 LIBS="$ac_save_LIBS"
4716
4717 fi
4718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4719   echo "$ac_t""yes" 1>&6
4720   cat >> confdefs.h <<\EOF
4721 #define HAVE_NEW_LIBREADLINE 1
4722 EOF
4723
4724 else
4725   echo "$ac_t""no" 1>&6
4726 fi
4727
4728
4729 # The following test taken from the cvs sources
4730 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4731 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4732 # libsocket.so which has a bad implementation of gethostbyname (it
4733 # only looks in /etc/hosts), so we only look for -lsocket if we need
4734 # it.
4735 for ac_func in connect
4736 do
4737 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4738 echo "configure:4739: checking for $ac_func" >&5
4739 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4740   echo $ac_n "(cached) $ac_c" 1>&6
4741 else
4742   cat > conftest.$ac_ext <<EOF
4743 #line 4744 "configure"
4744 #include "confdefs.h"
4745 /* System header to define __stub macros and hopefully few prototypes,
4746     which can conflict with char $ac_func(); below.  */
4747 #include <assert.h>
4748 /* Override any gcc2 internal prototype to avoid an error.  */
4749 /* We use char because int might match the return type of a gcc2
4750     builtin and then its argument prototype would still apply.  */
4751 char $ac_func();
4752
4753 int main() {
4754
4755 /* The GNU C library defines this for functions which it implements
4756     to always fail with ENOSYS.  Some functions are actually named
4757     something starting with __ and the normal name is an alias.  */
4758 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4759 choke me
4760 #else
4761 $ac_func();
4762 #endif
4763
4764 ; return 0; }
4765 EOF
4766 if { (eval echo configure:4767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4767   rm -rf conftest*
4768   eval "ac_cv_func_$ac_func=yes"
4769 else
4770   echo "configure: failed program was:" >&5
4771   cat conftest.$ac_ext >&5
4772   rm -rf conftest*
4773   eval "ac_cv_func_$ac_func=no"
4774 fi
4775 rm -f conftest*
4776 fi
4777
4778 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4779   echo "$ac_t""yes" 1>&6
4780     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4781   cat >> confdefs.h <<EOF
4782 #define $ac_tr_func 1
4783 EOF
4784  
4785 else
4786   echo "$ac_t""no" 1>&6
4787 fi
4788 done
4789
4790 if test x"$ac_cv_func_connect" = x"no"; then
4791     case "$LIBS" in
4792     *-lnsl*) ;;
4793     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4794 echo "configure:4795: checking for printf in -lnsl_s" >&5
4795 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4796 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4797   echo $ac_n "(cached) $ac_c" 1>&6
4798 else
4799   ac_save_LIBS="$LIBS"
4800 LIBS="-lnsl_s  $LIBS"
4801 cat > conftest.$ac_ext <<EOF
4802 #line 4803 "configure"
4803 #include "confdefs.h"
4804 /* Override any gcc2 internal prototype to avoid an error.  */
4805 /* We use char because int might match the return type of a gcc2
4806     builtin and then its argument prototype would still apply.  */
4807 char printf();
4808
4809 int main() {
4810 printf()
4811 ; return 0; }
4812 EOF
4813 if { (eval echo configure:4814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4814   rm -rf conftest*
4815   eval "ac_cv_lib_$ac_lib_var=yes"
4816 else
4817   echo "configure: failed program was:" >&5
4818   cat conftest.$ac_ext >&5
4819   rm -rf conftest*
4820   eval "ac_cv_lib_$ac_lib_var=no"
4821 fi
4822 rm -f conftest*
4823 LIBS="$ac_save_LIBS"
4824
4825 fi
4826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4827   echo "$ac_t""yes" 1>&6
4828     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4829     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4830   cat >> confdefs.h <<EOF
4831 #define $ac_tr_lib 1
4832 EOF
4833
4834   LIBS="-lnsl_s $LIBS"
4835
4836 else
4837   echo "$ac_t""no" 1>&6
4838 fi
4839  ;;
4840     esac
4841     case "$LIBS" in
4842     *-lnsl*) ;;
4843     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4844 echo "configure:4845: checking for printf in -lnsl" >&5
4845 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4846 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4847   echo $ac_n "(cached) $ac_c" 1>&6
4848 else
4849   ac_save_LIBS="$LIBS"
4850 LIBS="-lnsl  $LIBS"
4851 cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4854 /* Override any gcc2 internal prototype to avoid an error.  */
4855 /* We use char because int might match the return type of a gcc2
4856     builtin and then its argument prototype would still apply.  */
4857 char printf();
4858
4859 int main() {
4860 printf()
4861 ; return 0; }
4862 EOF
4863 if { (eval echo configure:4864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4864   rm -rf conftest*
4865   eval "ac_cv_lib_$ac_lib_var=yes"
4866 else
4867   echo "configure: failed program was:" >&5
4868   cat conftest.$ac_ext >&5
4869   rm -rf conftest*
4870   eval "ac_cv_lib_$ac_lib_var=no"
4871 fi
4872 rm -f conftest*
4873 LIBS="$ac_save_LIBS"
4874
4875 fi
4876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4877   echo "$ac_t""yes" 1>&6
4878     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4879     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4880   cat >> confdefs.h <<EOF
4881 #define $ac_tr_lib 1
4882 EOF
4883
4884   LIBS="-lnsl $LIBS"
4885
4886 else
4887   echo "$ac_t""no" 1>&6
4888 fi
4889  ;;
4890     esac
4891     case "$LIBS" in
4892     *-lsocket*) ;;
4893     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4894 echo "configure:4895: checking for connect in -lsocket" >&5
4895 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4896 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4897   echo $ac_n "(cached) $ac_c" 1>&6
4898 else
4899   ac_save_LIBS="$LIBS"
4900 LIBS="-lsocket  $LIBS"
4901 cat > conftest.$ac_ext <<EOF
4902 #line 4903 "configure"
4903 #include "confdefs.h"
4904 /* Override any gcc2 internal prototype to avoid an error.  */
4905 /* We use char because int might match the return type of a gcc2
4906     builtin and then its argument prototype would still apply.  */
4907 char connect();
4908
4909 int main() {
4910 connect()
4911 ; return 0; }
4912 EOF
4913 if { (eval echo configure:4914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4914   rm -rf conftest*
4915   eval "ac_cv_lib_$ac_lib_var=yes"
4916 else
4917   echo "configure: failed program was:" >&5
4918   cat conftest.$ac_ext >&5
4919   rm -rf conftest*
4920   eval "ac_cv_lib_$ac_lib_var=no"
4921 fi
4922 rm -f conftest*
4923 LIBS="$ac_save_LIBS"
4924
4925 fi
4926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4927   echo "$ac_t""yes" 1>&6
4928     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4929     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4930   cat >> confdefs.h <<EOF
4931 #define $ac_tr_lib 1
4932 EOF
4933
4934   LIBS="-lsocket $LIBS"
4935
4936 else
4937   echo "$ac_t""no" 1>&6
4938 fi
4939  ;;
4940     esac
4941     case "$LIBS" in
4942     *-linet*) ;;
4943     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4944 echo "configure:4945: checking for connect in -linet" >&5
4945 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4946 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4947   echo $ac_n "(cached) $ac_c" 1>&6
4948 else
4949   ac_save_LIBS="$LIBS"
4950 LIBS="-linet  $LIBS"
4951 cat > conftest.$ac_ext <<EOF
4952 #line 4953 "configure"
4953 #include "confdefs.h"
4954 /* Override any gcc2 internal prototype to avoid an error.  */
4955 /* We use char because int might match the return type of a gcc2
4956     builtin and then its argument prototype would still apply.  */
4957 char connect();
4958
4959 int main() {
4960 connect()
4961 ; return 0; }
4962 EOF
4963 if { (eval echo configure:4964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4964   rm -rf conftest*
4965   eval "ac_cv_lib_$ac_lib_var=yes"
4966 else
4967   echo "configure: failed program was:" >&5
4968   cat conftest.$ac_ext >&5
4969   rm -rf conftest*
4970   eval "ac_cv_lib_$ac_lib_var=no"
4971 fi
4972 rm -f conftest*
4973 LIBS="$ac_save_LIBS"
4974
4975 fi
4976 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4977   echo "$ac_t""yes" 1>&6
4978     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4979     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4980   cat >> confdefs.h <<EOF
4981 #define $ac_tr_lib 1
4982 EOF
4983
4984   LIBS="-linet $LIBS"
4985
4986 else
4987   echo "$ac_t""no" 1>&6
4988 fi
4989  ;;
4990     esac
4991             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4992        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4993         # ac_cv_func_connect=yes
4994         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4995         cat >> confdefs.h <<\EOF
4996 #define HAVE_CONNECT 1
4997 EOF
4998
4999     fi
5000 fi
5001
5002 ###############################################
5003 # test for where we get get_yp_default_domain() from
5004 for ac_func in yp_get_default_domain
5005 do
5006 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5007 echo "configure:5008: checking for $ac_func" >&5
5008 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5009   echo $ac_n "(cached) $ac_c" 1>&6
5010 else
5011   cat > conftest.$ac_ext <<EOF
5012 #line 5013 "configure"
5013 #include "confdefs.h"
5014 /* System header to define __stub macros and hopefully few prototypes,
5015     which can conflict with char $ac_func(); below.  */
5016 #include <assert.h>
5017 /* Override any gcc2 internal prototype to avoid an error.  */
5018 /* We use char because int might match the return type of a gcc2
5019     builtin and then its argument prototype would still apply.  */
5020 char $ac_func();
5021
5022 int main() {
5023
5024 /* The GNU C library defines this for functions which it implements
5025     to always fail with ENOSYS.  Some functions are actually named
5026     something starting with __ and the normal name is an alias.  */
5027 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5028 choke me
5029 #else
5030 $ac_func();
5031 #endif
5032
5033 ; return 0; }
5034 EOF
5035 if { (eval echo configure:5036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5036   rm -rf conftest*
5037   eval "ac_cv_func_$ac_func=yes"
5038 else
5039   echo "configure: failed program was:" >&5
5040   cat conftest.$ac_ext >&5
5041   rm -rf conftest*
5042   eval "ac_cv_func_$ac_func=no"
5043 fi
5044 rm -f conftest*
5045 fi
5046
5047 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5048   echo "$ac_t""yes" 1>&6
5049     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5050   cat >> confdefs.h <<EOF
5051 #define $ac_tr_func 1
5052 EOF
5053  
5054 else
5055   echo "$ac_t""no" 1>&6
5056 fi
5057 done
5058
5059 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5060         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5061 echo "configure:5062: checking for yp_get_default_domain in -lnsl" >&5
5062 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5063 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5064   echo $ac_n "(cached) $ac_c" 1>&6
5065 else
5066   ac_save_LIBS="$LIBS"
5067 LIBS="-lnsl  $LIBS"
5068 cat > conftest.$ac_ext <<EOF
5069 #line 5070 "configure"
5070 #include "confdefs.h"
5071 /* Override any gcc2 internal prototype to avoid an error.  */
5072 /* We use char because int might match the return type of a gcc2
5073     builtin and then its argument prototype would still apply.  */
5074 char yp_get_default_domain();
5075
5076 int main() {
5077 yp_get_default_domain()
5078 ; return 0; }
5079 EOF
5080 if { (eval echo configure:5081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5081   rm -rf conftest*
5082   eval "ac_cv_lib_$ac_lib_var=yes"
5083 else
5084   echo "configure: failed program was:" >&5
5085   cat conftest.$ac_ext >&5
5086   rm -rf conftest*
5087   eval "ac_cv_lib_$ac_lib_var=no"
5088 fi
5089 rm -f conftest*
5090 LIBS="$ac_save_LIBS"
5091
5092 fi
5093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5094   echo "$ac_t""yes" 1>&6
5095   LIBS="$LIBS -lnsl";
5096         cat >> confdefs.h <<\EOF
5097 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5098 EOF
5099
5100 else
5101   echo "$ac_t""no" 1>&6
5102 fi
5103  
5104 fi
5105
5106 # Check if we have execl, if not we need to compile smbrun.
5107 for ac_func in execl
5108 do
5109 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5110 echo "configure:5111: checking for $ac_func" >&5
5111 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5112   echo $ac_n "(cached) $ac_c" 1>&6
5113 else
5114   cat > conftest.$ac_ext <<EOF
5115 #line 5116 "configure"
5116 #include "confdefs.h"
5117 /* System header to define __stub macros and hopefully few prototypes,
5118     which can conflict with char $ac_func(); below.  */
5119 #include <assert.h>
5120 /* Override any gcc2 internal prototype to avoid an error.  */
5121 /* We use char because int might match the return type of a gcc2
5122     builtin and then its argument prototype would still apply.  */
5123 char $ac_func();
5124
5125 int main() {
5126
5127 /* The GNU C library defines this for functions which it implements
5128     to always fail with ENOSYS.  Some functions are actually named
5129     something starting with __ and the normal name is an alias.  */
5130 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5131 choke me
5132 #else
5133 $ac_func();
5134 #endif
5135
5136 ; return 0; }
5137 EOF
5138 if { (eval echo configure:5139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5139   rm -rf conftest*
5140   eval "ac_cv_func_$ac_func=yes"
5141 else
5142   echo "configure: failed program was:" >&5
5143   cat conftest.$ac_ext >&5
5144   rm -rf conftest*
5145   eval "ac_cv_func_$ac_func=no"
5146 fi
5147 rm -f conftest*
5148 fi
5149
5150 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5151   echo "$ac_t""yes" 1>&6
5152     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5153   cat >> confdefs.h <<EOF
5154 #define $ac_tr_func 1
5155 EOF
5156  
5157 else
5158   echo "$ac_t""no" 1>&6
5159 fi
5160 done
5161
5162 if test x"$ac_cv_func_execl" = x"no"; then
5163     RUNPROG="bin/smbrun"
5164 else
5165     RUNPROG=""
5166 fi
5167
5168 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5169 do
5170 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5171 echo "configure:5172: checking for $ac_func" >&5
5172 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5173   echo $ac_n "(cached) $ac_c" 1>&6
5174 else
5175   cat > conftest.$ac_ext <<EOF
5176 #line 5177 "configure"
5177 #include "confdefs.h"
5178 /* System header to define __stub macros and hopefully few prototypes,
5179     which can conflict with char $ac_func(); below.  */
5180 #include <assert.h>
5181 /* Override any gcc2 internal prototype to avoid an error.  */
5182 /* We use char because int might match the return type of a gcc2
5183     builtin and then its argument prototype would still apply.  */
5184 char $ac_func();
5185
5186 int main() {
5187
5188 /* The GNU C library defines this for functions which it implements
5189     to always fail with ENOSYS.  Some functions are actually named
5190     something starting with __ and the normal name is an alias.  */
5191 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5192 choke me
5193 #else
5194 $ac_func();
5195 #endif
5196
5197 ; return 0; }
5198 EOF
5199 if { (eval echo configure:5200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5200   rm -rf conftest*
5201   eval "ac_cv_func_$ac_func=yes"
5202 else
5203   echo "configure: failed program was:" >&5
5204   cat conftest.$ac_ext >&5
5205   rm -rf conftest*
5206   eval "ac_cv_func_$ac_func=no"
5207 fi
5208 rm -f conftest*
5209 fi
5210
5211 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5212   echo "$ac_t""yes" 1>&6
5213     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5214   cat >> confdefs.h <<EOF
5215 #define $ac_tr_func 1
5216 EOF
5217  
5218 else
5219   echo "$ac_t""no" 1>&6
5220 fi
5221 done
5222
5223 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5224 do
5225 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5226 echo "configure:5227: checking for $ac_func" >&5
5227 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5228   echo $ac_n "(cached) $ac_c" 1>&6
5229 else
5230   cat > conftest.$ac_ext <<EOF
5231 #line 5232 "configure"
5232 #include "confdefs.h"
5233 /* System header to define __stub macros and hopefully few prototypes,
5234     which can conflict with char $ac_func(); below.  */
5235 #include <assert.h>
5236 /* Override any gcc2 internal prototype to avoid an error.  */
5237 /* We use char because int might match the return type of a gcc2
5238     builtin and then its argument prototype would still apply.  */
5239 char $ac_func();
5240
5241 int main() {
5242
5243 /* The GNU C library defines this for functions which it implements
5244     to always fail with ENOSYS.  Some functions are actually named
5245     something starting with __ and the normal name is an alias.  */
5246 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5247 choke me
5248 #else
5249 $ac_func();
5250 #endif
5251
5252 ; return 0; }
5253 EOF
5254 if { (eval echo configure:5255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5255   rm -rf conftest*
5256   eval "ac_cv_func_$ac_func=yes"
5257 else
5258   echo "configure: failed program was:" >&5
5259   cat conftest.$ac_ext >&5
5260   rm -rf conftest*
5261   eval "ac_cv_func_$ac_func=no"
5262 fi
5263 rm -f conftest*
5264 fi
5265
5266 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5267   echo "$ac_t""yes" 1>&6
5268     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5269   cat >> confdefs.h <<EOF
5270 #define $ac_tr_func 1
5271 EOF
5272  
5273 else
5274   echo "$ac_t""no" 1>&6
5275 fi
5276 done
5277
5278 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5279 do
5280 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5281 echo "configure:5282: checking for $ac_func" >&5
5282 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5283   echo $ac_n "(cached) $ac_c" 1>&6
5284 else
5285   cat > conftest.$ac_ext <<EOF
5286 #line 5287 "configure"
5287 #include "confdefs.h"
5288 /* System header to define __stub macros and hopefully few prototypes,
5289     which can conflict with char $ac_func(); below.  */
5290 #include <assert.h>
5291 /* Override any gcc2 internal prototype to avoid an error.  */
5292 /* We use char because int might match the return type of a gcc2
5293     builtin and then its argument prototype would still apply.  */
5294 char $ac_func();
5295
5296 int main() {
5297
5298 /* The GNU C library defines this for functions which it implements
5299     to always fail with ENOSYS.  Some functions are actually named
5300     something starting with __ and the normal name is an alias.  */
5301 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5302 choke me
5303 #else
5304 $ac_func();
5305 #endif
5306
5307 ; return 0; }
5308 EOF
5309 if { (eval echo configure:5310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5310   rm -rf conftest*
5311   eval "ac_cv_func_$ac_func=yes"
5312 else
5313   echo "configure: failed program was:" >&5
5314   cat conftest.$ac_ext >&5
5315   rm -rf conftest*
5316   eval "ac_cv_func_$ac_func=no"
5317 fi
5318 rm -f conftest*
5319 fi
5320
5321 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5322   echo "$ac_t""yes" 1>&6
5323     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5324   cat >> confdefs.h <<EOF
5325 #define $ac_tr_func 1
5326 EOF
5327  
5328 else
5329   echo "$ac_t""no" 1>&6
5330 fi
5331 done
5332
5333 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5334 do
5335 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5336 echo "configure:5337: checking for $ac_func" >&5
5337 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5338   echo $ac_n "(cached) $ac_c" 1>&6
5339 else
5340   cat > conftest.$ac_ext <<EOF
5341 #line 5342 "configure"
5342 #include "confdefs.h"
5343 /* System header to define __stub macros and hopefully few prototypes,
5344     which can conflict with char $ac_func(); below.  */
5345 #include <assert.h>
5346 /* Override any gcc2 internal prototype to avoid an error.  */
5347 /* We use char because int might match the return type of a gcc2
5348     builtin and then its argument prototype would still apply.  */
5349 char $ac_func();
5350
5351 int main() {
5352
5353 /* The GNU C library defines this for functions which it implements
5354     to always fail with ENOSYS.  Some functions are actually named
5355     something starting with __ and the normal name is an alias.  */
5356 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5357 choke me
5358 #else
5359 $ac_func();
5360 #endif
5361
5362 ; return 0; }
5363 EOF
5364 if { (eval echo configure:5365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5365   rm -rf conftest*
5366   eval "ac_cv_func_$ac_func=yes"
5367 else
5368   echo "configure: failed program was:" >&5
5369   cat conftest.$ac_ext >&5
5370   rm -rf conftest*
5371   eval "ac_cv_func_$ac_func=no"
5372 fi
5373 rm -f conftest*
5374 fi
5375
5376 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5377   echo "$ac_t""yes" 1>&6
5378     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5379   cat >> confdefs.h <<EOF
5380 #define $ac_tr_func 1
5381 EOF
5382  
5383 else
5384   echo "$ac_t""no" 1>&6
5385 fi
5386 done
5387
5388 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5389 do
5390 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5391 echo "configure:5392: checking for $ac_func" >&5
5392 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5393   echo $ac_n "(cached) $ac_c" 1>&6
5394 else
5395   cat > conftest.$ac_ext <<EOF
5396 #line 5397 "configure"
5397 #include "confdefs.h"
5398 /* System header to define __stub macros and hopefully few prototypes,
5399     which can conflict with char $ac_func(); below.  */
5400 #include <assert.h>
5401 /* Override any gcc2 internal prototype to avoid an error.  */
5402 /* We use char because int might match the return type of a gcc2
5403     builtin and then its argument prototype would still apply.  */
5404 char $ac_func();
5405
5406 int main() {
5407
5408 /* The GNU C library defines this for functions which it implements
5409     to always fail with ENOSYS.  Some functions are actually named
5410     something starting with __ and the normal name is an alias.  */
5411 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5412 choke me
5413 #else
5414 $ac_func();
5415 #endif
5416
5417 ; return 0; }
5418 EOF
5419 if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5420   rm -rf conftest*
5421   eval "ac_cv_func_$ac_func=yes"
5422 else
5423   echo "configure: failed program was:" >&5
5424   cat conftest.$ac_ext >&5
5425   rm -rf conftest*
5426   eval "ac_cv_func_$ac_func=no"
5427 fi
5428 rm -f conftest*
5429 fi
5430
5431 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5432   echo "$ac_t""yes" 1>&6
5433     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5434   cat >> confdefs.h <<EOF
5435 #define $ac_tr_func 1
5436 EOF
5437  
5438 else
5439   echo "$ac_t""no" 1>&6
5440 fi
5441 done
5442
5443 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5444 do
5445 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5446 echo "configure:5447: checking for $ac_func" >&5
5447 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5448   echo $ac_n "(cached) $ac_c" 1>&6
5449 else
5450   cat > conftest.$ac_ext <<EOF
5451 #line 5452 "configure"
5452 #include "confdefs.h"
5453 /* System header to define __stub macros and hopefully few prototypes,
5454     which can conflict with char $ac_func(); below.  */
5455 #include <assert.h>
5456 /* Override any gcc2 internal prototype to avoid an error.  */
5457 /* We use char because int might match the return type of a gcc2
5458     builtin and then its argument prototype would still apply.  */
5459 char $ac_func();
5460
5461 int main() {
5462
5463 /* The GNU C library defines this for functions which it implements
5464     to always fail with ENOSYS.  Some functions are actually named
5465     something starting with __ and the normal name is an alias.  */
5466 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5467 choke me
5468 #else
5469 $ac_func();
5470 #endif
5471
5472 ; return 0; }
5473 EOF
5474 if { (eval echo configure:5475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5475   rm -rf conftest*
5476   eval "ac_cv_func_$ac_func=yes"
5477 else
5478   echo "configure: failed program was:" >&5
5479   cat conftest.$ac_ext >&5
5480   rm -rf conftest*
5481   eval "ac_cv_func_$ac_func=no"
5482 fi
5483 rm -f conftest*
5484 fi
5485
5486 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5487   echo "$ac_t""yes" 1>&6
5488     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5489   cat >> confdefs.h <<EOF
5490 #define $ac_tr_func 1
5491 EOF
5492  
5493 else
5494   echo "$ac_t""no" 1>&6
5495 fi
5496 done
5497
5498 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5499 do
5500 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5501 echo "configure:5502: checking for $ac_func" >&5
5502 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5503   echo $ac_n "(cached) $ac_c" 1>&6
5504 else
5505   cat > conftest.$ac_ext <<EOF
5506 #line 5507 "configure"
5507 #include "confdefs.h"
5508 /* System header to define __stub macros and hopefully few prototypes,
5509     which can conflict with char $ac_func(); below.  */
5510 #include <assert.h>
5511 /* Override any gcc2 internal prototype to avoid an error.  */
5512 /* We use char because int might match the return type of a gcc2
5513     builtin and then its argument prototype would still apply.  */
5514 char $ac_func();
5515
5516 int main() {
5517
5518 /* The GNU C library defines this for functions which it implements
5519     to always fail with ENOSYS.  Some functions are actually named
5520     something starting with __ and the normal name is an alias.  */
5521 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5522 choke me
5523 #else
5524 $ac_func();
5525 #endif
5526
5527 ; return 0; }
5528 EOF
5529 if { (eval echo configure:5530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5530   rm -rf conftest*
5531   eval "ac_cv_func_$ac_func=yes"
5532 else
5533   echo "configure: failed program was:" >&5
5534   cat conftest.$ac_ext >&5
5535   rm -rf conftest*
5536   eval "ac_cv_func_$ac_func=no"
5537 fi
5538 rm -f conftest*
5539 fi
5540
5541 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5542   echo "$ac_t""yes" 1>&6
5543     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5544   cat >> confdefs.h <<EOF
5545 #define $ac_tr_func 1
5546 EOF
5547  
5548 else
5549   echo "$ac_t""no" 1>&6
5550 fi
5551 done
5552
5553 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5554 do
5555 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5556 echo "configure:5557: checking for $ac_func" >&5
5557 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5558   echo $ac_n "(cached) $ac_c" 1>&6
5559 else
5560   cat > conftest.$ac_ext <<EOF
5561 #line 5562 "configure"
5562 #include "confdefs.h"
5563 /* System header to define __stub macros and hopefully few prototypes,
5564     which can conflict with char $ac_func(); below.  */
5565 #include <assert.h>
5566 /* Override any gcc2 internal prototype to avoid an error.  */
5567 /* We use char because int might match the return type of a gcc2
5568     builtin and then its argument prototype would still apply.  */
5569 char $ac_func();
5570
5571 int main() {
5572
5573 /* The GNU C library defines this for functions which it implements
5574     to always fail with ENOSYS.  Some functions are actually named
5575     something starting with __ and the normal name is an alias.  */
5576 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5577 choke me
5578 #else
5579 $ac_func();
5580 #endif
5581
5582 ; return 0; }
5583 EOF
5584 if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5585   rm -rf conftest*
5586   eval "ac_cv_func_$ac_func=yes"
5587 else
5588   echo "configure: failed program was:" >&5
5589   cat conftest.$ac_ext >&5
5590   rm -rf conftest*
5591   eval "ac_cv_func_$ac_func=no"
5592 fi
5593 rm -f conftest*
5594 fi
5595
5596 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5597   echo "$ac_t""yes" 1>&6
5598     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5599   cat >> confdefs.h <<EOF
5600 #define $ac_tr_func 1
5601 EOF
5602  
5603 else
5604   echo "$ac_t""no" 1>&6
5605 fi
5606 done
5607
5608 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5609 do
5610 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5611 echo "configure:5612: checking for $ac_func" >&5
5612 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5613   echo $ac_n "(cached) $ac_c" 1>&6
5614 else
5615   cat > conftest.$ac_ext <<EOF
5616 #line 5617 "configure"
5617 #include "confdefs.h"
5618 /* System header to define __stub macros and hopefully few prototypes,
5619     which can conflict with char $ac_func(); below.  */
5620 #include <assert.h>
5621 /* Override any gcc2 internal prototype to avoid an error.  */
5622 /* We use char because int might match the return type of a gcc2
5623     builtin and then its argument prototype would still apply.  */
5624 char $ac_func();
5625
5626 int main() {
5627
5628 /* The GNU C library defines this for functions which it implements
5629     to always fail with ENOSYS.  Some functions are actually named
5630     something starting with __ and the normal name is an alias.  */
5631 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5632 choke me
5633 #else
5634 $ac_func();
5635 #endif
5636
5637 ; return 0; }
5638 EOF
5639 if { (eval echo configure:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5640   rm -rf conftest*
5641   eval "ac_cv_func_$ac_func=yes"
5642 else
5643   echo "configure: failed program was:" >&5
5644   cat conftest.$ac_ext >&5
5645   rm -rf conftest*
5646   eval "ac_cv_func_$ac_func=no"
5647 fi
5648 rm -f conftest*
5649 fi
5650
5651 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5652   echo "$ac_t""yes" 1>&6
5653     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5654   cat >> confdefs.h <<EOF
5655 #define $ac_tr_func 1
5656 EOF
5657  
5658 else
5659   echo "$ac_t""no" 1>&6
5660 fi
5661 done
5662
5663 for ac_func in syslog vsyslog
5664 do
5665 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5666 echo "configure:5667: checking for $ac_func" >&5
5667 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5668   echo $ac_n "(cached) $ac_c" 1>&6
5669 else
5670   cat > conftest.$ac_ext <<EOF
5671 #line 5672 "configure"
5672 #include "confdefs.h"
5673 /* System header to define __stub macros and hopefully few prototypes,
5674     which can conflict with char $ac_func(); below.  */
5675 #include <assert.h>
5676 /* Override any gcc2 internal prototype to avoid an error.  */
5677 /* We use char because int might match the return type of a gcc2
5678     builtin and then its argument prototype would still apply.  */
5679 char $ac_func();
5680
5681 int main() {
5682
5683 /* The GNU C library defines this for functions which it implements
5684     to always fail with ENOSYS.  Some functions are actually named
5685     something starting with __ and the normal name is an alias.  */
5686 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5687 choke me
5688 #else
5689 $ac_func();
5690 #endif
5691
5692 ; return 0; }
5693 EOF
5694 if { (eval echo configure:5695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5695   rm -rf conftest*
5696   eval "ac_cv_func_$ac_func=yes"
5697 else
5698   echo "configure: failed program was:" >&5
5699   cat conftest.$ac_ext >&5
5700   rm -rf conftest*
5701   eval "ac_cv_func_$ac_func=no"
5702 fi
5703 rm -f conftest*
5704 fi
5705
5706 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5707   echo "$ac_t""yes" 1>&6
5708     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5709   cat >> confdefs.h <<EOF
5710 #define $ac_tr_func 1
5711 EOF
5712  
5713 else
5714   echo "$ac_t""no" 1>&6
5715 fi
5716 done
5717
5718 # setbuffer is needed for smbtorture
5719 for ac_func in setbuffer
5720 do
5721 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5722 echo "configure:5723: checking for $ac_func" >&5
5723 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5724   echo $ac_n "(cached) $ac_c" 1>&6
5725 else
5726   cat > conftest.$ac_ext <<EOF
5727 #line 5728 "configure"
5728 #include "confdefs.h"
5729 /* System header to define __stub macros and hopefully few prototypes,
5730     which can conflict with char $ac_func(); below.  */
5731 #include <assert.h>
5732 /* Override any gcc2 internal prototype to avoid an error.  */
5733 /* We use char because int might match the return type of a gcc2
5734     builtin and then its argument prototype would still apply.  */
5735 char $ac_func();
5736
5737 int main() {
5738
5739 /* The GNU C library defines this for functions which it implements
5740     to always fail with ENOSYS.  Some functions are actually named
5741     something starting with __ and the normal name is an alias.  */
5742 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5743 choke me
5744 #else
5745 $ac_func();
5746 #endif
5747
5748 ; return 0; }
5749 EOF
5750 if { (eval echo configure:5751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5751   rm -rf conftest*
5752   eval "ac_cv_func_$ac_func=yes"
5753 else
5754   echo "configure: failed program was:" >&5
5755   cat conftest.$ac_ext >&5
5756   rm -rf conftest*
5757   eval "ac_cv_func_$ac_func=no"
5758 fi
5759 rm -f conftest*
5760 fi
5761
5762 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5763   echo "$ac_t""yes" 1>&6
5764     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5765   cat >> confdefs.h <<EOF
5766 #define $ac_tr_func 1
5767 EOF
5768  
5769 else
5770   echo "$ac_t""no" 1>&6
5771 fi
5772 done
5773
5774
5775 # syscall() is needed for smbwrapper.
5776 for ac_func in syscall
5777 do
5778 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5779 echo "configure:5780: checking for $ac_func" >&5
5780 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5781   echo $ac_n "(cached) $ac_c" 1>&6
5782 else
5783   cat > conftest.$ac_ext <<EOF
5784 #line 5785 "configure"
5785 #include "confdefs.h"
5786 /* System header to define __stub macros and hopefully few prototypes,
5787     which can conflict with char $ac_func(); below.  */
5788 #include <assert.h>
5789 /* Override any gcc2 internal prototype to avoid an error.  */
5790 /* We use char because int might match the return type of a gcc2
5791     builtin and then its argument prototype would still apply.  */
5792 char $ac_func();
5793
5794 int main() {
5795
5796 /* The GNU C library defines this for functions which it implements
5797     to always fail with ENOSYS.  Some functions are actually named
5798     something starting with __ and the normal name is an alias.  */
5799 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5800 choke me
5801 #else
5802 $ac_func();
5803 #endif
5804
5805 ; return 0; }
5806 EOF
5807 if { (eval echo configure:5808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5808   rm -rf conftest*
5809   eval "ac_cv_func_$ac_func=yes"
5810 else
5811   echo "configure: failed program was:" >&5
5812   cat conftest.$ac_ext >&5
5813   rm -rf conftest*
5814   eval "ac_cv_func_$ac_func=no"
5815 fi
5816 rm -f conftest*
5817 fi
5818
5819 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5820   echo "$ac_t""yes" 1>&6
5821     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5822   cat >> confdefs.h <<EOF
5823 #define $ac_tr_func 1
5824 EOF
5825  
5826 else
5827   echo "$ac_t""no" 1>&6
5828 fi
5829 done
5830
5831
5832 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5833 do
5834 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5835 echo "configure:5836: checking for $ac_func" >&5
5836 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5837   echo $ac_n "(cached) $ac_c" 1>&6
5838 else
5839   cat > conftest.$ac_ext <<EOF
5840 #line 5841 "configure"
5841 #include "confdefs.h"
5842 /* System header to define __stub macros and hopefully few prototypes,
5843     which can conflict with char $ac_func(); below.  */
5844 #include <assert.h>
5845 /* Override any gcc2 internal prototype to avoid an error.  */
5846 /* We use char because int might match the return type of a gcc2
5847     builtin and then its argument prototype would still apply.  */
5848 char $ac_func();
5849
5850 int main() {
5851
5852 /* The GNU C library defines this for functions which it implements
5853     to always fail with ENOSYS.  Some functions are actually named
5854     something starting with __ and the normal name is an alias.  */
5855 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5856 choke me
5857 #else
5858 $ac_func();
5859 #endif
5860
5861 ; return 0; }
5862 EOF
5863 if { (eval echo configure:5864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5864   rm -rf conftest*
5865   eval "ac_cv_func_$ac_func=yes"
5866 else
5867   echo "configure: failed program was:" >&5
5868   cat conftest.$ac_ext >&5
5869   rm -rf conftest*
5870   eval "ac_cv_func_$ac_func=no"
5871 fi
5872 rm -f conftest*
5873 fi
5874
5875 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5876   echo "$ac_t""yes" 1>&6
5877     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5878   cat >> confdefs.h <<EOF
5879 #define $ac_tr_func 1
5880 EOF
5881  
5882 else
5883   echo "$ac_t""no" 1>&6
5884 fi
5885 done
5886
5887 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5888 do
5889 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5890 echo "configure:5891: checking for $ac_func" >&5
5891 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5892   echo $ac_n "(cached) $ac_c" 1>&6
5893 else
5894   cat > conftest.$ac_ext <<EOF
5895 #line 5896 "configure"
5896 #include "confdefs.h"
5897 /* System header to define __stub macros and hopefully few prototypes,
5898     which can conflict with char $ac_func(); below.  */
5899 #include <assert.h>
5900 /* Override any gcc2 internal prototype to avoid an error.  */
5901 /* We use char because int might match the return type of a gcc2
5902     builtin and then its argument prototype would still apply.  */
5903 char $ac_func();
5904
5905 int main() {
5906
5907 /* The GNU C library defines this for functions which it implements
5908     to always fail with ENOSYS.  Some functions are actually named
5909     something starting with __ and the normal name is an alias.  */
5910 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5911 choke me
5912 #else
5913 $ac_func();
5914 #endif
5915
5916 ; return 0; }
5917 EOF
5918 if { (eval echo configure:5919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5919   rm -rf conftest*
5920   eval "ac_cv_func_$ac_func=yes"
5921 else
5922   echo "configure: failed program was:" >&5
5923   cat conftest.$ac_ext >&5
5924   rm -rf conftest*
5925   eval "ac_cv_func_$ac_func=no"
5926 fi
5927 rm -f conftest*
5928 fi
5929
5930 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5931   echo "$ac_t""yes" 1>&6
5932     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5933   cat >> confdefs.h <<EOF
5934 #define $ac_tr_func 1
5935 EOF
5936  
5937 else
5938   echo "$ac_t""no" 1>&6
5939 fi
5940 done
5941
5942 for ac_func in __getcwd _getcwd
5943 do
5944 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5945 echo "configure:5946: checking for $ac_func" >&5
5946 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5947   echo $ac_n "(cached) $ac_c" 1>&6
5948 else
5949   cat > conftest.$ac_ext <<EOF
5950 #line 5951 "configure"
5951 #include "confdefs.h"
5952 /* System header to define __stub macros and hopefully few prototypes,
5953     which can conflict with char $ac_func(); below.  */
5954 #include <assert.h>
5955 /* Override any gcc2 internal prototype to avoid an error.  */
5956 /* We use char because int might match the return type of a gcc2
5957     builtin and then its argument prototype would still apply.  */
5958 char $ac_func();
5959
5960 int main() {
5961
5962 /* The GNU C library defines this for functions which it implements
5963     to always fail with ENOSYS.  Some functions are actually named
5964     something starting with __ and the normal name is an alias.  */
5965 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5966 choke me
5967 #else
5968 $ac_func();
5969 #endif
5970
5971 ; return 0; }
5972 EOF
5973 if { (eval echo configure:5974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5974   rm -rf conftest*
5975   eval "ac_cv_func_$ac_func=yes"
5976 else
5977   echo "configure: failed program was:" >&5
5978   cat conftest.$ac_ext >&5
5979   rm -rf conftest*
5980   eval "ac_cv_func_$ac_func=no"
5981 fi
5982 rm -f conftest*
5983 fi
5984
5985 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5986   echo "$ac_t""yes" 1>&6
5987     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5988   cat >> confdefs.h <<EOF
5989 #define $ac_tr_func 1
5990 EOF
5991  
5992 else
5993   echo "$ac_t""no" 1>&6
5994 fi
5995 done
5996
5997 for ac_func in __xstat __fxstat __lxstat
5998 do
5999 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6000 echo "configure:6001: checking for $ac_func" >&5
6001 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6002   echo $ac_n "(cached) $ac_c" 1>&6
6003 else
6004   cat > conftest.$ac_ext <<EOF
6005 #line 6006 "configure"
6006 #include "confdefs.h"
6007 /* System header to define __stub macros and hopefully few prototypes,
6008     which can conflict with char $ac_func(); below.  */
6009 #include <assert.h>
6010 /* Override any gcc2 internal prototype to avoid an error.  */
6011 /* We use char because int might match the return type of a gcc2
6012     builtin and then its argument prototype would still apply.  */
6013 char $ac_func();
6014
6015 int main() {
6016
6017 /* The GNU C library defines this for functions which it implements
6018     to always fail with ENOSYS.  Some functions are actually named
6019     something starting with __ and the normal name is an alias.  */
6020 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6021 choke me
6022 #else
6023 $ac_func();
6024 #endif
6025
6026 ; return 0; }
6027 EOF
6028 if { (eval echo configure:6029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6029   rm -rf conftest*
6030   eval "ac_cv_func_$ac_func=yes"
6031 else
6032   echo "configure: failed program was:" >&5
6033   cat conftest.$ac_ext >&5
6034   rm -rf conftest*
6035   eval "ac_cv_func_$ac_func=no"
6036 fi
6037 rm -f conftest*
6038 fi
6039
6040 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6041   echo "$ac_t""yes" 1>&6
6042     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6043   cat >> confdefs.h <<EOF
6044 #define $ac_tr_func 1
6045 EOF
6046  
6047 else
6048   echo "$ac_t""no" 1>&6
6049 fi
6050 done
6051
6052 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6053 do
6054 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6055 echo "configure:6056: checking for $ac_func" >&5
6056 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6057   echo $ac_n "(cached) $ac_c" 1>&6
6058 else
6059   cat > conftest.$ac_ext <<EOF
6060 #line 6061 "configure"
6061 #include "confdefs.h"
6062 /* System header to define __stub macros and hopefully few prototypes,
6063     which can conflict with char $ac_func(); below.  */
6064 #include <assert.h>
6065 /* Override any gcc2 internal prototype to avoid an error.  */
6066 /* We use char because int might match the return type of a gcc2
6067     builtin and then its argument prototype would still apply.  */
6068 char $ac_func();
6069
6070 int main() {
6071
6072 /* The GNU C library defines this for functions which it implements
6073     to always fail with ENOSYS.  Some functions are actually named
6074     something starting with __ and the normal name is an alias.  */
6075 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6076 choke me
6077 #else
6078 $ac_func();
6079 #endif
6080
6081 ; return 0; }
6082 EOF
6083 if { (eval echo configure:6084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6084   rm -rf conftest*
6085   eval "ac_cv_func_$ac_func=yes"
6086 else
6087   echo "configure: failed program was:" >&5
6088   cat conftest.$ac_ext >&5
6089   rm -rf conftest*
6090   eval "ac_cv_func_$ac_func=no"
6091 fi
6092 rm -f conftest*
6093 fi
6094
6095 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6096   echo "$ac_t""yes" 1>&6
6097     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6098   cat >> confdefs.h <<EOF
6099 #define $ac_tr_func 1
6100 EOF
6101  
6102 else
6103   echo "$ac_t""no" 1>&6
6104 fi
6105 done
6106
6107 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6108 do
6109 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6110 echo "configure:6111: checking for $ac_func" >&5
6111 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6112   echo $ac_n "(cached) $ac_c" 1>&6
6113 else
6114   cat > conftest.$ac_ext <<EOF
6115 #line 6116 "configure"
6116 #include "confdefs.h"
6117 /* System header to define __stub macros and hopefully few prototypes,
6118     which can conflict with char $ac_func(); below.  */
6119 #include <assert.h>
6120 /* Override any gcc2 internal prototype to avoid an error.  */
6121 /* We use char because int might match the return type of a gcc2
6122     builtin and then its argument prototype would still apply.  */
6123 char $ac_func();
6124
6125 int main() {
6126
6127 /* The GNU C library defines this for functions which it implements
6128     to always fail with ENOSYS.  Some functions are actually named
6129     something starting with __ and the normal name is an alias.  */
6130 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6131 choke me
6132 #else
6133 $ac_func();
6134 #endif
6135
6136 ; return 0; }
6137 EOF
6138 if { (eval echo configure:6139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6139   rm -rf conftest*
6140   eval "ac_cv_func_$ac_func=yes"
6141 else
6142   echo "configure: failed program was:" >&5
6143   cat conftest.$ac_ext >&5
6144   rm -rf conftest*
6145   eval "ac_cv_func_$ac_func=no"
6146 fi
6147 rm -f conftest*
6148 fi
6149
6150 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6151   echo "$ac_t""yes" 1>&6
6152     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6153   cat >> confdefs.h <<EOF
6154 #define $ac_tr_func 1
6155 EOF
6156  
6157 else
6158   echo "$ac_t""no" 1>&6
6159 fi
6160 done
6161
6162 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6163 do
6164 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6165 echo "configure:6166: checking for $ac_func" >&5
6166 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6167   echo $ac_n "(cached) $ac_c" 1>&6
6168 else
6169   cat > conftest.$ac_ext <<EOF
6170 #line 6171 "configure"
6171 #include "confdefs.h"
6172 /* System header to define __stub macros and hopefully few prototypes,
6173     which can conflict with char $ac_func(); below.  */
6174 #include <assert.h>
6175 /* Override any gcc2 internal prototype to avoid an error.  */
6176 /* We use char because int might match the return type of a gcc2
6177     builtin and then its argument prototype would still apply.  */
6178 char $ac_func();
6179
6180 int main() {
6181
6182 /* The GNU C library defines this for functions which it implements
6183     to always fail with ENOSYS.  Some functions are actually named
6184     something starting with __ and the normal name is an alias.  */
6185 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6186 choke me
6187 #else
6188 $ac_func();
6189 #endif
6190
6191 ; return 0; }
6192 EOF
6193 if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6194   rm -rf conftest*
6195   eval "ac_cv_func_$ac_func=yes"
6196 else
6197   echo "configure: failed program was:" >&5
6198   cat conftest.$ac_ext >&5
6199   rm -rf conftest*
6200   eval "ac_cv_func_$ac_func=no"
6201 fi
6202 rm -f conftest*
6203 fi
6204
6205 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6206   echo "$ac_t""yes" 1>&6
6207     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6208   cat >> confdefs.h <<EOF
6209 #define $ac_tr_func 1
6210 EOF
6211  
6212 else
6213   echo "$ac_t""no" 1>&6
6214 fi
6215 done
6216
6217 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6218 do
6219 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6220 echo "configure:6221: checking for $ac_func" >&5
6221 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6222   echo $ac_n "(cached) $ac_c" 1>&6
6223 else
6224   cat > conftest.$ac_ext <<EOF
6225 #line 6226 "configure"
6226 #include "confdefs.h"
6227 /* System header to define __stub macros and hopefully few prototypes,
6228     which can conflict with char $ac_func(); below.  */
6229 #include <assert.h>
6230 /* Override any gcc2 internal prototype to avoid an error.  */
6231 /* We use char because int might match the return type of a gcc2
6232     builtin and then its argument prototype would still apply.  */
6233 char $ac_func();
6234
6235 int main() {
6236
6237 /* The GNU C library defines this for functions which it implements
6238     to always fail with ENOSYS.  Some functions are actually named
6239     something starting with __ and the normal name is an alias.  */
6240 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6241 choke me
6242 #else
6243 $ac_func();
6244 #endif
6245
6246 ; return 0; }
6247 EOF
6248 if { (eval echo configure:6249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6249   rm -rf conftest*
6250   eval "ac_cv_func_$ac_func=yes"
6251 else
6252   echo "configure: failed program was:" >&5
6253   cat conftest.$ac_ext >&5
6254   rm -rf conftest*
6255   eval "ac_cv_func_$ac_func=no"
6256 fi
6257 rm -f conftest*
6258 fi
6259
6260 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6261   echo "$ac_t""yes" 1>&6
6262     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6263   cat >> confdefs.h <<EOF
6264 #define $ac_tr_func 1
6265 EOF
6266  
6267 else
6268   echo "$ac_t""no" 1>&6
6269 fi
6270 done
6271
6272 for ac_func in _write __write _fork __fork
6273 do
6274 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6275 echo "configure:6276: checking for $ac_func" >&5
6276 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6277   echo $ac_n "(cached) $ac_c" 1>&6
6278 else
6279   cat > conftest.$ac_ext <<EOF
6280 #line 6281 "configure"
6281 #include "confdefs.h"
6282 /* System header to define __stub macros and hopefully few prototypes,
6283     which can conflict with char $ac_func(); below.  */
6284 #include <assert.h>
6285 /* Override any gcc2 internal prototype to avoid an error.  */
6286 /* We use char because int might match the return type of a gcc2
6287     builtin and then its argument prototype would still apply.  */
6288 char $ac_func();
6289
6290 int main() {
6291
6292 /* The GNU C library defines this for functions which it implements
6293     to always fail with ENOSYS.  Some functions are actually named
6294     something starting with __ and the normal name is an alias.  */
6295 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6296 choke me
6297 #else
6298 $ac_func();
6299 #endif
6300
6301 ; return 0; }
6302 EOF
6303 if { (eval echo configure:6304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6304   rm -rf conftest*
6305   eval "ac_cv_func_$ac_func=yes"
6306 else
6307   echo "configure: failed program was:" >&5
6308   cat conftest.$ac_ext >&5
6309   rm -rf conftest*
6310   eval "ac_cv_func_$ac_func=no"
6311 fi
6312 rm -f conftest*
6313 fi
6314
6315 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6316   echo "$ac_t""yes" 1>&6
6317     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6318   cat >> confdefs.h <<EOF
6319 #define $ac_tr_func 1
6320 EOF
6321  
6322 else
6323   echo "$ac_t""no" 1>&6
6324 fi
6325 done
6326
6327 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6328 do
6329 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6330 echo "configure:6331: checking for $ac_func" >&5
6331 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6332   echo $ac_n "(cached) $ac_c" 1>&6
6333 else
6334   cat > conftest.$ac_ext <<EOF
6335 #line 6336 "configure"
6336 #include "confdefs.h"
6337 /* System header to define __stub macros and hopefully few prototypes,
6338     which can conflict with char $ac_func(); below.  */
6339 #include <assert.h>
6340 /* Override any gcc2 internal prototype to avoid an error.  */
6341 /* We use char because int might match the return type of a gcc2
6342     builtin and then its argument prototype would still apply.  */
6343 char $ac_func();
6344
6345 int main() {
6346
6347 /* The GNU C library defines this for functions which it implements
6348     to always fail with ENOSYS.  Some functions are actually named
6349     something starting with __ and the normal name is an alias.  */
6350 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6351 choke me
6352 #else
6353 $ac_func();
6354 #endif
6355
6356 ; return 0; }
6357 EOF
6358 if { (eval echo configure:6359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6359   rm -rf conftest*
6360   eval "ac_cv_func_$ac_func=yes"
6361 else
6362   echo "configure: failed program was:" >&5
6363   cat conftest.$ac_ext >&5
6364   rm -rf conftest*
6365   eval "ac_cv_func_$ac_func=no"
6366 fi
6367 rm -f conftest*
6368 fi
6369
6370 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6371   echo "$ac_t""yes" 1>&6
6372     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6373   cat >> confdefs.h <<EOF
6374 #define $ac_tr_func 1
6375 EOF
6376  
6377 else
6378   echo "$ac_t""no" 1>&6
6379 fi
6380 done
6381
6382 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6383 do
6384 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6385 echo "configure:6386: checking for $ac_func" >&5
6386 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6387   echo $ac_n "(cached) $ac_c" 1>&6
6388 else
6389   cat > conftest.$ac_ext <<EOF
6390 #line 6391 "configure"
6391 #include "confdefs.h"
6392 /* System header to define __stub macros and hopefully few prototypes,
6393     which can conflict with char $ac_func(); below.  */
6394 #include <assert.h>
6395 /* Override any gcc2 internal prototype to avoid an error.  */
6396 /* We use char because int might match the return type of a gcc2
6397     builtin and then its argument prototype would still apply.  */
6398 char $ac_func();
6399
6400 int main() {
6401
6402 /* The GNU C library defines this for functions which it implements
6403     to always fail with ENOSYS.  Some functions are actually named
6404     something starting with __ and the normal name is an alias.  */
6405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6406 choke me
6407 #else
6408 $ac_func();
6409 #endif
6410
6411 ; return 0; }
6412 EOF
6413 if { (eval echo configure:6414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6414   rm -rf conftest*
6415   eval "ac_cv_func_$ac_func=yes"
6416 else
6417   echo "configure: failed program was:" >&5
6418   cat conftest.$ac_ext >&5
6419   rm -rf conftest*
6420   eval "ac_cv_func_$ac_func=no"
6421 fi
6422 rm -f conftest*
6423 fi
6424
6425 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6426   echo "$ac_t""yes" 1>&6
6427     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6428   cat >> confdefs.h <<EOF
6429 #define $ac_tr_func 1
6430 EOF
6431  
6432 else
6433   echo "$ac_t""no" 1>&6
6434 fi
6435 done
6436
6437 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6438 do
6439 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6440 echo "configure:6441: checking for $ac_func" >&5
6441 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6442   echo $ac_n "(cached) $ac_c" 1>&6
6443 else
6444   cat > conftest.$ac_ext <<EOF
6445 #line 6446 "configure"
6446 #include "confdefs.h"
6447 /* System header to define __stub macros and hopefully few prototypes,
6448     which can conflict with char $ac_func(); below.  */
6449 #include <assert.h>
6450 /* Override any gcc2 internal prototype to avoid an error.  */
6451 /* We use char because int might match the return type of a gcc2
6452     builtin and then its argument prototype would still apply.  */
6453 char $ac_func();
6454
6455 int main() {
6456
6457 /* The GNU C library defines this for functions which it implements
6458     to always fail with ENOSYS.  Some functions are actually named
6459     something starting with __ and the normal name is an alias.  */
6460 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6461 choke me
6462 #else
6463 $ac_func();
6464 #endif
6465
6466 ; return 0; }
6467 EOF
6468 if { (eval echo configure:6469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6469   rm -rf conftest*
6470   eval "ac_cv_func_$ac_func=yes"
6471 else
6472   echo "configure: failed program was:" >&5
6473   cat conftest.$ac_ext >&5
6474   rm -rf conftest*
6475   eval "ac_cv_func_$ac_func=no"
6476 fi
6477 rm -f conftest*
6478 fi
6479
6480 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6481   echo "$ac_t""yes" 1>&6
6482     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6483   cat >> confdefs.h <<EOF
6484 #define $ac_tr_func 1
6485 EOF
6486  
6487 else
6488   echo "$ac_t""no" 1>&6
6489 fi
6490 done
6491
6492 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6493 do
6494 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6495 echo "configure:6496: checking for $ac_func" >&5
6496 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6497   echo $ac_n "(cached) $ac_c" 1>&6
6498 else
6499   cat > conftest.$ac_ext <<EOF
6500 #line 6501 "configure"
6501 #include "confdefs.h"
6502 /* System header to define __stub macros and hopefully few prototypes,
6503     which can conflict with char $ac_func(); below.  */
6504 #include <assert.h>
6505 /* Override any gcc2 internal prototype to avoid an error.  */
6506 /* We use char because int might match the return type of a gcc2
6507     builtin and then its argument prototype would still apply.  */
6508 char $ac_func();
6509
6510 int main() {
6511
6512 /* The GNU C library defines this for functions which it implements
6513     to always fail with ENOSYS.  Some functions are actually named
6514     something starting with __ and the normal name is an alias.  */
6515 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6516 choke me
6517 #else
6518 $ac_func();
6519 #endif
6520
6521 ; return 0; }
6522 EOF
6523 if { (eval echo configure:6524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6524   rm -rf conftest*
6525   eval "ac_cv_func_$ac_func=yes"
6526 else
6527   echo "configure: failed program was:" >&5
6528   cat conftest.$ac_ext >&5
6529   rm -rf conftest*
6530   eval "ac_cv_func_$ac_func=no"
6531 fi
6532 rm -f conftest*
6533 fi
6534
6535 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6536   echo "$ac_t""yes" 1>&6
6537     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6538   cat >> confdefs.h <<EOF
6539 #define $ac_tr_func 1
6540 EOF
6541  
6542 else
6543   echo "$ac_t""no" 1>&6
6544 fi
6545 done
6546
6547 for ac_func in open64 _open64 __open64 creat64
6548 do
6549 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6550 echo "configure:6551: checking for $ac_func" >&5
6551 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6552   echo $ac_n "(cached) $ac_c" 1>&6
6553 else
6554   cat > conftest.$ac_ext <<EOF
6555 #line 6556 "configure"
6556 #include "confdefs.h"
6557 /* System header to define __stub macros and hopefully few prototypes,
6558     which can conflict with char $ac_func(); below.  */
6559 #include <assert.h>
6560 /* Override any gcc2 internal prototype to avoid an error.  */
6561 /* We use char because int might match the return type of a gcc2
6562     builtin and then its argument prototype would still apply.  */
6563 char $ac_func();
6564
6565 int main() {
6566
6567 /* The GNU C library defines this for functions which it implements
6568     to always fail with ENOSYS.  Some functions are actually named
6569     something starting with __ and the normal name is an alias.  */
6570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6571 choke me
6572 #else
6573 $ac_func();
6574 #endif
6575
6576 ; return 0; }
6577 EOF
6578 if { (eval echo configure:6579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6579   rm -rf conftest*
6580   eval "ac_cv_func_$ac_func=yes"
6581 else
6582   echo "configure: failed program was:" >&5
6583   cat conftest.$ac_ext >&5
6584   rm -rf conftest*
6585   eval "ac_cv_func_$ac_func=no"
6586 fi
6587 rm -f conftest*
6588 fi
6589
6590 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6591   echo "$ac_t""yes" 1>&6
6592     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6593   cat >> confdefs.h <<EOF
6594 #define $ac_tr_func 1
6595 EOF
6596  
6597 else
6598   echo "$ac_t""no" 1>&6
6599 fi
6600 done
6601
6602
6603 #
6604 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6605 #
6606
6607 if test x$ac_cv_func_stat64 = xno ; then
6608   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6609 echo "configure:6610: checking for stat64 in <sys/stat.h>" >&5
6610   cat > conftest.$ac_ext <<EOF
6611 #line 6612 "configure"
6612 #include "confdefs.h"
6613
6614 #if defined(HAVE_UNISTD_H)
6615 #include <unistd.h>
6616 #endif
6617 #include <sys/stat.h>
6618
6619 int main() {
6620 struct stat64 st64; exit(stat64(".",&st64));
6621 ; return 0; }
6622 EOF
6623 if { (eval echo configure:6624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6624   rm -rf conftest*
6625   ac_cv_func_stat64=yes
6626 else
6627   echo "configure: failed program was:" >&5
6628   cat conftest.$ac_ext >&5
6629 fi
6630 rm -f conftest*
6631   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6632   if test x$ac_cv_func_stat64 = xyes ; then
6633     cat >> confdefs.h <<\EOF
6634 #define HAVE_STAT64 1
6635 EOF
6636
6637   fi
6638 fi
6639
6640 if test x$ac_cv_func_lstat64 = xno ; then
6641   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6642 echo "configure:6643: checking for lstat64 in <sys/stat.h>" >&5
6643   cat > conftest.$ac_ext <<EOF
6644 #line 6645 "configure"
6645 #include "confdefs.h"
6646
6647 #if defined(HAVE_UNISTD_H)
6648 #include <unistd.h>
6649 #endif
6650 #include <sys/stat.h>
6651
6652 int main() {
6653 struct stat64 st64; exit(lstat64(".",&st64));
6654 ; return 0; }
6655 EOF
6656 if { (eval echo configure:6657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6657   rm -rf conftest*
6658   ac_cv_func_lstat64=yes
6659 else
6660   echo "configure: failed program was:" >&5
6661   cat conftest.$ac_ext >&5
6662 fi
6663 rm -f conftest*
6664   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6665   if test x$ac_cv_func_lstat64 = xyes ; then
6666     cat >> confdefs.h <<\EOF
6667 #define HAVE_LSTAT64 1
6668 EOF
6669
6670   fi
6671 fi
6672
6673 if test x$ac_cv_func_fstat64 = xno ; then
6674   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6675 echo "configure:6676: checking for fstat64 in <sys/stat.h>" >&5
6676   cat > conftest.$ac_ext <<EOF
6677 #line 6678 "configure"
6678 #include "confdefs.h"
6679
6680 #if defined(HAVE_UNISTD_H)
6681 #include <unistd.h>
6682 #endif
6683 #include <sys/stat.h>
6684
6685 int main() {
6686 struct stat64 st64; exit(fstat64(0,&st64));
6687 ; return 0; }
6688 EOF
6689 if { (eval echo configure:6690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6690   rm -rf conftest*
6691   ac_cv_func_fstat64=yes
6692 else
6693   echo "configure: failed program was:" >&5
6694   cat conftest.$ac_ext >&5
6695 fi
6696 rm -f conftest*
6697   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6698   if test x$ac_cv_func_fstat64 = xyes ; then
6699     cat >> confdefs.h <<\EOF
6700 #define HAVE_FSTAT64 1
6701 EOF
6702
6703   fi
6704 fi
6705
6706 #####################################
6707 # we might need the resolv library on some systems
6708 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6709 echo "configure:6710: checking for dn_expand in -lresolv" >&5
6710 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6711 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6712   echo $ac_n "(cached) $ac_c" 1>&6
6713 else
6714   ac_save_LIBS="$LIBS"
6715 LIBS="-lresolv  $LIBS"
6716 cat > conftest.$ac_ext <<EOF
6717 #line 6718 "configure"
6718 #include "confdefs.h"
6719 /* Override any gcc2 internal prototype to avoid an error.  */
6720 /* We use char because int might match the return type of a gcc2
6721     builtin and then its argument prototype would still apply.  */
6722 char dn_expand();
6723
6724 int main() {
6725 dn_expand()
6726 ; return 0; }
6727 EOF
6728 if { (eval echo configure:6729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6729   rm -rf conftest*
6730   eval "ac_cv_lib_$ac_lib_var=yes"
6731 else
6732   echo "configure: failed program was:" >&5
6733   cat conftest.$ac_ext >&5
6734   rm -rf conftest*
6735   eval "ac_cv_lib_$ac_lib_var=no"
6736 fi
6737 rm -f conftest*
6738 LIBS="$ac_save_LIBS"
6739
6740 fi
6741 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6742   echo "$ac_t""yes" 1>&6
6743     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6744     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6745   cat >> confdefs.h <<EOF
6746 #define $ac_tr_lib 1
6747 EOF
6748
6749   LIBS="-lresolv $LIBS"
6750
6751 else
6752   echo "$ac_t""no" 1>&6
6753 fi
6754
6755
6756 #
6757 # Check for the functions putprpwnam, set_auth_parameters,
6758 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6759 # Needed for OSF1 and HPUX.
6760 #
6761
6762 case "$LIBS" in
6763   *-lsecurity*) for ac_func in putprpwnam
6764 do
6765 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6766 echo "configure:6767: checking for $ac_func" >&5
6767 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6768   echo $ac_n "(cached) $ac_c" 1>&6
6769 else
6770   cat > conftest.$ac_ext <<EOF
6771 #line 6772 "configure"
6772 #include "confdefs.h"
6773 /* System header to define __stub macros and hopefully few prototypes,
6774     which can conflict with char $ac_func(); below.  */
6775 #include <assert.h>
6776 /* Override any gcc2 internal prototype to avoid an error.  */
6777 /* We use char because int might match the return type of a gcc2
6778     builtin and then its argument prototype would still apply.  */
6779 char $ac_func();
6780
6781 int main() {
6782
6783 /* The GNU C library defines this for functions which it implements
6784     to always fail with ENOSYS.  Some functions are actually named
6785     something starting with __ and the normal name is an alias.  */
6786 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6787 choke me
6788 #else
6789 $ac_func();
6790 #endif
6791
6792 ; return 0; }
6793 EOF
6794 if { (eval echo configure:6795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6795   rm -rf conftest*
6796   eval "ac_cv_func_$ac_func=yes"
6797 else
6798   echo "configure: failed program was:" >&5
6799   cat conftest.$ac_ext >&5
6800   rm -rf conftest*
6801   eval "ac_cv_func_$ac_func=no"
6802 fi
6803 rm -f conftest*
6804 fi
6805
6806 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6807   echo "$ac_t""yes" 1>&6
6808     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6809   cat >> confdefs.h <<EOF
6810 #define $ac_tr_func 1
6811 EOF
6812  
6813 else
6814   echo "$ac_t""no" 1>&6
6815 fi
6816 done
6817  ;;
6818   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6819 echo "configure:6820: checking for putprpwnam in -lsecurity" >&5
6820 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6821 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6822   echo $ac_n "(cached) $ac_c" 1>&6
6823 else
6824   ac_save_LIBS="$LIBS"
6825 LIBS="-lsecurity  $LIBS"
6826 cat > conftest.$ac_ext <<EOF
6827 #line 6828 "configure"
6828 #include "confdefs.h"
6829 /* Override any gcc2 internal prototype to avoid an error.  */
6830 /* We use char because int might match the return type of a gcc2
6831     builtin and then its argument prototype would still apply.  */
6832 char putprpwnam();
6833
6834 int main() {
6835 putprpwnam()
6836 ; return 0; }
6837 EOF
6838 if { (eval echo configure:6839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6839   rm -rf conftest*
6840   eval "ac_cv_lib_$ac_lib_var=yes"
6841 else
6842   echo "configure: failed program was:" >&5
6843   cat conftest.$ac_ext >&5
6844   rm -rf conftest*
6845   eval "ac_cv_lib_$ac_lib_var=no"
6846 fi
6847 rm -f conftest*
6848 LIBS="$ac_save_LIBS"
6849
6850 fi
6851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6852   echo "$ac_t""yes" 1>&6
6853     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6854     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6855   cat >> confdefs.h <<EOF
6856 #define $ac_tr_lib 1
6857 EOF
6858
6859   LIBS="-lsecurity $LIBS"
6860
6861 else
6862   echo "$ac_t""no" 1>&6
6863 fi
6864  
6865      for ac_func in putprpwnam
6866 do
6867 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6868 echo "configure:6869: checking for $ac_func" >&5
6869 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6870   echo $ac_n "(cached) $ac_c" 1>&6
6871 else
6872   cat > conftest.$ac_ext <<EOF
6873 #line 6874 "configure"
6874 #include "confdefs.h"
6875 /* System header to define __stub macros and hopefully few prototypes,
6876     which can conflict with char $ac_func(); below.  */
6877 #include <assert.h>
6878 /* Override any gcc2 internal prototype to avoid an error.  */
6879 /* We use char because int might match the return type of a gcc2
6880     builtin and then its argument prototype would still apply.  */
6881 char $ac_func();
6882
6883 int main() {
6884
6885 /* The GNU C library defines this for functions which it implements
6886     to always fail with ENOSYS.  Some functions are actually named
6887     something starting with __ and the normal name is an alias.  */
6888 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6889 choke me
6890 #else
6891 $ac_func();
6892 #endif
6893
6894 ; return 0; }
6895 EOF
6896 if { (eval echo configure:6897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6897   rm -rf conftest*
6898   eval "ac_cv_func_$ac_func=yes"
6899 else
6900   echo "configure: failed program was:" >&5
6901   cat conftest.$ac_ext >&5
6902   rm -rf conftest*
6903   eval "ac_cv_func_$ac_func=no"
6904 fi
6905 rm -f conftest*
6906 fi
6907
6908 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6909   echo "$ac_t""yes" 1>&6
6910     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6911   cat >> confdefs.h <<EOF
6912 #define $ac_tr_func 1
6913 EOF
6914  
6915 else
6916   echo "$ac_t""no" 1>&6
6917 fi
6918 done
6919
6920   ;;
6921   esac
6922
6923 case "$LIBS" in
6924   *-lsec*) for ac_func in putprpwnam
6925 do
6926 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6927 echo "configure:6928: checking for $ac_func" >&5
6928 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6929   echo $ac_n "(cached) $ac_c" 1>&6
6930 else
6931   cat > conftest.$ac_ext <<EOF
6932 #line 6933 "configure"
6933 #include "confdefs.h"
6934 /* System header to define __stub macros and hopefully few prototypes,
6935     which can conflict with char $ac_func(); below.  */
6936 #include <assert.h>
6937 /* Override any gcc2 internal prototype to avoid an error.  */
6938 /* We use char because int might match the return type of a gcc2
6939     builtin and then its argument prototype would still apply.  */
6940 char $ac_func();
6941
6942 int main() {
6943
6944 /* The GNU C library defines this for functions which it implements
6945     to always fail with ENOSYS.  Some functions are actually named
6946     something starting with __ and the normal name is an alias.  */
6947 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6948 choke me
6949 #else
6950 $ac_func();
6951 #endif
6952
6953 ; return 0; }
6954 EOF
6955 if { (eval echo configure:6956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6956   rm -rf conftest*
6957   eval "ac_cv_func_$ac_func=yes"
6958 else
6959   echo "configure: failed program was:" >&5
6960   cat conftest.$ac_ext >&5
6961   rm -rf conftest*
6962   eval "ac_cv_func_$ac_func=no"
6963 fi
6964 rm -f conftest*
6965 fi
6966
6967 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6968   echo "$ac_t""yes" 1>&6
6969     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6970   cat >> confdefs.h <<EOF
6971 #define $ac_tr_func 1
6972 EOF
6973  
6974 else
6975   echo "$ac_t""no" 1>&6
6976 fi
6977 done
6978  ;;
6979   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6980 echo "configure:6981: checking for putprpwnam in -lsec" >&5
6981 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6982 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6983   echo $ac_n "(cached) $ac_c" 1>&6
6984 else
6985   ac_save_LIBS="$LIBS"
6986 LIBS="-lsec  $LIBS"
6987 cat > conftest.$ac_ext <<EOF
6988 #line 6989 "configure"
6989 #include "confdefs.h"
6990 /* Override any gcc2 internal prototype to avoid an error.  */
6991 /* We use char because int might match the return type of a gcc2
6992     builtin and then its argument prototype would still apply.  */
6993 char putprpwnam();
6994
6995 int main() {
6996 putprpwnam()
6997 ; return 0; }
6998 EOF
6999 if { (eval echo configure:7000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7000   rm -rf conftest*
7001   eval "ac_cv_lib_$ac_lib_var=yes"
7002 else
7003   echo "configure: failed program was:" >&5
7004   cat conftest.$ac_ext >&5
7005   rm -rf conftest*
7006   eval "ac_cv_lib_$ac_lib_var=no"
7007 fi
7008 rm -f conftest*
7009 LIBS="$ac_save_LIBS"
7010
7011 fi
7012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7013   echo "$ac_t""yes" 1>&6
7014     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7015     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7016   cat >> confdefs.h <<EOF
7017 #define $ac_tr_lib 1
7018 EOF
7019
7020   LIBS="-lsec $LIBS"
7021
7022 else
7023   echo "$ac_t""no" 1>&6
7024 fi
7025  
7026      for ac_func in putprpwnam
7027 do
7028 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7029 echo "configure:7030: checking for $ac_func" >&5
7030 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7031   echo $ac_n "(cached) $ac_c" 1>&6
7032 else
7033   cat > conftest.$ac_ext <<EOF
7034 #line 7035 "configure"
7035 #include "confdefs.h"
7036 /* System header to define __stub macros and hopefully few prototypes,
7037     which can conflict with char $ac_func(); below.  */
7038 #include <assert.h>
7039 /* Override any gcc2 internal prototype to avoid an error.  */
7040 /* We use char because int might match the return type of a gcc2
7041     builtin and then its argument prototype would still apply.  */
7042 char $ac_func();
7043
7044 int main() {
7045
7046 /* The GNU C library defines this for functions which it implements
7047     to always fail with ENOSYS.  Some functions are actually named
7048     something starting with __ and the normal name is an alias.  */
7049 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7050 choke me
7051 #else
7052 $ac_func();
7053 #endif
7054
7055 ; return 0; }
7056 EOF
7057 if { (eval echo configure:7058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7058   rm -rf conftest*
7059   eval "ac_cv_func_$ac_func=yes"
7060 else
7061   echo "configure: failed program was:" >&5
7062   cat conftest.$ac_ext >&5
7063   rm -rf conftest*
7064   eval "ac_cv_func_$ac_func=no"
7065 fi
7066 rm -f conftest*
7067 fi
7068
7069 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7070   echo "$ac_t""yes" 1>&6
7071     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7072   cat >> confdefs.h <<EOF
7073 #define $ac_tr_func 1
7074 EOF
7075  
7076 else
7077   echo "$ac_t""no" 1>&6
7078 fi
7079 done
7080
7081   ;;
7082   esac
7083
7084
7085 case "$LIBS" in
7086   *-lsecurity*) for ac_func in set_auth_parameters
7087 do
7088 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7089 echo "configure:7090: checking for $ac_func" >&5
7090 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7091   echo $ac_n "(cached) $ac_c" 1>&6
7092 else
7093   cat > conftest.$ac_ext <<EOF
7094 #line 7095 "configure"
7095 #include "confdefs.h"
7096 /* System header to define __stub macros and hopefully few prototypes,
7097     which can conflict with char $ac_func(); below.  */
7098 #include <assert.h>
7099 /* Override any gcc2 internal prototype to avoid an error.  */
7100 /* We use char because int might match the return type of a gcc2
7101     builtin and then its argument prototype would still apply.  */
7102 char $ac_func();
7103
7104 int main() {
7105
7106 /* The GNU C library defines this for functions which it implements
7107     to always fail with ENOSYS.  Some functions are actually named
7108     something starting with __ and the normal name is an alias.  */
7109 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7110 choke me
7111 #else
7112 $ac_func();
7113 #endif
7114
7115 ; return 0; }
7116 EOF
7117 if { (eval echo configure:7118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7118   rm -rf conftest*
7119   eval "ac_cv_func_$ac_func=yes"
7120 else
7121   echo "configure: failed program was:" >&5
7122   cat conftest.$ac_ext >&5
7123   rm -rf conftest*
7124   eval "ac_cv_func_$ac_func=no"
7125 fi
7126 rm -f conftest*
7127 fi
7128
7129 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7130   echo "$ac_t""yes" 1>&6
7131     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7132   cat >> confdefs.h <<EOF
7133 #define $ac_tr_func 1
7134 EOF
7135  
7136 else
7137   echo "$ac_t""no" 1>&6
7138 fi
7139 done
7140  ;;
7141   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7142 echo "configure:7143: checking for set_auth_parameters in -lsecurity" >&5
7143 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7144 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7145   echo $ac_n "(cached) $ac_c" 1>&6
7146 else
7147   ac_save_LIBS="$LIBS"
7148 LIBS="-lsecurity  $LIBS"
7149 cat > conftest.$ac_ext <<EOF
7150 #line 7151 "configure"
7151 #include "confdefs.h"
7152 /* Override any gcc2 internal prototype to avoid an error.  */
7153 /* We use char because int might match the return type of a gcc2
7154     builtin and then its argument prototype would still apply.  */
7155 char set_auth_parameters();
7156
7157 int main() {
7158 set_auth_parameters()
7159 ; return 0; }
7160 EOF
7161 if { (eval echo configure:7162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7162   rm -rf conftest*
7163   eval "ac_cv_lib_$ac_lib_var=yes"
7164 else
7165   echo "configure: failed program was:" >&5
7166   cat conftest.$ac_ext >&5
7167   rm -rf conftest*
7168   eval "ac_cv_lib_$ac_lib_var=no"
7169 fi
7170 rm -f conftest*
7171 LIBS="$ac_save_LIBS"
7172
7173 fi
7174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7175   echo "$ac_t""yes" 1>&6
7176     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7177     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7178   cat >> confdefs.h <<EOF
7179 #define $ac_tr_lib 1
7180 EOF
7181
7182   LIBS="-lsecurity $LIBS"
7183
7184 else
7185   echo "$ac_t""no" 1>&6
7186 fi
7187  
7188      for ac_func in set_auth_parameters
7189 do
7190 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7191 echo "configure:7192: checking for $ac_func" >&5
7192 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7193   echo $ac_n "(cached) $ac_c" 1>&6
7194 else
7195   cat > conftest.$ac_ext <<EOF
7196 #line 7197 "configure"
7197 #include "confdefs.h"
7198 /* System header to define __stub macros and hopefully few prototypes,
7199     which can conflict with char $ac_func(); below.  */
7200 #include <assert.h>
7201 /* Override any gcc2 internal prototype to avoid an error.  */
7202 /* We use char because int might match the return type of a gcc2
7203     builtin and then its argument prototype would still apply.  */
7204 char $ac_func();
7205
7206 int main() {
7207
7208 /* The GNU C library defines this for functions which it implements
7209     to always fail with ENOSYS.  Some functions are actually named
7210     something starting with __ and the normal name is an alias.  */
7211 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7212 choke me
7213 #else
7214 $ac_func();
7215 #endif
7216
7217 ; return 0; }
7218 EOF
7219 if { (eval echo configure:7220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7220   rm -rf conftest*
7221   eval "ac_cv_func_$ac_func=yes"
7222 else
7223   echo "configure: failed program was:" >&5
7224   cat conftest.$ac_ext >&5
7225   rm -rf conftest*
7226   eval "ac_cv_func_$ac_func=no"
7227 fi
7228 rm -f conftest*
7229 fi
7230
7231 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7232   echo "$ac_t""yes" 1>&6
7233     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7234   cat >> confdefs.h <<EOF
7235 #define $ac_tr_func 1
7236 EOF
7237  
7238 else
7239   echo "$ac_t""no" 1>&6
7240 fi
7241 done
7242
7243   ;;
7244   esac
7245
7246 case "$LIBS" in
7247   *-lsec*) for ac_func in set_auth_parameters
7248 do
7249 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7250 echo "configure:7251: checking for $ac_func" >&5
7251 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7252   echo $ac_n "(cached) $ac_c" 1>&6
7253 else
7254   cat > conftest.$ac_ext <<EOF
7255 #line 7256 "configure"
7256 #include "confdefs.h"
7257 /* System header to define __stub macros and hopefully few prototypes,
7258     which can conflict with char $ac_func(); below.  */
7259 #include <assert.h>
7260 /* Override any gcc2 internal prototype to avoid an error.  */
7261 /* We use char because int might match the return type of a gcc2
7262     builtin and then its argument prototype would still apply.  */
7263 char $ac_func();
7264
7265 int main() {
7266
7267 /* The GNU C library defines this for functions which it implements
7268     to always fail with ENOSYS.  Some functions are actually named
7269     something starting with __ and the normal name is an alias.  */
7270 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7271 choke me
7272 #else
7273 $ac_func();
7274 #endif
7275
7276 ; return 0; }
7277 EOF
7278 if { (eval echo configure:7279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7279   rm -rf conftest*
7280   eval "ac_cv_func_$ac_func=yes"
7281 else
7282   echo "configure: failed program was:" >&5
7283   cat conftest.$ac_ext >&5
7284   rm -rf conftest*
7285   eval "ac_cv_func_$ac_func=no"
7286 fi
7287 rm -f conftest*
7288 fi
7289
7290 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7291   echo "$ac_t""yes" 1>&6
7292     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7293   cat >> confdefs.h <<EOF
7294 #define $ac_tr_func 1
7295 EOF
7296  
7297 else
7298   echo "$ac_t""no" 1>&6
7299 fi
7300 done
7301  ;;
7302   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7303 echo "configure:7304: checking for set_auth_parameters in -lsec" >&5
7304 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7305 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7306   echo $ac_n "(cached) $ac_c" 1>&6
7307 else
7308   ac_save_LIBS="$LIBS"
7309 LIBS="-lsec  $LIBS"
7310 cat > conftest.$ac_ext <<EOF
7311 #line 7312 "configure"
7312 #include "confdefs.h"
7313 /* Override any gcc2 internal prototype to avoid an error.  */
7314 /* We use char because int might match the return type of a gcc2
7315     builtin and then its argument prototype would still apply.  */
7316 char set_auth_parameters();
7317
7318 int main() {
7319 set_auth_parameters()
7320 ; return 0; }
7321 EOF
7322 if { (eval echo configure:7323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7323   rm -rf conftest*
7324   eval "ac_cv_lib_$ac_lib_var=yes"
7325 else
7326   echo "configure: failed program was:" >&5
7327   cat conftest.$ac_ext >&5
7328   rm -rf conftest*
7329   eval "ac_cv_lib_$ac_lib_var=no"
7330 fi
7331 rm -f conftest*
7332 LIBS="$ac_save_LIBS"
7333
7334 fi
7335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7336   echo "$ac_t""yes" 1>&6
7337     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7338     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7339   cat >> confdefs.h <<EOF
7340 #define $ac_tr_lib 1
7341 EOF
7342
7343   LIBS="-lsec $LIBS"
7344
7345 else
7346   echo "$ac_t""no" 1>&6
7347 fi
7348  
7349      for ac_func in set_auth_parameters
7350 do
7351 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7352 echo "configure:7353: checking for $ac_func" >&5
7353 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7354   echo $ac_n "(cached) $ac_c" 1>&6
7355 else
7356   cat > conftest.$ac_ext <<EOF
7357 #line 7358 "configure"
7358 #include "confdefs.h"
7359 /* System header to define __stub macros and hopefully few prototypes,
7360     which can conflict with char $ac_func(); below.  */
7361 #include <assert.h>
7362 /* Override any gcc2 internal prototype to avoid an error.  */
7363 /* We use char because int might match the return type of a gcc2
7364     builtin and then its argument prototype would still apply.  */
7365 char $ac_func();
7366
7367 int main() {
7368
7369 /* The GNU C library defines this for functions which it implements
7370     to always fail with ENOSYS.  Some functions are actually named
7371     something starting with __ and the normal name is an alias.  */
7372 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7373 choke me
7374 #else
7375 $ac_func();
7376 #endif
7377
7378 ; return 0; }
7379 EOF
7380 if { (eval echo configure:7381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7381   rm -rf conftest*
7382   eval "ac_cv_func_$ac_func=yes"
7383 else
7384   echo "configure: failed program was:" >&5
7385   cat conftest.$ac_ext >&5
7386   rm -rf conftest*
7387   eval "ac_cv_func_$ac_func=no"
7388 fi
7389 rm -f conftest*
7390 fi
7391
7392 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7393   echo "$ac_t""yes" 1>&6
7394     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7395   cat >> confdefs.h <<EOF
7396 #define $ac_tr_func 1
7397 EOF
7398  
7399 else
7400   echo "$ac_t""no" 1>&6
7401 fi
7402 done
7403
7404   ;;
7405   esac
7406
7407
7408 # UnixWare 7.x has its getspnam in -lgen
7409 case "$LIBS" in
7410   *-lgen*) for ac_func in getspnam
7411 do
7412 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7413 echo "configure:7414: checking for $ac_func" >&5
7414 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7415   echo $ac_n "(cached) $ac_c" 1>&6
7416 else
7417   cat > conftest.$ac_ext <<EOF
7418 #line 7419 "configure"
7419 #include "confdefs.h"
7420 /* System header to define __stub macros and hopefully few prototypes,
7421     which can conflict with char $ac_func(); below.  */
7422 #include <assert.h>
7423 /* Override any gcc2 internal prototype to avoid an error.  */
7424 /* We use char because int might match the return type of a gcc2
7425     builtin and then its argument prototype would still apply.  */
7426 char $ac_func();
7427
7428 int main() {
7429
7430 /* The GNU C library defines this for functions which it implements
7431     to always fail with ENOSYS.  Some functions are actually named
7432     something starting with __ and the normal name is an alias.  */
7433 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7434 choke me
7435 #else
7436 $ac_func();
7437 #endif
7438
7439 ; return 0; }
7440 EOF
7441 if { (eval echo configure:7442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7442   rm -rf conftest*
7443   eval "ac_cv_func_$ac_func=yes"
7444 else
7445   echo "configure: failed program was:" >&5
7446   cat conftest.$ac_ext >&5
7447   rm -rf conftest*
7448   eval "ac_cv_func_$ac_func=no"
7449 fi
7450 rm -f conftest*
7451 fi
7452
7453 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7454   echo "$ac_t""yes" 1>&6
7455     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7456   cat >> confdefs.h <<EOF
7457 #define $ac_tr_func 1
7458 EOF
7459  
7460 else
7461   echo "$ac_t""no" 1>&6
7462 fi
7463 done
7464  ;;
7465   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7466 echo "configure:7467: checking for getspnam in -lgen" >&5
7467 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7468 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7469   echo $ac_n "(cached) $ac_c" 1>&6
7470 else
7471   ac_save_LIBS="$LIBS"
7472 LIBS="-lgen  $LIBS"
7473 cat > conftest.$ac_ext <<EOF
7474 #line 7475 "configure"
7475 #include "confdefs.h"
7476 /* Override any gcc2 internal prototype to avoid an error.  */
7477 /* We use char because int might match the return type of a gcc2
7478     builtin and then its argument prototype would still apply.  */
7479 char getspnam();
7480
7481 int main() {
7482 getspnam()
7483 ; return 0; }
7484 EOF
7485 if { (eval echo configure:7486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7486   rm -rf conftest*
7487   eval "ac_cv_lib_$ac_lib_var=yes"
7488 else
7489   echo "configure: failed program was:" >&5
7490   cat conftest.$ac_ext >&5
7491   rm -rf conftest*
7492   eval "ac_cv_lib_$ac_lib_var=no"
7493 fi
7494 rm -f conftest*
7495 LIBS="$ac_save_LIBS"
7496
7497 fi
7498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7499   echo "$ac_t""yes" 1>&6
7500     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7501     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7502   cat >> confdefs.h <<EOF
7503 #define $ac_tr_lib 1
7504 EOF
7505
7506   LIBS="-lgen $LIBS"
7507
7508 else
7509   echo "$ac_t""no" 1>&6
7510 fi
7511  
7512      for ac_func in getspnam
7513 do
7514 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7515 echo "configure:7516: checking for $ac_func" >&5
7516 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7517   echo $ac_n "(cached) $ac_c" 1>&6
7518 else
7519   cat > conftest.$ac_ext <<EOF
7520 #line 7521 "configure"
7521 #include "confdefs.h"
7522 /* System header to define __stub macros and hopefully few prototypes,
7523     which can conflict with char $ac_func(); below.  */
7524 #include <assert.h>
7525 /* Override any gcc2 internal prototype to avoid an error.  */
7526 /* We use char because int might match the return type of a gcc2
7527     builtin and then its argument prototype would still apply.  */
7528 char $ac_func();
7529
7530 int main() {
7531
7532 /* The GNU C library defines this for functions which it implements
7533     to always fail with ENOSYS.  Some functions are actually named
7534     something starting with __ and the normal name is an alias.  */
7535 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7536 choke me
7537 #else
7538 $ac_func();
7539 #endif
7540
7541 ; return 0; }
7542 EOF
7543 if { (eval echo configure:7544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7544   rm -rf conftest*
7545   eval "ac_cv_func_$ac_func=yes"
7546 else
7547   echo "configure: failed program was:" >&5
7548   cat conftest.$ac_ext >&5
7549   rm -rf conftest*
7550   eval "ac_cv_func_$ac_func=no"
7551 fi
7552 rm -f conftest*
7553 fi
7554
7555 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7556   echo "$ac_t""yes" 1>&6
7557     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7558   cat >> confdefs.h <<EOF
7559 #define $ac_tr_func 1
7560 EOF
7561  
7562 else
7563   echo "$ac_t""no" 1>&6
7564 fi
7565 done
7566
7567   ;;
7568   esac
7569
7570
7571 case "$LIBS" in
7572   *-lsecurity*) for ac_func in getspnam
7573 do
7574 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7575 echo "configure:7576: checking for $ac_func" >&5
7576 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7577   echo $ac_n "(cached) $ac_c" 1>&6
7578 else
7579   cat > conftest.$ac_ext <<EOF
7580 #line 7581 "configure"
7581 #include "confdefs.h"
7582 /* System header to define __stub macros and hopefully few prototypes,
7583     which can conflict with char $ac_func(); below.  */
7584 #include <assert.h>
7585 /* Override any gcc2 internal prototype to avoid an error.  */
7586 /* We use char because int might match the return type of a gcc2
7587     builtin and then its argument prototype would still apply.  */
7588 char $ac_func();
7589
7590 int main() {
7591
7592 /* The GNU C library defines this for functions which it implements
7593     to always fail with ENOSYS.  Some functions are actually named
7594     something starting with __ and the normal name is an alias.  */
7595 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7596 choke me
7597 #else
7598 $ac_func();
7599 #endif
7600
7601 ; return 0; }
7602 EOF
7603 if { (eval echo configure:7604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7604   rm -rf conftest*
7605   eval "ac_cv_func_$ac_func=yes"
7606 else
7607   echo "configure: failed program was:" >&5
7608   cat conftest.$ac_ext >&5
7609   rm -rf conftest*
7610   eval "ac_cv_func_$ac_func=no"
7611 fi
7612 rm -f conftest*
7613 fi
7614
7615 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7616   echo "$ac_t""yes" 1>&6
7617     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7618   cat >> confdefs.h <<EOF
7619 #define $ac_tr_func 1
7620 EOF
7621  
7622 else
7623   echo "$ac_t""no" 1>&6
7624 fi
7625 done
7626  ;;
7627   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7628 echo "configure:7629: checking for getspnam in -lsecurity" >&5
7629 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7630 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7631   echo $ac_n "(cached) $ac_c" 1>&6
7632 else
7633   ac_save_LIBS="$LIBS"
7634 LIBS="-lsecurity  $LIBS"
7635 cat > conftest.$ac_ext <<EOF
7636 #line 7637 "configure"
7637 #include "confdefs.h"
7638 /* Override any gcc2 internal prototype to avoid an error.  */
7639 /* We use char because int might match the return type of a gcc2
7640     builtin and then its argument prototype would still apply.  */
7641 char getspnam();
7642
7643 int main() {
7644 getspnam()
7645 ; return 0; }
7646 EOF
7647 if { (eval echo configure:7648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7648   rm -rf conftest*
7649   eval "ac_cv_lib_$ac_lib_var=yes"
7650 else
7651   echo "configure: failed program was:" >&5
7652   cat conftest.$ac_ext >&5
7653   rm -rf conftest*
7654   eval "ac_cv_lib_$ac_lib_var=no"
7655 fi
7656 rm -f conftest*
7657 LIBS="$ac_save_LIBS"
7658
7659 fi
7660 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7661   echo "$ac_t""yes" 1>&6
7662     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7663     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7664   cat >> confdefs.h <<EOF
7665 #define $ac_tr_lib 1
7666 EOF
7667
7668   LIBS="-lsecurity $LIBS"
7669
7670 else
7671   echo "$ac_t""no" 1>&6
7672 fi
7673  
7674      for ac_func in getspnam
7675 do
7676 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7677 echo "configure:7678: checking for $ac_func" >&5
7678 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7679   echo $ac_n "(cached) $ac_c" 1>&6
7680 else
7681   cat > conftest.$ac_ext <<EOF
7682 #line 7683 "configure"
7683 #include "confdefs.h"
7684 /* System header to define __stub macros and hopefully few prototypes,
7685     which can conflict with char $ac_func(); below.  */
7686 #include <assert.h>
7687 /* Override any gcc2 internal prototype to avoid an error.  */
7688 /* We use char because int might match the return type of a gcc2
7689     builtin and then its argument prototype would still apply.  */
7690 char $ac_func();
7691
7692 int main() {
7693
7694 /* The GNU C library defines this for functions which it implements
7695     to always fail with ENOSYS.  Some functions are actually named
7696     something starting with __ and the normal name is an alias.  */
7697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7698 choke me
7699 #else
7700 $ac_func();
7701 #endif
7702
7703 ; return 0; }
7704 EOF
7705 if { (eval echo configure:7706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7706   rm -rf conftest*
7707   eval "ac_cv_func_$ac_func=yes"
7708 else
7709   echo "configure: failed program was:" >&5
7710   cat conftest.$ac_ext >&5
7711   rm -rf conftest*
7712   eval "ac_cv_func_$ac_func=no"
7713 fi
7714 rm -f conftest*
7715 fi
7716
7717 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7718   echo "$ac_t""yes" 1>&6
7719     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7720   cat >> confdefs.h <<EOF
7721 #define $ac_tr_func 1
7722 EOF
7723  
7724 else
7725   echo "$ac_t""no" 1>&6
7726 fi
7727 done
7728
7729   ;;
7730   esac
7731
7732 case "$LIBS" in
7733   *-lsec*) for ac_func in getspnam
7734 do
7735 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7736 echo "configure:7737: checking for $ac_func" >&5
7737 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7738   echo $ac_n "(cached) $ac_c" 1>&6
7739 else
7740   cat > conftest.$ac_ext <<EOF
7741 #line 7742 "configure"
7742 #include "confdefs.h"
7743 /* System header to define __stub macros and hopefully few prototypes,
7744     which can conflict with char $ac_func(); below.  */
7745 #include <assert.h>
7746 /* Override any gcc2 internal prototype to avoid an error.  */
7747 /* We use char because int might match the return type of a gcc2
7748     builtin and then its argument prototype would still apply.  */
7749 char $ac_func();
7750
7751 int main() {
7752
7753 /* The GNU C library defines this for functions which it implements
7754     to always fail with ENOSYS.  Some functions are actually named
7755     something starting with __ and the normal name is an alias.  */
7756 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7757 choke me
7758 #else
7759 $ac_func();
7760 #endif
7761
7762 ; return 0; }
7763 EOF
7764 if { (eval echo configure:7765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7765   rm -rf conftest*
7766   eval "ac_cv_func_$ac_func=yes"
7767 else
7768   echo "configure: failed program was:" >&5
7769   cat conftest.$ac_ext >&5
7770   rm -rf conftest*
7771   eval "ac_cv_func_$ac_func=no"
7772 fi
7773 rm -f conftest*
7774 fi
7775
7776 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7777   echo "$ac_t""yes" 1>&6
7778     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7779   cat >> confdefs.h <<EOF
7780 #define $ac_tr_func 1
7781 EOF
7782  
7783 else
7784   echo "$ac_t""no" 1>&6
7785 fi
7786 done
7787  ;;
7788   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7789 echo "configure:7790: checking for getspnam in -lsec" >&5
7790 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7791 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7792   echo $ac_n "(cached) $ac_c" 1>&6
7793 else
7794   ac_save_LIBS="$LIBS"
7795 LIBS="-lsec  $LIBS"
7796 cat > conftest.$ac_ext <<EOF
7797 #line 7798 "configure"
7798 #include "confdefs.h"
7799 /* Override any gcc2 internal prototype to avoid an error.  */
7800 /* We use char because int might match the return type of a gcc2
7801     builtin and then its argument prototype would still apply.  */
7802 char getspnam();
7803
7804 int main() {
7805 getspnam()
7806 ; return 0; }
7807 EOF
7808 if { (eval echo configure:7809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7809   rm -rf conftest*
7810   eval "ac_cv_lib_$ac_lib_var=yes"
7811 else
7812   echo "configure: failed program was:" >&5
7813   cat conftest.$ac_ext >&5
7814   rm -rf conftest*
7815   eval "ac_cv_lib_$ac_lib_var=no"
7816 fi
7817 rm -f conftest*
7818 LIBS="$ac_save_LIBS"
7819
7820 fi
7821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7822   echo "$ac_t""yes" 1>&6
7823     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7824     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7825   cat >> confdefs.h <<EOF
7826 #define $ac_tr_lib 1
7827 EOF
7828
7829   LIBS="-lsec $LIBS"
7830
7831 else
7832   echo "$ac_t""no" 1>&6
7833 fi
7834  
7835      for ac_func in getspnam
7836 do
7837 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7838 echo "configure:7839: checking for $ac_func" >&5
7839 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7840   echo $ac_n "(cached) $ac_c" 1>&6
7841 else
7842   cat > conftest.$ac_ext <<EOF
7843 #line 7844 "configure"
7844 #include "confdefs.h"
7845 /* System header to define __stub macros and hopefully few prototypes,
7846     which can conflict with char $ac_func(); below.  */
7847 #include <assert.h>
7848 /* Override any gcc2 internal prototype to avoid an error.  */
7849 /* We use char because int might match the return type of a gcc2
7850     builtin and then its argument prototype would still apply.  */
7851 char $ac_func();
7852
7853 int main() {
7854
7855 /* The GNU C library defines this for functions which it implements
7856     to always fail with ENOSYS.  Some functions are actually named
7857     something starting with __ and the normal name is an alias.  */
7858 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7859 choke me
7860 #else
7861 $ac_func();
7862 #endif
7863
7864 ; return 0; }
7865 EOF
7866 if { (eval echo configure:7867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7867   rm -rf conftest*
7868   eval "ac_cv_func_$ac_func=yes"
7869 else
7870   echo "configure: failed program was:" >&5
7871   cat conftest.$ac_ext >&5
7872   rm -rf conftest*
7873   eval "ac_cv_func_$ac_func=no"
7874 fi
7875 rm -f conftest*
7876 fi
7877
7878 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7879   echo "$ac_t""yes" 1>&6
7880     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7881   cat >> confdefs.h <<EOF
7882 #define $ac_tr_func 1
7883 EOF
7884  
7885 else
7886   echo "$ac_t""no" 1>&6
7887 fi
7888 done
7889
7890   ;;
7891   esac
7892
7893
7894 case "$LIBS" in
7895   *-lsecurity*) for ac_func in bigcrypt
7896 do
7897 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7898 echo "configure:7899: checking for $ac_func" >&5
7899 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7900   echo $ac_n "(cached) $ac_c" 1>&6
7901 else
7902   cat > conftest.$ac_ext <<EOF
7903 #line 7904 "configure"
7904 #include "confdefs.h"
7905 /* System header to define __stub macros and hopefully few prototypes,
7906     which can conflict with char $ac_func(); below.  */
7907 #include <assert.h>
7908 /* Override any gcc2 internal prototype to avoid an error.  */
7909 /* We use char because int might match the return type of a gcc2
7910     builtin and then its argument prototype would still apply.  */
7911 char $ac_func();
7912
7913 int main() {
7914
7915 /* The GNU C library defines this for functions which it implements
7916     to always fail with ENOSYS.  Some functions are actually named
7917     something starting with __ and the normal name is an alias.  */
7918 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7919 choke me
7920 #else
7921 $ac_func();
7922 #endif
7923
7924 ; return 0; }
7925 EOF
7926 if { (eval echo configure:7927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7927   rm -rf conftest*
7928   eval "ac_cv_func_$ac_func=yes"
7929 else
7930   echo "configure: failed program was:" >&5
7931   cat conftest.$ac_ext >&5
7932   rm -rf conftest*
7933   eval "ac_cv_func_$ac_func=no"
7934 fi
7935 rm -f conftest*
7936 fi
7937
7938 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7939   echo "$ac_t""yes" 1>&6
7940     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7941   cat >> confdefs.h <<EOF
7942 #define $ac_tr_func 1
7943 EOF
7944  
7945 else
7946   echo "$ac_t""no" 1>&6
7947 fi
7948 done
7949  ;;
7950   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7951 echo "configure:7952: checking for bigcrypt in -lsecurity" >&5
7952 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7953 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7954   echo $ac_n "(cached) $ac_c" 1>&6
7955 else
7956   ac_save_LIBS="$LIBS"
7957 LIBS="-lsecurity  $LIBS"
7958 cat > conftest.$ac_ext <<EOF
7959 #line 7960 "configure"
7960 #include "confdefs.h"
7961 /* Override any gcc2 internal prototype to avoid an error.  */
7962 /* We use char because int might match the return type of a gcc2
7963     builtin and then its argument prototype would still apply.  */
7964 char bigcrypt();
7965
7966 int main() {
7967 bigcrypt()
7968 ; return 0; }
7969 EOF
7970 if { (eval echo configure:7971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7971   rm -rf conftest*
7972   eval "ac_cv_lib_$ac_lib_var=yes"
7973 else
7974   echo "configure: failed program was:" >&5
7975   cat conftest.$ac_ext >&5
7976   rm -rf conftest*
7977   eval "ac_cv_lib_$ac_lib_var=no"
7978 fi
7979 rm -f conftest*
7980 LIBS="$ac_save_LIBS"
7981
7982 fi
7983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7984   echo "$ac_t""yes" 1>&6
7985     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7986     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7987   cat >> confdefs.h <<EOF
7988 #define $ac_tr_lib 1
7989 EOF
7990
7991   LIBS="-lsecurity $LIBS"
7992
7993 else
7994   echo "$ac_t""no" 1>&6
7995 fi
7996  
7997      for ac_func in bigcrypt
7998 do
7999 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8000 echo "configure:8001: checking for $ac_func" >&5
8001 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8002   echo $ac_n "(cached) $ac_c" 1>&6
8003 else
8004   cat > conftest.$ac_ext <<EOF
8005 #line 8006 "configure"
8006 #include "confdefs.h"
8007 /* System header to define __stub macros and hopefully few prototypes,
8008     which can conflict with char $ac_func(); below.  */
8009 #include <assert.h>
8010 /* Override any gcc2 internal prototype to avoid an error.  */
8011 /* We use char because int might match the return type of a gcc2
8012     builtin and then its argument prototype would still apply.  */
8013 char $ac_func();
8014
8015 int main() {
8016
8017 /* The GNU C library defines this for functions which it implements
8018     to always fail with ENOSYS.  Some functions are actually named
8019     something starting with __ and the normal name is an alias.  */
8020 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8021 choke me
8022 #else
8023 $ac_func();
8024 #endif
8025
8026 ; return 0; }
8027 EOF
8028 if { (eval echo configure:8029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8029   rm -rf conftest*
8030   eval "ac_cv_func_$ac_func=yes"
8031 else
8032   echo "configure: failed program was:" >&5
8033   cat conftest.$ac_ext >&5
8034   rm -rf conftest*
8035   eval "ac_cv_func_$ac_func=no"
8036 fi
8037 rm -f conftest*
8038 fi
8039
8040 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8041   echo "$ac_t""yes" 1>&6
8042     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8043   cat >> confdefs.h <<EOF
8044 #define $ac_tr_func 1
8045 EOF
8046  
8047 else
8048   echo "$ac_t""no" 1>&6
8049 fi
8050 done
8051
8052   ;;
8053   esac
8054
8055 case "$LIBS" in
8056   *-lsec*) for ac_func in bigcrypt
8057 do
8058 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8059 echo "configure:8060: checking for $ac_func" >&5
8060 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8061   echo $ac_n "(cached) $ac_c" 1>&6
8062 else
8063   cat > conftest.$ac_ext <<EOF
8064 #line 8065 "configure"
8065 #include "confdefs.h"
8066 /* System header to define __stub macros and hopefully few prototypes,
8067     which can conflict with char $ac_func(); below.  */
8068 #include <assert.h>
8069 /* Override any gcc2 internal prototype to avoid an error.  */
8070 /* We use char because int might match the return type of a gcc2
8071     builtin and then its argument prototype would still apply.  */
8072 char $ac_func();
8073
8074 int main() {
8075
8076 /* The GNU C library defines this for functions which it implements
8077     to always fail with ENOSYS.  Some functions are actually named
8078     something starting with __ and the normal name is an alias.  */
8079 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8080 choke me
8081 #else
8082 $ac_func();
8083 #endif
8084
8085 ; return 0; }
8086 EOF
8087 if { (eval echo configure:8088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8088   rm -rf conftest*
8089   eval "ac_cv_func_$ac_func=yes"
8090 else
8091   echo "configure: failed program was:" >&5
8092   cat conftest.$ac_ext >&5
8093   rm -rf conftest*
8094   eval "ac_cv_func_$ac_func=no"
8095 fi
8096 rm -f conftest*
8097 fi
8098
8099 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8100   echo "$ac_t""yes" 1>&6
8101     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8102   cat >> confdefs.h <<EOF
8103 #define $ac_tr_func 1
8104 EOF
8105  
8106 else
8107   echo "$ac_t""no" 1>&6
8108 fi
8109 done
8110  ;;
8111   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8112 echo "configure:8113: checking for bigcrypt in -lsec" >&5
8113 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8114 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8115   echo $ac_n "(cached) $ac_c" 1>&6
8116 else
8117   ac_save_LIBS="$LIBS"
8118 LIBS="-lsec  $LIBS"
8119 cat > conftest.$ac_ext <<EOF
8120 #line 8121 "configure"
8121 #include "confdefs.h"
8122 /* Override any gcc2 internal prototype to avoid an error.  */
8123 /* We use char because int might match the return type of a gcc2
8124     builtin and then its argument prototype would still apply.  */
8125 char bigcrypt();
8126
8127 int main() {
8128 bigcrypt()
8129 ; return 0; }
8130 EOF
8131 if { (eval echo configure:8132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8132   rm -rf conftest*
8133   eval "ac_cv_lib_$ac_lib_var=yes"
8134 else
8135   echo "configure: failed program was:" >&5
8136   cat conftest.$ac_ext >&5
8137   rm -rf conftest*
8138   eval "ac_cv_lib_$ac_lib_var=no"
8139 fi
8140 rm -f conftest*
8141 LIBS="$ac_save_LIBS"
8142
8143 fi
8144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8145   echo "$ac_t""yes" 1>&6
8146     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8147     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8148   cat >> confdefs.h <<EOF
8149 #define $ac_tr_lib 1
8150 EOF
8151
8152   LIBS="-lsec $LIBS"
8153
8154 else
8155   echo "$ac_t""no" 1>&6
8156 fi
8157  
8158      for ac_func in bigcrypt
8159 do
8160 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8161 echo "configure:8162: checking for $ac_func" >&5
8162 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8163   echo $ac_n "(cached) $ac_c" 1>&6
8164 else
8165   cat > conftest.$ac_ext <<EOF
8166 #line 8167 "configure"
8167 #include "confdefs.h"
8168 /* System header to define __stub macros and hopefully few prototypes,
8169     which can conflict with char $ac_func(); below.  */
8170 #include <assert.h>
8171 /* Override any gcc2 internal prototype to avoid an error.  */
8172 /* We use char because int might match the return type of a gcc2
8173     builtin and then its argument prototype would still apply.  */
8174 char $ac_func();
8175
8176 int main() {
8177
8178 /* The GNU C library defines this for functions which it implements
8179     to always fail with ENOSYS.  Some functions are actually named
8180     something starting with __ and the normal name is an alias.  */
8181 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8182 choke me
8183 #else
8184 $ac_func();
8185 #endif
8186
8187 ; return 0; }
8188 EOF
8189 if { (eval echo configure:8190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8190   rm -rf conftest*
8191   eval "ac_cv_func_$ac_func=yes"
8192 else
8193   echo "configure: failed program was:" >&5
8194   cat conftest.$ac_ext >&5
8195   rm -rf conftest*
8196   eval "ac_cv_func_$ac_func=no"
8197 fi
8198 rm -f conftest*
8199 fi
8200
8201 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8202   echo "$ac_t""yes" 1>&6
8203     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8204   cat >> confdefs.h <<EOF
8205 #define $ac_tr_func 1
8206 EOF
8207  
8208 else
8209   echo "$ac_t""no" 1>&6
8210 fi
8211 done
8212
8213   ;;
8214   esac
8215
8216
8217 case "$LIBS" in
8218   *-lsecurity*) for ac_func in getprpwnam
8219 do
8220 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8221 echo "configure:8222: checking for $ac_func" >&5
8222 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8223   echo $ac_n "(cached) $ac_c" 1>&6
8224 else
8225   cat > conftest.$ac_ext <<EOF
8226 #line 8227 "configure"
8227 #include "confdefs.h"
8228 /* System header to define __stub macros and hopefully few prototypes,
8229     which can conflict with char $ac_func(); below.  */
8230 #include <assert.h>
8231 /* Override any gcc2 internal prototype to avoid an error.  */
8232 /* We use char because int might match the return type of a gcc2
8233     builtin and then its argument prototype would still apply.  */
8234 char $ac_func();
8235
8236 int main() {
8237
8238 /* The GNU C library defines this for functions which it implements
8239     to always fail with ENOSYS.  Some functions are actually named
8240     something starting with __ and the normal name is an alias.  */
8241 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8242 choke me
8243 #else
8244 $ac_func();
8245 #endif
8246
8247 ; return 0; }
8248 EOF
8249 if { (eval echo configure:8250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8250   rm -rf conftest*
8251   eval "ac_cv_func_$ac_func=yes"
8252 else
8253   echo "configure: failed program was:" >&5
8254   cat conftest.$ac_ext >&5
8255   rm -rf conftest*
8256   eval "ac_cv_func_$ac_func=no"
8257 fi
8258 rm -f conftest*
8259 fi
8260
8261 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8262   echo "$ac_t""yes" 1>&6
8263     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8264   cat >> confdefs.h <<EOF
8265 #define $ac_tr_func 1
8266 EOF
8267  
8268 else
8269   echo "$ac_t""no" 1>&6
8270 fi
8271 done
8272  ;;
8273   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8274 echo "configure:8275: checking for getprpwnam in -lsecurity" >&5
8275 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8276 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8277   echo $ac_n "(cached) $ac_c" 1>&6
8278 else
8279   ac_save_LIBS="$LIBS"
8280 LIBS="-lsecurity  $LIBS"
8281 cat > conftest.$ac_ext <<EOF
8282 #line 8283 "configure"
8283 #include "confdefs.h"
8284 /* Override any gcc2 internal prototype to avoid an error.  */
8285 /* We use char because int might match the return type of a gcc2
8286     builtin and then its argument prototype would still apply.  */
8287 char getprpwnam();
8288
8289 int main() {
8290 getprpwnam()
8291 ; return 0; }
8292 EOF
8293 if { (eval echo configure:8294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8294   rm -rf conftest*
8295   eval "ac_cv_lib_$ac_lib_var=yes"
8296 else
8297   echo "configure: failed program was:" >&5
8298   cat conftest.$ac_ext >&5
8299   rm -rf conftest*
8300   eval "ac_cv_lib_$ac_lib_var=no"
8301 fi
8302 rm -f conftest*
8303 LIBS="$ac_save_LIBS"
8304
8305 fi
8306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8307   echo "$ac_t""yes" 1>&6
8308     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8309     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8310   cat >> confdefs.h <<EOF
8311 #define $ac_tr_lib 1
8312 EOF
8313
8314   LIBS="-lsecurity $LIBS"
8315
8316 else
8317   echo "$ac_t""no" 1>&6
8318 fi
8319  
8320      for ac_func in getprpwnam
8321 do
8322 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8323 echo "configure:8324: checking for $ac_func" >&5
8324 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8325   echo $ac_n "(cached) $ac_c" 1>&6
8326 else
8327   cat > conftest.$ac_ext <<EOF
8328 #line 8329 "configure"
8329 #include "confdefs.h"
8330 /* System header to define __stub macros and hopefully few prototypes,
8331     which can conflict with char $ac_func(); below.  */
8332 #include <assert.h>
8333 /* Override any gcc2 internal prototype to avoid an error.  */
8334 /* We use char because int might match the return type of a gcc2
8335     builtin and then its argument prototype would still apply.  */
8336 char $ac_func();
8337
8338 int main() {
8339
8340 /* The GNU C library defines this for functions which it implements
8341     to always fail with ENOSYS.  Some functions are actually named
8342     something starting with __ and the normal name is an alias.  */
8343 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8344 choke me
8345 #else
8346 $ac_func();
8347 #endif
8348
8349 ; return 0; }
8350 EOF
8351 if { (eval echo configure:8352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8352   rm -rf conftest*
8353   eval "ac_cv_func_$ac_func=yes"
8354 else
8355   echo "configure: failed program was:" >&5
8356   cat conftest.$ac_ext >&5
8357   rm -rf conftest*
8358   eval "ac_cv_func_$ac_func=no"
8359 fi
8360 rm -f conftest*
8361 fi
8362
8363 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8364   echo "$ac_t""yes" 1>&6
8365     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8366   cat >> confdefs.h <<EOF
8367 #define $ac_tr_func 1
8368 EOF
8369  
8370 else
8371   echo "$ac_t""no" 1>&6
8372 fi
8373 done
8374
8375   ;;
8376   esac
8377
8378 case "$LIBS" in
8379   *-lsec*) for ac_func in getprpwnam
8380 do
8381 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8382 echo "configure:8383: checking for $ac_func" >&5
8383 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8384   echo $ac_n "(cached) $ac_c" 1>&6
8385 else
8386   cat > conftest.$ac_ext <<EOF
8387 #line 8388 "configure"
8388 #include "confdefs.h"
8389 /* System header to define __stub macros and hopefully few prototypes,
8390     which can conflict with char $ac_func(); below.  */
8391 #include <assert.h>
8392 /* Override any gcc2 internal prototype to avoid an error.  */
8393 /* We use char because int might match the return type of a gcc2
8394     builtin and then its argument prototype would still apply.  */
8395 char $ac_func();
8396
8397 int main() {
8398
8399 /* The GNU C library defines this for functions which it implements
8400     to always fail with ENOSYS.  Some functions are actually named
8401     something starting with __ and the normal name is an alias.  */
8402 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8403 choke me
8404 #else
8405 $ac_func();
8406 #endif
8407
8408 ; return 0; }
8409 EOF
8410 if { (eval echo configure:8411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8411   rm -rf conftest*
8412   eval "ac_cv_func_$ac_func=yes"
8413 else
8414   echo "configure: failed program was:" >&5
8415   cat conftest.$ac_ext >&5
8416   rm -rf conftest*
8417   eval "ac_cv_func_$ac_func=no"
8418 fi
8419 rm -f conftest*
8420 fi
8421
8422 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8423   echo "$ac_t""yes" 1>&6
8424     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8425   cat >> confdefs.h <<EOF
8426 #define $ac_tr_func 1
8427 EOF
8428  
8429 else
8430   echo "$ac_t""no" 1>&6
8431 fi
8432 done
8433  ;;
8434   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8435 echo "configure:8436: checking for getprpwnam in -lsec" >&5
8436 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8437 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8438   echo $ac_n "(cached) $ac_c" 1>&6
8439 else
8440   ac_save_LIBS="$LIBS"
8441 LIBS="-lsec  $LIBS"
8442 cat > conftest.$ac_ext <<EOF
8443 #line 8444 "configure"
8444 #include "confdefs.h"
8445 /* Override any gcc2 internal prototype to avoid an error.  */
8446 /* We use char because int might match the return type of a gcc2
8447     builtin and then its argument prototype would still apply.  */
8448 char getprpwnam();
8449
8450 int main() {
8451 getprpwnam()
8452 ; return 0; }
8453 EOF
8454 if { (eval echo configure:8455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8455   rm -rf conftest*
8456   eval "ac_cv_lib_$ac_lib_var=yes"
8457 else
8458   echo "configure: failed program was:" >&5
8459   cat conftest.$ac_ext >&5
8460   rm -rf conftest*
8461   eval "ac_cv_lib_$ac_lib_var=no"
8462 fi
8463 rm -f conftest*
8464 LIBS="$ac_save_LIBS"
8465
8466 fi
8467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8468   echo "$ac_t""yes" 1>&6
8469     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8470     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8471   cat >> confdefs.h <<EOF
8472 #define $ac_tr_lib 1
8473 EOF
8474
8475   LIBS="-lsec $LIBS"
8476
8477 else
8478   echo "$ac_t""no" 1>&6
8479 fi
8480  
8481      for ac_func in getprpwnam
8482 do
8483 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8484 echo "configure:8485: checking for $ac_func" >&5
8485 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8486   echo $ac_n "(cached) $ac_c" 1>&6
8487 else
8488   cat > conftest.$ac_ext <<EOF
8489 #line 8490 "configure"
8490 #include "confdefs.h"
8491 /* System header to define __stub macros and hopefully few prototypes,
8492     which can conflict with char $ac_func(); below.  */
8493 #include <assert.h>
8494 /* Override any gcc2 internal prototype to avoid an error.  */
8495 /* We use char because int might match the return type of a gcc2
8496     builtin and then its argument prototype would still apply.  */
8497 char $ac_func();
8498
8499 int main() {
8500
8501 /* The GNU C library defines this for functions which it implements
8502     to always fail with ENOSYS.  Some functions are actually named
8503     something starting with __ and the normal name is an alias.  */
8504 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8505 choke me
8506 #else
8507 $ac_func();
8508 #endif
8509
8510 ; return 0; }
8511 EOF
8512 if { (eval echo configure:8513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8513   rm -rf conftest*
8514   eval "ac_cv_func_$ac_func=yes"
8515 else
8516   echo "configure: failed program was:" >&5
8517   cat conftest.$ac_ext >&5
8518   rm -rf conftest*
8519   eval "ac_cv_func_$ac_func=no"
8520 fi
8521 rm -f conftest*
8522 fi
8523
8524 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8525   echo "$ac_t""yes" 1>&6
8526     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8527   cat >> confdefs.h <<EOF
8528 #define $ac_tr_func 1
8529 EOF
8530  
8531 else
8532   echo "$ac_t""no" 1>&6
8533 fi
8534 done
8535
8536   ;;
8537   esac
8538
8539
8540 # this bit needs to be modified for each OS that is suported by
8541 # smbwrapper. You need to specify how to created a shared library and
8542 # how to compile C code to produce PIC object files
8543
8544 # these are the defaults, good for lots of systems
8545 HOST_OS="$host_os"
8546 LDSHFLAGS="-shared"
8547 SHLD="\${CC}"
8548 PICFLAG=""
8549 PICSUFFIX="po"
8550 POBAD_CC="#"
8551 SHLIBEXT="so"
8552 # Assume non-shared by default and override below
8553 BLDSHARED="false"
8554 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8555 echo "configure:8556: checking ability to build shared libraries" >&5
8556
8557 # and these are for particular systems
8558 case "$host_os" in
8559                 *linux*)   cat >> confdefs.h <<\EOF
8560 #define LINUX 1
8561 EOF
8562
8563                         BLDSHARED="true"
8564                         LDSHFLAGS="-shared" 
8565                         PICFLAG="-fPIC"
8566                         cat >> confdefs.h <<\EOF
8567 #define STAT_ST_BLOCKSIZE 512
8568 EOF
8569
8570                 ;;
8571                 *solaris*) cat >> confdefs.h <<\EOF
8572 #define SUNOS5 1
8573 EOF
8574
8575                         BLDSHARED="true"
8576                         LDSHFLAGS="-h \$@ -G"
8577                         if test "${ac_cv_prog_CC}" = "gcc"; then
8578                                 PICFLAG="-fPIC"
8579                         else
8580                                 PICFLAG="-KPIC"
8581                                 POBAD_CC=""
8582                                 PICSUFFIX="po.o"
8583                         fi
8584                         cat >> confdefs.h <<\EOF
8585 #define STAT_ST_BLOCKSIZE 512
8586 EOF
8587
8588                 ;;
8589                 *sunos*) cat >> confdefs.h <<\EOF
8590 #define SUNOS4 1
8591 EOF
8592
8593                         BLDSHARED="true"
8594                         LDSHFLAGS="-Wl,-h,\$@ -G"
8595                         PICFLAG="-KPIC"   # Is this correct for SunOS
8596                 ;;
8597                 *bsd*)  BLDSHARED="true"
8598                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8599                         PICFLAG="-fPIC"
8600                         cat >> confdefs.h <<\EOF
8601 #define STAT_ST_BLOCKSIZE 512
8602 EOF
8603
8604                 ;;
8605                 *irix*) cat >> confdefs.h <<\EOF
8606 #define IRIX 1
8607 EOF
8608
8609                         case "$host_os" in
8610                         *irix6*) cat >> confdefs.h <<\EOF
8611 #define IRIX6 1
8612 EOF
8613
8614                         ;;
8615                         esac
8616                         ATTEMPT_WRAP32_BUILD=yes
8617                         BLDSHARED="true"
8618                         LDSHFLAGS="-soname \$@ -shared"
8619                         SHLD="\${LD}"
8620                         if test "${ac_cv_prog_CC}" = "gcc"; then
8621                                 PICFLAG="-fPIC"
8622                         else 
8623                                 PICFLAG="-KPIC"
8624                         fi
8625                         cat >> confdefs.h <<\EOF
8626 #define STAT_ST_BLOCKSIZE 512
8627 EOF
8628
8629                 ;;
8630                 *aix*) cat >> confdefs.h <<\EOF
8631 #define AIX 1
8632 EOF
8633
8634                         BLDSHARED="true"
8635                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8636                         PICFLAG="-O2 -qmaxmem=6000"
8637                         cat >> confdefs.h <<\EOF
8638 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8639 EOF
8640
8641                 ;;
8642                 *hpux*) cat >> confdefs.h <<\EOF
8643 #define HPUX 1
8644 EOF
8645
8646                         SHLIBEXT="sl"
8647                         # Use special PIC flags for the native HP-UX compiler.
8648                         if test $ac_cv_prog_cc_Ae = yes; then
8649                                 #BLDSHARED="true"
8650                                 LDSHFLAGS="-b -z +h \$@"
8651                                 PICFLAG="+z"
8652                         fi
8653                         cat >> confdefs.h <<\EOF
8654 #define STAT_ST_BLOCKSIZE 8192
8655 EOF
8656
8657                 ;;
8658                 *qnx*) cat >> confdefs.h <<\EOF
8659 #define QNX 1
8660 EOF
8661 ;;
8662                 *osf*) cat >> confdefs.h <<\EOF
8663 #define OSF1 1
8664 EOF
8665
8666                         BLDSHARED="true"
8667                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8668                         PICFLAG="-fPIC"
8669                 ;;
8670                 *sco*) cat >> confdefs.h <<\EOF
8671 #define SCO 1
8672 EOF
8673 ;;
8674                 *unixware*) cat >> confdefs.h <<\EOF
8675 #define UNIXWARE 1
8676 EOF
8677
8678                         BLDSHARED="true"
8679                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8680                         PICFLAG="-KPIC"
8681                 ;;
8682                 *next2*) cat >> confdefs.h <<\EOF
8683 #define NEXT2 1
8684 EOF
8685 ;;
8686                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8687 set dummy groff; ac_word=$2
8688 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8689 echo "configure:8690: checking for $ac_word" >&5
8690 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8691   echo $ac_n "(cached) $ac_c" 1>&6
8692 else
8693   if test -n "$ROFF"; then
8694   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8695 else
8696   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8697   ac_dummy="$PATH"
8698   for ac_dir in $ac_dummy; do
8699     test -z "$ac_dir" && ac_dir=.
8700     if test -f $ac_dir/$ac_word; then
8701       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8702       break
8703     fi
8704   done
8705   IFS="$ac_save_ifs"
8706 fi
8707 fi
8708 ROFF="$ac_cv_prog_ROFF"
8709 if test -n "$ROFF"; then
8710   echo "$ac_t""$ROFF" 1>&6
8711 else
8712   echo "$ac_t""no" 1>&6
8713 fi
8714 ;;
8715                 *sysv4*)
8716                         case "$host" in
8717                                 *-univel-*)     if  test "$GCC" != yes ; then
8718                                                                         cat >> confdefs.h <<\EOF
8719 #define HAVE_MEMSET 1
8720 EOF
8721
8722                                                                 fi
8723                                                                 LDSHFLAGS="-G"
8724                                 ;;
8725                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8726 #define RELIANTUNIX 1
8727 EOF
8728 ;;
8729                         esac
8730                         ;;
8731                 *sysv5*)
8732                         if  test "$GCC" != yes ; then
8733                                 cat >> confdefs.h <<\EOF
8734 #define HAVE_MEMSET 1
8735 EOF
8736
8737                         fi
8738                         LDSHFLAGS="-G"
8739                         ;;
8740 esac
8741 echo "$ac_t""$BLDSHARED" 1>&6
8742 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
8743 echo "configure:8744: checking linker flags for shared libraries" >&5
8744 echo "$ac_t""$LDSHFLAGS" 1>&6
8745 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
8746 echo "configure:8747: checking compiler flags for position-independent code" >&5
8747 echo "$ac_t""$PICFLAGS" 1>&6
8748
8749 #######################################################
8750 # test whether building a shared library actually works
8751 if test $BLDSHARED = true; then
8752 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
8753 echo "configure:8754: checking whether building shared libraries actually works" >&5
8754 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
8755   echo $ac_n "(cached) $ac_c" 1>&6
8756 else
8757   
8758    ac_cv_shlib_works=no
8759    # try building a trivial shared library
8760    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
8761      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
8762      ac_cv_shlib_works=yes
8763    rm -f shlib.so shlib.po
8764
8765 fi
8766
8767 echo "$ac_t""$ac_cv_shlib_works" 1>&6
8768 if test $ac_cv_shlib_works = no; then
8769    BLDSHARED=false
8770 fi
8771 fi
8772
8773
8774 # this updates our target list if we can build shared libs
8775 if test $BLDSHARED = true; then
8776    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8777 else
8778    LIBSMBCLIENT_SHARED=
8779 fi
8780
8781 ################
8782
8783 echo $ac_n "checking for long long""... $ac_c" 1>&6
8784 echo "configure:8785: checking for long long" >&5
8785 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8786   echo $ac_n "(cached) $ac_c" 1>&6
8787 else
8788   
8789 if test "$cross_compiling" = yes; then
8790   samba_cv_have_longlong=cross
8791 else
8792   cat > conftest.$ac_ext <<EOF
8793 #line 8794 "configure"
8794 #include "confdefs.h"
8795 #include <stdio.h>
8796 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8797 EOF
8798 if { (eval echo configure:8799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8799 then
8800   samba_cv_have_longlong=yes
8801 else
8802   echo "configure: failed program was:" >&5
8803   cat conftest.$ac_ext >&5
8804   rm -fr conftest*
8805   samba_cv_have_longlong=no
8806 fi
8807 rm -fr conftest*
8808 fi
8809
8810 fi
8811
8812 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8813 if test x"$samba_cv_have_longlong" = x"yes"; then
8814     cat >> confdefs.h <<\EOF
8815 #define HAVE_LONGLONG 1
8816 EOF
8817
8818 fi
8819
8820 #
8821 # Check if the compiler supports the LL prefix on long long integers.
8822 # AIX needs this.
8823
8824 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8825 echo "configure:8826: checking for LL suffix on long long integers" >&5
8826 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8827   echo $ac_n "(cached) $ac_c" 1>&6
8828 else
8829   
8830     cat > conftest.$ac_ext <<EOF
8831 #line 8832 "configure"
8832 #include "confdefs.h"
8833 #include <stdio.h>
8834 int main() {
8835 long long i = 0x8000000000LL
8836 ; return 0; }
8837 EOF
8838 if { (eval echo configure:8839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8839   rm -rf conftest*
8840   samba_cv_compiler_supports_ll=yes
8841 else
8842   echo "configure: failed program was:" >&5
8843   cat conftest.$ac_ext >&5
8844   rm -rf conftest*
8845   samba_cv_compiler_supports_ll=no
8846 fi
8847 rm -f conftest*
8848 fi
8849
8850 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8851 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8852    cat >> confdefs.h <<\EOF
8853 #define COMPILER_SUPPORTS_LL 1
8854 EOF
8855
8856 fi
8857
8858   
8859 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8860 echo "configure:8861: checking for 64 bit off_t" >&5
8861 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8862   echo $ac_n "(cached) $ac_c" 1>&6
8863 else
8864   
8865 if test "$cross_compiling" = yes; then
8866   samba_cv_SIZEOF_OFF_T=cross
8867 else
8868   cat > conftest.$ac_ext <<EOF
8869 #line 8870 "configure"
8870 #include "confdefs.h"
8871 #include <stdio.h>
8872 #include <sys/stat.h>
8873 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8874 EOF
8875 if { (eval echo configure:8876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8876 then
8877   samba_cv_SIZEOF_OFF_T=yes
8878 else
8879   echo "configure: failed program was:" >&5
8880   cat conftest.$ac_ext >&5
8881   rm -fr conftest*
8882   samba_cv_SIZEOF_OFF_T=no
8883 fi
8884 rm -fr conftest*
8885 fi
8886
8887 fi
8888
8889 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8890 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8891     cat >> confdefs.h <<\EOF
8892 #define SIZEOF_OFF_T 8
8893 EOF
8894
8895 fi
8896
8897 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8898 echo "configure:8899: checking for off64_t" >&5
8899 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8900   echo $ac_n "(cached) $ac_c" 1>&6
8901 else
8902   
8903 if test "$cross_compiling" = yes; then
8904   samba_cv_HAVE_OFF64_T=cross
8905 else
8906   cat > conftest.$ac_ext <<EOF
8907 #line 8908 "configure"
8908 #include "confdefs.h"
8909
8910 #if defined(HAVE_UNISTD_H)
8911 #include <unistd.h>
8912 #endif
8913 #include <stdio.h>
8914 #include <sys/stat.h>
8915 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8916 EOF
8917 if { (eval echo configure:8918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8918 then
8919   samba_cv_HAVE_OFF64_T=yes
8920 else
8921   echo "configure: failed program was:" >&5
8922   cat conftest.$ac_ext >&5
8923   rm -fr conftest*
8924   samba_cv_HAVE_OFF64_T=no
8925 fi
8926 rm -fr conftest*
8927 fi
8928
8929 fi
8930
8931 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8932 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8933     cat >> confdefs.h <<\EOF
8934 #define HAVE_OFF64_T 1
8935 EOF
8936
8937 fi
8938
8939 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8940 echo "configure:8941: checking for 64 bit ino_t" >&5
8941 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8942   echo $ac_n "(cached) $ac_c" 1>&6
8943 else
8944   
8945 if test "$cross_compiling" = yes; then
8946   samba_cv_SIZEOF_INO_T=cross
8947 else
8948   cat > conftest.$ac_ext <<EOF
8949 #line 8950 "configure"
8950 #include "confdefs.h"
8951 #include <stdio.h>
8952 #include <sys/stat.h>
8953 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8954 EOF
8955 if { (eval echo configure:8956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8956 then
8957   samba_cv_SIZEOF_INO_T=yes
8958 else
8959   echo "configure: failed program was:" >&5
8960   cat conftest.$ac_ext >&5
8961   rm -fr conftest*
8962   samba_cv_SIZEOF_INO_T=no
8963 fi
8964 rm -fr conftest*
8965 fi
8966
8967 fi
8968
8969 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8970 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8971     cat >> confdefs.h <<\EOF
8972 #define SIZEOF_INO_T 8
8973 EOF
8974
8975 fi
8976
8977 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8978 echo "configure:8979: checking for ino64_t" >&5
8979 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8980   echo $ac_n "(cached) $ac_c" 1>&6
8981 else
8982   
8983 if test "$cross_compiling" = yes; then
8984   samba_cv_HAVE_INO64_T=cross
8985 else
8986   cat > conftest.$ac_ext <<EOF
8987 #line 8988 "configure"
8988 #include "confdefs.h"
8989
8990 #if defined(HAVE_UNISTD_H)
8991 #include <unistd.h>
8992 #endif
8993 #include <stdio.h>
8994 #include <sys/stat.h>
8995 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8996 EOF
8997 if { (eval echo configure:8998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8998 then
8999   samba_cv_HAVE_INO64_T=yes
9000 else
9001   echo "configure: failed program was:" >&5
9002   cat conftest.$ac_ext >&5
9003   rm -fr conftest*
9004   samba_cv_HAVE_INO64_T=no
9005 fi
9006 rm -fr conftest*
9007 fi
9008
9009 fi
9010
9011 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9012 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9013     cat >> confdefs.h <<\EOF
9014 #define HAVE_INO64_T 1
9015 EOF
9016
9017 fi
9018
9019 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9020 echo "configure:9021: checking for dev64_t" >&5
9021 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9022   echo $ac_n "(cached) $ac_c" 1>&6
9023 else
9024   
9025 if test "$cross_compiling" = yes; then
9026   samba_cv_HAVE_DEV64_T=cross
9027 else
9028   cat > conftest.$ac_ext <<EOF
9029 #line 9030 "configure"
9030 #include "confdefs.h"
9031
9032 #if defined(HAVE_UNISTD_H)
9033 #include <unistd.h>
9034 #endif
9035 #include <stdio.h>
9036 #include <sys/stat.h>
9037 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9038 EOF
9039 if { (eval echo configure:9040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9040 then
9041   samba_cv_HAVE_DEV64_T=yes
9042 else
9043   echo "configure: failed program was:" >&5
9044   cat conftest.$ac_ext >&5
9045   rm -fr conftest*
9046   samba_cv_HAVE_DEV64_T=no
9047 fi
9048 rm -fr conftest*
9049 fi
9050
9051 fi
9052
9053 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9054 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9055     cat >> confdefs.h <<\EOF
9056 #define HAVE_DEV64_T 1
9057 EOF
9058
9059 fi
9060
9061 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9062 echo "configure:9063: checking for struct dirent64" >&5
9063 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9064   echo $ac_n "(cached) $ac_c" 1>&6
9065 else
9066   
9067 cat > conftest.$ac_ext <<EOF
9068 #line 9069 "configure"
9069 #include "confdefs.h"
9070
9071 #if defined(HAVE_UNISTD_H)
9072 #include <unistd.h>
9073 #endif
9074 #include <sys/types.h>
9075 #include <dirent.h>
9076 int main() {
9077 struct dirent64 de;
9078 ; return 0; }
9079 EOF
9080 if { (eval echo configure:9081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9081   rm -rf conftest*
9082   samba_cv_HAVE_STRUCT_DIRENT64=yes
9083 else
9084   echo "configure: failed program was:" >&5
9085   cat conftest.$ac_ext >&5
9086   rm -rf conftest*
9087   samba_cv_HAVE_STRUCT_DIRENT64=no
9088 fi
9089 rm -f conftest*
9090 fi
9091
9092 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9093 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9094     cat >> confdefs.h <<\EOF
9095 #define HAVE_STRUCT_DIRENT64 1
9096 EOF
9097
9098 fi
9099
9100 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9101 echo "configure:9102: checking for major macro" >&5
9102 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9103   echo $ac_n "(cached) $ac_c" 1>&6
9104 else
9105   
9106 if test "$cross_compiling" = yes; then
9107   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9108 else
9109   cat > conftest.$ac_ext <<EOF
9110 #line 9111 "configure"
9111 #include "confdefs.h"
9112
9113 #if defined(HAVE_UNISTD_H)
9114 #include <unistd.h>
9115 #endif
9116 #include <sys/types.h>
9117 main() { dev_t dev; int i = major(dev); return 0; }
9118 EOF
9119 if { (eval echo configure:9120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9120 then
9121   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9122 else
9123   echo "configure: failed program was:" >&5
9124   cat conftest.$ac_ext >&5
9125   rm -fr conftest*
9126   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9127 fi
9128 rm -fr conftest*
9129 fi
9130
9131 fi
9132
9133 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9134 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9135     cat >> confdefs.h <<\EOF
9136 #define HAVE_DEVICE_MAJOR_FN 1
9137 EOF
9138
9139 fi
9140
9141 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9142 echo "configure:9143: checking for minor macro" >&5
9143 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9144   echo $ac_n "(cached) $ac_c" 1>&6
9145 else
9146   
9147 if test "$cross_compiling" = yes; then
9148   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9149 else
9150   cat > conftest.$ac_ext <<EOF
9151 #line 9152 "configure"
9152 #include "confdefs.h"
9153
9154 #if defined(HAVE_UNISTD_H)
9155 #include <unistd.h>
9156 #endif
9157 #include <sys/types.h>
9158 main() { dev_t dev; int i = minor(dev); return 0; }
9159 EOF
9160 if { (eval echo configure:9161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9161 then
9162   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9163 else
9164   echo "configure: failed program was:" >&5
9165   cat conftest.$ac_ext >&5
9166   rm -fr conftest*
9167   samba_cv_HAVE_DEVICE_MINOR_FN=no
9168 fi
9169 rm -fr conftest*
9170 fi
9171
9172 fi
9173
9174 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9175 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9176     cat >> confdefs.h <<\EOF
9177 #define HAVE_DEVICE_MINOR_FN 1
9178 EOF
9179
9180 fi
9181
9182 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9183 echo "configure:9184: checking for unsigned char" >&5
9184 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9185   echo $ac_n "(cached) $ac_c" 1>&6
9186 else
9187   
9188 if test "$cross_compiling" = yes; then
9189   samba_cv_HAVE_UNSIGNED_CHAR=cross
9190 else
9191   cat > conftest.$ac_ext <<EOF
9192 #line 9193 "configure"
9193 #include "confdefs.h"
9194 #include <stdio.h>
9195 main() { char c; c=250; exit((c > 0)?0:1); }
9196 EOF
9197 if { (eval echo configure:9198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9198 then
9199   samba_cv_HAVE_UNSIGNED_CHAR=yes
9200 else
9201   echo "configure: failed program was:" >&5
9202   cat conftest.$ac_ext >&5
9203   rm -fr conftest*
9204   samba_cv_HAVE_UNSIGNED_CHAR=no
9205 fi
9206 rm -fr conftest*
9207 fi
9208
9209 fi
9210
9211 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9212 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9213     cat >> confdefs.h <<\EOF
9214 #define HAVE_UNSIGNED_CHAR 1
9215 EOF
9216
9217 fi
9218
9219 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9220 echo "configure:9221: checking for sin_len in sock" >&5
9221 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9222   echo $ac_n "(cached) $ac_c" 1>&6
9223 else
9224   
9225 cat > conftest.$ac_ext <<EOF
9226 #line 9227 "configure"
9227 #include "confdefs.h"
9228 #include <sys/types.h>
9229 #include <sys/socket.h>
9230 #include <netinet/in.h>
9231 int main() {
9232 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9233 ; return 0; }
9234 EOF
9235 if { (eval echo configure:9236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9236   rm -rf conftest*
9237   samba_cv_HAVE_SOCK_SIN_LEN=yes
9238 else
9239   echo "configure: failed program was:" >&5
9240   cat conftest.$ac_ext >&5
9241   rm -rf conftest*
9242   samba_cv_HAVE_SOCK_SIN_LEN=no
9243 fi
9244 rm -f conftest*
9245 fi
9246
9247 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9248 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9249     cat >> confdefs.h <<\EOF
9250 #define HAVE_SOCK_SIN_LEN 1
9251 EOF
9252
9253 fi
9254
9255 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9256 echo "configure:9257: checking whether seekdir returns void" >&5
9257 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9258   echo $ac_n "(cached) $ac_c" 1>&6
9259 else
9260   
9261 cat > conftest.$ac_ext <<EOF
9262 #line 9263 "configure"
9263 #include "confdefs.h"
9264 #include <sys/types.h>
9265 #include <dirent.h>
9266 void seekdir(DIR *d, long loc) { return; }
9267 int main() {
9268 return 0;
9269 ; return 0; }
9270 EOF
9271 if { (eval echo configure:9272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9272   rm -rf conftest*
9273   samba_cv_SEEKDIR_RETURNS_VOID=yes
9274 else
9275   echo "configure: failed program was:" >&5
9276   cat conftest.$ac_ext >&5
9277   rm -rf conftest*
9278   samba_cv_SEEKDIR_RETURNS_VOID=no
9279 fi
9280 rm -f conftest*
9281 fi
9282
9283 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9284 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9285     cat >> confdefs.h <<\EOF
9286 #define SEEKDIR_RETURNS_VOID 1
9287 EOF
9288
9289 fi
9290
9291 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9292 echo "configure:9293: checking for __FILE__ macro" >&5
9293 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9294   echo $ac_n "(cached) $ac_c" 1>&6
9295 else
9296   
9297 cat > conftest.$ac_ext <<EOF
9298 #line 9299 "configure"
9299 #include "confdefs.h"
9300 #include <stdio.h>
9301 int main() {
9302 printf("%s\n", __FILE__);
9303 ; return 0; }
9304 EOF
9305 if { (eval echo configure:9306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9306   rm -rf conftest*
9307   samba_cv_HAVE_FILE_MACRO=yes
9308 else
9309   echo "configure: failed program was:" >&5
9310   cat conftest.$ac_ext >&5
9311   rm -rf conftest*
9312   samba_cv_HAVE_FILE_MACRO=no
9313 fi
9314 rm -f conftest*
9315 fi
9316
9317 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9318 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9319     cat >> confdefs.h <<\EOF
9320 #define HAVE_FILE_MACRO 1
9321 EOF
9322
9323 fi
9324
9325 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9326 echo "configure:9327: checking for __FUNCTION__ macro" >&5
9327 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9328   echo $ac_n "(cached) $ac_c" 1>&6
9329 else
9330   
9331 cat > conftest.$ac_ext <<EOF
9332 #line 9333 "configure"
9333 #include "confdefs.h"
9334 #include <stdio.h>
9335 int main() {
9336 printf("%s\n", __FUNCTION__);
9337 ; return 0; }
9338 EOF
9339 if { (eval echo configure:9340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9340   rm -rf conftest*
9341   samba_cv_HAVE_FUNCTION_MACRO=yes
9342 else
9343   echo "configure: failed program was:" >&5
9344   cat conftest.$ac_ext >&5
9345   rm -rf conftest*
9346   samba_cv_HAVE_FUNCTION_MACRO=no
9347 fi
9348 rm -f conftest*
9349 fi
9350
9351 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9352 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9353     cat >> confdefs.h <<\EOF
9354 #define HAVE_FUNCTION_MACRO 1
9355 EOF
9356
9357 fi
9358
9359 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9360 echo "configure:9361: checking if gettimeofday takes tz argument" >&5
9361 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9362   echo $ac_n "(cached) $ac_c" 1>&6
9363 else
9364   
9365 if test "$cross_compiling" = yes; then
9366   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9367 else
9368   cat > conftest.$ac_ext <<EOF
9369 #line 9370 "configure"
9370 #include "confdefs.h"
9371
9372 #include <sys/time.h>
9373 #include <unistd.h>
9374 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9375 EOF
9376 if { (eval echo configure:9377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9377 then
9378   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9379 else
9380   echo "configure: failed program was:" >&5
9381   cat conftest.$ac_ext >&5
9382   rm -fr conftest*
9383   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9384 fi
9385 rm -fr conftest*
9386 fi
9387
9388 fi
9389
9390 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9391 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9392     cat >> confdefs.h <<\EOF
9393 #define HAVE_GETTIMEOFDAY_TZ 1
9394 EOF
9395
9396 fi
9397
9398 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9399 echo "configure:9400: checking for C99 vsnprintf" >&5
9400 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9401   echo $ac_n "(cached) $ac_c" 1>&6
9402 else
9403   
9404 if test "$cross_compiling" = yes; then
9405   samba_cv_HAVE_C99_VSNPRINTF=cross
9406 else
9407   cat > conftest.$ac_ext <<EOF
9408 #line 9409 "configure"
9409 #include "confdefs.h"
9410
9411 #include <sys/types.h>
9412 #include <stdarg.h>
9413 void foo(const char *format, ...) { 
9414        va_list ap;
9415        int len;
9416        char buf[5];
9417
9418        va_start(ap, format);
9419        len = vsnprintf(buf, 0, format, ap);
9420        va_end(ap);
9421        if (len != 5) exit(1);
9422
9423        va_start(ap, format);
9424        len = vsnprintf(0, 0, format, ap);
9425        va_end(ap);
9426        if (len != 5) exit(1);
9427
9428        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9429
9430        exit(0);
9431 }
9432 main() { foo("hello"); }
9433
9434 EOF
9435 if { (eval echo configure:9436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9436 then
9437   samba_cv_HAVE_C99_VSNPRINTF=yes
9438 else
9439   echo "configure: failed program was:" >&5
9440   cat conftest.$ac_ext >&5
9441   rm -fr conftest*
9442   samba_cv_HAVE_C99_VSNPRINTF=no
9443 fi
9444 rm -fr conftest*
9445 fi
9446
9447 fi
9448
9449 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9450 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9451     cat >> confdefs.h <<\EOF
9452 #define HAVE_C99_VSNPRINTF 1
9453 EOF
9454
9455 fi
9456
9457 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9458 echo "configure:9459: checking for broken readdir" >&5
9459 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9460   echo $ac_n "(cached) $ac_c" 1>&6
9461 else
9462   
9463 if test "$cross_compiling" = yes; then
9464   samba_cv_HAVE_BROKEN_READDIR=cross
9465 else
9466   cat > conftest.$ac_ext <<EOF
9467 #line 9468 "configure"
9468 #include "confdefs.h"
9469 #include <sys/types.h>
9470 #include <dirent.h>
9471 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9472 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9473 di->d_name[0] == 0) exit(0); exit(1);} 
9474 EOF
9475 if { (eval echo configure:9476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9476 then
9477   samba_cv_HAVE_BROKEN_READDIR=yes
9478 else
9479   echo "configure: failed program was:" >&5
9480   cat conftest.$ac_ext >&5
9481   rm -fr conftest*
9482   samba_cv_HAVE_BROKEN_READDIR=no
9483 fi
9484 rm -fr conftest*
9485 fi
9486
9487 fi
9488
9489 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9490 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9491     cat >> confdefs.h <<\EOF
9492 #define HAVE_BROKEN_READDIR 1
9493 EOF
9494
9495 fi
9496
9497 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9498 echo "configure:9499: checking for utimbuf" >&5
9499 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9500   echo $ac_n "(cached) $ac_c" 1>&6
9501 else
9502   
9503 cat > conftest.$ac_ext <<EOF
9504 #line 9505 "configure"
9505 #include "confdefs.h"
9506 #include <sys/types.h>
9507 #include <utime.h>
9508 int main() {
9509 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9510 ; return 0; }
9511 EOF
9512 if { (eval echo configure:9513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9513   rm -rf conftest*
9514   samba_cv_HAVE_UTIMBUF=yes
9515 else
9516   echo "configure: failed program was:" >&5
9517   cat conftest.$ac_ext >&5
9518   rm -rf conftest*
9519   samba_cv_HAVE_UTIMBUF=no
9520 fi
9521 rm -f conftest*
9522 fi
9523
9524 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9525 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9526     cat >> confdefs.h <<\EOF
9527 #define HAVE_UTIMBUF 1
9528 EOF
9529
9530 fi
9531
9532
9533 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9534 do
9535 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9536 echo "configure:9537: checking for $ac_func" >&5
9537 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9538   echo $ac_n "(cached) $ac_c" 1>&6
9539 else
9540   cat > conftest.$ac_ext <<EOF
9541 #line 9542 "configure"
9542 #include "confdefs.h"
9543 /* System header to define __stub macros and hopefully few prototypes,
9544     which can conflict with char $ac_func(); below.  */
9545 #include <assert.h>
9546 /* Override any gcc2 internal prototype to avoid an error.  */
9547 /* We use char because int might match the return type of a gcc2
9548     builtin and then its argument prototype would still apply.  */
9549 char $ac_func();
9550
9551 int main() {
9552
9553 /* The GNU C library defines this for functions which it implements
9554     to always fail with ENOSYS.  Some functions are actually named
9555     something starting with __ and the normal name is an alias.  */
9556 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9557 choke me
9558 #else
9559 $ac_func();
9560 #endif
9561
9562 ; return 0; }
9563 EOF
9564 if { (eval echo configure:9565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9565   rm -rf conftest*
9566   eval "ac_cv_func_$ac_func=yes"
9567 else
9568   echo "configure: failed program was:" >&5
9569   cat conftest.$ac_ext >&5
9570   rm -rf conftest*
9571   eval "ac_cv_func_$ac_func=no"
9572 fi
9573 rm -f conftest*
9574 fi
9575
9576 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9577   echo "$ac_t""yes" 1>&6
9578     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9579   cat >> confdefs.h <<EOF
9580 #define $ac_tr_func 1
9581 EOF
9582  
9583 else
9584   echo "$ac_t""no" 1>&6
9585 fi
9586 done
9587
9588
9589 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9590 echo "configure:9591: checking for ut_name in utmp" >&5
9591 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9592   echo $ac_n "(cached) $ac_c" 1>&6
9593 else
9594   
9595 cat > conftest.$ac_ext <<EOF
9596 #line 9597 "configure"
9597 #include "confdefs.h"
9598 #include <sys/types.h>
9599 #include <utmp.h>
9600 int main() {
9601 struct utmp ut;  ut.ut_name[0] = 'a';
9602 ; return 0; }
9603 EOF
9604 if { (eval echo configure:9605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9605   rm -rf conftest*
9606   samba_cv_HAVE_UT_UT_NAME=yes
9607 else
9608   echo "configure: failed program was:" >&5
9609   cat conftest.$ac_ext >&5
9610   rm -rf conftest*
9611   samba_cv_HAVE_UT_UT_NAME=no
9612 fi
9613 rm -f conftest*
9614 fi
9615
9616 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9617 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9618     cat >> confdefs.h <<\EOF
9619 #define HAVE_UT_UT_NAME 1
9620 EOF
9621
9622 fi 
9623
9624 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9625 echo "configure:9626: checking for ut_user in utmp" >&5
9626 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9627   echo $ac_n "(cached) $ac_c" 1>&6
9628 else
9629   
9630 cat > conftest.$ac_ext <<EOF
9631 #line 9632 "configure"
9632 #include "confdefs.h"
9633 #include <sys/types.h>
9634 #include <utmp.h>
9635 int main() {
9636 struct utmp ut;  ut.ut_user[0] = 'a';
9637 ; return 0; }
9638 EOF
9639 if { (eval echo configure:9640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9640   rm -rf conftest*
9641   samba_cv_HAVE_UT_UT_USER=yes
9642 else
9643   echo "configure: failed program was:" >&5
9644   cat conftest.$ac_ext >&5
9645   rm -rf conftest*
9646   samba_cv_HAVE_UT_UT_USER=no
9647 fi
9648 rm -f conftest*
9649 fi
9650
9651 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9652 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9653     cat >> confdefs.h <<\EOF
9654 #define HAVE_UT_UT_USER 1
9655 EOF
9656
9657 fi 
9658
9659 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9660 echo "configure:9661: checking for ut_id in utmp" >&5
9661 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9662   echo $ac_n "(cached) $ac_c" 1>&6
9663 else
9664   
9665 cat > conftest.$ac_ext <<EOF
9666 #line 9667 "configure"
9667 #include "confdefs.h"
9668 #include <sys/types.h>
9669 #include <utmp.h>
9670 int main() {
9671 struct utmp ut;  ut.ut_id[0] = 'a';
9672 ; return 0; }
9673 EOF
9674 if { (eval echo configure:9675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9675   rm -rf conftest*
9676   samba_cv_HAVE_UT_UT_ID=yes
9677 else
9678   echo "configure: failed program was:" >&5
9679   cat conftest.$ac_ext >&5
9680   rm -rf conftest*
9681   samba_cv_HAVE_UT_UT_ID=no
9682 fi
9683 rm -f conftest*
9684 fi
9685
9686 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9687 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9688     cat >> confdefs.h <<\EOF
9689 #define HAVE_UT_UT_ID 1
9690 EOF
9691
9692 fi 
9693
9694 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9695 echo "configure:9696: checking for ut_host in utmp" >&5
9696 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9697   echo $ac_n "(cached) $ac_c" 1>&6
9698 else
9699   
9700 cat > conftest.$ac_ext <<EOF
9701 #line 9702 "configure"
9702 #include "confdefs.h"
9703 #include <sys/types.h>
9704 #include <utmp.h>
9705 int main() {
9706 struct utmp ut;  ut.ut_host[0] = 'a';
9707 ; return 0; }
9708 EOF
9709 if { (eval echo configure:9710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9710   rm -rf conftest*
9711   samba_cv_HAVE_UT_UT_HOST=yes
9712 else
9713   echo "configure: failed program was:" >&5
9714   cat conftest.$ac_ext >&5
9715   rm -rf conftest*
9716   samba_cv_HAVE_UT_UT_HOST=no
9717 fi
9718 rm -f conftest*
9719 fi
9720
9721 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9722 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9723     cat >> confdefs.h <<\EOF
9724 #define HAVE_UT_UT_HOST 1
9725 EOF
9726
9727 fi 
9728
9729 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9730 echo "configure:9731: checking for ut_time in utmp" >&5
9731 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9732   echo $ac_n "(cached) $ac_c" 1>&6
9733 else
9734   
9735 cat > conftest.$ac_ext <<EOF
9736 #line 9737 "configure"
9737 #include "confdefs.h"
9738 #include <sys/types.h>
9739 #include <utmp.h>
9740 int main() {
9741 struct utmp ut;  time_t t; ut.ut_time = t;
9742 ; return 0; }
9743 EOF
9744 if { (eval echo configure:9745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9745   rm -rf conftest*
9746   samba_cv_HAVE_UT_UT_TIME=yes
9747 else
9748   echo "configure: failed program was:" >&5
9749   cat conftest.$ac_ext >&5
9750   rm -rf conftest*
9751   samba_cv_HAVE_UT_UT_TIME=no
9752 fi
9753 rm -f conftest*
9754 fi
9755
9756 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9757 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9758     cat >> confdefs.h <<\EOF
9759 #define HAVE_UT_UT_TIME 1
9760 EOF
9761
9762 fi 
9763
9764 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9765 echo "configure:9766: checking for ut_tv in utmp" >&5
9766 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9767   echo $ac_n "(cached) $ac_c" 1>&6
9768 else
9769   
9770 cat > conftest.$ac_ext <<EOF
9771 #line 9772 "configure"
9772 #include "confdefs.h"
9773 #include <sys/types.h>
9774 #include <utmp.h>
9775 int main() {
9776 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9777 ; return 0; }
9778 EOF
9779 if { (eval echo configure:9780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9780   rm -rf conftest*
9781   samba_cv_HAVE_UT_UT_TV=yes
9782 else
9783   echo "configure: failed program was:" >&5
9784   cat conftest.$ac_ext >&5
9785   rm -rf conftest*
9786   samba_cv_HAVE_UT_UT_TV=no
9787 fi
9788 rm -f conftest*
9789 fi
9790
9791 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9792 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9793     cat >> confdefs.h <<\EOF
9794 #define HAVE_UT_UT_TV 1
9795 EOF
9796
9797 fi 
9798
9799 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9800 echo "configure:9801: checking for ut_type in utmp" >&5
9801 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9802   echo $ac_n "(cached) $ac_c" 1>&6
9803 else
9804   
9805 cat > conftest.$ac_ext <<EOF
9806 #line 9807 "configure"
9807 #include "confdefs.h"
9808 #include <sys/types.h>
9809 #include <utmp.h>
9810 int main() {
9811 struct utmp ut;  ut.ut_type = 0;
9812 ; return 0; }
9813 EOF
9814 if { (eval echo configure:9815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9815   rm -rf conftest*
9816   samba_cv_HAVE_UT_UT_TYPE=yes
9817 else
9818   echo "configure: failed program was:" >&5
9819   cat conftest.$ac_ext >&5
9820   rm -rf conftest*
9821   samba_cv_HAVE_UT_UT_TYPE=no
9822 fi
9823 rm -f conftest*
9824 fi
9825
9826 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9827 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9828     cat >> confdefs.h <<\EOF
9829 #define HAVE_UT_UT_TYPE 1
9830 EOF
9831
9832 fi 
9833
9834 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9835 echo "configure:9836: checking for ut_pid in utmp" >&5
9836 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9837   echo $ac_n "(cached) $ac_c" 1>&6
9838 else
9839   
9840 cat > conftest.$ac_ext <<EOF
9841 #line 9842 "configure"
9842 #include "confdefs.h"
9843 #include <sys/types.h>
9844 #include <utmp.h>
9845 int main() {
9846 struct utmp ut;  ut.ut_pid = 0;
9847 ; return 0; }
9848 EOF
9849 if { (eval echo configure:9850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9850   rm -rf conftest*
9851   samba_cv_HAVE_UT_UT_PID=yes
9852 else
9853   echo "configure: failed program was:" >&5
9854   cat conftest.$ac_ext >&5
9855   rm -rf conftest*
9856   samba_cv_HAVE_UT_UT_PID=no
9857 fi
9858 rm -f conftest*
9859 fi
9860
9861 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9862 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9863     cat >> confdefs.h <<\EOF
9864 #define HAVE_UT_UT_PID 1
9865 EOF
9866
9867 fi 
9868
9869 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9870 echo "configure:9871: checking for ut_exit in utmp" >&5
9871 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9872   echo $ac_n "(cached) $ac_c" 1>&6
9873 else
9874   
9875 cat > conftest.$ac_ext <<EOF
9876 #line 9877 "configure"
9877 #include "confdefs.h"
9878 #include <sys/types.h>
9879 #include <utmp.h>
9880 int main() {
9881 struct utmp ut;  ut.ut_exit.e_exit = 0;
9882 ; return 0; }
9883 EOF
9884 if { (eval echo configure:9885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9885   rm -rf conftest*
9886   samba_cv_HAVE_UT_UT_EXIT=yes
9887 else
9888   echo "configure: failed program was:" >&5
9889   cat conftest.$ac_ext >&5
9890   rm -rf conftest*
9891   samba_cv_HAVE_UT_UT_EXIT=no
9892 fi
9893 rm -f conftest*
9894 fi
9895
9896 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9897 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9898     cat >> confdefs.h <<\EOF
9899 #define HAVE_UT_UT_EXIT 1
9900 EOF
9901
9902 fi 
9903
9904 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9905 echo "configure:9906: checking for ut_addr in utmp" >&5
9906 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9907   echo $ac_n "(cached) $ac_c" 1>&6
9908 else
9909   
9910 cat > conftest.$ac_ext <<EOF
9911 #line 9912 "configure"
9912 #include "confdefs.h"
9913 #include <sys/types.h>
9914 #include <utmp.h>
9915 int main() {
9916 struct utmp ut;  ut.ut_addr = 0;
9917 ; return 0; }
9918 EOF
9919 if { (eval echo configure:9920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9920   rm -rf conftest*
9921   samba_cv_HAVE_UT_UT_ADDR=yes
9922 else
9923   echo "configure: failed program was:" >&5
9924   cat conftest.$ac_ext >&5
9925   rm -rf conftest*
9926   samba_cv_HAVE_UT_UT_ADDR=no
9927 fi
9928 rm -f conftest*
9929 fi
9930
9931 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9932 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9933     cat >> confdefs.h <<\EOF
9934 #define HAVE_UT_UT_ADDR 1
9935 EOF
9936
9937 fi 
9938
9939 if test x$ac_cv_func_pututline = xyes ; then
9940   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9941 echo "configure:9942: checking whether pututline returns pointer" >&5
9942 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9943   echo $ac_n "(cached) $ac_c" 1>&6
9944 else
9945   
9946   cat > conftest.$ac_ext <<EOF
9947 #line 9948 "configure"
9948 #include "confdefs.h"
9949 #include <sys/types.h>
9950 #include <utmp.h>
9951 int main() {
9952 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9953 ; return 0; }
9954 EOF
9955 if { (eval echo configure:9956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9956   rm -rf conftest*
9957   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9958 else
9959   echo "configure: failed program was:" >&5
9960   cat conftest.$ac_ext >&5
9961   rm -rf conftest*
9962   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9963 fi
9964 rm -f conftest*
9965 fi
9966
9967 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9968   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9969       cat >> confdefs.h <<\EOF
9970 #define PUTUTLINE_RETURNS_UTMP 1
9971 EOF
9972
9973   fi
9974 fi
9975
9976 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9977 echo "configure:9978: checking for ut_syslen in utmpx" >&5
9978 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9979   echo $ac_n "(cached) $ac_c" 1>&6
9980 else
9981   
9982 cat > conftest.$ac_ext <<EOF
9983 #line 9984 "configure"
9984 #include "confdefs.h"
9985 #include <sys/types.h>
9986 #include <utmpx.h>
9987 int main() {
9988 struct utmpx ux;  ux.ut_syslen = 0;
9989 ; return 0; }
9990 EOF
9991 if { (eval echo configure:9992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9992   rm -rf conftest*
9993   samba_cv_HAVE_UX_UT_SYSLEN=yes
9994 else
9995   echo "configure: failed program was:" >&5
9996   cat conftest.$ac_ext >&5
9997   rm -rf conftest*
9998   samba_cv_HAVE_UX_UT_SYSLEN=no
9999 fi
10000 rm -f conftest*
10001 fi
10002
10003 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10004 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10005     cat >> confdefs.h <<\EOF
10006 #define HAVE_UX_UT_SYSLEN 1
10007 EOF
10008
10009 fi 
10010
10011
10012 #################################################
10013 # check for libiconv support
10014 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10015 echo "configure:10016: checking whether to use libiconv" >&5
10016 # Check whether --with-libiconv or --without-libiconv was given.
10017 if test "${with_libiconv+set}" = set; then
10018   withval="$with_libiconv"
10019    case "$withval" in
10020   no)
10021     echo "$ac_t""no" 1>&6
10022     ;;
10023   *)
10024     echo "$ac_t""yes" 1>&6
10025     CFLAGS="$CFLAGS -I$withval/include"
10026     LDFLAGS="$LDFLAGS -L$withval/lib"
10027     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10028 echo "configure:10029: checking for iconv_open in -liconv" >&5
10029 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10030 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10031   echo $ac_n "(cached) $ac_c" 1>&6
10032 else
10033   ac_save_LIBS="$LIBS"
10034 LIBS="-liconv  $LIBS"
10035 cat > conftest.$ac_ext <<EOF
10036 #line 10037 "configure"
10037 #include "confdefs.h"
10038 /* Override any gcc2 internal prototype to avoid an error.  */
10039 /* We use char because int might match the return type of a gcc2
10040     builtin and then its argument prototype would still apply.  */
10041 char iconv_open();
10042
10043 int main() {
10044 iconv_open()
10045 ; return 0; }
10046 EOF
10047 if { (eval echo configure:10048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10048   rm -rf conftest*
10049   eval "ac_cv_lib_$ac_lib_var=yes"
10050 else
10051   echo "configure: failed program was:" >&5
10052   cat conftest.$ac_ext >&5
10053   rm -rf conftest*
10054   eval "ac_cv_lib_$ac_lib_var=no"
10055 fi
10056 rm -f conftest*
10057 LIBS="$ac_save_LIBS"
10058
10059 fi
10060 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10061   echo "$ac_t""yes" 1>&6
10062     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10063     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10064   cat >> confdefs.h <<EOF
10065 #define $ac_tr_lib 1
10066 EOF
10067
10068   LIBS="-liconv $LIBS"
10069
10070 else
10071   echo "$ac_t""no" 1>&6
10072 fi
10073
10074     cat >> confdefs.h <<EOF
10075 #define WITH_LIBICONV "${withval}"
10076 EOF
10077
10078     ;;
10079   esac 
10080 else
10081   echo "$ac_t""no" 1>&6
10082
10083 fi
10084
10085
10086
10087 ############
10088 # check for iconv in libc
10089 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10090 echo "configure:10091: checking for working iconv" >&5
10091 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10092   echo $ac_n "(cached) $ac_c" 1>&6
10093 else
10094   
10095 if test "$cross_compiling" = yes; then
10096   samba_cv_HAVE_NATIVE_ICONV=cross
10097 else
10098   cat > conftest.$ac_ext <<EOF
10099 #line 10100 "configure"
10100 #include "confdefs.h"
10101
10102 #include <iconv.h>
10103 main() {
10104        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10105        if (cd == 0 || cd == (iconv_t)-1) return -1;
10106        return 0;
10107 }
10108
10109 EOF
10110 if { (eval echo configure:10111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10111 then
10112   samba_cv_HAVE_NATIVE_ICONV=yes
10113 else
10114   echo "configure: failed program was:" >&5
10115   cat conftest.$ac_ext >&5
10116   rm -fr conftest*
10117   samba_cv_HAVE_NATIVE_ICONV=no
10118 fi
10119 rm -fr conftest*
10120 fi
10121
10122 fi
10123
10124 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10125 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10126     cat >> confdefs.h <<\EOF
10127 #define HAVE_NATIVE_ICONV 1
10128 EOF
10129
10130 fi
10131
10132
10133 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10134 echo "configure:10135: checking for Linux kernel oplocks" >&5
10135 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10136   echo $ac_n "(cached) $ac_c" 1>&6
10137 else
10138   
10139 if test "$cross_compiling" = yes; then
10140   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10141 else
10142   cat > conftest.$ac_ext <<EOF
10143 #line 10144 "configure"
10144 #include "confdefs.h"
10145
10146 #include <sys/types.h>
10147 #include <fcntl.h>
10148 #ifndef F_GETLEASE
10149 #define F_GETLEASE      1025
10150 #endif
10151 main() {
10152        int fd = open("/dev/null", O_RDONLY);
10153        return fcntl(fd, F_GETLEASE, 0) == -1;
10154 }
10155
10156 EOF
10157 if { (eval echo configure:10158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10158 then
10159   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10160 else
10161   echo "configure: failed program was:" >&5
10162   cat conftest.$ac_ext >&5
10163   rm -fr conftest*
10164   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10165 fi
10166 rm -fr conftest*
10167 fi
10168
10169 fi
10170
10171 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10172 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10173     cat >> confdefs.h <<\EOF
10174 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10175 EOF
10176
10177 fi
10178
10179 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10180 echo "configure:10181: checking for kernel change notify support" >&5
10181 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10182   echo $ac_n "(cached) $ac_c" 1>&6
10183 else
10184   
10185 if test "$cross_compiling" = yes; then
10186   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10187 else
10188   cat > conftest.$ac_ext <<EOF
10189 #line 10190 "configure"
10190 #include "confdefs.h"
10191
10192 #include <sys/types.h>
10193 #include <fcntl.h>
10194 #include <signal.h>
10195 #ifndef F_NOTIFY
10196 #define F_NOTIFY 1026
10197 #endif
10198 main() {
10199         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10200 }
10201
10202 EOF
10203 if { (eval echo configure:10204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10204 then
10205   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10206 else
10207   echo "configure: failed program was:" >&5
10208   cat conftest.$ac_ext >&5
10209   rm -fr conftest*
10210   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10211 fi
10212 rm -fr conftest*
10213 fi
10214
10215 fi
10216
10217 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10218 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10219     cat >> confdefs.h <<\EOF
10220 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10221 EOF
10222
10223 fi
10224
10225 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10226 echo "configure:10227: checking for kernel share modes" >&5
10227 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10228   echo $ac_n "(cached) $ac_c" 1>&6
10229 else
10230   
10231 if test "$cross_compiling" = yes; then
10232   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10233 else
10234   cat > conftest.$ac_ext <<EOF
10235 #line 10236 "configure"
10236 #include "confdefs.h"
10237
10238 #include <sys/types.h>
10239 #include <fcntl.h>
10240 #include <signal.h>
10241 #include <sys/file.h>
10242 #ifndef LOCK_MAND
10243 #define LOCK_MAND       32
10244 #define LOCK_READ       64
10245 #endif
10246 main() {
10247         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10248 }
10249
10250 EOF
10251 if { (eval echo configure:10252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10252 then
10253   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10254 else
10255   echo "configure: failed program was:" >&5
10256   cat conftest.$ac_ext >&5
10257   rm -fr conftest*
10258   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10259 fi
10260 rm -fr conftest*
10261 fi
10262
10263 fi
10264
10265 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10266 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10267     cat >> confdefs.h <<\EOF
10268 #define HAVE_KERNEL_SHARE_MODES 1
10269 EOF
10270
10271 fi
10272
10273
10274
10275
10276 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10277 echo "configure:10278: checking for IRIX kernel oplock type definitions" >&5
10278 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10279   echo $ac_n "(cached) $ac_c" 1>&6
10280 else
10281   
10282 cat > conftest.$ac_ext <<EOF
10283 #line 10284 "configure"
10284 #include "confdefs.h"
10285 #include <sys/types.h>
10286 #include <fcntl.h>
10287 int main() {
10288 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10289 ; return 0; }
10290 EOF
10291 if { (eval echo configure:10292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10292   rm -rf conftest*
10293   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10294 else
10295   echo "configure: failed program was:" >&5
10296   cat conftest.$ac_ext >&5
10297   rm -rf conftest*
10298   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10299 fi
10300 rm -f conftest*
10301 fi
10302
10303 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10304 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10305     cat >> confdefs.h <<\EOF
10306 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10307 EOF
10308
10309 fi
10310
10311 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10312 echo "configure:10313: checking for irix specific capabilities" >&5
10313 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10314   echo $ac_n "(cached) $ac_c" 1>&6
10315 else
10316   
10317 if test "$cross_compiling" = yes; then
10318   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10319 else
10320   cat > conftest.$ac_ext <<EOF
10321 #line 10322 "configure"
10322 #include "confdefs.h"
10323 #include <sys/types.h>
10324 #include <sys/capability.h>
10325 main() {
10326  cap_t cap;
10327  if ((cap = cap_get_proc()) == NULL)
10328    exit(1);
10329  cap->cap_effective |= CAP_NETWORK_MGT;
10330  cap->cap_inheritable |= CAP_NETWORK_MGT;
10331  cap_set_proc(cap);
10332  exit(0);
10333 }
10334
10335 EOF
10336 if { (eval echo configure:10337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10337 then
10338   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10339 else
10340   echo "configure: failed program was:" >&5
10341   cat conftest.$ac_ext >&5
10342   rm -fr conftest*
10343   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10344 fi
10345 rm -fr conftest*
10346 fi
10347
10348 fi
10349
10350 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10351 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10352     cat >> confdefs.h <<\EOF
10353 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10354 EOF
10355
10356 fi
10357
10358 #
10359 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10360 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10361 #
10362
10363 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10364 echo "configure:10365: checking for int16 typedef included by rpc/rpc.h" >&5
10365 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10366   echo $ac_n "(cached) $ac_c" 1>&6
10367 else
10368   
10369 cat > conftest.$ac_ext <<EOF
10370 #line 10371 "configure"
10371 #include "confdefs.h"
10372 #include <sys/types.h>
10373 #if defined(HAVE_RPC_RPC_H)
10374 #include <rpc/rpc.h>
10375 #endif
10376 int main() {
10377 int16 testvar;
10378 ; return 0; }
10379 EOF
10380 if { (eval echo configure:10381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10381   rm -rf conftest*
10382   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10383 else
10384   echo "configure: failed program was:" >&5
10385   cat conftest.$ac_ext >&5
10386   rm -rf conftest*
10387   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10388 fi
10389 rm -f conftest*
10390 fi
10391
10392 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10393 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10394     cat >> confdefs.h <<\EOF
10395 #define HAVE_INT16_FROM_RPC_RPC_H 1
10396 EOF
10397
10398 fi
10399
10400 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10401 echo "configure:10402: checking for uint16 typedef included by rpc/rpc.h" >&5
10402 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10403   echo $ac_n "(cached) $ac_c" 1>&6
10404 else
10405   
10406 cat > conftest.$ac_ext <<EOF
10407 #line 10408 "configure"
10408 #include "confdefs.h"
10409 #include <sys/types.h>
10410 #if defined(HAVE_RPC_RPC_H)
10411 #include <rpc/rpc.h>
10412 #endif
10413 int main() {
10414 uint16 testvar;
10415 ; return 0; }
10416 EOF
10417 if { (eval echo configure:10418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10418   rm -rf conftest*
10419   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10420 else
10421   echo "configure: failed program was:" >&5
10422   cat conftest.$ac_ext >&5
10423   rm -rf conftest*
10424   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10425 fi
10426 rm -f conftest*
10427 fi
10428
10429 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10430 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10431     cat >> confdefs.h <<\EOF
10432 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10433 EOF
10434
10435 fi
10436
10437 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10438 echo "configure:10439: checking for int32 typedef included by rpc/rpc.h" >&5
10439 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10440   echo $ac_n "(cached) $ac_c" 1>&6
10441 else
10442   
10443 cat > conftest.$ac_ext <<EOF
10444 #line 10445 "configure"
10445 #include "confdefs.h"
10446 #include <sys/types.h>
10447 #if defined(HAVE_RPC_RPC_H)
10448 #include <rpc/rpc.h>
10449 #endif
10450 int main() {
10451 int32 testvar;
10452 ; return 0; }
10453 EOF
10454 if { (eval echo configure:10455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10455   rm -rf conftest*
10456   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10457 else
10458   echo "configure: failed program was:" >&5
10459   cat conftest.$ac_ext >&5
10460   rm -rf conftest*
10461   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10462 fi
10463 rm -f conftest*
10464 fi
10465
10466 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10467 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10468     cat >> confdefs.h <<\EOF
10469 #define HAVE_INT32_FROM_RPC_RPC_H 1
10470 EOF
10471
10472 fi
10473
10474 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10475 echo "configure:10476: checking for uint32 typedef included by rpc/rpc.h" >&5
10476 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10477   echo $ac_n "(cached) $ac_c" 1>&6
10478 else
10479   
10480 cat > conftest.$ac_ext <<EOF
10481 #line 10482 "configure"
10482 #include "confdefs.h"
10483 #include <sys/types.h>
10484 #if defined(HAVE_RPC_RPC_H)
10485 #include <rpc/rpc.h>
10486 #endif
10487 int main() {
10488 uint32 testvar;
10489 ; return 0; }
10490 EOF
10491 if { (eval echo configure:10492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10492   rm -rf conftest*
10493   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10494 else
10495   echo "configure: failed program was:" >&5
10496   cat conftest.$ac_ext >&5
10497   rm -rf conftest*
10498   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10499 fi
10500 rm -f conftest*
10501 fi
10502
10503 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10504 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10505     cat >> confdefs.h <<\EOF
10506 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10507 EOF
10508
10509 fi
10510
10511
10512 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10513 echo "configure:10514: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10514 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10515   echo $ac_n "(cached) $ac_c" 1>&6
10516 else
10517   
10518 cat > conftest.$ac_ext <<EOF
10519 #line 10520 "configure"
10520 #include "confdefs.h"
10521 #include <sys/types.h>
10522 #ifdef HAVE_SYS_SECURITY_H
10523 #include <sys/security.h>
10524 #include <prot.h>
10525 #endif  /* HAVE_SYS_SECURITY_H */
10526 #if defined(HAVE_RPC_RPC_H)
10527 #include <rpc/rpc.h>
10528 #endif
10529 int main() {
10530 int testvar;
10531 ; return 0; }
10532 EOF
10533 if { (eval echo configure:10534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10534   rm -rf conftest*
10535   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10536 else
10537   echo "configure: failed program was:" >&5
10538   cat conftest.$ac_ext >&5
10539   rm -rf conftest*
10540   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10541 fi
10542 rm -f conftest*
10543 fi
10544
10545 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10546 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10547     cat >> confdefs.h <<\EOF
10548 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10549 EOF
10550
10551 fi
10552
10553 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10554 echo "configure:10555: checking for test routines" >&5
10555 if test "$cross_compiling" = yes; then
10556   echo "configure: warning: cannot run when cross-compiling" 1>&2
10557 else
10558   cat > conftest.$ac_ext <<EOF
10559 #line 10560 "configure"
10560 #include "confdefs.h"
10561 #include "${srcdir-.}/tests/trivial.c"
10562 EOF
10563 if { (eval echo configure:10564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10564 then
10565   echo "$ac_t""yes" 1>&6
10566 else
10567   echo "configure: failed program was:" >&5
10568   cat conftest.$ac_ext >&5
10569   rm -fr conftest*
10570   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10571 fi
10572 rm -fr conftest*
10573 fi
10574
10575
10576 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10577 echo "configure:10578: checking for ftruncate extend" >&5
10578 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10579   echo $ac_n "(cached) $ac_c" 1>&6
10580 else
10581   
10582 if test "$cross_compiling" = yes; then
10583   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10584 else
10585   cat > conftest.$ac_ext <<EOF
10586 #line 10587 "configure"
10587 #include "confdefs.h"
10588 #include "${srcdir-.}/tests/ftruncate.c"
10589 EOF
10590 if { (eval echo configure:10591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10591 then
10592   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10593 else
10594   echo "configure: failed program was:" >&5
10595   cat conftest.$ac_ext >&5
10596   rm -fr conftest*
10597   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10598 fi
10599 rm -fr conftest*
10600 fi
10601
10602 fi
10603
10604 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10605 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10606     cat >> confdefs.h <<\EOF
10607 #define HAVE_FTRUNCATE_EXTEND 1
10608 EOF
10609
10610 fi
10611
10612 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10613 echo "configure:10614: checking for AF_LOCAL socket support" >&5
10614 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10615   echo $ac_n "(cached) $ac_c" 1>&6
10616 else
10617   
10618 if test "$cross_compiling" = yes; then
10619   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10620 else
10621   cat > conftest.$ac_ext <<EOF
10622 #line 10623 "configure"
10623 #include "confdefs.h"
10624 #include "${srcdir-.}/tests/unixsock.c"
10625 EOF
10626 if { (eval echo configure:10627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10627 then
10628   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10629 else
10630   echo "configure: failed program was:" >&5
10631   cat conftest.$ac_ext >&5
10632   rm -fr conftest*
10633   samba_cv_HAVE_WORKING_AF_LOCAL=no
10634 fi
10635 rm -fr conftest*
10636 fi
10637
10638 fi
10639
10640 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10641 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10642 then
10643     cat >> confdefs.h <<\EOF
10644 #define HAVE_WORKING_AF_LOCAL 1
10645 EOF
10646
10647 fi
10648
10649 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10650 echo "configure:10651: checking for broken getgroups" >&5
10651 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10652   echo $ac_n "(cached) $ac_c" 1>&6
10653 else
10654   
10655 if test "$cross_compiling" = yes; then
10656   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10657 else
10658   cat > conftest.$ac_ext <<EOF
10659 #line 10660 "configure"
10660 #include "confdefs.h"
10661 #include "${srcdir-.}/tests/getgroups.c"
10662 EOF
10663 if { (eval echo configure:10664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10664 then
10665   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10666 else
10667   echo "configure: failed program was:" >&5
10668   cat conftest.$ac_ext >&5
10669   rm -fr conftest*
10670   samba_cv_HAVE_BROKEN_GETGROUPS=no
10671 fi
10672 rm -fr conftest*
10673 fi
10674
10675 fi
10676
10677 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10678 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10679     cat >> confdefs.h <<\EOF
10680 #define HAVE_BROKEN_GETGROUPS 1
10681 EOF
10682
10683 fi
10684
10685 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10686 echo "configure:10687: checking whether getpass should be replaced" >&5
10687 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10688   echo $ac_n "(cached) $ac_c" 1>&6
10689 else
10690   
10691 SAVE_CPPFLAGS="$CPPFLAGS"
10692 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10693 cat > conftest.$ac_ext <<EOF
10694 #line 10695 "configure"
10695 #include "confdefs.h"
10696
10697 #define REPLACE_GETPASS 1
10698 #define NO_CONFIG_H 1
10699 #define main dont_declare_main
10700 #include "${srcdir-.}/lib/getsmbpass.c"
10701 #undef main
10702
10703 int main() {
10704
10705 ; return 0; }
10706 EOF
10707 if { (eval echo configure:10708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10708   rm -rf conftest*
10709   samba_cv_REPLACE_GETPASS=yes
10710 else
10711   echo "configure: failed program was:" >&5
10712   cat conftest.$ac_ext >&5
10713   rm -rf conftest*
10714   samba_cv_REPLACE_GETPASS=no
10715 fi
10716 rm -f conftest*
10717 CPPFLAGS="$SAVE_CPPFLAGS"
10718
10719 fi
10720
10721 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10722 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10723         cat >> confdefs.h <<\EOF
10724 #define REPLACE_GETPASS 1
10725 EOF
10726
10727 fi
10728
10729 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10730 echo "configure:10731: checking for broken inet_ntoa" >&5
10731 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10732   echo $ac_n "(cached) $ac_c" 1>&6
10733 else
10734   
10735 if test "$cross_compiling" = yes; then
10736   samba_cv_REPLACE_INET_NTOA=cross
10737 else
10738   cat > conftest.$ac_ext <<EOF
10739 #line 10740 "configure"
10740 #include "confdefs.h"
10741
10742 #include <stdio.h>
10743 #include <sys/types.h>
10744 #include <netinet/in.h>
10745 #ifdef HAVE_ARPA_INET_H
10746 #include <arpa/inet.h>
10747 #endif
10748 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10749 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10750     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10751 exit(1);}
10752 EOF
10753 if { (eval echo configure:10754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10754 then
10755   samba_cv_REPLACE_INET_NTOA=yes
10756 else
10757   echo "configure: failed program was:" >&5
10758   cat conftest.$ac_ext >&5
10759   rm -fr conftest*
10760   samba_cv_REPLACE_INET_NTOA=no
10761 fi
10762 rm -fr conftest*
10763 fi
10764
10765 fi
10766
10767 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10768 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10769     cat >> confdefs.h <<\EOF
10770 #define REPLACE_INET_NTOA 1
10771 EOF
10772
10773 fi
10774
10775 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10776 echo "configure:10777: checking for secure mkstemp" >&5
10777 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10778   echo $ac_n "(cached) $ac_c" 1>&6
10779 else
10780   
10781 if test "$cross_compiling" = yes; then
10782   samba_cv_HAVE_SECURE_MKSTEMP=cross
10783 else
10784   cat > conftest.$ac_ext <<EOF
10785 #line 10786 "configure"
10786 #include "confdefs.h"
10787 #include <stdlib.h>
10788 #include <sys/types.h>
10789 #include <sys/stat.h>
10790 #include <unistd.h>
10791 main() { 
10792   struct stat st;
10793   char tpl[20]="/tmp/test.XXXXXX"; 
10794   int fd = mkstemp(tpl); 
10795   if (fd == -1) exit(1);
10796   unlink(tpl);
10797   if (fstat(fd, &st) != 0) exit(1);
10798   if ((st.st_mode & 0777) != 0600) exit(1);
10799   exit(0);
10800 }
10801 EOF
10802 if { (eval echo configure:10803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10803 then
10804   samba_cv_HAVE_SECURE_MKSTEMP=yes
10805 else
10806   echo "configure: failed program was:" >&5
10807   cat conftest.$ac_ext >&5
10808   rm -fr conftest*
10809   samba_cv_HAVE_SECURE_MKSTEMP=no
10810 fi
10811 rm -fr conftest*
10812 fi
10813
10814 fi
10815
10816 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10817 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10818     cat >> confdefs.h <<\EOF
10819 #define HAVE_SECURE_MKSTEMP 1
10820 EOF
10821
10822 fi
10823
10824 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10825 echo "configure:10826: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10826 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10827   echo $ac_n "(cached) $ac_c" 1>&6
10828 else
10829   
10830 if test "$cross_compiling" = yes; then
10831   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10832 else
10833   cat > conftest.$ac_ext <<EOF
10834 #line 10835 "configure"
10835 #include "confdefs.h"
10836 #include <unistd.h>
10837 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10838 EOF
10839 if { (eval echo configure:10840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10840 then
10841   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10842 else
10843   echo "configure: failed program was:" >&5
10844   cat conftest.$ac_ext >&5
10845   rm -fr conftest*
10846   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10847 fi
10848 rm -fr conftest*
10849 fi
10850
10851 fi
10852
10853 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10854 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10855     cat >> confdefs.h <<\EOF
10856 #define SYSCONF_SC_NGROUPS_MAX 1
10857 EOF
10858
10859 fi
10860
10861 echo $ac_n "checking for root""... $ac_c" 1>&6
10862 echo "configure:10863: checking for root" >&5
10863 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10864   echo $ac_n "(cached) $ac_c" 1>&6
10865 else
10866   
10867 if test "$cross_compiling" = yes; then
10868   samba_cv_HAVE_ROOT=cross
10869 else
10870   cat > conftest.$ac_ext <<EOF
10871 #line 10872 "configure"
10872 #include "confdefs.h"
10873 main() { exit(getuid() != 0); }
10874 EOF
10875 if { (eval echo configure:10876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10876 then
10877   samba_cv_HAVE_ROOT=yes
10878 else
10879   echo "configure: failed program was:" >&5
10880   cat conftest.$ac_ext >&5
10881   rm -fr conftest*
10882   samba_cv_HAVE_ROOT=no
10883 fi
10884 rm -fr conftest*
10885 fi
10886
10887 fi
10888
10889 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10890 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10891     cat >> confdefs.h <<\EOF
10892 #define HAVE_ROOT 1
10893 EOF
10894
10895 else
10896     echo "configure: warning: running as non-root will disable some tests" 1>&2
10897 fi
10898
10899 ##################
10900 # look for a method of finding the list of network interfaces
10901 iface=no;
10902 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10903 echo "configure:10904: checking for iface AIX" >&5
10904 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10905   echo $ac_n "(cached) $ac_c" 1>&6
10906 else
10907   
10908 if test "$cross_compiling" = yes; then
10909   samba_cv_HAVE_IFACE_AIX=cross
10910 else
10911   cat > conftest.$ac_ext <<EOF
10912 #line 10913 "configure"
10913 #include "confdefs.h"
10914
10915 #define HAVE_IFACE_AIX 1
10916 #define AUTOCONF_TEST 1
10917 #include "confdefs.h"
10918 #include "${srcdir-.}/lib/interfaces.c"
10919 EOF
10920 if { (eval echo configure:10921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10921 then
10922   samba_cv_HAVE_IFACE_AIX=yes
10923 else
10924   echo "configure: failed program was:" >&5
10925   cat conftest.$ac_ext >&5
10926   rm -fr conftest*
10927   samba_cv_HAVE_IFACE_AIX=no
10928 fi
10929 rm -fr conftest*
10930 fi
10931
10932 fi
10933
10934 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10935 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10936     iface=yes;cat >> confdefs.h <<\EOF
10937 #define HAVE_IFACE_AIX 1
10938 EOF
10939
10940 fi
10941
10942 if test $iface = no; then
10943 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10944 echo "configure:10945: checking for iface ifconf" >&5
10945 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10946   echo $ac_n "(cached) $ac_c" 1>&6
10947 else
10948   
10949 if test "$cross_compiling" = yes; then
10950   samba_cv_HAVE_IFACE_IFCONF=cross
10951 else
10952   cat > conftest.$ac_ext <<EOF
10953 #line 10954 "configure"
10954 #include "confdefs.h"
10955
10956 #define HAVE_IFACE_IFCONF 1
10957 #define AUTOCONF_TEST 1
10958 #include "confdefs.h"
10959 #include "${srcdir-.}/lib/interfaces.c"
10960 EOF
10961 if { (eval echo configure:10962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10962 then
10963   samba_cv_HAVE_IFACE_IFCONF=yes
10964 else
10965   echo "configure: failed program was:" >&5
10966   cat conftest.$ac_ext >&5
10967   rm -fr conftest*
10968   samba_cv_HAVE_IFACE_IFCONF=no
10969 fi
10970 rm -fr conftest*
10971 fi
10972
10973 fi
10974
10975 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10976 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10977     iface=yes;cat >> confdefs.h <<\EOF
10978 #define HAVE_IFACE_IFCONF 1
10979 EOF
10980
10981 fi
10982 fi
10983
10984 if test $iface = no; then
10985 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10986 echo "configure:10987: checking for iface ifreq" >&5
10987 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10988   echo $ac_n "(cached) $ac_c" 1>&6
10989 else
10990   
10991 if test "$cross_compiling" = yes; then
10992   samba_cv_HAVE_IFACE_IFREQ=cross
10993 else
10994   cat > conftest.$ac_ext <<EOF
10995 #line 10996 "configure"
10996 #include "confdefs.h"
10997
10998 #define HAVE_IFACE_IFREQ 1
10999 #define AUTOCONF_TEST 1
11000 #include "confdefs.h"
11001 #include "${srcdir-.}/lib/interfaces.c"
11002 EOF
11003 if { (eval echo configure:11004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11004 then
11005   samba_cv_HAVE_IFACE_IFREQ=yes
11006 else
11007   echo "configure: failed program was:" >&5
11008   cat conftest.$ac_ext >&5
11009   rm -fr conftest*
11010   samba_cv_HAVE_IFACE_IFREQ=no
11011 fi
11012 rm -fr conftest*
11013 fi
11014
11015 fi
11016
11017 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11018 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11019     iface=yes;cat >> confdefs.h <<\EOF
11020 #define HAVE_IFACE_IFREQ 1
11021 EOF
11022
11023 fi
11024 fi
11025
11026
11027 ################################################
11028 # look for a method of setting the effective uid
11029 seteuid=no;
11030 if test $seteuid = no; then
11031 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11032 echo "configure:11033: checking for setresuid" >&5
11033 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11034   echo $ac_n "(cached) $ac_c" 1>&6
11035 else
11036   
11037 if test "$cross_compiling" = yes; then
11038   samba_cv_USE_SETRESUID=cross
11039 else
11040   cat > conftest.$ac_ext <<EOF
11041 #line 11042 "configure"
11042 #include "confdefs.h"
11043
11044 #define AUTOCONF_TEST 1
11045 #define USE_SETRESUID 1
11046 #include "confdefs.h"
11047 #include "${srcdir-.}/lib/util_sec.c"
11048 EOF
11049 if { (eval echo configure:11050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11050 then
11051   samba_cv_USE_SETRESUID=yes
11052 else
11053   echo "configure: failed program was:" >&5
11054   cat conftest.$ac_ext >&5
11055   rm -fr conftest*
11056   samba_cv_USE_SETRESUID=no
11057 fi
11058 rm -fr conftest*
11059 fi
11060
11061 fi
11062
11063 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11064 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11065     seteuid=yes;cat >> confdefs.h <<\EOF
11066 #define USE_SETRESUID 1
11067 EOF
11068
11069 fi
11070 fi
11071
11072
11073 if test $seteuid = no; then
11074 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11075 echo "configure:11076: checking for setreuid" >&5
11076 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11077   echo $ac_n "(cached) $ac_c" 1>&6
11078 else
11079   
11080 if test "$cross_compiling" = yes; then
11081   samba_cv_USE_SETREUID=cross
11082 else
11083   cat > conftest.$ac_ext <<EOF
11084 #line 11085 "configure"
11085 #include "confdefs.h"
11086
11087 #define AUTOCONF_TEST 1
11088 #define USE_SETREUID 1
11089 #include "confdefs.h"
11090 #include "${srcdir-.}/lib/util_sec.c"
11091 EOF
11092 if { (eval echo configure:11093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11093 then
11094   samba_cv_USE_SETREUID=yes
11095 else
11096   echo "configure: failed program was:" >&5
11097   cat conftest.$ac_ext >&5
11098   rm -fr conftest*
11099   samba_cv_USE_SETREUID=no
11100 fi
11101 rm -fr conftest*
11102 fi
11103
11104 fi
11105
11106 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11107 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11108     seteuid=yes;cat >> confdefs.h <<\EOF
11109 #define USE_SETREUID 1
11110 EOF
11111
11112 fi
11113 fi
11114
11115 if test $seteuid = no; then
11116 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11117 echo "configure:11118: checking for seteuid" >&5
11118 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11119   echo $ac_n "(cached) $ac_c" 1>&6
11120 else
11121   
11122 if test "$cross_compiling" = yes; then
11123   samba_cv_USE_SETEUID=cross
11124 else
11125   cat > conftest.$ac_ext <<EOF
11126 #line 11127 "configure"
11127 #include "confdefs.h"
11128
11129 #define AUTOCONF_TEST 1
11130 #define USE_SETEUID 1
11131 #include "confdefs.h"
11132 #include "${srcdir-.}/lib/util_sec.c"
11133 EOF
11134 if { (eval echo configure:11135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11135 then
11136   samba_cv_USE_SETEUID=yes
11137 else
11138   echo "configure: failed program was:" >&5
11139   cat conftest.$ac_ext >&5
11140   rm -fr conftest*
11141   samba_cv_USE_SETEUID=no
11142 fi
11143 rm -fr conftest*
11144 fi
11145
11146 fi
11147
11148 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11149 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11150     seteuid=yes;cat >> confdefs.h <<\EOF
11151 #define USE_SETEUID 1
11152 EOF
11153
11154 fi
11155 fi
11156
11157 if test $seteuid = no; then
11158 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11159 echo "configure:11160: checking for setuidx" >&5
11160 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11161   echo $ac_n "(cached) $ac_c" 1>&6
11162 else
11163   
11164 if test "$cross_compiling" = yes; then
11165   samba_cv_USE_SETUIDX=cross
11166 else
11167   cat > conftest.$ac_ext <<EOF
11168 #line 11169 "configure"
11169 #include "confdefs.h"
11170
11171 #define AUTOCONF_TEST 1
11172 #define USE_SETUIDX 1
11173 #include "confdefs.h"
11174 #include "${srcdir-.}/lib/util_sec.c"
11175 EOF
11176 if { (eval echo configure:11177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11177 then
11178   samba_cv_USE_SETUIDX=yes
11179 else
11180   echo "configure: failed program was:" >&5
11181   cat conftest.$ac_ext >&5
11182   rm -fr conftest*
11183   samba_cv_USE_SETUIDX=no
11184 fi
11185 rm -fr conftest*
11186 fi
11187
11188 fi
11189
11190 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11191 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11192     seteuid=yes;cat >> confdefs.h <<\EOF
11193 #define USE_SETUIDX 1
11194 EOF
11195
11196 fi
11197 fi
11198
11199
11200 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11201 echo "configure:11202: checking for working mmap" >&5
11202 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11203   echo $ac_n "(cached) $ac_c" 1>&6
11204 else
11205   
11206 if test "$cross_compiling" = yes; then
11207   samba_cv_HAVE_MMAP=cross
11208 else
11209   cat > conftest.$ac_ext <<EOF
11210 #line 11211 "configure"
11211 #include "confdefs.h"
11212 #include "${srcdir-.}/tests/shared_mmap.c"
11213 EOF
11214 if { (eval echo configure:11215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11215 then
11216   samba_cv_HAVE_MMAP=yes
11217 else
11218   echo "configure: failed program was:" >&5
11219   cat conftest.$ac_ext >&5
11220   rm -fr conftest*
11221   samba_cv_HAVE_MMAP=no
11222 fi
11223 rm -fr conftest*
11224 fi
11225
11226 fi
11227
11228 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11229 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11230     cat >> confdefs.h <<\EOF
11231 #define HAVE_MMAP 1
11232 EOF
11233
11234 fi
11235
11236 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11237 echo "configure:11238: checking for ftruncate needs root" >&5
11238 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11239   echo $ac_n "(cached) $ac_c" 1>&6
11240 else
11241   
11242 if test "$cross_compiling" = yes; then
11243   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11244 else
11245   cat > conftest.$ac_ext <<EOF
11246 #line 11247 "configure"
11247 #include "confdefs.h"
11248 #include "${srcdir-.}/tests/ftruncroot.c"
11249 EOF
11250 if { (eval echo configure:11251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11251 then
11252   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11253 else
11254   echo "configure: failed program was:" >&5
11255   cat conftest.$ac_ext >&5
11256   rm -fr conftest*
11257   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11258 fi
11259 rm -fr conftest*
11260 fi
11261
11262 fi
11263
11264 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11265 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11266     cat >> confdefs.h <<\EOF
11267 #define FTRUNCATE_NEEDS_ROOT 1
11268 EOF
11269
11270 fi
11271
11272 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11273 echo "configure:11274: checking for fcntl locking" >&5
11274 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11275   echo $ac_n "(cached) $ac_c" 1>&6
11276 else
11277   
11278 if test "$cross_compiling" = yes; then
11279   samba_cv_HAVE_FCNTL_LOCK=cross
11280 else
11281   cat > conftest.$ac_ext <<EOF
11282 #line 11283 "configure"
11283 #include "confdefs.h"
11284 #include "${srcdir-.}/tests/fcntl_lock.c"
11285 EOF
11286 if { (eval echo configure:11287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11287 then
11288   samba_cv_HAVE_FCNTL_LOCK=yes
11289 else
11290   echo "configure: failed program was:" >&5
11291   cat conftest.$ac_ext >&5
11292   rm -fr conftest*
11293   samba_cv_HAVE_FCNTL_LOCK=no
11294 fi
11295 rm -fr conftest*
11296 fi
11297
11298 fi
11299
11300 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11301 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11302     cat >> confdefs.h <<\EOF
11303 #define HAVE_FCNTL_LOCK 1
11304 EOF
11305
11306 fi
11307
11308 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11309 echo "configure:11310: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11310 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11311   echo $ac_n "(cached) $ac_c" 1>&6
11312 else
11313   
11314 if test "$cross_compiling" = yes; then
11315   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11316 else
11317   cat > conftest.$ac_ext <<EOF
11318 #line 11319 "configure"
11319 #include "confdefs.h"
11320 #include "${srcdir-.}/tests/fcntl_lock64.c"
11321 EOF
11322 if { (eval echo configure:11323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11323 then
11324   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11325 else
11326   echo "configure: failed program was:" >&5
11327   cat conftest.$ac_ext >&5
11328   rm -fr conftest*
11329   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11330 fi
11331 rm -fr conftest*
11332 fi
11333
11334 fi
11335
11336 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11337 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11338     cat >> confdefs.h <<\EOF
11339 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11340 EOF
11341
11342
11343 else
11344
11345
11346   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11347 echo "configure:11348: checking for 64 bit fcntl locking" >&5
11348 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11349   echo $ac_n "(cached) $ac_c" 1>&6
11350 else
11351   
11352   if test "$cross_compiling" = yes; then
11353   samba_cv_HAVE_STRUCT_FLOCK64=cross
11354 else
11355   cat > conftest.$ac_ext <<EOF
11356 #line 11357 "configure"
11357 #include "confdefs.h"
11358
11359 #if defined(HAVE_UNISTD_H)
11360 #include <unistd.h>
11361 #endif
11362 #include <stdio.h>
11363 #include <stdlib.h>
11364
11365 #ifdef HAVE_FCNTL_H
11366 #include <fcntl.h>
11367 #endif
11368
11369 #ifdef HAVE_SYS_FCNTL_H
11370 #include <sys/fcntl.h>
11371 #endif
11372 main() { struct flock64 fl64;
11373 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11374 exit(0);
11375 #else
11376 exit(1);
11377 #endif
11378 }
11379 EOF
11380 if { (eval echo configure:11381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11381 then
11382   samba_cv_HAVE_STRUCT_FLOCK64=yes
11383 else
11384   echo "configure: failed program was:" >&5
11385   cat conftest.$ac_ext >&5
11386   rm -fr conftest*
11387   samba_cv_HAVE_STRUCT_FLOCK64=no
11388 fi
11389 rm -fr conftest*
11390 fi
11391
11392 fi
11393
11394 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11395
11396   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11397       cat >> confdefs.h <<\EOF
11398 #define HAVE_STRUCT_FLOCK64 1
11399 EOF
11400
11401   fi
11402 fi
11403
11404 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11405 echo "configure:11406: checking for st_blocks in struct stat" >&5
11406 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11407   echo $ac_n "(cached) $ac_c" 1>&6
11408 else
11409   
11410 cat > conftest.$ac_ext <<EOF
11411 #line 11412 "configure"
11412 #include "confdefs.h"
11413 #include <sys/types.h>
11414 #include <sys/stat.h>
11415 #include <unistd.h>
11416 int main() {
11417 struct stat st;  st.st_blocks = 0;
11418 ; return 0; }
11419 EOF
11420 if { (eval echo configure:11421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11421   rm -rf conftest*
11422   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11423 else
11424   echo "configure: failed program was:" >&5
11425   cat conftest.$ac_ext >&5
11426   rm -rf conftest*
11427   samba_cv_HAVE_STAT_ST_BLOCKS=no
11428 fi
11429 rm -f conftest*
11430 fi
11431
11432 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11433 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11434     cat >> confdefs.h <<\EOF
11435 #define HAVE_STAT_ST_BLOCKS 1
11436 EOF
11437
11438 fi 
11439
11440 case "$host_os" in
11441 *linux*)
11442 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11443 echo "configure:11444: checking for broken RedHat 7.2 system header files" >&5
11444 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11445   echo $ac_n "(cached) $ac_c" 1>&6
11446 else
11447   
11448 cat > conftest.$ac_ext <<EOF
11449 #line 11450 "configure"
11450 #include "confdefs.h"
11451
11452 #ifdef HAVE_SYS_VFS_H
11453 #include <sys/vfs.h>
11454 #endif
11455 #ifdef HAVE_SYS_CAPABILITY_H
11456 #include <sys/capability.h>
11457 #endif
11458
11459 int main() {
11460 int i;
11461 ; return 0; }
11462 EOF
11463 if { (eval echo configure:11464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11464   rm -rf conftest*
11465   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11466 else
11467   echo "configure: failed program was:" >&5
11468   cat conftest.$ac_ext >&5
11469   rm -rf conftest*
11470   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11471 fi
11472 rm -f conftest*
11473 fi
11474
11475 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11476 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11477    cat >> confdefs.h <<\EOF
11478 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11479 EOF
11480
11481 fi
11482 ;;
11483 esac
11484
11485 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11486 echo "configure:11487: checking for broken nisplus include files" >&5
11487 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11488   echo $ac_n "(cached) $ac_c" 1>&6
11489 else
11490   
11491 cat > conftest.$ac_ext <<EOF
11492 #line 11493 "configure"
11493 #include "confdefs.h"
11494 #include <sys/acl.h>
11495 #if defined(HAVE_RPCSVC_NIS_H)
11496 #include <rpcsvc/nis.h>
11497 #endif
11498 int main() {
11499 int i;
11500 ; return 0; }
11501 EOF
11502 if { (eval echo configure:11503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11503   rm -rf conftest*
11504   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11505 else
11506   echo "configure: failed program was:" >&5
11507   cat conftest.$ac_ext >&5
11508   rm -rf conftest*
11509   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11510 fi
11511 rm -f conftest*
11512 fi
11513
11514 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11515 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11516     cat >> confdefs.h <<\EOF
11517 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11518 EOF
11519
11520 fi
11521
11522
11523 #################################################
11524 # check for smbwrapper support
11525 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11526 echo "configure:11527: checking whether to use smbwrapper" >&5
11527 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11528 if test "${with_smbwrapper+set}" = set; then
11529   withval="$with_smbwrapper"
11530    case "$withval" in
11531   yes)
11532     echo "$ac_t""yes" 1>&6
11533     cat >> confdefs.h <<\EOF
11534 #define WITH_SMBWRAPPER 1
11535 EOF
11536
11537         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11538
11539         if test x$ATTEMPT_WRAP32_BUILD = x; then
11540                 WRAP32=""
11541         else
11542                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11543         fi
11544
11545 # Conditions under which smbwrapper should not be built.
11546
11547         if test x$PICFLAG = x; then
11548            echo No support for PIC code - disabling smbwrapper and smbsh
11549            WRAP=""
11550            WRAP32=""
11551         elif test x$ac_cv_func_syscall = xno; then
11552            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11553            WRAP=""
11554            WRAP32=""
11555         fi
11556     ;;
11557   *)
11558     echo "$ac_t""no" 1>&6
11559     ;;
11560   esac 
11561 else
11562   echo "$ac_t""no" 1>&6
11563
11564 fi
11565
11566
11567 #################################################
11568 # check for AFS clear-text auth support
11569 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11570 echo "configure:11571: checking whether to use AFS clear-text auth" >&5
11571 # Check whether --with-afs or --without-afs was given.
11572 if test "${with_afs+set}" = set; then
11573   withval="$with_afs"
11574    case "$withval" in
11575   yes)
11576     echo "$ac_t""yes" 1>&6
11577     cat >> confdefs.h <<\EOF
11578 #define WITH_AFS 1
11579 EOF
11580
11581     ;;
11582   *)
11583     echo "$ac_t""no" 1>&6
11584     ;;
11585   esac 
11586 else
11587   echo "$ac_t""no" 1>&6
11588
11589 fi
11590
11591
11592
11593 #################################################
11594 # check for the DFS clear-text auth system
11595 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11596 echo "configure:11597: checking whether to use DFS clear-text auth" >&5
11597 # Check whether --with-dfs or --without-dfs was given.
11598 if test "${with_dfs+set}" = set; then
11599   withval="$with_dfs"
11600    case "$withval" in
11601   yes)
11602     echo "$ac_t""yes" 1>&6
11603     cat >> confdefs.h <<\EOF
11604 #define WITH_DFS 1
11605 EOF
11606
11607     ;;
11608   *)
11609     echo "$ac_t""no" 1>&6
11610     ;;
11611   esac 
11612 else
11613   echo "$ac_t""no" 1>&6
11614
11615 fi
11616
11617
11618
11619 #################################################
11620 # see if this box has the RedHat location for kerberos
11621 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11622 echo "configure:11623: checking for /usr/kerberos" >&5
11623 if test -d /usr/kerberos; then
11624     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11625     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11626     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11627     echo "$ac_t""yes" 1>&6
11628 else
11629     echo "$ac_t""no" 1>&6
11630 fi
11631
11632 #################################################
11633 # check for location of Kerberos 5 install
11634 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11635 echo "configure:11636: checking for kerberos 5 install path" >&5
11636 # Check whether --with-krb5 or --without-krb5 was given.
11637 if test "${with_krb5+set}" = set; then
11638   withval="$with_krb5"
11639    case "$withval" in
11640   no)
11641     echo "$ac_t""no" 1>&6
11642     ;;
11643   *)
11644     echo "$ac_t""yes" 1>&6
11645     LIBS="$LIBS -lkrb5"
11646     CFLAGS="$CFLAGS -I$withval/include"
11647     CPPFLAGS="$CPPFLAGS -I$withval/include"
11648     LDFLAGS="$LDFLAGS -L$withval/lib"
11649     ;;
11650   esac 
11651 else
11652   echo "$ac_t""no" 1>&6
11653
11654 fi
11655
11656
11657 # now check for krb5.h. Some systems have the libraries without the headers!
11658 # note that this check is done here to allow for different kerberos
11659 # include paths
11660 for ac_hdr in krb5.h
11661 do
11662 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11663 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11664 echo "configure:11665: checking for $ac_hdr" >&5
11665 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11666   echo $ac_n "(cached) $ac_c" 1>&6
11667 else
11668   cat > conftest.$ac_ext <<EOF
11669 #line 11670 "configure"
11670 #include "confdefs.h"
11671 #include <$ac_hdr>
11672 EOF
11673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11674 { (eval echo configure:11675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11676 if test -z "$ac_err"; then
11677   rm -rf conftest*
11678   eval "ac_cv_header_$ac_safe=yes"
11679 else
11680   echo "$ac_err" >&5
11681   echo "configure: failed program was:" >&5
11682   cat conftest.$ac_ext >&5
11683   rm -rf conftest*
11684   eval "ac_cv_header_$ac_safe=no"
11685 fi
11686 rm -f conftest*
11687 fi
11688 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11689   echo "$ac_t""yes" 1>&6
11690     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11691   cat >> confdefs.h <<EOF
11692 #define $ac_tr_hdr 1
11693 EOF
11694  
11695 else
11696   echo "$ac_t""no" 1>&6
11697 fi
11698 done
11699
11700
11701 # now check for gssapi headers.  This is also done here to allow for
11702 # different kerberos include paths
11703 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
11704 do
11705 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11706 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11707 echo "configure:11708: checking for $ac_hdr" >&5
11708 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11709   echo $ac_n "(cached) $ac_c" 1>&6
11710 else
11711   cat > conftest.$ac_ext <<EOF
11712 #line 11713 "configure"
11713 #include "confdefs.h"
11714 #include <$ac_hdr>
11715 EOF
11716 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11717 { (eval echo configure:11718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11718 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11719 if test -z "$ac_err"; then
11720   rm -rf conftest*
11721   eval "ac_cv_header_$ac_safe=yes"
11722 else
11723   echo "$ac_err" >&5
11724   echo "configure: failed program was:" >&5
11725   cat conftest.$ac_ext >&5
11726   rm -rf conftest*
11727   eval "ac_cv_header_$ac_safe=no"
11728 fi
11729 rm -f conftest*
11730 fi
11731 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11732   echo "$ac_t""yes" 1>&6
11733     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11734   cat >> confdefs.h <<EOF
11735 #define $ac_tr_hdr 1
11736 EOF
11737  
11738 else
11739   echo "$ac_t""no" 1>&6
11740 fi
11741 done
11742
11743
11744 ##################################################################
11745 # we might need the k5crypto and com_err libraries on some systems
11746 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11747 echo "configure:11748: checking for _et_list in -lcom_err" >&5
11748 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11749 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11750   echo $ac_n "(cached) $ac_c" 1>&6
11751 else
11752   ac_save_LIBS="$LIBS"
11753 LIBS="-lcom_err  $LIBS"
11754 cat > conftest.$ac_ext <<EOF
11755 #line 11756 "configure"
11756 #include "confdefs.h"
11757 /* Override any gcc2 internal prototype to avoid an error.  */
11758 /* We use char because int might match the return type of a gcc2
11759     builtin and then its argument prototype would still apply.  */
11760 char _et_list();
11761
11762 int main() {
11763 _et_list()
11764 ; return 0; }
11765 EOF
11766 if { (eval echo configure:11767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11767   rm -rf conftest*
11768   eval "ac_cv_lib_$ac_lib_var=yes"
11769 else
11770   echo "configure: failed program was:" >&5
11771   cat conftest.$ac_ext >&5
11772   rm -rf conftest*
11773   eval "ac_cv_lib_$ac_lib_var=no"
11774 fi
11775 rm -f conftest*
11776 LIBS="$ac_save_LIBS"
11777
11778 fi
11779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11780   echo "$ac_t""yes" 1>&6
11781   LIBS="$LIBS -lcom_err"
11782 else
11783   echo "$ac_t""no" 1>&6
11784 fi
11785
11786 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11787 echo "configure:11788: checking for krb5_encrypt_data in -lk5crypto" >&5
11788 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11789 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11790   echo $ac_n "(cached) $ac_c" 1>&6
11791 else
11792   ac_save_LIBS="$LIBS"
11793 LIBS="-lk5crypto  $LIBS"
11794 cat > conftest.$ac_ext <<EOF
11795 #line 11796 "configure"
11796 #include "confdefs.h"
11797 /* Override any gcc2 internal prototype to avoid an error.  */
11798 /* We use char because int might match the return type of a gcc2
11799     builtin and then its argument prototype would still apply.  */
11800 char krb5_encrypt_data();
11801
11802 int main() {
11803 krb5_encrypt_data()
11804 ; return 0; }
11805 EOF
11806 if { (eval echo configure:11807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11807   rm -rf conftest*
11808   eval "ac_cv_lib_$ac_lib_var=yes"
11809 else
11810   echo "configure: failed program was:" >&5
11811   cat conftest.$ac_ext >&5
11812   rm -rf conftest*
11813   eval "ac_cv_lib_$ac_lib_var=no"
11814 fi
11815 rm -f conftest*
11816 LIBS="$ac_save_LIBS"
11817
11818 fi
11819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11820   echo "$ac_t""yes" 1>&6
11821   LIBS="$LIBS -lk5crypto"
11822 else
11823   echo "$ac_t""no" 1>&6
11824 fi
11825
11826
11827 ########################################################
11828 # now see if we can find the krb5 libs in standard paths
11829 # or as specified above
11830 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11831 echo "configure:11832: checking for krb5_mk_req_extended in -lkrb5" >&5
11832 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11833 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11834   echo $ac_n "(cached) $ac_c" 1>&6
11835 else
11836   ac_save_LIBS="$LIBS"
11837 LIBS="-lkrb5  $LIBS"
11838 cat > conftest.$ac_ext <<EOF
11839 #line 11840 "configure"
11840 #include "confdefs.h"
11841 /* Override any gcc2 internal prototype to avoid an error.  */
11842 /* We use char because int might match the return type of a gcc2
11843     builtin and then its argument prototype would still apply.  */
11844 char krb5_mk_req_extended();
11845
11846 int main() {
11847 krb5_mk_req_extended()
11848 ; return 0; }
11849 EOF
11850 if { (eval echo configure:11851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11851   rm -rf conftest*
11852   eval "ac_cv_lib_$ac_lib_var=yes"
11853 else
11854   echo "configure: failed program was:" >&5
11855   cat conftest.$ac_ext >&5
11856   rm -rf conftest*
11857   eval "ac_cv_lib_$ac_lib_var=no"
11858 fi
11859 rm -f conftest*
11860 LIBS="$ac_save_LIBS"
11861
11862 fi
11863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11864   echo "$ac_t""yes" 1>&6
11865   LIBS="$LIBS -lkrb5";
11866         cat >> confdefs.h <<\EOF
11867 #define HAVE_KRB5 1
11868 EOF
11869
11870 else
11871   echo "$ac_t""no" 1>&6
11872 fi
11873
11874
11875 ########################################################
11876 # now see if we can find the gssapi libs in standard paths
11877 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
11878 echo "configure:11879: checking for gss_display_status in -lgssapi_krb5" >&5
11879 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
11880 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11881   echo $ac_n "(cached) $ac_c" 1>&6
11882 else
11883   ac_save_LIBS="$LIBS"
11884 LIBS="-lgssapi_krb5  $LIBS"
11885 cat > conftest.$ac_ext <<EOF
11886 #line 11887 "configure"
11887 #include "confdefs.h"
11888 /* Override any gcc2 internal prototype to avoid an error.  */
11889 /* We use char because int might match the return type of a gcc2
11890     builtin and then its argument prototype would still apply.  */
11891 char gss_display_status();
11892
11893 int main() {
11894 gss_display_status()
11895 ; return 0; }
11896 EOF
11897 if { (eval echo configure:11898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11898   rm -rf conftest*
11899   eval "ac_cv_lib_$ac_lib_var=yes"
11900 else
11901   echo "configure: failed program was:" >&5
11902   cat conftest.$ac_ext >&5
11903   rm -rf conftest*
11904   eval "ac_cv_lib_$ac_lib_var=no"
11905 fi
11906 rm -f conftest*
11907 LIBS="$ac_save_LIBS"
11908
11909 fi
11910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11911   echo "$ac_t""yes" 1>&6
11912   LIBS="$LIBS -lgssapi_krb5";
11913         cat >> confdefs.h <<\EOF
11914 #define HAVE_GSSAPI 1
11915 EOF
11916
11917 else
11918   echo "$ac_t""no" 1>&6
11919 fi
11920
11921
11922 ##################################################################
11923 # we might need the lber lib on some systems. To avoid link errors
11924 # this test must be before the libldap test
11925 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
11926 echo "configure:11927: checking for ber_scanf in -llber" >&5
11927 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
11928 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11929   echo $ac_n "(cached) $ac_c" 1>&6
11930 else
11931   ac_save_LIBS="$LIBS"
11932 LIBS="-llber  $LIBS"
11933 cat > conftest.$ac_ext <<EOF
11934 #line 11935 "configure"
11935 #include "confdefs.h"
11936 /* Override any gcc2 internal prototype to avoid an error.  */
11937 /* We use char because int might match the return type of a gcc2
11938     builtin and then its argument prototype would still apply.  */
11939 char ber_scanf();
11940
11941 int main() {
11942 ber_scanf()
11943 ; return 0; }
11944 EOF
11945 if { (eval echo configure:11946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11946   rm -rf conftest*
11947   eval "ac_cv_lib_$ac_lib_var=yes"
11948 else
11949   echo "configure: failed program was:" >&5
11950   cat conftest.$ac_ext >&5
11951   rm -rf conftest*
11952   eval "ac_cv_lib_$ac_lib_var=no"
11953 fi
11954 rm -f conftest*
11955 LIBS="$ac_save_LIBS"
11956
11957 fi
11958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11959   echo "$ac_t""yes" 1>&6
11960   LIBS="$LIBS -llber"
11961 else
11962   echo "$ac_t""no" 1>&6
11963 fi
11964
11965
11966 ########################################################
11967 # now see if we can find the ldap libs in standard paths
11968 if test x$have_ldap != xyes; then
11969 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
11970 echo "configure:11971: checking for ldap_domain2hostlist in -lldap" >&5
11971 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
11972 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11973   echo $ac_n "(cached) $ac_c" 1>&6
11974 else
11975   ac_save_LIBS="$LIBS"
11976 LIBS="-lldap  $LIBS"
11977 cat > conftest.$ac_ext <<EOF
11978 #line 11979 "configure"
11979 #include "confdefs.h"
11980 /* Override any gcc2 internal prototype to avoid an error.  */
11981 /* We use char because int might match the return type of a gcc2
11982     builtin and then its argument prototype would still apply.  */
11983 char ldap_domain2hostlist();
11984
11985 int main() {
11986 ldap_domain2hostlist()
11987 ; return 0; }
11988 EOF
11989 if { (eval echo configure:11990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11990   rm -rf conftest*
11991   eval "ac_cv_lib_$ac_lib_var=yes"
11992 else
11993   echo "configure: failed program was:" >&5
11994   cat conftest.$ac_ext >&5
11995   rm -rf conftest*
11996   eval "ac_cv_lib_$ac_lib_var=no"
11997 fi
11998 rm -f conftest*
11999 LIBS="$ac_save_LIBS"
12000
12001 fi
12002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12003   echo "$ac_t""yes" 1>&6
12004   LIBS="$LIBS -lldap";
12005         cat >> confdefs.h <<\EOF
12006 #define HAVE_LDAP 1
12007 EOF
12008
12009 else
12010   echo "$ac_t""no" 1>&6
12011 fi
12012
12013 fi
12014
12015 #################################################
12016 # check for automount support
12017 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12018 echo "configure:12019: checking whether to use AUTOMOUNT" >&5
12019 # Check whether --with-automount or --without-automount was given.
12020 if test "${with_automount+set}" = set; then
12021   withval="$with_automount"
12022    case "$withval" in
12023   yes)
12024     echo "$ac_t""yes" 1>&6
12025     cat >> confdefs.h <<\EOF
12026 #define WITH_AUTOMOUNT 1
12027 EOF
12028
12029     ;;
12030   *)
12031     echo "$ac_t""no" 1>&6
12032     ;;
12033   esac 
12034 else
12035   echo "$ac_t""no" 1>&6
12036
12037 fi
12038
12039
12040 #################################################
12041 # check for smbmount support
12042 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12043 echo "configure:12044: checking whether to use SMBMOUNT" >&5
12044 # Check whether --with-smbmount or --without-smbmount was given.
12045 if test "${with_smbmount+set}" = set; then
12046   withval="$with_smbmount"
12047    case "$withval" in
12048   yes)
12049         case "$host_os" in
12050         *linux*)
12051                 echo "$ac_t""yes" 1>&6
12052                 cat >> confdefs.h <<\EOF
12053 #define WITH_SMBMOUNT 1
12054 EOF
12055
12056                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12057                 ;;
12058         *)
12059                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12060                 ;;
12061         esac
12062     ;;
12063   *)
12064     echo "$ac_t""no" 1>&6
12065     MPROGS=
12066     ;;
12067   esac 
12068 else
12069   echo "$ac_t""no" 1>&6
12070   MPROGS=
12071
12072 fi
12073
12074
12075
12076 #################################################
12077 # check for a PAM clear-text auth, accounts, password and session support
12078 with_pam_for_crypt=no
12079 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12080 echo "configure:12081: checking whether to use PAM" >&5
12081 # Check whether --with-pam or --without-pam was given.
12082 if test "${with_pam+set}" = set; then
12083   withval="$with_pam"
12084    case "$withval" in
12085   yes)
12086     echo "$ac_t""yes" 1>&6
12087     cat >> confdefs.h <<\EOF
12088 #define WITH_PAM 1
12089 EOF
12090
12091     LIBS="$LIBS -lpam"
12092     with_pam_for_crypt=yes
12093     ;;
12094   *)
12095     echo "$ac_t""no" 1>&6
12096     ;;
12097   esac 
12098 else
12099   echo "$ac_t""no" 1>&6
12100
12101 fi
12102
12103
12104 # we can't build a pam module if we don't have pam.
12105 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12106 echo "configure:12107: checking for pam_get_data in -lpam" >&5
12107 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12108 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12109   echo $ac_n "(cached) $ac_c" 1>&6
12110 else
12111   ac_save_LIBS="$LIBS"
12112 LIBS="-lpam  $LIBS"
12113 cat > conftest.$ac_ext <<EOF
12114 #line 12115 "configure"
12115 #include "confdefs.h"
12116 /* Override any gcc2 internal prototype to avoid an error.  */
12117 /* We use char because int might match the return type of a gcc2
12118     builtin and then its argument prototype would still apply.  */
12119 char pam_get_data();
12120
12121 int main() {
12122 pam_get_data()
12123 ; return 0; }
12124 EOF
12125 if { (eval echo configure:12126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12126   rm -rf conftest*
12127   eval "ac_cv_lib_$ac_lib_var=yes"
12128 else
12129   echo "configure: failed program was:" >&5
12130   cat conftest.$ac_ext >&5
12131   rm -rf conftest*
12132   eval "ac_cv_lib_$ac_lib_var=no"
12133 fi
12134 rm -f conftest*
12135 LIBS="$ac_save_LIBS"
12136
12137 fi
12138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12139   echo "$ac_t""yes" 1>&6
12140   cat >> confdefs.h <<\EOF
12141 #define HAVE_LIBPAM 1
12142 EOF
12143
12144 else
12145   echo "$ac_t""no" 1>&6
12146 fi
12147
12148
12149 #################################################
12150 # check for pam_smbpass support
12151 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12152 echo "configure:12153: checking whether to use pam_smbpass" >&5
12153 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12154 if test "${with_pam_smbpass+set}" = set; then
12155   withval="$with_pam_smbpass"
12156    case "$withval" in
12157   yes)
12158     echo "$ac_t""yes" 1>&6
12159
12160 # Conditions under which pam_smbpass should not be built.
12161
12162        if test x$PICFLAG = x; then
12163           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12164           PAM_MOD=""
12165        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12166           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12167           PAM_MOD=""
12168        else
12169           PAM_MOD="bin/pam_smbpass.so"
12170        fi
12171     ;;
12172   *)
12173     echo "$ac_t""no" 1>&6
12174     ;;
12175   esac 
12176 else
12177   echo "$ac_t""no" 1>&6
12178
12179 fi
12180
12181
12182
12183 ###############################################
12184 # test for where we get crypt() from, but only
12185 # if not using PAM
12186 if test $with_pam_for_crypt = no; then
12187 for ac_func in crypt
12188 do
12189 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12190 echo "configure:12191: checking for $ac_func" >&5
12191 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12192   echo $ac_n "(cached) $ac_c" 1>&6
12193 else
12194   cat > conftest.$ac_ext <<EOF
12195 #line 12196 "configure"
12196 #include "confdefs.h"
12197 /* System header to define __stub macros and hopefully few prototypes,
12198     which can conflict with char $ac_func(); below.  */
12199 #include <assert.h>
12200 /* Override any gcc2 internal prototype to avoid an error.  */
12201 /* We use char because int might match the return type of a gcc2
12202     builtin and then its argument prototype would still apply.  */
12203 char $ac_func();
12204
12205 int main() {
12206
12207 /* The GNU C library defines this for functions which it implements
12208     to always fail with ENOSYS.  Some functions are actually named
12209     something starting with __ and the normal name is an alias.  */
12210 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12211 choke me
12212 #else
12213 $ac_func();
12214 #endif
12215
12216 ; return 0; }
12217 EOF
12218 if { (eval echo configure:12219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12219   rm -rf conftest*
12220   eval "ac_cv_func_$ac_func=yes"
12221 else
12222   echo "configure: failed program was:" >&5
12223   cat conftest.$ac_ext >&5
12224   rm -rf conftest*
12225   eval "ac_cv_func_$ac_func=no"
12226 fi
12227 rm -f conftest*
12228 fi
12229
12230 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12231   echo "$ac_t""yes" 1>&6
12232     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12233   cat >> confdefs.h <<EOF
12234 #define $ac_tr_func 1
12235 EOF
12236  
12237 else
12238   echo "$ac_t""no" 1>&6
12239 fi
12240 done
12241
12242 if test x"$ac_cv_func_crypt" = x"no"; then
12243     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12244 echo "configure:12245: checking for crypt in -lcrypt" >&5
12245 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12246 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12247   echo $ac_n "(cached) $ac_c" 1>&6
12248 else
12249   ac_save_LIBS="$LIBS"
12250 LIBS="-lcrypt  $LIBS"
12251 cat > conftest.$ac_ext <<EOF
12252 #line 12253 "configure"
12253 #include "confdefs.h"
12254 /* Override any gcc2 internal prototype to avoid an error.  */
12255 /* We use char because int might match the return type of a gcc2
12256     builtin and then its argument prototype would still apply.  */
12257 char crypt();
12258
12259 int main() {
12260 crypt()
12261 ; return 0; }
12262 EOF
12263 if { (eval echo configure:12264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12264   rm -rf conftest*
12265   eval "ac_cv_lib_$ac_lib_var=yes"
12266 else
12267   echo "configure: failed program was:" >&5
12268   cat conftest.$ac_ext >&5
12269   rm -rf conftest*
12270   eval "ac_cv_lib_$ac_lib_var=no"
12271 fi
12272 rm -f conftest*
12273 LIBS="$ac_save_LIBS"
12274
12275 fi
12276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12277   echo "$ac_t""yes" 1>&6
12278   LIBS="$LIBS -lcrypt";
12279         cat >> confdefs.h <<\EOF
12280 #define HAVE_CRYPT 1
12281 EOF
12282
12283 else
12284   echo "$ac_t""no" 1>&6
12285 fi
12286
12287 fi
12288 fi
12289
12290 ##
12291 ## moved after the check for -lcrypt in order to
12292 ## ensure that the necessary libraries are included
12293 ## check checking for truncated salt.  Wrapped by the
12294 ## $with_pam_for_crypt variable as above   --jerry
12295 ##
12296 if test $with_pam_for_crypt = no; then
12297 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12298 echo "configure:12299: checking for a crypt that needs truncated salt" >&5
12299 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12300   echo $ac_n "(cached) $ac_c" 1>&6
12301 else
12302   
12303 if test "$cross_compiling" = yes; then
12304   samba_cv_HAVE_TRUNCATED_SALT=cross
12305 else
12306   cat > conftest.$ac_ext <<EOF
12307 #line 12308 "configure"
12308 #include "confdefs.h"
12309 #include "${srcdir-.}/tests/crypttest.c"
12310 EOF
12311 if { (eval echo configure:12312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12312 then
12313   samba_cv_HAVE_TRUNCATED_SALT=no
12314 else
12315   echo "configure: failed program was:" >&5
12316   cat conftest.$ac_ext >&5
12317   rm -fr conftest*
12318   samba_cv_HAVE_TRUNCATED_SALT=yes
12319 fi
12320 rm -fr conftest*
12321 fi
12322
12323 fi
12324
12325 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12326 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12327         cat >> confdefs.h <<\EOF
12328 #define HAVE_TRUNCATED_SALT 1
12329 EOF
12330
12331 fi
12332 fi
12333
12334
12335
12336 ########################################################################################
12337 ##
12338 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12339 ##
12340 ########################################################################################
12341
12342 #################################################
12343 # check for a TDB password database
12344 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12345 echo "configure:12346: checking whether to use TDB SAM database" >&5
12346 # Check whether --with-tdbsam or --without-tdbsam was given.
12347 if test "${with_tdbsam+set}" = set; then
12348   withval="$with_tdbsam"
12349    case "$withval" in
12350   yes)
12351     echo "$ac_t""yes" 1>&6
12352     cat >> confdefs.h <<\EOF
12353 #define WITH_TDB_SAM 1
12354 EOF
12355
12356     ;;
12357   *)
12358     echo "$ac_t""no" 1>&6
12359     ;;
12360   esac 
12361 else
12362   echo "$ac_t""no" 1>&6
12363
12364 fi
12365
12366
12367 #################################################
12368 # check for a LDAP password database
12369 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
12370 echo "configure:12371: checking whether to use LDAP SAM database" >&5
12371 # Check whether --with-ldapsam or --without-ldapsam was given.
12372 if test "${with_ldapsam+set}" = set; then
12373   withval="$with_ldapsam"
12374    case "$withval" in
12375   yes)
12376     echo "$ac_t""yes" 1>&6
12377     cat >> confdefs.h <<\EOF
12378 #define WITH_LDAP_SAM 1
12379 EOF
12380
12381     LIBS="-lldap -llber $LIBS"
12382     ;;
12383   *)
12384     echo "$ac_t""no" 1>&6
12385     ;;
12386   esac 
12387 else
12388   echo "$ac_t""no" 1>&6
12389
12390 fi
12391
12392
12393 #################################################
12394 # check for a NISPLUS password database
12395 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12396 echo "configure:12397: checking whether to use NISPLUS SAM database" >&5
12397 # Check whether --with-nisplussam or --without-nisplussam was given.
12398 if test "${with_nisplussam+set}" = set; then
12399   withval="$with_nisplussam"
12400    case "$withval" in
12401   yes)
12402     echo "$ac_t""yes" 1>&6
12403     cat >> confdefs.h <<\EOF
12404 #define WITH_NISPLUS_SAM 1
12405 EOF
12406
12407     ;;
12408   *)
12409     echo "$ac_t""no" 1>&6
12410     ;;
12411   esac 
12412 else
12413   echo "$ac_t""no" 1>&6
12414
12415 fi
12416
12417
12418 ########################################################################################
12419 ##
12420 ## END OF TESTS FOR SAM BACKENDS.  
12421 ##
12422 ########################################################################################
12423
12424 #################################################
12425 # check for a NISPLUS_HOME support 
12426 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12427 echo "configure:12428: checking whether to use NISPLUS_HOME" >&5
12428 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12429 if test "${with_nisplus_home+set}" = set; then
12430   withval="$with_nisplus_home"
12431    case "$withval" in
12432   yes)
12433     echo "$ac_t""yes" 1>&6
12434     cat >> confdefs.h <<\EOF
12435 #define WITH_NISPLUS_HOME 1
12436 EOF
12437
12438     ;;
12439   *)
12440     echo "$ac_t""no" 1>&6
12441     ;;
12442   esac 
12443 else
12444   echo "$ac_t""no" 1>&6
12445
12446 fi
12447
12448
12449 #################################################
12450 # check for the secure socket layer
12451 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12452 echo "configure:12453: checking whether to use SSL" >&5
12453 # Check whether --with-ssl or --without-ssl was given.
12454 if test "${with_ssl+set}" = set; then
12455   withval="$with_ssl"
12456    case "$withval" in
12457   yes)
12458     echo "$ac_t""yes" 1>&6
12459     cat >> confdefs.h <<\EOF
12460 #define WITH_SSL 1
12461 EOF
12462
12463     withval="/usr/local/ssl"     # default
12464
12465     if test "${with_sslinc+set}" = set; then
12466
12467         withval="$with_sslinc"
12468         case "$withval" in
12469         yes|no)
12470           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12471           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12472         ;;
12473         * )
12474           CFLAGS="-I${withval} $CFLAGS"
12475         ;;
12476         esac
12477
12478     else
12479
12480         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12481
12482     fi
12483
12484     if test "${with_ssllib+set}" = set; then
12485
12486         withval="$with_ssllib"
12487         case "$withval" in
12488         yes|no)
12489           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12490           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12491         ;;
12492         * )
12493           LDFLAGS="-L${withval}/lib $LDFLAGS"
12494         ;;
12495         esac
12496
12497     else
12498
12499         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12500
12501     fi
12502
12503     LIBS="-lssl -lcrypto $LIBS"
12504
12505 #    if test ! -d ${withval}; then
12506 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12507 #      exit 1
12508 #    fi 
12509
12510     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12511
12512     ;;
12513   *)
12514     echo "$ac_t""no" 1>&6
12515     ;;
12516   esac 
12517 else
12518   echo "$ac_t""no" 1>&6
12519
12520 fi
12521
12522
12523 #################################################
12524 # check for syslog logging
12525 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12526 echo "configure:12527: checking whether to use syslog logging" >&5
12527 # Check whether --with-syslog or --without-syslog was given.
12528 if test "${with_syslog+set}" = set; then
12529   withval="$with_syslog"
12530    case "$withval" in
12531   yes)
12532     echo "$ac_t""yes" 1>&6
12533     cat >> confdefs.h <<\EOF
12534 #define WITH_SYSLOG 1
12535 EOF
12536
12537     ;;
12538   *)
12539     echo "$ac_t""no" 1>&6
12540     ;;
12541   esac 
12542 else
12543   echo "$ac_t""no" 1>&6
12544
12545 fi
12546
12547
12548 #################################################
12549 # check for a shared memory profiling support
12550 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12551 echo "configure:12552: checking whether to use profiling" >&5
12552 # Check whether --with-profiling-data or --without-profiling-data was given.
12553 if test "${with_profiling_data+set}" = set; then
12554   withval="$with_profiling_data"
12555    case "$withval" in
12556   yes)
12557     echo "$ac_t""yes" 1>&6
12558     cat >> confdefs.h <<\EOF
12559 #define WITH_PROFILE 1
12560 EOF
12561
12562     ;;
12563   *)
12564     echo "$ac_t""no" 1>&6
12565     ;;
12566   esac 
12567 else
12568   echo "$ac_t""no" 1>&6
12569
12570 fi
12571
12572
12573
12574 #################################################
12575 # check for experimental disk-quotas support
12576 QUOTAOBJS=smbd/noquotas.o
12577
12578 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12579 echo "configure:12580: checking whether to support disk-quotas" >&5
12580 # Check whether --with-quotas or --without-quotas was given.
12581 if test "${with_quotas+set}" = set; then
12582   withval="$with_quotas"
12583    case "$withval" in
12584   yes)
12585     echo "$ac_t""yes" 1>&6
12586     case "$host_os" in
12587       *linux*)
12588         # Check for kernel 2.4.x quota braindamage...
12589         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12590 echo "configure:12591: checking for linux 2.4.x quota braindamage.." >&5
12591 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12592   echo $ac_n "(cached) $ac_c" 1>&6
12593 else
12594   
12595         cat > conftest.$ac_ext <<EOF
12596 #line 12597 "configure"
12597 #include "confdefs.h"
12598 #include <stdio.h>
12599 #include <sys/types.h>
12600 #include <asm/types.h>
12601 #include <linux/quota.h>
12602 #include <mntent.h>
12603 #include <linux/unistd.h>
12604 int main() {
12605 struct mem_dqblk D;
12606 ; return 0; }
12607 EOF
12608 if { (eval echo configure:12609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12609   rm -rf conftest*
12610   samba_cv_linux_2_4_quota_braindamage=yes
12611 else
12612   echo "configure: failed program was:" >&5
12613   cat conftest.$ac_ext >&5
12614   rm -rf conftest*
12615   samba_cv_linux_2_4_quota_braindamage=no
12616 fi
12617 rm -f conftest*
12618 fi
12619
12620 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12621 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12622         cat >> confdefs.h <<\EOF
12623 #define LINUX_QUOTAS_2 1
12624 EOF
12625
12626 else
12627         cat >> confdefs.h <<\EOF
12628 #define LINUX_QUOTAS_1 1
12629 EOF
12630
12631 fi
12632         ;;
12633       *)
12634         ;;
12635     esac
12636     QUOTAOBJS=smbd/quotas.o
12637     cat >> confdefs.h <<\EOF
12638 #define WITH_QUOTAS 1
12639 EOF
12640
12641     ;;
12642   *)
12643     echo "$ac_t""no" 1>&6
12644     ;;
12645   esac 
12646 else
12647   echo "$ac_t""no" 1>&6
12648
12649 fi
12650
12651
12652
12653 #################################################
12654 # check for experimental utmp accounting
12655
12656 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12657 echo "configure:12658: checking whether to support utmp accounting" >&5
12658 # Check whether --with-utmp or --without-utmp was given.
12659 if test "${with_utmp+set}" = set; then
12660   withval="$with_utmp"
12661    case "$withval" in
12662   yes)
12663     echo "$ac_t""yes" 1>&6
12664     cat >> confdefs.h <<\EOF
12665 #define WITH_UTMP 1
12666 EOF
12667
12668     ;;
12669   *)
12670     echo "$ac_t""no" 1>&6
12671     ;;
12672   esac 
12673 else
12674   echo "$ac_t""no" 1>&6
12675
12676 fi
12677
12678
12679 #################################################
12680 # set private directory location
12681 # Check whether --with-privatedir or --without-privatedir was given.
12682 if test "${with_privatedir+set}" = set; then
12683   withval="$with_privatedir"
12684    case "$withval" in
12685   yes|no)
12686   #
12687   # Just in case anybody calls it without argument
12688   #
12689     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12690     privatedir='${prefix}/private'
12691   ;;
12692   * )
12693     privatedir="$withval"
12694     ;;
12695   esac
12696   
12697 else
12698   privatedir='${prefix}/private'
12699    
12700
12701 fi
12702
12703
12704 #################################################
12705 # set lock directory location
12706 # Check whether --with-lockdir or --without-lockdir was given.
12707 if test "${with_lockdir+set}" = set; then
12708   withval="$with_lockdir"
12709    case "$withval" in
12710   yes|no)
12711   #
12712   # Just in case anybody calls it without argument
12713   #
12714     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12715     lockdir='$(VARDIR)/locks'
12716   ;;
12717   * )
12718     lockdir="$withval"
12719     ;;
12720   esac
12721   
12722 else
12723   lockdir='$(VARDIR)/locks'
12724    
12725
12726 fi
12727
12728
12729 #################################################
12730 # set SWAT directory location
12731 # Check whether --with-swatdir or --without-swatdir was given.
12732 if test "${with_swatdir+set}" = set; then
12733   withval="$with_swatdir"
12734    case "$withval" in
12735   yes|no)
12736   #
12737   # Just in case anybody does it
12738   #
12739     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12740     swatdir='${prefix}/swat'
12741   ;;
12742   * )
12743     swatdir="$withval"
12744     ;;
12745   esac
12746   
12747 else
12748   swatdir='${prefix}/swat'
12749    
12750
12751 fi
12752
12753
12754 #################################################
12755 # choose native language(s) of man pages
12756 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12757 echo "configure:12758: checking chosen man pages' language(s)" >&5
12758 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12759 if test "${with_manpages_langs+set}" = set; then
12760   withval="$with_manpages_langs"
12761    case "$withval" in
12762   yes|no)
12763     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12764     manlangs="en"
12765   ;;
12766   *)
12767     manlangs="$withval"
12768   ;;
12769   esac
12770
12771   echo "$ac_t""$manlangs" 1>&6
12772   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12773   
12774 else
12775   manlangs="en"
12776   echo "$ac_t""$manlangs" 1>&6
12777   
12778
12779 fi
12780
12781
12782 #################################################
12783 # these tests are taken from the GNU fileutils package
12784 echo "checking how to get filesystem space usage" 1>&6
12785 echo "configure:12786: checking how to get filesystem space usage" >&5
12786 space=no
12787
12788 # Test for statvfs64.
12789 if test $space = no; then
12790   # SVR4
12791   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12792 echo "configure:12793: checking statvfs64 function (SVR4)" >&5
12793 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12794   echo $ac_n "(cached) $ac_c" 1>&6
12795 else
12796   if test "$cross_compiling" = yes; then
12797   fu_cv_sys_stat_statvfs64=cross
12798 else
12799   cat > conftest.$ac_ext <<EOF
12800 #line 12801 "configure"
12801 #include "confdefs.h"
12802
12803 #if defined(HAVE_UNISTD_H)
12804 #include <unistd.h>
12805 #endif
12806 #include <sys/types.h>
12807 #include <sys/statvfs.h>
12808   main ()
12809   {
12810     struct statvfs64 fsd;
12811     exit (statvfs64 (".", &fsd));
12812   }
12813 EOF
12814 if { (eval echo configure:12815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12815 then
12816   fu_cv_sys_stat_statvfs64=yes
12817 else
12818   echo "configure: failed program was:" >&5
12819   cat conftest.$ac_ext >&5
12820   rm -fr conftest*
12821   fu_cv_sys_stat_statvfs64=no
12822 fi
12823 rm -fr conftest*
12824 fi
12825
12826 fi
12827
12828 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12829   if test $fu_cv_sys_stat_statvfs64 = yes; then
12830     space=yes
12831     cat >> confdefs.h <<\EOF
12832 #define STAT_STATVFS64 1
12833 EOF
12834
12835   fi
12836 fi
12837
12838 # Perform only the link test since it seems there are no variants of the
12839 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12840 # because that got a false positive on SCO OSR5.  Adding the declaration
12841 # of a `struct statvfs' causes this test to fail (as it should) on such
12842 # systems.  That system is reported to work fine with STAT_STATFS4 which
12843 # is what it gets when this test fails.
12844 if test $space = no; then
12845   # SVR4
12846   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12847 echo "configure:12848: checking statvfs function (SVR4)" >&5
12848 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12849   echo $ac_n "(cached) $ac_c" 1>&6
12850 else
12851   cat > conftest.$ac_ext <<EOF
12852 #line 12853 "configure"
12853 #include "confdefs.h"
12854 #include <sys/types.h>
12855 #include <sys/statvfs.h>
12856 int main() {
12857 struct statvfs fsd; statvfs (0, &fsd);
12858 ; return 0; }
12859 EOF
12860 if { (eval echo configure:12861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12861   rm -rf conftest*
12862   fu_cv_sys_stat_statvfs=yes
12863 else
12864   echo "configure: failed program was:" >&5
12865   cat conftest.$ac_ext >&5
12866   rm -rf conftest*
12867   fu_cv_sys_stat_statvfs=no
12868 fi
12869 rm -f conftest*
12870 fi
12871
12872 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12873   if test $fu_cv_sys_stat_statvfs = yes; then
12874     space=yes
12875     cat >> confdefs.h <<\EOF
12876 #define STAT_STATVFS 1
12877 EOF
12878
12879   fi
12880 fi
12881
12882 if test $space = no; then
12883   # DEC Alpha running OSF/1
12884   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12885 echo "configure:12886: checking for 3-argument statfs function (DEC OSF/1)" >&5
12886   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12887   echo $ac_n "(cached) $ac_c" 1>&6
12888 else
12889   if test "$cross_compiling" = yes; then
12890   fu_cv_sys_stat_statfs3_osf1=no
12891 else
12892   cat > conftest.$ac_ext <<EOF
12893 #line 12894 "configure"
12894 #include "confdefs.h"
12895
12896 #include <sys/param.h>
12897 #include <sys/types.h>
12898 #include <sys/mount.h>
12899   main ()
12900   {
12901     struct statfs fsd;
12902     fsd.f_fsize = 0;
12903     exit (statfs (".", &fsd, sizeof (struct statfs)));
12904   }
12905 EOF
12906 if { (eval echo configure:12907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12907 then
12908   fu_cv_sys_stat_statfs3_osf1=yes
12909 else
12910   echo "configure: failed program was:" >&5
12911   cat conftest.$ac_ext >&5
12912   rm -fr conftest*
12913   fu_cv_sys_stat_statfs3_osf1=no
12914 fi
12915 rm -fr conftest*
12916 fi
12917
12918 fi
12919
12920   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12921   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12922     space=yes
12923     cat >> confdefs.h <<\EOF
12924 #define STAT_STATFS3_OSF1 1
12925 EOF
12926
12927   fi
12928 fi
12929
12930 if test $space = no; then
12931 # AIX
12932   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12933 echo "configure:12934: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12934   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12935   echo $ac_n "(cached) $ac_c" 1>&6
12936 else
12937   if test "$cross_compiling" = yes; then
12938   fu_cv_sys_stat_statfs2_bsize=no
12939 else
12940   cat > conftest.$ac_ext <<EOF
12941 #line 12942 "configure"
12942 #include "confdefs.h"
12943
12944 #ifdef HAVE_SYS_PARAM_H
12945 #include <sys/param.h>
12946 #endif
12947 #ifdef HAVE_SYS_MOUNT_H
12948 #include <sys/mount.h>
12949 #endif
12950 #ifdef HAVE_SYS_VFS_H
12951 #include <sys/vfs.h>
12952 #endif
12953   main ()
12954   {
12955   struct statfs fsd;
12956   fsd.f_bsize = 0;
12957   exit (statfs (".", &fsd));
12958   }
12959 EOF
12960 if { (eval echo configure:12961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12961 then
12962   fu_cv_sys_stat_statfs2_bsize=yes
12963 else
12964   echo "configure: failed program was:" >&5
12965   cat conftest.$ac_ext >&5
12966   rm -fr conftest*
12967   fu_cv_sys_stat_statfs2_bsize=no
12968 fi
12969 rm -fr conftest*
12970 fi
12971
12972 fi
12973
12974   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12975   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12976     space=yes
12977     cat >> confdefs.h <<\EOF
12978 #define STAT_STATFS2_BSIZE 1
12979 EOF
12980
12981   fi
12982 fi
12983
12984 if test $space = no; then
12985 # SVR3
12986   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12987 echo "configure:12988: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12988   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12989   echo $ac_n "(cached) $ac_c" 1>&6
12990 else
12991   if test "$cross_compiling" = yes; then
12992   fu_cv_sys_stat_statfs4=no
12993 else
12994   cat > conftest.$ac_ext <<EOF
12995 #line 12996 "configure"
12996 #include "confdefs.h"
12997 #include <sys/types.h>
12998 #include <sys/statfs.h>
12999   main ()
13000   {
13001   struct statfs fsd;
13002   exit (statfs (".", &fsd, sizeof fsd, 0));
13003   }
13004 EOF
13005 if { (eval echo configure:13006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13006 then
13007   fu_cv_sys_stat_statfs4=yes
13008 else
13009   echo "configure: failed program was:" >&5
13010   cat conftest.$ac_ext >&5
13011   rm -fr conftest*
13012   fu_cv_sys_stat_statfs4=no
13013 fi
13014 rm -fr conftest*
13015 fi
13016
13017 fi
13018
13019   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13020   if test $fu_cv_sys_stat_statfs4 = yes; then
13021     space=yes
13022     cat >> confdefs.h <<\EOF
13023 #define STAT_STATFS4 1
13024 EOF
13025
13026   fi
13027 fi
13028
13029 if test $space = no; then
13030 # 4.4BSD and NetBSD
13031   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13032 echo "configure:13033: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13033   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13034   echo $ac_n "(cached) $ac_c" 1>&6
13035 else
13036   if test "$cross_compiling" = yes; then
13037   fu_cv_sys_stat_statfs2_fsize=no
13038 else
13039   cat > conftest.$ac_ext <<EOF
13040 #line 13041 "configure"
13041 #include "confdefs.h"
13042 #include <sys/types.h>
13043 #ifdef HAVE_SYS_PARAM_H
13044 #include <sys/param.h>
13045 #endif
13046 #ifdef HAVE_SYS_MOUNT_H
13047 #include <sys/mount.h>
13048 #endif
13049   main ()
13050   {
13051   struct statfs fsd;
13052   fsd.f_fsize = 0;
13053   exit (statfs (".", &fsd));
13054   }
13055 EOF
13056 if { (eval echo configure:13057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13057 then
13058   fu_cv_sys_stat_statfs2_fsize=yes
13059 else
13060   echo "configure: failed program was:" >&5
13061   cat conftest.$ac_ext >&5
13062   rm -fr conftest*
13063   fu_cv_sys_stat_statfs2_fsize=no
13064 fi
13065 rm -fr conftest*
13066 fi
13067
13068 fi
13069
13070   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13071   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13072     space=yes
13073     cat >> confdefs.h <<\EOF
13074 #define STAT_STATFS2_FSIZE 1
13075 EOF
13076
13077   fi
13078 fi
13079
13080 if test $space = no; then
13081   # Ultrix
13082   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13083 echo "configure:13084: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13084   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13085   echo $ac_n "(cached) $ac_c" 1>&6
13086 else
13087   if test "$cross_compiling" = yes; then
13088   fu_cv_sys_stat_fs_data=no
13089 else
13090   cat > conftest.$ac_ext <<EOF
13091 #line 13092 "configure"
13092 #include "confdefs.h"
13093 #include <sys/types.h>
13094 #ifdef HAVE_SYS_PARAM_H
13095 #include <sys/param.h>
13096 #endif
13097 #ifdef HAVE_SYS_MOUNT_H
13098 #include <sys/mount.h>
13099 #endif
13100 #ifdef HAVE_SYS_FS_TYPES_H
13101 #include <sys/fs_types.h>
13102 #endif
13103   main ()
13104   {
13105   struct fs_data fsd;
13106   /* Ultrix's statfs returns 1 for success,
13107      0 for not mounted, -1 for failure.  */
13108   exit (statfs (".", &fsd) != 1);
13109   }
13110 EOF
13111 if { (eval echo configure:13112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13112 then
13113   fu_cv_sys_stat_fs_data=yes
13114 else
13115   echo "configure: failed program was:" >&5
13116   cat conftest.$ac_ext >&5
13117   rm -fr conftest*
13118   fu_cv_sys_stat_fs_data=no
13119 fi
13120 rm -fr conftest*
13121 fi
13122
13123 fi
13124
13125   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13126   if test $fu_cv_sys_stat_fs_data = yes; then
13127     space=yes
13128     cat >> confdefs.h <<\EOF
13129 #define STAT_STATFS2_FS_DATA 1
13130 EOF
13131
13132   fi
13133 fi
13134
13135 #
13136 # As a gating factor for large file support, in order to
13137 # use <4GB files we must have the following minimal support
13138 # available.
13139 # long long, and a 64 bit off_t or off64_t.
13140 # If we don't have all of these then disable large
13141 # file support.
13142 #
13143 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13144 echo "configure:13145: checking if large file support can be enabled" >&5
13145 cat > conftest.$ac_ext <<EOF
13146 #line 13147 "configure"
13147 #include "confdefs.h"
13148
13149 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13150 #include <sys/types.h>
13151 #else
13152 __COMPILE_ERROR_
13153 #endif
13154
13155 int main() {
13156 int i
13157 ; return 0; }
13158 EOF
13159 if { (eval echo configure:13160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13160   rm -rf conftest*
13161   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13162 else
13163   echo "configure: failed program was:" >&5
13164   cat conftest.$ac_ext >&5
13165   rm -rf conftest*
13166   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13167 fi
13168 rm -f conftest*
13169 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13170     cat >> confdefs.h <<\EOF
13171 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13172 EOF
13173
13174 fi
13175 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13176
13177 # Check whether --with-spinlocks or --without-spinlocks was given.
13178 if test "${with_spinlocks+set}" = set; then
13179   withval="$with_spinlocks"
13180   :
13181 fi
13182
13183 if test "x$with_spinlocks" = "xyes"; then
13184     cat >> confdefs.h <<\EOF
13185 #define USE_SPINLOCKS 1
13186 EOF
13187
13188
13189     case "$host_cpu" in
13190         sparc)
13191             cat >> confdefs.h <<\EOF
13192 #define SPARC_SPINLOCKS 1
13193 EOF
13194
13195             ;;
13196
13197         i386|i486|i586|i686)
13198             cat >> confdefs.h <<\EOF
13199 #define INTEL_SPINLOCKS 1
13200 EOF
13201
13202             ;;
13203
13204         mips)
13205             cat >> confdefs.h <<\EOF
13206 #define MIPS_SPINLOCKS 1
13207 EOF
13208
13209             ;;
13210
13211         powerpc)
13212             cat >> confdefs.h <<\EOF
13213 #define POWERPC_SPINLOCKS 1
13214 EOF
13215
13216             ;;
13217     esac
13218 fi
13219
13220 #################################################
13221 # check for ACL support
13222
13223 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13224 echo "configure:13225: checking whether to support ACLs" >&5
13225 # Check whether --with-acl-support or --without-acl-support was given.
13226 if test "${with_acl_support+set}" = set; then
13227   withval="$with_acl_support"
13228    case "$withval" in
13229   yes)
13230
13231         case "$host_os" in
13232         *sysv5*)
13233                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13234                 cat >> confdefs.h <<\EOF
13235 #define HAVE_UNIXWARE_ACLS 1
13236 EOF
13237
13238                 ;;
13239         *solaris*)
13240                 echo "$ac_t""Using solaris ACLs" 1>&6
13241                 cat >> confdefs.h <<\EOF
13242 #define HAVE_SOLARIS_ACLS 1
13243 EOF
13244
13245                 ;;
13246         *hpux*)
13247                 echo "$ac_t""Using HPUX ACLs" 1>&6
13248                 cat >> confdefs.h <<\EOF
13249 #define HAVE_HPUX_ACLS 1
13250 EOF
13251
13252                 ;;
13253         *irix*)
13254                 echo "$ac_t""Using IRIX ACLs" 1>&6
13255                 cat >> confdefs.h <<\EOF
13256 #define HAVE_IRIX_ACLS 1
13257 EOF
13258
13259                 ;;
13260         *aix*)
13261                 echo "$ac_t""Using AIX ACLs" 1>&6
13262                 cat >> confdefs.h <<\EOF
13263 #define HAVE_AIX_ACLS 1
13264 EOF
13265
13266                 ;;
13267         *osf*)
13268                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13269                 cat >> confdefs.h <<\EOF
13270 #define HAVE_TRU64_ACLS 1
13271 EOF
13272
13273                 LIBS="$LIBS -lpacl"
13274                 ;;
13275         *)
13276                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13277 echo "configure:13278: checking for acl_get_file in -lacl" >&5
13278 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13279 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13280   echo $ac_n "(cached) $ac_c" 1>&6
13281 else
13282   ac_save_LIBS="$LIBS"
13283 LIBS="-lacl  $LIBS"
13284 cat > conftest.$ac_ext <<EOF
13285 #line 13286 "configure"
13286 #include "confdefs.h"
13287 /* Override any gcc2 internal prototype to avoid an error.  */
13288 /* We use char because int might match the return type of a gcc2
13289     builtin and then its argument prototype would still apply.  */
13290 char acl_get_file();
13291
13292 int main() {
13293 acl_get_file()
13294 ; return 0; }
13295 EOF
13296 if { (eval echo configure:13297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13297   rm -rf conftest*
13298   eval "ac_cv_lib_$ac_lib_var=yes"
13299 else
13300   echo "configure: failed program was:" >&5
13301   cat conftest.$ac_ext >&5
13302   rm -rf conftest*
13303   eval "ac_cv_lib_$ac_lib_var=no"
13304 fi
13305 rm -f conftest*
13306 LIBS="$ac_save_LIBS"
13307
13308 fi
13309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13310   echo "$ac_t""yes" 1>&6
13311     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13312     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13313   cat >> confdefs.h <<EOF
13314 #define $ac_tr_lib 1
13315 EOF
13316
13317   LIBS="-lacl $LIBS"
13318
13319 else
13320   echo "$ac_t""no" 1>&6
13321 fi
13322
13323                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13324 echo "configure:13325: checking for ACL support" >&5
13325 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13326   echo $ac_n "(cached) $ac_c" 1>&6
13327 else
13328   
13329                 cat > conftest.$ac_ext <<EOF
13330 #line 13331 "configure"
13331 #include "confdefs.h"
13332 #include <sys/types.h>
13333 #include <sys/acl.h>
13334 int main() {
13335  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13336 ; return 0; }
13337 EOF
13338 if { (eval echo configure:13339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13339   rm -rf conftest*
13340   samba_cv_HAVE_POSIX_ACLS=yes
13341 else
13342   echo "configure: failed program was:" >&5
13343   cat conftest.$ac_ext >&5
13344   rm -rf conftest*
13345   samba_cv_HAVE_POSIX_ACLS=no
13346 fi
13347 rm -f conftest*
13348 fi
13349
13350 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13351                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13352                                 echo "$ac_t""Using posix ACLs" 1>&6
13353                                 cat >> confdefs.h <<\EOF
13354 #define HAVE_POSIX_ACLS 1
13355 EOF
13356
13357                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13358 echo "configure:13359: checking for acl_get_perm_np" >&5
13359 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13360   echo $ac_n "(cached) $ac_c" 1>&6
13361 else
13362   
13363                                 cat > conftest.$ac_ext <<EOF
13364 #line 13365 "configure"
13365 #include "confdefs.h"
13366 #include <sys/types.h>
13367 #include <sys/acl.h>
13368 int main() {
13369  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13370 ; return 0; }
13371 EOF
13372 if { (eval echo configure:13373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13373   rm -rf conftest*
13374   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13375 else
13376   echo "configure: failed program was:" >&5
13377   cat conftest.$ac_ext >&5
13378   rm -rf conftest*
13379   samba_cv_HAVE_ACL_GET_PERM_NP=no
13380 fi
13381 rm -f conftest*
13382 fi
13383
13384 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13385                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13386                                         cat >> confdefs.h <<\EOF
13387 #define HAVE_ACL_GET_PERM_NP 1
13388 EOF
13389
13390                                 fi
13391                         fi
13392             ;;
13393         esac
13394         ;;
13395   *)
13396     echo "$ac_t""no" 1>&6
13397     cat >> confdefs.h <<\EOF
13398 #define HAVE_NO_ACLS 1
13399 EOF
13400
13401     ;;
13402   esac 
13403 else
13404   cat >> confdefs.h <<\EOF
13405 #define HAVE_NO_ACLS 1
13406 EOF
13407
13408   echo "$ac_t""no" 1>&6
13409
13410 fi
13411
13412
13413 #################################################
13414 # Check whether winbind is supported on this platform.  If so we need to
13415 # build and install client programs (WINBIND_TARGETS), sbin programs
13416 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13417
13418 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13419 echo "configure:13420: checking whether to build winbind" >&5
13420
13421 # Initially, the value of $host_os decides whether winbind is supported
13422
13423 case "$host_os" in 
13424         *linux*|*solaris*|*irix*)
13425                 HAVE_WINBIND=yes
13426                 ;;
13427         *)
13428                 HAVE_WINBIND=no
13429                 winbind_no_reason=", unsupported on $host_os"
13430                 ;;
13431 esac
13432
13433 # Check the setting of --with-winbindd
13434
13435 # Check whether --with-winbind or --without-winbind was given.
13436 if test "${with_winbind+set}" = set; then
13437   withval="$with_winbind"
13438    
13439   case "$withval" in
13440         yes)
13441                 HAVE_WINBIND=yes
13442                 ;;
13443         no)
13444                 HAVE_WINBIND=no
13445                 winbind_reason=""
13446                 ;;
13447   esac 
13448 fi
13449
13450
13451 # We need unix domain sockets for winbind
13452
13453 if test x"$HAVE_WINBIND" = x"yes"; then
13454         if test x"$samba_cv_unixsocket" = x"no"; then
13455                 winbind_no_reason=", no unix domain socket support on $host_os"
13456                 HAVE_WINBIND=no
13457         fi
13458 fi
13459
13460 # Display test results
13461
13462 WINBIND_TARGETS=""
13463 WINBIND_STARGETS=""
13464 WINBIND_LTARGETS=""
13465 WINBIND_PAM_PROGS=""
13466
13467 if test x"$HAVE_WINBIND" = x"yes"; then
13468         echo "$ac_t""yes" 1>&6
13469
13470         WINBIND_TARGETS="bin/wbinfo"
13471         WINBIND_STARGETS="bin/winbindd"
13472         if test x"$BLDSHARED" = x"true"; then
13473                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13474                 if test x"$with_pam" = x"yes"; then
13475                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13476                 fi
13477         fi
13478 else
13479         echo "$ac_t""no$winbind_no_reason" 1>&6
13480 fi
13481
13482 # Substitution time!
13483
13484
13485
13486
13487
13488
13489 #################################################
13490 # Check to see if we should use the included popt 
13491
13492 # Check whether --with-included-popt or --without-included-popt was given.
13493 if test "${with_included_popt+set}" = set; then
13494   withval="$with_included_popt"
13495    
13496   case "$withval" in
13497         yes)
13498                 INCLUDED_POPT=yes
13499                 ;;
13500         no)
13501                 INCLUDED_POPT=no
13502                 ;;
13503   esac 
13504 fi
13505
13506 if test x"$INCLUDED_POPT" != x"yes"; then
13507     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13508 echo "configure:13509: checking for poptGetContext in -lpopt" >&5
13509 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13510 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13511   echo $ac_n "(cached) $ac_c" 1>&6
13512 else
13513   ac_save_LIBS="$LIBS"
13514 LIBS="-lpopt  $LIBS"
13515 cat > conftest.$ac_ext <<EOF
13516 #line 13517 "configure"
13517 #include "confdefs.h"
13518 /* Override any gcc2 internal prototype to avoid an error.  */
13519 /* We use char because int might match the return type of a gcc2
13520     builtin and then its argument prototype would still apply.  */
13521 char poptGetContext();
13522
13523 int main() {
13524 poptGetContext()
13525 ; return 0; }
13526 EOF
13527 if { (eval echo configure:13528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13528   rm -rf conftest*
13529   eval "ac_cv_lib_$ac_lib_var=yes"
13530 else
13531   echo "configure: failed program was:" >&5
13532   cat conftest.$ac_ext >&5
13533   rm -rf conftest*
13534   eval "ac_cv_lib_$ac_lib_var=no"
13535 fi
13536 rm -f conftest*
13537 LIBS="$ac_save_LIBS"
13538
13539 fi
13540 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13541   echo "$ac_t""yes" 1>&6
13542   INCLUDED_POPT=no
13543 else
13544   echo "$ac_t""no" 1>&6
13545 INCLUDED_POPT=yes
13546 fi
13547
13548 fi
13549
13550 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13551 echo "configure:13552: checking whether to use included popt" >&5
13552 if test x"$INCLUDED_POPT" = x"yes"; then
13553     echo "$ac_t""$srcdir/popt" 1>&6
13554     BUILD_POPT='$(POPT_OBJS)'
13555     FLAGS1="-I$srcdir/popt"
13556 else
13557     echo "$ac_t""no" 1>&6
13558     LIBS="$LIBS -lpopt"
13559 fi
13560
13561
13562
13563 #################################################
13564 # final configure stuff
13565
13566 echo "checking configure summary"
13567 if test "$cross_compiling" = yes; then
13568   :
13569 else
13570   cat > conftest.$ac_ext <<EOF
13571 #line 13572 "configure"
13572 #include "confdefs.h"
13573 #include "${srcdir-.}/tests/summary.c"
13574 EOF
13575 if { (eval echo configure:13576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13576 then
13577   echo "configure OK";
13578 else
13579   echo "configure: failed program was:" >&5
13580   cat conftest.$ac_ext >&5
13581   rm -fr conftest*
13582   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
13583 fi
13584 rm -fr conftest*
13585 fi
13586
13587
13588 builddir=`pwd`
13589
13590
13591 trap '' 1 2 15
13592 cat > confcache <<\EOF
13593 # This file is a shell script that caches the results of configure
13594 # tests run on this system so they can be shared between configure
13595 # scripts and configure runs.  It is not useful on other systems.
13596 # If it contains results you don't want to keep, you may remove or edit it.
13597 #
13598 # By default, configure uses ./config.cache as the cache file,
13599 # creating it if it does not exist already.  You can give configure
13600 # the --cache-file=FILE option to use a different cache file; that is
13601 # what configure does when it calls configure scripts in
13602 # subdirectories, so they share the cache.
13603 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13604 # config.status only pays attention to the cache file if you give it the
13605 # --recheck option to rerun configure.
13606 #
13607 EOF
13608 # The following way of writing the cache mishandles newlines in values,
13609 # but we know of no workaround that is simple, portable, and efficient.
13610 # So, don't put newlines in cache variables' values.
13611 # Ultrix sh set writes to stderr and can't be redirected directly,
13612 # and sets the high bit in the cache file unless we assign to the vars.
13613 (set) 2>&1 |
13614   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13615   *ac_space=\ *)
13616     # `set' does not quote correctly, so add quotes (double-quote substitution
13617     # turns \\\\ into \\, and sed turns \\ into \).
13618     sed -n \
13619       -e "s/'/'\\\\''/g" \
13620       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13621     ;;
13622   *)
13623     # `set' quotes correctly as required by POSIX, so do not add quotes.
13624     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13625     ;;
13626   esac >> confcache
13627 if cmp -s $cache_file confcache; then
13628   :
13629 else
13630   if test -w $cache_file; then
13631     echo "updating cache $cache_file"
13632     cat confcache > $cache_file
13633   else
13634     echo "not updating unwritable cache $cache_file"
13635   fi
13636 fi
13637 rm -f confcache
13638
13639 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13640
13641 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13642 # Let make expand exec_prefix.
13643 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13644
13645 # Any assignment to VPATH causes Sun make to only execute
13646 # the first set of double-colon rules, so remove it if not needed.
13647 # If there is a colon in the path, we need to keep it.
13648 if test "x$srcdir" = x.; then
13649   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13650 fi
13651
13652 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13653
13654 DEFS=-DHAVE_CONFIG_H
13655
13656 # Without the "./", some shells look in PATH for config.status.
13657 : ${CONFIG_STATUS=./config.status}
13658
13659 echo creating $CONFIG_STATUS
13660 rm -f $CONFIG_STATUS
13661 cat > $CONFIG_STATUS <<EOF
13662 #! /bin/sh
13663 # Generated automatically by configure.
13664 # Run this file to recreate the current configuration.
13665 # This directory was configured as follows,
13666 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13667 #
13668 # $0 $ac_configure_args
13669 #
13670 # Compiler output produced by configure, useful for debugging
13671 # configure, is in ./config.log if it exists.
13672
13673 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13674 for ac_option
13675 do
13676   case "\$ac_option" in
13677   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13678     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13679     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13680   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13681     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13682     exit 0 ;;
13683   -help | --help | --hel | --he | --h)
13684     echo "\$ac_cs_usage"; exit 0 ;;
13685   *) echo "\$ac_cs_usage"; exit 1 ;;
13686   esac
13687 done
13688
13689 ac_given_srcdir=$srcdir
13690 ac_given_INSTALL="$INSTALL"
13691
13692 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13693 EOF
13694 cat >> $CONFIG_STATUS <<EOF
13695
13696 # Protect against being on the right side of a sed subst in config.status.
13697 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13698  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13699 $ac_vpsub
13700 $extrasub
13701 s%@SHELL@%$SHELL%g
13702 s%@CFLAGS@%$CFLAGS%g
13703 s%@CPPFLAGS@%$CPPFLAGS%g
13704 s%@CXXFLAGS@%$CXXFLAGS%g
13705 s%@FFLAGS@%$FFLAGS%g
13706 s%@DEFS@%$DEFS%g
13707 s%@LDFLAGS@%$LDFLAGS%g
13708 s%@LIBS@%$LIBS%g
13709 s%@exec_prefix@%$exec_prefix%g
13710 s%@prefix@%$prefix%g
13711 s%@program_transform_name@%$program_transform_name%g
13712 s%@bindir@%$bindir%g
13713 s%@sbindir@%$sbindir%g
13714 s%@libexecdir@%$libexecdir%g
13715 s%@datadir@%$datadir%g
13716 s%@sysconfdir@%$sysconfdir%g
13717 s%@sharedstatedir@%$sharedstatedir%g
13718 s%@localstatedir@%$localstatedir%g
13719 s%@libdir@%$libdir%g
13720 s%@includedir@%$includedir%g
13721 s%@oldincludedir@%$oldincludedir%g
13722 s%@infodir@%$infodir%g
13723 s%@mandir@%$mandir%g
13724 s%@RUNPROG@%$RUNPROG%g
13725 s%@MPROGS@%$MPROGS%g
13726 s%@LDSHFLAGS@%$LDSHFLAGS%g
13727 s%@SHLD@%$SHLD%g
13728 s%@HOST_OS@%$HOST_OS%g
13729 s%@PAM_MOD@%$PAM_MOD%g
13730 s%@WRAP@%$WRAP%g
13731 s%@WRAP32@%$WRAP32%g
13732 s%@PICFLAG@%$PICFLAG%g
13733 s%@PICSUFFIX@%$PICSUFFIX%g
13734 s%@POBAD_CC@%$POBAD_CC%g
13735 s%@SHLIBEXT@%$SHLIBEXT%g
13736 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13737 s%@CC@%$CC%g
13738 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13739 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13740 s%@INSTALL_DATA@%$INSTALL_DATA%g
13741 s%@AWK@%$AWK%g
13742 s%@BROKEN_CC@%$BROKEN_CC%g
13743 s%@host@%$host%g
13744 s%@host_alias@%$host_alias%g
13745 s%@host_cpu@%$host_cpu%g
13746 s%@host_vendor@%$host_vendor%g
13747 s%@host_os@%$host_os%g
13748 s%@target@%$target%g
13749 s%@target_alias@%$target_alias%g
13750 s%@target_cpu@%$target_cpu%g
13751 s%@target_vendor@%$target_vendor%g
13752 s%@target_os@%$target_os%g
13753 s%@build@%$build%g
13754 s%@build_alias@%$build_alias%g
13755 s%@build_cpu@%$build_cpu%g
13756 s%@build_vendor@%$build_vendor%g
13757 s%@build_os@%$build_os%g
13758 s%@CPP@%$CPP%g
13759 s%@LIBOBJS@%$LIBOBJS%g
13760 s%@TERMLIBS@%$TERMLIBS%g
13761 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13762 s%@ROFF@%$ROFF%g
13763 s%@QUOTAOBJS@%$QUOTAOBJS%g
13764 s%@privatedir@%$privatedir%g
13765 s%@lockdir@%$lockdir%g
13766 s%@swatdir@%$swatdir%g
13767 s%@manlangs@%$manlangs%g
13768 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13769 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13770 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13771 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
13772 s%@BUILD_POPT@%$BUILD_POPT%g
13773 s%@FLAGS1@%$FLAGS1%g
13774 s%@builddir@%$builddir%g
13775
13776 CEOF
13777 EOF
13778
13779 cat >> $CONFIG_STATUS <<\EOF
13780
13781 # Split the substitutions into bite-sized pieces for seds with
13782 # small command number limits, like on Digital OSF/1 and HP-UX.
13783 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13784 ac_file=1 # Number of current file.
13785 ac_beg=1 # First line for current file.
13786 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13787 ac_more_lines=:
13788 ac_sed_cmds=""
13789 while $ac_more_lines; do
13790   if test $ac_beg -gt 1; then
13791     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13792   else
13793     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13794   fi
13795   if test ! -s conftest.s$ac_file; then
13796     ac_more_lines=false
13797     rm -f conftest.s$ac_file
13798   else
13799     if test -z "$ac_sed_cmds"; then
13800       ac_sed_cmds="sed -f conftest.s$ac_file"
13801     else
13802       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13803     fi
13804     ac_file=`expr $ac_file + 1`
13805     ac_beg=$ac_end
13806     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13807   fi
13808 done
13809 if test -z "$ac_sed_cmds"; then
13810   ac_sed_cmds=cat
13811 fi
13812 EOF
13813
13814 cat >> $CONFIG_STATUS <<EOF
13815
13816 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13817 EOF
13818 cat >> $CONFIG_STATUS <<\EOF
13819 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13820   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13821   case "$ac_file" in
13822   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13823        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13824   *) ac_file_in="${ac_file}.in" ;;
13825   esac
13826
13827   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13828
13829   # Remove last slash and all that follows it.  Not all systems have dirname.
13830   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13831   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13832     # The file is in a subdirectory.
13833     test ! -d "$ac_dir" && mkdir "$ac_dir"
13834     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13835     # A "../" for each directory in $ac_dir_suffix.
13836     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13837   else
13838     ac_dir_suffix= ac_dots=
13839   fi
13840
13841   case "$ac_given_srcdir" in
13842   .)  srcdir=.
13843       if test -z "$ac_dots"; then top_srcdir=.
13844       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13845   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13846   *) # Relative path.
13847     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13848     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13849   esac
13850
13851   case "$ac_given_INSTALL" in
13852   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13853   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13854   esac
13855
13856   echo creating "$ac_file"
13857   rm -f "$ac_file"
13858   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13859   case "$ac_file" in
13860   *Makefile*) ac_comsub="1i\\
13861 # $configure_input" ;;
13862   *) ac_comsub= ;;
13863   esac
13864
13865   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13866   sed -e "$ac_comsub
13867 s%@configure_input@%$configure_input%g
13868 s%@srcdir@%$srcdir%g
13869 s%@top_srcdir@%$top_srcdir%g
13870 s%@INSTALL@%$INSTALL%g
13871 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13872 fi; done
13873 rm -f conftest.s*
13874
13875 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13876 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13877 #
13878 # ac_d sets the value in "#define NAME VALUE" lines.
13879 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13880 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13881 ac_dC='\3'
13882 ac_dD='%g'
13883 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13884 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13885 ac_uB='\([      ]\)%\1#\2define\3'
13886 ac_uC=' '
13887 ac_uD='\4%g'
13888 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13889 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13890 ac_eB='$%\1#\2define\3'
13891 ac_eC=' '
13892 ac_eD='%g'
13893
13894 if test "${CONFIG_HEADERS+set}" != set; then
13895 EOF
13896 cat >> $CONFIG_STATUS <<EOF
13897   CONFIG_HEADERS="include/config.h"
13898 EOF
13899 cat >> $CONFIG_STATUS <<\EOF
13900 fi
13901 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13902   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13903   case "$ac_file" in
13904   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13905        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13906   *) ac_file_in="${ac_file}.in" ;;
13907   esac
13908
13909   echo creating $ac_file
13910
13911   rm -f conftest.frag conftest.in conftest.out
13912   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13913   cat $ac_file_inputs > conftest.in
13914
13915 EOF
13916
13917 # Transform confdefs.h into a sed script conftest.vals that substitutes
13918 # the proper values into config.h.in to produce config.h.  And first:
13919 # Protect against being on the right side of a sed subst in config.status.
13920 # Protect against being in an unquoted here document in config.status.
13921 rm -f conftest.vals
13922 cat > conftest.hdr <<\EOF
13923 s/[\\&%]/\\&/g
13924 s%[\\$`]%\\&%g
13925 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13926 s%ac_d%ac_u%gp
13927 s%ac_u%ac_e%gp
13928 EOF
13929 sed -n -f conftest.hdr confdefs.h > conftest.vals
13930 rm -f conftest.hdr
13931
13932 # This sed command replaces #undef with comments.  This is necessary, for
13933 # example, in the case of _POSIX_SOURCE, which is predefined and required
13934 # on some systems where configure will not decide to define it.
13935 cat >> conftest.vals <<\EOF
13936 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13937 EOF
13938
13939 # Break up conftest.vals because some shells have a limit on
13940 # the size of here documents, and old seds have small limits too.
13941
13942 rm -f conftest.tail
13943 while :
13944 do
13945   ac_lines=`grep -c . conftest.vals`
13946   # grep -c gives empty output for an empty file on some AIX systems.
13947   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13948   # Write a limited-size here document to conftest.frag.
13949   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13950   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13951   echo 'CEOF
13952   sed -f conftest.frag conftest.in > conftest.out
13953   rm -f conftest.in
13954   mv conftest.out conftest.in
13955 ' >> $CONFIG_STATUS
13956   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13957   rm -f conftest.vals
13958   mv conftest.tail conftest.vals
13959 done
13960 rm -f conftest.vals
13961
13962 cat >> $CONFIG_STATUS <<\EOF
13963   rm -f conftest.frag conftest.h
13964   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13965   cat conftest.in >> conftest.h
13966   rm -f conftest.in
13967   if cmp -s $ac_file conftest.h 2>/dev/null; then
13968     echo "$ac_file is unchanged"
13969     rm -f conftest.h
13970   else
13971     # Remove last slash and all that follows it.  Not all systems have dirname.
13972       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13973       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13974       # The file is in a subdirectory.
13975       test ! -d "$ac_dir" && mkdir "$ac_dir"
13976     fi
13977     rm -f $ac_file
13978     mv conftest.h $ac_file
13979   fi
13980 fi; done
13981
13982 EOF
13983 cat >> $CONFIG_STATUS <<EOF
13984
13985 EOF
13986 cat >> $CONFIG_STATUS <<\EOF
13987
13988 exit 0
13989 EOF
13990 chmod +x $CONFIG_STATUS
13991 rm -fr confdefs* $ac_clean_files
13992 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13993
13994
13995 #################################################
13996 # Print very concise instructions on building/use
13997 if test "x$enable_dmalloc" = xyes
13998 then
13999         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14000         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14001 fi