patch from Alexander Bokovoy needed for dlopen on bsd systems
[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 mawk gawk nawk awk
964 do
965 # Extract the first word of "$ac_prog", so it can be a program name with args.
966 set dummy $ac_prog; ac_word=$2
967 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
968 echo "configure:969: checking for $ac_word" >&5
969 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
970   echo $ac_n "(cached) $ac_c" 1>&6
971 else
972   if test -n "$AWK"; then
973   ac_cv_prog_AWK="$AWK" # Let the user override the test.
974 else
975   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
976   ac_dummy="$PATH"
977   for ac_dir in $ac_dummy; do
978     test -z "$ac_dir" && ac_dir=.
979     if test -f $ac_dir/$ac_word; then
980       ac_cv_prog_AWK="$ac_prog"
981       break
982     fi
983   done
984   IFS="$ac_save_ifs"
985 fi
986 fi
987 AWK="$ac_cv_prog_AWK"
988 if test -n "$AWK"; then
989   echo "$ac_t""$AWK" 1>&6
990 else
991   echo "$ac_t""no" 1>&6
992 fi
993
994 test -n "$AWK" && break
995 done
996
997
998 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
999 echo "configure:1000: checking for POSIXized ISC" >&5
1000 if test -d /etc/conf/kconfig.d &&
1001   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1002 then
1003   echo "$ac_t""yes" 1>&6
1004   ISC=yes # If later tests want to check for ISC.
1005   cat >> confdefs.h <<\EOF
1006 #define _POSIX_SOURCE 1
1007 EOF
1008
1009   if test "$GCC" = yes; then
1010     CC="$CC -posix"
1011   else
1012     CC="$CC -Xp"
1013   fi
1014 else
1015   echo "$ac_t""no" 1>&6
1016   ISC=
1017 fi
1018
1019
1020 if test "x$CC" != xcc; then
1021   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1022 echo "configure:1023: checking whether $CC and cc understand -c and -o together" >&5
1023 else
1024   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1025 echo "configure:1026: checking whether cc understands -c and -o together" >&5
1026 fi
1027 set dummy $CC; ac_cc="`echo $2 |
1028                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1029 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1030   echo $ac_n "(cached) $ac_c" 1>&6
1031 else
1032   echo 'foo(){}' > conftest.c
1033 # Make sure it works both with $CC and with simple cc.
1034 # We do the test twice because some compilers refuse to overwrite an
1035 # existing .o file with -o, though they will create one.
1036 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1037 if { (eval echo configure:1038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1038    test -f conftest.o && { (eval echo configure:1039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1039 then
1040   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1041   if test "x$CC" != xcc; then
1042     # Test first that cc exists at all.
1043     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1044       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1045       if { (eval echo configure:1046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1046          test -f conftest.o && { (eval echo configure:1047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1047       then
1048         # cc works too.
1049         :
1050       else
1051         # cc exists but doesn't like -o.
1052         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1053       fi
1054     fi
1055   fi
1056 else
1057   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1058 fi
1059 rm -f conftest*
1060
1061 fi
1062 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1063   echo "$ac_t""yes" 1>&6
1064 else
1065   echo "$ac_t""no" 1>&6
1066   cat >> confdefs.h <<\EOF
1067 #define NO_MINUS_C_MINUS_O 1
1068 EOF
1069
1070 fi
1071
1072 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1073       BROKEN_CC=
1074 else
1075       BROKEN_CC=#
1076 fi
1077
1078
1079 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1080 echo "configure:1081: checking that the C compiler understands volatile" >&5
1081 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1082   echo $ac_n "(cached) $ac_c" 1>&6
1083 else
1084   
1085     cat > conftest.$ac_ext <<EOF
1086 #line 1087 "configure"
1087 #include "confdefs.h"
1088 #include <sys/types.h>
1089 int main() {
1090 volatile int i = 0
1091 ; return 0; }
1092 EOF
1093 if { (eval echo configure:1094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1094   rm -rf conftest*
1095   samba_cv_volatile=yes
1096 else
1097   echo "configure: failed program was:" >&5
1098   cat conftest.$ac_ext >&5
1099   rm -rf conftest*
1100   samba_cv_volatile=no
1101 fi
1102 rm -f conftest*
1103 fi
1104
1105 echo "$ac_t""$samba_cv_volatile" 1>&6
1106 if test x"$samba_cv_volatile" = x"yes"; then
1107    cat >> confdefs.h <<\EOF
1108 #define HAVE_VOLATILE 1
1109 EOF
1110
1111 fi
1112
1113
1114
1115 # Do some error checking and defaulting for the host and target type.
1116 # The inputs are:
1117 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1118 #
1119 # The rules are:
1120 # 1. You are not allowed to specify --host, --target, and nonopt at the
1121 #    same time.
1122 # 2. Host defaults to nonopt.
1123 # 3. If nonopt is not specified, then host defaults to the current host,
1124 #    as determined by config.guess.
1125 # 4. Target and build default to nonopt.
1126 # 5. If nonopt is not specified, then target and build default to host.
1127
1128 # The aliases save the names the user supplied, while $host etc.
1129 # will get canonicalized.
1130 case $host---$target---$nonopt in
1131 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1132 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1133 esac
1134
1135
1136 # Make sure we can run config.sub.
1137 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1138 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1139 fi
1140
1141 echo $ac_n "checking host system type""... $ac_c" 1>&6
1142 echo "configure:1143: checking host system type" >&5
1143
1144 host_alias=$host
1145 case "$host_alias" in
1146 NONE)
1147   case $nonopt in
1148   NONE)
1149     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1150     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1151     fi ;;
1152   *) host_alias=$nonopt ;;
1153   esac ;;
1154 esac
1155
1156 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1157 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1158 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1159 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1160 echo "$ac_t""$host" 1>&6
1161
1162 echo $ac_n "checking target system type""... $ac_c" 1>&6
1163 echo "configure:1164: checking target system type" >&5
1164
1165 target_alias=$target
1166 case "$target_alias" in
1167 NONE)
1168   case $nonopt in
1169   NONE) target_alias=$host_alias ;;
1170   *) target_alias=$nonopt ;;
1171   esac ;;
1172 esac
1173
1174 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1175 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1176 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1177 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1178 echo "$ac_t""$target" 1>&6
1179
1180 echo $ac_n "checking build system type""... $ac_c" 1>&6
1181 echo "configure:1182: checking build system type" >&5
1182
1183 build_alias=$build
1184 case "$build_alias" in
1185 NONE)
1186   case $nonopt in
1187   NONE) build_alias=$host_alias ;;
1188   *) build_alias=$nonopt ;;
1189   esac ;;
1190 esac
1191
1192 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1193 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1194 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1195 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1196 echo "$ac_t""$build" 1>&6
1197
1198 test "$host_alias" != "$target_alias" &&
1199   test "$program_prefix$program_suffix$program_transform_name" = \
1200     NONENONEs,x,x, &&
1201   program_prefix=${target_alias}-
1202
1203
1204   case "$host_os" in
1205         *irix6*) cat >> confdefs.h <<\EOF
1206 #include <standards.h>
1207 EOF
1208
1209         ;;
1210 esac
1211
1212
1213     
1214     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1215 echo "configure:1216: checking config.cache system type" >&5
1216     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1217          test x"$ac_cv_host_system_type" != x"$host"; } ||
1218        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1219          test x"$ac_cv_build_system_type" != x"$build"; } ||
1220        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1221          test x"$ac_cv_target_system_type" != x"$target"; }; then
1222         echo "$ac_t""different" 1>&6
1223         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1224     else
1225         echo "$ac_t""same" 1>&6
1226     fi
1227     ac_cv_host_system_type="$host"
1228     ac_cv_build_system_type="$build"
1229     ac_cv_target_system_type="$target"
1230
1231
1232 DYNEXP=
1233
1234 #
1235 # Config CPPFLAG settings for strange OS's that must be set
1236 # before other tests.
1237 #
1238 case "$host_os" in
1239 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1240     *hpux*)
1241     
1242       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1243 echo "configure:1244: checking whether ${CC-cc} accepts -Ae" >&5
1244 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1245   echo $ac_n "(cached) $ac_c" 1>&6
1246 else
1247   echo 'void f(){}' > conftest.c
1248 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1249   ac_cv_prog_cc_Ae=yes
1250 else
1251   ac_cv_prog_cc_Ae=no
1252 fi
1253 rm -f conftest*
1254
1255 fi
1256
1257 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1258       # mmap on HPUX is completely broken...
1259       cat >> confdefs.h <<\EOF
1260 #define MMAP_BLACKLIST 1
1261 EOF
1262
1263       if test $ac_cv_prog_cc_Ae = yes; then
1264         CPPFLAGS="$CPPFLAGS -Ae"
1265       fi
1266 #
1267 # Defines needed for HPUX support.
1268 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1269 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1270 #
1271       case `uname -r` in
1272                         *9*|*10*)
1273                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1274                                 cat >> confdefs.h <<\EOF
1275 #define USE_BOTH_CRYPT_CALLS 1
1276 EOF
1277
1278                                 cat >> confdefs.h <<\EOF
1279 #define _HPUX_SOURCE 1
1280 EOF
1281
1282                                 cat >> confdefs.h <<\EOF
1283 #define _POSIX_SOURCE 1
1284 EOF
1285
1286                                 cat >> confdefs.h <<\EOF
1287 #define _ALIGNMENT_REQUIRED 1
1288 EOF
1289
1290                                 cat >> confdefs.h <<\EOF
1291 #define _MAX_ALIGNMENT 4
1292 EOF
1293
1294                                 ;;
1295                         *11*)
1296                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1297                                 cat >> confdefs.h <<\EOF
1298 #define USE_BOTH_CRYPT_CALLS 1
1299 EOF
1300
1301                                 cat >> confdefs.h <<\EOF
1302 #define _HPUX_SOURCE 1
1303 EOF
1304
1305                                 cat >> confdefs.h <<\EOF
1306 #define _POSIX_SOURCE 1
1307 EOF
1308
1309                                 cat >> confdefs.h <<\EOF
1310 #define _LARGEFILE64_SOURCE 1
1311 EOF
1312
1313                                 cat >> confdefs.h <<\EOF
1314 #define _ALIGNMENT_REQUIRED 1
1315 EOF
1316
1317                                 cat >> confdefs.h <<\EOF
1318 #define _MAX_ALIGNMENT 4
1319 EOF
1320
1321                                 ;;
1322       esac
1323       DYNEXP="-Wl,-E"
1324       ;;
1325
1326 #
1327 # CRAY Unicos has broken const handling
1328        *unicos*)
1329           echo "$ac_t""disabling const" 1>&6
1330           CPPFLAGS="$CPPFLAGS -Dconst="
1331           ;;
1332         
1333 #
1334 # AIX4.x doesn't even admit to having large
1335 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1336 #
1337     *aix4*)
1338           echo "$ac_t""enabling large file support" 1>&6
1339       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1340       cat >> confdefs.h <<\EOF
1341 #define _LARGE_FILES 1
1342 EOF
1343
1344       ;;    
1345 #
1346 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1347 # to the existance of large files..
1348 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1349 # recommendations on large file support, however it makes the
1350 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1351 # recommendation makes the compile fail on gcc2.7. JRA.
1352 #
1353         *solaris*)
1354                 case `uname -r` in
1355                         5.0*|5.1*|5.2*|5.3*|5.5*)
1356                                 echo "$ac_t""no large file support" 1>&6
1357                                 ;;
1358                         5.*)
1359                         echo "$ac_t""enabling large file support" 1>&6
1360                         if test "$ac_cv_prog_gcc" = yes; then
1361                                 ${CC-cc} -v >conftest.c 2>&1
1362                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1363                                 rm -fr conftest.c
1364                                 case "$ac_cv_gcc_compiler_version_number" in
1365                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1366                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1367                                                 cat >> confdefs.h <<\EOF
1368 #define _LARGEFILE64_SOURCE 1
1369 EOF
1370
1371                                                 ;;
1372                                         *)
1373                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1374                                                 cat >> confdefs.h <<\EOF
1375 #define _LARGEFILE64_SOURCE 1
1376 EOF
1377
1378                                                 cat >> confdefs.h <<\EOF
1379 #define _FILE_OFFSET_BITS 64
1380 EOF
1381
1382                                                 ;;
1383                                 esac
1384                         else
1385                                 DYNEXP="-dc -dp"
1386                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1387                                 cat >> confdefs.h <<\EOF
1388 #define _LARGEFILE64_SOURCE 1
1389 EOF
1390
1391                                 cat >> confdefs.h <<\EOF
1392 #define _FILE_OFFSET_BITS 64
1393 EOF
1394
1395                         fi
1396                         ;;
1397                 esac
1398                 ;;
1399 #
1400 # Tests needed for SINIX large file support.
1401 #
1402     *sysv4*)
1403       if test $host = mips-sni-sysv4 ; then
1404         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1405 echo "configure:1406: checking for LFS support" >&5
1406         old_CPPFLAGS="$CPPFLAGS"
1407         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1408         if test "$cross_compiling" = yes; then
1409   SINIX_LFS_SUPPORT=cross
1410 else
1411   cat > conftest.$ac_ext <<EOF
1412 #line 1413 "configure"
1413 #include "confdefs.h"
1414
1415 #include <unistd.h>
1416 main () {
1417 #if _LFS64_LARGEFILE == 1
1418 exit(0);
1419 #else
1420 exit(1);
1421 #endif
1422 }
1423 EOF
1424 if { (eval echo configure:1425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1425 then
1426   SINIX_LFS_SUPPORT=yes
1427 else
1428   echo "configure: failed program was:" >&5
1429   cat conftest.$ac_ext >&5
1430   rm -fr conftest*
1431   SINIX_LFS_SUPPORT=no
1432 fi
1433 rm -fr conftest*
1434 fi
1435
1436         CPPFLAGS="$old_CPPFLAGS"
1437         if test x$SINIX_LFS_SUPPORT = xyes ; then
1438           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1439           cat >> confdefs.h <<\EOF
1440 #define _LARGEFILE64_SOURCE 1
1441 EOF
1442
1443           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1444           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1445           LIBS="`getconf LFS64_LIBS` $LIBS"
1446         fi
1447       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1448       fi
1449     ;;
1450
1451 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1452 #
1453     *linux*)
1454         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1455 echo "configure:1456: checking for LFS support" >&5
1456         old_CPPFLAGS="$CPPFLAGS"
1457         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1458        if test "$cross_compiling" = yes; then
1459   LINUX_LFS_SUPPORT=cross
1460 else
1461   cat > conftest.$ac_ext <<EOF
1462 #line 1463 "configure"
1463 #include "confdefs.h"
1464
1465 #include <unistd.h>
1466 #include <sys/utsname.h>
1467 main() {
1468 #if _LFS64_LARGEFILE == 1
1469        struct utsname uts;
1470        char *release;
1471        int major, minor;
1472
1473        /* Ensure this is glibc 2.2 or higher */
1474 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1475        int libc_major = __GLIBC__;
1476        int libc_minor = __GLIBC_MINOR__;
1477
1478        if (libc_major < 2)
1479               exit(1);
1480        if (libc_minor < 2)
1481               exit(1);
1482 #endif
1483
1484        /* Ensure this is kernel 2.4 or higher */
1485
1486        uname(&uts);
1487        release = uts.release;
1488        major = atoi(strsep(&release, "."));
1489        minor = atoi(strsep(&release, "."));
1490
1491        if (major > 2 || (major == 2 && minor > 3))
1492                exit(0);
1493        exit(1);
1494 #else
1495        exit(1);
1496 #endif
1497 }
1498
1499 EOF
1500 if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1501 then
1502   LINUX_LFS_SUPPORT=yes
1503 else
1504   echo "configure: failed program was:" >&5
1505   cat conftest.$ac_ext >&5
1506   rm -fr conftest*
1507   LINUX_LFS_SUPPORT=no
1508 fi
1509 rm -fr conftest*
1510 fi
1511
1512         CPPFLAGS="$old_CPPFLAGS"
1513         if test x$LINUX_LFS_SUPPORT = xyes ; then
1514           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1515           cat >> confdefs.h <<\EOF
1516 #define _LARGEFILE64_SOURCE 1
1517 EOF
1518
1519           cat >> confdefs.h <<\EOF
1520 #define _FILE_OFFSET_BITS 64
1521 EOF
1522
1523           cat >> confdefs.h <<\EOF
1524 #define _GNU_SOURCE 1
1525 EOF
1526
1527         fi
1528        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1529                 ;;
1530
1531     *hurd*)
1532         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1533 echo "configure:1534: checking for LFS support" >&5
1534         old_CPPFLAGS="$CPPFLAGS"
1535         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1536         if test "$cross_compiling" = yes; then
1537   GLIBC_LFS_SUPPORT=cross
1538 else
1539   cat > conftest.$ac_ext <<EOF
1540 #line 1541 "configure"
1541 #include "confdefs.h"
1542
1543 #include <unistd.h>
1544 main () {
1545 #if _LFS64_LARGEFILE == 1
1546 exit(0);
1547 #else
1548 exit(1);
1549 #endif
1550 }
1551 EOF
1552 if { (eval echo configure:1553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1553 then
1554   GLIBC_LFS_SUPPORT=yes
1555 else
1556   echo "configure: failed program was:" >&5
1557   cat conftest.$ac_ext >&5
1558   rm -fr conftest*
1559   GLIBC_LFS_SUPPORT=no
1560 fi
1561 rm -fr conftest*
1562 fi
1563
1564         CPPFLAGS="$old_CPPFLAGS"
1565         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1566           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1567           cat >> confdefs.h <<\EOF
1568 #define _LARGEFILE64_SOURCE 1
1569 EOF
1570
1571           cat >> confdefs.h <<\EOF
1572 #define _GNU_SOURCE 1
1573 EOF
1574
1575         fi
1576       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1577     ;;
1578
1579 esac
1580
1581 echo $ac_n "checking for inline""... $ac_c" 1>&6
1582 echo "configure:1583: checking for inline" >&5
1583 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1584   echo $ac_n "(cached) $ac_c" 1>&6
1585 else
1586   ac_cv_c_inline=no
1587 for ac_kw in inline __inline__ __inline; do
1588   cat > conftest.$ac_ext <<EOF
1589 #line 1590 "configure"
1590 #include "confdefs.h"
1591
1592 int main() {
1593 } $ac_kw foo() {
1594 ; return 0; }
1595 EOF
1596 if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1597   rm -rf conftest*
1598   ac_cv_c_inline=$ac_kw; break
1599 else
1600   echo "configure: failed program was:" >&5
1601   cat conftest.$ac_ext >&5
1602 fi
1603 rm -f conftest*
1604 done
1605
1606 fi
1607
1608 echo "$ac_t""$ac_cv_c_inline" 1>&6
1609 case "$ac_cv_c_inline" in
1610   inline | yes) ;;
1611   no) cat >> confdefs.h <<\EOF
1612 #define inline 
1613 EOF
1614  ;;
1615   *)  cat >> confdefs.h <<EOF
1616 #define inline $ac_cv_c_inline
1617 EOF
1618  ;;
1619 esac
1620
1621 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1622 echo "configure:1623: checking how to run the C preprocessor" >&5
1623 # On Suns, sometimes $CPP names a directory.
1624 if test -n "$CPP" && test -d "$CPP"; then
1625   CPP=
1626 fi
1627 if test -z "$CPP"; then
1628 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1629   echo $ac_n "(cached) $ac_c" 1>&6
1630 else
1631     # This must be in double quotes, not single quotes, because CPP may get
1632   # substituted into the Makefile and "${CC-cc}" will confuse make.
1633   CPP="${CC-cc} -E"
1634   # On the NeXT, cc -E runs the code through the compiler's parser,
1635   # not just through cpp.
1636   cat > conftest.$ac_ext <<EOF
1637 #line 1638 "configure"
1638 #include "confdefs.h"
1639 #include <assert.h>
1640 Syntax Error
1641 EOF
1642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1643 { (eval echo configure:1644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1645 if test -z "$ac_err"; then
1646   :
1647 else
1648   echo "$ac_err" >&5
1649   echo "configure: failed program was:" >&5
1650   cat conftest.$ac_ext >&5
1651   rm -rf conftest*
1652   CPP="${CC-cc} -E -traditional-cpp"
1653   cat > conftest.$ac_ext <<EOF
1654 #line 1655 "configure"
1655 #include "confdefs.h"
1656 #include <assert.h>
1657 Syntax Error
1658 EOF
1659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1660 { (eval echo configure:1661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1662 if test -z "$ac_err"; then
1663   :
1664 else
1665   echo "$ac_err" >&5
1666   echo "configure: failed program was:" >&5
1667   cat conftest.$ac_ext >&5
1668   rm -rf conftest*
1669   CPP="${CC-cc} -nologo -E"
1670   cat > conftest.$ac_ext <<EOF
1671 #line 1672 "configure"
1672 #include "confdefs.h"
1673 #include <assert.h>
1674 Syntax Error
1675 EOF
1676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1677 { (eval echo configure:1678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1679 if test -z "$ac_err"; then
1680   :
1681 else
1682   echo "$ac_err" >&5
1683   echo "configure: failed program was:" >&5
1684   cat conftest.$ac_ext >&5
1685   rm -rf conftest*
1686   CPP=/lib/cpp
1687 fi
1688 rm -f conftest*
1689 fi
1690 rm -f conftest*
1691 fi
1692 rm -f conftest*
1693   ac_cv_prog_CPP="$CPP"
1694 fi
1695   CPP="$ac_cv_prog_CPP"
1696 else
1697   ac_cv_prog_CPP="$CPP"
1698 fi
1699 echo "$ac_t""$CPP" 1>&6
1700
1701 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1702 echo "configure:1703: checking for ANSI C header files" >&5
1703 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1704   echo $ac_n "(cached) $ac_c" 1>&6
1705 else
1706   cat > conftest.$ac_ext <<EOF
1707 #line 1708 "configure"
1708 #include "confdefs.h"
1709 #include <stdlib.h>
1710 #include <stdarg.h>
1711 #include <string.h>
1712 #include <float.h>
1713 EOF
1714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1715 { (eval echo configure:1716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1717 if test -z "$ac_err"; then
1718   rm -rf conftest*
1719   ac_cv_header_stdc=yes
1720 else
1721   echo "$ac_err" >&5
1722   echo "configure: failed program was:" >&5
1723   cat conftest.$ac_ext >&5
1724   rm -rf conftest*
1725   ac_cv_header_stdc=no
1726 fi
1727 rm -f conftest*
1728
1729 if test $ac_cv_header_stdc = yes; then
1730   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1731 cat > conftest.$ac_ext <<EOF
1732 #line 1733 "configure"
1733 #include "confdefs.h"
1734 #include <string.h>
1735 EOF
1736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1737   egrep "memchr" >/dev/null 2>&1; then
1738   :
1739 else
1740   rm -rf conftest*
1741   ac_cv_header_stdc=no
1742 fi
1743 rm -f conftest*
1744
1745 fi
1746
1747 if test $ac_cv_header_stdc = yes; then
1748   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1749 cat > conftest.$ac_ext <<EOF
1750 #line 1751 "configure"
1751 #include "confdefs.h"
1752 #include <stdlib.h>
1753 EOF
1754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1755   egrep "free" >/dev/null 2>&1; then
1756   :
1757 else
1758   rm -rf conftest*
1759   ac_cv_header_stdc=no
1760 fi
1761 rm -f conftest*
1762
1763 fi
1764
1765 if test $ac_cv_header_stdc = yes; then
1766   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1767 if test "$cross_compiling" = yes; then
1768   :
1769 else
1770   cat > conftest.$ac_ext <<EOF
1771 #line 1772 "configure"
1772 #include "confdefs.h"
1773 #include <ctype.h>
1774 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1775 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1776 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1777 int main () { int i; for (i = 0; i < 256; i++)
1778 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1779 exit (0); }
1780
1781 EOF
1782 if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1783 then
1784   :
1785 else
1786   echo "configure: failed program was:" >&5
1787   cat conftest.$ac_ext >&5
1788   rm -fr conftest*
1789   ac_cv_header_stdc=no
1790 fi
1791 rm -fr conftest*
1792 fi
1793
1794 fi
1795 fi
1796
1797 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1798 if test $ac_cv_header_stdc = yes; then
1799   cat >> confdefs.h <<\EOF
1800 #define STDC_HEADERS 1
1801 EOF
1802
1803 fi
1804
1805 ac_header_dirent=no
1806 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1807 do
1808 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1809 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1810 echo "configure:1811: checking for $ac_hdr that defines DIR" >&5
1811 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1812   echo $ac_n "(cached) $ac_c" 1>&6
1813 else
1814   cat > conftest.$ac_ext <<EOF
1815 #line 1816 "configure"
1816 #include "confdefs.h"
1817 #include <sys/types.h>
1818 #include <$ac_hdr>
1819 int main() {
1820 DIR *dirp = 0;
1821 ; return 0; }
1822 EOF
1823 if { (eval echo configure:1824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1824   rm -rf conftest*
1825   eval "ac_cv_header_dirent_$ac_safe=yes"
1826 else
1827   echo "configure: failed program was:" >&5
1828   cat conftest.$ac_ext >&5
1829   rm -rf conftest*
1830   eval "ac_cv_header_dirent_$ac_safe=no"
1831 fi
1832 rm -f conftest*
1833 fi
1834 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1835   echo "$ac_t""yes" 1>&6
1836     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1837   cat >> confdefs.h <<EOF
1838 #define $ac_tr_hdr 1
1839 EOF
1840  ac_header_dirent=$ac_hdr; break
1841 else
1842   echo "$ac_t""no" 1>&6
1843 fi
1844 done
1845 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1846 if test $ac_header_dirent = dirent.h; then
1847 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1848 echo "configure:1849: checking for opendir in -ldir" >&5
1849 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1850 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1851   echo $ac_n "(cached) $ac_c" 1>&6
1852 else
1853   ac_save_LIBS="$LIBS"
1854 LIBS="-ldir  $LIBS"
1855 cat > conftest.$ac_ext <<EOF
1856 #line 1857 "configure"
1857 #include "confdefs.h"
1858 /* Override any gcc2 internal prototype to avoid an error.  */
1859 /* We use char because int might match the return type of a gcc2
1860     builtin and then its argument prototype would still apply.  */
1861 char opendir();
1862
1863 int main() {
1864 opendir()
1865 ; return 0; }
1866 EOF
1867 if { (eval echo configure:1868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1868   rm -rf conftest*
1869   eval "ac_cv_lib_$ac_lib_var=yes"
1870 else
1871   echo "configure: failed program was:" >&5
1872   cat conftest.$ac_ext >&5
1873   rm -rf conftest*
1874   eval "ac_cv_lib_$ac_lib_var=no"
1875 fi
1876 rm -f conftest*
1877 LIBS="$ac_save_LIBS"
1878
1879 fi
1880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1881   echo "$ac_t""yes" 1>&6
1882   LIBS="$LIBS -ldir"
1883 else
1884   echo "$ac_t""no" 1>&6
1885 fi
1886
1887 else
1888 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1889 echo "configure:1890: checking for opendir in -lx" >&5
1890 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1891 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1892   echo $ac_n "(cached) $ac_c" 1>&6
1893 else
1894   ac_save_LIBS="$LIBS"
1895 LIBS="-lx  $LIBS"
1896 cat > conftest.$ac_ext <<EOF
1897 #line 1898 "configure"
1898 #include "confdefs.h"
1899 /* Override any gcc2 internal prototype to avoid an error.  */
1900 /* We use char because int might match the return type of a gcc2
1901     builtin and then its argument prototype would still apply.  */
1902 char opendir();
1903
1904 int main() {
1905 opendir()
1906 ; return 0; }
1907 EOF
1908 if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1909   rm -rf conftest*
1910   eval "ac_cv_lib_$ac_lib_var=yes"
1911 else
1912   echo "configure: failed program was:" >&5
1913   cat conftest.$ac_ext >&5
1914   rm -rf conftest*
1915   eval "ac_cv_lib_$ac_lib_var=no"
1916 fi
1917 rm -f conftest*
1918 LIBS="$ac_save_LIBS"
1919
1920 fi
1921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1922   echo "$ac_t""yes" 1>&6
1923   LIBS="$LIBS -lx"
1924 else
1925   echo "$ac_t""no" 1>&6
1926 fi
1927
1928 fi
1929
1930 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1931 echo "configure:1932: checking whether time.h and sys/time.h may both be included" >&5
1932 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1933   echo $ac_n "(cached) $ac_c" 1>&6
1934 else
1935   cat > conftest.$ac_ext <<EOF
1936 #line 1937 "configure"
1937 #include "confdefs.h"
1938 #include <sys/types.h>
1939 #include <sys/time.h>
1940 #include <time.h>
1941 int main() {
1942 struct tm *tp;
1943 ; return 0; }
1944 EOF
1945 if { (eval echo configure:1946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1946   rm -rf conftest*
1947   ac_cv_header_time=yes
1948 else
1949   echo "configure: failed program was:" >&5
1950   cat conftest.$ac_ext >&5
1951   rm -rf conftest*
1952   ac_cv_header_time=no
1953 fi
1954 rm -f conftest*
1955 fi
1956
1957 echo "$ac_t""$ac_cv_header_time" 1>&6
1958 if test $ac_cv_header_time = yes; then
1959   cat >> confdefs.h <<\EOF
1960 #define TIME_WITH_SYS_TIME 1
1961 EOF
1962
1963 fi
1964
1965 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1966 echo "configure:1967: checking for sys/wait.h that is POSIX.1 compatible" >&5
1967 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1968   echo $ac_n "(cached) $ac_c" 1>&6
1969 else
1970   cat > conftest.$ac_ext <<EOF
1971 #line 1972 "configure"
1972 #include "confdefs.h"
1973 #include <sys/types.h>
1974 #include <sys/wait.h>
1975 #ifndef WEXITSTATUS
1976 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1977 #endif
1978 #ifndef WIFEXITED
1979 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1980 #endif
1981 int main() {
1982 int s;
1983 wait (&s);
1984 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1985 ; return 0; }
1986 EOF
1987 if { (eval echo configure:1988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1988   rm -rf conftest*
1989   ac_cv_header_sys_wait_h=yes
1990 else
1991   echo "configure: failed program was:" >&5
1992   cat conftest.$ac_ext >&5
1993   rm -rf conftest*
1994   ac_cv_header_sys_wait_h=no
1995 fi
1996 rm -f conftest*
1997 fi
1998
1999 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2000 if test $ac_cv_header_sys_wait_h = yes; then
2001   cat >> confdefs.h <<\EOF
2002 #define HAVE_SYS_WAIT_H 1
2003 EOF
2004
2005 fi
2006
2007 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2008 do
2009 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2010 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2011 echo "configure:2012: checking for $ac_hdr" >&5
2012 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2013   echo $ac_n "(cached) $ac_c" 1>&6
2014 else
2015   cat > conftest.$ac_ext <<EOF
2016 #line 2017 "configure"
2017 #include "confdefs.h"
2018 #include <$ac_hdr>
2019 EOF
2020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2021 { (eval echo configure:2022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2023 if test -z "$ac_err"; then
2024   rm -rf conftest*
2025   eval "ac_cv_header_$ac_safe=yes"
2026 else
2027   echo "$ac_err" >&5
2028   echo "configure: failed program was:" >&5
2029   cat conftest.$ac_ext >&5
2030   rm -rf conftest*
2031   eval "ac_cv_header_$ac_safe=no"
2032 fi
2033 rm -f conftest*
2034 fi
2035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2036   echo "$ac_t""yes" 1>&6
2037     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2038   cat >> confdefs.h <<EOF
2039 #define $ac_tr_hdr 1
2040 EOF
2041  
2042 else
2043   echo "$ac_t""no" 1>&6
2044 fi
2045 done
2046
2047 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2048 do
2049 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2050 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2051 echo "configure:2052: checking for $ac_hdr" >&5
2052 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2053   echo $ac_n "(cached) $ac_c" 1>&6
2054 else
2055   cat > conftest.$ac_ext <<EOF
2056 #line 2057 "configure"
2057 #include "confdefs.h"
2058 #include <$ac_hdr>
2059 EOF
2060 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2061 { (eval echo configure:2062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2062 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2063 if test -z "$ac_err"; then
2064   rm -rf conftest*
2065   eval "ac_cv_header_$ac_safe=yes"
2066 else
2067   echo "$ac_err" >&5
2068   echo "configure: failed program was:" >&5
2069   cat conftest.$ac_ext >&5
2070   rm -rf conftest*
2071   eval "ac_cv_header_$ac_safe=no"
2072 fi
2073 rm -f conftest*
2074 fi
2075 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2076   echo "$ac_t""yes" 1>&6
2077     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2078   cat >> confdefs.h <<EOF
2079 #define $ac_tr_hdr 1
2080 EOF
2081  
2082 else
2083   echo "$ac_t""no" 1>&6
2084 fi
2085 done
2086
2087 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2088 do
2089 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2090 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2091 echo "configure:2092: checking for $ac_hdr" >&5
2092 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2093   echo $ac_n "(cached) $ac_c" 1>&6
2094 else
2095   cat > conftest.$ac_ext <<EOF
2096 #line 2097 "configure"
2097 #include "confdefs.h"
2098 #include <$ac_hdr>
2099 EOF
2100 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2101 { (eval echo configure:2102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2102 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2103 if test -z "$ac_err"; then
2104   rm -rf conftest*
2105   eval "ac_cv_header_$ac_safe=yes"
2106 else
2107   echo "$ac_err" >&5
2108   echo "configure: failed program was:" >&5
2109   cat conftest.$ac_ext >&5
2110   rm -rf conftest*
2111   eval "ac_cv_header_$ac_safe=no"
2112 fi
2113 rm -f conftest*
2114 fi
2115 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2116   echo "$ac_t""yes" 1>&6
2117     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2118   cat >> confdefs.h <<EOF
2119 #define $ac_tr_hdr 1
2120 EOF
2121  
2122 else
2123   echo "$ac_t""no" 1>&6
2124 fi
2125 done
2126
2127 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2128 do
2129 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2130 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2131 echo "configure:2132: checking for $ac_hdr" >&5
2132 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2133   echo $ac_n "(cached) $ac_c" 1>&6
2134 else
2135   cat > conftest.$ac_ext <<EOF
2136 #line 2137 "configure"
2137 #include "confdefs.h"
2138 #include <$ac_hdr>
2139 EOF
2140 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2141 { (eval echo configure:2142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2142 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2143 if test -z "$ac_err"; then
2144   rm -rf conftest*
2145   eval "ac_cv_header_$ac_safe=yes"
2146 else
2147   echo "$ac_err" >&5
2148   echo "configure: failed program was:" >&5
2149   cat conftest.$ac_ext >&5
2150   rm -rf conftest*
2151   eval "ac_cv_header_$ac_safe=no"
2152 fi
2153 rm -f conftest*
2154 fi
2155 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2156   echo "$ac_t""yes" 1>&6
2157     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2158   cat >> confdefs.h <<EOF
2159 #define $ac_tr_hdr 1
2160 EOF
2161  
2162 else
2163   echo "$ac_t""no" 1>&6
2164 fi
2165 done
2166
2167 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
2168 do
2169 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2170 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2171 echo "configure:2172: checking for $ac_hdr" >&5
2172 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2173   echo $ac_n "(cached) $ac_c" 1>&6
2174 else
2175   cat > conftest.$ac_ext <<EOF
2176 #line 2177 "configure"
2177 #include "confdefs.h"
2178 #include <$ac_hdr>
2179 EOF
2180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2181 { (eval echo configure:2182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2183 if test -z "$ac_err"; then
2184   rm -rf conftest*
2185   eval "ac_cv_header_$ac_safe=yes"
2186 else
2187   echo "$ac_err" >&5
2188   echo "configure: failed program was:" >&5
2189   cat conftest.$ac_ext >&5
2190   rm -rf conftest*
2191   eval "ac_cv_header_$ac_safe=no"
2192 fi
2193 rm -f conftest*
2194 fi
2195 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2196   echo "$ac_t""yes" 1>&6
2197     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2198   cat >> confdefs.h <<EOF
2199 #define $ac_tr_hdr 1
2200 EOF
2201  
2202 else
2203   echo "$ac_t""no" 1>&6
2204 fi
2205 done
2206
2207 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2208 do
2209 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2210 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2211 echo "configure:2212: checking for $ac_hdr" >&5
2212 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2213   echo $ac_n "(cached) $ac_c" 1>&6
2214 else
2215   cat > conftest.$ac_ext <<EOF
2216 #line 2217 "configure"
2217 #include "confdefs.h"
2218 #include <$ac_hdr>
2219 EOF
2220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2221 { (eval echo configure:2222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2223 if test -z "$ac_err"; then
2224   rm -rf conftest*
2225   eval "ac_cv_header_$ac_safe=yes"
2226 else
2227   echo "$ac_err" >&5
2228   echo "configure: failed program was:" >&5
2229   cat conftest.$ac_ext >&5
2230   rm -rf conftest*
2231   eval "ac_cv_header_$ac_safe=no"
2232 fi
2233 rm -f conftest*
2234 fi
2235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2236   echo "$ac_t""yes" 1>&6
2237     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2238   cat >> confdefs.h <<EOF
2239 #define $ac_tr_hdr 1
2240 EOF
2241  
2242 else
2243   echo "$ac_t""no" 1>&6
2244 fi
2245 done
2246
2247 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2248 do
2249 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2250 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2251 echo "configure:2252: checking for $ac_hdr" >&5
2252 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2253   echo $ac_n "(cached) $ac_c" 1>&6
2254 else
2255   cat > conftest.$ac_ext <<EOF
2256 #line 2257 "configure"
2257 #include "confdefs.h"
2258 #include <$ac_hdr>
2259 EOF
2260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2261 { (eval echo configure:2262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2262 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2263 if test -z "$ac_err"; then
2264   rm -rf conftest*
2265   eval "ac_cv_header_$ac_safe=yes"
2266 else
2267   echo "$ac_err" >&5
2268   echo "configure: failed program was:" >&5
2269   cat conftest.$ac_ext >&5
2270   rm -rf conftest*
2271   eval "ac_cv_header_$ac_safe=no"
2272 fi
2273 rm -f conftest*
2274 fi
2275 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2276   echo "$ac_t""yes" 1>&6
2277     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2278   cat >> confdefs.h <<EOF
2279 #define $ac_tr_hdr 1
2280 EOF
2281  
2282 else
2283   echo "$ac_t""no" 1>&6
2284 fi
2285 done
2286
2287 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
2288 do
2289 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2290 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2291 echo "configure:2292: checking for $ac_hdr" >&5
2292 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2293   echo $ac_n "(cached) $ac_c" 1>&6
2294 else
2295   cat > conftest.$ac_ext <<EOF
2296 #line 2297 "configure"
2297 #include "confdefs.h"
2298 #include <$ac_hdr>
2299 EOF
2300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2301 { (eval echo configure:2302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2303 if test -z "$ac_err"; then
2304   rm -rf conftest*
2305   eval "ac_cv_header_$ac_safe=yes"
2306 else
2307   echo "$ac_err" >&5
2308   echo "configure: failed program was:" >&5
2309   cat conftest.$ac_ext >&5
2310   rm -rf conftest*
2311   eval "ac_cv_header_$ac_safe=no"
2312 fi
2313 rm -f conftest*
2314 fi
2315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2316   echo "$ac_t""yes" 1>&6
2317     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2318   cat >> confdefs.h <<EOF
2319 #define $ac_tr_hdr 1
2320 EOF
2321  
2322 else
2323   echo "$ac_t""no" 1>&6
2324 fi
2325 done
2326
2327
2328 #
2329 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2330 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2331 #
2332 case "$host_os" in
2333     *hpux*)
2334                 cat > conftest.$ac_ext <<EOF
2335 #line 2336 "configure"
2336 #include "confdefs.h"
2337 #include <shadow.h>
2338 int main() {
2339 struct spwd testme
2340 ; return 0; }
2341 EOF
2342 if { (eval echo configure:2343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2343   rm -rf conftest*
2344   ac_cv_header_shadow_h=yes
2345 else
2346   echo "configure: failed program was:" >&5
2347   cat conftest.$ac_ext >&5
2348   rm -rf conftest*
2349   ac_cv_header_shadow_h=no
2350 fi
2351 rm -f conftest*
2352                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2353                    cat >> confdefs.h <<\EOF
2354 #define HAVE_SHADOW_H 1
2355 EOF
2356
2357                 fi
2358         ;;
2359 esac
2360 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2361 do
2362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2364 echo "configure:2365: checking for $ac_hdr" >&5
2365 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2366   echo $ac_n "(cached) $ac_c" 1>&6
2367 else
2368   cat > conftest.$ac_ext <<EOF
2369 #line 2370 "configure"
2370 #include "confdefs.h"
2371 #include <$ac_hdr>
2372 EOF
2373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2374 { (eval echo configure:2375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2376 if test -z "$ac_err"; then
2377   rm -rf conftest*
2378   eval "ac_cv_header_$ac_safe=yes"
2379 else
2380   echo "$ac_err" >&5
2381   echo "configure: failed program was:" >&5
2382   cat conftest.$ac_ext >&5
2383   rm -rf conftest*
2384   eval "ac_cv_header_$ac_safe=no"
2385 fi
2386 rm -f conftest*
2387 fi
2388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2389   echo "$ac_t""yes" 1>&6
2390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2391   cat >> confdefs.h <<EOF
2392 #define $ac_tr_hdr 1
2393 EOF
2394  
2395 else
2396   echo "$ac_t""no" 1>&6
2397 fi
2398 done
2399
2400 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2401 do
2402 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2403 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2404 echo "configure:2405: checking for $ac_hdr" >&5
2405 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2406   echo $ac_n "(cached) $ac_c" 1>&6
2407 else
2408   cat > conftest.$ac_ext <<EOF
2409 #line 2410 "configure"
2410 #include "confdefs.h"
2411 #include <$ac_hdr>
2412 EOF
2413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2414 { (eval echo configure:2415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2415 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2416 if test -z "$ac_err"; then
2417   rm -rf conftest*
2418   eval "ac_cv_header_$ac_safe=yes"
2419 else
2420   echo "$ac_err" >&5
2421   echo "configure: failed program was:" >&5
2422   cat conftest.$ac_ext >&5
2423   rm -rf conftest*
2424   eval "ac_cv_header_$ac_safe=no"
2425 fi
2426 rm -f conftest*
2427 fi
2428 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2429   echo "$ac_t""yes" 1>&6
2430     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2431   cat >> confdefs.h <<EOF
2432 #define $ac_tr_hdr 1
2433 EOF
2434  
2435 else
2436   echo "$ac_t""no" 1>&6
2437 fi
2438 done
2439
2440 for ac_hdr in stropts.h poll.h
2441 do
2442 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2443 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2444 echo "configure:2445: checking for $ac_hdr" >&5
2445 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2446   echo $ac_n "(cached) $ac_c" 1>&6
2447 else
2448   cat > conftest.$ac_ext <<EOF
2449 #line 2450 "configure"
2450 #include "confdefs.h"
2451 #include <$ac_hdr>
2452 EOF
2453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2454 { (eval echo configure:2455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2456 if test -z "$ac_err"; then
2457   rm -rf conftest*
2458   eval "ac_cv_header_$ac_safe=yes"
2459 else
2460   echo "$ac_err" >&5
2461   echo "configure: failed program was:" >&5
2462   cat conftest.$ac_ext >&5
2463   rm -rf conftest*
2464   eval "ac_cv_header_$ac_safe=no"
2465 fi
2466 rm -f conftest*
2467 fi
2468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2469   echo "$ac_t""yes" 1>&6
2470     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2471   cat >> confdefs.h <<EOF
2472 #define $ac_tr_hdr 1
2473 EOF
2474  
2475 else
2476   echo "$ac_t""no" 1>&6
2477 fi
2478 done
2479
2480 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2481 do
2482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2484 echo "configure:2485: checking for $ac_hdr" >&5
2485 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2486   echo $ac_n "(cached) $ac_c" 1>&6
2487 else
2488   cat > conftest.$ac_ext <<EOF
2489 #line 2490 "configure"
2490 #include "confdefs.h"
2491 #include <$ac_hdr>
2492 EOF
2493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2494 { (eval echo configure:2495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2496 if test -z "$ac_err"; then
2497   rm -rf conftest*
2498   eval "ac_cv_header_$ac_safe=yes"
2499 else
2500   echo "$ac_err" >&5
2501   echo "configure: failed program was:" >&5
2502   cat conftest.$ac_ext >&5
2503   rm -rf conftest*
2504   eval "ac_cv_header_$ac_safe=no"
2505 fi
2506 rm -f conftest*
2507 fi
2508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2509   echo "$ac_t""yes" 1>&6
2510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2511   cat >> confdefs.h <<EOF
2512 #define $ac_tr_hdr 1
2513 EOF
2514  
2515 else
2516   echo "$ac_t""no" 1>&6
2517 fi
2518 done
2519
2520 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2521 do
2522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2524 echo "configure:2525: checking for $ac_hdr" >&5
2525 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2526   echo $ac_n "(cached) $ac_c" 1>&6
2527 else
2528   cat > conftest.$ac_ext <<EOF
2529 #line 2530 "configure"
2530 #include "confdefs.h"
2531 #include <$ac_hdr>
2532 EOF
2533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2534 { (eval echo configure:2535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2536 if test -z "$ac_err"; then
2537   rm -rf conftest*
2538   eval "ac_cv_header_$ac_safe=yes"
2539 else
2540   echo "$ac_err" >&5
2541   echo "configure: failed program was:" >&5
2542   cat conftest.$ac_ext >&5
2543   rm -rf conftest*
2544   eval "ac_cv_header_$ac_safe=no"
2545 fi
2546 rm -f conftest*
2547 fi
2548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2549   echo "$ac_t""yes" 1>&6
2550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2551   cat >> confdefs.h <<EOF
2552 #define $ac_tr_hdr 1
2553 EOF
2554  
2555 else
2556   echo "$ac_t""no" 1>&6
2557 fi
2558 done
2559
2560
2561 # For experimental utmp support (lastlog on some BSD-like systems)
2562 for ac_hdr in utmp.h utmpx.h lastlog.h
2563 do
2564 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2565 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2566 echo "configure:2567: checking for $ac_hdr" >&5
2567 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2568   echo $ac_n "(cached) $ac_c" 1>&6
2569 else
2570   cat > conftest.$ac_ext <<EOF
2571 #line 2572 "configure"
2572 #include "confdefs.h"
2573 #include <$ac_hdr>
2574 EOF
2575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2576 { (eval echo configure:2577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2578 if test -z "$ac_err"; then
2579   rm -rf conftest*
2580   eval "ac_cv_header_$ac_safe=yes"
2581 else
2582   echo "$ac_err" >&5
2583   echo "configure: failed program was:" >&5
2584   cat conftest.$ac_ext >&5
2585   rm -rf conftest*
2586   eval "ac_cv_header_$ac_safe=no"
2587 fi
2588 rm -f conftest*
2589 fi
2590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2591   echo "$ac_t""yes" 1>&6
2592     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2593   cat >> confdefs.h <<EOF
2594 #define $ac_tr_hdr 1
2595 EOF
2596  
2597 else
2598   echo "$ac_t""no" 1>&6
2599 fi
2600 done
2601
2602  
2603 # For quotas on Veritas VxFS filesystems
2604 for ac_hdr in sys/fs/vx_quota.h
2605 do
2606 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2607 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2608 echo "configure:2609: checking for $ac_hdr" >&5
2609 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2610   echo $ac_n "(cached) $ac_c" 1>&6
2611 else
2612   cat > conftest.$ac_ext <<EOF
2613 #line 2614 "configure"
2614 #include "confdefs.h"
2615 #include <$ac_hdr>
2616 EOF
2617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2618 { (eval echo configure:2619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2619 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2620 if test -z "$ac_err"; then
2621   rm -rf conftest*
2622   eval "ac_cv_header_$ac_safe=yes"
2623 else
2624   echo "$ac_err" >&5
2625   echo "configure: failed program was:" >&5
2626   cat conftest.$ac_ext >&5
2627   rm -rf conftest*
2628   eval "ac_cv_header_$ac_safe=no"
2629 fi
2630 rm -f conftest*
2631 fi
2632 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2633   echo "$ac_t""yes" 1>&6
2634     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2635   cat >> confdefs.h <<EOF
2636 #define $ac_tr_hdr 1
2637 EOF
2638  
2639 else
2640   echo "$ac_t""no" 1>&6
2641 fi
2642 done
2643
2644
2645 # For quotas on Linux XFS filesystems
2646 for ac_hdr in linux/xqm.h
2647 do
2648 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2649 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2650 echo "configure:2651: checking for $ac_hdr" >&5
2651 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2652   echo $ac_n "(cached) $ac_c" 1>&6
2653 else
2654   cat > conftest.$ac_ext <<EOF
2655 #line 2656 "configure"
2656 #include "confdefs.h"
2657 #include <$ac_hdr>
2658 EOF
2659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2660 { (eval echo configure:2661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2662 if test -z "$ac_err"; then
2663   rm -rf conftest*
2664   eval "ac_cv_header_$ac_safe=yes"
2665 else
2666   echo "$ac_err" >&5
2667   echo "configure: failed program was:" >&5
2668   cat conftest.$ac_ext >&5
2669   rm -rf conftest*
2670   eval "ac_cv_header_$ac_safe=no"
2671 fi
2672 rm -f conftest*
2673 fi
2674 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2675   echo "$ac_t""yes" 1>&6
2676     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2677   cat >> confdefs.h <<EOF
2678 #define $ac_tr_hdr 1
2679 EOF
2680  
2681 else
2682   echo "$ac_t""no" 1>&6
2683 fi
2684 done
2685
2686
2687 echo $ac_n "checking size of int""... $ac_c" 1>&6
2688 echo "configure:2689: checking size of int" >&5
2689 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2690   echo $ac_n "(cached) $ac_c" 1>&6
2691 else
2692   if test "$cross_compiling" = yes; then
2693   ac_cv_sizeof_int=cross
2694 else
2695   cat > conftest.$ac_ext <<EOF
2696 #line 2697 "configure"
2697 #include "confdefs.h"
2698 #include <stdio.h>
2699 #include <sys/types.h>
2700 main()
2701 {
2702   FILE *f=fopen("conftestval", "w");
2703   if (!f) exit(1);
2704   fprintf(f, "%d\n", sizeof(int));
2705   exit(0);
2706 }
2707 EOF
2708 if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2709 then
2710   ac_cv_sizeof_int=`cat conftestval`
2711 else
2712   echo "configure: failed program was:" >&5
2713   cat conftest.$ac_ext >&5
2714   rm -fr conftest*
2715   ac_cv_sizeof_int=0
2716 fi
2717 rm -fr conftest*
2718 fi
2719
2720 fi
2721 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2722 cat >> confdefs.h <<EOF
2723 #define SIZEOF_INT $ac_cv_sizeof_int
2724 EOF
2725
2726
2727 echo $ac_n "checking size of long""... $ac_c" 1>&6
2728 echo "configure:2729: checking size of long" >&5
2729 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2730   echo $ac_n "(cached) $ac_c" 1>&6
2731 else
2732   if test "$cross_compiling" = yes; then
2733   ac_cv_sizeof_long=cross
2734 else
2735   cat > conftest.$ac_ext <<EOF
2736 #line 2737 "configure"
2737 #include "confdefs.h"
2738 #include <stdio.h>
2739 #include <sys/types.h>
2740 main()
2741 {
2742   FILE *f=fopen("conftestval", "w");
2743   if (!f) exit(1);
2744   fprintf(f, "%d\n", sizeof(long));
2745   exit(0);
2746 }
2747 EOF
2748 if { (eval echo configure:2749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2749 then
2750   ac_cv_sizeof_long=`cat conftestval`
2751 else
2752   echo "configure: failed program was:" >&5
2753   cat conftest.$ac_ext >&5
2754   rm -fr conftest*
2755   ac_cv_sizeof_long=0
2756 fi
2757 rm -fr conftest*
2758 fi
2759
2760 fi
2761 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2762 cat >> confdefs.h <<EOF
2763 #define SIZEOF_LONG $ac_cv_sizeof_long
2764 EOF
2765
2766
2767 echo $ac_n "checking size of short""... $ac_c" 1>&6
2768 echo "configure:2769: checking size of short" >&5
2769 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2770   echo $ac_n "(cached) $ac_c" 1>&6
2771 else
2772   if test "$cross_compiling" = yes; then
2773   ac_cv_sizeof_short=cross
2774 else
2775   cat > conftest.$ac_ext <<EOF
2776 #line 2777 "configure"
2777 #include "confdefs.h"
2778 #include <stdio.h>
2779 #include <sys/types.h>
2780 main()
2781 {
2782   FILE *f=fopen("conftestval", "w");
2783   if (!f) exit(1);
2784   fprintf(f, "%d\n", sizeof(short));
2785   exit(0);
2786 }
2787 EOF
2788 if { (eval echo configure:2789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2789 then
2790   ac_cv_sizeof_short=`cat conftestval`
2791 else
2792   echo "configure: failed program was:" >&5
2793   cat conftest.$ac_ext >&5
2794   rm -fr conftest*
2795   ac_cv_sizeof_short=0
2796 fi
2797 rm -fr conftest*
2798 fi
2799
2800 fi
2801 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2802 cat >> confdefs.h <<EOF
2803 #define SIZEOF_SHORT $ac_cv_sizeof_short
2804 EOF
2805
2806
2807
2808 echo $ac_n "checking for working const""... $ac_c" 1>&6
2809 echo "configure:2810: checking for working const" >&5
2810 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2811   echo $ac_n "(cached) $ac_c" 1>&6
2812 else
2813   cat > conftest.$ac_ext <<EOF
2814 #line 2815 "configure"
2815 #include "confdefs.h"
2816
2817 int main() {
2818
2819 /* Ultrix mips cc rejects this.  */
2820 typedef int charset[2]; const charset x;
2821 /* SunOS 4.1.1 cc rejects this.  */
2822 char const *const *ccp;
2823 char **p;
2824 /* NEC SVR4.0.2 mips cc rejects this.  */
2825 struct point {int x, y;};
2826 static struct point const zero = {0,0};
2827 /* AIX XL C 1.02.0.0 rejects this.
2828    It does not let you subtract one const X* pointer from another in an arm
2829    of an if-expression whose if-part is not a constant expression */
2830 const char *g = "string";
2831 ccp = &g + (g ? g-g : 0);
2832 /* HPUX 7.0 cc rejects these. */
2833 ++ccp;
2834 p = (char**) ccp;
2835 ccp = (char const *const *) p;
2836 { /* SCO 3.2v4 cc rejects this.  */
2837   char *t;
2838   char const *s = 0 ? (char *) 0 : (char const *) 0;
2839
2840   *t++ = 0;
2841 }
2842 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2843   int x[] = {25, 17};
2844   const int *foo = &x[0];
2845   ++foo;
2846 }
2847 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2848   typedef const int *iptr;
2849   iptr p = 0;
2850   ++p;
2851 }
2852 { /* AIX XL C 1.02.0.0 rejects this saying
2853      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2854   struct s { int j; const int *ap[3]; };
2855   struct s *b; b->j = 5;
2856 }
2857 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2858   const int foo = 10;
2859 }
2860
2861 ; return 0; }
2862 EOF
2863 if { (eval echo configure:2864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2864   rm -rf conftest*
2865   ac_cv_c_const=yes
2866 else
2867   echo "configure: failed program was:" >&5
2868   cat conftest.$ac_ext >&5
2869   rm -rf conftest*
2870   ac_cv_c_const=no
2871 fi
2872 rm -f conftest*
2873 fi
2874
2875 echo "$ac_t""$ac_cv_c_const" 1>&6
2876 if test $ac_cv_c_const = no; then
2877   cat >> confdefs.h <<\EOF
2878 #define const 
2879 EOF
2880
2881 fi
2882
2883 echo $ac_n "checking for inline""... $ac_c" 1>&6
2884 echo "configure:2885: checking for inline" >&5
2885 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2886   echo $ac_n "(cached) $ac_c" 1>&6
2887 else
2888   ac_cv_c_inline=no
2889 for ac_kw in inline __inline__ __inline; do
2890   cat > conftest.$ac_ext <<EOF
2891 #line 2892 "configure"
2892 #include "confdefs.h"
2893
2894 int main() {
2895 } $ac_kw foo() {
2896 ; return 0; }
2897 EOF
2898 if { (eval echo configure:2899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2899   rm -rf conftest*
2900   ac_cv_c_inline=$ac_kw; break
2901 else
2902   echo "configure: failed program was:" >&5
2903   cat conftest.$ac_ext >&5
2904 fi
2905 rm -f conftest*
2906 done
2907
2908 fi
2909
2910 echo "$ac_t""$ac_cv_c_inline" 1>&6
2911 case "$ac_cv_c_inline" in
2912   inline | yes) ;;
2913   no) cat >> confdefs.h <<\EOF
2914 #define inline 
2915 EOF
2916  ;;
2917   *)  cat >> confdefs.h <<EOF
2918 #define inline $ac_cv_c_inline
2919 EOF
2920  ;;
2921 esac
2922
2923 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2924 echo "configure:2925: checking whether byte ordering is bigendian" >&5
2925 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2926   echo $ac_n "(cached) $ac_c" 1>&6
2927 else
2928   ac_cv_c_bigendian=unknown
2929 # See if sys/param.h defines the BYTE_ORDER macro.
2930 cat > conftest.$ac_ext <<EOF
2931 #line 2932 "configure"
2932 #include "confdefs.h"
2933 #include <sys/types.h>
2934 #include <sys/param.h>
2935 int main() {
2936
2937 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2938  bogus endian macros
2939 #endif
2940 ; return 0; }
2941 EOF
2942 if { (eval echo configure:2943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2943   rm -rf conftest*
2944   # It does; now see whether it defined to BIG_ENDIAN or not.
2945 cat > conftest.$ac_ext <<EOF
2946 #line 2947 "configure"
2947 #include "confdefs.h"
2948 #include <sys/types.h>
2949 #include <sys/param.h>
2950 int main() {
2951
2952 #if BYTE_ORDER != BIG_ENDIAN
2953  not big endian
2954 #endif
2955 ; return 0; }
2956 EOF
2957 if { (eval echo configure:2958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2958   rm -rf conftest*
2959   ac_cv_c_bigendian=yes
2960 else
2961   echo "configure: failed program was:" >&5
2962   cat conftest.$ac_ext >&5
2963   rm -rf conftest*
2964   ac_cv_c_bigendian=no
2965 fi
2966 rm -f conftest*
2967 else
2968   echo "configure: failed program was:" >&5
2969   cat conftest.$ac_ext >&5
2970 fi
2971 rm -f conftest*
2972 if test $ac_cv_c_bigendian = unknown; then
2973 if test "$cross_compiling" = yes; then
2974     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2975 else
2976   cat > conftest.$ac_ext <<EOF
2977 #line 2978 "configure"
2978 #include "confdefs.h"
2979 main () {
2980   /* Are we little or big endian?  From Harbison&Steele.  */
2981   union
2982   {
2983     long l;
2984     char c[sizeof (long)];
2985   } u;
2986   u.l = 1;
2987   exit (u.c[sizeof (long) - 1] == 1);
2988 }
2989 EOF
2990 if { (eval echo configure:2991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2991 then
2992   ac_cv_c_bigendian=no
2993 else
2994   echo "configure: failed program was:" >&5
2995   cat conftest.$ac_ext >&5
2996   rm -fr conftest*
2997   ac_cv_c_bigendian=yes
2998 fi
2999 rm -fr conftest*
3000 fi
3001
3002 fi
3003 fi
3004
3005 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3006 if test $ac_cv_c_bigendian = yes; then
3007   cat >> confdefs.h <<\EOF
3008 #define WORDS_BIGENDIAN 1
3009 EOF
3010
3011 fi
3012
3013 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3014 echo "configure:3015: checking whether char is unsigned" >&5
3015 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3016   echo $ac_n "(cached) $ac_c" 1>&6
3017 else
3018   if test "$GCC" = yes; then
3019   # GCC predefines this symbol on systems where it applies.
3020 cat > conftest.$ac_ext <<EOF
3021 #line 3022 "configure"
3022 #include "confdefs.h"
3023 #ifdef __CHAR_UNSIGNED__
3024   yes
3025 #endif
3026
3027 EOF
3028 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3029   egrep "yes" >/dev/null 2>&1; then
3030   rm -rf conftest*
3031   ac_cv_c_char_unsigned=yes
3032 else
3033   rm -rf conftest*
3034   ac_cv_c_char_unsigned=no
3035 fi
3036 rm -f conftest*
3037
3038 else
3039 if test "$cross_compiling" = yes; then
3040     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3041 else
3042   cat > conftest.$ac_ext <<EOF
3043 #line 3044 "configure"
3044 #include "confdefs.h"
3045 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3046 #if !defined(__STDC__) || __STDC__ != 1
3047 #define volatile
3048 #endif
3049 main() {
3050   volatile char c = 255; exit(c < 0);
3051 }
3052 EOF
3053 if { (eval echo configure:3054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3054 then
3055   ac_cv_c_char_unsigned=yes
3056 else
3057   echo "configure: failed program was:" >&5
3058   cat conftest.$ac_ext >&5
3059   rm -fr conftest*
3060   ac_cv_c_char_unsigned=no
3061 fi
3062 rm -fr conftest*
3063 fi
3064
3065 fi
3066 fi
3067
3068 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3069 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3070   cat >> confdefs.h <<\EOF
3071 #define __CHAR_UNSIGNED__ 1
3072 EOF
3073
3074 fi
3075
3076
3077 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3078 echo "configure:3079: checking return type of signal handlers" >&5
3079 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3080   echo $ac_n "(cached) $ac_c" 1>&6
3081 else
3082   cat > conftest.$ac_ext <<EOF
3083 #line 3084 "configure"
3084 #include "confdefs.h"
3085 #include <sys/types.h>
3086 #include <signal.h>
3087 #ifdef signal
3088 #undef signal
3089 #endif
3090 #ifdef __cplusplus
3091 extern "C" void (*signal (int, void (*)(int)))(int);
3092 #else
3093 void (*signal ()) ();
3094 #endif
3095
3096 int main() {
3097 int i;
3098 ; return 0; }
3099 EOF
3100 if { (eval echo configure:3101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3101   rm -rf conftest*
3102   ac_cv_type_signal=void
3103 else
3104   echo "configure: failed program was:" >&5
3105   cat conftest.$ac_ext >&5
3106   rm -rf conftest*
3107   ac_cv_type_signal=int
3108 fi
3109 rm -f conftest*
3110 fi
3111
3112 echo "$ac_t""$ac_cv_type_signal" 1>&6
3113 cat >> confdefs.h <<EOF
3114 #define RETSIGTYPE $ac_cv_type_signal
3115 EOF
3116
3117
3118 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3119 echo "configure:3120: checking for uid_t in sys/types.h" >&5
3120 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3121   echo $ac_n "(cached) $ac_c" 1>&6
3122 else
3123   cat > conftest.$ac_ext <<EOF
3124 #line 3125 "configure"
3125 #include "confdefs.h"
3126 #include <sys/types.h>
3127 EOF
3128 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3129   egrep "uid_t" >/dev/null 2>&1; then
3130   rm -rf conftest*
3131   ac_cv_type_uid_t=yes
3132 else
3133   rm -rf conftest*
3134   ac_cv_type_uid_t=no
3135 fi
3136 rm -f conftest*
3137
3138 fi
3139
3140 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3141 if test $ac_cv_type_uid_t = no; then
3142   cat >> confdefs.h <<\EOF
3143 #define uid_t int
3144 EOF
3145
3146   cat >> confdefs.h <<\EOF
3147 #define gid_t int
3148 EOF
3149
3150 fi
3151
3152 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3153 echo "configure:3154: checking for mode_t" >&5
3154 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3155   echo $ac_n "(cached) $ac_c" 1>&6
3156 else
3157   cat > conftest.$ac_ext <<EOF
3158 #line 3159 "configure"
3159 #include "confdefs.h"
3160 #include <sys/types.h>
3161 #if STDC_HEADERS
3162 #include <stdlib.h>
3163 #include <stddef.h>
3164 #endif
3165 EOF
3166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3167   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3168   rm -rf conftest*
3169   ac_cv_type_mode_t=yes
3170 else
3171   rm -rf conftest*
3172   ac_cv_type_mode_t=no
3173 fi
3174 rm -f conftest*
3175
3176 fi
3177 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3178 if test $ac_cv_type_mode_t = no; then
3179   cat >> confdefs.h <<\EOF
3180 #define mode_t int
3181 EOF
3182
3183 fi
3184
3185 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3186 echo "configure:3187: checking for off_t" >&5
3187 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3188   echo $ac_n "(cached) $ac_c" 1>&6
3189 else
3190   cat > conftest.$ac_ext <<EOF
3191 #line 3192 "configure"
3192 #include "confdefs.h"
3193 #include <sys/types.h>
3194 #if STDC_HEADERS
3195 #include <stdlib.h>
3196 #include <stddef.h>
3197 #endif
3198 EOF
3199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3200   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3201   rm -rf conftest*
3202   ac_cv_type_off_t=yes
3203 else
3204   rm -rf conftest*
3205   ac_cv_type_off_t=no
3206 fi
3207 rm -f conftest*
3208
3209 fi
3210 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3211 if test $ac_cv_type_off_t = no; then
3212   cat >> confdefs.h <<\EOF
3213 #define off_t long
3214 EOF
3215
3216 fi
3217
3218 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3219 echo "configure:3220: checking for size_t" >&5
3220 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3221   echo $ac_n "(cached) $ac_c" 1>&6
3222 else
3223   cat > conftest.$ac_ext <<EOF
3224 #line 3225 "configure"
3225 #include "confdefs.h"
3226 #include <sys/types.h>
3227 #if STDC_HEADERS
3228 #include <stdlib.h>
3229 #include <stddef.h>
3230 #endif
3231 EOF
3232 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3233   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3234   rm -rf conftest*
3235   ac_cv_type_size_t=yes
3236 else
3237   rm -rf conftest*
3238   ac_cv_type_size_t=no
3239 fi
3240 rm -f conftest*
3241
3242 fi
3243 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3244 if test $ac_cv_type_size_t = no; then
3245   cat >> confdefs.h <<\EOF
3246 #define size_t unsigned
3247 EOF
3248
3249 fi
3250
3251 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3252 echo "configure:3253: checking for pid_t" >&5
3253 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3254   echo $ac_n "(cached) $ac_c" 1>&6
3255 else
3256   cat > conftest.$ac_ext <<EOF
3257 #line 3258 "configure"
3258 #include "confdefs.h"
3259 #include <sys/types.h>
3260 #if STDC_HEADERS
3261 #include <stdlib.h>
3262 #include <stddef.h>
3263 #endif
3264 EOF
3265 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3266   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3267   rm -rf conftest*
3268   ac_cv_type_pid_t=yes
3269 else
3270   rm -rf conftest*
3271   ac_cv_type_pid_t=no
3272 fi
3273 rm -f conftest*
3274
3275 fi
3276 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3277 if test $ac_cv_type_pid_t = no; then
3278   cat >> confdefs.h <<\EOF
3279 #define pid_t int
3280 EOF
3281
3282 fi
3283
3284 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3285 echo "configure:3286: checking for st_rdev in struct stat" >&5
3286 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3287   echo $ac_n "(cached) $ac_c" 1>&6
3288 else
3289   cat > conftest.$ac_ext <<EOF
3290 #line 3291 "configure"
3291 #include "confdefs.h"
3292 #include <sys/types.h>
3293 #include <sys/stat.h>
3294 int main() {
3295 struct stat s; s.st_rdev;
3296 ; return 0; }
3297 EOF
3298 if { (eval echo configure:3299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3299   rm -rf conftest*
3300   ac_cv_struct_st_rdev=yes
3301 else
3302   echo "configure: failed program was:" >&5
3303   cat conftest.$ac_ext >&5
3304   rm -rf conftest*
3305   ac_cv_struct_st_rdev=no
3306 fi
3307 rm -f conftest*
3308 fi
3309
3310 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3311 if test $ac_cv_struct_st_rdev = yes; then
3312   cat >> confdefs.h <<\EOF
3313 #define HAVE_ST_RDEV 1
3314 EOF
3315
3316 fi
3317
3318 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3319 echo "configure:3320: checking for d_off in dirent" >&5
3320 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3321   echo $ac_n "(cached) $ac_c" 1>&6
3322 else
3323   cat > conftest.$ac_ext <<EOF
3324 #line 3325 "configure"
3325 #include "confdefs.h"
3326
3327 #include <unistd.h>
3328 #include <sys/types.h>
3329 #include <dirent.h>
3330 int main() {
3331 struct dirent d; d.d_off;
3332 ; return 0; }
3333 EOF
3334 if { (eval echo configure:3335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3335   rm -rf conftest*
3336   ac_cv_dirent_d_off=yes
3337 else
3338   echo "configure: failed program was:" >&5
3339   cat conftest.$ac_ext >&5
3340   rm -rf conftest*
3341   ac_cv_dirent_d_off=no
3342 fi
3343 rm -f conftest*
3344 fi
3345
3346 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3347 if test $ac_cv_dirent_d_off = yes; then
3348   cat >> confdefs.h <<\EOF
3349 #define HAVE_DIRENT_D_OFF 1
3350 EOF
3351
3352 fi
3353
3354 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3355 echo "configure:3356: checking for ino_t" >&5
3356 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3357   echo $ac_n "(cached) $ac_c" 1>&6
3358 else
3359   cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3362 #include <sys/types.h>
3363 #if STDC_HEADERS
3364 #include <stdlib.h>
3365 #include <stddef.h>
3366 #endif
3367 EOF
3368 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3369   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3370   rm -rf conftest*
3371   ac_cv_type_ino_t=yes
3372 else
3373   rm -rf conftest*
3374   ac_cv_type_ino_t=no
3375 fi
3376 rm -f conftest*
3377
3378 fi
3379 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3380 if test $ac_cv_type_ino_t = no; then
3381   cat >> confdefs.h <<\EOF
3382 #define ino_t unsigned
3383 EOF
3384
3385 fi
3386
3387 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3388 echo "configure:3389: checking for loff_t" >&5
3389 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3390   echo $ac_n "(cached) $ac_c" 1>&6
3391 else
3392   cat > conftest.$ac_ext <<EOF
3393 #line 3394 "configure"
3394 #include "confdefs.h"
3395 #include <sys/types.h>
3396 #if STDC_HEADERS
3397 #include <stdlib.h>
3398 #include <stddef.h>
3399 #endif
3400 EOF
3401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3402   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3403   rm -rf conftest*
3404   ac_cv_type_loff_t=yes
3405 else
3406   rm -rf conftest*
3407   ac_cv_type_loff_t=no
3408 fi
3409 rm -f conftest*
3410
3411 fi
3412 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3413 if test $ac_cv_type_loff_t = no; then
3414   cat >> confdefs.h <<\EOF
3415 #define loff_t off_t
3416 EOF
3417
3418 fi
3419
3420 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3421 echo "configure:3422: checking for offset_t" >&5
3422 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3423   echo $ac_n "(cached) $ac_c" 1>&6
3424 else
3425   cat > conftest.$ac_ext <<EOF
3426 #line 3427 "configure"
3427 #include "confdefs.h"
3428 #include <sys/types.h>
3429 #if STDC_HEADERS
3430 #include <stdlib.h>
3431 #include <stddef.h>
3432 #endif
3433 EOF
3434 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3435   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3436   rm -rf conftest*
3437   ac_cv_type_offset_t=yes
3438 else
3439   rm -rf conftest*
3440   ac_cv_type_offset_t=no
3441 fi
3442 rm -f conftest*
3443
3444 fi
3445 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3446 if test $ac_cv_type_offset_t = no; then
3447   cat >> confdefs.h <<\EOF
3448 #define offset_t loff_t
3449 EOF
3450
3451 fi
3452
3453 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3454 echo "configure:3455: checking for ssize_t" >&5
3455 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3456   echo $ac_n "(cached) $ac_c" 1>&6
3457 else
3458   cat > conftest.$ac_ext <<EOF
3459 #line 3460 "configure"
3460 #include "confdefs.h"
3461 #include <sys/types.h>
3462 #if STDC_HEADERS
3463 #include <stdlib.h>
3464 #include <stddef.h>
3465 #endif
3466 EOF
3467 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3468   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3469   rm -rf conftest*
3470   ac_cv_type_ssize_t=yes
3471 else
3472   rm -rf conftest*
3473   ac_cv_type_ssize_t=no
3474 fi
3475 rm -f conftest*
3476
3477 fi
3478 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3479 if test $ac_cv_type_ssize_t = no; then
3480   cat >> confdefs.h <<\EOF
3481 #define ssize_t int
3482 EOF
3483
3484 fi
3485
3486 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3487 echo "configure:3488: checking for wchar_t" >&5
3488 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3489   echo $ac_n "(cached) $ac_c" 1>&6
3490 else
3491   cat > conftest.$ac_ext <<EOF
3492 #line 3493 "configure"
3493 #include "confdefs.h"
3494 #include <sys/types.h>
3495 #if STDC_HEADERS
3496 #include <stdlib.h>
3497 #include <stddef.h>
3498 #endif
3499 EOF
3500 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3501   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3502   rm -rf conftest*
3503   ac_cv_type_wchar_t=yes
3504 else
3505   rm -rf conftest*
3506   ac_cv_type_wchar_t=no
3507 fi
3508 rm -f conftest*
3509
3510 fi
3511 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3512 if test $ac_cv_type_wchar_t = no; then
3513   cat >> confdefs.h <<\EOF
3514 #define wchar_t unsigned short
3515 EOF
3516
3517 fi
3518
3519
3520 ############################################
3521 # for cups support we need libcups, and a handful of header files
3522
3523 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3524 echo "configure:3525: checking for httpConnect in -lcups" >&5
3525 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3526 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   ac_save_LIBS="$LIBS"
3530 LIBS="-lcups  $LIBS"
3531 cat > conftest.$ac_ext <<EOF
3532 #line 3533 "configure"
3533 #include "confdefs.h"
3534 /* Override any gcc2 internal prototype to avoid an error.  */
3535 /* We use char because int might match the return type of a gcc2
3536     builtin and then its argument prototype would still apply.  */
3537 char httpConnect();
3538
3539 int main() {
3540 httpConnect()
3541 ; return 0; }
3542 EOF
3543 if { (eval echo configure:3544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3544   rm -rf conftest*
3545   eval "ac_cv_lib_$ac_lib_var=yes"
3546 else
3547   echo "configure: failed program was:" >&5
3548   cat conftest.$ac_ext >&5
3549   rm -rf conftest*
3550   eval "ac_cv_lib_$ac_lib_var=no"
3551 fi
3552 rm -f conftest*
3553 LIBS="$ac_save_LIBS"
3554
3555 fi
3556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3557   echo "$ac_t""yes" 1>&6
3558     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3559     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3560   cat >> confdefs.h <<EOF
3561 #define $ac_tr_lib 1
3562 EOF
3563
3564   LIBS="-lcups $LIBS"
3565
3566 else
3567   echo "$ac_t""no" 1>&6
3568 fi
3569
3570
3571 # I wonder if there is a nicer way of doing this?
3572
3573 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3574         for ac_hdr in cups/cups.h cups/language.h
3575 do
3576 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3577 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3578 echo "configure:3579: checking for $ac_hdr" >&5
3579 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3580   echo $ac_n "(cached) $ac_c" 1>&6
3581 else
3582   cat > conftest.$ac_ext <<EOF
3583 #line 3584 "configure"
3584 #include "confdefs.h"
3585 #include <$ac_hdr>
3586 EOF
3587 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3588 { (eval echo configure:3589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3589 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3590 if test -z "$ac_err"; then
3591   rm -rf conftest*
3592   eval "ac_cv_header_$ac_safe=yes"
3593 else
3594   echo "$ac_err" >&5
3595   echo "configure: failed program was:" >&5
3596   cat conftest.$ac_ext >&5
3597   rm -rf conftest*
3598   eval "ac_cv_header_$ac_safe=no"
3599 fi
3600 rm -f conftest*
3601 fi
3602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3603   echo "$ac_t""yes" 1>&6
3604     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3605   cat >> confdefs.h <<EOF
3606 #define $ac_tr_hdr 1
3607 EOF
3608  
3609 else
3610   echo "$ac_t""no" 1>&6
3611 fi
3612 done
3613
3614         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3615                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3616                         cat >> confdefs.h <<\EOF
3617 #define HAVE_CUPS 1
3618 EOF
3619
3620                 fi
3621         fi
3622 fi
3623
3624 ############################################
3625 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3626 for ac_func in dlopen
3627 do
3628 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3629 echo "configure:3630: checking for $ac_func" >&5
3630 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3631   echo $ac_n "(cached) $ac_c" 1>&6
3632 else
3633   cat > conftest.$ac_ext <<EOF
3634 #line 3635 "configure"
3635 #include "confdefs.h"
3636 /* System header to define __stub macros and hopefully few prototypes,
3637     which can conflict with char $ac_func(); below.  */
3638 #include <assert.h>
3639 /* Override any gcc2 internal prototype to avoid an error.  */
3640 /* We use char because int might match the return type of a gcc2
3641     builtin and then its argument prototype would still apply.  */
3642 char $ac_func();
3643
3644 int main() {
3645
3646 /* The GNU C library defines this for functions which it implements
3647     to always fail with ENOSYS.  Some functions are actually named
3648     something starting with __ and the normal name is an alias.  */
3649 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3650 choke me
3651 #else
3652 $ac_func();
3653 #endif
3654
3655 ; return 0; }
3656 EOF
3657 if { (eval echo configure:3658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3658   rm -rf conftest*
3659   eval "ac_cv_func_$ac_func=yes"
3660 else
3661   echo "configure: failed program was:" >&5
3662   cat conftest.$ac_ext >&5
3663   rm -rf conftest*
3664   eval "ac_cv_func_$ac_func=no"
3665 fi
3666 rm -f conftest*
3667 fi
3668
3669 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3670   echo "$ac_t""yes" 1>&6
3671     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3672   cat >> confdefs.h <<EOF
3673 #define $ac_tr_func 1
3674 EOF
3675  
3676 else
3677   echo "$ac_t""no" 1>&6
3678 fi
3679 done
3680
3681 if test x"$ac_cv_func_dlopen" = x"no"; then
3682     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3683 echo "configure:3684: checking for dlopen in -ldl" >&5
3684 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3685 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3686   echo $ac_n "(cached) $ac_c" 1>&6
3687 else
3688   ac_save_LIBS="$LIBS"
3689 LIBS="-ldl  $LIBS"
3690 cat > conftest.$ac_ext <<EOF
3691 #line 3692 "configure"
3692 #include "confdefs.h"
3693 /* Override any gcc2 internal prototype to avoid an error.  */
3694 /* We use char because int might match the return type of a gcc2
3695     builtin and then its argument prototype would still apply.  */
3696 char dlopen();
3697
3698 int main() {
3699 dlopen()
3700 ; return 0; }
3701 EOF
3702 if { (eval echo configure:3703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3703   rm -rf conftest*
3704   eval "ac_cv_lib_$ac_lib_var=yes"
3705 else
3706   echo "configure: failed program was:" >&5
3707   cat conftest.$ac_ext >&5
3708   rm -rf conftest*
3709   eval "ac_cv_lib_$ac_lib_var=no"
3710 fi
3711 rm -f conftest*
3712 LIBS="$ac_save_LIBS"
3713
3714 fi
3715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3716   echo "$ac_t""yes" 1>&6
3717   LIBS="$LIBS -ldl";
3718         cat >> confdefs.h <<\EOF
3719 #define HAVE_DLOPEN 1
3720 EOF
3721
3722 else
3723   echo "$ac_t""no" 1>&6
3724 fi
3725
3726 fi
3727 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3728
3729 ############################################
3730 # check if the compiler can do immediate structures
3731 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3732 echo "configure:3733: checking for immediate structures" >&5
3733 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3734   echo $ac_n "(cached) $ac_c" 1>&6
3735 else
3736   
3737     cat > conftest.$ac_ext <<EOF
3738 #line 3739 "configure"
3739 #include "confdefs.h"
3740
3741 #include <stdio.h>
3742 int main() {
3743
3744    typedef struct {unsigned x;} FOOBAR;
3745    #define X_FOOBAR(x) ((FOOBAR) { x })
3746    #define FOO_ONE X_FOOBAR(1)
3747    FOOBAR f = FOO_ONE;   
3748    static struct {
3749         FOOBAR y; 
3750         } f2[] = {
3751                 {FOO_ONE}
3752         };   
3753
3754 ; return 0; }
3755 EOF
3756 if { (eval echo configure:3757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3757   rm -rf conftest*
3758   samba_cv_immediate_structures=yes
3759 else
3760   echo "configure: failed program was:" >&5
3761   cat conftest.$ac_ext >&5
3762   rm -rf conftest*
3763   samba_cv_immediate_structures=no
3764 fi
3765 rm -f conftest*
3766 fi
3767
3768 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3769 if test x"$samba_cv_immediate_structures" = x"yes"; then
3770    cat >> confdefs.h <<\EOF
3771 #define HAVE_IMMEDIATE_STRUCTURES 1
3772 EOF
3773
3774 fi
3775
3776 ############################################
3777 # check for unix domain sockets
3778 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3779 echo "configure:3780: checking for unix domain sockets" >&5
3780 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3781   echo $ac_n "(cached) $ac_c" 1>&6
3782 else
3783   
3784     cat > conftest.$ac_ext <<EOF
3785 #line 3786 "configure"
3786 #include "confdefs.h"
3787
3788 #include <sys/types.h>
3789 #include <stdlib.h>
3790 #include <stddef.h>
3791 #include <sys/socket.h>
3792 #include <sys/un.h>
3793 int main() {
3794
3795   struct sockaddr_un sunaddr; 
3796   sunaddr.sun_family = AF_UNIX;
3797
3798 ; return 0; }
3799 EOF
3800 if { (eval echo configure:3801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3801   rm -rf conftest*
3802   samba_cv_unixsocket=yes
3803 else
3804   echo "configure: failed program was:" >&5
3805   cat conftest.$ac_ext >&5
3806   rm -rf conftest*
3807   samba_cv_unixsocket=no
3808 fi
3809 rm -f conftest*
3810 fi
3811
3812 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3813 if test x"$samba_cv_unixsocket" = x"yes"; then
3814    cat >> confdefs.h <<\EOF
3815 #define HAVE_UNIXSOCKET 1
3816 EOF
3817
3818 fi
3819
3820
3821 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3822 echo "configure:3823: checking for socklen_t type" >&5
3823 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3824   echo $ac_n "(cached) $ac_c" 1>&6
3825 else
3826   
3827     cat > conftest.$ac_ext <<EOF
3828 #line 3829 "configure"
3829 #include "confdefs.h"
3830
3831 #include <sys/types.h>
3832 #if STDC_HEADERS
3833 #include <stdlib.h>
3834 #include <stddef.h>
3835 #endif
3836 #include <sys/socket.h>
3837 int main() {
3838 socklen_t i = 0
3839 ; return 0; }
3840 EOF
3841 if { (eval echo configure:3842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3842   rm -rf conftest*
3843   samba_cv_socklen_t=yes
3844 else
3845   echo "configure: failed program was:" >&5
3846   cat conftest.$ac_ext >&5
3847   rm -rf conftest*
3848   samba_cv_socklen_t=no
3849 fi
3850 rm -f conftest*
3851 fi
3852
3853 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3854 if test x"$samba_cv_socklen_t" = x"yes"; then
3855    cat >> confdefs.h <<\EOF
3856 #define HAVE_SOCKLEN_T_TYPE 1
3857 EOF
3858
3859 fi
3860
3861 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3862 echo "configure:3863: checking for sig_atomic_t type" >&5
3863 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3864   echo $ac_n "(cached) $ac_c" 1>&6
3865 else
3866   
3867     cat > conftest.$ac_ext <<EOF
3868 #line 3869 "configure"
3869 #include "confdefs.h"
3870
3871 #include <sys/types.h>
3872 #if STDC_HEADERS
3873 #include <stdlib.h>
3874 #include <stddef.h>
3875 #endif
3876 #include <signal.h>
3877 int main() {
3878 sig_atomic_t i = 0
3879 ; return 0; }
3880 EOF
3881 if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3882   rm -rf conftest*
3883   samba_cv_sig_atomic_t=yes
3884 else
3885   echo "configure: failed program was:" >&5
3886   cat conftest.$ac_ext >&5
3887   rm -rf conftest*
3888   samba_cv_sig_atomic_t=no
3889 fi
3890 rm -f conftest*
3891 fi
3892
3893 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3894 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3895    cat >> confdefs.h <<\EOF
3896 #define HAVE_SIG_ATOMIC_T_TYPE 1
3897 EOF
3898
3899 fi
3900
3901 # stupid headers have the functions but no declaration. grrrr.
3902
3903  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3904 echo "configure:3905: checking for errno declaration" >&5
3905 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3906   echo $ac_n "(cached) $ac_c" 1>&6
3907 else
3908   
3909     cat > conftest.$ac_ext <<EOF
3910 #line 3911 "configure"
3911 #include "confdefs.h"
3912 #include <errno.h>
3913 int main() {
3914 int i = (int)errno
3915 ; return 0; }
3916 EOF
3917 if { (eval echo configure:3918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3918   rm -rf conftest*
3919   ac_cv_have_errno_decl=yes
3920 else
3921   echo "configure: failed program was:" >&5
3922   cat conftest.$ac_ext >&5
3923   rm -rf conftest*
3924   ac_cv_have_errno_decl=no
3925 fi
3926 rm -f conftest*
3927 fi
3928
3929 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3930  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3931     cat >> confdefs.h <<\EOF
3932 #define HAVE_ERRNO_DECL 1
3933 EOF
3934
3935  fi
3936
3937
3938  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3939 echo "configure:3940: checking for setresuid declaration" >&5
3940 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3941   echo $ac_n "(cached) $ac_c" 1>&6
3942 else
3943   
3944     cat > conftest.$ac_ext <<EOF
3945 #line 3946 "configure"
3946 #include "confdefs.h"
3947 #include <unistd.h>
3948 int main() {
3949 int i = (int)setresuid
3950 ; return 0; }
3951 EOF
3952 if { (eval echo configure:3953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3953   rm -rf conftest*
3954   ac_cv_have_setresuid_decl=yes
3955 else
3956   echo "configure: failed program was:" >&5
3957   cat conftest.$ac_ext >&5
3958   rm -rf conftest*
3959   ac_cv_have_setresuid_decl=no
3960 fi
3961 rm -f conftest*
3962 fi
3963
3964 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3965  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3966     cat >> confdefs.h <<\EOF
3967 #define HAVE_SETRESUID_DECL 1
3968 EOF
3969
3970  fi
3971
3972
3973  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3974 echo "configure:3975: checking for setresgid declaration" >&5
3975 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3976   echo $ac_n "(cached) $ac_c" 1>&6
3977 else
3978   
3979     cat > conftest.$ac_ext <<EOF
3980 #line 3981 "configure"
3981 #include "confdefs.h"
3982 #include <unistd.h>
3983 int main() {
3984 int i = (int)setresgid
3985 ; return 0; }
3986 EOF
3987 if { (eval echo configure:3988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3988   rm -rf conftest*
3989   ac_cv_have_setresgid_decl=yes
3990 else
3991   echo "configure: failed program was:" >&5
3992   cat conftest.$ac_ext >&5
3993   rm -rf conftest*
3994   ac_cv_have_setresgid_decl=no
3995 fi
3996 rm -f conftest*
3997 fi
3998
3999 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4000  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4001     cat >> confdefs.h <<\EOF
4002 #define HAVE_SETRESGID_DECL 1
4003 EOF
4004
4005  fi
4006
4007
4008  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4009 echo "configure:4010: checking for asprintf declaration" >&5
4010 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4011   echo $ac_n "(cached) $ac_c" 1>&6
4012 else
4013   
4014     cat > conftest.$ac_ext <<EOF
4015 #line 4016 "configure"
4016 #include "confdefs.h"
4017 #include <stdio.h>
4018 int main() {
4019 int i = (int)asprintf
4020 ; return 0; }
4021 EOF
4022 if { (eval echo configure:4023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4023   rm -rf conftest*
4024   ac_cv_have_asprintf_decl=yes
4025 else
4026   echo "configure: failed program was:" >&5
4027   cat conftest.$ac_ext >&5
4028   rm -rf conftest*
4029   ac_cv_have_asprintf_decl=no
4030 fi
4031 rm -f conftest*
4032 fi
4033
4034 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4035  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4036     cat >> confdefs.h <<\EOF
4037 #define HAVE_ASPRINTF_DECL 1
4038 EOF
4039
4040  fi
4041
4042
4043  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4044 echo "configure:4045: checking for vasprintf declaration" >&5
4045 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4046   echo $ac_n "(cached) $ac_c" 1>&6
4047 else
4048   
4049     cat > conftest.$ac_ext <<EOF
4050 #line 4051 "configure"
4051 #include "confdefs.h"
4052 #include <stdio.h>
4053 int main() {
4054 int i = (int)vasprintf
4055 ; return 0; }
4056 EOF
4057 if { (eval echo configure:4058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4058   rm -rf conftest*
4059   ac_cv_have_vasprintf_decl=yes
4060 else
4061   echo "configure: failed program was:" >&5
4062   cat conftest.$ac_ext >&5
4063   rm -rf conftest*
4064   ac_cv_have_vasprintf_decl=no
4065 fi
4066 rm -f conftest*
4067 fi
4068
4069 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4070  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4071     cat >> confdefs.h <<\EOF
4072 #define HAVE_VASPRINTF_DECL 1
4073 EOF
4074
4075  fi
4076
4077
4078  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4079 echo "configure:4080: checking for vsnprintf declaration" >&5
4080 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4081   echo $ac_n "(cached) $ac_c" 1>&6
4082 else
4083   
4084     cat > conftest.$ac_ext <<EOF
4085 #line 4086 "configure"
4086 #include "confdefs.h"
4087 #include <stdio.h>
4088 int main() {
4089 int i = (int)vsnprintf
4090 ; return 0; }
4091 EOF
4092 if { (eval echo configure:4093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4093   rm -rf conftest*
4094   ac_cv_have_vsnprintf_decl=yes
4095 else
4096   echo "configure: failed program was:" >&5
4097   cat conftest.$ac_ext >&5
4098   rm -rf conftest*
4099   ac_cv_have_vsnprintf_decl=no
4100 fi
4101 rm -f conftest*
4102 fi
4103
4104 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4105  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4106     cat >> confdefs.h <<\EOF
4107 #define HAVE_VSNPRINTF_DECL 1
4108 EOF
4109
4110  fi
4111
4112
4113  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4114 echo "configure:4115: checking for snprintf declaration" >&5
4115 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4116   echo $ac_n "(cached) $ac_c" 1>&6
4117 else
4118   
4119     cat > conftest.$ac_ext <<EOF
4120 #line 4121 "configure"
4121 #include "confdefs.h"
4122 #include <stdio.h>
4123 int main() {
4124 int i = (int)snprintf
4125 ; return 0; }
4126 EOF
4127 if { (eval echo configure:4128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4128   rm -rf conftest*
4129   ac_cv_have_snprintf_decl=yes
4130 else
4131   echo "configure: failed program was:" >&5
4132   cat conftest.$ac_ext >&5
4133   rm -rf conftest*
4134   ac_cv_have_snprintf_decl=no
4135 fi
4136 rm -f conftest*
4137 fi
4138
4139 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4140  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4141     cat >> confdefs.h <<\EOF
4142 #define HAVE_SNPRINTF_DECL 1
4143 EOF
4144
4145  fi
4146
4147
4148 # and glibc has setresuid under linux but the function does
4149 # nothing until kernel 2.1.44! very dumb.
4150 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4151 echo "configure:4152: checking for real setresuid" >&5
4152 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4153   echo $ac_n "(cached) $ac_c" 1>&6
4154 else
4155   
4156     if test "$cross_compiling" = yes; then
4157   samba_cv_have_setresuid=cross
4158 else
4159   cat > conftest.$ac_ext <<EOF
4160 #line 4161 "configure"
4161 #include "confdefs.h"
4162 #include <errno.h>
4163 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4164 EOF
4165 if { (eval echo configure:4166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4166 then
4167   samba_cv_have_setresuid=yes
4168 else
4169   echo "configure: failed program was:" >&5
4170   cat conftest.$ac_ext >&5
4171   rm -fr conftest*
4172   samba_cv_have_setresuid=no
4173 fi
4174 rm -fr conftest*
4175 fi
4176
4177 fi
4178
4179 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4180 if test x"$samba_cv_have_setresuid" = x"yes"; then
4181     cat >> confdefs.h <<\EOF
4182 #define HAVE_SETRESUID 1
4183 EOF
4184
4185 fi
4186
4187 # Do the same check for setresguid...
4188 #
4189 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4190 echo "configure:4191: checking for real setresgid" >&5
4191 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4192   echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194   
4195     if test "$cross_compiling" = yes; then
4196   samba_cv_have_setresgid=cross
4197 else
4198   cat > conftest.$ac_ext <<EOF
4199 #line 4200 "configure"
4200 #include "confdefs.h"
4201 #include <unistd.h>
4202 #include <errno.h>
4203 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4204 EOF
4205 if { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4206 then
4207   samba_cv_have_setresgid=yes
4208 else
4209   echo "configure: failed program was:" >&5
4210   cat conftest.$ac_ext >&5
4211   rm -fr conftest*
4212   samba_cv_have_setresgid=no
4213 fi
4214 rm -fr conftest*
4215 fi
4216
4217 fi
4218
4219 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4220 if test x"$samba_cv_have_setresgid" = x"yes"; then
4221     cat >> confdefs.h <<\EOF
4222 #define HAVE_SETRESGID 1
4223 EOF
4224
4225 fi
4226
4227 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4228 echo "configure:4229: checking for 8-bit clean memcmp" >&5
4229 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4230   echo $ac_n "(cached) $ac_c" 1>&6
4231 else
4232   if test "$cross_compiling" = yes; then
4233   ac_cv_func_memcmp_clean=no
4234 else
4235   cat > conftest.$ac_ext <<EOF
4236 #line 4237 "configure"
4237 #include "confdefs.h"
4238
4239 main()
4240 {
4241   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4242   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4243 }
4244
4245 EOF
4246 if { (eval echo configure:4247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4247 then
4248   ac_cv_func_memcmp_clean=yes
4249 else
4250   echo "configure: failed program was:" >&5
4251   cat conftest.$ac_ext >&5
4252   rm -fr conftest*
4253   ac_cv_func_memcmp_clean=no
4254 fi
4255 rm -fr conftest*
4256 fi
4257
4258 fi
4259
4260 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4261 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4262
4263
4264 ###############################################
4265 # test for where we get crypt() from
4266 for ac_func in crypt
4267 do
4268 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4269 echo "configure:4270: checking for $ac_func" >&5
4270 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4271   echo $ac_n "(cached) $ac_c" 1>&6
4272 else
4273   cat > conftest.$ac_ext <<EOF
4274 #line 4275 "configure"
4275 #include "confdefs.h"
4276 /* System header to define __stub macros and hopefully few prototypes,
4277     which can conflict with char $ac_func(); below.  */
4278 #include <assert.h>
4279 /* Override any gcc2 internal prototype to avoid an error.  */
4280 /* We use char because int might match the return type of a gcc2
4281     builtin and then its argument prototype would still apply.  */
4282 char $ac_func();
4283
4284 int main() {
4285
4286 /* The GNU C library defines this for functions which it implements
4287     to always fail with ENOSYS.  Some functions are actually named
4288     something starting with __ and the normal name is an alias.  */
4289 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4290 choke me
4291 #else
4292 $ac_func();
4293 #endif
4294
4295 ; return 0; }
4296 EOF
4297 if { (eval echo configure:4298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4298   rm -rf conftest*
4299   eval "ac_cv_func_$ac_func=yes"
4300 else
4301   echo "configure: failed program was:" >&5
4302   cat conftest.$ac_ext >&5
4303   rm -rf conftest*
4304   eval "ac_cv_func_$ac_func=no"
4305 fi
4306 rm -f conftest*
4307 fi
4308
4309 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4310   echo "$ac_t""yes" 1>&6
4311     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4312   cat >> confdefs.h <<EOF
4313 #define $ac_tr_func 1
4314 EOF
4315  
4316 else
4317   echo "$ac_t""no" 1>&6
4318 fi
4319 done
4320
4321 if test x"$ac_cv_func_crypt" = x"no"; then
4322     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4323 echo "configure:4324: checking for crypt in -lcrypt" >&5
4324 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4325 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4326   echo $ac_n "(cached) $ac_c" 1>&6
4327 else
4328   ac_save_LIBS="$LIBS"
4329 LIBS="-lcrypt  $LIBS"
4330 cat > conftest.$ac_ext <<EOF
4331 #line 4332 "configure"
4332 #include "confdefs.h"
4333 /* Override any gcc2 internal prototype to avoid an error.  */
4334 /* We use char because int might match the return type of a gcc2
4335     builtin and then its argument prototype would still apply.  */
4336 char crypt();
4337
4338 int main() {
4339 crypt()
4340 ; return 0; }
4341 EOF
4342 if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4343   rm -rf conftest*
4344   eval "ac_cv_lib_$ac_lib_var=yes"
4345 else
4346   echo "configure: failed program was:" >&5
4347   cat conftest.$ac_ext >&5
4348   rm -rf conftest*
4349   eval "ac_cv_lib_$ac_lib_var=no"
4350 fi
4351 rm -f conftest*
4352 LIBS="$ac_save_LIBS"
4353
4354 fi
4355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4356   echo "$ac_t""yes" 1>&6
4357   LIBS="$LIBS -lcrypt";
4358         cat >> confdefs.h <<\EOF
4359 #define HAVE_CRYPT 1
4360 EOF
4361
4362 else
4363   echo "$ac_t""no" 1>&6
4364 fi
4365
4366 fi
4367
4368
4369 ###############################################
4370 # Readline included by default unless explicitly asked not to
4371 test "${with_readline+set}" != "set" && with_readline=yes
4372
4373 # test for where we get readline() from
4374 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4375 echo "configure:4376: checking whether to use readline" >&5
4376 # Check whether --with-readline or --without-readline was given.
4377 if test "${with_readline+set}" = set; then
4378   withval="$with_readline"
4379     case "$with_readline" in
4380   yes)
4381     echo "$ac_t""yes" 1>&6
4382
4383     for ac_hdr in readline.h history.h readline/readline.h
4384 do
4385 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4386 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4387 echo "configure:4388: checking for $ac_hdr" >&5
4388 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4389   echo $ac_n "(cached) $ac_c" 1>&6
4390 else
4391   cat > conftest.$ac_ext <<EOF
4392 #line 4393 "configure"
4393 #include "confdefs.h"
4394 #include <$ac_hdr>
4395 EOF
4396 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4397 { (eval echo configure:4398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4398 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4399 if test -z "$ac_err"; then
4400   rm -rf conftest*
4401   eval "ac_cv_header_$ac_safe=yes"
4402 else
4403   echo "$ac_err" >&5
4404   echo "configure: failed program was:" >&5
4405   cat conftest.$ac_ext >&5
4406   rm -rf conftest*
4407   eval "ac_cv_header_$ac_safe=no"
4408 fi
4409 rm -f conftest*
4410 fi
4411 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4412   echo "$ac_t""yes" 1>&6
4413     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4414   cat >> confdefs.h <<EOF
4415 #define $ac_tr_hdr 1
4416 EOF
4417  
4418 else
4419   echo "$ac_t""no" 1>&6
4420 fi
4421 done
4422
4423     for ac_hdr in readline/history.h
4424 do
4425 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4426 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4427 echo "configure:4428: checking for $ac_hdr" >&5
4428 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4429   echo $ac_n "(cached) $ac_c" 1>&6
4430 else
4431   cat > conftest.$ac_ext <<EOF
4432 #line 4433 "configure"
4433 #include "confdefs.h"
4434 #include <$ac_hdr>
4435 EOF
4436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4437 { (eval echo configure:4438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4439 if test -z "$ac_err"; then
4440   rm -rf conftest*
4441   eval "ac_cv_header_$ac_safe=yes"
4442 else
4443   echo "$ac_err" >&5
4444   echo "configure: failed program was:" >&5
4445   cat conftest.$ac_ext >&5
4446   rm -rf conftest*
4447   eval "ac_cv_header_$ac_safe=no"
4448 fi
4449 rm -f conftest*
4450 fi
4451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4452   echo "$ac_t""yes" 1>&6
4453     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4454   cat >> confdefs.h <<EOF
4455 #define $ac_tr_hdr 1
4456 EOF
4457  
4458 else
4459   echo "$ac_t""no" 1>&6
4460 fi
4461 done
4462
4463
4464     for ac_hdr in readline.h readline/readline.h
4465 do
4466 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4467 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4468 echo "configure:4469: checking for $ac_hdr" >&5
4469 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4470   echo $ac_n "(cached) $ac_c" 1>&6
4471 else
4472   cat > conftest.$ac_ext <<EOF
4473 #line 4474 "configure"
4474 #include "confdefs.h"
4475 #include <$ac_hdr>
4476 EOF
4477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4478 { (eval echo configure:4479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4480 if test -z "$ac_err"; then
4481   rm -rf conftest*
4482   eval "ac_cv_header_$ac_safe=yes"
4483 else
4484   echo "$ac_err" >&5
4485   echo "configure: failed program was:" >&5
4486   cat conftest.$ac_ext >&5
4487   rm -rf conftest*
4488   eval "ac_cv_header_$ac_safe=no"
4489 fi
4490 rm -f conftest*
4491 fi
4492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4493   echo "$ac_t""yes" 1>&6
4494     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4495   cat >> confdefs.h <<EOF
4496 #define $ac_tr_hdr 1
4497 EOF
4498  
4499       for termlib in ncurses curses termcap terminfo termlib; do
4500        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4501 echo "configure:4502: checking for tgetent in -l${termlib}" >&5
4502 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4503 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4504   echo $ac_n "(cached) $ac_c" 1>&6
4505 else
4506   ac_save_LIBS="$LIBS"
4507 LIBS="-l${termlib}  $LIBS"
4508 cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4511 /* Override any gcc2 internal prototype to avoid an error.  */
4512 /* We use char because int might match the return type of a gcc2
4513     builtin and then its argument prototype would still apply.  */
4514 char tgetent();
4515
4516 int main() {
4517 tgetent()
4518 ; return 0; }
4519 EOF
4520 if { (eval echo configure:4521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4521   rm -rf conftest*
4522   eval "ac_cv_lib_$ac_lib_var=yes"
4523 else
4524   echo "configure: failed program was:" >&5
4525   cat conftest.$ac_ext >&5
4526   rm -rf conftest*
4527   eval "ac_cv_lib_$ac_lib_var=no"
4528 fi
4529 rm -f conftest*
4530 LIBS="$ac_save_LIBS"
4531
4532 fi
4533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4534   echo "$ac_t""yes" 1>&6
4535   TERMLIBS="-l${termlib}"; break
4536 else
4537   echo "$ac_t""no" 1>&6
4538 fi
4539
4540       done
4541       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4542 echo "configure:4543: checking for rl_callback_handler_install in -lreadline" >&5
4543 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4544 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4545   echo $ac_n "(cached) $ac_c" 1>&6
4546 else
4547   ac_save_LIBS="$LIBS"
4548 LIBS="-lreadline $TERMLIBS $LIBS"
4549 cat > conftest.$ac_ext <<EOF
4550 #line 4551 "configure"
4551 #include "confdefs.h"
4552 /* Override any gcc2 internal prototype to avoid an error.  */
4553 /* We use char because int might match the return type of a gcc2
4554     builtin and then its argument prototype would still apply.  */
4555 char rl_callback_handler_install();
4556
4557 int main() {
4558 rl_callback_handler_install()
4559 ; return 0; }
4560 EOF
4561 if { (eval echo configure:4562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4562   rm -rf conftest*
4563   eval "ac_cv_lib_$ac_lib_var=yes"
4564 else
4565   echo "configure: failed program was:" >&5
4566   cat conftest.$ac_ext >&5
4567   rm -rf conftest*
4568   eval "ac_cv_lib_$ac_lib_var=no"
4569 fi
4570 rm -f conftest*
4571 LIBS="$ac_save_LIBS"
4572
4573 fi
4574 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4575   echo "$ac_t""yes" 1>&6
4576   TERMLIBS="-lreadline $TERMLIBS"
4577        cat >> confdefs.h <<\EOF
4578 #define HAVE_LIBREADLINE 1
4579 EOF
4580
4581        break
4582 else
4583   echo "$ac_t""no" 1>&6
4584 TERMLIBS=
4585 fi
4586
4587 else
4588   echo "$ac_t""no" 1>&6
4589 fi
4590 done
4591
4592     ;;
4593   no)
4594     echo "$ac_t""no" 1>&6
4595     ;;
4596   *)
4597     echo "$ac_t""yes" 1>&6
4598
4599     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4600     # alternate readline path
4601     _ldflags=${LDFLAGS}
4602     _cppflags=${CPPFLAGS}
4603
4604     # Add additional search path
4605     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4606     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4607
4608     for ac_hdr in readline.h history.h readline/readline.h
4609 do
4610 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4611 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4612 echo "configure:4613: checking for $ac_hdr" >&5
4613 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4614   echo $ac_n "(cached) $ac_c" 1>&6
4615 else
4616   cat > conftest.$ac_ext <<EOF
4617 #line 4618 "configure"
4618 #include "confdefs.h"
4619 #include <$ac_hdr>
4620 EOF
4621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4622 { (eval echo configure:4623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4624 if test -z "$ac_err"; then
4625   rm -rf conftest*
4626   eval "ac_cv_header_$ac_safe=yes"
4627 else
4628   echo "$ac_err" >&5
4629   echo "configure: failed program was:" >&5
4630   cat conftest.$ac_ext >&5
4631   rm -rf conftest*
4632   eval "ac_cv_header_$ac_safe=no"
4633 fi
4634 rm -f conftest*
4635 fi
4636 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4637   echo "$ac_t""yes" 1>&6
4638     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4639   cat >> confdefs.h <<EOF
4640 #define $ac_tr_hdr 1
4641 EOF
4642  
4643 else
4644   echo "$ac_t""no" 1>&6
4645 fi
4646 done
4647
4648     for ac_hdr in readline/history.h
4649 do
4650 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4651 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4652 echo "configure:4653: checking for $ac_hdr" >&5
4653 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4654   echo $ac_n "(cached) $ac_c" 1>&6
4655 else
4656   cat > conftest.$ac_ext <<EOF
4657 #line 4658 "configure"
4658 #include "confdefs.h"
4659 #include <$ac_hdr>
4660 EOF
4661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4662 { (eval echo configure:4663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4664 if test -z "$ac_err"; then
4665   rm -rf conftest*
4666   eval "ac_cv_header_$ac_safe=yes"
4667 else
4668   echo "$ac_err" >&5
4669   echo "configure: failed program was:" >&5
4670   cat conftest.$ac_ext >&5
4671   rm -rf conftest*
4672   eval "ac_cv_header_$ac_safe=no"
4673 fi
4674 rm -f conftest*
4675 fi
4676 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4677   echo "$ac_t""yes" 1>&6
4678     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4679   cat >> confdefs.h <<EOF
4680 #define $ac_tr_hdr 1
4681 EOF
4682  
4683 else
4684   echo "$ac_t""no" 1>&6
4685 fi
4686 done
4687
4688
4689     for ac_hdr in readline.h readline/readline.h
4690 do
4691 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4692 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4693 echo "configure:4694: checking for $ac_hdr" >&5
4694 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4695   echo $ac_n "(cached) $ac_c" 1>&6
4696 else
4697   cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700 #include <$ac_hdr>
4701 EOF
4702 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4703 { (eval echo configure:4704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4704 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4705 if test -z "$ac_err"; then
4706   rm -rf conftest*
4707   eval "ac_cv_header_$ac_safe=yes"
4708 else
4709   echo "$ac_err" >&5
4710   echo "configure: failed program was:" >&5
4711   cat conftest.$ac_ext >&5
4712   rm -rf conftest*
4713   eval "ac_cv_header_$ac_safe=no"
4714 fi
4715 rm -f conftest*
4716 fi
4717 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4718   echo "$ac_t""yes" 1>&6
4719     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4720   cat >> confdefs.h <<EOF
4721 #define $ac_tr_hdr 1
4722 EOF
4723  
4724       for termlib in ncurses curses termcap terminfo termlib; do
4725        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4726 echo "configure:4727: checking for tgetent in -l${termlib}" >&5
4727 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4728 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4729   echo $ac_n "(cached) $ac_c" 1>&6
4730 else
4731   ac_save_LIBS="$LIBS"
4732 LIBS="-l${termlib}  $LIBS"
4733 cat > conftest.$ac_ext <<EOF
4734 #line 4735 "configure"
4735 #include "confdefs.h"
4736 /* Override any gcc2 internal prototype to avoid an error.  */
4737 /* We use char because int might match the return type of a gcc2
4738     builtin and then its argument prototype would still apply.  */
4739 char tgetent();
4740
4741 int main() {
4742 tgetent()
4743 ; return 0; }
4744 EOF
4745 if { (eval echo configure:4746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4746   rm -rf conftest*
4747   eval "ac_cv_lib_$ac_lib_var=yes"
4748 else
4749   echo "configure: failed program was:" >&5
4750   cat conftest.$ac_ext >&5
4751   rm -rf conftest*
4752   eval "ac_cv_lib_$ac_lib_var=no"
4753 fi
4754 rm -f conftest*
4755 LIBS="$ac_save_LIBS"
4756
4757 fi
4758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4759   echo "$ac_t""yes" 1>&6
4760   TERMLIBS="-l${termlib}"; break
4761 else
4762   echo "$ac_t""no" 1>&6
4763 fi
4764
4765       done
4766       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4767 echo "configure:4768: checking for rl_callback_handler_install in -lreadline" >&5
4768 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4769 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4770   echo $ac_n "(cached) $ac_c" 1>&6
4771 else
4772   ac_save_LIBS="$LIBS"
4773 LIBS="-lreadline $TERMLIBS $LIBS"
4774 cat > conftest.$ac_ext <<EOF
4775 #line 4776 "configure"
4776 #include "confdefs.h"
4777 /* Override any gcc2 internal prototype to avoid an error.  */
4778 /* We use char because int might match the return type of a gcc2
4779     builtin and then its argument prototype would still apply.  */
4780 char rl_callback_handler_install();
4781
4782 int main() {
4783 rl_callback_handler_install()
4784 ; return 0; }
4785 EOF
4786 if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4787   rm -rf conftest*
4788   eval "ac_cv_lib_$ac_lib_var=yes"
4789 else
4790   echo "configure: failed program was:" >&5
4791   cat conftest.$ac_ext >&5
4792   rm -rf conftest*
4793   eval "ac_cv_lib_$ac_lib_var=no"
4794 fi
4795 rm -f conftest*
4796 LIBS="$ac_save_LIBS"
4797
4798 fi
4799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4800   echo "$ac_t""yes" 1>&6
4801   TERMLDFLAGS="-L$with_readline/lib"
4802        TERMCPPFLAGS="-I$with_readline/include"
4803        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4804        TERMLIBS="-lreadline $TERMLIBS"
4805        cat >> confdefs.h <<\EOF
4806 #define HAVE_LIBREADLINE 1
4807 EOF
4808
4809        break
4810 else
4811   echo "$ac_t""no" 1>&6
4812 TERMLIBS= CPPFLAGS=$_cppflags
4813 fi
4814
4815 else
4816   echo "$ac_t""no" 1>&6
4817 fi
4818 done
4819
4820
4821     LDFLAGS=$_ldflags
4822     ;;
4823   esac
4824 else
4825   echo "$ac_t""no" 1>&6
4826
4827 fi
4828
4829
4830
4831
4832 # The readline API changed slightly from readline3 to readline4, so
4833 # code will generate warnings on one of them unless we have a few
4834 # special cases.
4835 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4836 echo "configure:4837: checking for rl_completion_matches in -lreadline" >&5
4837 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4838 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4839   echo $ac_n "(cached) $ac_c" 1>&6
4840 else
4841   ac_save_LIBS="$LIBS"
4842 LIBS="-lreadline $TERMLIBS $LIBS"
4843 cat > conftest.$ac_ext <<EOF
4844 #line 4845 "configure"
4845 #include "confdefs.h"
4846 /* Override any gcc2 internal prototype to avoid an error.  */
4847 /* We use char because int might match the return type of a gcc2
4848     builtin and then its argument prototype would still apply.  */
4849 char rl_completion_matches();
4850
4851 int main() {
4852 rl_completion_matches()
4853 ; return 0; }
4854 EOF
4855 if { (eval echo configure:4856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4856   rm -rf conftest*
4857   eval "ac_cv_lib_$ac_lib_var=yes"
4858 else
4859   echo "configure: failed program was:" >&5
4860   cat conftest.$ac_ext >&5
4861   rm -rf conftest*
4862   eval "ac_cv_lib_$ac_lib_var=no"
4863 fi
4864 rm -f conftest*
4865 LIBS="$ac_save_LIBS"
4866
4867 fi
4868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4869   echo "$ac_t""yes" 1>&6
4870   cat >> confdefs.h <<\EOF
4871 #define HAVE_NEW_LIBREADLINE 1
4872 EOF
4873
4874 else
4875   echo "$ac_t""no" 1>&6
4876 fi
4877
4878
4879 # The following test taken from the cvs sources
4880 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4881 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4882 # libsocket.so which has a bad implementation of gethostbyname (it
4883 # only looks in /etc/hosts), so we only look for -lsocket if we need
4884 # it.
4885 for ac_func in connect
4886 do
4887 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4888 echo "configure:4889: checking for $ac_func" >&5
4889 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4890   echo $ac_n "(cached) $ac_c" 1>&6
4891 else
4892   cat > conftest.$ac_ext <<EOF
4893 #line 4894 "configure"
4894 #include "confdefs.h"
4895 /* System header to define __stub macros and hopefully few prototypes,
4896     which can conflict with char $ac_func(); below.  */
4897 #include <assert.h>
4898 /* Override any gcc2 internal prototype to avoid an error.  */
4899 /* We use char because int might match the return type of a gcc2
4900     builtin and then its argument prototype would still apply.  */
4901 char $ac_func();
4902
4903 int main() {
4904
4905 /* The GNU C library defines this for functions which it implements
4906     to always fail with ENOSYS.  Some functions are actually named
4907     something starting with __ and the normal name is an alias.  */
4908 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4909 choke me
4910 #else
4911 $ac_func();
4912 #endif
4913
4914 ; return 0; }
4915 EOF
4916 if { (eval echo configure:4917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4917   rm -rf conftest*
4918   eval "ac_cv_func_$ac_func=yes"
4919 else
4920   echo "configure: failed program was:" >&5
4921   cat conftest.$ac_ext >&5
4922   rm -rf conftest*
4923   eval "ac_cv_func_$ac_func=no"
4924 fi
4925 rm -f conftest*
4926 fi
4927
4928 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4929   echo "$ac_t""yes" 1>&6
4930     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4931   cat >> confdefs.h <<EOF
4932 #define $ac_tr_func 1
4933 EOF
4934  
4935 else
4936   echo "$ac_t""no" 1>&6
4937 fi
4938 done
4939
4940 if test x"$ac_cv_func_connect" = x"no"; then
4941     case "$LIBS" in
4942     *-lnsl*) ;;
4943     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4944 echo "configure:4945: checking for printf in -lnsl_s" >&5
4945 ac_lib_var=`echo nsl_s'_'printf | 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="-lnsl_s  $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 printf();
4958
4959 int main() {
4960 printf()
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 nsl_s | 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="-lnsl_s $LIBS"
4985
4986 else
4987   echo "$ac_t""no" 1>&6
4988 fi
4989  ;;
4990     esac
4991     case "$LIBS" in
4992     *-lnsl*) ;;
4993     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4994 echo "configure:4995: checking for printf in -lnsl" >&5
4995 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4996 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4997   echo $ac_n "(cached) $ac_c" 1>&6
4998 else
4999   ac_save_LIBS="$LIBS"
5000 LIBS="-lnsl  $LIBS"
5001 cat > conftest.$ac_ext <<EOF
5002 #line 5003 "configure"
5003 #include "confdefs.h"
5004 /* Override any gcc2 internal prototype to avoid an error.  */
5005 /* We use char because int might match the return type of a gcc2
5006     builtin and then its argument prototype would still apply.  */
5007 char printf();
5008
5009 int main() {
5010 printf()
5011 ; return 0; }
5012 EOF
5013 if { (eval echo configure:5014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5014   rm -rf conftest*
5015   eval "ac_cv_lib_$ac_lib_var=yes"
5016 else
5017   echo "configure: failed program was:" >&5
5018   cat conftest.$ac_ext >&5
5019   rm -rf conftest*
5020   eval "ac_cv_lib_$ac_lib_var=no"
5021 fi
5022 rm -f conftest*
5023 LIBS="$ac_save_LIBS"
5024
5025 fi
5026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5027   echo "$ac_t""yes" 1>&6
5028     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5029     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5030   cat >> confdefs.h <<EOF
5031 #define $ac_tr_lib 1
5032 EOF
5033
5034   LIBS="-lnsl $LIBS"
5035
5036 else
5037   echo "$ac_t""no" 1>&6
5038 fi
5039  ;;
5040     esac
5041     case "$LIBS" in
5042     *-lsocket*) ;;
5043     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5044 echo "configure:5045: checking for connect in -lsocket" >&5
5045 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5046 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5047   echo $ac_n "(cached) $ac_c" 1>&6
5048 else
5049   ac_save_LIBS="$LIBS"
5050 LIBS="-lsocket  $LIBS"
5051 cat > conftest.$ac_ext <<EOF
5052 #line 5053 "configure"
5053 #include "confdefs.h"
5054 /* Override any gcc2 internal prototype to avoid an error.  */
5055 /* We use char because int might match the return type of a gcc2
5056     builtin and then its argument prototype would still apply.  */
5057 char connect();
5058
5059 int main() {
5060 connect()
5061 ; return 0; }
5062 EOF
5063 if { (eval echo configure:5064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5064   rm -rf conftest*
5065   eval "ac_cv_lib_$ac_lib_var=yes"
5066 else
5067   echo "configure: failed program was:" >&5
5068   cat conftest.$ac_ext >&5
5069   rm -rf conftest*
5070   eval "ac_cv_lib_$ac_lib_var=no"
5071 fi
5072 rm -f conftest*
5073 LIBS="$ac_save_LIBS"
5074
5075 fi
5076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5077   echo "$ac_t""yes" 1>&6
5078     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5079     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5080   cat >> confdefs.h <<EOF
5081 #define $ac_tr_lib 1
5082 EOF
5083
5084   LIBS="-lsocket $LIBS"
5085
5086 else
5087   echo "$ac_t""no" 1>&6
5088 fi
5089  ;;
5090     esac
5091     case "$LIBS" in
5092     *-linet*) ;;
5093     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5094 echo "configure:5095: checking for connect in -linet" >&5
5095 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5096 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5097   echo $ac_n "(cached) $ac_c" 1>&6
5098 else
5099   ac_save_LIBS="$LIBS"
5100 LIBS="-linet  $LIBS"
5101 cat > conftest.$ac_ext <<EOF
5102 #line 5103 "configure"
5103 #include "confdefs.h"
5104 /* Override any gcc2 internal prototype to avoid an error.  */
5105 /* We use char because int might match the return type of a gcc2
5106     builtin and then its argument prototype would still apply.  */
5107 char connect();
5108
5109 int main() {
5110 connect()
5111 ; return 0; }
5112 EOF
5113 if { (eval echo configure:5114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5114   rm -rf conftest*
5115   eval "ac_cv_lib_$ac_lib_var=yes"
5116 else
5117   echo "configure: failed program was:" >&5
5118   cat conftest.$ac_ext >&5
5119   rm -rf conftest*
5120   eval "ac_cv_lib_$ac_lib_var=no"
5121 fi
5122 rm -f conftest*
5123 LIBS="$ac_save_LIBS"
5124
5125 fi
5126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5127   echo "$ac_t""yes" 1>&6
5128     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5129     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5130   cat >> confdefs.h <<EOF
5131 #define $ac_tr_lib 1
5132 EOF
5133
5134   LIBS="-linet $LIBS"
5135
5136 else
5137   echo "$ac_t""no" 1>&6
5138 fi
5139  ;;
5140     esac
5141             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5142        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5143         # ac_cv_func_connect=yes
5144         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5145         cat >> confdefs.h <<\EOF
5146 #define HAVE_CONNECT 1
5147 EOF
5148
5149     fi
5150 fi
5151
5152 ###############################################
5153 # test for where we get get_yp_default_domain() from
5154 for ac_func in yp_get_default_domain
5155 do
5156 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5157 echo "configure:5158: checking for $ac_func" >&5
5158 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5159   echo $ac_n "(cached) $ac_c" 1>&6
5160 else
5161   cat > conftest.$ac_ext <<EOF
5162 #line 5163 "configure"
5163 #include "confdefs.h"
5164 /* System header to define __stub macros and hopefully few prototypes,
5165     which can conflict with char $ac_func(); below.  */
5166 #include <assert.h>
5167 /* Override any gcc2 internal prototype to avoid an error.  */
5168 /* We use char because int might match the return type of a gcc2
5169     builtin and then its argument prototype would still apply.  */
5170 char $ac_func();
5171
5172 int main() {
5173
5174 /* The GNU C library defines this for functions which it implements
5175     to always fail with ENOSYS.  Some functions are actually named
5176     something starting with __ and the normal name is an alias.  */
5177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5178 choke me
5179 #else
5180 $ac_func();
5181 #endif
5182
5183 ; return 0; }
5184 EOF
5185 if { (eval echo configure:5186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5186   rm -rf conftest*
5187   eval "ac_cv_func_$ac_func=yes"
5188 else
5189   echo "configure: failed program was:" >&5
5190   cat conftest.$ac_ext >&5
5191   rm -rf conftest*
5192   eval "ac_cv_func_$ac_func=no"
5193 fi
5194 rm -f conftest*
5195 fi
5196
5197 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5198   echo "$ac_t""yes" 1>&6
5199     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5200   cat >> confdefs.h <<EOF
5201 #define $ac_tr_func 1
5202 EOF
5203  
5204 else
5205   echo "$ac_t""no" 1>&6
5206 fi
5207 done
5208
5209 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5210         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5211 echo "configure:5212: checking for yp_get_default_domain in -lnsl" >&5
5212 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5213 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5214   echo $ac_n "(cached) $ac_c" 1>&6
5215 else
5216   ac_save_LIBS="$LIBS"
5217 LIBS="-lnsl  $LIBS"
5218 cat > conftest.$ac_ext <<EOF
5219 #line 5220 "configure"
5220 #include "confdefs.h"
5221 /* Override any gcc2 internal prototype to avoid an error.  */
5222 /* We use char because int might match the return type of a gcc2
5223     builtin and then its argument prototype would still apply.  */
5224 char yp_get_default_domain();
5225
5226 int main() {
5227 yp_get_default_domain()
5228 ; return 0; }
5229 EOF
5230 if { (eval echo configure:5231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5231   rm -rf conftest*
5232   eval "ac_cv_lib_$ac_lib_var=yes"
5233 else
5234   echo "configure: failed program was:" >&5
5235   cat conftest.$ac_ext >&5
5236   rm -rf conftest*
5237   eval "ac_cv_lib_$ac_lib_var=no"
5238 fi
5239 rm -f conftest*
5240 LIBS="$ac_save_LIBS"
5241
5242 fi
5243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5244   echo "$ac_t""yes" 1>&6
5245   LIBS="$LIBS -lnsl";
5246         cat >> confdefs.h <<\EOF
5247 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5248 EOF
5249
5250 else
5251   echo "$ac_t""no" 1>&6
5252 fi
5253  
5254 fi
5255
5256 # Check if we have execl, if not we need to compile smbrun.
5257 for ac_func in execl
5258 do
5259 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5260 echo "configure:5261: checking for $ac_func" >&5
5261 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5262   echo $ac_n "(cached) $ac_c" 1>&6
5263 else
5264   cat > conftest.$ac_ext <<EOF
5265 #line 5266 "configure"
5266 #include "confdefs.h"
5267 /* System header to define __stub macros and hopefully few prototypes,
5268     which can conflict with char $ac_func(); below.  */
5269 #include <assert.h>
5270 /* Override any gcc2 internal prototype to avoid an error.  */
5271 /* We use char because int might match the return type of a gcc2
5272     builtin and then its argument prototype would still apply.  */
5273 char $ac_func();
5274
5275 int main() {
5276
5277 /* The GNU C library defines this for functions which it implements
5278     to always fail with ENOSYS.  Some functions are actually named
5279     something starting with __ and the normal name is an alias.  */
5280 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5281 choke me
5282 #else
5283 $ac_func();
5284 #endif
5285
5286 ; return 0; }
5287 EOF
5288 if { (eval echo configure:5289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5289   rm -rf conftest*
5290   eval "ac_cv_func_$ac_func=yes"
5291 else
5292   echo "configure: failed program was:" >&5
5293   cat conftest.$ac_ext >&5
5294   rm -rf conftest*
5295   eval "ac_cv_func_$ac_func=no"
5296 fi
5297 rm -f conftest*
5298 fi
5299
5300 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5301   echo "$ac_t""yes" 1>&6
5302     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5303   cat >> confdefs.h <<EOF
5304 #define $ac_tr_func 1
5305 EOF
5306  
5307 else
5308   echo "$ac_t""no" 1>&6
5309 fi
5310 done
5311
5312 if test x"$ac_cv_func_execl" = x"no"; then
5313     RUNPROG="bin/smbrun"
5314 else
5315     RUNPROG=""
5316 fi
5317
5318 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5319 do
5320 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5321 echo "configure:5322: checking for $ac_func" >&5
5322 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5323   echo $ac_n "(cached) $ac_c" 1>&6
5324 else
5325   cat > conftest.$ac_ext <<EOF
5326 #line 5327 "configure"
5327 #include "confdefs.h"
5328 /* System header to define __stub macros and hopefully few prototypes,
5329     which can conflict with char $ac_func(); below.  */
5330 #include <assert.h>
5331 /* Override any gcc2 internal prototype to avoid an error.  */
5332 /* We use char because int might match the return type of a gcc2
5333     builtin and then its argument prototype would still apply.  */
5334 char $ac_func();
5335
5336 int main() {
5337
5338 /* The GNU C library defines this for functions which it implements
5339     to always fail with ENOSYS.  Some functions are actually named
5340     something starting with __ and the normal name is an alias.  */
5341 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5342 choke me
5343 #else
5344 $ac_func();
5345 #endif
5346
5347 ; return 0; }
5348 EOF
5349 if { (eval echo configure:5350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5350   rm -rf conftest*
5351   eval "ac_cv_func_$ac_func=yes"
5352 else
5353   echo "configure: failed program was:" >&5
5354   cat conftest.$ac_ext >&5
5355   rm -rf conftest*
5356   eval "ac_cv_func_$ac_func=no"
5357 fi
5358 rm -f conftest*
5359 fi
5360
5361 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5362   echo "$ac_t""yes" 1>&6
5363     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5364   cat >> confdefs.h <<EOF
5365 #define $ac_tr_func 1
5366 EOF
5367  
5368 else
5369   echo "$ac_t""no" 1>&6
5370 fi
5371 done
5372
5373 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5374 do
5375 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5376 echo "configure:5377: checking for $ac_func" >&5
5377 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5378   echo $ac_n "(cached) $ac_c" 1>&6
5379 else
5380   cat > conftest.$ac_ext <<EOF
5381 #line 5382 "configure"
5382 #include "confdefs.h"
5383 /* System header to define __stub macros and hopefully few prototypes,
5384     which can conflict with char $ac_func(); below.  */
5385 #include <assert.h>
5386 /* Override any gcc2 internal prototype to avoid an error.  */
5387 /* We use char because int might match the return type of a gcc2
5388     builtin and then its argument prototype would still apply.  */
5389 char $ac_func();
5390
5391 int main() {
5392
5393 /* The GNU C library defines this for functions which it implements
5394     to always fail with ENOSYS.  Some functions are actually named
5395     something starting with __ and the normal name is an alias.  */
5396 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5397 choke me
5398 #else
5399 $ac_func();
5400 #endif
5401
5402 ; return 0; }
5403 EOF
5404 if { (eval echo configure:5405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5405   rm -rf conftest*
5406   eval "ac_cv_func_$ac_func=yes"
5407 else
5408   echo "configure: failed program was:" >&5
5409   cat conftest.$ac_ext >&5
5410   rm -rf conftest*
5411   eval "ac_cv_func_$ac_func=no"
5412 fi
5413 rm -f conftest*
5414 fi
5415
5416 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5417   echo "$ac_t""yes" 1>&6
5418     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5419   cat >> confdefs.h <<EOF
5420 #define $ac_tr_func 1
5421 EOF
5422  
5423 else
5424   echo "$ac_t""no" 1>&6
5425 fi
5426 done
5427
5428 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5429 do
5430 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5431 echo "configure:5432: checking for $ac_func" >&5
5432 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5433   echo $ac_n "(cached) $ac_c" 1>&6
5434 else
5435   cat > conftest.$ac_ext <<EOF
5436 #line 5437 "configure"
5437 #include "confdefs.h"
5438 /* System header to define __stub macros and hopefully few prototypes,
5439     which can conflict with char $ac_func(); below.  */
5440 #include <assert.h>
5441 /* Override any gcc2 internal prototype to avoid an error.  */
5442 /* We use char because int might match the return type of a gcc2
5443     builtin and then its argument prototype would still apply.  */
5444 char $ac_func();
5445
5446 int main() {
5447
5448 /* The GNU C library defines this for functions which it implements
5449     to always fail with ENOSYS.  Some functions are actually named
5450     something starting with __ and the normal name is an alias.  */
5451 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5452 choke me
5453 #else
5454 $ac_func();
5455 #endif
5456
5457 ; return 0; }
5458 EOF
5459 if { (eval echo configure:5460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5460   rm -rf conftest*
5461   eval "ac_cv_func_$ac_func=yes"
5462 else
5463   echo "configure: failed program was:" >&5
5464   cat conftest.$ac_ext >&5
5465   rm -rf conftest*
5466   eval "ac_cv_func_$ac_func=no"
5467 fi
5468 rm -f conftest*
5469 fi
5470
5471 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5472   echo "$ac_t""yes" 1>&6
5473     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5474   cat >> confdefs.h <<EOF
5475 #define $ac_tr_func 1
5476 EOF
5477  
5478 else
5479   echo "$ac_t""no" 1>&6
5480 fi
5481 done
5482
5483 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5484 do
5485 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5486 echo "configure:5487: checking for $ac_func" >&5
5487 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5488   echo $ac_n "(cached) $ac_c" 1>&6
5489 else
5490   cat > conftest.$ac_ext <<EOF
5491 #line 5492 "configure"
5492 #include "confdefs.h"
5493 /* System header to define __stub macros and hopefully few prototypes,
5494     which can conflict with char $ac_func(); below.  */
5495 #include <assert.h>
5496 /* Override any gcc2 internal prototype to avoid an error.  */
5497 /* We use char because int might match the return type of a gcc2
5498     builtin and then its argument prototype would still apply.  */
5499 char $ac_func();
5500
5501 int main() {
5502
5503 /* The GNU C library defines this for functions which it implements
5504     to always fail with ENOSYS.  Some functions are actually named
5505     something starting with __ and the normal name is an alias.  */
5506 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5507 choke me
5508 #else
5509 $ac_func();
5510 #endif
5511
5512 ; return 0; }
5513 EOF
5514 if { (eval echo configure:5515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5515   rm -rf conftest*
5516   eval "ac_cv_func_$ac_func=yes"
5517 else
5518   echo "configure: failed program was:" >&5
5519   cat conftest.$ac_ext >&5
5520   rm -rf conftest*
5521   eval "ac_cv_func_$ac_func=no"
5522 fi
5523 rm -f conftest*
5524 fi
5525
5526 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5527   echo "$ac_t""yes" 1>&6
5528     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5529   cat >> confdefs.h <<EOF
5530 #define $ac_tr_func 1
5531 EOF
5532  
5533 else
5534   echo "$ac_t""no" 1>&6
5535 fi
5536 done
5537
5538 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5539 do
5540 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5541 echo "configure:5542: checking for $ac_func" >&5
5542 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5543   echo $ac_n "(cached) $ac_c" 1>&6
5544 else
5545   cat > conftest.$ac_ext <<EOF
5546 #line 5547 "configure"
5547 #include "confdefs.h"
5548 /* System header to define __stub macros and hopefully few prototypes,
5549     which can conflict with char $ac_func(); below.  */
5550 #include <assert.h>
5551 /* Override any gcc2 internal prototype to avoid an error.  */
5552 /* We use char because int might match the return type of a gcc2
5553     builtin and then its argument prototype would still apply.  */
5554 char $ac_func();
5555
5556 int main() {
5557
5558 /* The GNU C library defines this for functions which it implements
5559     to always fail with ENOSYS.  Some functions are actually named
5560     something starting with __ and the normal name is an alias.  */
5561 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5562 choke me
5563 #else
5564 $ac_func();
5565 #endif
5566
5567 ; return 0; }
5568 EOF
5569 if { (eval echo configure:5570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5570   rm -rf conftest*
5571   eval "ac_cv_func_$ac_func=yes"
5572 else
5573   echo "configure: failed program was:" >&5
5574   cat conftest.$ac_ext >&5
5575   rm -rf conftest*
5576   eval "ac_cv_func_$ac_func=no"
5577 fi
5578 rm -f conftest*
5579 fi
5580
5581 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5582   echo "$ac_t""yes" 1>&6
5583     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5584   cat >> confdefs.h <<EOF
5585 #define $ac_tr_func 1
5586 EOF
5587  
5588 else
5589   echo "$ac_t""no" 1>&6
5590 fi
5591 done
5592
5593 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5594 do
5595 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5596 echo "configure:5597: checking for $ac_func" >&5
5597 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5598   echo $ac_n "(cached) $ac_c" 1>&6
5599 else
5600   cat > conftest.$ac_ext <<EOF
5601 #line 5602 "configure"
5602 #include "confdefs.h"
5603 /* System header to define __stub macros and hopefully few prototypes,
5604     which can conflict with char $ac_func(); below.  */
5605 #include <assert.h>
5606 /* Override any gcc2 internal prototype to avoid an error.  */
5607 /* We use char because int might match the return type of a gcc2
5608     builtin and then its argument prototype would still apply.  */
5609 char $ac_func();
5610
5611 int main() {
5612
5613 /* The GNU C library defines this for functions which it implements
5614     to always fail with ENOSYS.  Some functions are actually named
5615     something starting with __ and the normal name is an alias.  */
5616 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5617 choke me
5618 #else
5619 $ac_func();
5620 #endif
5621
5622 ; return 0; }
5623 EOF
5624 if { (eval echo configure:5625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5625   rm -rf conftest*
5626   eval "ac_cv_func_$ac_func=yes"
5627 else
5628   echo "configure: failed program was:" >&5
5629   cat conftest.$ac_ext >&5
5630   rm -rf conftest*
5631   eval "ac_cv_func_$ac_func=no"
5632 fi
5633 rm -f conftest*
5634 fi
5635
5636 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5637   echo "$ac_t""yes" 1>&6
5638     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5639   cat >> confdefs.h <<EOF
5640 #define $ac_tr_func 1
5641 EOF
5642  
5643 else
5644   echo "$ac_t""no" 1>&6
5645 fi
5646 done
5647
5648 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5649 do
5650 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5651 echo "configure:5652: checking for $ac_func" >&5
5652 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5653   echo $ac_n "(cached) $ac_c" 1>&6
5654 else
5655   cat > conftest.$ac_ext <<EOF
5656 #line 5657 "configure"
5657 #include "confdefs.h"
5658 /* System header to define __stub macros and hopefully few prototypes,
5659     which can conflict with char $ac_func(); below.  */
5660 #include <assert.h>
5661 /* Override any gcc2 internal prototype to avoid an error.  */
5662 /* We use char because int might match the return type of a gcc2
5663     builtin and then its argument prototype would still apply.  */
5664 char $ac_func();
5665
5666 int main() {
5667
5668 /* The GNU C library defines this for functions which it implements
5669     to always fail with ENOSYS.  Some functions are actually named
5670     something starting with __ and the normal name is an alias.  */
5671 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5672 choke me
5673 #else
5674 $ac_func();
5675 #endif
5676
5677 ; return 0; }
5678 EOF
5679 if { (eval echo configure:5680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5680   rm -rf conftest*
5681   eval "ac_cv_func_$ac_func=yes"
5682 else
5683   echo "configure: failed program was:" >&5
5684   cat conftest.$ac_ext >&5
5685   rm -rf conftest*
5686   eval "ac_cv_func_$ac_func=no"
5687 fi
5688 rm -f conftest*
5689 fi
5690
5691 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5692   echo "$ac_t""yes" 1>&6
5693     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5694   cat >> confdefs.h <<EOF
5695 #define $ac_tr_func 1
5696 EOF
5697  
5698 else
5699   echo "$ac_t""no" 1>&6
5700 fi
5701 done
5702
5703 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5704 do
5705 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5706 echo "configure:5707: checking for $ac_func" >&5
5707 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5708   echo $ac_n "(cached) $ac_c" 1>&6
5709 else
5710   cat > conftest.$ac_ext <<EOF
5711 #line 5712 "configure"
5712 #include "confdefs.h"
5713 /* System header to define __stub macros and hopefully few prototypes,
5714     which can conflict with char $ac_func(); below.  */
5715 #include <assert.h>
5716 /* Override any gcc2 internal prototype to avoid an error.  */
5717 /* We use char because int might match the return type of a gcc2
5718     builtin and then its argument prototype would still apply.  */
5719 char $ac_func();
5720
5721 int main() {
5722
5723 /* The GNU C library defines this for functions which it implements
5724     to always fail with ENOSYS.  Some functions are actually named
5725     something starting with __ and the normal name is an alias.  */
5726 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5727 choke me
5728 #else
5729 $ac_func();
5730 #endif
5731
5732 ; return 0; }
5733 EOF
5734 if { (eval echo configure:5735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5735   rm -rf conftest*
5736   eval "ac_cv_func_$ac_func=yes"
5737 else
5738   echo "configure: failed program was:" >&5
5739   cat conftest.$ac_ext >&5
5740   rm -rf conftest*
5741   eval "ac_cv_func_$ac_func=no"
5742 fi
5743 rm -f conftest*
5744 fi
5745
5746 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5747   echo "$ac_t""yes" 1>&6
5748     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5749   cat >> confdefs.h <<EOF
5750 #define $ac_tr_func 1
5751 EOF
5752  
5753 else
5754   echo "$ac_t""no" 1>&6
5755 fi
5756 done
5757
5758 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5759 do
5760 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5761 echo "configure:5762: checking for $ac_func" >&5
5762 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5763   echo $ac_n "(cached) $ac_c" 1>&6
5764 else
5765   cat > conftest.$ac_ext <<EOF
5766 #line 5767 "configure"
5767 #include "confdefs.h"
5768 /* System header to define __stub macros and hopefully few prototypes,
5769     which can conflict with char $ac_func(); below.  */
5770 #include <assert.h>
5771 /* Override any gcc2 internal prototype to avoid an error.  */
5772 /* We use char because int might match the return type of a gcc2
5773     builtin and then its argument prototype would still apply.  */
5774 char $ac_func();
5775
5776 int main() {
5777
5778 /* The GNU C library defines this for functions which it implements
5779     to always fail with ENOSYS.  Some functions are actually named
5780     something starting with __ and the normal name is an alias.  */
5781 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5782 choke me
5783 #else
5784 $ac_func();
5785 #endif
5786
5787 ; return 0; }
5788 EOF
5789 if { (eval echo configure:5790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5790   rm -rf conftest*
5791   eval "ac_cv_func_$ac_func=yes"
5792 else
5793   echo "configure: failed program was:" >&5
5794   cat conftest.$ac_ext >&5
5795   rm -rf conftest*
5796   eval "ac_cv_func_$ac_func=no"
5797 fi
5798 rm -f conftest*
5799 fi
5800
5801 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5802   echo "$ac_t""yes" 1>&6
5803     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5804   cat >> confdefs.h <<EOF
5805 #define $ac_tr_func 1
5806 EOF
5807  
5808 else
5809   echo "$ac_t""no" 1>&6
5810 fi
5811 done
5812
5813 for ac_func in syslog vsyslog
5814 do
5815 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5816 echo "configure:5817: checking for $ac_func" >&5
5817 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5818   echo $ac_n "(cached) $ac_c" 1>&6
5819 else
5820   cat > conftest.$ac_ext <<EOF
5821 #line 5822 "configure"
5822 #include "confdefs.h"
5823 /* System header to define __stub macros and hopefully few prototypes,
5824     which can conflict with char $ac_func(); below.  */
5825 #include <assert.h>
5826 /* Override any gcc2 internal prototype to avoid an error.  */
5827 /* We use char because int might match the return type of a gcc2
5828     builtin and then its argument prototype would still apply.  */
5829 char $ac_func();
5830
5831 int main() {
5832
5833 /* The GNU C library defines this for functions which it implements
5834     to always fail with ENOSYS.  Some functions are actually named
5835     something starting with __ and the normal name is an alias.  */
5836 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5837 choke me
5838 #else
5839 $ac_func();
5840 #endif
5841
5842 ; return 0; }
5843 EOF
5844 if { (eval echo configure:5845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5845   rm -rf conftest*
5846   eval "ac_cv_func_$ac_func=yes"
5847 else
5848   echo "configure: failed program was:" >&5
5849   cat conftest.$ac_ext >&5
5850   rm -rf conftest*
5851   eval "ac_cv_func_$ac_func=no"
5852 fi
5853 rm -f conftest*
5854 fi
5855
5856 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5857   echo "$ac_t""yes" 1>&6
5858     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5859   cat >> confdefs.h <<EOF
5860 #define $ac_tr_func 1
5861 EOF
5862  
5863 else
5864   echo "$ac_t""no" 1>&6
5865 fi
5866 done
5867
5868 # setbuffer is needed for smbtorture
5869 for ac_func in setbuffer
5870 do
5871 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5872 echo "configure:5873: checking for $ac_func" >&5
5873 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5874   echo $ac_n "(cached) $ac_c" 1>&6
5875 else
5876   cat > conftest.$ac_ext <<EOF
5877 #line 5878 "configure"
5878 #include "confdefs.h"
5879 /* System header to define __stub macros and hopefully few prototypes,
5880     which can conflict with char $ac_func(); below.  */
5881 #include <assert.h>
5882 /* Override any gcc2 internal prototype to avoid an error.  */
5883 /* We use char because int might match the return type of a gcc2
5884     builtin and then its argument prototype would still apply.  */
5885 char $ac_func();
5886
5887 int main() {
5888
5889 /* The GNU C library defines this for functions which it implements
5890     to always fail with ENOSYS.  Some functions are actually named
5891     something starting with __ and the normal name is an alias.  */
5892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5893 choke me
5894 #else
5895 $ac_func();
5896 #endif
5897
5898 ; return 0; }
5899 EOF
5900 if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5901   rm -rf conftest*
5902   eval "ac_cv_func_$ac_func=yes"
5903 else
5904   echo "configure: failed program was:" >&5
5905   cat conftest.$ac_ext >&5
5906   rm -rf conftest*
5907   eval "ac_cv_func_$ac_func=no"
5908 fi
5909 rm -f conftest*
5910 fi
5911
5912 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5913   echo "$ac_t""yes" 1>&6
5914     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5915   cat >> confdefs.h <<EOF
5916 #define $ac_tr_func 1
5917 EOF
5918  
5919 else
5920   echo "$ac_t""no" 1>&6
5921 fi
5922 done
5923
5924
5925 # syscall() is needed for smbwrapper.
5926 for ac_func in syscall
5927 do
5928 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5929 echo "configure:5930: checking for $ac_func" >&5
5930 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5931   echo $ac_n "(cached) $ac_c" 1>&6
5932 else
5933   cat > conftest.$ac_ext <<EOF
5934 #line 5935 "configure"
5935 #include "confdefs.h"
5936 /* System header to define __stub macros and hopefully few prototypes,
5937     which can conflict with char $ac_func(); below.  */
5938 #include <assert.h>
5939 /* Override any gcc2 internal prototype to avoid an error.  */
5940 /* We use char because int might match the return type of a gcc2
5941     builtin and then its argument prototype would still apply.  */
5942 char $ac_func();
5943
5944 int main() {
5945
5946 /* The GNU C library defines this for functions which it implements
5947     to always fail with ENOSYS.  Some functions are actually named
5948     something starting with __ and the normal name is an alias.  */
5949 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5950 choke me
5951 #else
5952 $ac_func();
5953 #endif
5954
5955 ; return 0; }
5956 EOF
5957 if { (eval echo configure:5958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5958   rm -rf conftest*
5959   eval "ac_cv_func_$ac_func=yes"
5960 else
5961   echo "configure: failed program was:" >&5
5962   cat conftest.$ac_ext >&5
5963   rm -rf conftest*
5964   eval "ac_cv_func_$ac_func=no"
5965 fi
5966 rm -f conftest*
5967 fi
5968
5969 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5970   echo "$ac_t""yes" 1>&6
5971     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5972   cat >> confdefs.h <<EOF
5973 #define $ac_tr_func 1
5974 EOF
5975  
5976 else
5977   echo "$ac_t""no" 1>&6
5978 fi
5979 done
5980
5981
5982 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5983 do
5984 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5985 echo "configure:5986: checking for $ac_func" >&5
5986 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5987   echo $ac_n "(cached) $ac_c" 1>&6
5988 else
5989   cat > conftest.$ac_ext <<EOF
5990 #line 5991 "configure"
5991 #include "confdefs.h"
5992 /* System header to define __stub macros and hopefully few prototypes,
5993     which can conflict with char $ac_func(); below.  */
5994 #include <assert.h>
5995 /* Override any gcc2 internal prototype to avoid an error.  */
5996 /* We use char because int might match the return type of a gcc2
5997     builtin and then its argument prototype would still apply.  */
5998 char $ac_func();
5999
6000 int main() {
6001
6002 /* The GNU C library defines this for functions which it implements
6003     to always fail with ENOSYS.  Some functions are actually named
6004     something starting with __ and the normal name is an alias.  */
6005 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6006 choke me
6007 #else
6008 $ac_func();
6009 #endif
6010
6011 ; return 0; }
6012 EOF
6013 if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6014   rm -rf conftest*
6015   eval "ac_cv_func_$ac_func=yes"
6016 else
6017   echo "configure: failed program was:" >&5
6018   cat conftest.$ac_ext >&5
6019   rm -rf conftest*
6020   eval "ac_cv_func_$ac_func=no"
6021 fi
6022 rm -f conftest*
6023 fi
6024
6025 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6026   echo "$ac_t""yes" 1>&6
6027     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6028   cat >> confdefs.h <<EOF
6029 #define $ac_tr_func 1
6030 EOF
6031  
6032 else
6033   echo "$ac_t""no" 1>&6
6034 fi
6035 done
6036
6037 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6038 do
6039 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6040 echo "configure:6041: checking for $ac_func" >&5
6041 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6042   echo $ac_n "(cached) $ac_c" 1>&6
6043 else
6044   cat > conftest.$ac_ext <<EOF
6045 #line 6046 "configure"
6046 #include "confdefs.h"
6047 /* System header to define __stub macros and hopefully few prototypes,
6048     which can conflict with char $ac_func(); below.  */
6049 #include <assert.h>
6050 /* Override any gcc2 internal prototype to avoid an error.  */
6051 /* We use char because int might match the return type of a gcc2
6052     builtin and then its argument prototype would still apply.  */
6053 char $ac_func();
6054
6055 int main() {
6056
6057 /* The GNU C library defines this for functions which it implements
6058     to always fail with ENOSYS.  Some functions are actually named
6059     something starting with __ and the normal name is an alias.  */
6060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6061 choke me
6062 #else
6063 $ac_func();
6064 #endif
6065
6066 ; return 0; }
6067 EOF
6068 if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6069   rm -rf conftest*
6070   eval "ac_cv_func_$ac_func=yes"
6071 else
6072   echo "configure: failed program was:" >&5
6073   cat conftest.$ac_ext >&5
6074   rm -rf conftest*
6075   eval "ac_cv_func_$ac_func=no"
6076 fi
6077 rm -f conftest*
6078 fi
6079
6080 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6081   echo "$ac_t""yes" 1>&6
6082     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6083   cat >> confdefs.h <<EOF
6084 #define $ac_tr_func 1
6085 EOF
6086  
6087 else
6088   echo "$ac_t""no" 1>&6
6089 fi
6090 done
6091
6092 for ac_func in __getcwd _getcwd
6093 do
6094 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6095 echo "configure:6096: checking for $ac_func" >&5
6096 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6097   echo $ac_n "(cached) $ac_c" 1>&6
6098 else
6099   cat > conftest.$ac_ext <<EOF
6100 #line 6101 "configure"
6101 #include "confdefs.h"
6102 /* System header to define __stub macros and hopefully few prototypes,
6103     which can conflict with char $ac_func(); below.  */
6104 #include <assert.h>
6105 /* Override any gcc2 internal prototype to avoid an error.  */
6106 /* We use char because int might match the return type of a gcc2
6107     builtin and then its argument prototype would still apply.  */
6108 char $ac_func();
6109
6110 int main() {
6111
6112 /* The GNU C library defines this for functions which it implements
6113     to always fail with ENOSYS.  Some functions are actually named
6114     something starting with __ and the normal name is an alias.  */
6115 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6116 choke me
6117 #else
6118 $ac_func();
6119 #endif
6120
6121 ; return 0; }
6122 EOF
6123 if { (eval echo configure:6124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6124   rm -rf conftest*
6125   eval "ac_cv_func_$ac_func=yes"
6126 else
6127   echo "configure: failed program was:" >&5
6128   cat conftest.$ac_ext >&5
6129   rm -rf conftest*
6130   eval "ac_cv_func_$ac_func=no"
6131 fi
6132 rm -f conftest*
6133 fi
6134
6135 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6136   echo "$ac_t""yes" 1>&6
6137     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6138   cat >> confdefs.h <<EOF
6139 #define $ac_tr_func 1
6140 EOF
6141  
6142 else
6143   echo "$ac_t""no" 1>&6
6144 fi
6145 done
6146
6147 for ac_func in __xstat __fxstat __lxstat
6148 do
6149 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6150 echo "configure:6151: checking for $ac_func" >&5
6151 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6152   echo $ac_n "(cached) $ac_c" 1>&6
6153 else
6154   cat > conftest.$ac_ext <<EOF
6155 #line 6156 "configure"
6156 #include "confdefs.h"
6157 /* System header to define __stub macros and hopefully few prototypes,
6158     which can conflict with char $ac_func(); below.  */
6159 #include <assert.h>
6160 /* Override any gcc2 internal prototype to avoid an error.  */
6161 /* We use char because int might match the return type of a gcc2
6162     builtin and then its argument prototype would still apply.  */
6163 char $ac_func();
6164
6165 int main() {
6166
6167 /* The GNU C library defines this for functions which it implements
6168     to always fail with ENOSYS.  Some functions are actually named
6169     something starting with __ and the normal name is an alias.  */
6170 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6171 choke me
6172 #else
6173 $ac_func();
6174 #endif
6175
6176 ; return 0; }
6177 EOF
6178 if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6179   rm -rf conftest*
6180   eval "ac_cv_func_$ac_func=yes"
6181 else
6182   echo "configure: failed program was:" >&5
6183   cat conftest.$ac_ext >&5
6184   rm -rf conftest*
6185   eval "ac_cv_func_$ac_func=no"
6186 fi
6187 rm -f conftest*
6188 fi
6189
6190 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6191   echo "$ac_t""yes" 1>&6
6192     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6193   cat >> confdefs.h <<EOF
6194 #define $ac_tr_func 1
6195 EOF
6196  
6197 else
6198   echo "$ac_t""no" 1>&6
6199 fi
6200 done
6201
6202 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6203 do
6204 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6205 echo "configure:6206: checking for $ac_func" >&5
6206 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6207   echo $ac_n "(cached) $ac_c" 1>&6
6208 else
6209   cat > conftest.$ac_ext <<EOF
6210 #line 6211 "configure"
6211 #include "confdefs.h"
6212 /* System header to define __stub macros and hopefully few prototypes,
6213     which can conflict with char $ac_func(); below.  */
6214 #include <assert.h>
6215 /* Override any gcc2 internal prototype to avoid an error.  */
6216 /* We use char because int might match the return type of a gcc2
6217     builtin and then its argument prototype would still apply.  */
6218 char $ac_func();
6219
6220 int main() {
6221
6222 /* The GNU C library defines this for functions which it implements
6223     to always fail with ENOSYS.  Some functions are actually named
6224     something starting with __ and the normal name is an alias.  */
6225 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6226 choke me
6227 #else
6228 $ac_func();
6229 #endif
6230
6231 ; return 0; }
6232 EOF
6233 if { (eval echo configure:6234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6234   rm -rf conftest*
6235   eval "ac_cv_func_$ac_func=yes"
6236 else
6237   echo "configure: failed program was:" >&5
6238   cat conftest.$ac_ext >&5
6239   rm -rf conftest*
6240   eval "ac_cv_func_$ac_func=no"
6241 fi
6242 rm -f conftest*
6243 fi
6244
6245 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6246   echo "$ac_t""yes" 1>&6
6247     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6248   cat >> confdefs.h <<EOF
6249 #define $ac_tr_func 1
6250 EOF
6251  
6252 else
6253   echo "$ac_t""no" 1>&6
6254 fi
6255 done
6256
6257 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6258 do
6259 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6260 echo "configure:6261: checking for $ac_func" >&5
6261 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6262   echo $ac_n "(cached) $ac_c" 1>&6
6263 else
6264   cat > conftest.$ac_ext <<EOF
6265 #line 6266 "configure"
6266 #include "confdefs.h"
6267 /* System header to define __stub macros and hopefully few prototypes,
6268     which can conflict with char $ac_func(); below.  */
6269 #include <assert.h>
6270 /* Override any gcc2 internal prototype to avoid an error.  */
6271 /* We use char because int might match the return type of a gcc2
6272     builtin and then its argument prototype would still apply.  */
6273 char $ac_func();
6274
6275 int main() {
6276
6277 /* The GNU C library defines this for functions which it implements
6278     to always fail with ENOSYS.  Some functions are actually named
6279     something starting with __ and the normal name is an alias.  */
6280 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6281 choke me
6282 #else
6283 $ac_func();
6284 #endif
6285
6286 ; return 0; }
6287 EOF
6288 if { (eval echo configure:6289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6289   rm -rf conftest*
6290   eval "ac_cv_func_$ac_func=yes"
6291 else
6292   echo "configure: failed program was:" >&5
6293   cat conftest.$ac_ext >&5
6294   rm -rf conftest*
6295   eval "ac_cv_func_$ac_func=no"
6296 fi
6297 rm -f conftest*
6298 fi
6299
6300 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6301   echo "$ac_t""yes" 1>&6
6302     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6303   cat >> confdefs.h <<EOF
6304 #define $ac_tr_func 1
6305 EOF
6306  
6307 else
6308   echo "$ac_t""no" 1>&6
6309 fi
6310 done
6311
6312 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6313 do
6314 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6315 echo "configure:6316: checking for $ac_func" >&5
6316 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6317   echo $ac_n "(cached) $ac_c" 1>&6
6318 else
6319   cat > conftest.$ac_ext <<EOF
6320 #line 6321 "configure"
6321 #include "confdefs.h"
6322 /* System header to define __stub macros and hopefully few prototypes,
6323     which can conflict with char $ac_func(); below.  */
6324 #include <assert.h>
6325 /* Override any gcc2 internal prototype to avoid an error.  */
6326 /* We use char because int might match the return type of a gcc2
6327     builtin and then its argument prototype would still apply.  */
6328 char $ac_func();
6329
6330 int main() {
6331
6332 /* The GNU C library defines this for functions which it implements
6333     to always fail with ENOSYS.  Some functions are actually named
6334     something starting with __ and the normal name is an alias.  */
6335 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6336 choke me
6337 #else
6338 $ac_func();
6339 #endif
6340
6341 ; return 0; }
6342 EOF
6343 if { (eval echo configure:6344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6344   rm -rf conftest*
6345   eval "ac_cv_func_$ac_func=yes"
6346 else
6347   echo "configure: failed program was:" >&5
6348   cat conftest.$ac_ext >&5
6349   rm -rf conftest*
6350   eval "ac_cv_func_$ac_func=no"
6351 fi
6352 rm -f conftest*
6353 fi
6354
6355 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6356   echo "$ac_t""yes" 1>&6
6357     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6358   cat >> confdefs.h <<EOF
6359 #define $ac_tr_func 1
6360 EOF
6361  
6362 else
6363   echo "$ac_t""no" 1>&6
6364 fi
6365 done
6366
6367 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6368 do
6369 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6370 echo "configure:6371: checking for $ac_func" >&5
6371 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6372   echo $ac_n "(cached) $ac_c" 1>&6
6373 else
6374   cat > conftest.$ac_ext <<EOF
6375 #line 6376 "configure"
6376 #include "confdefs.h"
6377 /* System header to define __stub macros and hopefully few prototypes,
6378     which can conflict with char $ac_func(); below.  */
6379 #include <assert.h>
6380 /* Override any gcc2 internal prototype to avoid an error.  */
6381 /* We use char because int might match the return type of a gcc2
6382     builtin and then its argument prototype would still apply.  */
6383 char $ac_func();
6384
6385 int main() {
6386
6387 /* The GNU C library defines this for functions which it implements
6388     to always fail with ENOSYS.  Some functions are actually named
6389     something starting with __ and the normal name is an alias.  */
6390 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6391 choke me
6392 #else
6393 $ac_func();
6394 #endif
6395
6396 ; return 0; }
6397 EOF
6398 if { (eval echo configure:6399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6399   rm -rf conftest*
6400   eval "ac_cv_func_$ac_func=yes"
6401 else
6402   echo "configure: failed program was:" >&5
6403   cat conftest.$ac_ext >&5
6404   rm -rf conftest*
6405   eval "ac_cv_func_$ac_func=no"
6406 fi
6407 rm -f conftest*
6408 fi
6409
6410 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6411   echo "$ac_t""yes" 1>&6
6412     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6413   cat >> confdefs.h <<EOF
6414 #define $ac_tr_func 1
6415 EOF
6416  
6417 else
6418   echo "$ac_t""no" 1>&6
6419 fi
6420 done
6421
6422 for ac_func in _write __write _fork __fork
6423 do
6424 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6425 echo "configure:6426: checking for $ac_func" >&5
6426 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6427   echo $ac_n "(cached) $ac_c" 1>&6
6428 else
6429   cat > conftest.$ac_ext <<EOF
6430 #line 6431 "configure"
6431 #include "confdefs.h"
6432 /* System header to define __stub macros and hopefully few prototypes,
6433     which can conflict with char $ac_func(); below.  */
6434 #include <assert.h>
6435 /* Override any gcc2 internal prototype to avoid an error.  */
6436 /* We use char because int might match the return type of a gcc2
6437     builtin and then its argument prototype would still apply.  */
6438 char $ac_func();
6439
6440 int main() {
6441
6442 /* The GNU C library defines this for functions which it implements
6443     to always fail with ENOSYS.  Some functions are actually named
6444     something starting with __ and the normal name is an alias.  */
6445 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6446 choke me
6447 #else
6448 $ac_func();
6449 #endif
6450
6451 ; return 0; }
6452 EOF
6453 if { (eval echo configure:6454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6454   rm -rf conftest*
6455   eval "ac_cv_func_$ac_func=yes"
6456 else
6457   echo "configure: failed program was:" >&5
6458   cat conftest.$ac_ext >&5
6459   rm -rf conftest*
6460   eval "ac_cv_func_$ac_func=no"
6461 fi
6462 rm -f conftest*
6463 fi
6464
6465 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6466   echo "$ac_t""yes" 1>&6
6467     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6468   cat >> confdefs.h <<EOF
6469 #define $ac_tr_func 1
6470 EOF
6471  
6472 else
6473   echo "$ac_t""no" 1>&6
6474 fi
6475 done
6476
6477 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6478 do
6479 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6480 echo "configure:6481: checking for $ac_func" >&5
6481 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6482   echo $ac_n "(cached) $ac_c" 1>&6
6483 else
6484   cat > conftest.$ac_ext <<EOF
6485 #line 6486 "configure"
6486 #include "confdefs.h"
6487 /* System header to define __stub macros and hopefully few prototypes,
6488     which can conflict with char $ac_func(); below.  */
6489 #include <assert.h>
6490 /* Override any gcc2 internal prototype to avoid an error.  */
6491 /* We use char because int might match the return type of a gcc2
6492     builtin and then its argument prototype would still apply.  */
6493 char $ac_func();
6494
6495 int main() {
6496
6497 /* The GNU C library defines this for functions which it implements
6498     to always fail with ENOSYS.  Some functions are actually named
6499     something starting with __ and the normal name is an alias.  */
6500 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6501 choke me
6502 #else
6503 $ac_func();
6504 #endif
6505
6506 ; return 0; }
6507 EOF
6508 if { (eval echo configure:6509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6509   rm -rf conftest*
6510   eval "ac_cv_func_$ac_func=yes"
6511 else
6512   echo "configure: failed program was:" >&5
6513   cat conftest.$ac_ext >&5
6514   rm -rf conftest*
6515   eval "ac_cv_func_$ac_func=no"
6516 fi
6517 rm -f conftest*
6518 fi
6519
6520 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6521   echo "$ac_t""yes" 1>&6
6522     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6523   cat >> confdefs.h <<EOF
6524 #define $ac_tr_func 1
6525 EOF
6526  
6527 else
6528   echo "$ac_t""no" 1>&6
6529 fi
6530 done
6531
6532 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6533 do
6534 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6535 echo "configure:6536: checking for $ac_func" >&5
6536 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6537   echo $ac_n "(cached) $ac_c" 1>&6
6538 else
6539   cat > conftest.$ac_ext <<EOF
6540 #line 6541 "configure"
6541 #include "confdefs.h"
6542 /* System header to define __stub macros and hopefully few prototypes,
6543     which can conflict with char $ac_func(); below.  */
6544 #include <assert.h>
6545 /* Override any gcc2 internal prototype to avoid an error.  */
6546 /* We use char because int might match the return type of a gcc2
6547     builtin and then its argument prototype would still apply.  */
6548 char $ac_func();
6549
6550 int main() {
6551
6552 /* The GNU C library defines this for functions which it implements
6553     to always fail with ENOSYS.  Some functions are actually named
6554     something starting with __ and the normal name is an alias.  */
6555 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6556 choke me
6557 #else
6558 $ac_func();
6559 #endif
6560
6561 ; return 0; }
6562 EOF
6563 if { (eval echo configure:6564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6564   rm -rf conftest*
6565   eval "ac_cv_func_$ac_func=yes"
6566 else
6567   echo "configure: failed program was:" >&5
6568   cat conftest.$ac_ext >&5
6569   rm -rf conftest*
6570   eval "ac_cv_func_$ac_func=no"
6571 fi
6572 rm -f conftest*
6573 fi
6574
6575 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6576   echo "$ac_t""yes" 1>&6
6577     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6578   cat >> confdefs.h <<EOF
6579 #define $ac_tr_func 1
6580 EOF
6581  
6582 else
6583   echo "$ac_t""no" 1>&6
6584 fi
6585 done
6586
6587 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6588 do
6589 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6590 echo "configure:6591: checking for $ac_func" >&5
6591 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6592   echo $ac_n "(cached) $ac_c" 1>&6
6593 else
6594   cat > conftest.$ac_ext <<EOF
6595 #line 6596 "configure"
6596 #include "confdefs.h"
6597 /* System header to define __stub macros and hopefully few prototypes,
6598     which can conflict with char $ac_func(); below.  */
6599 #include <assert.h>
6600 /* Override any gcc2 internal prototype to avoid an error.  */
6601 /* We use char because int might match the return type of a gcc2
6602     builtin and then its argument prototype would still apply.  */
6603 char $ac_func();
6604
6605 int main() {
6606
6607 /* The GNU C library defines this for functions which it implements
6608     to always fail with ENOSYS.  Some functions are actually named
6609     something starting with __ and the normal name is an alias.  */
6610 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6611 choke me
6612 #else
6613 $ac_func();
6614 #endif
6615
6616 ; return 0; }
6617 EOF
6618 if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6619   rm -rf conftest*
6620   eval "ac_cv_func_$ac_func=yes"
6621 else
6622   echo "configure: failed program was:" >&5
6623   cat conftest.$ac_ext >&5
6624   rm -rf conftest*
6625   eval "ac_cv_func_$ac_func=no"
6626 fi
6627 rm -f conftest*
6628 fi
6629
6630 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6631   echo "$ac_t""yes" 1>&6
6632     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6633   cat >> confdefs.h <<EOF
6634 #define $ac_tr_func 1
6635 EOF
6636  
6637 else
6638   echo "$ac_t""no" 1>&6
6639 fi
6640 done
6641
6642 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6643 do
6644 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6645 echo "configure:6646: checking for $ac_func" >&5
6646 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6647   echo $ac_n "(cached) $ac_c" 1>&6
6648 else
6649   cat > conftest.$ac_ext <<EOF
6650 #line 6651 "configure"
6651 #include "confdefs.h"
6652 /* System header to define __stub macros and hopefully few prototypes,
6653     which can conflict with char $ac_func(); below.  */
6654 #include <assert.h>
6655 /* Override any gcc2 internal prototype to avoid an error.  */
6656 /* We use char because int might match the return type of a gcc2
6657     builtin and then its argument prototype would still apply.  */
6658 char $ac_func();
6659
6660 int main() {
6661
6662 /* The GNU C library defines this for functions which it implements
6663     to always fail with ENOSYS.  Some functions are actually named
6664     something starting with __ and the normal name is an alias.  */
6665 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6666 choke me
6667 #else
6668 $ac_func();
6669 #endif
6670
6671 ; return 0; }
6672 EOF
6673 if { (eval echo configure:6674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6674   rm -rf conftest*
6675   eval "ac_cv_func_$ac_func=yes"
6676 else
6677   echo "configure: failed program was:" >&5
6678   cat conftest.$ac_ext >&5
6679   rm -rf conftest*
6680   eval "ac_cv_func_$ac_func=no"
6681 fi
6682 rm -f conftest*
6683 fi
6684
6685 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6686   echo "$ac_t""yes" 1>&6
6687     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6688   cat >> confdefs.h <<EOF
6689 #define $ac_tr_func 1
6690 EOF
6691  
6692 else
6693   echo "$ac_t""no" 1>&6
6694 fi
6695 done
6696
6697 for ac_func in open64 _open64 __open64 creat64
6698 do
6699 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6700 echo "configure:6701: checking for $ac_func" >&5
6701 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 /* System header to define __stub macros and hopefully few prototypes,
6708     which can conflict with char $ac_func(); below.  */
6709 #include <assert.h>
6710 /* Override any gcc2 internal prototype to avoid an error.  */
6711 /* We use char because int might match the return type of a gcc2
6712     builtin and then its argument prototype would still apply.  */
6713 char $ac_func();
6714
6715 int main() {
6716
6717 /* The GNU C library defines this for functions which it implements
6718     to always fail with ENOSYS.  Some functions are actually named
6719     something starting with __ and the normal name is an alias.  */
6720 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6721 choke me
6722 #else
6723 $ac_func();
6724 #endif
6725
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_func_$ac_func=yes"
6731 else
6732   echo "configure: failed program was:" >&5
6733   cat conftest.$ac_ext >&5
6734   rm -rf conftest*
6735   eval "ac_cv_func_$ac_func=no"
6736 fi
6737 rm -f conftest*
6738 fi
6739
6740 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6741   echo "$ac_t""yes" 1>&6
6742     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6743   cat >> confdefs.h <<EOF
6744 #define $ac_tr_func 1
6745 EOF
6746  
6747 else
6748   echo "$ac_t""no" 1>&6
6749 fi
6750 done
6751
6752
6753 #
6754 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6755 #
6756
6757 if test x$ac_cv_func_stat64 = xno ; then
6758   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6759 echo "configure:6760: checking for stat64 in <sys/stat.h>" >&5
6760   cat > conftest.$ac_ext <<EOF
6761 #line 6762 "configure"
6762 #include "confdefs.h"
6763
6764 #if defined(HAVE_UNISTD_H)
6765 #include <unistd.h>
6766 #endif
6767 #include <sys/stat.h>
6768
6769 int main() {
6770 struct stat64 st64; exit(stat64(".",&st64));
6771 ; return 0; }
6772 EOF
6773 if { (eval echo configure:6774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6774   rm -rf conftest*
6775   ac_cv_func_stat64=yes
6776 else
6777   echo "configure: failed program was:" >&5
6778   cat conftest.$ac_ext >&5
6779 fi
6780 rm -f conftest*
6781   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6782   if test x$ac_cv_func_stat64 = xyes ; then
6783     cat >> confdefs.h <<\EOF
6784 #define HAVE_STAT64 1
6785 EOF
6786
6787   fi
6788 fi
6789
6790 if test x$ac_cv_func_lstat64 = xno ; then
6791   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6792 echo "configure:6793: checking for lstat64 in <sys/stat.h>" >&5
6793   cat > conftest.$ac_ext <<EOF
6794 #line 6795 "configure"
6795 #include "confdefs.h"
6796
6797 #if defined(HAVE_UNISTD_H)
6798 #include <unistd.h>
6799 #endif
6800 #include <sys/stat.h>
6801
6802 int main() {
6803 struct stat64 st64; exit(lstat64(".",&st64));
6804 ; return 0; }
6805 EOF
6806 if { (eval echo configure:6807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6807   rm -rf conftest*
6808   ac_cv_func_lstat64=yes
6809 else
6810   echo "configure: failed program was:" >&5
6811   cat conftest.$ac_ext >&5
6812 fi
6813 rm -f conftest*
6814   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6815   if test x$ac_cv_func_lstat64 = xyes ; then
6816     cat >> confdefs.h <<\EOF
6817 #define HAVE_LSTAT64 1
6818 EOF
6819
6820   fi
6821 fi
6822
6823 if test x$ac_cv_func_fstat64 = xno ; then
6824   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6825 echo "configure:6826: checking for fstat64 in <sys/stat.h>" >&5
6826   cat > conftest.$ac_ext <<EOF
6827 #line 6828 "configure"
6828 #include "confdefs.h"
6829
6830 #if defined(HAVE_UNISTD_H)
6831 #include <unistd.h>
6832 #endif
6833 #include <sys/stat.h>
6834
6835 int main() {
6836 struct stat64 st64; exit(fstat64(0,&st64));
6837 ; return 0; }
6838 EOF
6839 if { (eval echo configure:6840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6840   rm -rf conftest*
6841   ac_cv_func_fstat64=yes
6842 else
6843   echo "configure: failed program was:" >&5
6844   cat conftest.$ac_ext >&5
6845 fi
6846 rm -f conftest*
6847   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6848   if test x$ac_cv_func_fstat64 = xyes ; then
6849     cat >> confdefs.h <<\EOF
6850 #define HAVE_FSTAT64 1
6851 EOF
6852
6853   fi
6854 fi
6855
6856 #####################################
6857 # we might need the resolv library on some systems
6858 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6859 echo "configure:6860: checking for dn_expand in -lresolv" >&5
6860 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6861 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6862   echo $ac_n "(cached) $ac_c" 1>&6
6863 else
6864   ac_save_LIBS="$LIBS"
6865 LIBS="-lresolv  $LIBS"
6866 cat > conftest.$ac_ext <<EOF
6867 #line 6868 "configure"
6868 #include "confdefs.h"
6869 /* Override any gcc2 internal prototype to avoid an error.  */
6870 /* We use char because int might match the return type of a gcc2
6871     builtin and then its argument prototype would still apply.  */
6872 char dn_expand();
6873
6874 int main() {
6875 dn_expand()
6876 ; return 0; }
6877 EOF
6878 if { (eval echo configure:6879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6879   rm -rf conftest*
6880   eval "ac_cv_lib_$ac_lib_var=yes"
6881 else
6882   echo "configure: failed program was:" >&5
6883   cat conftest.$ac_ext >&5
6884   rm -rf conftest*
6885   eval "ac_cv_lib_$ac_lib_var=no"
6886 fi
6887 rm -f conftest*
6888 LIBS="$ac_save_LIBS"
6889
6890 fi
6891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6892   echo "$ac_t""yes" 1>&6
6893     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6894     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6895   cat >> confdefs.h <<EOF
6896 #define $ac_tr_lib 1
6897 EOF
6898
6899   LIBS="-lresolv $LIBS"
6900
6901 else
6902   echo "$ac_t""no" 1>&6
6903 fi
6904
6905
6906 #
6907 # Check for the functions putprpwnam, set_auth_parameters,
6908 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6909 # Needed for OSF1 and HPUX.
6910 #
6911
6912 case "$LIBS" in
6913   *-lsecurity*) for ac_func in putprpwnam
6914 do
6915 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6916 echo "configure:6917: checking for $ac_func" >&5
6917 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6918   echo $ac_n "(cached) $ac_c" 1>&6
6919 else
6920   cat > conftest.$ac_ext <<EOF
6921 #line 6922 "configure"
6922 #include "confdefs.h"
6923 /* System header to define __stub macros and hopefully few prototypes,
6924     which can conflict with char $ac_func(); below.  */
6925 #include <assert.h>
6926 /* Override any gcc2 internal prototype to avoid an error.  */
6927 /* We use char because int might match the return type of a gcc2
6928     builtin and then its argument prototype would still apply.  */
6929 char $ac_func();
6930
6931 int main() {
6932
6933 /* The GNU C library defines this for functions which it implements
6934     to always fail with ENOSYS.  Some functions are actually named
6935     something starting with __ and the normal name is an alias.  */
6936 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6937 choke me
6938 #else
6939 $ac_func();
6940 #endif
6941
6942 ; return 0; }
6943 EOF
6944 if { (eval echo configure:6945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6945   rm -rf conftest*
6946   eval "ac_cv_func_$ac_func=yes"
6947 else
6948   echo "configure: failed program was:" >&5
6949   cat conftest.$ac_ext >&5
6950   rm -rf conftest*
6951   eval "ac_cv_func_$ac_func=no"
6952 fi
6953 rm -f conftest*
6954 fi
6955
6956 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6957   echo "$ac_t""yes" 1>&6
6958     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6959   cat >> confdefs.h <<EOF
6960 #define $ac_tr_func 1
6961 EOF
6962  
6963 else
6964   echo "$ac_t""no" 1>&6
6965 fi
6966 done
6967  ;;
6968   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6969 echo "configure:6970: checking for putprpwnam in -lsecurity" >&5
6970 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6971 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6972   echo $ac_n "(cached) $ac_c" 1>&6
6973 else
6974   ac_save_LIBS="$LIBS"
6975 LIBS="-lsecurity  $LIBS"
6976 cat > conftest.$ac_ext <<EOF
6977 #line 6978 "configure"
6978 #include "confdefs.h"
6979 /* Override any gcc2 internal prototype to avoid an error.  */
6980 /* We use char because int might match the return type of a gcc2
6981     builtin and then its argument prototype would still apply.  */
6982 char putprpwnam();
6983
6984 int main() {
6985 putprpwnam()
6986 ; return 0; }
6987 EOF
6988 if { (eval echo configure:6989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6989   rm -rf conftest*
6990   eval "ac_cv_lib_$ac_lib_var=yes"
6991 else
6992   echo "configure: failed program was:" >&5
6993   cat conftest.$ac_ext >&5
6994   rm -rf conftest*
6995   eval "ac_cv_lib_$ac_lib_var=no"
6996 fi
6997 rm -f conftest*
6998 LIBS="$ac_save_LIBS"
6999
7000 fi
7001 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7002   echo "$ac_t""yes" 1>&6
7003     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7004     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7005   cat >> confdefs.h <<EOF
7006 #define $ac_tr_lib 1
7007 EOF
7008
7009   LIBS="-lsecurity $LIBS"
7010
7011 else
7012   echo "$ac_t""no" 1>&6
7013 fi
7014  
7015      for ac_func in putprpwnam
7016 do
7017 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7018 echo "configure:7019: checking for $ac_func" >&5
7019 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7020   echo $ac_n "(cached) $ac_c" 1>&6
7021 else
7022   cat > conftest.$ac_ext <<EOF
7023 #line 7024 "configure"
7024 #include "confdefs.h"
7025 /* System header to define __stub macros and hopefully few prototypes,
7026     which can conflict with char $ac_func(); below.  */
7027 #include <assert.h>
7028 /* Override any gcc2 internal prototype to avoid an error.  */
7029 /* We use char because int might match the return type of a gcc2
7030     builtin and then its argument prototype would still apply.  */
7031 char $ac_func();
7032
7033 int main() {
7034
7035 /* The GNU C library defines this for functions which it implements
7036     to always fail with ENOSYS.  Some functions are actually named
7037     something starting with __ and the normal name is an alias.  */
7038 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7039 choke me
7040 #else
7041 $ac_func();
7042 #endif
7043
7044 ; return 0; }
7045 EOF
7046 if { (eval echo configure:7047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7047   rm -rf conftest*
7048   eval "ac_cv_func_$ac_func=yes"
7049 else
7050   echo "configure: failed program was:" >&5
7051   cat conftest.$ac_ext >&5
7052   rm -rf conftest*
7053   eval "ac_cv_func_$ac_func=no"
7054 fi
7055 rm -f conftest*
7056 fi
7057
7058 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7059   echo "$ac_t""yes" 1>&6
7060     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7061   cat >> confdefs.h <<EOF
7062 #define $ac_tr_func 1
7063 EOF
7064  
7065 else
7066   echo "$ac_t""no" 1>&6
7067 fi
7068 done
7069
7070   ;;
7071   esac
7072
7073 case "$LIBS" in
7074   *-lsec*) for ac_func in putprpwnam
7075 do
7076 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7077 echo "configure:7078: checking for $ac_func" >&5
7078 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7079   echo $ac_n "(cached) $ac_c" 1>&6
7080 else
7081   cat > conftest.$ac_ext <<EOF
7082 #line 7083 "configure"
7083 #include "confdefs.h"
7084 /* System header to define __stub macros and hopefully few prototypes,
7085     which can conflict with char $ac_func(); below.  */
7086 #include <assert.h>
7087 /* Override any gcc2 internal prototype to avoid an error.  */
7088 /* We use char because int might match the return type of a gcc2
7089     builtin and then its argument prototype would still apply.  */
7090 char $ac_func();
7091
7092 int main() {
7093
7094 /* The GNU C library defines this for functions which it implements
7095     to always fail with ENOSYS.  Some functions are actually named
7096     something starting with __ and the normal name is an alias.  */
7097 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7098 choke me
7099 #else
7100 $ac_func();
7101 #endif
7102
7103 ; return 0; }
7104 EOF
7105 if { (eval echo configure:7106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7106   rm -rf conftest*
7107   eval "ac_cv_func_$ac_func=yes"
7108 else
7109   echo "configure: failed program was:" >&5
7110   cat conftest.$ac_ext >&5
7111   rm -rf conftest*
7112   eval "ac_cv_func_$ac_func=no"
7113 fi
7114 rm -f conftest*
7115 fi
7116
7117 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7118   echo "$ac_t""yes" 1>&6
7119     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7120   cat >> confdefs.h <<EOF
7121 #define $ac_tr_func 1
7122 EOF
7123  
7124 else
7125   echo "$ac_t""no" 1>&6
7126 fi
7127 done
7128  ;;
7129   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7130 echo "configure:7131: checking for putprpwnam in -lsec" >&5
7131 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7132 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7133   echo $ac_n "(cached) $ac_c" 1>&6
7134 else
7135   ac_save_LIBS="$LIBS"
7136 LIBS="-lsec  $LIBS"
7137 cat > conftest.$ac_ext <<EOF
7138 #line 7139 "configure"
7139 #include "confdefs.h"
7140 /* Override any gcc2 internal prototype to avoid an error.  */
7141 /* We use char because int might match the return type of a gcc2
7142     builtin and then its argument prototype would still apply.  */
7143 char putprpwnam();
7144
7145 int main() {
7146 putprpwnam()
7147 ; return 0; }
7148 EOF
7149 if { (eval echo configure:7150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7150   rm -rf conftest*
7151   eval "ac_cv_lib_$ac_lib_var=yes"
7152 else
7153   echo "configure: failed program was:" >&5
7154   cat conftest.$ac_ext >&5
7155   rm -rf conftest*
7156   eval "ac_cv_lib_$ac_lib_var=no"
7157 fi
7158 rm -f conftest*
7159 LIBS="$ac_save_LIBS"
7160
7161 fi
7162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7163   echo "$ac_t""yes" 1>&6
7164     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7165     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7166   cat >> confdefs.h <<EOF
7167 #define $ac_tr_lib 1
7168 EOF
7169
7170   LIBS="-lsec $LIBS"
7171
7172 else
7173   echo "$ac_t""no" 1>&6
7174 fi
7175  
7176      for ac_func in putprpwnam
7177 do
7178 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7179 echo "configure:7180: checking for $ac_func" >&5
7180 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7181   echo $ac_n "(cached) $ac_c" 1>&6
7182 else
7183   cat > conftest.$ac_ext <<EOF
7184 #line 7185 "configure"
7185 #include "confdefs.h"
7186 /* System header to define __stub macros and hopefully few prototypes,
7187     which can conflict with char $ac_func(); below.  */
7188 #include <assert.h>
7189 /* Override any gcc2 internal prototype to avoid an error.  */
7190 /* We use char because int might match the return type of a gcc2
7191     builtin and then its argument prototype would still apply.  */
7192 char $ac_func();
7193
7194 int main() {
7195
7196 /* The GNU C library defines this for functions which it implements
7197     to always fail with ENOSYS.  Some functions are actually named
7198     something starting with __ and the normal name is an alias.  */
7199 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7200 choke me
7201 #else
7202 $ac_func();
7203 #endif
7204
7205 ; return 0; }
7206 EOF
7207 if { (eval echo configure:7208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7208   rm -rf conftest*
7209   eval "ac_cv_func_$ac_func=yes"
7210 else
7211   echo "configure: failed program was:" >&5
7212   cat conftest.$ac_ext >&5
7213   rm -rf conftest*
7214   eval "ac_cv_func_$ac_func=no"
7215 fi
7216 rm -f conftest*
7217 fi
7218
7219 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7220   echo "$ac_t""yes" 1>&6
7221     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7222   cat >> confdefs.h <<EOF
7223 #define $ac_tr_func 1
7224 EOF
7225  
7226 else
7227   echo "$ac_t""no" 1>&6
7228 fi
7229 done
7230
7231   ;;
7232   esac
7233
7234
7235 case "$LIBS" in
7236   *-lsecurity*) for ac_func in set_auth_parameters
7237 do
7238 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7239 echo "configure:7240: checking for $ac_func" >&5
7240 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7241   echo $ac_n "(cached) $ac_c" 1>&6
7242 else
7243   cat > conftest.$ac_ext <<EOF
7244 #line 7245 "configure"
7245 #include "confdefs.h"
7246 /* System header to define __stub macros and hopefully few prototypes,
7247     which can conflict with char $ac_func(); below.  */
7248 #include <assert.h>
7249 /* Override any gcc2 internal prototype to avoid an error.  */
7250 /* We use char because int might match the return type of a gcc2
7251     builtin and then its argument prototype would still apply.  */
7252 char $ac_func();
7253
7254 int main() {
7255
7256 /* The GNU C library defines this for functions which it implements
7257     to always fail with ENOSYS.  Some functions are actually named
7258     something starting with __ and the normal name is an alias.  */
7259 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7260 choke me
7261 #else
7262 $ac_func();
7263 #endif
7264
7265 ; return 0; }
7266 EOF
7267 if { (eval echo configure:7268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7268   rm -rf conftest*
7269   eval "ac_cv_func_$ac_func=yes"
7270 else
7271   echo "configure: failed program was:" >&5
7272   cat conftest.$ac_ext >&5
7273   rm -rf conftest*
7274   eval "ac_cv_func_$ac_func=no"
7275 fi
7276 rm -f conftest*
7277 fi
7278
7279 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7280   echo "$ac_t""yes" 1>&6
7281     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7282   cat >> confdefs.h <<EOF
7283 #define $ac_tr_func 1
7284 EOF
7285  
7286 else
7287   echo "$ac_t""no" 1>&6
7288 fi
7289 done
7290  ;;
7291   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7292 echo "configure:7293: checking for set_auth_parameters in -lsecurity" >&5
7293 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7294 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7295   echo $ac_n "(cached) $ac_c" 1>&6
7296 else
7297   ac_save_LIBS="$LIBS"
7298 LIBS="-lsecurity  $LIBS"
7299 cat > conftest.$ac_ext <<EOF
7300 #line 7301 "configure"
7301 #include "confdefs.h"
7302 /* Override any gcc2 internal prototype to avoid an error.  */
7303 /* We use char because int might match the return type of a gcc2
7304     builtin and then its argument prototype would still apply.  */
7305 char set_auth_parameters();
7306
7307 int main() {
7308 set_auth_parameters()
7309 ; return 0; }
7310 EOF
7311 if { (eval echo configure:7312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7312   rm -rf conftest*
7313   eval "ac_cv_lib_$ac_lib_var=yes"
7314 else
7315   echo "configure: failed program was:" >&5
7316   cat conftest.$ac_ext >&5
7317   rm -rf conftest*
7318   eval "ac_cv_lib_$ac_lib_var=no"
7319 fi
7320 rm -f conftest*
7321 LIBS="$ac_save_LIBS"
7322
7323 fi
7324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7325   echo "$ac_t""yes" 1>&6
7326     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7327     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7328   cat >> confdefs.h <<EOF
7329 #define $ac_tr_lib 1
7330 EOF
7331
7332   LIBS="-lsecurity $LIBS"
7333
7334 else
7335   echo "$ac_t""no" 1>&6
7336 fi
7337  
7338      for ac_func in set_auth_parameters
7339 do
7340 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7341 echo "configure:7342: checking for $ac_func" >&5
7342 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7343   echo $ac_n "(cached) $ac_c" 1>&6
7344 else
7345   cat > conftest.$ac_ext <<EOF
7346 #line 7347 "configure"
7347 #include "confdefs.h"
7348 /* System header to define __stub macros and hopefully few prototypes,
7349     which can conflict with char $ac_func(); below.  */
7350 #include <assert.h>
7351 /* Override any gcc2 internal prototype to avoid an error.  */
7352 /* We use char because int might match the return type of a gcc2
7353     builtin and then its argument prototype would still apply.  */
7354 char $ac_func();
7355
7356 int main() {
7357
7358 /* The GNU C library defines this for functions which it implements
7359     to always fail with ENOSYS.  Some functions are actually named
7360     something starting with __ and the normal name is an alias.  */
7361 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7362 choke me
7363 #else
7364 $ac_func();
7365 #endif
7366
7367 ; return 0; }
7368 EOF
7369 if { (eval echo configure:7370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7370   rm -rf conftest*
7371   eval "ac_cv_func_$ac_func=yes"
7372 else
7373   echo "configure: failed program was:" >&5
7374   cat conftest.$ac_ext >&5
7375   rm -rf conftest*
7376   eval "ac_cv_func_$ac_func=no"
7377 fi
7378 rm -f conftest*
7379 fi
7380
7381 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7382   echo "$ac_t""yes" 1>&6
7383     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7384   cat >> confdefs.h <<EOF
7385 #define $ac_tr_func 1
7386 EOF
7387  
7388 else
7389   echo "$ac_t""no" 1>&6
7390 fi
7391 done
7392
7393   ;;
7394   esac
7395
7396 case "$LIBS" in
7397   *-lsec*) for ac_func in set_auth_parameters
7398 do
7399 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7400 echo "configure:7401: checking for $ac_func" >&5
7401 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7402   echo $ac_n "(cached) $ac_c" 1>&6
7403 else
7404   cat > conftest.$ac_ext <<EOF
7405 #line 7406 "configure"
7406 #include "confdefs.h"
7407 /* System header to define __stub macros and hopefully few prototypes,
7408     which can conflict with char $ac_func(); below.  */
7409 #include <assert.h>
7410 /* Override any gcc2 internal prototype to avoid an error.  */
7411 /* We use char because int might match the return type of a gcc2
7412     builtin and then its argument prototype would still apply.  */
7413 char $ac_func();
7414
7415 int main() {
7416
7417 /* The GNU C library defines this for functions which it implements
7418     to always fail with ENOSYS.  Some functions are actually named
7419     something starting with __ and the normal name is an alias.  */
7420 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7421 choke me
7422 #else
7423 $ac_func();
7424 #endif
7425
7426 ; return 0; }
7427 EOF
7428 if { (eval echo configure:7429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7429   rm -rf conftest*
7430   eval "ac_cv_func_$ac_func=yes"
7431 else
7432   echo "configure: failed program was:" >&5
7433   cat conftest.$ac_ext >&5
7434   rm -rf conftest*
7435   eval "ac_cv_func_$ac_func=no"
7436 fi
7437 rm -f conftest*
7438 fi
7439
7440 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7441   echo "$ac_t""yes" 1>&6
7442     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7443   cat >> confdefs.h <<EOF
7444 #define $ac_tr_func 1
7445 EOF
7446  
7447 else
7448   echo "$ac_t""no" 1>&6
7449 fi
7450 done
7451  ;;
7452   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7453 echo "configure:7454: checking for set_auth_parameters in -lsec" >&5
7454 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7455 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7456   echo $ac_n "(cached) $ac_c" 1>&6
7457 else
7458   ac_save_LIBS="$LIBS"
7459 LIBS="-lsec  $LIBS"
7460 cat > conftest.$ac_ext <<EOF
7461 #line 7462 "configure"
7462 #include "confdefs.h"
7463 /* Override any gcc2 internal prototype to avoid an error.  */
7464 /* We use char because int might match the return type of a gcc2
7465     builtin and then its argument prototype would still apply.  */
7466 char set_auth_parameters();
7467
7468 int main() {
7469 set_auth_parameters()
7470 ; return 0; }
7471 EOF
7472 if { (eval echo configure:7473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7473   rm -rf conftest*
7474   eval "ac_cv_lib_$ac_lib_var=yes"
7475 else
7476   echo "configure: failed program was:" >&5
7477   cat conftest.$ac_ext >&5
7478   rm -rf conftest*
7479   eval "ac_cv_lib_$ac_lib_var=no"
7480 fi
7481 rm -f conftest*
7482 LIBS="$ac_save_LIBS"
7483
7484 fi
7485 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7486   echo "$ac_t""yes" 1>&6
7487     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7488     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7489   cat >> confdefs.h <<EOF
7490 #define $ac_tr_lib 1
7491 EOF
7492
7493   LIBS="-lsec $LIBS"
7494
7495 else
7496   echo "$ac_t""no" 1>&6
7497 fi
7498  
7499      for ac_func in set_auth_parameters
7500 do
7501 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7502 echo "configure:7503: checking for $ac_func" >&5
7503 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7504   echo $ac_n "(cached) $ac_c" 1>&6
7505 else
7506   cat > conftest.$ac_ext <<EOF
7507 #line 7508 "configure"
7508 #include "confdefs.h"
7509 /* System header to define __stub macros and hopefully few prototypes,
7510     which can conflict with char $ac_func(); below.  */
7511 #include <assert.h>
7512 /* Override any gcc2 internal prototype to avoid an error.  */
7513 /* We use char because int might match the return type of a gcc2
7514     builtin and then its argument prototype would still apply.  */
7515 char $ac_func();
7516
7517 int main() {
7518
7519 /* The GNU C library defines this for functions which it implements
7520     to always fail with ENOSYS.  Some functions are actually named
7521     something starting with __ and the normal name is an alias.  */
7522 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7523 choke me
7524 #else
7525 $ac_func();
7526 #endif
7527
7528 ; return 0; }
7529 EOF
7530 if { (eval echo configure:7531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7531   rm -rf conftest*
7532   eval "ac_cv_func_$ac_func=yes"
7533 else
7534   echo "configure: failed program was:" >&5
7535   cat conftest.$ac_ext >&5
7536   rm -rf conftest*
7537   eval "ac_cv_func_$ac_func=no"
7538 fi
7539 rm -f conftest*
7540 fi
7541
7542 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7543   echo "$ac_t""yes" 1>&6
7544     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7545   cat >> confdefs.h <<EOF
7546 #define $ac_tr_func 1
7547 EOF
7548  
7549 else
7550   echo "$ac_t""no" 1>&6
7551 fi
7552 done
7553
7554   ;;
7555   esac
7556
7557
7558 # UnixWare 7.x has its getspnam in -lgen
7559 case "$LIBS" in
7560   *-lgen*) for ac_func in getspnam
7561 do
7562 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7563 echo "configure:7564: checking for $ac_func" >&5
7564 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7565   echo $ac_n "(cached) $ac_c" 1>&6
7566 else
7567   cat > conftest.$ac_ext <<EOF
7568 #line 7569 "configure"
7569 #include "confdefs.h"
7570 /* System header to define __stub macros and hopefully few prototypes,
7571     which can conflict with char $ac_func(); below.  */
7572 #include <assert.h>
7573 /* Override any gcc2 internal prototype to avoid an error.  */
7574 /* We use char because int might match the return type of a gcc2
7575     builtin and then its argument prototype would still apply.  */
7576 char $ac_func();
7577
7578 int main() {
7579
7580 /* The GNU C library defines this for functions which it implements
7581     to always fail with ENOSYS.  Some functions are actually named
7582     something starting with __ and the normal name is an alias.  */
7583 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7584 choke me
7585 #else
7586 $ac_func();
7587 #endif
7588
7589 ; return 0; }
7590 EOF
7591 if { (eval echo configure:7592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7592   rm -rf conftest*
7593   eval "ac_cv_func_$ac_func=yes"
7594 else
7595   echo "configure: failed program was:" >&5
7596   cat conftest.$ac_ext >&5
7597   rm -rf conftest*
7598   eval "ac_cv_func_$ac_func=no"
7599 fi
7600 rm -f conftest*
7601 fi
7602
7603 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7604   echo "$ac_t""yes" 1>&6
7605     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7606   cat >> confdefs.h <<EOF
7607 #define $ac_tr_func 1
7608 EOF
7609  
7610 else
7611   echo "$ac_t""no" 1>&6
7612 fi
7613 done
7614  ;;
7615   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7616 echo "configure:7617: checking for getspnam in -lgen" >&5
7617 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7618 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7619   echo $ac_n "(cached) $ac_c" 1>&6
7620 else
7621   ac_save_LIBS="$LIBS"
7622 LIBS="-lgen  $LIBS"
7623 cat > conftest.$ac_ext <<EOF
7624 #line 7625 "configure"
7625 #include "confdefs.h"
7626 /* Override any gcc2 internal prototype to avoid an error.  */
7627 /* We use char because int might match the return type of a gcc2
7628     builtin and then its argument prototype would still apply.  */
7629 char getspnam();
7630
7631 int main() {
7632 getspnam()
7633 ; return 0; }
7634 EOF
7635 if { (eval echo configure:7636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7636   rm -rf conftest*
7637   eval "ac_cv_lib_$ac_lib_var=yes"
7638 else
7639   echo "configure: failed program was:" >&5
7640   cat conftest.$ac_ext >&5
7641   rm -rf conftest*
7642   eval "ac_cv_lib_$ac_lib_var=no"
7643 fi
7644 rm -f conftest*
7645 LIBS="$ac_save_LIBS"
7646
7647 fi
7648 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7649   echo "$ac_t""yes" 1>&6
7650     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7651     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7652   cat >> confdefs.h <<EOF
7653 #define $ac_tr_lib 1
7654 EOF
7655
7656   LIBS="-lgen $LIBS"
7657
7658 else
7659   echo "$ac_t""no" 1>&6
7660 fi
7661  
7662      for ac_func in getspnam
7663 do
7664 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7665 echo "configure:7666: checking for $ac_func" >&5
7666 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7667   echo $ac_n "(cached) $ac_c" 1>&6
7668 else
7669   cat > conftest.$ac_ext <<EOF
7670 #line 7671 "configure"
7671 #include "confdefs.h"
7672 /* System header to define __stub macros and hopefully few prototypes,
7673     which can conflict with char $ac_func(); below.  */
7674 #include <assert.h>
7675 /* Override any gcc2 internal prototype to avoid an error.  */
7676 /* We use char because int might match the return type of a gcc2
7677     builtin and then its argument prototype would still apply.  */
7678 char $ac_func();
7679
7680 int main() {
7681
7682 /* The GNU C library defines this for functions which it implements
7683     to always fail with ENOSYS.  Some functions are actually named
7684     something starting with __ and the normal name is an alias.  */
7685 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7686 choke me
7687 #else
7688 $ac_func();
7689 #endif
7690
7691 ; return 0; }
7692 EOF
7693 if { (eval echo configure:7694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7694   rm -rf conftest*
7695   eval "ac_cv_func_$ac_func=yes"
7696 else
7697   echo "configure: failed program was:" >&5
7698   cat conftest.$ac_ext >&5
7699   rm -rf conftest*
7700   eval "ac_cv_func_$ac_func=no"
7701 fi
7702 rm -f conftest*
7703 fi
7704
7705 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7706   echo "$ac_t""yes" 1>&6
7707     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7708   cat >> confdefs.h <<EOF
7709 #define $ac_tr_func 1
7710 EOF
7711  
7712 else
7713   echo "$ac_t""no" 1>&6
7714 fi
7715 done
7716
7717   ;;
7718   esac
7719
7720
7721 case "$LIBS" in
7722   *-lsecurity*) for ac_func in getspnam
7723 do
7724 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7725 echo "configure:7726: checking for $ac_func" >&5
7726 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7727   echo $ac_n "(cached) $ac_c" 1>&6
7728 else
7729   cat > conftest.$ac_ext <<EOF
7730 #line 7731 "configure"
7731 #include "confdefs.h"
7732 /* System header to define __stub macros and hopefully few prototypes,
7733     which can conflict with char $ac_func(); below.  */
7734 #include <assert.h>
7735 /* Override any gcc2 internal prototype to avoid an error.  */
7736 /* We use char because int might match the return type of a gcc2
7737     builtin and then its argument prototype would still apply.  */
7738 char $ac_func();
7739
7740 int main() {
7741
7742 /* The GNU C library defines this for functions which it implements
7743     to always fail with ENOSYS.  Some functions are actually named
7744     something starting with __ and the normal name is an alias.  */
7745 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7746 choke me
7747 #else
7748 $ac_func();
7749 #endif
7750
7751 ; return 0; }
7752 EOF
7753 if { (eval echo configure:7754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7754   rm -rf conftest*
7755   eval "ac_cv_func_$ac_func=yes"
7756 else
7757   echo "configure: failed program was:" >&5
7758   cat conftest.$ac_ext >&5
7759   rm -rf conftest*
7760   eval "ac_cv_func_$ac_func=no"
7761 fi
7762 rm -f conftest*
7763 fi
7764
7765 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7766   echo "$ac_t""yes" 1>&6
7767     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7768   cat >> confdefs.h <<EOF
7769 #define $ac_tr_func 1
7770 EOF
7771  
7772 else
7773   echo "$ac_t""no" 1>&6
7774 fi
7775 done
7776  ;;
7777   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7778 echo "configure:7779: checking for getspnam in -lsecurity" >&5
7779 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7780 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7781   echo $ac_n "(cached) $ac_c" 1>&6
7782 else
7783   ac_save_LIBS="$LIBS"
7784 LIBS="-lsecurity  $LIBS"
7785 cat > conftest.$ac_ext <<EOF
7786 #line 7787 "configure"
7787 #include "confdefs.h"
7788 /* Override any gcc2 internal prototype to avoid an error.  */
7789 /* We use char because int might match the return type of a gcc2
7790     builtin and then its argument prototype would still apply.  */
7791 char getspnam();
7792
7793 int main() {
7794 getspnam()
7795 ; return 0; }
7796 EOF
7797 if { (eval echo configure:7798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7798   rm -rf conftest*
7799   eval "ac_cv_lib_$ac_lib_var=yes"
7800 else
7801   echo "configure: failed program was:" >&5
7802   cat conftest.$ac_ext >&5
7803   rm -rf conftest*
7804   eval "ac_cv_lib_$ac_lib_var=no"
7805 fi
7806 rm -f conftest*
7807 LIBS="$ac_save_LIBS"
7808
7809 fi
7810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7811   echo "$ac_t""yes" 1>&6
7812     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7813     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7814   cat >> confdefs.h <<EOF
7815 #define $ac_tr_lib 1
7816 EOF
7817
7818   LIBS="-lsecurity $LIBS"
7819
7820 else
7821   echo "$ac_t""no" 1>&6
7822 fi
7823  
7824      for ac_func in getspnam
7825 do
7826 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7827 echo "configure:7828: checking for $ac_func" >&5
7828 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7829   echo $ac_n "(cached) $ac_c" 1>&6
7830 else
7831   cat > conftest.$ac_ext <<EOF
7832 #line 7833 "configure"
7833 #include "confdefs.h"
7834 /* System header to define __stub macros and hopefully few prototypes,
7835     which can conflict with char $ac_func(); below.  */
7836 #include <assert.h>
7837 /* Override any gcc2 internal prototype to avoid an error.  */
7838 /* We use char because int might match the return type of a gcc2
7839     builtin and then its argument prototype would still apply.  */
7840 char $ac_func();
7841
7842 int main() {
7843
7844 /* The GNU C library defines this for functions which it implements
7845     to always fail with ENOSYS.  Some functions are actually named
7846     something starting with __ and the normal name is an alias.  */
7847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7848 choke me
7849 #else
7850 $ac_func();
7851 #endif
7852
7853 ; return 0; }
7854 EOF
7855 if { (eval echo configure:7856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7856   rm -rf conftest*
7857   eval "ac_cv_func_$ac_func=yes"
7858 else
7859   echo "configure: failed program was:" >&5
7860   cat conftest.$ac_ext >&5
7861   rm -rf conftest*
7862   eval "ac_cv_func_$ac_func=no"
7863 fi
7864 rm -f conftest*
7865 fi
7866
7867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7868   echo "$ac_t""yes" 1>&6
7869     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7870   cat >> confdefs.h <<EOF
7871 #define $ac_tr_func 1
7872 EOF
7873  
7874 else
7875   echo "$ac_t""no" 1>&6
7876 fi
7877 done
7878
7879   ;;
7880   esac
7881
7882 case "$LIBS" in
7883   *-lsec*) for ac_func in getspnam
7884 do
7885 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7886 echo "configure:7887: checking for $ac_func" >&5
7887 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7888   echo $ac_n "(cached) $ac_c" 1>&6
7889 else
7890   cat > conftest.$ac_ext <<EOF
7891 #line 7892 "configure"
7892 #include "confdefs.h"
7893 /* System header to define __stub macros and hopefully few prototypes,
7894     which can conflict with char $ac_func(); below.  */
7895 #include <assert.h>
7896 /* Override any gcc2 internal prototype to avoid an error.  */
7897 /* We use char because int might match the return type of a gcc2
7898     builtin and then its argument prototype would still apply.  */
7899 char $ac_func();
7900
7901 int main() {
7902
7903 /* The GNU C library defines this for functions which it implements
7904     to always fail with ENOSYS.  Some functions are actually named
7905     something starting with __ and the normal name is an alias.  */
7906 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7907 choke me
7908 #else
7909 $ac_func();
7910 #endif
7911
7912 ; return 0; }
7913 EOF
7914 if { (eval echo configure:7915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7915   rm -rf conftest*
7916   eval "ac_cv_func_$ac_func=yes"
7917 else
7918   echo "configure: failed program was:" >&5
7919   cat conftest.$ac_ext >&5
7920   rm -rf conftest*
7921   eval "ac_cv_func_$ac_func=no"
7922 fi
7923 rm -f conftest*
7924 fi
7925
7926 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7927   echo "$ac_t""yes" 1>&6
7928     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7929   cat >> confdefs.h <<EOF
7930 #define $ac_tr_func 1
7931 EOF
7932  
7933 else
7934   echo "$ac_t""no" 1>&6
7935 fi
7936 done
7937  ;;
7938   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7939 echo "configure:7940: checking for getspnam in -lsec" >&5
7940 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7941 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7942   echo $ac_n "(cached) $ac_c" 1>&6
7943 else
7944   ac_save_LIBS="$LIBS"
7945 LIBS="-lsec  $LIBS"
7946 cat > conftest.$ac_ext <<EOF
7947 #line 7948 "configure"
7948 #include "confdefs.h"
7949 /* Override any gcc2 internal prototype to avoid an error.  */
7950 /* We use char because int might match the return type of a gcc2
7951     builtin and then its argument prototype would still apply.  */
7952 char getspnam();
7953
7954 int main() {
7955 getspnam()
7956 ; return 0; }
7957 EOF
7958 if { (eval echo configure:7959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7959   rm -rf conftest*
7960   eval "ac_cv_lib_$ac_lib_var=yes"
7961 else
7962   echo "configure: failed program was:" >&5
7963   cat conftest.$ac_ext >&5
7964   rm -rf conftest*
7965   eval "ac_cv_lib_$ac_lib_var=no"
7966 fi
7967 rm -f conftest*
7968 LIBS="$ac_save_LIBS"
7969
7970 fi
7971 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7972   echo "$ac_t""yes" 1>&6
7973     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7974     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7975   cat >> confdefs.h <<EOF
7976 #define $ac_tr_lib 1
7977 EOF
7978
7979   LIBS="-lsec $LIBS"
7980
7981 else
7982   echo "$ac_t""no" 1>&6
7983 fi
7984  
7985      for ac_func in getspnam
7986 do
7987 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7988 echo "configure:7989: checking for $ac_func" >&5
7989 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7990   echo $ac_n "(cached) $ac_c" 1>&6
7991 else
7992   cat > conftest.$ac_ext <<EOF
7993 #line 7994 "configure"
7994 #include "confdefs.h"
7995 /* System header to define __stub macros and hopefully few prototypes,
7996     which can conflict with char $ac_func(); below.  */
7997 #include <assert.h>
7998 /* Override any gcc2 internal prototype to avoid an error.  */
7999 /* We use char because int might match the return type of a gcc2
8000     builtin and then its argument prototype would still apply.  */
8001 char $ac_func();
8002
8003 int main() {
8004
8005 /* The GNU C library defines this for functions which it implements
8006     to always fail with ENOSYS.  Some functions are actually named
8007     something starting with __ and the normal name is an alias.  */
8008 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8009 choke me
8010 #else
8011 $ac_func();
8012 #endif
8013
8014 ; return 0; }
8015 EOF
8016 if { (eval echo configure:8017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8017   rm -rf conftest*
8018   eval "ac_cv_func_$ac_func=yes"
8019 else
8020   echo "configure: failed program was:" >&5
8021   cat conftest.$ac_ext >&5
8022   rm -rf conftest*
8023   eval "ac_cv_func_$ac_func=no"
8024 fi
8025 rm -f conftest*
8026 fi
8027
8028 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8029   echo "$ac_t""yes" 1>&6
8030     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8031   cat >> confdefs.h <<EOF
8032 #define $ac_tr_func 1
8033 EOF
8034  
8035 else
8036   echo "$ac_t""no" 1>&6
8037 fi
8038 done
8039
8040   ;;
8041   esac
8042
8043
8044 case "$LIBS" in
8045   *-lsecurity*) for ac_func in bigcrypt
8046 do
8047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8048 echo "configure:8049: checking for $ac_func" >&5
8049 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8050   echo $ac_n "(cached) $ac_c" 1>&6
8051 else
8052   cat > conftest.$ac_ext <<EOF
8053 #line 8054 "configure"
8054 #include "confdefs.h"
8055 /* System header to define __stub macros and hopefully few prototypes,
8056     which can conflict with char $ac_func(); below.  */
8057 #include <assert.h>
8058 /* Override any gcc2 internal prototype to avoid an error.  */
8059 /* We use char because int might match the return type of a gcc2
8060     builtin and then its argument prototype would still apply.  */
8061 char $ac_func();
8062
8063 int main() {
8064
8065 /* The GNU C library defines this for functions which it implements
8066     to always fail with ENOSYS.  Some functions are actually named
8067     something starting with __ and the normal name is an alias.  */
8068 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8069 choke me
8070 #else
8071 $ac_func();
8072 #endif
8073
8074 ; return 0; }
8075 EOF
8076 if { (eval echo configure:8077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8077   rm -rf conftest*
8078   eval "ac_cv_func_$ac_func=yes"
8079 else
8080   echo "configure: failed program was:" >&5
8081   cat conftest.$ac_ext >&5
8082   rm -rf conftest*
8083   eval "ac_cv_func_$ac_func=no"
8084 fi
8085 rm -f conftest*
8086 fi
8087
8088 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8089   echo "$ac_t""yes" 1>&6
8090     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8091   cat >> confdefs.h <<EOF
8092 #define $ac_tr_func 1
8093 EOF
8094  
8095 else
8096   echo "$ac_t""no" 1>&6
8097 fi
8098 done
8099  ;;
8100   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8101 echo "configure:8102: checking for bigcrypt in -lsecurity" >&5
8102 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8103 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8104   echo $ac_n "(cached) $ac_c" 1>&6
8105 else
8106   ac_save_LIBS="$LIBS"
8107 LIBS="-lsecurity  $LIBS"
8108 cat > conftest.$ac_ext <<EOF
8109 #line 8110 "configure"
8110 #include "confdefs.h"
8111 /* Override any gcc2 internal prototype to avoid an error.  */
8112 /* We use char because int might match the return type of a gcc2
8113     builtin and then its argument prototype would still apply.  */
8114 char bigcrypt();
8115
8116 int main() {
8117 bigcrypt()
8118 ; return 0; }
8119 EOF
8120 if { (eval echo configure:8121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8121   rm -rf conftest*
8122   eval "ac_cv_lib_$ac_lib_var=yes"
8123 else
8124   echo "configure: failed program was:" >&5
8125   cat conftest.$ac_ext >&5
8126   rm -rf conftest*
8127   eval "ac_cv_lib_$ac_lib_var=no"
8128 fi
8129 rm -f conftest*
8130 LIBS="$ac_save_LIBS"
8131
8132 fi
8133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8134   echo "$ac_t""yes" 1>&6
8135     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8136     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8137   cat >> confdefs.h <<EOF
8138 #define $ac_tr_lib 1
8139 EOF
8140
8141   LIBS="-lsecurity $LIBS"
8142
8143 else
8144   echo "$ac_t""no" 1>&6
8145 fi
8146  
8147      for ac_func in bigcrypt
8148 do
8149 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8150 echo "configure:8151: checking for $ac_func" >&5
8151 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8152   echo $ac_n "(cached) $ac_c" 1>&6
8153 else
8154   cat > conftest.$ac_ext <<EOF
8155 #line 8156 "configure"
8156 #include "confdefs.h"
8157 /* System header to define __stub macros and hopefully few prototypes,
8158     which can conflict with char $ac_func(); below.  */
8159 #include <assert.h>
8160 /* Override any gcc2 internal prototype to avoid an error.  */
8161 /* We use char because int might match the return type of a gcc2
8162     builtin and then its argument prototype would still apply.  */
8163 char $ac_func();
8164
8165 int main() {
8166
8167 /* The GNU C library defines this for functions which it implements
8168     to always fail with ENOSYS.  Some functions are actually named
8169     something starting with __ and the normal name is an alias.  */
8170 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8171 choke me
8172 #else
8173 $ac_func();
8174 #endif
8175
8176 ; return 0; }
8177 EOF
8178 if { (eval echo configure:8179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8179   rm -rf conftest*
8180   eval "ac_cv_func_$ac_func=yes"
8181 else
8182   echo "configure: failed program was:" >&5
8183   cat conftest.$ac_ext >&5
8184   rm -rf conftest*
8185   eval "ac_cv_func_$ac_func=no"
8186 fi
8187 rm -f conftest*
8188 fi
8189
8190 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8191   echo "$ac_t""yes" 1>&6
8192     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8193   cat >> confdefs.h <<EOF
8194 #define $ac_tr_func 1
8195 EOF
8196  
8197 else
8198   echo "$ac_t""no" 1>&6
8199 fi
8200 done
8201
8202   ;;
8203   esac
8204
8205 case "$LIBS" in
8206   *-lsec*) for ac_func in bigcrypt
8207 do
8208 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8209 echo "configure:8210: checking for $ac_func" >&5
8210 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8211   echo $ac_n "(cached) $ac_c" 1>&6
8212 else
8213   cat > conftest.$ac_ext <<EOF
8214 #line 8215 "configure"
8215 #include "confdefs.h"
8216 /* System header to define __stub macros and hopefully few prototypes,
8217     which can conflict with char $ac_func(); below.  */
8218 #include <assert.h>
8219 /* Override any gcc2 internal prototype to avoid an error.  */
8220 /* We use char because int might match the return type of a gcc2
8221     builtin and then its argument prototype would still apply.  */
8222 char $ac_func();
8223
8224 int main() {
8225
8226 /* The GNU C library defines this for functions which it implements
8227     to always fail with ENOSYS.  Some functions are actually named
8228     something starting with __ and the normal name is an alias.  */
8229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8230 choke me
8231 #else
8232 $ac_func();
8233 #endif
8234
8235 ; return 0; }
8236 EOF
8237 if { (eval echo configure:8238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8238   rm -rf conftest*
8239   eval "ac_cv_func_$ac_func=yes"
8240 else
8241   echo "configure: failed program was:" >&5
8242   cat conftest.$ac_ext >&5
8243   rm -rf conftest*
8244   eval "ac_cv_func_$ac_func=no"
8245 fi
8246 rm -f conftest*
8247 fi
8248
8249 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8250   echo "$ac_t""yes" 1>&6
8251     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8252   cat >> confdefs.h <<EOF
8253 #define $ac_tr_func 1
8254 EOF
8255  
8256 else
8257   echo "$ac_t""no" 1>&6
8258 fi
8259 done
8260  ;;
8261   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8262 echo "configure:8263: checking for bigcrypt in -lsec" >&5
8263 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8264 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8265   echo $ac_n "(cached) $ac_c" 1>&6
8266 else
8267   ac_save_LIBS="$LIBS"
8268 LIBS="-lsec  $LIBS"
8269 cat > conftest.$ac_ext <<EOF
8270 #line 8271 "configure"
8271 #include "confdefs.h"
8272 /* Override any gcc2 internal prototype to avoid an error.  */
8273 /* We use char because int might match the return type of a gcc2
8274     builtin and then its argument prototype would still apply.  */
8275 char bigcrypt();
8276
8277 int main() {
8278 bigcrypt()
8279 ; return 0; }
8280 EOF
8281 if { (eval echo configure:8282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8282   rm -rf conftest*
8283   eval "ac_cv_lib_$ac_lib_var=yes"
8284 else
8285   echo "configure: failed program was:" >&5
8286   cat conftest.$ac_ext >&5
8287   rm -rf conftest*
8288   eval "ac_cv_lib_$ac_lib_var=no"
8289 fi
8290 rm -f conftest*
8291 LIBS="$ac_save_LIBS"
8292
8293 fi
8294 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8295   echo "$ac_t""yes" 1>&6
8296     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8297     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8298   cat >> confdefs.h <<EOF
8299 #define $ac_tr_lib 1
8300 EOF
8301
8302   LIBS="-lsec $LIBS"
8303
8304 else
8305   echo "$ac_t""no" 1>&6
8306 fi
8307  
8308      for ac_func in bigcrypt
8309 do
8310 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8311 echo "configure:8312: checking for $ac_func" >&5
8312 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8313   echo $ac_n "(cached) $ac_c" 1>&6
8314 else
8315   cat > conftest.$ac_ext <<EOF
8316 #line 8317 "configure"
8317 #include "confdefs.h"
8318 /* System header to define __stub macros and hopefully few prototypes,
8319     which can conflict with char $ac_func(); below.  */
8320 #include <assert.h>
8321 /* Override any gcc2 internal prototype to avoid an error.  */
8322 /* We use char because int might match the return type of a gcc2
8323     builtin and then its argument prototype would still apply.  */
8324 char $ac_func();
8325
8326 int main() {
8327
8328 /* The GNU C library defines this for functions which it implements
8329     to always fail with ENOSYS.  Some functions are actually named
8330     something starting with __ and the normal name is an alias.  */
8331 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8332 choke me
8333 #else
8334 $ac_func();
8335 #endif
8336
8337 ; return 0; }
8338 EOF
8339 if { (eval echo configure:8340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8340   rm -rf conftest*
8341   eval "ac_cv_func_$ac_func=yes"
8342 else
8343   echo "configure: failed program was:" >&5
8344   cat conftest.$ac_ext >&5
8345   rm -rf conftest*
8346   eval "ac_cv_func_$ac_func=no"
8347 fi
8348 rm -f conftest*
8349 fi
8350
8351 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8352   echo "$ac_t""yes" 1>&6
8353     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8354   cat >> confdefs.h <<EOF
8355 #define $ac_tr_func 1
8356 EOF
8357  
8358 else
8359   echo "$ac_t""no" 1>&6
8360 fi
8361 done
8362
8363   ;;
8364   esac
8365
8366
8367 case "$LIBS" in
8368   *-lsecurity*) for ac_func in getprpwnam
8369 do
8370 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8371 echo "configure:8372: checking for $ac_func" >&5
8372 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8373   echo $ac_n "(cached) $ac_c" 1>&6
8374 else
8375   cat > conftest.$ac_ext <<EOF
8376 #line 8377 "configure"
8377 #include "confdefs.h"
8378 /* System header to define __stub macros and hopefully few prototypes,
8379     which can conflict with char $ac_func(); below.  */
8380 #include <assert.h>
8381 /* Override any gcc2 internal prototype to avoid an error.  */
8382 /* We use char because int might match the return type of a gcc2
8383     builtin and then its argument prototype would still apply.  */
8384 char $ac_func();
8385
8386 int main() {
8387
8388 /* The GNU C library defines this for functions which it implements
8389     to always fail with ENOSYS.  Some functions are actually named
8390     something starting with __ and the normal name is an alias.  */
8391 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8392 choke me
8393 #else
8394 $ac_func();
8395 #endif
8396
8397 ; return 0; }
8398 EOF
8399 if { (eval echo configure:8400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8400   rm -rf conftest*
8401   eval "ac_cv_func_$ac_func=yes"
8402 else
8403   echo "configure: failed program was:" >&5
8404   cat conftest.$ac_ext >&5
8405   rm -rf conftest*
8406   eval "ac_cv_func_$ac_func=no"
8407 fi
8408 rm -f conftest*
8409 fi
8410
8411 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8412   echo "$ac_t""yes" 1>&6
8413     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8414   cat >> confdefs.h <<EOF
8415 #define $ac_tr_func 1
8416 EOF
8417  
8418 else
8419   echo "$ac_t""no" 1>&6
8420 fi
8421 done
8422  ;;
8423   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8424 echo "configure:8425: checking for getprpwnam in -lsecurity" >&5
8425 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8426 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8427   echo $ac_n "(cached) $ac_c" 1>&6
8428 else
8429   ac_save_LIBS="$LIBS"
8430 LIBS="-lsecurity  $LIBS"
8431 cat > conftest.$ac_ext <<EOF
8432 #line 8433 "configure"
8433 #include "confdefs.h"
8434 /* Override any gcc2 internal prototype to avoid an error.  */
8435 /* We use char because int might match the return type of a gcc2
8436     builtin and then its argument prototype would still apply.  */
8437 char getprpwnam();
8438
8439 int main() {
8440 getprpwnam()
8441 ; return 0; }
8442 EOF
8443 if { (eval echo configure:8444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8444   rm -rf conftest*
8445   eval "ac_cv_lib_$ac_lib_var=yes"
8446 else
8447   echo "configure: failed program was:" >&5
8448   cat conftest.$ac_ext >&5
8449   rm -rf conftest*
8450   eval "ac_cv_lib_$ac_lib_var=no"
8451 fi
8452 rm -f conftest*
8453 LIBS="$ac_save_LIBS"
8454
8455 fi
8456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8457   echo "$ac_t""yes" 1>&6
8458     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8459     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8460   cat >> confdefs.h <<EOF
8461 #define $ac_tr_lib 1
8462 EOF
8463
8464   LIBS="-lsecurity $LIBS"
8465
8466 else
8467   echo "$ac_t""no" 1>&6
8468 fi
8469  
8470      for ac_func in getprpwnam
8471 do
8472 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8473 echo "configure:8474: checking for $ac_func" >&5
8474 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8475   echo $ac_n "(cached) $ac_c" 1>&6
8476 else
8477   cat > conftest.$ac_ext <<EOF
8478 #line 8479 "configure"
8479 #include "confdefs.h"
8480 /* System header to define __stub macros and hopefully few prototypes,
8481     which can conflict with char $ac_func(); below.  */
8482 #include <assert.h>
8483 /* Override any gcc2 internal prototype to avoid an error.  */
8484 /* We use char because int might match the return type of a gcc2
8485     builtin and then its argument prototype would still apply.  */
8486 char $ac_func();
8487
8488 int main() {
8489
8490 /* The GNU C library defines this for functions which it implements
8491     to always fail with ENOSYS.  Some functions are actually named
8492     something starting with __ and the normal name is an alias.  */
8493 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8494 choke me
8495 #else
8496 $ac_func();
8497 #endif
8498
8499 ; return 0; }
8500 EOF
8501 if { (eval echo configure:8502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8502   rm -rf conftest*
8503   eval "ac_cv_func_$ac_func=yes"
8504 else
8505   echo "configure: failed program was:" >&5
8506   cat conftest.$ac_ext >&5
8507   rm -rf conftest*
8508   eval "ac_cv_func_$ac_func=no"
8509 fi
8510 rm -f conftest*
8511 fi
8512
8513 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8514   echo "$ac_t""yes" 1>&6
8515     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8516   cat >> confdefs.h <<EOF
8517 #define $ac_tr_func 1
8518 EOF
8519  
8520 else
8521   echo "$ac_t""no" 1>&6
8522 fi
8523 done
8524
8525   ;;
8526   esac
8527
8528 case "$LIBS" in
8529   *-lsec*) for ac_func in getprpwnam
8530 do
8531 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8532 echo "configure:8533: checking for $ac_func" >&5
8533 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8534   echo $ac_n "(cached) $ac_c" 1>&6
8535 else
8536   cat > conftest.$ac_ext <<EOF
8537 #line 8538 "configure"
8538 #include "confdefs.h"
8539 /* System header to define __stub macros and hopefully few prototypes,
8540     which can conflict with char $ac_func(); below.  */
8541 #include <assert.h>
8542 /* Override any gcc2 internal prototype to avoid an error.  */
8543 /* We use char because int might match the return type of a gcc2
8544     builtin and then its argument prototype would still apply.  */
8545 char $ac_func();
8546
8547 int main() {
8548
8549 /* The GNU C library defines this for functions which it implements
8550     to always fail with ENOSYS.  Some functions are actually named
8551     something starting with __ and the normal name is an alias.  */
8552 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8553 choke me
8554 #else
8555 $ac_func();
8556 #endif
8557
8558 ; return 0; }
8559 EOF
8560 if { (eval echo configure:8561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8561   rm -rf conftest*
8562   eval "ac_cv_func_$ac_func=yes"
8563 else
8564   echo "configure: failed program was:" >&5
8565   cat conftest.$ac_ext >&5
8566   rm -rf conftest*
8567   eval "ac_cv_func_$ac_func=no"
8568 fi
8569 rm -f conftest*
8570 fi
8571
8572 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8573   echo "$ac_t""yes" 1>&6
8574     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8575   cat >> confdefs.h <<EOF
8576 #define $ac_tr_func 1
8577 EOF
8578  
8579 else
8580   echo "$ac_t""no" 1>&6
8581 fi
8582 done
8583  ;;
8584   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8585 echo "configure:8586: checking for getprpwnam in -lsec" >&5
8586 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8587 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8588   echo $ac_n "(cached) $ac_c" 1>&6
8589 else
8590   ac_save_LIBS="$LIBS"
8591 LIBS="-lsec  $LIBS"
8592 cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 /* Override any gcc2 internal prototype to avoid an error.  */
8596 /* We use char because int might match the return type of a gcc2
8597     builtin and then its argument prototype would still apply.  */
8598 char getprpwnam();
8599
8600 int main() {
8601 getprpwnam()
8602 ; return 0; }
8603 EOF
8604 if { (eval echo configure:8605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8605   rm -rf conftest*
8606   eval "ac_cv_lib_$ac_lib_var=yes"
8607 else
8608   echo "configure: failed program was:" >&5
8609   cat conftest.$ac_ext >&5
8610   rm -rf conftest*
8611   eval "ac_cv_lib_$ac_lib_var=no"
8612 fi
8613 rm -f conftest*
8614 LIBS="$ac_save_LIBS"
8615
8616 fi
8617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8618   echo "$ac_t""yes" 1>&6
8619     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8620     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8621   cat >> confdefs.h <<EOF
8622 #define $ac_tr_lib 1
8623 EOF
8624
8625   LIBS="-lsec $LIBS"
8626
8627 else
8628   echo "$ac_t""no" 1>&6
8629 fi
8630  
8631      for ac_func in getprpwnam
8632 do
8633 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8634 echo "configure:8635: checking for $ac_func" >&5
8635 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8636   echo $ac_n "(cached) $ac_c" 1>&6
8637 else
8638   cat > conftest.$ac_ext <<EOF
8639 #line 8640 "configure"
8640 #include "confdefs.h"
8641 /* System header to define __stub macros and hopefully few prototypes,
8642     which can conflict with char $ac_func(); below.  */
8643 #include <assert.h>
8644 /* Override any gcc2 internal prototype to avoid an error.  */
8645 /* We use char because int might match the return type of a gcc2
8646     builtin and then its argument prototype would still apply.  */
8647 char $ac_func();
8648
8649 int main() {
8650
8651 /* The GNU C library defines this for functions which it implements
8652     to always fail with ENOSYS.  Some functions are actually named
8653     something starting with __ and the normal name is an alias.  */
8654 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8655 choke me
8656 #else
8657 $ac_func();
8658 #endif
8659
8660 ; return 0; }
8661 EOF
8662 if { (eval echo configure:8663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8663   rm -rf conftest*
8664   eval "ac_cv_func_$ac_func=yes"
8665 else
8666   echo "configure: failed program was:" >&5
8667   cat conftest.$ac_ext >&5
8668   rm -rf conftest*
8669   eval "ac_cv_func_$ac_func=no"
8670 fi
8671 rm -f conftest*
8672 fi
8673
8674 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8675   echo "$ac_t""yes" 1>&6
8676     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8677   cat >> confdefs.h <<EOF
8678 #define $ac_tr_func 1
8679 EOF
8680  
8681 else
8682   echo "$ac_t""no" 1>&6
8683 fi
8684 done
8685
8686   ;;
8687   esac
8688
8689
8690 # this bit needs to be modified for each OS that is suported by
8691 # smbwrapper. You need to specify how to created a shared library and
8692 # how to compile C code to produce PIC object files
8693
8694 # these are the defaults, good for lots of systems
8695 HOST_OS="$host_os"
8696 LDSHFLAGS="-shared"
8697 SHLD="\${CC}"
8698 PICFLAG=""
8699 PICSUFFIX="po"
8700 POBAD_CC="#"
8701 SHLIBEXT="so"
8702 # Assume non-shared by default and override below
8703 BLDSHARED="false"
8704 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8705 echo "configure:8706: checking ability to build shared libraries" >&5
8706
8707 # and these are for particular systems
8708 case "$host_os" in
8709                 *linux*)   cat >> confdefs.h <<\EOF
8710 #define LINUX 1
8711 EOF
8712
8713                         BLDSHARED="true"
8714                         LDSHFLAGS="-shared" 
8715                         DYNEXP="-Wl,--export-dynamic"
8716                         PICFLAG="-fPIC"
8717                         cat >> confdefs.h <<\EOF
8718 #define STAT_ST_BLOCKSIZE 512
8719 EOF
8720
8721                 ;;
8722                 *solaris*) 
8723                         cat >> confdefs.h <<\EOF
8724 #define SUNOS5 1
8725 EOF
8726
8727                         BLDSHARED="true"
8728                         LDSHFLAGS="-h \$@ -G"
8729                         if test "${ac_cv_prog_CC}" = "gcc"; then
8730                                 PICFLAG="-fPIC"
8731                         else
8732                                 PICFLAG="-KPIC"
8733                                 POBAD_CC=""
8734                                 PICSUFFIX="po.o"
8735                         fi
8736                         cat >> confdefs.h <<\EOF
8737 #define STAT_ST_BLOCKSIZE 512
8738 EOF
8739
8740                 ;;
8741                 *sunos*) cat >> confdefs.h <<\EOF
8742 #define SUNOS4 1
8743 EOF
8744
8745                         BLDSHARED="true"
8746                         LDSHFLAGS="-Wl,-h,\$@ -G"
8747                         PICFLAG="-KPIC"   # Is this correct for SunOS
8748                 ;;
8749                 *bsd*)  BLDSHARED="true"
8750                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8751                         PICFLAG="-fPIC"
8752                         cat >> confdefs.h <<\EOF
8753 #define STAT_ST_BLOCKSIZE 512
8754 EOF
8755
8756                 ;;
8757                 *irix*) cat >> confdefs.h <<\EOF
8758 #define IRIX 1
8759 EOF
8760
8761                         case "$host_os" in
8762                         *irix6*) cat >> confdefs.h <<\EOF
8763 #define IRIX6 1
8764 EOF
8765
8766                         ;;
8767                         esac
8768                         ATTEMPT_WRAP32_BUILD=yes
8769                         BLDSHARED="true"
8770                         LDSHFLAGS="-soname \$@ -shared"
8771                         SHLD="\${LD}"
8772                         if test "${ac_cv_prog_CC}" = "gcc"; then
8773                                 PICFLAG="-fPIC"
8774                         else 
8775                                 PICFLAG="-KPIC"
8776                         fi
8777                         cat >> confdefs.h <<\EOF
8778 #define STAT_ST_BLOCKSIZE 512
8779 EOF
8780
8781                 ;;
8782                 *aix*) cat >> confdefs.h <<\EOF
8783 #define AIX 1
8784 EOF
8785
8786                         BLDSHARED="true"
8787                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8788                         PICFLAG="-O2 -qmaxmem=6000"
8789                         cat >> confdefs.h <<\EOF
8790 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8791 EOF
8792
8793                 ;;
8794                 *hpux*) cat >> confdefs.h <<\EOF
8795 #define HPUX 1
8796 EOF
8797
8798                         SHLIBEXT="sl"
8799                         # Use special PIC flags for the native HP-UX compiler.
8800                         if test $ac_cv_prog_cc_Ae = yes; then
8801                                 SHLD="/usr/bin/ld"
8802                                 BLDSHARED="true"
8803                                 LDSHFLAGS="-B symbolic -b -z +h \$@"
8804                                 PICFLAG="+z"
8805                         fi
8806                         DYNEXP="-Wl,-E"
8807                         cat >> confdefs.h <<\EOF
8808 #define STAT_ST_BLOCKSIZE 8192
8809 EOF
8810
8811                 ;;
8812                 *qnx*) cat >> confdefs.h <<\EOF
8813 #define QNX 1
8814 EOF
8815 ;;
8816                 *osf*) cat >> confdefs.h <<\EOF
8817 #define OSF1 1
8818 EOF
8819
8820                         BLDSHARED="true"
8821                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8822                         PICFLAG="-fPIC"
8823                 ;;
8824                 *sco*) 
8825                         cat >> confdefs.h <<\EOF
8826 #define SCO 1
8827 EOF
8828
8829                 ;;
8830                 *unixware*) cat >> confdefs.h <<\EOF
8831 #define UNIXWARE 1
8832 EOF
8833
8834                         BLDSHARED="true"
8835                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8836                         PICFLAG="-KPIC"
8837                 ;;
8838                 *next2*) cat >> confdefs.h <<\EOF
8839 #define NEXT2 1
8840 EOF
8841 ;;
8842                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8843 set dummy groff; ac_word=$2
8844 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8845 echo "configure:8846: checking for $ac_word" >&5
8846 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8847   echo $ac_n "(cached) $ac_c" 1>&6
8848 else
8849   if test -n "$ROFF"; then
8850   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8851 else
8852   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8853   ac_dummy="$PATH"
8854   for ac_dir in $ac_dummy; do
8855     test -z "$ac_dir" && ac_dir=.
8856     if test -f $ac_dir/$ac_word; then
8857       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8858       break
8859     fi
8860   done
8861   IFS="$ac_save_ifs"
8862 fi
8863 fi
8864 ROFF="$ac_cv_prog_ROFF"
8865 if test -n "$ROFF"; then
8866   echo "$ac_t""$ROFF" 1>&6
8867 else
8868   echo "$ac_t""no" 1>&6
8869 fi
8870 ;;
8871                 *sysv4*)
8872                         case "$host" in
8873                                 *-univel-*)
8874                                         if  test "$GCC" != yes ; then
8875                                                 cat >> confdefs.h <<\EOF
8876 #define HAVE_MEMSET 1
8877 EOF
8878
8879                                         fi
8880                                         LDSHFLAGS="-G"
8881                                         DYNEXP="-Bexport"
8882                                 ;;
8883                                 *mips-sni-sysv4*)
8884                                         cat >> confdefs.h <<\EOF
8885 #define RELIANTUNIX 1
8886 EOF
8887
8888                                 ;;
8889                         esac
8890                 ;;
8891
8892                 *sysv5*)
8893                         if  test "$GCC" != yes ; then
8894                                 cat >> confdefs.h <<\EOF
8895 #define HAVE_MEMSET 1
8896 EOF
8897
8898                         fi
8899                         LDSHFLAGS="-G"
8900                 ;;
8901 esac
8902
8903 echo "$ac_t""$BLDSHARED" 1>&6
8904 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
8905 echo "configure:8906: checking linker flags for shared libraries" >&5
8906 echo "$ac_t""$LDSHFLAGS" 1>&6
8907 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
8908 echo "configure:8909: checking compiler flags for position-independent code" >&5
8909 echo "$ac_t""$PICFLAGS" 1>&6
8910
8911 #######################################################
8912 # test whether building a shared library actually works
8913 if test $BLDSHARED = true; then
8914 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
8915 echo "configure:8916: checking whether building shared libraries actually works" >&5
8916 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
8917   echo $ac_n "(cached) $ac_c" 1>&6
8918 else
8919   
8920    ac_cv_shlib_works=no
8921    # try building a trivial shared library
8922    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
8923      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
8924      ac_cv_shlib_works=yes
8925    rm -f shlib.so shlib.po
8926
8927 fi
8928
8929 echo "$ac_t""$ac_cv_shlib_works" 1>&6
8930 if test $ac_cv_shlib_works = no; then
8931    BLDSHARED=false
8932 fi
8933 fi
8934
8935
8936 # this updates our target list if we can build shared libs
8937 if test $BLDSHARED = true; then
8938    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8939 else
8940    LIBSMBCLIENT_SHARED=
8941 fi
8942
8943 ################
8944
8945 echo $ac_n "checking for long long""... $ac_c" 1>&6
8946 echo "configure:8947: checking for long long" >&5
8947 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8948   echo $ac_n "(cached) $ac_c" 1>&6
8949 else
8950   
8951 if test "$cross_compiling" = yes; then
8952   samba_cv_have_longlong=cross
8953 else
8954   cat > conftest.$ac_ext <<EOF
8955 #line 8956 "configure"
8956 #include "confdefs.h"
8957 #include <stdio.h>
8958 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8959 EOF
8960 if { (eval echo configure:8961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8961 then
8962   samba_cv_have_longlong=yes
8963 else
8964   echo "configure: failed program was:" >&5
8965   cat conftest.$ac_ext >&5
8966   rm -fr conftest*
8967   samba_cv_have_longlong=no
8968 fi
8969 rm -fr conftest*
8970 fi
8971
8972 fi
8973
8974 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8975 if test x"$samba_cv_have_longlong" = x"yes"; then
8976     cat >> confdefs.h <<\EOF
8977 #define HAVE_LONGLONG 1
8978 EOF
8979
8980 fi
8981
8982 #
8983 # Check if the compiler supports the LL prefix on long long integers.
8984 # AIX needs this.
8985
8986 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8987 echo "configure:8988: checking for LL suffix on long long integers" >&5
8988 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8989   echo $ac_n "(cached) $ac_c" 1>&6
8990 else
8991   
8992     cat > conftest.$ac_ext <<EOF
8993 #line 8994 "configure"
8994 #include "confdefs.h"
8995 #include <stdio.h>
8996 int main() {
8997 long long i = 0x8000000000LL
8998 ; return 0; }
8999 EOF
9000 if { (eval echo configure:9001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9001   rm -rf conftest*
9002   samba_cv_compiler_supports_ll=yes
9003 else
9004   echo "configure: failed program was:" >&5
9005   cat conftest.$ac_ext >&5
9006   rm -rf conftest*
9007   samba_cv_compiler_supports_ll=no
9008 fi
9009 rm -f conftest*
9010 fi
9011
9012 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9013 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9014    cat >> confdefs.h <<\EOF
9015 #define COMPILER_SUPPORTS_LL 1
9016 EOF
9017
9018 fi
9019
9020   
9021 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9022 echo "configure:9023: checking for 64 bit off_t" >&5
9023 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9024   echo $ac_n "(cached) $ac_c" 1>&6
9025 else
9026   
9027 if test "$cross_compiling" = yes; then
9028   samba_cv_SIZEOF_OFF_T=cross
9029 else
9030   cat > conftest.$ac_ext <<EOF
9031 #line 9032 "configure"
9032 #include "confdefs.h"
9033 #include <stdio.h>
9034 #include <sys/stat.h>
9035 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9036 EOF
9037 if { (eval echo configure:9038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9038 then
9039   samba_cv_SIZEOF_OFF_T=yes
9040 else
9041   echo "configure: failed program was:" >&5
9042   cat conftest.$ac_ext >&5
9043   rm -fr conftest*
9044   samba_cv_SIZEOF_OFF_T=no
9045 fi
9046 rm -fr conftest*
9047 fi
9048
9049 fi
9050
9051 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9052 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9053     cat >> confdefs.h <<\EOF
9054 #define SIZEOF_OFF_T 8
9055 EOF
9056
9057 fi
9058
9059 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9060 echo "configure:9061: checking for off64_t" >&5
9061 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9062   echo $ac_n "(cached) $ac_c" 1>&6
9063 else
9064   
9065 if test "$cross_compiling" = yes; then
9066   samba_cv_HAVE_OFF64_T=cross
9067 else
9068   cat > conftest.$ac_ext <<EOF
9069 #line 9070 "configure"
9070 #include "confdefs.h"
9071
9072 #if defined(HAVE_UNISTD_H)
9073 #include <unistd.h>
9074 #endif
9075 #include <stdio.h>
9076 #include <sys/stat.h>
9077 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9078 EOF
9079 if { (eval echo configure:9080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9080 then
9081   samba_cv_HAVE_OFF64_T=yes
9082 else
9083   echo "configure: failed program was:" >&5
9084   cat conftest.$ac_ext >&5
9085   rm -fr conftest*
9086   samba_cv_HAVE_OFF64_T=no
9087 fi
9088 rm -fr conftest*
9089 fi
9090
9091 fi
9092
9093 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9094 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9095     cat >> confdefs.h <<\EOF
9096 #define HAVE_OFF64_T 1
9097 EOF
9098
9099 fi
9100
9101 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9102 echo "configure:9103: checking for 64 bit ino_t" >&5
9103 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9104   echo $ac_n "(cached) $ac_c" 1>&6
9105 else
9106   
9107 if test "$cross_compiling" = yes; then
9108   samba_cv_SIZEOF_INO_T=cross
9109 else
9110   cat > conftest.$ac_ext <<EOF
9111 #line 9112 "configure"
9112 #include "confdefs.h"
9113 #include <stdio.h>
9114 #include <sys/stat.h>
9115 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9116 EOF
9117 if { (eval echo configure:9118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9118 then
9119   samba_cv_SIZEOF_INO_T=yes
9120 else
9121   echo "configure: failed program was:" >&5
9122   cat conftest.$ac_ext >&5
9123   rm -fr conftest*
9124   samba_cv_SIZEOF_INO_T=no
9125 fi
9126 rm -fr conftest*
9127 fi
9128
9129 fi
9130
9131 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9132 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9133     cat >> confdefs.h <<\EOF
9134 #define SIZEOF_INO_T 8
9135 EOF
9136
9137 fi
9138
9139 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9140 echo "configure:9141: checking for ino64_t" >&5
9141 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9142   echo $ac_n "(cached) $ac_c" 1>&6
9143 else
9144   
9145 if test "$cross_compiling" = yes; then
9146   samba_cv_HAVE_INO64_T=cross
9147 else
9148   cat > conftest.$ac_ext <<EOF
9149 #line 9150 "configure"
9150 #include "confdefs.h"
9151
9152 #if defined(HAVE_UNISTD_H)
9153 #include <unistd.h>
9154 #endif
9155 #include <stdio.h>
9156 #include <sys/stat.h>
9157 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9158 EOF
9159 if { (eval echo configure:9160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9160 then
9161   samba_cv_HAVE_INO64_T=yes
9162 else
9163   echo "configure: failed program was:" >&5
9164   cat conftest.$ac_ext >&5
9165   rm -fr conftest*
9166   samba_cv_HAVE_INO64_T=no
9167 fi
9168 rm -fr conftest*
9169 fi
9170
9171 fi
9172
9173 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9174 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9175     cat >> confdefs.h <<\EOF
9176 #define HAVE_INO64_T 1
9177 EOF
9178
9179 fi
9180
9181 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9182 echo "configure:9183: checking for dev64_t" >&5
9183 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9184   echo $ac_n "(cached) $ac_c" 1>&6
9185 else
9186   
9187 if test "$cross_compiling" = yes; then
9188   samba_cv_HAVE_DEV64_T=cross
9189 else
9190   cat > conftest.$ac_ext <<EOF
9191 #line 9192 "configure"
9192 #include "confdefs.h"
9193
9194 #if defined(HAVE_UNISTD_H)
9195 #include <unistd.h>
9196 #endif
9197 #include <stdio.h>
9198 #include <sys/stat.h>
9199 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9200 EOF
9201 if { (eval echo configure:9202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9202 then
9203   samba_cv_HAVE_DEV64_T=yes
9204 else
9205   echo "configure: failed program was:" >&5
9206   cat conftest.$ac_ext >&5
9207   rm -fr conftest*
9208   samba_cv_HAVE_DEV64_T=no
9209 fi
9210 rm -fr conftest*
9211 fi
9212
9213 fi
9214
9215 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9216 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9217     cat >> confdefs.h <<\EOF
9218 #define HAVE_DEV64_T 1
9219 EOF
9220
9221 fi
9222
9223 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9224 echo "configure:9225: checking for struct dirent64" >&5
9225 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9226   echo $ac_n "(cached) $ac_c" 1>&6
9227 else
9228   
9229 cat > conftest.$ac_ext <<EOF
9230 #line 9231 "configure"
9231 #include "confdefs.h"
9232
9233 #if defined(HAVE_UNISTD_H)
9234 #include <unistd.h>
9235 #endif
9236 #include <sys/types.h>
9237 #include <dirent.h>
9238 int main() {
9239 struct dirent64 de;
9240 ; return 0; }
9241 EOF
9242 if { (eval echo configure:9243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9243   rm -rf conftest*
9244   samba_cv_HAVE_STRUCT_DIRENT64=yes
9245 else
9246   echo "configure: failed program was:" >&5
9247   cat conftest.$ac_ext >&5
9248   rm -rf conftest*
9249   samba_cv_HAVE_STRUCT_DIRENT64=no
9250 fi
9251 rm -f conftest*
9252 fi
9253
9254 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9255 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9256     cat >> confdefs.h <<\EOF
9257 #define HAVE_STRUCT_DIRENT64 1
9258 EOF
9259
9260 fi
9261
9262 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9263 echo "configure:9264: checking for major macro" >&5
9264 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9265   echo $ac_n "(cached) $ac_c" 1>&6
9266 else
9267   
9268 if test "$cross_compiling" = yes; then
9269   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9270 else
9271   cat > conftest.$ac_ext <<EOF
9272 #line 9273 "configure"
9273 #include "confdefs.h"
9274
9275 #if defined(HAVE_UNISTD_H)
9276 #include <unistd.h>
9277 #endif
9278 #include <sys/types.h>
9279 main() { dev_t dev; int i = major(dev); return 0; }
9280 EOF
9281 if { (eval echo configure:9282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9282 then
9283   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9284 else
9285   echo "configure: failed program was:" >&5
9286   cat conftest.$ac_ext >&5
9287   rm -fr conftest*
9288   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9289 fi
9290 rm -fr conftest*
9291 fi
9292
9293 fi
9294
9295 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9296 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9297     cat >> confdefs.h <<\EOF
9298 #define HAVE_DEVICE_MAJOR_FN 1
9299 EOF
9300
9301 fi
9302
9303 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9304 echo "configure:9305: checking for minor macro" >&5
9305 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9306   echo $ac_n "(cached) $ac_c" 1>&6
9307 else
9308   
9309 if test "$cross_compiling" = yes; then
9310   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9311 else
9312   cat > conftest.$ac_ext <<EOF
9313 #line 9314 "configure"
9314 #include "confdefs.h"
9315
9316 #if defined(HAVE_UNISTD_H)
9317 #include <unistd.h>
9318 #endif
9319 #include <sys/types.h>
9320 main() { dev_t dev; int i = minor(dev); return 0; }
9321 EOF
9322 if { (eval echo configure:9323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9323 then
9324   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9325 else
9326   echo "configure: failed program was:" >&5
9327   cat conftest.$ac_ext >&5
9328   rm -fr conftest*
9329   samba_cv_HAVE_DEVICE_MINOR_FN=no
9330 fi
9331 rm -fr conftest*
9332 fi
9333
9334 fi
9335
9336 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9337 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9338     cat >> confdefs.h <<\EOF
9339 #define HAVE_DEVICE_MINOR_FN 1
9340 EOF
9341
9342 fi
9343
9344 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9345 echo "configure:9346: checking for unsigned char" >&5
9346 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9347   echo $ac_n "(cached) $ac_c" 1>&6
9348 else
9349   
9350 if test "$cross_compiling" = yes; then
9351   samba_cv_HAVE_UNSIGNED_CHAR=cross
9352 else
9353   cat > conftest.$ac_ext <<EOF
9354 #line 9355 "configure"
9355 #include "confdefs.h"
9356 #include <stdio.h>
9357 main() { char c; c=250; exit((c > 0)?0:1); }
9358 EOF
9359 if { (eval echo configure:9360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9360 then
9361   samba_cv_HAVE_UNSIGNED_CHAR=yes
9362 else
9363   echo "configure: failed program was:" >&5
9364   cat conftest.$ac_ext >&5
9365   rm -fr conftest*
9366   samba_cv_HAVE_UNSIGNED_CHAR=no
9367 fi
9368 rm -fr conftest*
9369 fi
9370
9371 fi
9372
9373 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9374 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9375     cat >> confdefs.h <<\EOF
9376 #define HAVE_UNSIGNED_CHAR 1
9377 EOF
9378
9379 fi
9380
9381 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9382 echo "configure:9383: checking for sin_len in sock" >&5
9383 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9384   echo $ac_n "(cached) $ac_c" 1>&6
9385 else
9386   
9387 cat > conftest.$ac_ext <<EOF
9388 #line 9389 "configure"
9389 #include "confdefs.h"
9390 #include <sys/types.h>
9391 #include <sys/socket.h>
9392 #include <netinet/in.h>
9393 int main() {
9394 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9395 ; return 0; }
9396 EOF
9397 if { (eval echo configure:9398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9398   rm -rf conftest*
9399   samba_cv_HAVE_SOCK_SIN_LEN=yes
9400 else
9401   echo "configure: failed program was:" >&5
9402   cat conftest.$ac_ext >&5
9403   rm -rf conftest*
9404   samba_cv_HAVE_SOCK_SIN_LEN=no
9405 fi
9406 rm -f conftest*
9407 fi
9408
9409 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9410 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9411     cat >> confdefs.h <<\EOF
9412 #define HAVE_SOCK_SIN_LEN 1
9413 EOF
9414
9415 fi
9416
9417 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9418 echo "configure:9419: checking whether seekdir returns void" >&5
9419 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9420   echo $ac_n "(cached) $ac_c" 1>&6
9421 else
9422   
9423 cat > conftest.$ac_ext <<EOF
9424 #line 9425 "configure"
9425 #include "confdefs.h"
9426 #include <sys/types.h>
9427 #include <dirent.h>
9428 void seekdir(DIR *d, long loc) { return; }
9429 int main() {
9430 return 0;
9431 ; return 0; }
9432 EOF
9433 if { (eval echo configure:9434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9434   rm -rf conftest*
9435   samba_cv_SEEKDIR_RETURNS_VOID=yes
9436 else
9437   echo "configure: failed program was:" >&5
9438   cat conftest.$ac_ext >&5
9439   rm -rf conftest*
9440   samba_cv_SEEKDIR_RETURNS_VOID=no
9441 fi
9442 rm -f conftest*
9443 fi
9444
9445 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9446 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9447     cat >> confdefs.h <<\EOF
9448 #define SEEKDIR_RETURNS_VOID 1
9449 EOF
9450
9451 fi
9452
9453 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9454 echo "configure:9455: checking for __FILE__ macro" >&5
9455 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9456   echo $ac_n "(cached) $ac_c" 1>&6
9457 else
9458   
9459 cat > conftest.$ac_ext <<EOF
9460 #line 9461 "configure"
9461 #include "confdefs.h"
9462 #include <stdio.h>
9463 int main() {
9464 printf("%s\n", __FILE__);
9465 ; return 0; }
9466 EOF
9467 if { (eval echo configure:9468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9468   rm -rf conftest*
9469   samba_cv_HAVE_FILE_MACRO=yes
9470 else
9471   echo "configure: failed program was:" >&5
9472   cat conftest.$ac_ext >&5
9473   rm -rf conftest*
9474   samba_cv_HAVE_FILE_MACRO=no
9475 fi
9476 rm -f conftest*
9477 fi
9478
9479 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9480 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9481     cat >> confdefs.h <<\EOF
9482 #define HAVE_FILE_MACRO 1
9483 EOF
9484
9485 fi
9486
9487 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9488 echo "configure:9489: checking for __FUNCTION__ macro" >&5
9489 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9490   echo $ac_n "(cached) $ac_c" 1>&6
9491 else
9492   
9493 cat > conftest.$ac_ext <<EOF
9494 #line 9495 "configure"
9495 #include "confdefs.h"
9496 #include <stdio.h>
9497 int main() {
9498 printf("%s\n", __FUNCTION__);
9499 ; return 0; }
9500 EOF
9501 if { (eval echo configure:9502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9502   rm -rf conftest*
9503   samba_cv_HAVE_FUNCTION_MACRO=yes
9504 else
9505   echo "configure: failed program was:" >&5
9506   cat conftest.$ac_ext >&5
9507   rm -rf conftest*
9508   samba_cv_HAVE_FUNCTION_MACRO=no
9509 fi
9510 rm -f conftest*
9511 fi
9512
9513 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9514 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9515     cat >> confdefs.h <<\EOF
9516 #define HAVE_FUNCTION_MACRO 1
9517 EOF
9518
9519 fi
9520
9521 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9522 echo "configure:9523: checking if gettimeofday takes tz argument" >&5
9523 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9524   echo $ac_n "(cached) $ac_c" 1>&6
9525 else
9526   
9527 if test "$cross_compiling" = yes; then
9528   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9529 else
9530   cat > conftest.$ac_ext <<EOF
9531 #line 9532 "configure"
9532 #include "confdefs.h"
9533
9534 #include <sys/time.h>
9535 #include <unistd.h>
9536 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9537 EOF
9538 if { (eval echo configure:9539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9539 then
9540   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9541 else
9542   echo "configure: failed program was:" >&5
9543   cat conftest.$ac_ext >&5
9544   rm -fr conftest*
9545   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9546 fi
9547 rm -fr conftest*
9548 fi
9549
9550 fi
9551
9552 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9553 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9554     cat >> confdefs.h <<\EOF
9555 #define HAVE_GETTIMEOFDAY_TZ 1
9556 EOF
9557
9558 fi
9559
9560 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9561 echo "configure:9562: checking for C99 vsnprintf" >&5
9562 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9563   echo $ac_n "(cached) $ac_c" 1>&6
9564 else
9565   
9566 if test "$cross_compiling" = yes; then
9567   samba_cv_HAVE_C99_VSNPRINTF=cross
9568 else
9569   cat > conftest.$ac_ext <<EOF
9570 #line 9571 "configure"
9571 #include "confdefs.h"
9572
9573 #include <sys/types.h>
9574 #include <stdarg.h>
9575 void foo(const char *format, ...) { 
9576        va_list ap;
9577        int len;
9578        char buf[5];
9579
9580        va_start(ap, format);
9581        len = vsnprintf(buf, 0, format, ap);
9582        va_end(ap);
9583        if (len != 5) exit(1);
9584
9585        va_start(ap, format);
9586        len = vsnprintf(0, 0, format, ap);
9587        va_end(ap);
9588        if (len != 5) exit(1);
9589
9590        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9591
9592        exit(0);
9593 }
9594 main() { foo("hello"); }
9595
9596 EOF
9597 if { (eval echo configure:9598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9598 then
9599   samba_cv_HAVE_C99_VSNPRINTF=yes
9600 else
9601   echo "configure: failed program was:" >&5
9602   cat conftest.$ac_ext >&5
9603   rm -fr conftest*
9604   samba_cv_HAVE_C99_VSNPRINTF=no
9605 fi
9606 rm -fr conftest*
9607 fi
9608
9609 fi
9610
9611 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9612 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9613     cat >> confdefs.h <<\EOF
9614 #define HAVE_C99_VSNPRINTF 1
9615 EOF
9616
9617 fi
9618
9619 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9620 echo "configure:9621: checking for broken readdir" >&5
9621 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9622   echo $ac_n "(cached) $ac_c" 1>&6
9623 else
9624   
9625 if test "$cross_compiling" = yes; then
9626   samba_cv_HAVE_BROKEN_READDIR=cross
9627 else
9628   cat > conftest.$ac_ext <<EOF
9629 #line 9630 "configure"
9630 #include "confdefs.h"
9631 #include <sys/types.h>
9632 #include <dirent.h>
9633 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9634 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9635 di->d_name[0] == 0) exit(0); exit(1);} 
9636 EOF
9637 if { (eval echo configure:9638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9638 then
9639   samba_cv_HAVE_BROKEN_READDIR=yes
9640 else
9641   echo "configure: failed program was:" >&5
9642   cat conftest.$ac_ext >&5
9643   rm -fr conftest*
9644   samba_cv_HAVE_BROKEN_READDIR=no
9645 fi
9646 rm -fr conftest*
9647 fi
9648
9649 fi
9650
9651 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9652 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9653     cat >> confdefs.h <<\EOF
9654 #define HAVE_BROKEN_READDIR 1
9655 EOF
9656
9657 fi
9658
9659 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9660 echo "configure:9661: checking for utimbuf" >&5
9661 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+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 <utime.h>
9670 int main() {
9671 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
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_UTIMBUF=yes
9677 else
9678   echo "configure: failed program was:" >&5
9679   cat conftest.$ac_ext >&5
9680   rm -rf conftest*
9681   samba_cv_HAVE_UTIMBUF=no
9682 fi
9683 rm -f conftest*
9684 fi
9685
9686 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9687 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9688     cat >> confdefs.h <<\EOF
9689 #define HAVE_UTIMBUF 1
9690 EOF
9691
9692 fi
9693
9694
9695 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9696 do
9697 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9698 echo "configure:9699: checking for $ac_func" >&5
9699 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9700   echo $ac_n "(cached) $ac_c" 1>&6
9701 else
9702   cat > conftest.$ac_ext <<EOF
9703 #line 9704 "configure"
9704 #include "confdefs.h"
9705 /* System header to define __stub macros and hopefully few prototypes,
9706     which can conflict with char $ac_func(); below.  */
9707 #include <assert.h>
9708 /* Override any gcc2 internal prototype to avoid an error.  */
9709 /* We use char because int might match the return type of a gcc2
9710     builtin and then its argument prototype would still apply.  */
9711 char $ac_func();
9712
9713 int main() {
9714
9715 /* The GNU C library defines this for functions which it implements
9716     to always fail with ENOSYS.  Some functions are actually named
9717     something starting with __ and the normal name is an alias.  */
9718 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9719 choke me
9720 #else
9721 $ac_func();
9722 #endif
9723
9724 ; return 0; }
9725 EOF
9726 if { (eval echo configure:9727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9727   rm -rf conftest*
9728   eval "ac_cv_func_$ac_func=yes"
9729 else
9730   echo "configure: failed program was:" >&5
9731   cat conftest.$ac_ext >&5
9732   rm -rf conftest*
9733   eval "ac_cv_func_$ac_func=no"
9734 fi
9735 rm -f conftest*
9736 fi
9737
9738 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9739   echo "$ac_t""yes" 1>&6
9740     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9741   cat >> confdefs.h <<EOF
9742 #define $ac_tr_func 1
9743 EOF
9744  
9745 else
9746   echo "$ac_t""no" 1>&6
9747 fi
9748 done
9749
9750
9751 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9752 echo "configure:9753: checking for ut_name in utmp" >&5
9753 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9754   echo $ac_n "(cached) $ac_c" 1>&6
9755 else
9756   
9757 cat > conftest.$ac_ext <<EOF
9758 #line 9759 "configure"
9759 #include "confdefs.h"
9760 #include <sys/types.h>
9761 #include <utmp.h>
9762 int main() {
9763 struct utmp ut;  ut.ut_name[0] = 'a';
9764 ; return 0; }
9765 EOF
9766 if { (eval echo configure:9767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9767   rm -rf conftest*
9768   samba_cv_HAVE_UT_UT_NAME=yes
9769 else
9770   echo "configure: failed program was:" >&5
9771   cat conftest.$ac_ext >&5
9772   rm -rf conftest*
9773   samba_cv_HAVE_UT_UT_NAME=no
9774 fi
9775 rm -f conftest*
9776 fi
9777
9778 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9779 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9780     cat >> confdefs.h <<\EOF
9781 #define HAVE_UT_UT_NAME 1
9782 EOF
9783
9784 fi 
9785
9786 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9787 echo "configure:9788: checking for ut_user in utmp" >&5
9788 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9789   echo $ac_n "(cached) $ac_c" 1>&6
9790 else
9791   
9792 cat > conftest.$ac_ext <<EOF
9793 #line 9794 "configure"
9794 #include "confdefs.h"
9795 #include <sys/types.h>
9796 #include <utmp.h>
9797 int main() {
9798 struct utmp ut;  ut.ut_user[0] = 'a';
9799 ; return 0; }
9800 EOF
9801 if { (eval echo configure:9802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9802   rm -rf conftest*
9803   samba_cv_HAVE_UT_UT_USER=yes
9804 else
9805   echo "configure: failed program was:" >&5
9806   cat conftest.$ac_ext >&5
9807   rm -rf conftest*
9808   samba_cv_HAVE_UT_UT_USER=no
9809 fi
9810 rm -f conftest*
9811 fi
9812
9813 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9814 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9815     cat >> confdefs.h <<\EOF
9816 #define HAVE_UT_UT_USER 1
9817 EOF
9818
9819 fi 
9820
9821 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9822 echo "configure:9823: checking for ut_id in utmp" >&5
9823 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9824   echo $ac_n "(cached) $ac_c" 1>&6
9825 else
9826   
9827 cat > conftest.$ac_ext <<EOF
9828 #line 9829 "configure"
9829 #include "confdefs.h"
9830 #include <sys/types.h>
9831 #include <utmp.h>
9832 int main() {
9833 struct utmp ut;  ut.ut_id[0] = 'a';
9834 ; return 0; }
9835 EOF
9836 if { (eval echo configure:9837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9837   rm -rf conftest*
9838   samba_cv_HAVE_UT_UT_ID=yes
9839 else
9840   echo "configure: failed program was:" >&5
9841   cat conftest.$ac_ext >&5
9842   rm -rf conftest*
9843   samba_cv_HAVE_UT_UT_ID=no
9844 fi
9845 rm -f conftest*
9846 fi
9847
9848 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9849 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9850     cat >> confdefs.h <<\EOF
9851 #define HAVE_UT_UT_ID 1
9852 EOF
9853
9854 fi 
9855
9856 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9857 echo "configure:9858: checking for ut_host in utmp" >&5
9858 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9859   echo $ac_n "(cached) $ac_c" 1>&6
9860 else
9861   
9862 cat > conftest.$ac_ext <<EOF
9863 #line 9864 "configure"
9864 #include "confdefs.h"
9865 #include <sys/types.h>
9866 #include <utmp.h>
9867 int main() {
9868 struct utmp ut;  ut.ut_host[0] = 'a';
9869 ; return 0; }
9870 EOF
9871 if { (eval echo configure:9872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9872   rm -rf conftest*
9873   samba_cv_HAVE_UT_UT_HOST=yes
9874 else
9875   echo "configure: failed program was:" >&5
9876   cat conftest.$ac_ext >&5
9877   rm -rf conftest*
9878   samba_cv_HAVE_UT_UT_HOST=no
9879 fi
9880 rm -f conftest*
9881 fi
9882
9883 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9884 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9885     cat >> confdefs.h <<\EOF
9886 #define HAVE_UT_UT_HOST 1
9887 EOF
9888
9889 fi 
9890
9891 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9892 echo "configure:9893: checking for ut_time in utmp" >&5
9893 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9894   echo $ac_n "(cached) $ac_c" 1>&6
9895 else
9896   
9897 cat > conftest.$ac_ext <<EOF
9898 #line 9899 "configure"
9899 #include "confdefs.h"
9900 #include <sys/types.h>
9901 #include <utmp.h>
9902 int main() {
9903 struct utmp ut;  time_t t; ut.ut_time = t;
9904 ; return 0; }
9905 EOF
9906 if { (eval echo configure:9907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9907   rm -rf conftest*
9908   samba_cv_HAVE_UT_UT_TIME=yes
9909 else
9910   echo "configure: failed program was:" >&5
9911   cat conftest.$ac_ext >&5
9912   rm -rf conftest*
9913   samba_cv_HAVE_UT_UT_TIME=no
9914 fi
9915 rm -f conftest*
9916 fi
9917
9918 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9919 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9920     cat >> confdefs.h <<\EOF
9921 #define HAVE_UT_UT_TIME 1
9922 EOF
9923
9924 fi 
9925
9926 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9927 echo "configure:9928: checking for ut_tv in utmp" >&5
9928 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9929   echo $ac_n "(cached) $ac_c" 1>&6
9930 else
9931   
9932 cat > conftest.$ac_ext <<EOF
9933 #line 9934 "configure"
9934 #include "confdefs.h"
9935 #include <sys/types.h>
9936 #include <utmp.h>
9937 int main() {
9938 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9939 ; return 0; }
9940 EOF
9941 if { (eval echo configure:9942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9942   rm -rf conftest*
9943   samba_cv_HAVE_UT_UT_TV=yes
9944 else
9945   echo "configure: failed program was:" >&5
9946   cat conftest.$ac_ext >&5
9947   rm -rf conftest*
9948   samba_cv_HAVE_UT_UT_TV=no
9949 fi
9950 rm -f conftest*
9951 fi
9952
9953 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9954 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9955     cat >> confdefs.h <<\EOF
9956 #define HAVE_UT_UT_TV 1
9957 EOF
9958
9959 fi 
9960
9961 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9962 echo "configure:9963: checking for ut_type in utmp" >&5
9963 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9964   echo $ac_n "(cached) $ac_c" 1>&6
9965 else
9966   
9967 cat > conftest.$ac_ext <<EOF
9968 #line 9969 "configure"
9969 #include "confdefs.h"
9970 #include <sys/types.h>
9971 #include <utmp.h>
9972 int main() {
9973 struct utmp ut;  ut.ut_type = 0;
9974 ; return 0; }
9975 EOF
9976 if { (eval echo configure:9977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9977   rm -rf conftest*
9978   samba_cv_HAVE_UT_UT_TYPE=yes
9979 else
9980   echo "configure: failed program was:" >&5
9981   cat conftest.$ac_ext >&5
9982   rm -rf conftest*
9983   samba_cv_HAVE_UT_UT_TYPE=no
9984 fi
9985 rm -f conftest*
9986 fi
9987
9988 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9989 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9990     cat >> confdefs.h <<\EOF
9991 #define HAVE_UT_UT_TYPE 1
9992 EOF
9993
9994 fi 
9995
9996 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9997 echo "configure:9998: checking for ut_pid in utmp" >&5
9998 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9999   echo $ac_n "(cached) $ac_c" 1>&6
10000 else
10001   
10002 cat > conftest.$ac_ext <<EOF
10003 #line 10004 "configure"
10004 #include "confdefs.h"
10005 #include <sys/types.h>
10006 #include <utmp.h>
10007 int main() {
10008 struct utmp ut;  ut.ut_pid = 0;
10009 ; return 0; }
10010 EOF
10011 if { (eval echo configure:10012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10012   rm -rf conftest*
10013   samba_cv_HAVE_UT_UT_PID=yes
10014 else
10015   echo "configure: failed program was:" >&5
10016   cat conftest.$ac_ext >&5
10017   rm -rf conftest*
10018   samba_cv_HAVE_UT_UT_PID=no
10019 fi
10020 rm -f conftest*
10021 fi
10022
10023 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10024 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10025     cat >> confdefs.h <<\EOF
10026 #define HAVE_UT_UT_PID 1
10027 EOF
10028
10029 fi 
10030
10031 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10032 echo "configure:10033: checking for ut_exit in utmp" >&5
10033 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10034   echo $ac_n "(cached) $ac_c" 1>&6
10035 else
10036   
10037 cat > conftest.$ac_ext <<EOF
10038 #line 10039 "configure"
10039 #include "confdefs.h"
10040 #include <sys/types.h>
10041 #include <utmp.h>
10042 int main() {
10043 struct utmp ut;  ut.ut_exit.e_exit = 0;
10044 ; return 0; }
10045 EOF
10046 if { (eval echo configure:10047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10047   rm -rf conftest*
10048   samba_cv_HAVE_UT_UT_EXIT=yes
10049 else
10050   echo "configure: failed program was:" >&5
10051   cat conftest.$ac_ext >&5
10052   rm -rf conftest*
10053   samba_cv_HAVE_UT_UT_EXIT=no
10054 fi
10055 rm -f conftest*
10056 fi
10057
10058 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10059 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10060     cat >> confdefs.h <<\EOF
10061 #define HAVE_UT_UT_EXIT 1
10062 EOF
10063
10064 fi 
10065
10066 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10067 echo "configure:10068: checking for ut_addr in utmp" >&5
10068 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10069   echo $ac_n "(cached) $ac_c" 1>&6
10070 else
10071   
10072 cat > conftest.$ac_ext <<EOF
10073 #line 10074 "configure"
10074 #include "confdefs.h"
10075 #include <sys/types.h>
10076 #include <utmp.h>
10077 int main() {
10078 struct utmp ut;  ut.ut_addr = 0;
10079 ; return 0; }
10080 EOF
10081 if { (eval echo configure:10082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10082   rm -rf conftest*
10083   samba_cv_HAVE_UT_UT_ADDR=yes
10084 else
10085   echo "configure: failed program was:" >&5
10086   cat conftest.$ac_ext >&5
10087   rm -rf conftest*
10088   samba_cv_HAVE_UT_UT_ADDR=no
10089 fi
10090 rm -f conftest*
10091 fi
10092
10093 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10094 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10095     cat >> confdefs.h <<\EOF
10096 #define HAVE_UT_UT_ADDR 1
10097 EOF
10098
10099 fi 
10100
10101 if test x$ac_cv_func_pututline = xyes ; then
10102   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10103 echo "configure:10104: checking whether pututline returns pointer" >&5
10104 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10105   echo $ac_n "(cached) $ac_c" 1>&6
10106 else
10107   
10108   cat > conftest.$ac_ext <<EOF
10109 #line 10110 "configure"
10110 #include "confdefs.h"
10111 #include <sys/types.h>
10112 #include <utmp.h>
10113 int main() {
10114 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10115 ; return 0; }
10116 EOF
10117 if { (eval echo configure:10118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10118   rm -rf conftest*
10119   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10120 else
10121   echo "configure: failed program was:" >&5
10122   cat conftest.$ac_ext >&5
10123   rm -rf conftest*
10124   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10125 fi
10126 rm -f conftest*
10127 fi
10128
10129 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10130   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10131       cat >> confdefs.h <<\EOF
10132 #define PUTUTLINE_RETURNS_UTMP 1
10133 EOF
10134
10135   fi
10136 fi
10137
10138 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10139 echo "configure:10140: checking for ut_syslen in utmpx" >&5
10140 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10141   echo $ac_n "(cached) $ac_c" 1>&6
10142 else
10143   
10144 cat > conftest.$ac_ext <<EOF
10145 #line 10146 "configure"
10146 #include "confdefs.h"
10147 #include <sys/types.h>
10148 #include <utmpx.h>
10149 int main() {
10150 struct utmpx ux;  ux.ut_syslen = 0;
10151 ; return 0; }
10152 EOF
10153 if { (eval echo configure:10154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10154   rm -rf conftest*
10155   samba_cv_HAVE_UX_UT_SYSLEN=yes
10156 else
10157   echo "configure: failed program was:" >&5
10158   cat conftest.$ac_ext >&5
10159   rm -rf conftest*
10160   samba_cv_HAVE_UX_UT_SYSLEN=no
10161 fi
10162 rm -f conftest*
10163 fi
10164
10165 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10166 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10167     cat >> confdefs.h <<\EOF
10168 #define HAVE_UX_UT_SYSLEN 1
10169 EOF
10170
10171 fi 
10172
10173
10174 #################################################
10175 # check for libiconv support
10176 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10177 echo "configure:10178: checking whether to use libiconv" >&5
10178 # Check whether --with-libiconv or --without-libiconv was given.
10179 if test "${with_libiconv+set}" = set; then
10180   withval="$with_libiconv"
10181    case "$withval" in
10182   no)
10183     echo "$ac_t""no" 1>&6
10184     ;;
10185   *)
10186     echo "$ac_t""yes" 1>&6
10187     CFLAGS="$CFLAGS -I$withval/include"
10188     LDFLAGS="$LDFLAGS -L$withval/lib"
10189     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10190 echo "configure:10191: checking for iconv_open in -liconv" >&5
10191 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10192 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10193   echo $ac_n "(cached) $ac_c" 1>&6
10194 else
10195   ac_save_LIBS="$LIBS"
10196 LIBS="-liconv  $LIBS"
10197 cat > conftest.$ac_ext <<EOF
10198 #line 10199 "configure"
10199 #include "confdefs.h"
10200 /* Override any gcc2 internal prototype to avoid an error.  */
10201 /* We use char because int might match the return type of a gcc2
10202     builtin and then its argument prototype would still apply.  */
10203 char iconv_open();
10204
10205 int main() {
10206 iconv_open()
10207 ; return 0; }
10208 EOF
10209 if { (eval echo configure:10210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10210   rm -rf conftest*
10211   eval "ac_cv_lib_$ac_lib_var=yes"
10212 else
10213   echo "configure: failed program was:" >&5
10214   cat conftest.$ac_ext >&5
10215   rm -rf conftest*
10216   eval "ac_cv_lib_$ac_lib_var=no"
10217 fi
10218 rm -f conftest*
10219 LIBS="$ac_save_LIBS"
10220
10221 fi
10222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10223   echo "$ac_t""yes" 1>&6
10224     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10225     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10226   cat >> confdefs.h <<EOF
10227 #define $ac_tr_lib 1
10228 EOF
10229
10230   LIBS="-liconv $LIBS"
10231
10232 else
10233   echo "$ac_t""no" 1>&6
10234 fi
10235
10236     cat >> confdefs.h <<EOF
10237 #define WITH_LIBICONV "${withval}"
10238 EOF
10239
10240     ;;
10241   esac 
10242 else
10243   echo "$ac_t""no" 1>&6
10244
10245 fi
10246
10247
10248
10249 ############
10250 # check for iconv in libc
10251 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10252 echo "configure:10253: checking for working iconv" >&5
10253 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10254   echo $ac_n "(cached) $ac_c" 1>&6
10255 else
10256   
10257 if test "$cross_compiling" = yes; then
10258   samba_cv_HAVE_NATIVE_ICONV=cross
10259 else
10260   cat > conftest.$ac_ext <<EOF
10261 #line 10262 "configure"
10262 #include "confdefs.h"
10263
10264 #include <iconv.h>
10265 main() {
10266        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10267        if (cd == 0 || cd == (iconv_t)-1) return -1;
10268        return 0;
10269 }
10270
10271 EOF
10272 if { (eval echo configure:10273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10273 then
10274   samba_cv_HAVE_NATIVE_ICONV=yes
10275 else
10276   echo "configure: failed program was:" >&5
10277   cat conftest.$ac_ext >&5
10278   rm -fr conftest*
10279   samba_cv_HAVE_NATIVE_ICONV=no
10280 fi
10281 rm -fr conftest*
10282 fi
10283
10284 fi
10285
10286 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10287 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10288     cat >> confdefs.h <<\EOF
10289 #define HAVE_NATIVE_ICONV 1
10290 EOF
10291
10292 fi
10293
10294
10295 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10296 echo "configure:10297: checking for Linux kernel oplocks" >&5
10297 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10298   echo $ac_n "(cached) $ac_c" 1>&6
10299 else
10300   
10301 if test "$cross_compiling" = yes; then
10302   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10303 else
10304   cat > conftest.$ac_ext <<EOF
10305 #line 10306 "configure"
10306 #include "confdefs.h"
10307
10308 #include <sys/types.h>
10309 #include <fcntl.h>
10310 #ifndef F_GETLEASE
10311 #define F_GETLEASE      1025
10312 #endif
10313 main() {
10314        int fd = open("/dev/null", O_RDONLY);
10315        return fcntl(fd, F_GETLEASE, 0) == -1;
10316 }
10317
10318 EOF
10319 if { (eval echo configure:10320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10320 then
10321   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10322 else
10323   echo "configure: failed program was:" >&5
10324   cat conftest.$ac_ext >&5
10325   rm -fr conftest*
10326   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10327 fi
10328 rm -fr conftest*
10329 fi
10330
10331 fi
10332
10333 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10334 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10335     cat >> confdefs.h <<\EOF
10336 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10337 EOF
10338
10339 fi
10340
10341 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10342 echo "configure:10343: checking for kernel change notify support" >&5
10343 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10344   echo $ac_n "(cached) $ac_c" 1>&6
10345 else
10346   
10347 if test "$cross_compiling" = yes; then
10348   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10349 else
10350   cat > conftest.$ac_ext <<EOF
10351 #line 10352 "configure"
10352 #include "confdefs.h"
10353
10354 #include <sys/types.h>
10355 #include <fcntl.h>
10356 #include <signal.h>
10357 #ifndef F_NOTIFY
10358 #define F_NOTIFY 1026
10359 #endif
10360 main() {
10361         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10362 }
10363
10364 EOF
10365 if { (eval echo configure:10366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10366 then
10367   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10368 else
10369   echo "configure: failed program was:" >&5
10370   cat conftest.$ac_ext >&5
10371   rm -fr conftest*
10372   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10373 fi
10374 rm -fr conftest*
10375 fi
10376
10377 fi
10378
10379 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10380 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10381     cat >> confdefs.h <<\EOF
10382 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10383 EOF
10384
10385 fi
10386
10387 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10388 echo "configure:10389: checking for kernel share modes" >&5
10389 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10390   echo $ac_n "(cached) $ac_c" 1>&6
10391 else
10392   
10393 if test "$cross_compiling" = yes; then
10394   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10395 else
10396   cat > conftest.$ac_ext <<EOF
10397 #line 10398 "configure"
10398 #include "confdefs.h"
10399
10400 #include <sys/types.h>
10401 #include <fcntl.h>
10402 #include <signal.h>
10403 #include <sys/file.h>
10404 #ifndef LOCK_MAND
10405 #define LOCK_MAND       32
10406 #define LOCK_READ       64
10407 #endif
10408 main() {
10409         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10410 }
10411
10412 EOF
10413 if { (eval echo configure:10414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10414 then
10415   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10416 else
10417   echo "configure: failed program was:" >&5
10418   cat conftest.$ac_ext >&5
10419   rm -fr conftest*
10420   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10421 fi
10422 rm -fr conftest*
10423 fi
10424
10425 fi
10426
10427 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10428 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10429     cat >> confdefs.h <<\EOF
10430 #define HAVE_KERNEL_SHARE_MODES 1
10431 EOF
10432
10433 fi
10434
10435
10436
10437
10438 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10439 echo "configure:10440: checking for IRIX kernel oplock type definitions" >&5
10440 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10441   echo $ac_n "(cached) $ac_c" 1>&6
10442 else
10443   
10444 cat > conftest.$ac_ext <<EOF
10445 #line 10446 "configure"
10446 #include "confdefs.h"
10447 #include <sys/types.h>
10448 #include <fcntl.h>
10449 int main() {
10450 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10451 ; return 0; }
10452 EOF
10453 if { (eval echo configure:10454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10454   rm -rf conftest*
10455   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10456 else
10457   echo "configure: failed program was:" >&5
10458   cat conftest.$ac_ext >&5
10459   rm -rf conftest*
10460   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10461 fi
10462 rm -f conftest*
10463 fi
10464
10465 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10466 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10467     cat >> confdefs.h <<\EOF
10468 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10469 EOF
10470
10471 fi
10472
10473 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10474 echo "configure:10475: checking for irix specific capabilities" >&5
10475 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10476   echo $ac_n "(cached) $ac_c" 1>&6
10477 else
10478   
10479 if test "$cross_compiling" = yes; then
10480   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10481 else
10482   cat > conftest.$ac_ext <<EOF
10483 #line 10484 "configure"
10484 #include "confdefs.h"
10485 #include <sys/types.h>
10486 #include <sys/capability.h>
10487 main() {
10488  cap_t cap;
10489  if ((cap = cap_get_proc()) == NULL)
10490    exit(1);
10491  cap->cap_effective |= CAP_NETWORK_MGT;
10492  cap->cap_inheritable |= CAP_NETWORK_MGT;
10493  cap_set_proc(cap);
10494  exit(0);
10495 }
10496
10497 EOF
10498 if { (eval echo configure:10499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10499 then
10500   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10501 else
10502   echo "configure: failed program was:" >&5
10503   cat conftest.$ac_ext >&5
10504   rm -fr conftest*
10505   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10506 fi
10507 rm -fr conftest*
10508 fi
10509
10510 fi
10511
10512 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10513 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10514     cat >> confdefs.h <<\EOF
10515 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10516 EOF
10517
10518 fi
10519
10520 #
10521 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10522 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10523 #
10524
10525 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10526 echo "configure:10527: checking for int16 typedef included by rpc/rpc.h" >&5
10527 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10528   echo $ac_n "(cached) $ac_c" 1>&6
10529 else
10530   
10531 cat > conftest.$ac_ext <<EOF
10532 #line 10533 "configure"
10533 #include "confdefs.h"
10534 #include <sys/types.h>
10535 #if defined(HAVE_RPC_RPC_H)
10536 #include <rpc/rpc.h>
10537 #endif
10538 int main() {
10539 int16 testvar;
10540 ; return 0; }
10541 EOF
10542 if { (eval echo configure:10543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10543   rm -rf conftest*
10544   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10545 else
10546   echo "configure: failed program was:" >&5
10547   cat conftest.$ac_ext >&5
10548   rm -rf conftest*
10549   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10550 fi
10551 rm -f conftest*
10552 fi
10553
10554 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10555 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10556     cat >> confdefs.h <<\EOF
10557 #define HAVE_INT16_FROM_RPC_RPC_H 1
10558 EOF
10559
10560 fi
10561
10562 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10563 echo "configure:10564: checking for uint16 typedef included by rpc/rpc.h" >&5
10564 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10565   echo $ac_n "(cached) $ac_c" 1>&6
10566 else
10567   
10568 cat > conftest.$ac_ext <<EOF
10569 #line 10570 "configure"
10570 #include "confdefs.h"
10571 #include <sys/types.h>
10572 #if defined(HAVE_RPC_RPC_H)
10573 #include <rpc/rpc.h>
10574 #endif
10575 int main() {
10576 uint16 testvar;
10577 ; return 0; }
10578 EOF
10579 if { (eval echo configure:10580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10580   rm -rf conftest*
10581   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10582 else
10583   echo "configure: failed program was:" >&5
10584   cat conftest.$ac_ext >&5
10585   rm -rf conftest*
10586   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10587 fi
10588 rm -f conftest*
10589 fi
10590
10591 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10592 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10593     cat >> confdefs.h <<\EOF
10594 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10595 EOF
10596
10597 fi
10598
10599 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10600 echo "configure:10601: checking for int32 typedef included by rpc/rpc.h" >&5
10601 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10602   echo $ac_n "(cached) $ac_c" 1>&6
10603 else
10604   
10605 cat > conftest.$ac_ext <<EOF
10606 #line 10607 "configure"
10607 #include "confdefs.h"
10608 #include <sys/types.h>
10609 #if defined(HAVE_RPC_RPC_H)
10610 #include <rpc/rpc.h>
10611 #endif
10612 int main() {
10613 int32 testvar;
10614 ; return 0; }
10615 EOF
10616 if { (eval echo configure:10617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10617   rm -rf conftest*
10618   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10619 else
10620   echo "configure: failed program was:" >&5
10621   cat conftest.$ac_ext >&5
10622   rm -rf conftest*
10623   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10624 fi
10625 rm -f conftest*
10626 fi
10627
10628 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10629 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10630     cat >> confdefs.h <<\EOF
10631 #define HAVE_INT32_FROM_RPC_RPC_H 1
10632 EOF
10633
10634 fi
10635
10636 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10637 echo "configure:10638: checking for uint32 typedef included by rpc/rpc.h" >&5
10638 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10639   echo $ac_n "(cached) $ac_c" 1>&6
10640 else
10641   
10642 cat > conftest.$ac_ext <<EOF
10643 #line 10644 "configure"
10644 #include "confdefs.h"
10645 #include <sys/types.h>
10646 #if defined(HAVE_RPC_RPC_H)
10647 #include <rpc/rpc.h>
10648 #endif
10649 int main() {
10650 uint32 testvar;
10651 ; return 0; }
10652 EOF
10653 if { (eval echo configure:10654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10654   rm -rf conftest*
10655   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10656 else
10657   echo "configure: failed program was:" >&5
10658   cat conftest.$ac_ext >&5
10659   rm -rf conftest*
10660   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10661 fi
10662 rm -f conftest*
10663 fi
10664
10665 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10666 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10667     cat >> confdefs.h <<\EOF
10668 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10669 EOF
10670
10671 fi
10672
10673
10674 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10675 echo "configure:10676: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10676 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10677   echo $ac_n "(cached) $ac_c" 1>&6
10678 else
10679   
10680 cat > conftest.$ac_ext <<EOF
10681 #line 10682 "configure"
10682 #include "confdefs.h"
10683 #include <sys/types.h>
10684 #ifdef HAVE_SYS_SECURITY_H
10685 #include <sys/security.h>
10686 #include <prot.h>
10687 #endif  /* HAVE_SYS_SECURITY_H */
10688 #if defined(HAVE_RPC_RPC_H)
10689 #include <rpc/rpc.h>
10690 #endif
10691 int main() {
10692 int testvar;
10693 ; return 0; }
10694 EOF
10695 if { (eval echo configure:10696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10696   rm -rf conftest*
10697   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10698 else
10699   echo "configure: failed program was:" >&5
10700   cat conftest.$ac_ext >&5
10701   rm -rf conftest*
10702   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10703 fi
10704 rm -f conftest*
10705 fi
10706
10707 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10708 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10709     cat >> confdefs.h <<\EOF
10710 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10711 EOF
10712
10713 fi
10714
10715 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10716 echo "configure:10717: checking for test routines" >&5
10717 if test "$cross_compiling" = yes; then
10718   echo "configure: warning: cannot run when cross-compiling" 1>&2
10719 else
10720   cat > conftest.$ac_ext <<EOF
10721 #line 10722 "configure"
10722 #include "confdefs.h"
10723 #include "${srcdir-.}/tests/trivial.c"
10724 EOF
10725 if { (eval echo configure:10726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10726 then
10727   echo "$ac_t""yes" 1>&6
10728 else
10729   echo "configure: failed program was:" >&5
10730   cat conftest.$ac_ext >&5
10731   rm -fr conftest*
10732   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10733 fi
10734 rm -fr conftest*
10735 fi
10736
10737
10738 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10739 echo "configure:10740: checking for ftruncate extend" >&5
10740 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10741   echo $ac_n "(cached) $ac_c" 1>&6
10742 else
10743   
10744 if test "$cross_compiling" = yes; then
10745   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10746 else
10747   cat > conftest.$ac_ext <<EOF
10748 #line 10749 "configure"
10749 #include "confdefs.h"
10750 #include "${srcdir-.}/tests/ftruncate.c"
10751 EOF
10752 if { (eval echo configure:10753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10753 then
10754   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10755 else
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -fr conftest*
10759   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10760 fi
10761 rm -fr conftest*
10762 fi
10763
10764 fi
10765
10766 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10767 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10768     cat >> confdefs.h <<\EOF
10769 #define HAVE_FTRUNCATE_EXTEND 1
10770 EOF
10771
10772 fi
10773
10774 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10775 echo "configure:10776: checking for AF_LOCAL socket support" >&5
10776 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10777   echo $ac_n "(cached) $ac_c" 1>&6
10778 else
10779   
10780 if test "$cross_compiling" = yes; then
10781   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10782 else
10783   cat > conftest.$ac_ext <<EOF
10784 #line 10785 "configure"
10785 #include "confdefs.h"
10786 #include "${srcdir-.}/tests/unixsock.c"
10787 EOF
10788 if { (eval echo configure:10789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10789 then
10790   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10791 else
10792   echo "configure: failed program was:" >&5
10793   cat conftest.$ac_ext >&5
10794   rm -fr conftest*
10795   samba_cv_HAVE_WORKING_AF_LOCAL=no
10796 fi
10797 rm -fr conftest*
10798 fi
10799
10800 fi
10801
10802 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10803 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10804 then
10805     cat >> confdefs.h <<\EOF
10806 #define HAVE_WORKING_AF_LOCAL 1
10807 EOF
10808
10809 fi
10810
10811 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10812 echo "configure:10813: checking for broken getgroups" >&5
10813 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10814   echo $ac_n "(cached) $ac_c" 1>&6
10815 else
10816   
10817 if test "$cross_compiling" = yes; then
10818   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10819 else
10820   cat > conftest.$ac_ext <<EOF
10821 #line 10822 "configure"
10822 #include "confdefs.h"
10823 #include "${srcdir-.}/tests/getgroups.c"
10824 EOF
10825 if { (eval echo configure:10826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10826 then
10827   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10828 else
10829   echo "configure: failed program was:" >&5
10830   cat conftest.$ac_ext >&5
10831   rm -fr conftest*
10832   samba_cv_HAVE_BROKEN_GETGROUPS=no
10833 fi
10834 rm -fr conftest*
10835 fi
10836
10837 fi
10838
10839 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10840 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10841     cat >> confdefs.h <<\EOF
10842 #define HAVE_BROKEN_GETGROUPS 1
10843 EOF
10844
10845 fi
10846
10847 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10848 echo "configure:10849: checking whether getpass should be replaced" >&5
10849 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10850   echo $ac_n "(cached) $ac_c" 1>&6
10851 else
10852   
10853 SAVE_CPPFLAGS="$CPPFLAGS"
10854 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10855 cat > conftest.$ac_ext <<EOF
10856 #line 10857 "configure"
10857 #include "confdefs.h"
10858
10859 #define REPLACE_GETPASS 1
10860 #define NO_CONFIG_H 1
10861 #define main dont_declare_main
10862 #include "${srcdir-.}/lib/getsmbpass.c"
10863 #undef main
10864
10865 int main() {
10866
10867 ; return 0; }
10868 EOF
10869 if { (eval echo configure:10870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10870   rm -rf conftest*
10871   samba_cv_REPLACE_GETPASS=yes
10872 else
10873   echo "configure: failed program was:" >&5
10874   cat conftest.$ac_ext >&5
10875   rm -rf conftest*
10876   samba_cv_REPLACE_GETPASS=no
10877 fi
10878 rm -f conftest*
10879 CPPFLAGS="$SAVE_CPPFLAGS"
10880
10881 fi
10882
10883 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10884 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10885         cat >> confdefs.h <<\EOF
10886 #define REPLACE_GETPASS 1
10887 EOF
10888
10889 fi
10890
10891 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10892 echo "configure:10893: checking for broken inet_ntoa" >&5
10893 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10894   echo $ac_n "(cached) $ac_c" 1>&6
10895 else
10896   
10897 if test "$cross_compiling" = yes; then
10898   samba_cv_REPLACE_INET_NTOA=cross
10899 else
10900   cat > conftest.$ac_ext <<EOF
10901 #line 10902 "configure"
10902 #include "confdefs.h"
10903
10904 #include <stdio.h>
10905 #include <sys/types.h>
10906 #include <netinet/in.h>
10907 #ifdef HAVE_ARPA_INET_H
10908 #include <arpa/inet.h>
10909 #endif
10910 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10911 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10912     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10913 exit(1);}
10914 EOF
10915 if { (eval echo configure:10916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10916 then
10917   samba_cv_REPLACE_INET_NTOA=yes
10918 else
10919   echo "configure: failed program was:" >&5
10920   cat conftest.$ac_ext >&5
10921   rm -fr conftest*
10922   samba_cv_REPLACE_INET_NTOA=no
10923 fi
10924 rm -fr conftest*
10925 fi
10926
10927 fi
10928
10929 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10930 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10931     cat >> confdefs.h <<\EOF
10932 #define REPLACE_INET_NTOA 1
10933 EOF
10934
10935 fi
10936
10937 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10938 echo "configure:10939: checking for secure mkstemp" >&5
10939 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10940   echo $ac_n "(cached) $ac_c" 1>&6
10941 else
10942   
10943 if test "$cross_compiling" = yes; then
10944   samba_cv_HAVE_SECURE_MKSTEMP=cross
10945 else
10946   cat > conftest.$ac_ext <<EOF
10947 #line 10948 "configure"
10948 #include "confdefs.h"
10949 #include <stdlib.h>
10950 #include <sys/types.h>
10951 #include <sys/stat.h>
10952 #include <unistd.h>
10953 main() { 
10954   struct stat st;
10955   char tpl[20]="/tmp/test.XXXXXX"; 
10956   int fd = mkstemp(tpl); 
10957   if (fd == -1) exit(1);
10958   unlink(tpl);
10959   if (fstat(fd, &st) != 0) exit(1);
10960   if ((st.st_mode & 0777) != 0600) exit(1);
10961   exit(0);
10962 }
10963 EOF
10964 if { (eval echo configure:10965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10965 then
10966   samba_cv_HAVE_SECURE_MKSTEMP=yes
10967 else
10968   echo "configure: failed program was:" >&5
10969   cat conftest.$ac_ext >&5
10970   rm -fr conftest*
10971   samba_cv_HAVE_SECURE_MKSTEMP=no
10972 fi
10973 rm -fr conftest*
10974 fi
10975
10976 fi
10977
10978 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10979 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10980     cat >> confdefs.h <<\EOF
10981 #define HAVE_SECURE_MKSTEMP 1
10982 EOF
10983
10984 fi
10985
10986 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10987 echo "configure:10988: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10988 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10989   echo $ac_n "(cached) $ac_c" 1>&6
10990 else
10991   
10992 if test "$cross_compiling" = yes; then
10993   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10994 else
10995   cat > conftest.$ac_ext <<EOF
10996 #line 10997 "configure"
10997 #include "confdefs.h"
10998 #include <unistd.h>
10999 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11000 EOF
11001 if { (eval echo configure:11002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11002 then
11003   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11004 else
11005   echo "configure: failed program was:" >&5
11006   cat conftest.$ac_ext >&5
11007   rm -fr conftest*
11008   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11009 fi
11010 rm -fr conftest*
11011 fi
11012
11013 fi
11014
11015 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11016 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11017     cat >> confdefs.h <<\EOF
11018 #define SYSCONF_SC_NGROUPS_MAX 1
11019 EOF
11020
11021 fi
11022
11023 echo $ac_n "checking for root""... $ac_c" 1>&6
11024 echo "configure:11025: checking for root" >&5
11025 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11026   echo $ac_n "(cached) $ac_c" 1>&6
11027 else
11028   
11029 if test "$cross_compiling" = yes; then
11030   samba_cv_HAVE_ROOT=cross
11031 else
11032   cat > conftest.$ac_ext <<EOF
11033 #line 11034 "configure"
11034 #include "confdefs.h"
11035 main() { exit(getuid() != 0); }
11036 EOF
11037 if { (eval echo configure:11038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11038 then
11039   samba_cv_HAVE_ROOT=yes
11040 else
11041   echo "configure: failed program was:" >&5
11042   cat conftest.$ac_ext >&5
11043   rm -fr conftest*
11044   samba_cv_HAVE_ROOT=no
11045 fi
11046 rm -fr conftest*
11047 fi
11048
11049 fi
11050
11051 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11052 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11053     cat >> confdefs.h <<\EOF
11054 #define HAVE_ROOT 1
11055 EOF
11056
11057 else
11058     echo "configure: warning: running as non-root will disable some tests" 1>&2
11059 fi
11060
11061 ##################
11062 # look for a method of finding the list of network interfaces
11063 iface=no;
11064 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11065 echo "configure:11066: checking for iface AIX" >&5
11066 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11067   echo $ac_n "(cached) $ac_c" 1>&6
11068 else
11069   
11070 if test "$cross_compiling" = yes; then
11071   samba_cv_HAVE_IFACE_AIX=cross
11072 else
11073   cat > conftest.$ac_ext <<EOF
11074 #line 11075 "configure"
11075 #include "confdefs.h"
11076
11077 #define HAVE_IFACE_AIX 1
11078 #define AUTOCONF_TEST 1
11079 #include "confdefs.h"
11080 #include "${srcdir-.}/lib/interfaces.c"
11081 EOF
11082 if { (eval echo configure:11083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11083 then
11084   samba_cv_HAVE_IFACE_AIX=yes
11085 else
11086   echo "configure: failed program was:" >&5
11087   cat conftest.$ac_ext >&5
11088   rm -fr conftest*
11089   samba_cv_HAVE_IFACE_AIX=no
11090 fi
11091 rm -fr conftest*
11092 fi
11093
11094 fi
11095
11096 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11097 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11098     iface=yes;cat >> confdefs.h <<\EOF
11099 #define HAVE_IFACE_AIX 1
11100 EOF
11101
11102 fi
11103
11104 if test $iface = no; then
11105 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11106 echo "configure:11107: checking for iface ifconf" >&5
11107 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11108   echo $ac_n "(cached) $ac_c" 1>&6
11109 else
11110   
11111 if test "$cross_compiling" = yes; then
11112   samba_cv_HAVE_IFACE_IFCONF=cross
11113 else
11114   cat > conftest.$ac_ext <<EOF
11115 #line 11116 "configure"
11116 #include "confdefs.h"
11117
11118 #define HAVE_IFACE_IFCONF 1
11119 #define AUTOCONF_TEST 1
11120 #include "confdefs.h"
11121 #include "${srcdir-.}/lib/interfaces.c"
11122 EOF
11123 if { (eval echo configure:11124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11124 then
11125   samba_cv_HAVE_IFACE_IFCONF=yes
11126 else
11127   echo "configure: failed program was:" >&5
11128   cat conftest.$ac_ext >&5
11129   rm -fr conftest*
11130   samba_cv_HAVE_IFACE_IFCONF=no
11131 fi
11132 rm -fr conftest*
11133 fi
11134
11135 fi
11136
11137 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11138 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11139     iface=yes;cat >> confdefs.h <<\EOF
11140 #define HAVE_IFACE_IFCONF 1
11141 EOF
11142
11143 fi
11144 fi
11145
11146 if test $iface = no; then
11147 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11148 echo "configure:11149: checking for iface ifreq" >&5
11149 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11150   echo $ac_n "(cached) $ac_c" 1>&6
11151 else
11152   
11153 if test "$cross_compiling" = yes; then
11154   samba_cv_HAVE_IFACE_IFREQ=cross
11155 else
11156   cat > conftest.$ac_ext <<EOF
11157 #line 11158 "configure"
11158 #include "confdefs.h"
11159
11160 #define HAVE_IFACE_IFREQ 1
11161 #define AUTOCONF_TEST 1
11162 #include "confdefs.h"
11163 #include "${srcdir-.}/lib/interfaces.c"
11164 EOF
11165 if { (eval echo configure:11166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11166 then
11167   samba_cv_HAVE_IFACE_IFREQ=yes
11168 else
11169   echo "configure: failed program was:" >&5
11170   cat conftest.$ac_ext >&5
11171   rm -fr conftest*
11172   samba_cv_HAVE_IFACE_IFREQ=no
11173 fi
11174 rm -fr conftest*
11175 fi
11176
11177 fi
11178
11179 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11180 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11181     iface=yes;cat >> confdefs.h <<\EOF
11182 #define HAVE_IFACE_IFREQ 1
11183 EOF
11184
11185 fi
11186 fi
11187
11188
11189 ################################################
11190 # look for a method of setting the effective uid
11191 seteuid=no;
11192 if test $seteuid = no; then
11193 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11194 echo "configure:11195: checking for setresuid" >&5
11195 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11196   echo $ac_n "(cached) $ac_c" 1>&6
11197 else
11198   
11199 if test "$cross_compiling" = yes; then
11200   samba_cv_USE_SETRESUID=cross
11201 else
11202   cat > conftest.$ac_ext <<EOF
11203 #line 11204 "configure"
11204 #include "confdefs.h"
11205
11206 #define AUTOCONF_TEST 1
11207 #define USE_SETRESUID 1
11208 #include "confdefs.h"
11209 #include "${srcdir-.}/lib/util_sec.c"
11210 EOF
11211 if { (eval echo configure:11212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11212 then
11213   samba_cv_USE_SETRESUID=yes
11214 else
11215   echo "configure: failed program was:" >&5
11216   cat conftest.$ac_ext >&5
11217   rm -fr conftest*
11218   samba_cv_USE_SETRESUID=no
11219 fi
11220 rm -fr conftest*
11221 fi
11222
11223 fi
11224
11225 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11226 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11227     seteuid=yes;cat >> confdefs.h <<\EOF
11228 #define USE_SETRESUID 1
11229 EOF
11230
11231 fi
11232 fi
11233
11234
11235 if test $seteuid = no; then
11236 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11237 echo "configure:11238: checking for setreuid" >&5
11238 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+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_USE_SETREUID=cross
11244 else
11245   cat > conftest.$ac_ext <<EOF
11246 #line 11247 "configure"
11247 #include "confdefs.h"
11248
11249 #define AUTOCONF_TEST 1
11250 #define USE_SETREUID 1
11251 #include "confdefs.h"
11252 #include "${srcdir-.}/lib/util_sec.c"
11253 EOF
11254 if { (eval echo configure:11255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11255 then
11256   samba_cv_USE_SETREUID=yes
11257 else
11258   echo "configure: failed program was:" >&5
11259   cat conftest.$ac_ext >&5
11260   rm -fr conftest*
11261   samba_cv_USE_SETREUID=no
11262 fi
11263 rm -fr conftest*
11264 fi
11265
11266 fi
11267
11268 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11269 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11270     seteuid=yes;cat >> confdefs.h <<\EOF
11271 #define USE_SETREUID 1
11272 EOF
11273
11274 fi
11275 fi
11276
11277 if test $seteuid = no; then
11278 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11279 echo "configure:11280: checking for seteuid" >&5
11280 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11281   echo $ac_n "(cached) $ac_c" 1>&6
11282 else
11283   
11284 if test "$cross_compiling" = yes; then
11285   samba_cv_USE_SETEUID=cross
11286 else
11287   cat > conftest.$ac_ext <<EOF
11288 #line 11289 "configure"
11289 #include "confdefs.h"
11290
11291 #define AUTOCONF_TEST 1
11292 #define USE_SETEUID 1
11293 #include "confdefs.h"
11294 #include "${srcdir-.}/lib/util_sec.c"
11295 EOF
11296 if { (eval echo configure:11297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11297 then
11298   samba_cv_USE_SETEUID=yes
11299 else
11300   echo "configure: failed program was:" >&5
11301   cat conftest.$ac_ext >&5
11302   rm -fr conftest*
11303   samba_cv_USE_SETEUID=no
11304 fi
11305 rm -fr conftest*
11306 fi
11307
11308 fi
11309
11310 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11311 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11312     seteuid=yes;cat >> confdefs.h <<\EOF
11313 #define USE_SETEUID 1
11314 EOF
11315
11316 fi
11317 fi
11318
11319 if test $seteuid = no; then
11320 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11321 echo "configure:11322: checking for setuidx" >&5
11322 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11323   echo $ac_n "(cached) $ac_c" 1>&6
11324 else
11325   
11326 if test "$cross_compiling" = yes; then
11327   samba_cv_USE_SETUIDX=cross
11328 else
11329   cat > conftest.$ac_ext <<EOF
11330 #line 11331 "configure"
11331 #include "confdefs.h"
11332
11333 #define AUTOCONF_TEST 1
11334 #define USE_SETUIDX 1
11335 #include "confdefs.h"
11336 #include "${srcdir-.}/lib/util_sec.c"
11337 EOF
11338 if { (eval echo configure:11339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11339 then
11340   samba_cv_USE_SETUIDX=yes
11341 else
11342   echo "configure: failed program was:" >&5
11343   cat conftest.$ac_ext >&5
11344   rm -fr conftest*
11345   samba_cv_USE_SETUIDX=no
11346 fi
11347 rm -fr conftest*
11348 fi
11349
11350 fi
11351
11352 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11353 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11354     seteuid=yes;cat >> confdefs.h <<\EOF
11355 #define USE_SETUIDX 1
11356 EOF
11357
11358 fi
11359 fi
11360
11361
11362 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11363 echo "configure:11364: checking for working mmap" >&5
11364 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11365   echo $ac_n "(cached) $ac_c" 1>&6
11366 else
11367   
11368 if test "$cross_compiling" = yes; then
11369   samba_cv_HAVE_MMAP=cross
11370 else
11371   cat > conftest.$ac_ext <<EOF
11372 #line 11373 "configure"
11373 #include "confdefs.h"
11374 #include "${srcdir-.}/tests/shared_mmap.c"
11375 EOF
11376 if { (eval echo configure:11377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11377 then
11378   samba_cv_HAVE_MMAP=yes
11379 else
11380   echo "configure: failed program was:" >&5
11381   cat conftest.$ac_ext >&5
11382   rm -fr conftest*
11383   samba_cv_HAVE_MMAP=no
11384 fi
11385 rm -fr conftest*
11386 fi
11387
11388 fi
11389
11390 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11391 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11392     cat >> confdefs.h <<\EOF
11393 #define HAVE_MMAP 1
11394 EOF
11395
11396 fi
11397
11398 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11399 echo "configure:11400: checking for ftruncate needs root" >&5
11400 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11401   echo $ac_n "(cached) $ac_c" 1>&6
11402 else
11403   
11404 if test "$cross_compiling" = yes; then
11405   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11406 else
11407   cat > conftest.$ac_ext <<EOF
11408 #line 11409 "configure"
11409 #include "confdefs.h"
11410 #include "${srcdir-.}/tests/ftruncroot.c"
11411 EOF
11412 if { (eval echo configure:11413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11413 then
11414   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11415 else
11416   echo "configure: failed program was:" >&5
11417   cat conftest.$ac_ext >&5
11418   rm -fr conftest*
11419   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11420 fi
11421 rm -fr conftest*
11422 fi
11423
11424 fi
11425
11426 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11427 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11428     cat >> confdefs.h <<\EOF
11429 #define FTRUNCATE_NEEDS_ROOT 1
11430 EOF
11431
11432 fi
11433
11434 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11435 echo "configure:11436: checking for fcntl locking" >&5
11436 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11437   echo $ac_n "(cached) $ac_c" 1>&6
11438 else
11439   
11440 if test "$cross_compiling" = yes; then
11441   samba_cv_HAVE_FCNTL_LOCK=cross
11442 else
11443   cat > conftest.$ac_ext <<EOF
11444 #line 11445 "configure"
11445 #include "confdefs.h"
11446 #include "${srcdir-.}/tests/fcntl_lock.c"
11447 EOF
11448 if { (eval echo configure:11449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11449 then
11450   samba_cv_HAVE_FCNTL_LOCK=yes
11451 else
11452   echo "configure: failed program was:" >&5
11453   cat conftest.$ac_ext >&5
11454   rm -fr conftest*
11455   samba_cv_HAVE_FCNTL_LOCK=no
11456 fi
11457 rm -fr conftest*
11458 fi
11459
11460 fi
11461
11462 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11463 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11464     cat >> confdefs.h <<\EOF
11465 #define HAVE_FCNTL_LOCK 1
11466 EOF
11467
11468 fi
11469
11470 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11471 echo "configure:11472: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11472 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11473   echo $ac_n "(cached) $ac_c" 1>&6
11474 else
11475   
11476 if test "$cross_compiling" = yes; then
11477   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11478 else
11479   cat > conftest.$ac_ext <<EOF
11480 #line 11481 "configure"
11481 #include "confdefs.h"
11482 #include "${srcdir-.}/tests/fcntl_lock64.c"
11483 EOF
11484 if { (eval echo configure:11485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11485 then
11486   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11487 else
11488   echo "configure: failed program was:" >&5
11489   cat conftest.$ac_ext >&5
11490   rm -fr conftest*
11491   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11492 fi
11493 rm -fr conftest*
11494 fi
11495
11496 fi
11497
11498 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11499 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11500     cat >> confdefs.h <<\EOF
11501 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11502 EOF
11503
11504
11505 else
11506
11507
11508   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11509 echo "configure:11510: checking for 64 bit fcntl locking" >&5
11510 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11511   echo $ac_n "(cached) $ac_c" 1>&6
11512 else
11513   
11514   if test "$cross_compiling" = yes; then
11515   samba_cv_HAVE_STRUCT_FLOCK64=cross
11516 else
11517   cat > conftest.$ac_ext <<EOF
11518 #line 11519 "configure"
11519 #include "confdefs.h"
11520
11521 #if defined(HAVE_UNISTD_H)
11522 #include <unistd.h>
11523 #endif
11524 #include <stdio.h>
11525 #include <stdlib.h>
11526
11527 #ifdef HAVE_FCNTL_H
11528 #include <fcntl.h>
11529 #endif
11530
11531 #ifdef HAVE_SYS_FCNTL_H
11532 #include <sys/fcntl.h>
11533 #endif
11534 main() { struct flock64 fl64;
11535 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11536 exit(0);
11537 #else
11538 exit(1);
11539 #endif
11540 }
11541 EOF
11542 if { (eval echo configure:11543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11543 then
11544   samba_cv_HAVE_STRUCT_FLOCK64=yes
11545 else
11546   echo "configure: failed program was:" >&5
11547   cat conftest.$ac_ext >&5
11548   rm -fr conftest*
11549   samba_cv_HAVE_STRUCT_FLOCK64=no
11550 fi
11551 rm -fr conftest*
11552 fi
11553
11554 fi
11555
11556 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11557
11558   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11559       cat >> confdefs.h <<\EOF
11560 #define HAVE_STRUCT_FLOCK64 1
11561 EOF
11562
11563   fi
11564 fi
11565
11566 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11567 echo "configure:11568: checking for st_blocks in struct stat" >&5
11568 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11569   echo $ac_n "(cached) $ac_c" 1>&6
11570 else
11571   
11572 cat > conftest.$ac_ext <<EOF
11573 #line 11574 "configure"
11574 #include "confdefs.h"
11575 #include <sys/types.h>
11576 #include <sys/stat.h>
11577 #include <unistd.h>
11578 int main() {
11579 struct stat st;  st.st_blocks = 0;
11580 ; return 0; }
11581 EOF
11582 if { (eval echo configure:11583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11583   rm -rf conftest*
11584   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11585 else
11586   echo "configure: failed program was:" >&5
11587   cat conftest.$ac_ext >&5
11588   rm -rf conftest*
11589   samba_cv_HAVE_STAT_ST_BLOCKS=no
11590 fi
11591 rm -f conftest*
11592 fi
11593
11594 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11595 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11596     cat >> confdefs.h <<\EOF
11597 #define HAVE_STAT_ST_BLOCKS 1
11598 EOF
11599
11600 fi 
11601
11602 case "$host_os" in
11603 *linux*)
11604 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11605 echo "configure:11606: checking for broken RedHat 7.2 system header files" >&5
11606 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11607   echo $ac_n "(cached) $ac_c" 1>&6
11608 else
11609   
11610 cat > conftest.$ac_ext <<EOF
11611 #line 11612 "configure"
11612 #include "confdefs.h"
11613
11614 #ifdef HAVE_SYS_VFS_H
11615 #include <sys/vfs.h>
11616 #endif
11617 #ifdef HAVE_SYS_CAPABILITY_H
11618 #include <sys/capability.h>
11619 #endif
11620
11621 int main() {
11622 int i;
11623 ; return 0; }
11624 EOF
11625 if { (eval echo configure:11626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11626   rm -rf conftest*
11627   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11628 else
11629   echo "configure: failed program was:" >&5
11630   cat conftest.$ac_ext >&5
11631   rm -rf conftest*
11632   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11633 fi
11634 rm -f conftest*
11635 fi
11636
11637 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11638 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11639    cat >> confdefs.h <<\EOF
11640 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11641 EOF
11642
11643 fi
11644 ;;
11645 esac
11646
11647 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11648 echo "configure:11649: checking for broken nisplus include files" >&5
11649 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11650   echo $ac_n "(cached) $ac_c" 1>&6
11651 else
11652   
11653 cat > conftest.$ac_ext <<EOF
11654 #line 11655 "configure"
11655 #include "confdefs.h"
11656 #include <sys/acl.h>
11657 #if defined(HAVE_RPCSVC_NIS_H)
11658 #include <rpcsvc/nis.h>
11659 #endif
11660 int main() {
11661 int i;
11662 ; return 0; }
11663 EOF
11664 if { (eval echo configure:11665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11665   rm -rf conftest*
11666   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11667 else
11668   echo "configure: failed program was:" >&5
11669   cat conftest.$ac_ext >&5
11670   rm -rf conftest*
11671   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11672 fi
11673 rm -f conftest*
11674 fi
11675
11676 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11677 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11678     cat >> confdefs.h <<\EOF
11679 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11680 EOF
11681
11682 fi
11683
11684
11685 #################################################
11686 # check for smbwrapper support
11687 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11688 echo "configure:11689: checking whether to use smbwrapper" >&5
11689 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11690 if test "${with_smbwrapper+set}" = set; then
11691   withval="$with_smbwrapper"
11692    case "$withval" in
11693   yes)
11694     echo "$ac_t""yes" 1>&6
11695     cat >> confdefs.h <<\EOF
11696 #define WITH_SMBWRAPPER 1
11697 EOF
11698
11699         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11700
11701         if test x$ATTEMPT_WRAP32_BUILD = x; then
11702                 WRAP32=""
11703         else
11704                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11705         fi
11706
11707 # Conditions under which smbwrapper should not be built.
11708
11709         if test x$PICFLAG = x; then
11710            echo No support for PIC code - disabling smbwrapper and smbsh
11711            WRAP=""
11712            WRAP32=""
11713         elif test x$ac_cv_func_syscall = xno; then
11714            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11715            WRAP=""
11716            WRAP32=""
11717         fi
11718     ;;
11719   *)
11720     echo "$ac_t""no" 1>&6
11721     ;;
11722   esac 
11723 else
11724   echo "$ac_t""no" 1>&6
11725
11726 fi
11727
11728
11729 #################################################
11730 # check for AFS clear-text auth support
11731 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11732 echo "configure:11733: checking whether to use AFS clear-text auth" >&5
11733 # Check whether --with-afs or --without-afs was given.
11734 if test "${with_afs+set}" = set; then
11735   withval="$with_afs"
11736    case "$withval" in
11737   yes)
11738     echo "$ac_t""yes" 1>&6
11739     cat >> confdefs.h <<\EOF
11740 #define WITH_AFS 1
11741 EOF
11742
11743     ;;
11744   *)
11745     echo "$ac_t""no" 1>&6
11746     ;;
11747   esac 
11748 else
11749   echo "$ac_t""no" 1>&6
11750
11751 fi
11752
11753
11754
11755 #################################################
11756 # check for the DFS clear-text auth system
11757 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11758 echo "configure:11759: checking whether to use DFS clear-text auth" >&5
11759 # Check whether --with-dfs or --without-dfs was given.
11760 if test "${with_dfs+set}" = set; then
11761   withval="$with_dfs"
11762    case "$withval" in
11763   yes)
11764     echo "$ac_t""yes" 1>&6
11765     cat >> confdefs.h <<\EOF
11766 #define WITH_DFS 1
11767 EOF
11768
11769     ;;
11770   *)
11771     echo "$ac_t""no" 1>&6
11772     ;;
11773   esac 
11774 else
11775   echo "$ac_t""no" 1>&6
11776
11777 fi
11778
11779
11780
11781 #################################################
11782 # see if this box has the RedHat location for kerberos
11783 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11784 echo "configure:11785: checking for /usr/kerberos" >&5
11785 if test -d /usr/kerberos; then
11786     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11787     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11788     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11789     echo "$ac_t""yes" 1>&6
11790 else
11791     echo "$ac_t""no" 1>&6
11792 fi
11793
11794 #################################################
11795 # check for location of Kerberos 5 install
11796 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11797 echo "configure:11798: checking for kerberos 5 install path" >&5
11798 # Check whether --with-krb5 or --without-krb5 was given.
11799 if test "${with_krb5+set}" = set; then
11800   withval="$with_krb5"
11801    case "$withval" in
11802   no)
11803     echo "$ac_t""no" 1>&6
11804     ;;
11805   *)
11806     echo "$ac_t""yes" 1>&6
11807     LIBS="$LIBS -lkrb5"
11808     CFLAGS="$CFLAGS -I$withval/include"
11809     CPPFLAGS="$CPPFLAGS -I$withval/include"
11810     LDFLAGS="$LDFLAGS -L$withval/lib"
11811     ;;
11812   esac 
11813 else
11814   echo "$ac_t""no" 1>&6
11815
11816 fi
11817
11818
11819 # now check for krb5.h. Some systems have the libraries without the headers!
11820 # note that this check is done here to allow for different kerberos
11821 # include paths
11822 for ac_hdr in krb5.h
11823 do
11824 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11825 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11826 echo "configure:11827: checking for $ac_hdr" >&5
11827 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11828   echo $ac_n "(cached) $ac_c" 1>&6
11829 else
11830   cat > conftest.$ac_ext <<EOF
11831 #line 11832 "configure"
11832 #include "confdefs.h"
11833 #include <$ac_hdr>
11834 EOF
11835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11836 { (eval echo configure:11837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11838 if test -z "$ac_err"; then
11839   rm -rf conftest*
11840   eval "ac_cv_header_$ac_safe=yes"
11841 else
11842   echo "$ac_err" >&5
11843   echo "configure: failed program was:" >&5
11844   cat conftest.$ac_ext >&5
11845   rm -rf conftest*
11846   eval "ac_cv_header_$ac_safe=no"
11847 fi
11848 rm -f conftest*
11849 fi
11850 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11851   echo "$ac_t""yes" 1>&6
11852     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11853   cat >> confdefs.h <<EOF
11854 #define $ac_tr_hdr 1
11855 EOF
11856  
11857 else
11858   echo "$ac_t""no" 1>&6
11859 fi
11860 done
11861
11862
11863 # now check for gssapi headers.  This is also done here to allow for
11864 # different kerberos include paths
11865 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
11866 do
11867 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11868 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11869 echo "configure:11870: checking for $ac_hdr" >&5
11870 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11871   echo $ac_n "(cached) $ac_c" 1>&6
11872 else
11873   cat > conftest.$ac_ext <<EOF
11874 #line 11875 "configure"
11875 #include "confdefs.h"
11876 #include <$ac_hdr>
11877 EOF
11878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11879 { (eval echo configure:11880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11881 if test -z "$ac_err"; then
11882   rm -rf conftest*
11883   eval "ac_cv_header_$ac_safe=yes"
11884 else
11885   echo "$ac_err" >&5
11886   echo "configure: failed program was:" >&5
11887   cat conftest.$ac_ext >&5
11888   rm -rf conftest*
11889   eval "ac_cv_header_$ac_safe=no"
11890 fi
11891 rm -f conftest*
11892 fi
11893 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11894   echo "$ac_t""yes" 1>&6
11895     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11896   cat >> confdefs.h <<EOF
11897 #define $ac_tr_hdr 1
11898 EOF
11899  
11900 else
11901   echo "$ac_t""no" 1>&6
11902 fi
11903 done
11904
11905
11906 ##################################################################
11907 # we might need the k5crypto and com_err libraries on some systems
11908 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11909 echo "configure:11910: checking for _et_list in -lcom_err" >&5
11910 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11911 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11912   echo $ac_n "(cached) $ac_c" 1>&6
11913 else
11914   ac_save_LIBS="$LIBS"
11915 LIBS="-lcom_err  $LIBS"
11916 cat > conftest.$ac_ext <<EOF
11917 #line 11918 "configure"
11918 #include "confdefs.h"
11919 /* Override any gcc2 internal prototype to avoid an error.  */
11920 /* We use char because int might match the return type of a gcc2
11921     builtin and then its argument prototype would still apply.  */
11922 char _et_list();
11923
11924 int main() {
11925 _et_list()
11926 ; return 0; }
11927 EOF
11928 if { (eval echo configure:11929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11929   rm -rf conftest*
11930   eval "ac_cv_lib_$ac_lib_var=yes"
11931 else
11932   echo "configure: failed program was:" >&5
11933   cat conftest.$ac_ext >&5
11934   rm -rf conftest*
11935   eval "ac_cv_lib_$ac_lib_var=no"
11936 fi
11937 rm -f conftest*
11938 LIBS="$ac_save_LIBS"
11939
11940 fi
11941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11942   echo "$ac_t""yes" 1>&6
11943   LIBS="$LIBS -lcom_err"
11944 else
11945   echo "$ac_t""no" 1>&6
11946 fi
11947
11948 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11949 echo "configure:11950: checking for krb5_encrypt_data in -lk5crypto" >&5
11950 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11951 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11952   echo $ac_n "(cached) $ac_c" 1>&6
11953 else
11954   ac_save_LIBS="$LIBS"
11955 LIBS="-lk5crypto  $LIBS"
11956 cat > conftest.$ac_ext <<EOF
11957 #line 11958 "configure"
11958 #include "confdefs.h"
11959 /* Override any gcc2 internal prototype to avoid an error.  */
11960 /* We use char because int might match the return type of a gcc2
11961     builtin and then its argument prototype would still apply.  */
11962 char krb5_encrypt_data();
11963
11964 int main() {
11965 krb5_encrypt_data()
11966 ; return 0; }
11967 EOF
11968 if { (eval echo configure:11969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11969   rm -rf conftest*
11970   eval "ac_cv_lib_$ac_lib_var=yes"
11971 else
11972   echo "configure: failed program was:" >&5
11973   cat conftest.$ac_ext >&5
11974   rm -rf conftest*
11975   eval "ac_cv_lib_$ac_lib_var=no"
11976 fi
11977 rm -f conftest*
11978 LIBS="$ac_save_LIBS"
11979
11980 fi
11981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11982   echo "$ac_t""yes" 1>&6
11983   LIBS="$LIBS -lk5crypto"
11984 else
11985   echo "$ac_t""no" 1>&6
11986 fi
11987
11988
11989 ########################################################
11990 # now see if we can find the krb5 libs in standard paths
11991 # or as specified above
11992 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11993 echo "configure:11994: checking for krb5_mk_req_extended in -lkrb5" >&5
11994 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11995 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11996   echo $ac_n "(cached) $ac_c" 1>&6
11997 else
11998   ac_save_LIBS="$LIBS"
11999 LIBS="-lkrb5  $LIBS"
12000 cat > conftest.$ac_ext <<EOF
12001 #line 12002 "configure"
12002 #include "confdefs.h"
12003 /* Override any gcc2 internal prototype to avoid an error.  */
12004 /* We use char because int might match the return type of a gcc2
12005     builtin and then its argument prototype would still apply.  */
12006 char krb5_mk_req_extended();
12007
12008 int main() {
12009 krb5_mk_req_extended()
12010 ; return 0; }
12011 EOF
12012 if { (eval echo configure:12013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12013   rm -rf conftest*
12014   eval "ac_cv_lib_$ac_lib_var=yes"
12015 else
12016   echo "configure: failed program was:" >&5
12017   cat conftest.$ac_ext >&5
12018   rm -rf conftest*
12019   eval "ac_cv_lib_$ac_lib_var=no"
12020 fi
12021 rm -f conftest*
12022 LIBS="$ac_save_LIBS"
12023
12024 fi
12025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12026   echo "$ac_t""yes" 1>&6
12027   LIBS="$LIBS -lkrb5";
12028         cat >> confdefs.h <<\EOF
12029 #define HAVE_KRB5 1
12030 EOF
12031
12032 else
12033   echo "$ac_t""no" 1>&6
12034 fi
12035
12036
12037 ########################################################
12038 # now see if we can find the gssapi libs in standard paths
12039 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12040 echo "configure:12041: checking for gss_display_status in -lgssapi_krb5" >&5
12041 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12042 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12043   echo $ac_n "(cached) $ac_c" 1>&6
12044 else
12045   ac_save_LIBS="$LIBS"
12046 LIBS="-lgssapi_krb5  $LIBS"
12047 cat > conftest.$ac_ext <<EOF
12048 #line 12049 "configure"
12049 #include "confdefs.h"
12050 /* Override any gcc2 internal prototype to avoid an error.  */
12051 /* We use char because int might match the return type of a gcc2
12052     builtin and then its argument prototype would still apply.  */
12053 char gss_display_status();
12054
12055 int main() {
12056 gss_display_status()
12057 ; return 0; }
12058 EOF
12059 if { (eval echo configure:12060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12060   rm -rf conftest*
12061   eval "ac_cv_lib_$ac_lib_var=yes"
12062 else
12063   echo "configure: failed program was:" >&5
12064   cat conftest.$ac_ext >&5
12065   rm -rf conftest*
12066   eval "ac_cv_lib_$ac_lib_var=no"
12067 fi
12068 rm -f conftest*
12069 LIBS="$ac_save_LIBS"
12070
12071 fi
12072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12073   echo "$ac_t""yes" 1>&6
12074   LIBS="$LIBS -lgssapi_krb5";
12075         cat >> confdefs.h <<\EOF
12076 #define HAVE_GSSAPI 1
12077 EOF
12078
12079 else
12080   echo "$ac_t""no" 1>&6
12081 fi
12082
12083
12084 ##################################################################
12085 # we might need the lber lib on some systems. To avoid link errors
12086 # this test must be before the libldap test
12087 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12088 echo "configure:12089: checking for ber_scanf in -llber" >&5
12089 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12090 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12091   echo $ac_n "(cached) $ac_c" 1>&6
12092 else
12093   ac_save_LIBS="$LIBS"
12094 LIBS="-llber  $LIBS"
12095 cat > conftest.$ac_ext <<EOF
12096 #line 12097 "configure"
12097 #include "confdefs.h"
12098 /* Override any gcc2 internal prototype to avoid an error.  */
12099 /* We use char because int might match the return type of a gcc2
12100     builtin and then its argument prototype would still apply.  */
12101 char ber_scanf();
12102
12103 int main() {
12104 ber_scanf()
12105 ; return 0; }
12106 EOF
12107 if { (eval echo configure:12108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12108   rm -rf conftest*
12109   eval "ac_cv_lib_$ac_lib_var=yes"
12110 else
12111   echo "configure: failed program was:" >&5
12112   cat conftest.$ac_ext >&5
12113   rm -rf conftest*
12114   eval "ac_cv_lib_$ac_lib_var=no"
12115 fi
12116 rm -f conftest*
12117 LIBS="$ac_save_LIBS"
12118
12119 fi
12120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12121   echo "$ac_t""yes" 1>&6
12122   LIBS="$LIBS -llber"
12123 else
12124   echo "$ac_t""no" 1>&6
12125 fi
12126
12127
12128 ########################################################
12129 # now see if we can find the ldap libs in standard paths
12130 if test x$have_ldap != xyes; then
12131 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12132 echo "configure:12133: checking for ldap_domain2hostlist in -lldap" >&5
12133 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12134 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12135   echo $ac_n "(cached) $ac_c" 1>&6
12136 else
12137   ac_save_LIBS="$LIBS"
12138 LIBS="-lldap  $LIBS"
12139 cat > conftest.$ac_ext <<EOF
12140 #line 12141 "configure"
12141 #include "confdefs.h"
12142 /* Override any gcc2 internal prototype to avoid an error.  */
12143 /* We use char because int might match the return type of a gcc2
12144     builtin and then its argument prototype would still apply.  */
12145 char ldap_domain2hostlist();
12146
12147 int main() {
12148 ldap_domain2hostlist()
12149 ; return 0; }
12150 EOF
12151 if { (eval echo configure:12152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12152   rm -rf conftest*
12153   eval "ac_cv_lib_$ac_lib_var=yes"
12154 else
12155   echo "configure: failed program was:" >&5
12156   cat conftest.$ac_ext >&5
12157   rm -rf conftest*
12158   eval "ac_cv_lib_$ac_lib_var=no"
12159 fi
12160 rm -f conftest*
12161 LIBS="$ac_save_LIBS"
12162
12163 fi
12164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12165   echo "$ac_t""yes" 1>&6
12166   LIBS="$LIBS -lldap";
12167         cat >> confdefs.h <<\EOF
12168 #define HAVE_LDAP 1
12169 EOF
12170
12171 else
12172   echo "$ac_t""no" 1>&6
12173 fi
12174
12175 fi
12176
12177 #################################################
12178 # check for automount support
12179 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12180 echo "configure:12181: checking whether to use AUTOMOUNT" >&5
12181 # Check whether --with-automount or --without-automount was given.
12182 if test "${with_automount+set}" = set; then
12183   withval="$with_automount"
12184    case "$withval" in
12185   yes)
12186     echo "$ac_t""yes" 1>&6
12187     cat >> confdefs.h <<\EOF
12188 #define WITH_AUTOMOUNT 1
12189 EOF
12190
12191     ;;
12192   *)
12193     echo "$ac_t""no" 1>&6
12194     ;;
12195   esac 
12196 else
12197   echo "$ac_t""no" 1>&6
12198
12199 fi
12200
12201
12202 #################################################
12203 # check for smbmount support
12204 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12205 echo "configure:12206: checking whether to use SMBMOUNT" >&5
12206 # Check whether --with-smbmount or --without-smbmount was given.
12207 if test "${with_smbmount+set}" = set; then
12208   withval="$with_smbmount"
12209    case "$withval" in
12210   yes)
12211         case "$host_os" in
12212         *linux*)
12213                 echo "$ac_t""yes" 1>&6
12214                 cat >> confdefs.h <<\EOF
12215 #define WITH_SMBMOUNT 1
12216 EOF
12217
12218                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12219                 ;;
12220         *)
12221                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12222                 ;;
12223         esac
12224     ;;
12225   *)
12226     echo "$ac_t""no" 1>&6
12227     MPROGS=
12228     ;;
12229   esac 
12230 else
12231   echo "$ac_t""no" 1>&6
12232   MPROGS=
12233
12234 fi
12235
12236
12237
12238 #################################################
12239 # check for a PAM clear-text auth, accounts, password and session support
12240 with_pam_for_crypt=no
12241 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12242 echo "configure:12243: checking whether to use PAM" >&5
12243 # Check whether --with-pam or --without-pam was given.
12244 if test "${with_pam+set}" = set; then
12245   withval="$with_pam"
12246    case "$withval" in
12247   yes)
12248     echo "$ac_t""yes" 1>&6
12249     cat >> confdefs.h <<\EOF
12250 #define WITH_PAM 1
12251 EOF
12252
12253     LIBS="$LIBS -lpam"
12254     with_pam_for_crypt=yes
12255     ;;
12256   *)
12257     echo "$ac_t""no" 1>&6
12258     ;;
12259   esac 
12260 else
12261   echo "$ac_t""no" 1>&6
12262
12263 fi
12264
12265
12266 # we can't build a pam module if we don't have pam.
12267 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12268 echo "configure:12269: checking for pam_get_data in -lpam" >&5
12269 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12270 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12271   echo $ac_n "(cached) $ac_c" 1>&6
12272 else
12273   ac_save_LIBS="$LIBS"
12274 LIBS="-lpam  $LIBS"
12275 cat > conftest.$ac_ext <<EOF
12276 #line 12277 "configure"
12277 #include "confdefs.h"
12278 /* Override any gcc2 internal prototype to avoid an error.  */
12279 /* We use char because int might match the return type of a gcc2
12280     builtin and then its argument prototype would still apply.  */
12281 char pam_get_data();
12282
12283 int main() {
12284 pam_get_data()
12285 ; return 0; }
12286 EOF
12287 if { (eval echo configure:12288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12288   rm -rf conftest*
12289   eval "ac_cv_lib_$ac_lib_var=yes"
12290 else
12291   echo "configure: failed program was:" >&5
12292   cat conftest.$ac_ext >&5
12293   rm -rf conftest*
12294   eval "ac_cv_lib_$ac_lib_var=no"
12295 fi
12296 rm -f conftest*
12297 LIBS="$ac_save_LIBS"
12298
12299 fi
12300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12301   echo "$ac_t""yes" 1>&6
12302   cat >> confdefs.h <<\EOF
12303 #define HAVE_LIBPAM 1
12304 EOF
12305
12306 else
12307   echo "$ac_t""no" 1>&6
12308 fi
12309
12310
12311 #################################################
12312 # check for pam_smbpass support
12313 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12314 echo "configure:12315: checking whether to use pam_smbpass" >&5
12315 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12316 if test "${with_pam_smbpass+set}" = set; then
12317   withval="$with_pam_smbpass"
12318    case "$withval" in
12319   yes)
12320     echo "$ac_t""yes" 1>&6
12321
12322 # Conditions under which pam_smbpass should not be built.
12323
12324        if test x$PICFLAG = x; then
12325           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12326           PAM_MOD=""
12327        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12328           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12329           PAM_MOD=""
12330        else
12331           PAM_MOD="bin/pam_smbpass.so"
12332        fi
12333     ;;
12334   *)
12335     echo "$ac_t""no" 1>&6
12336     ;;
12337   esac 
12338 else
12339   echo "$ac_t""no" 1>&6
12340
12341 fi
12342
12343
12344
12345 ###############################################
12346 # test for where we get crypt() from, but only
12347 # if not using PAM
12348 if test $with_pam_for_crypt = no; then
12349 for ac_func in crypt
12350 do
12351 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12352 echo "configure:12353: checking for $ac_func" >&5
12353 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12354   echo $ac_n "(cached) $ac_c" 1>&6
12355 else
12356   cat > conftest.$ac_ext <<EOF
12357 #line 12358 "configure"
12358 #include "confdefs.h"
12359 /* System header to define __stub macros and hopefully few prototypes,
12360     which can conflict with char $ac_func(); below.  */
12361 #include <assert.h>
12362 /* Override any gcc2 internal prototype to avoid an error.  */
12363 /* We use char because int might match the return type of a gcc2
12364     builtin and then its argument prototype would still apply.  */
12365 char $ac_func();
12366
12367 int main() {
12368
12369 /* The GNU C library defines this for functions which it implements
12370     to always fail with ENOSYS.  Some functions are actually named
12371     something starting with __ and the normal name is an alias.  */
12372 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12373 choke me
12374 #else
12375 $ac_func();
12376 #endif
12377
12378 ; return 0; }
12379 EOF
12380 if { (eval echo configure:12381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12381   rm -rf conftest*
12382   eval "ac_cv_func_$ac_func=yes"
12383 else
12384   echo "configure: failed program was:" >&5
12385   cat conftest.$ac_ext >&5
12386   rm -rf conftest*
12387   eval "ac_cv_func_$ac_func=no"
12388 fi
12389 rm -f conftest*
12390 fi
12391
12392 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12393   echo "$ac_t""yes" 1>&6
12394     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12395   cat >> confdefs.h <<EOF
12396 #define $ac_tr_func 1
12397 EOF
12398  
12399 else
12400   echo "$ac_t""no" 1>&6
12401 fi
12402 done
12403
12404 if test x"$ac_cv_func_crypt" = x"no"; then
12405     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12406 echo "configure:12407: checking for crypt in -lcrypt" >&5
12407 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12408 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12409   echo $ac_n "(cached) $ac_c" 1>&6
12410 else
12411   ac_save_LIBS="$LIBS"
12412 LIBS="-lcrypt  $LIBS"
12413 cat > conftest.$ac_ext <<EOF
12414 #line 12415 "configure"
12415 #include "confdefs.h"
12416 /* Override any gcc2 internal prototype to avoid an error.  */
12417 /* We use char because int might match the return type of a gcc2
12418     builtin and then its argument prototype would still apply.  */
12419 char crypt();
12420
12421 int main() {
12422 crypt()
12423 ; return 0; }
12424 EOF
12425 if { (eval echo configure:12426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12426   rm -rf conftest*
12427   eval "ac_cv_lib_$ac_lib_var=yes"
12428 else
12429   echo "configure: failed program was:" >&5
12430   cat conftest.$ac_ext >&5
12431   rm -rf conftest*
12432   eval "ac_cv_lib_$ac_lib_var=no"
12433 fi
12434 rm -f conftest*
12435 LIBS="$ac_save_LIBS"
12436
12437 fi
12438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12439   echo "$ac_t""yes" 1>&6
12440   LIBS="$LIBS -lcrypt";
12441         cat >> confdefs.h <<\EOF
12442 #define HAVE_CRYPT 1
12443 EOF
12444
12445 else
12446   echo "$ac_t""no" 1>&6
12447 fi
12448
12449 fi
12450 fi
12451
12452 ##
12453 ## moved after the check for -lcrypt in order to
12454 ## ensure that the necessary libraries are included
12455 ## check checking for truncated salt.  Wrapped by the
12456 ## $with_pam_for_crypt variable as above   --jerry
12457 ##
12458 if test $with_pam_for_crypt = no; then
12459 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12460 echo "configure:12461: checking for a crypt that needs truncated salt" >&5
12461 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12462   echo $ac_n "(cached) $ac_c" 1>&6
12463 else
12464   
12465 if test "$cross_compiling" = yes; then
12466   samba_cv_HAVE_TRUNCATED_SALT=cross
12467 else
12468   cat > conftest.$ac_ext <<EOF
12469 #line 12470 "configure"
12470 #include "confdefs.h"
12471 #include "${srcdir-.}/tests/crypttest.c"
12472 EOF
12473 if { (eval echo configure:12474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12474 then
12475   samba_cv_HAVE_TRUNCATED_SALT=no
12476 else
12477   echo "configure: failed program was:" >&5
12478   cat conftest.$ac_ext >&5
12479   rm -fr conftest*
12480   samba_cv_HAVE_TRUNCATED_SALT=yes
12481 fi
12482 rm -fr conftest*
12483 fi
12484
12485 fi
12486
12487 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12488 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12489         cat >> confdefs.h <<\EOF
12490 #define HAVE_TRUNCATED_SALT 1
12491 EOF
12492
12493 fi
12494 fi
12495
12496
12497
12498 ########################################################################################
12499 ##
12500 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12501 ##
12502 ########################################################################################
12503
12504 #################################################
12505 # check for a TDB password database
12506 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12507 echo "configure:12508: checking whether to use TDB SAM database" >&5
12508 # Check whether --with-tdbsam or --without-tdbsam was given.
12509 if test "${with_tdbsam+set}" = set; then
12510   withval="$with_tdbsam"
12511    case "$withval" in
12512   yes)
12513     echo "$ac_t""yes" 1>&6
12514     cat >> confdefs.h <<\EOF
12515 #define WITH_TDB_SAM 1
12516 EOF
12517
12518     ;;
12519   *)
12520     echo "$ac_t""no" 1>&6
12521     ;;
12522   esac 
12523 else
12524   echo "$ac_t""no" 1>&6
12525
12526 fi
12527
12528
12529 #################################################
12530 # check for a LDAP password database
12531 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
12532 echo "configure:12533: checking whether to use LDAP SAM database" >&5
12533 # Check whether --with-ldapsam or --without-ldapsam was given.
12534 if test "${with_ldapsam+set}" = set; then
12535   withval="$with_ldapsam"
12536    case "$withval" in
12537   yes)
12538     echo "$ac_t""yes" 1>&6
12539     cat >> confdefs.h <<\EOF
12540 #define WITH_LDAP_SAM 1
12541 EOF
12542
12543     LIBS="-lldap -llber $LIBS"
12544     ;;
12545   *)
12546     echo "$ac_t""no" 1>&6
12547     ;;
12548   esac 
12549 else
12550   echo "$ac_t""no" 1>&6
12551
12552 fi
12553
12554
12555 #################################################
12556 # check for a NISPLUS password database
12557 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12558 echo "configure:12559: checking whether to use NISPLUS SAM database" >&5
12559 # Check whether --with-nisplussam or --without-nisplussam was given.
12560 if test "${with_nisplussam+set}" = set; then
12561   withval="$with_nisplussam"
12562    case "$withval" in
12563   yes)
12564     echo "$ac_t""yes" 1>&6
12565     cat >> confdefs.h <<\EOF
12566 #define WITH_NISPLUS_SAM 1
12567 EOF
12568
12569     ;;
12570   *)
12571     echo "$ac_t""no" 1>&6
12572     ;;
12573   esac 
12574 else
12575   echo "$ac_t""no" 1>&6
12576
12577 fi
12578
12579
12580 ########################################################################################
12581 ##
12582 ## END OF TESTS FOR SAM BACKENDS.  
12583 ##
12584 ########################################################################################
12585
12586 #################################################
12587 # check for a NISPLUS_HOME support 
12588 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12589 echo "configure:12590: checking whether to use NISPLUS_HOME" >&5
12590 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12591 if test "${with_nisplus_home+set}" = set; then
12592   withval="$with_nisplus_home"
12593    case "$withval" in
12594   yes)
12595     echo "$ac_t""yes" 1>&6
12596     cat >> confdefs.h <<\EOF
12597 #define WITH_NISPLUS_HOME 1
12598 EOF
12599
12600     ;;
12601   *)
12602     echo "$ac_t""no" 1>&6
12603     ;;
12604   esac 
12605 else
12606   echo "$ac_t""no" 1>&6
12607
12608 fi
12609
12610
12611 #################################################
12612 # check for the secure socket layer
12613 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12614 echo "configure:12615: checking whether to use SSL" >&5
12615 # Check whether --with-ssl or --without-ssl was given.
12616 if test "${with_ssl+set}" = set; then
12617   withval="$with_ssl"
12618    case "$withval" in
12619   yes)
12620     echo "$ac_t""yes" 1>&6
12621     cat >> confdefs.h <<\EOF
12622 #define WITH_SSL 1
12623 EOF
12624
12625     withval="/usr/local/ssl"     # default
12626
12627     if test "${with_sslinc+set}" = set; then
12628
12629         withval="$with_sslinc"
12630         case "$withval" in
12631         yes|no)
12632           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12633           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12634         ;;
12635         * )
12636           CFLAGS="-I${withval} $CFLAGS"
12637         ;;
12638         esac
12639
12640     else
12641
12642         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12643
12644     fi
12645
12646     if test "${with_ssllib+set}" = set; then
12647
12648         withval="$with_ssllib"
12649         case "$withval" in
12650         yes|no)
12651           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12652           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12653         ;;
12654         * )
12655           LDFLAGS="-L${withval}/lib $LDFLAGS"
12656         ;;
12657         esac
12658
12659     else
12660
12661         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12662
12663     fi
12664
12665     LIBS="-lssl -lcrypto $LIBS"
12666
12667 #    if test ! -d ${withval}; then
12668 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12669 #      exit 1
12670 #    fi 
12671
12672     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12673
12674     ;;
12675   *)
12676     echo "$ac_t""no" 1>&6
12677     ;;
12678   esac 
12679 else
12680   echo "$ac_t""no" 1>&6
12681
12682 fi
12683
12684
12685 #################################################
12686 # check for syslog logging
12687 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12688 echo "configure:12689: checking whether to use syslog logging" >&5
12689 # Check whether --with-syslog or --without-syslog was given.
12690 if test "${with_syslog+set}" = set; then
12691   withval="$with_syslog"
12692    case "$withval" in
12693   yes)
12694     echo "$ac_t""yes" 1>&6
12695     cat >> confdefs.h <<\EOF
12696 #define WITH_SYSLOG 1
12697 EOF
12698
12699     ;;
12700   *)
12701     echo "$ac_t""no" 1>&6
12702     ;;
12703   esac 
12704 else
12705   echo "$ac_t""no" 1>&6
12706
12707 fi
12708
12709
12710 #################################################
12711 # check for a shared memory profiling support
12712 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12713 echo "configure:12714: checking whether to use profiling" >&5
12714 # Check whether --with-profiling-data or --without-profiling-data was given.
12715 if test "${with_profiling_data+set}" = set; then
12716   withval="$with_profiling_data"
12717    case "$withval" in
12718   yes)
12719     echo "$ac_t""yes" 1>&6
12720     cat >> confdefs.h <<\EOF
12721 #define WITH_PROFILE 1
12722 EOF
12723
12724     ;;
12725   *)
12726     echo "$ac_t""no" 1>&6
12727     ;;
12728   esac 
12729 else
12730   echo "$ac_t""no" 1>&6
12731
12732 fi
12733
12734
12735
12736 #################################################
12737 # check for experimental disk-quotas support
12738 QUOTAOBJS=smbd/noquotas.o
12739
12740 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12741 echo "configure:12742: checking whether to support disk-quotas" >&5
12742 # Check whether --with-quotas or --without-quotas was given.
12743 if test "${with_quotas+set}" = set; then
12744   withval="$with_quotas"
12745    case "$withval" in
12746   yes)
12747     echo "$ac_t""yes" 1>&6
12748     case "$host_os" in
12749       *linux*)
12750         # Check for kernel 2.4.x quota braindamage...
12751         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12752 echo "configure:12753: checking for linux 2.4.x quota braindamage.." >&5
12753 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12754   echo $ac_n "(cached) $ac_c" 1>&6
12755 else
12756   
12757         cat > conftest.$ac_ext <<EOF
12758 #line 12759 "configure"
12759 #include "confdefs.h"
12760 #include <stdio.h>
12761 #include <sys/types.h>
12762 #include <asm/types.h>
12763 #include <linux/quota.h>
12764 #include <mntent.h>
12765 #include <linux/unistd.h>
12766 int main() {
12767 struct mem_dqblk D;
12768 ; return 0; }
12769 EOF
12770 if { (eval echo configure:12771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12771   rm -rf conftest*
12772   samba_cv_linux_2_4_quota_braindamage=yes
12773 else
12774   echo "configure: failed program was:" >&5
12775   cat conftest.$ac_ext >&5
12776   rm -rf conftest*
12777   samba_cv_linux_2_4_quota_braindamage=no
12778 fi
12779 rm -f conftest*
12780 fi
12781
12782 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12783 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12784         cat >> confdefs.h <<\EOF
12785 #define LINUX_QUOTAS_2 1
12786 EOF
12787
12788 else
12789         cat >> confdefs.h <<\EOF
12790 #define LINUX_QUOTAS_1 1
12791 EOF
12792
12793 fi
12794         ;;
12795       *)
12796         ;;
12797     esac
12798     QUOTAOBJS=smbd/quotas.o
12799     cat >> confdefs.h <<\EOF
12800 #define WITH_QUOTAS 1
12801 EOF
12802
12803     ;;
12804   *)
12805     echo "$ac_t""no" 1>&6
12806     ;;
12807   esac 
12808 else
12809   echo "$ac_t""no" 1>&6
12810
12811 fi
12812
12813
12814
12815 #################################################
12816 # check for experimental utmp accounting
12817
12818 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12819 echo "configure:12820: checking whether to support utmp accounting" >&5
12820 # Check whether --with-utmp or --without-utmp was given.
12821 if test "${with_utmp+set}" = set; then
12822   withval="$with_utmp"
12823    case "$withval" in
12824   yes)
12825     echo "$ac_t""yes" 1>&6
12826     cat >> confdefs.h <<\EOF
12827 #define WITH_UTMP 1
12828 EOF
12829
12830     ;;
12831   *)
12832     echo "$ac_t""no" 1>&6
12833     ;;
12834   esac 
12835 else
12836   echo "$ac_t""no" 1>&6
12837
12838 fi
12839
12840
12841 #################################################
12842 # set private directory location
12843 # Check whether --with-privatedir or --without-privatedir was given.
12844 if test "${with_privatedir+set}" = set; then
12845   withval="$with_privatedir"
12846    case "$withval" in
12847   yes|no)
12848   #
12849   # Just in case anybody calls it without argument
12850   #
12851     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12852     privatedir='${prefix}/private'
12853   ;;
12854   * )
12855     privatedir="$withval"
12856     ;;
12857   esac
12858   
12859 else
12860   privatedir='${prefix}/private'
12861    
12862
12863 fi
12864
12865
12866 #################################################
12867 # set lock directory location
12868 # Check whether --with-lockdir or --without-lockdir was given.
12869 if test "${with_lockdir+set}" = set; then
12870   withval="$with_lockdir"
12871    case "$withval" in
12872   yes|no)
12873   #
12874   # Just in case anybody calls it without argument
12875   #
12876     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12877     lockdir='$(VARDIR)/locks'
12878   ;;
12879   * )
12880     lockdir="$withval"
12881     ;;
12882   esac
12883   
12884 else
12885   lockdir='$(VARDIR)/locks'
12886    
12887
12888 fi
12889
12890
12891 #################################################
12892 # set SWAT directory location
12893 # Check whether --with-swatdir or --without-swatdir was given.
12894 if test "${with_swatdir+set}" = set; then
12895   withval="$with_swatdir"
12896    case "$withval" in
12897   yes|no)
12898   #
12899   # Just in case anybody does it
12900   #
12901     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12902     swatdir='${prefix}/swat'
12903   ;;
12904   * )
12905     swatdir="$withval"
12906     ;;
12907   esac
12908   
12909 else
12910   swatdir='${prefix}/swat'
12911    
12912
12913 fi
12914
12915
12916 #################################################
12917 # choose native language(s) of man pages
12918 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12919 echo "configure:12920: checking chosen man pages' language(s)" >&5
12920 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12921 if test "${with_manpages_langs+set}" = set; then
12922   withval="$with_manpages_langs"
12923    case "$withval" in
12924   yes|no)
12925     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12926     manlangs="en"
12927   ;;
12928   *)
12929     manlangs="$withval"
12930   ;;
12931   esac
12932
12933   echo "$ac_t""$manlangs" 1>&6
12934   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12935   
12936 else
12937   manlangs="en"
12938   echo "$ac_t""$manlangs" 1>&6
12939   
12940
12941 fi
12942
12943
12944 #################################################
12945 # these tests are taken from the GNU fileutils package
12946 echo "checking how to get filesystem space usage" 1>&6
12947 echo "configure:12948: checking how to get filesystem space usage" >&5
12948 space=no
12949
12950 # Test for statvfs64.
12951 if test $space = no; then
12952   # SVR4
12953   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12954 echo "configure:12955: checking statvfs64 function (SVR4)" >&5
12955 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12956   echo $ac_n "(cached) $ac_c" 1>&6
12957 else
12958   if test "$cross_compiling" = yes; then
12959   fu_cv_sys_stat_statvfs64=cross
12960 else
12961   cat > conftest.$ac_ext <<EOF
12962 #line 12963 "configure"
12963 #include "confdefs.h"
12964
12965 #if defined(HAVE_UNISTD_H)
12966 #include <unistd.h>
12967 #endif
12968 #include <sys/types.h>
12969 #include <sys/statvfs.h>
12970   main ()
12971   {
12972     struct statvfs64 fsd;
12973     exit (statvfs64 (".", &fsd));
12974   }
12975 EOF
12976 if { (eval echo configure:12977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12977 then
12978   fu_cv_sys_stat_statvfs64=yes
12979 else
12980   echo "configure: failed program was:" >&5
12981   cat conftest.$ac_ext >&5
12982   rm -fr conftest*
12983   fu_cv_sys_stat_statvfs64=no
12984 fi
12985 rm -fr conftest*
12986 fi
12987
12988 fi
12989
12990 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12991   if test $fu_cv_sys_stat_statvfs64 = yes; then
12992     space=yes
12993     cat >> confdefs.h <<\EOF
12994 #define STAT_STATVFS64 1
12995 EOF
12996
12997   fi
12998 fi
12999
13000 # Perform only the link test since it seems there are no variants of the
13001 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13002 # because that got a false positive on SCO OSR5.  Adding the declaration
13003 # of a `struct statvfs' causes this test to fail (as it should) on such
13004 # systems.  That system is reported to work fine with STAT_STATFS4 which
13005 # is what it gets when this test fails.
13006 if test $space = no; then
13007   # SVR4
13008   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13009 echo "configure:13010: checking statvfs function (SVR4)" >&5
13010 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13011   echo $ac_n "(cached) $ac_c" 1>&6
13012 else
13013   cat > conftest.$ac_ext <<EOF
13014 #line 13015 "configure"
13015 #include "confdefs.h"
13016 #include <sys/types.h>
13017 #include <sys/statvfs.h>
13018 int main() {
13019 struct statvfs fsd; statvfs (0, &fsd);
13020 ; return 0; }
13021 EOF
13022 if { (eval echo configure:13023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13023   rm -rf conftest*
13024   fu_cv_sys_stat_statvfs=yes
13025 else
13026   echo "configure: failed program was:" >&5
13027   cat conftest.$ac_ext >&5
13028   rm -rf conftest*
13029   fu_cv_sys_stat_statvfs=no
13030 fi
13031 rm -f conftest*
13032 fi
13033
13034 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13035   if test $fu_cv_sys_stat_statvfs = yes; then
13036     space=yes
13037     cat >> confdefs.h <<\EOF
13038 #define STAT_STATVFS 1
13039 EOF
13040
13041   fi
13042 fi
13043
13044 if test $space = no; then
13045   # DEC Alpha running OSF/1
13046   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13047 echo "configure:13048: checking for 3-argument statfs function (DEC OSF/1)" >&5
13048   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13049   echo $ac_n "(cached) $ac_c" 1>&6
13050 else
13051   if test "$cross_compiling" = yes; then
13052   fu_cv_sys_stat_statfs3_osf1=no
13053 else
13054   cat > conftest.$ac_ext <<EOF
13055 #line 13056 "configure"
13056 #include "confdefs.h"
13057
13058 #include <sys/param.h>
13059 #include <sys/types.h>
13060 #include <sys/mount.h>
13061   main ()
13062   {
13063     struct statfs fsd;
13064     fsd.f_fsize = 0;
13065     exit (statfs (".", &fsd, sizeof (struct statfs)));
13066   }
13067 EOF
13068 if { (eval echo configure:13069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13069 then
13070   fu_cv_sys_stat_statfs3_osf1=yes
13071 else
13072   echo "configure: failed program was:" >&5
13073   cat conftest.$ac_ext >&5
13074   rm -fr conftest*
13075   fu_cv_sys_stat_statfs3_osf1=no
13076 fi
13077 rm -fr conftest*
13078 fi
13079
13080 fi
13081
13082   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13083   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13084     space=yes
13085     cat >> confdefs.h <<\EOF
13086 #define STAT_STATFS3_OSF1 1
13087 EOF
13088
13089   fi
13090 fi
13091
13092 if test $space = no; then
13093 # AIX
13094   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13095 echo "configure:13096: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13096   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13097   echo $ac_n "(cached) $ac_c" 1>&6
13098 else
13099   if test "$cross_compiling" = yes; then
13100   fu_cv_sys_stat_statfs2_bsize=no
13101 else
13102   cat > conftest.$ac_ext <<EOF
13103 #line 13104 "configure"
13104 #include "confdefs.h"
13105
13106 #ifdef HAVE_SYS_PARAM_H
13107 #include <sys/param.h>
13108 #endif
13109 #ifdef HAVE_SYS_MOUNT_H
13110 #include <sys/mount.h>
13111 #endif
13112 #ifdef HAVE_SYS_VFS_H
13113 #include <sys/vfs.h>
13114 #endif
13115   main ()
13116   {
13117   struct statfs fsd;
13118   fsd.f_bsize = 0;
13119   exit (statfs (".", &fsd));
13120   }
13121 EOF
13122 if { (eval echo configure:13123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13123 then
13124   fu_cv_sys_stat_statfs2_bsize=yes
13125 else
13126   echo "configure: failed program was:" >&5
13127   cat conftest.$ac_ext >&5
13128   rm -fr conftest*
13129   fu_cv_sys_stat_statfs2_bsize=no
13130 fi
13131 rm -fr conftest*
13132 fi
13133
13134 fi
13135
13136   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13137   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13138     space=yes
13139     cat >> confdefs.h <<\EOF
13140 #define STAT_STATFS2_BSIZE 1
13141 EOF
13142
13143   fi
13144 fi
13145
13146 if test $space = no; then
13147 # SVR3
13148   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13149 echo "configure:13150: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13150   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13151   echo $ac_n "(cached) $ac_c" 1>&6
13152 else
13153   if test "$cross_compiling" = yes; then
13154   fu_cv_sys_stat_statfs4=no
13155 else
13156   cat > conftest.$ac_ext <<EOF
13157 #line 13158 "configure"
13158 #include "confdefs.h"
13159 #include <sys/types.h>
13160 #include <sys/statfs.h>
13161   main ()
13162   {
13163   struct statfs fsd;
13164   exit (statfs (".", &fsd, sizeof fsd, 0));
13165   }
13166 EOF
13167 if { (eval echo configure:13168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13168 then
13169   fu_cv_sys_stat_statfs4=yes
13170 else
13171   echo "configure: failed program was:" >&5
13172   cat conftest.$ac_ext >&5
13173   rm -fr conftest*
13174   fu_cv_sys_stat_statfs4=no
13175 fi
13176 rm -fr conftest*
13177 fi
13178
13179 fi
13180
13181   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13182   if test $fu_cv_sys_stat_statfs4 = yes; then
13183     space=yes
13184     cat >> confdefs.h <<\EOF
13185 #define STAT_STATFS4 1
13186 EOF
13187
13188   fi
13189 fi
13190
13191 if test $space = no; then
13192 # 4.4BSD and NetBSD
13193   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13194 echo "configure:13195: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13195   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13196   echo $ac_n "(cached) $ac_c" 1>&6
13197 else
13198   if test "$cross_compiling" = yes; then
13199   fu_cv_sys_stat_statfs2_fsize=no
13200 else
13201   cat > conftest.$ac_ext <<EOF
13202 #line 13203 "configure"
13203 #include "confdefs.h"
13204 #include <sys/types.h>
13205 #ifdef HAVE_SYS_PARAM_H
13206 #include <sys/param.h>
13207 #endif
13208 #ifdef HAVE_SYS_MOUNT_H
13209 #include <sys/mount.h>
13210 #endif
13211   main ()
13212   {
13213   struct statfs fsd;
13214   fsd.f_fsize = 0;
13215   exit (statfs (".", &fsd));
13216   }
13217 EOF
13218 if { (eval echo configure:13219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13219 then
13220   fu_cv_sys_stat_statfs2_fsize=yes
13221 else
13222   echo "configure: failed program was:" >&5
13223   cat conftest.$ac_ext >&5
13224   rm -fr conftest*
13225   fu_cv_sys_stat_statfs2_fsize=no
13226 fi
13227 rm -fr conftest*
13228 fi
13229
13230 fi
13231
13232   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13233   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13234     space=yes
13235     cat >> confdefs.h <<\EOF
13236 #define STAT_STATFS2_FSIZE 1
13237 EOF
13238
13239   fi
13240 fi
13241
13242 if test $space = no; then
13243   # Ultrix
13244   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13245 echo "configure:13246: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13246   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13247   echo $ac_n "(cached) $ac_c" 1>&6
13248 else
13249   if test "$cross_compiling" = yes; then
13250   fu_cv_sys_stat_fs_data=no
13251 else
13252   cat > conftest.$ac_ext <<EOF
13253 #line 13254 "configure"
13254 #include "confdefs.h"
13255 #include <sys/types.h>
13256 #ifdef HAVE_SYS_PARAM_H
13257 #include <sys/param.h>
13258 #endif
13259 #ifdef HAVE_SYS_MOUNT_H
13260 #include <sys/mount.h>
13261 #endif
13262 #ifdef HAVE_SYS_FS_TYPES_H
13263 #include <sys/fs_types.h>
13264 #endif
13265   main ()
13266   {
13267   struct fs_data fsd;
13268   /* Ultrix's statfs returns 1 for success,
13269      0 for not mounted, -1 for failure.  */
13270   exit (statfs (".", &fsd) != 1);
13271   }
13272 EOF
13273 if { (eval echo configure:13274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13274 then
13275   fu_cv_sys_stat_fs_data=yes
13276 else
13277   echo "configure: failed program was:" >&5
13278   cat conftest.$ac_ext >&5
13279   rm -fr conftest*
13280   fu_cv_sys_stat_fs_data=no
13281 fi
13282 rm -fr conftest*
13283 fi
13284
13285 fi
13286
13287   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13288   if test $fu_cv_sys_stat_fs_data = yes; then
13289     space=yes
13290     cat >> confdefs.h <<\EOF
13291 #define STAT_STATFS2_FS_DATA 1
13292 EOF
13293
13294   fi
13295 fi
13296
13297 #
13298 # As a gating factor for large file support, in order to
13299 # use <4GB files we must have the following minimal support
13300 # available.
13301 # long long, and a 64 bit off_t or off64_t.
13302 # If we don't have all of these then disable large
13303 # file support.
13304 #
13305 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13306 echo "configure:13307: checking if large file support can be enabled" >&5
13307 cat > conftest.$ac_ext <<EOF
13308 #line 13309 "configure"
13309 #include "confdefs.h"
13310
13311 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13312 #include <sys/types.h>
13313 #else
13314 __COMPILE_ERROR_
13315 #endif
13316
13317 int main() {
13318 int i
13319 ; return 0; }
13320 EOF
13321 if { (eval echo configure:13322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13322   rm -rf conftest*
13323   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13324 else
13325   echo "configure: failed program was:" >&5
13326   cat conftest.$ac_ext >&5
13327   rm -rf conftest*
13328   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13329 fi
13330 rm -f conftest*
13331 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13332     cat >> confdefs.h <<\EOF
13333 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13334 EOF
13335
13336 fi
13337 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13338
13339 # Check whether --with-spinlocks or --without-spinlocks was given.
13340 if test "${with_spinlocks+set}" = set; then
13341   withval="$with_spinlocks"
13342   :
13343 fi
13344
13345 if test "x$with_spinlocks" = "xyes"; then
13346     cat >> confdefs.h <<\EOF
13347 #define USE_SPINLOCKS 1
13348 EOF
13349
13350
13351     case "$host_cpu" in
13352         sparc)
13353             cat >> confdefs.h <<\EOF
13354 #define SPARC_SPINLOCKS 1
13355 EOF
13356
13357             ;;
13358
13359         i386|i486|i586|i686)
13360             cat >> confdefs.h <<\EOF
13361 #define INTEL_SPINLOCKS 1
13362 EOF
13363
13364             ;;
13365
13366         mips)
13367             cat >> confdefs.h <<\EOF
13368 #define MIPS_SPINLOCKS 1
13369 EOF
13370
13371             ;;
13372
13373         powerpc)
13374             cat >> confdefs.h <<\EOF
13375 #define POWERPC_SPINLOCKS 1
13376 EOF
13377
13378             ;;
13379     esac
13380 fi
13381
13382 #################################################
13383 # check for ACL support
13384
13385 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13386 echo "configure:13387: checking whether to support ACLs" >&5
13387 # Check whether --with-acl-support or --without-acl-support was given.
13388 if test "${with_acl_support+set}" = set; then
13389   withval="$with_acl_support"
13390    case "$withval" in
13391   yes)
13392
13393         case "$host_os" in
13394         *sysv5*)
13395                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13396                 cat >> confdefs.h <<\EOF
13397 #define HAVE_UNIXWARE_ACLS 1
13398 EOF
13399
13400                 ;;
13401         *solaris*)
13402                 echo "$ac_t""Using solaris ACLs" 1>&6
13403                 cat >> confdefs.h <<\EOF
13404 #define HAVE_SOLARIS_ACLS 1
13405 EOF
13406
13407                 ;;
13408         *hpux*)
13409                 echo "$ac_t""Using HPUX ACLs" 1>&6
13410                 cat >> confdefs.h <<\EOF
13411 #define HAVE_HPUX_ACLS 1
13412 EOF
13413
13414                 ;;
13415         *irix*)
13416                 echo "$ac_t""Using IRIX ACLs" 1>&6
13417                 cat >> confdefs.h <<\EOF
13418 #define HAVE_IRIX_ACLS 1
13419 EOF
13420
13421                 ;;
13422         *aix*)
13423                 echo "$ac_t""Using AIX ACLs" 1>&6
13424                 cat >> confdefs.h <<\EOF
13425 #define HAVE_AIX_ACLS 1
13426 EOF
13427
13428                 ;;
13429         *osf*)
13430                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13431                 cat >> confdefs.h <<\EOF
13432 #define HAVE_TRU64_ACLS 1
13433 EOF
13434
13435                 LIBS="$LIBS -lpacl"
13436                 ;;
13437         *)
13438                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13439 echo "configure:13440: checking for acl_get_file in -lacl" >&5
13440 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13441 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13442   echo $ac_n "(cached) $ac_c" 1>&6
13443 else
13444   ac_save_LIBS="$LIBS"
13445 LIBS="-lacl  $LIBS"
13446 cat > conftest.$ac_ext <<EOF
13447 #line 13448 "configure"
13448 #include "confdefs.h"
13449 /* Override any gcc2 internal prototype to avoid an error.  */
13450 /* We use char because int might match the return type of a gcc2
13451     builtin and then its argument prototype would still apply.  */
13452 char acl_get_file();
13453
13454 int main() {
13455 acl_get_file()
13456 ; return 0; }
13457 EOF
13458 if { (eval echo configure:13459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13459   rm -rf conftest*
13460   eval "ac_cv_lib_$ac_lib_var=yes"
13461 else
13462   echo "configure: failed program was:" >&5
13463   cat conftest.$ac_ext >&5
13464   rm -rf conftest*
13465   eval "ac_cv_lib_$ac_lib_var=no"
13466 fi
13467 rm -f conftest*
13468 LIBS="$ac_save_LIBS"
13469
13470 fi
13471 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13472   echo "$ac_t""yes" 1>&6
13473     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13474     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13475   cat >> confdefs.h <<EOF
13476 #define $ac_tr_lib 1
13477 EOF
13478
13479   LIBS="-lacl $LIBS"
13480
13481 else
13482   echo "$ac_t""no" 1>&6
13483 fi
13484
13485                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13486 echo "configure:13487: checking for ACL support" >&5
13487 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13488   echo $ac_n "(cached) $ac_c" 1>&6
13489 else
13490   
13491                 cat > conftest.$ac_ext <<EOF
13492 #line 13493 "configure"
13493 #include "confdefs.h"
13494 #include <sys/types.h>
13495 #include <sys/acl.h>
13496 int main() {
13497  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13498 ; return 0; }
13499 EOF
13500 if { (eval echo configure:13501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13501   rm -rf conftest*
13502   samba_cv_HAVE_POSIX_ACLS=yes
13503 else
13504   echo "configure: failed program was:" >&5
13505   cat conftest.$ac_ext >&5
13506   rm -rf conftest*
13507   samba_cv_HAVE_POSIX_ACLS=no
13508 fi
13509 rm -f conftest*
13510 fi
13511
13512 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13513                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13514                                 echo "$ac_t""Using posix ACLs" 1>&6
13515                                 cat >> confdefs.h <<\EOF
13516 #define HAVE_POSIX_ACLS 1
13517 EOF
13518
13519                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13520 echo "configure:13521: checking for acl_get_perm_np" >&5
13521 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13522   echo $ac_n "(cached) $ac_c" 1>&6
13523 else
13524   
13525                                 cat > conftest.$ac_ext <<EOF
13526 #line 13527 "configure"
13527 #include "confdefs.h"
13528 #include <sys/types.h>
13529 #include <sys/acl.h>
13530 int main() {
13531  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13532 ; return 0; }
13533 EOF
13534 if { (eval echo configure:13535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13535   rm -rf conftest*
13536   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13537 else
13538   echo "configure: failed program was:" >&5
13539   cat conftest.$ac_ext >&5
13540   rm -rf conftest*
13541   samba_cv_HAVE_ACL_GET_PERM_NP=no
13542 fi
13543 rm -f conftest*
13544 fi
13545
13546 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13547                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13548                                         cat >> confdefs.h <<\EOF
13549 #define HAVE_ACL_GET_PERM_NP 1
13550 EOF
13551
13552                                 fi
13553                         fi
13554             ;;
13555         esac
13556         ;;
13557   *)
13558     echo "$ac_t""no" 1>&6
13559     cat >> confdefs.h <<\EOF
13560 #define HAVE_NO_ACLS 1
13561 EOF
13562
13563     ;;
13564   esac 
13565 else
13566   cat >> confdefs.h <<\EOF
13567 #define HAVE_NO_ACLS 1
13568 EOF
13569
13570   echo "$ac_t""no" 1>&6
13571
13572 fi
13573
13574
13575 #################################################
13576 # Check whether winbind is supported on this platform.  If so we need to
13577 # build and install client programs (WINBIND_TARGETS), sbin programs
13578 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13579
13580 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13581 echo "configure:13582: checking whether to build winbind" >&5
13582
13583 # Initially, the value of $host_os decides whether winbind is supported
13584
13585 case "$host_os" in
13586         *linux*|*irix*)
13587                 HAVE_WINBIND=yes
13588                 ;;
13589         *solaris*)
13590                 HAVE_WINBIND=yes
13591                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13592                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
13593                 ;;
13594         *hpux11*)
13595                 HAVE_WINBIND=yes
13596                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13597                 ;;
13598         *)
13599                 HAVE_WINBIND=no
13600                 winbind_no_reason=", unsupported on $host_os"
13601                 ;;
13602 esac
13603
13604 # Check the setting of --with-winbindd
13605
13606 # Check whether --with-winbind or --without-winbind was given.
13607 if test "${with_winbind+set}" = set; then
13608   withval="$with_winbind"
13609    
13610   case "$withval" in
13611         yes)
13612                 HAVE_WINBIND=yes
13613                 ;;
13614         no)
13615                 HAVE_WINBIND=no
13616                 winbind_reason=""
13617                 ;;
13618   esac 
13619 fi
13620
13621
13622 # We need unix domain sockets for winbind
13623
13624 if test x"$HAVE_WINBIND" = x"yes"; then
13625         if test x"$samba_cv_unixsocket" = x"no"; then
13626                 winbind_no_reason=", no unix domain socket support on $host_os"
13627                 HAVE_WINBIND=no
13628         fi
13629 fi
13630
13631 # Display test results
13632
13633 WINBIND_TARGETS=""
13634 WINBIND_STARGETS=""
13635 WINBIND_LTARGETS=""
13636 WINBIND_PAM_PROGS=""
13637
13638 if test x"$HAVE_WINBIND" = x"yes"; then
13639         echo "$ac_t""yes" 1>&6
13640
13641         WINBIND_TARGETS="bin/wbinfo"
13642         WINBIND_STARGETS="bin/winbindd"
13643         if test x"$BLDSHARED" = x"true"; then
13644                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13645                 if test x"$with_pam" = x"yes"; then
13646                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13647                 fi
13648         fi
13649 else
13650         echo "$ac_t""no$winbind_no_reason" 1>&6
13651 fi
13652
13653 # Substitution time!
13654
13655
13656
13657
13658
13659
13660
13661
13662 #################################################
13663 # Check to see if we should use the included popt 
13664
13665 # Check whether --with-included-popt or --without-included-popt was given.
13666 if test "${with_included_popt+set}" = set; then
13667   withval="$with_included_popt"
13668    
13669   case "$withval" in
13670         yes)
13671                 INCLUDED_POPT=yes
13672                 ;;
13673         no)
13674                 INCLUDED_POPT=no
13675                 ;;
13676   esac 
13677 fi
13678
13679 if test x"$INCLUDED_POPT" != x"yes"; then
13680     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13681 echo "configure:13682: checking for poptGetContext in -lpopt" >&5
13682 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13683 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13684   echo $ac_n "(cached) $ac_c" 1>&6
13685 else
13686   ac_save_LIBS="$LIBS"
13687 LIBS="-lpopt  $LIBS"
13688 cat > conftest.$ac_ext <<EOF
13689 #line 13690 "configure"
13690 #include "confdefs.h"
13691 /* Override any gcc2 internal prototype to avoid an error.  */
13692 /* We use char because int might match the return type of a gcc2
13693     builtin and then its argument prototype would still apply.  */
13694 char poptGetContext();
13695
13696 int main() {
13697 poptGetContext()
13698 ; return 0; }
13699 EOF
13700 if { (eval echo configure:13701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13701   rm -rf conftest*
13702   eval "ac_cv_lib_$ac_lib_var=yes"
13703 else
13704   echo "configure: failed program was:" >&5
13705   cat conftest.$ac_ext >&5
13706   rm -rf conftest*
13707   eval "ac_cv_lib_$ac_lib_var=no"
13708 fi
13709 rm -f conftest*
13710 LIBS="$ac_save_LIBS"
13711
13712 fi
13713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13714   echo "$ac_t""yes" 1>&6
13715   INCLUDED_POPT=no
13716 else
13717   echo "$ac_t""no" 1>&6
13718 INCLUDED_POPT=yes
13719 fi
13720
13721 fi
13722
13723 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13724 echo "configure:13725: checking whether to use included popt" >&5
13725 if test x"$INCLUDED_POPT" = x"yes"; then
13726     echo "$ac_t""$srcdir/popt" 1>&6
13727     BUILD_POPT='$(POPT_OBJS)'
13728     FLAGS1="-I$srcdir/popt"
13729 else
13730     echo "$ac_t""no" 1>&6
13731     LIBS="$LIBS -lpopt"
13732 fi
13733
13734
13735
13736 #################################################
13737 # do extra things if we are running insure
13738
13739 if test "${ac_cv_prog_CC}" = "insure"; then
13740         CPPFLAGS="$CPPFLAGS -D__INSURE__"
13741 fi
13742
13743 #################################################
13744 # final configure stuff
13745
13746 echo $ac_n "checking configure summary""... $ac_c" 1>&6
13747 echo "configure:13748: checking configure summary" >&5
13748 if test "$cross_compiling" = yes; then
13749   echo "configure: warning: cannot run when cross-compiling" 1>&2
13750 else
13751   cat > conftest.$ac_ext <<EOF
13752 #line 13753 "configure"
13753 #include "confdefs.h"
13754 #include "${srcdir-.}/tests/summary.c"
13755 EOF
13756 if { (eval echo configure:13757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13757 then
13758   echo "$ac_t""yes" 1>&6
13759 else
13760   echo "configure: failed program was:" >&5
13761   cat conftest.$ac_ext >&5
13762   rm -fr conftest*
13763   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
13764 fi
13765 rm -fr conftest*
13766 fi
13767
13768
13769 builddir=`pwd`
13770
13771
13772 trap '' 1 2 15
13773 cat > confcache <<\EOF
13774 # This file is a shell script that caches the results of configure
13775 # tests run on this system so they can be shared between configure
13776 # scripts and configure runs.  It is not useful on other systems.
13777 # If it contains results you don't want to keep, you may remove or edit it.
13778 #
13779 # By default, configure uses ./config.cache as the cache file,
13780 # creating it if it does not exist already.  You can give configure
13781 # the --cache-file=FILE option to use a different cache file; that is
13782 # what configure does when it calls configure scripts in
13783 # subdirectories, so they share the cache.
13784 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13785 # config.status only pays attention to the cache file if you give it the
13786 # --recheck option to rerun configure.
13787 #
13788 EOF
13789 # The following way of writing the cache mishandles newlines in values,
13790 # but we know of no workaround that is simple, portable, and efficient.
13791 # So, don't put newlines in cache variables' values.
13792 # Ultrix sh set writes to stderr and can't be redirected directly,
13793 # and sets the high bit in the cache file unless we assign to the vars.
13794 (set) 2>&1 |
13795   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13796   *ac_space=\ *)
13797     # `set' does not quote correctly, so add quotes (double-quote substitution
13798     # turns \\\\ into \\, and sed turns \\ into \).
13799     sed -n \
13800       -e "s/'/'\\\\''/g" \
13801       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13802     ;;
13803   *)
13804     # `set' quotes correctly as required by POSIX, so do not add quotes.
13805     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13806     ;;
13807   esac >> confcache
13808 if cmp -s $cache_file confcache; then
13809   :
13810 else
13811   if test -w $cache_file; then
13812     echo "updating cache $cache_file"
13813     cat confcache > $cache_file
13814   else
13815     echo "not updating unwritable cache $cache_file"
13816   fi
13817 fi
13818 rm -f confcache
13819
13820 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13821
13822 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13823 # Let make expand exec_prefix.
13824 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13825
13826 # Any assignment to VPATH causes Sun make to only execute
13827 # the first set of double-colon rules, so remove it if not needed.
13828 # If there is a colon in the path, we need to keep it.
13829 if test "x$srcdir" = x.; then
13830   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13831 fi
13832
13833 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13834
13835 DEFS=-DHAVE_CONFIG_H
13836
13837 # Without the "./", some shells look in PATH for config.status.
13838 : ${CONFIG_STATUS=./config.status}
13839
13840 echo creating $CONFIG_STATUS
13841 rm -f $CONFIG_STATUS
13842 cat > $CONFIG_STATUS <<EOF
13843 #! /bin/sh
13844 # Generated automatically by configure.
13845 # Run this file to recreate the current configuration.
13846 # This directory was configured as follows,
13847 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13848 #
13849 # $0 $ac_configure_args
13850 #
13851 # Compiler output produced by configure, useful for debugging
13852 # configure, is in ./config.log if it exists.
13853
13854 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13855 for ac_option
13856 do
13857   case "\$ac_option" in
13858   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13859     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13860     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13861   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13862     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13863     exit 0 ;;
13864   -help | --help | --hel | --he | --h)
13865     echo "\$ac_cs_usage"; exit 0 ;;
13866   *) echo "\$ac_cs_usage"; exit 1 ;;
13867   esac
13868 done
13869
13870 ac_given_srcdir=$srcdir
13871 ac_given_INSTALL="$INSTALL"
13872
13873 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13874 EOF
13875 cat >> $CONFIG_STATUS <<EOF
13876
13877 # Protect against being on the right side of a sed subst in config.status.
13878 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13879  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13880 $ac_vpsub
13881 $extrasub
13882 s%@SHELL@%$SHELL%g
13883 s%@CFLAGS@%$CFLAGS%g
13884 s%@CPPFLAGS@%$CPPFLAGS%g
13885 s%@CXXFLAGS@%$CXXFLAGS%g
13886 s%@FFLAGS@%$FFLAGS%g
13887 s%@DEFS@%$DEFS%g
13888 s%@LDFLAGS@%$LDFLAGS%g
13889 s%@LIBS@%$LIBS%g
13890 s%@exec_prefix@%$exec_prefix%g
13891 s%@prefix@%$prefix%g
13892 s%@program_transform_name@%$program_transform_name%g
13893 s%@bindir@%$bindir%g
13894 s%@sbindir@%$sbindir%g
13895 s%@libexecdir@%$libexecdir%g
13896 s%@datadir@%$datadir%g
13897 s%@sysconfdir@%$sysconfdir%g
13898 s%@sharedstatedir@%$sharedstatedir%g
13899 s%@localstatedir@%$localstatedir%g
13900 s%@libdir@%$libdir%g
13901 s%@includedir@%$includedir%g
13902 s%@oldincludedir@%$oldincludedir%g
13903 s%@infodir@%$infodir%g
13904 s%@mandir@%$mandir%g
13905 s%@RUNPROG@%$RUNPROG%g
13906 s%@MPROGS@%$MPROGS%g
13907 s%@LDSHFLAGS@%$LDSHFLAGS%g
13908 s%@SHLD@%$SHLD%g
13909 s%@HOST_OS@%$HOST_OS%g
13910 s%@PAM_MOD@%$PAM_MOD%g
13911 s%@WRAP@%$WRAP%g
13912 s%@WRAP32@%$WRAP32%g
13913 s%@PICFLAG@%$PICFLAG%g
13914 s%@PICSUFFIX@%$PICSUFFIX%g
13915 s%@POBAD_CC@%$POBAD_CC%g
13916 s%@SHLIBEXT@%$SHLIBEXT%g
13917 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13918 s%@CC@%$CC%g
13919 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13920 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13921 s%@INSTALL_DATA@%$INSTALL_DATA%g
13922 s%@AWK@%$AWK%g
13923 s%@BROKEN_CC@%$BROKEN_CC%g
13924 s%@host@%$host%g
13925 s%@host_alias@%$host_alias%g
13926 s%@host_cpu@%$host_cpu%g
13927 s%@host_vendor@%$host_vendor%g
13928 s%@host_os@%$host_os%g
13929 s%@target@%$target%g
13930 s%@target_alias@%$target_alias%g
13931 s%@target_cpu@%$target_cpu%g
13932 s%@target_vendor@%$target_vendor%g
13933 s%@target_os@%$target_os%g
13934 s%@build@%$build%g
13935 s%@build_alias@%$build_alias%g
13936 s%@build_cpu@%$build_cpu%g
13937 s%@build_vendor@%$build_vendor%g
13938 s%@build_os@%$build_os%g
13939 s%@CPP@%$CPP%g
13940 s%@LIBOBJS@%$LIBOBJS%g
13941 s%@TERMLIBS@%$TERMLIBS%g
13942 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13943 s%@ROFF@%$ROFF%g
13944 s%@DYNEXP@%$DYNEXP%g
13945 s%@QUOTAOBJS@%$QUOTAOBJS%g
13946 s%@privatedir@%$privatedir%g
13947 s%@lockdir@%$lockdir%g
13948 s%@swatdir@%$swatdir%g
13949 s%@manlangs@%$manlangs%g
13950 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13951 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13952 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13953 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
13954 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
13955 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
13956 s%@BUILD_POPT@%$BUILD_POPT%g
13957 s%@FLAGS1@%$FLAGS1%g
13958 s%@builddir@%$builddir%g
13959
13960 CEOF
13961 EOF
13962
13963 cat >> $CONFIG_STATUS <<\EOF
13964
13965 # Split the substitutions into bite-sized pieces for seds with
13966 # small command number limits, like on Digital OSF/1 and HP-UX.
13967 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13968 ac_file=1 # Number of current file.
13969 ac_beg=1 # First line for current file.
13970 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13971 ac_more_lines=:
13972 ac_sed_cmds=""
13973 while $ac_more_lines; do
13974   if test $ac_beg -gt 1; then
13975     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13976   else
13977     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13978   fi
13979   if test ! -s conftest.s$ac_file; then
13980     ac_more_lines=false
13981     rm -f conftest.s$ac_file
13982   else
13983     if test -z "$ac_sed_cmds"; then
13984       ac_sed_cmds="sed -f conftest.s$ac_file"
13985     else
13986       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13987     fi
13988     ac_file=`expr $ac_file + 1`
13989     ac_beg=$ac_end
13990     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13991   fi
13992 done
13993 if test -z "$ac_sed_cmds"; then
13994   ac_sed_cmds=cat
13995 fi
13996 EOF
13997
13998 cat >> $CONFIG_STATUS <<EOF
13999
14000 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
14001 EOF
14002 cat >> $CONFIG_STATUS <<\EOF
14003 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14004   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14005   case "$ac_file" in
14006   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14007        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14008   *) ac_file_in="${ac_file}.in" ;;
14009   esac
14010
14011   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14012
14013   # Remove last slash and all that follows it.  Not all systems have dirname.
14014   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14015   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14016     # The file is in a subdirectory.
14017     test ! -d "$ac_dir" && mkdir "$ac_dir"
14018     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14019     # A "../" for each directory in $ac_dir_suffix.
14020     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14021   else
14022     ac_dir_suffix= ac_dots=
14023   fi
14024
14025   case "$ac_given_srcdir" in
14026   .)  srcdir=.
14027       if test -z "$ac_dots"; then top_srcdir=.
14028       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14029   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14030   *) # Relative path.
14031     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14032     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14033   esac
14034
14035   case "$ac_given_INSTALL" in
14036   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14037   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14038   esac
14039
14040   echo creating "$ac_file"
14041   rm -f "$ac_file"
14042   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14043   case "$ac_file" in
14044   *Makefile*) ac_comsub="1i\\
14045 # $configure_input" ;;
14046   *) ac_comsub= ;;
14047   esac
14048
14049   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14050   sed -e "$ac_comsub
14051 s%@configure_input@%$configure_input%g
14052 s%@srcdir@%$srcdir%g
14053 s%@top_srcdir@%$top_srcdir%g
14054 s%@INSTALL@%$INSTALL%g
14055 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14056 fi; done
14057 rm -f conftest.s*
14058
14059 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14060 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14061 #
14062 # ac_d sets the value in "#define NAME VALUE" lines.
14063 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14064 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14065 ac_dC='\3'
14066 ac_dD='%g'
14067 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14068 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14069 ac_uB='\([      ]\)%\1#\2define\3'
14070 ac_uC=' '
14071 ac_uD='\4%g'
14072 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14073 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14074 ac_eB='$%\1#\2define\3'
14075 ac_eC=' '
14076 ac_eD='%g'
14077
14078 if test "${CONFIG_HEADERS+set}" != set; then
14079 EOF
14080 cat >> $CONFIG_STATUS <<EOF
14081   CONFIG_HEADERS="include/config.h"
14082 EOF
14083 cat >> $CONFIG_STATUS <<\EOF
14084 fi
14085 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14086   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14087   case "$ac_file" in
14088   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14089        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14090   *) ac_file_in="${ac_file}.in" ;;
14091   esac
14092
14093   echo creating $ac_file
14094
14095   rm -f conftest.frag conftest.in conftest.out
14096   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14097   cat $ac_file_inputs > conftest.in
14098
14099 EOF
14100
14101 # Transform confdefs.h into a sed script conftest.vals that substitutes
14102 # the proper values into config.h.in to produce config.h.  And first:
14103 # Protect against being on the right side of a sed subst in config.status.
14104 # Protect against being in an unquoted here document in config.status.
14105 rm -f conftest.vals
14106 cat > conftest.hdr <<\EOF
14107 s/[\\&%]/\\&/g
14108 s%[\\$`]%\\&%g
14109 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14110 s%ac_d%ac_u%gp
14111 s%ac_u%ac_e%gp
14112 EOF
14113 sed -n -f conftest.hdr confdefs.h > conftest.vals
14114 rm -f conftest.hdr
14115
14116 # This sed command replaces #undef with comments.  This is necessary, for
14117 # example, in the case of _POSIX_SOURCE, which is predefined and required
14118 # on some systems where configure will not decide to define it.
14119 cat >> conftest.vals <<\EOF
14120 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14121 EOF
14122
14123 # Break up conftest.vals because some shells have a limit on
14124 # the size of here documents, and old seds have small limits too.
14125
14126 rm -f conftest.tail
14127 while :
14128 do
14129   ac_lines=`grep -c . conftest.vals`
14130   # grep -c gives empty output for an empty file on some AIX systems.
14131   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14132   # Write a limited-size here document to conftest.frag.
14133   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14134   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14135   echo 'CEOF
14136   sed -f conftest.frag conftest.in > conftest.out
14137   rm -f conftest.in
14138   mv conftest.out conftest.in
14139 ' >> $CONFIG_STATUS
14140   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14141   rm -f conftest.vals
14142   mv conftest.tail conftest.vals
14143 done
14144 rm -f conftest.vals
14145
14146 cat >> $CONFIG_STATUS <<\EOF
14147   rm -f conftest.frag conftest.h
14148   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14149   cat conftest.in >> conftest.h
14150   rm -f conftest.in
14151   if cmp -s $ac_file conftest.h 2>/dev/null; then
14152     echo "$ac_file is unchanged"
14153     rm -f conftest.h
14154   else
14155     # Remove last slash and all that follows it.  Not all systems have dirname.
14156       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14157       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14158       # The file is in a subdirectory.
14159       test ! -d "$ac_dir" && mkdir "$ac_dir"
14160     fi
14161     rm -f $ac_file
14162     mv conftest.h $ac_file
14163   fi
14164 fi; done
14165
14166 EOF
14167 cat >> $CONFIG_STATUS <<EOF
14168
14169 EOF
14170 cat >> $CONFIG_STATUS <<\EOF
14171
14172 exit 0
14173 EOF
14174 chmod +x $CONFIG_STATUS
14175 rm -fr confdefs* $ac_clean_files
14176 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14177
14178
14179 #################################################
14180 # Print very concise instructions on building/use
14181 if test "x$enable_dmalloc" = xyes
14182 then
14183         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14184         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14185 fi