This removes --with-ssl from Samba.
[nivanova/samba-autobuild/.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --with-fhs              Use FHS-compliant paths (default=no)"
17 ac_help="$ac_help
18   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
19 ac_help="$ac_help
20   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
21 ac_help="$ac_help
22   --with-piddir=DIR       Where to put pid files ($ac_default_prefix/var/locks)"
23 ac_help="$ac_help
24   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
25 ac_help="$ac_help
26   --with-configdir=DIR    Where to put configuration files (\$libdir)"
27 ac_help="$ac_help
28   --with-codepagedir=DIR  Where to put codepage files (\$libdir/codepages)"
29 ac_help="$ac_help
30   --with-logfilebase=DIR  Where to put log files (\$(VARDIR))"
31 ac_help="$ac_help
32   --enable-debug          Turn on compiler debugging information (default=no)"
33 ac_help="$ac_help
34   --enable-developer      turn on developer warnings and debugging [default=no]"
35 ac_help="$ac_help
36   --enable-krb5developer      turn on developer warnings and debugging, except -Wstrict-prototypes [default=no]"
37 ac_help="$ac_help
38   --enable-dmalloc          enable heap debugging [default=no]"
39 ac_help="$ac_help
40   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
41 ac_help="$ac_help
42   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
43 ac_help="$ac_help
44   --with-smbwrapper       Include SMB wrapper support (default=no) "
45 ac_help="$ac_help
46   --with-afs              Include AFS clear-text auth support (default=no) "
47 ac_help="$ac_help
48   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
49 ac_help="$ac_help
50   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
51 ac_help="$ac_help
52   --with-automount        Include AUTOMOUNT support (default=no)"
53 ac_help="$ac_help
54   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
55 ac_help="$ac_help
56   --with-pam              Include PAM support (default=no)"
57 ac_help="$ac_help
58   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
59 ac_help="$ac_help
60   --with-tdbsam           Include experimental TDB SAM support (default=no)"
61 ac_help="$ac_help
62   --with-ldapsam          Include experimental LDAP SAM support (default=no)"
63 ac_help="$ac_help
64   --with-nisplussam       Include NISPLUS SAM support (default=no)"
65 ac_help="$ac_help
66   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
67 ac_help="$ac_help
68   --with-syslog           Include experimental SYSLOG support (default=no)"
69 ac_help="$ac_help
70   --with-profiling-data   Include gathering source code profile information (default=no)"
71 ac_help="$ac_help
72   --with-quotas           Include experimental disk-quota support (default=no)"
73 ac_help="$ac_help
74   --with-utmp             Include experimental utmp accounting (default=no)"
75 ac_help="$ac_help
76   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
77 ac_help="$ac_help
78   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
79 ac_help="$ac_help
80   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
81 ac_help="$ac_help
82   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
83 ac_help="$ac_help
84   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
85 ac_help="$ac_help
86   --with-acl-support      Include ACL support (default=no)"
87 ac_help="$ac_help
88   --with-winbind          Build winbind (default, if supported by OS)"
89 ac_help="$ac_help
90   --with-included-popt    use bundled popt library, not from system"
91
92 # Initialize some variables set by options.
93 # The variables have the same names as the options, with
94 # dashes changed to underlines.
95 build=NONE
96 cache_file=./config.cache
97 exec_prefix=NONE
98 host=NONE
99 no_create=
100 nonopt=NONE
101 no_recursion=
102 prefix=NONE
103 program_prefix=NONE
104 program_suffix=NONE
105 program_transform_name=s,x,x,
106 silent=
107 site=
108 srcdir=
109 target=NONE
110 verbose=
111 x_includes=NONE
112 x_libraries=NONE
113 bindir='${exec_prefix}/bin'
114 sbindir='${exec_prefix}/sbin'
115 libexecdir='${exec_prefix}/libexec'
116 datadir='${prefix}/share'
117 sysconfdir='${prefix}/etc'
118 sharedstatedir='${prefix}/com'
119 localstatedir='${prefix}/var'
120 libdir='${exec_prefix}/lib'
121 includedir='${prefix}/include'
122 oldincludedir='/usr/include'
123 infodir='${prefix}/info'
124 mandir='${prefix}/man'
125
126 # Initialize some other variables.
127 subdirs=
128 MFLAGS= MAKEFLAGS=
129 SHELL=${CONFIG_SHELL-/bin/sh}
130 # Maximum number of lines to put in a shell here document.
131 ac_max_here_lines=12
132
133 ac_prev=
134 for ac_option
135 do
136
137   # If the previous option needs an argument, assign it.
138   if test -n "$ac_prev"; then
139     eval "$ac_prev=\$ac_option"
140     ac_prev=
141     continue
142   fi
143
144   case "$ac_option" in
145   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
146   *) ac_optarg= ;;
147   esac
148
149   # Accept the important Cygnus configure options, so we can diagnose typos.
150
151   case "$ac_option" in
152
153   -bindir | --bindir | --bindi | --bind | --bin | --bi)
154     ac_prev=bindir ;;
155   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
156     bindir="$ac_optarg" ;;
157
158   -build | --build | --buil | --bui | --bu)
159     ac_prev=build ;;
160   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
161     build="$ac_optarg" ;;
162
163   -cache-file | --cache-file | --cache-fil | --cache-fi \
164   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
165     ac_prev=cache_file ;;
166   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
167   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
168     cache_file="$ac_optarg" ;;
169
170   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
171     ac_prev=datadir ;;
172   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
173   | --da=*)
174     datadir="$ac_optarg" ;;
175
176   -disable-* | --disable-*)
177     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
178     # Reject names that are not valid shell variable names.
179     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
180       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
181     fi
182     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
183     eval "enable_${ac_feature}=no" ;;
184
185   -enable-* | --enable-*)
186     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
187     # Reject names that are not valid shell variable names.
188     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
189       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
190     fi
191     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
192     case "$ac_option" in
193       *=*) ;;
194       *) ac_optarg=yes ;;
195     esac
196     eval "enable_${ac_feature}='$ac_optarg'" ;;
197
198   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
199   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
200   | --exec | --exe | --ex)
201     ac_prev=exec_prefix ;;
202   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
203   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
204   | --exec=* | --exe=* | --ex=*)
205     exec_prefix="$ac_optarg" ;;
206
207   -gas | --gas | --ga | --g)
208     # Obsolete; use --with-gas.
209     with_gas=yes ;;
210
211   -help | --help | --hel | --he)
212     # Omit some internal or obsolete options to make the list less imposing.
213     # This message is too long to be a string in the A/UX 3.1 sh.
214     cat << EOF
215 Usage: configure [options] [host]
216 Options: [defaults in brackets after descriptions]
217 Configuration:
218   --cache-file=FILE       cache test results in FILE
219   --help                  print this message
220   --no-create             do not create output files
221   --quiet, --silent       do not print \`checking...' messages
222   --version               print the version of autoconf that created configure
223 Directory and file names:
224   --prefix=PREFIX         install architecture-independent files in PREFIX
225                           [$ac_default_prefix]
226   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
227                           [same as prefix]
228   --bindir=DIR            user executables in DIR [EPREFIX/bin]
229   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
230   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
231   --datadir=DIR           read-only architecture-independent data in DIR
232                           [PREFIX/share]
233   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
234   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
235                           [PREFIX/com]
236   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
237   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
238   --includedir=DIR        C header files in DIR [PREFIX/include]
239   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
240   --infodir=DIR           info documentation in DIR [PREFIX/info]
241   --mandir=DIR            man documentation in DIR [PREFIX/man]
242   --srcdir=DIR            find the sources in DIR [configure dir or ..]
243   --program-prefix=PREFIX prepend PREFIX to installed program names
244   --program-suffix=SUFFIX append SUFFIX to installed program names
245   --program-transform-name=PROGRAM
246                           run sed PROGRAM on installed program names
247 EOF
248     cat << EOF
249 Host type:
250   --build=BUILD           configure for building on BUILD [BUILD=HOST]
251   --host=HOST             configure for HOST [guessed]
252   --target=TARGET         configure for TARGET [TARGET=HOST]
253 Features and packages:
254   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
255   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
256   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
257   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
258   --x-includes=DIR        X include files are in DIR
259   --x-libraries=DIR       X library files are in DIR
260 EOF
261     if test -n "$ac_help"; then
262       echo "--enable and --with options recognized:$ac_help"
263     fi
264     exit 0 ;;
265
266   -host | --host | --hos | --ho)
267     ac_prev=host ;;
268   -host=* | --host=* | --hos=* | --ho=*)
269     host="$ac_optarg" ;;
270
271   -includedir | --includedir | --includedi | --included | --include \
272   | --includ | --inclu | --incl | --inc)
273     ac_prev=includedir ;;
274   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
275   | --includ=* | --inclu=* | --incl=* | --inc=*)
276     includedir="$ac_optarg" ;;
277
278   -infodir | --infodir | --infodi | --infod | --info | --inf)
279     ac_prev=infodir ;;
280   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
281     infodir="$ac_optarg" ;;
282
283   -libdir | --libdir | --libdi | --libd)
284     ac_prev=libdir ;;
285   -libdir=* | --libdir=* | --libdi=* | --libd=*)
286     libdir="$ac_optarg" ;;
287
288   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
289   | --libexe | --libex | --libe)
290     ac_prev=libexecdir ;;
291   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
292   | --libexe=* | --libex=* | --libe=*)
293     libexecdir="$ac_optarg" ;;
294
295   -localstatedir | --localstatedir | --localstatedi | --localstated \
296   | --localstate | --localstat | --localsta | --localst \
297   | --locals | --local | --loca | --loc | --lo)
298     ac_prev=localstatedir ;;
299   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
300   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
301   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
302     localstatedir="$ac_optarg" ;;
303
304   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
305     ac_prev=mandir ;;
306   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
307     mandir="$ac_optarg" ;;
308
309   -nfp | --nfp | --nf)
310     # Obsolete; use --without-fp.
311     with_fp=no ;;
312
313   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
314   | --no-cr | --no-c)
315     no_create=yes ;;
316
317   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
318   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
319     no_recursion=yes ;;
320
321   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
322   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
323   | --oldin | --oldi | --old | --ol | --o)
324     ac_prev=oldincludedir ;;
325   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
326   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
327   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
328     oldincludedir="$ac_optarg" ;;
329
330   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
331     ac_prev=prefix ;;
332   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
333     prefix="$ac_optarg" ;;
334
335   -program-prefix | --program-prefix | --program-prefi | --program-pref \
336   | --program-pre | --program-pr | --program-p)
337     ac_prev=program_prefix ;;
338   -program-prefix=* | --program-prefix=* | --program-prefi=* \
339   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
340     program_prefix="$ac_optarg" ;;
341
342   -program-suffix | --program-suffix | --program-suffi | --program-suff \
343   | --program-suf | --program-su | --program-s)
344     ac_prev=program_suffix ;;
345   -program-suffix=* | --program-suffix=* | --program-suffi=* \
346   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
347     program_suffix="$ac_optarg" ;;
348
349   -program-transform-name | --program-transform-name \
350   | --program-transform-nam | --program-transform-na \
351   | --program-transform-n | --program-transform- \
352   | --program-transform | --program-transfor \
353   | --program-transfo | --program-transf \
354   | --program-trans | --program-tran \
355   | --progr-tra | --program-tr | --program-t)
356     ac_prev=program_transform_name ;;
357   -program-transform-name=* | --program-transform-name=* \
358   | --program-transform-nam=* | --program-transform-na=* \
359   | --program-transform-n=* | --program-transform-=* \
360   | --program-transform=* | --program-transfor=* \
361   | --program-transfo=* | --program-transf=* \
362   | --program-trans=* | --program-tran=* \
363   | --progr-tra=* | --program-tr=* | --program-t=*)
364     program_transform_name="$ac_optarg" ;;
365
366   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
367   | -silent | --silent | --silen | --sile | --sil)
368     silent=yes ;;
369
370   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
371     ac_prev=sbindir ;;
372   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
373   | --sbi=* | --sb=*)
374     sbindir="$ac_optarg" ;;
375
376   -sharedstatedir | --sharedstatedir | --sharedstatedi \
377   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
378   | --sharedst | --shareds | --shared | --share | --shar \
379   | --sha | --sh)
380     ac_prev=sharedstatedir ;;
381   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
382   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
383   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
384   | --sha=* | --sh=*)
385     sharedstatedir="$ac_optarg" ;;
386
387   -site | --site | --sit)
388     ac_prev=site ;;
389   -site=* | --site=* | --sit=*)
390     site="$ac_optarg" ;;
391
392   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
393     ac_prev=srcdir ;;
394   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
395     srcdir="$ac_optarg" ;;
396
397   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
398   | --syscon | --sysco | --sysc | --sys | --sy)
399     ac_prev=sysconfdir ;;
400   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
401   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
402     sysconfdir="$ac_optarg" ;;
403
404   -target | --target | --targe | --targ | --tar | --ta | --t)
405     ac_prev=target ;;
406   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
407     target="$ac_optarg" ;;
408
409   -v | -verbose | --verbose | --verbos | --verbo | --verb)
410     verbose=yes ;;
411
412   -version | --version | --versio | --versi | --vers)
413     echo "configure generated by autoconf version 2.13"
414     exit 0 ;;
415
416   -with-* | --with-*)
417     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
418     # Reject names that are not valid shell variable names.
419     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
420       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
421     fi
422     ac_package=`echo $ac_package| sed 's/-/_/g'`
423     case "$ac_option" in
424       *=*) ;;
425       *) ac_optarg=yes ;;
426     esac
427     eval "with_${ac_package}='$ac_optarg'" ;;
428
429   -without-* | --without-*)
430     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
431     # Reject names that are not valid shell variable names.
432     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
433       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
434     fi
435     ac_package=`echo $ac_package| sed 's/-/_/g'`
436     eval "with_${ac_package}=no" ;;
437
438   --x)
439     # Obsolete; use --with-x.
440     with_x=yes ;;
441
442   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
443   | --x-incl | --x-inc | --x-in | --x-i)
444     ac_prev=x_includes ;;
445   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
446   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
447     x_includes="$ac_optarg" ;;
448
449   -x-libraries | --x-libraries | --x-librarie | --x-librari \
450   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
451     ac_prev=x_libraries ;;
452   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
453   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
454     x_libraries="$ac_optarg" ;;
455
456   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
457     ;;
458
459   *)
460     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
461       echo "configure: warning: $ac_option: invalid host type" 1>&2
462     fi
463     if test "x$nonopt" != xNONE; then
464       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
465     fi
466     nonopt="$ac_option"
467     ;;
468
469   esac
470 done
471
472 if test -n "$ac_prev"; then
473   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
474 fi
475
476 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
477
478 # File descriptor usage:
479 # 0 standard input
480 # 1 file creation
481 # 2 errors and warnings
482 # 3 some systems may open it to /dev/tty
483 # 4 used on the Kubota Titan
484 # 6 checking for... messages and results
485 # 5 compiler messages saved in config.log
486 if test "$silent" = yes; then
487   exec 6>/dev/null
488 else
489   exec 6>&1
490 fi
491 exec 5>./config.log
492
493 echo "\
494 This file contains any messages produced by compilers while
495 running configure, to aid debugging if configure makes a mistake.
496 " 1>&5
497
498 # Strip out --no-create and --no-recursion so they do not pile up.
499 # Also quote any args containing shell metacharacters.
500 ac_configure_args=
501 for ac_arg
502 do
503   case "$ac_arg" in
504   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
505   | --no-cr | --no-c) ;;
506   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
507   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
508   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
509   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
510   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
511   esac
512 done
513
514 # NLS nuisances.
515 # Only set these to C if already set.  These must not be set unconditionally
516 # because not all systems understand e.g. LANG=C (notably SCO).
517 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
518 # Non-C LC_CTYPE values break the ctype check.
519 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
520 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
521 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
522 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
523
524 # confdefs.h avoids OS command line length limits that DEFS can exceed.
525 rm -rf conftest* confdefs.h
526 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
527 echo > confdefs.h
528
529 # A filename unique to this package, relative to the directory that
530 # configure is in, which we can look for to find out if srcdir is correct.
531 ac_unique_file=include/includes.h
532
533 # Find the source files, if location was not specified.
534 if test -z "$srcdir"; then
535   ac_srcdir_defaulted=yes
536   # Try the directory containing this script, then its parent.
537   ac_prog=$0
538   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
539   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
540   srcdir=$ac_confdir
541   if test ! -r $srcdir/$ac_unique_file; then
542     srcdir=..
543   fi
544 else
545   ac_srcdir_defaulted=no
546 fi
547 if test ! -r $srcdir/$ac_unique_file; then
548   if test "$ac_srcdir_defaulted" = yes; then
549     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
550   else
551     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
552   fi
553 fi
554 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
555
556 # Prefer explicitly selected file to automatically selected ones.
557 if test -z "$CONFIG_SITE"; then
558   if test "x$prefix" != xNONE; then
559     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
560   else
561     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
562   fi
563 fi
564 for ac_site_file in $CONFIG_SITE; do
565   if test -r "$ac_site_file"; then
566     echo "loading site script $ac_site_file"
567     . "$ac_site_file"
568   fi
569 done
570
571 if test -r "$cache_file"; then
572   echo "loading cache $cache_file"
573   . $cache_file
574 else
575   echo "creating cache $cache_file"
576   > $cache_file
577 fi
578
579 ac_ext=c
580 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
581 ac_cpp='$CPP $CPPFLAGS'
582 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
583 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
584 cross_compiling=$ac_cv_prog_cc_cross
585
586 ac_exeext=
587 ac_objext=o
588 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
589   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
590   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
591     ac_n= ac_c='
592 ' ac_t='        '
593   else
594     ac_n=-n ac_c= ac_t=
595   fi
596 else
597   ac_n= ac_c='\c' ac_t=
598 fi
599
600
601
602
603 #################################################
604 # Directory handling stuff to support both the
605 # legacy SAMBA directories and FHS compliant
606 # ones...
607
608
609 # Check whether --with-fhs or --without-fhs was given.
610 if test "${with_fhs+set}" = set; then
611   withval="$with_fhs"
612   codepagedir="\$(DATADIR)/samba/codepages"
613     configdir="${sysconfdir}/samba"
614     lockdir="\${VARDIR}/cache/samba"
615     piddir="\$(VARDIR)/run/samba"
616     logfilebase="\${VARDIR}/log/samba"
617     privatedir="\${CONFIGDIR}/private"
618     swatdir="\${DATADIR}/samba/swat"
619 else
620   codepagedir="\$(LIBDIR)/codepages"
621     configdir="\$(LIBDIR)"
622     logfilebase="\$(VARDIR)"
623     lockdir="\${VARDIR}/locks"
624     piddir="\$(VARDIR)/locks"
625     privatedir="\${prefix}/private"
626     swatdir="\${prefix}/swat"
627 fi
628
629
630 #################################################
631 # set private directory location
632 # Check whether --with-privatedir or --without-privatedir was given.
633 if test "${with_privatedir+set}" = set; then
634   withval="$with_privatedir"
635    case "$withval" in
636   yes|no)
637   #
638   # Just in case anybody calls it without argument
639   #
640     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
641   ;;
642   * )
643     privatedir="$withval"
644     ;;
645   esac
646 fi
647
648
649 #################################################
650 # set lock directory location
651 # Check whether --with-lockdir or --without-lockdir was given.
652 if test "${with_lockdir+set}" = set; then
653   withval="$with_lockdir"
654    case "$withval" in
655   yes|no)
656   #
657   # Just in case anybody calls it without argument
658   #
659     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
660   ;;
661   * )
662     lockdir="$withval"
663     ;;
664   esac
665 fi
666
667
668 #################################################
669 # set pid directory location
670 # Check whether --with-piddir or --without-piddir was given.
671 if test "${with_piddir+set}" = set; then
672   withval="$with_piddir"
673    case "$withval" in
674   yes|no)
675   #
676   # Just in case anybody calls it without argument
677   #
678     echo "configure: warning: --with-piddir called without argument - will use default" 1>&2
679   ;;
680   * )
681     piddir="$withval"
682     ;;
683   esac
684 fi
685
686
687 #################################################
688 # set SWAT directory location
689 # Check whether --with-swatdir or --without-swatdir was given.
690 if test "${with_swatdir+set}" = set; then
691   withval="$with_swatdir"
692    case "$withval" in
693   yes|no)
694   #
695   # Just in case anybody does it
696   #
697     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
698   ;;
699   * )
700     swatdir="$withval"
701     ;;
702   esac
703 fi
704
705
706 #################################################
707 # set configuration directory location
708 # Check whether --with-configdir or --without-configdir was given.
709 if test "${with_configdir+set}" = set; then
710   withval="$with_configdir"
711    case "$withval" in
712   yes|no)
713   #
714   # Just in case anybody does it
715   #
716     echo "configure: warning: --with-configdir called without argument - will use default" 1>&2
717   ;;
718   * )
719     configdir="$withval"
720     ;;
721   esac
722 fi
723
724
725 #################################################
726 # set codepage directory location
727 # Check whether --with-codepagedir or --without-codepagedir was given.
728 if test "${with_codepagedir+set}" = set; then
729   withval="$with_codepagedir"
730    case "$withval" in
731   yes|no)
732   #
733   # Just in case anybody does it
734   #
735     echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2
736   ;;
737   * )
738     codepagedir="$withval"
739     ;;
740   esac
741 fi
742
743
744 #################################################
745 # set log directory location
746 # Check whether --with-logfilebase or --without-logfilebase was given.
747 if test "${with_logfilebase+set}" = set; then
748   withval="$with_logfilebase"
749    case "$withval" in
750   yes|no)
751   #
752   # Just in case anybody does it
753   #
754     echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2
755   ;;
756   * )
757     logfilebase="$withval"
758     ;;
759   esac
760 fi
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788 # compile with optimisation and without debugging by default
789 CFLAGS="-O ${CFLAGS}"
790
791 # Check whether --enable-debug or --disable-debug was given.
792 if test "${enable_debug+set}" = set; then
793   enableval="$enable_debug"
794   if eval "test x$enable_debug = xyes"; then
795         CFLAGS="${CFLAGS} -g"
796     fi
797 fi
798
799
800 # Check whether --enable-developer or --disable-developer was given.
801 if test "${enable_developer+set}" = set; then
802   enableval="$enable_developer"
803   if eval "test x$enable_developer = xyes"; then
804         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
805     fi
806 fi
807
808
809 # Check whether --enable-krb5developer or --disable-krb5developer was given.
810 if test "${enable_krb5developer+set}" = set; then
811   enableval="$enable_krb5developer"
812   if eval "test x$enable_krb5developer = xyes"; then
813         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
814     fi
815 fi
816
817
818 # Check whether --enable-dmalloc or --disable-dmalloc was given.
819 if test "${enable_dmalloc+set}" = set; then
820   enableval="$enable_dmalloc"
821   :
822 fi
823
824
825 if test "x$enable_dmalloc" = xyes
826 then
827         cat >> confdefs.h <<\EOF
828 #define ENABLE_DMALLOC 1
829 EOF
830
831         cat >> confdefs.h <<\EOF
832 #define DMALLOC_FUNC_CHECK 1
833 EOF
834
835         LIBS="$LIBS -ldmalloc"  
836 fi
837
838 # Extract the first word of "gcc", so it can be a program name with args.
839 set dummy gcc; ac_word=$2
840 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
841 echo "configure:842: checking for $ac_word" >&5
842 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
843   echo $ac_n "(cached) $ac_c" 1>&6
844 else
845   if test -n "$CC"; then
846   ac_cv_prog_CC="$CC" # Let the user override the test.
847 else
848   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
849   ac_dummy="$PATH"
850   for ac_dir in $ac_dummy; do
851     test -z "$ac_dir" && ac_dir=.
852     if test -f $ac_dir/$ac_word; then
853       ac_cv_prog_CC="gcc"
854       break
855     fi
856   done
857   IFS="$ac_save_ifs"
858 fi
859 fi
860 CC="$ac_cv_prog_CC"
861 if test -n "$CC"; then
862   echo "$ac_t""$CC" 1>&6
863 else
864   echo "$ac_t""no" 1>&6
865 fi
866
867 if test -z "$CC"; then
868   # Extract the first word of "cc", so it can be a program name with args.
869 set dummy cc; ac_word=$2
870 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
871 echo "configure:872: checking for $ac_word" >&5
872 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
873   echo $ac_n "(cached) $ac_c" 1>&6
874 else
875   if test -n "$CC"; then
876   ac_cv_prog_CC="$CC" # Let the user override the test.
877 else
878   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
879   ac_prog_rejected=no
880   ac_dummy="$PATH"
881   for ac_dir in $ac_dummy; do
882     test -z "$ac_dir" && ac_dir=.
883     if test -f $ac_dir/$ac_word; then
884       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
885         ac_prog_rejected=yes
886         continue
887       fi
888       ac_cv_prog_CC="cc"
889       break
890     fi
891   done
892   IFS="$ac_save_ifs"
893 if test $ac_prog_rejected = yes; then
894   # We found a bogon in the path, so make sure we never use it.
895   set dummy $ac_cv_prog_CC
896   shift
897   if test $# -gt 0; then
898     # We chose a different compiler from the bogus one.
899     # However, it has the same basename, so the bogon will be chosen
900     # first if we set CC to just the basename; use the full file name.
901     shift
902     set dummy "$ac_dir/$ac_word" "$@"
903     shift
904     ac_cv_prog_CC="$@"
905   fi
906 fi
907 fi
908 fi
909 CC="$ac_cv_prog_CC"
910 if test -n "$CC"; then
911   echo "$ac_t""$CC" 1>&6
912 else
913   echo "$ac_t""no" 1>&6
914 fi
915
916   if test -z "$CC"; then
917     case "`uname -s`" in
918     *win32* | *WIN32*)
919       # Extract the first word of "cl", so it can be a program name with args.
920 set dummy cl; ac_word=$2
921 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
922 echo "configure:923: checking for $ac_word" >&5
923 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
924   echo $ac_n "(cached) $ac_c" 1>&6
925 else
926   if test -n "$CC"; then
927   ac_cv_prog_CC="$CC" # Let the user override the test.
928 else
929   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
930   ac_dummy="$PATH"
931   for ac_dir in $ac_dummy; do
932     test -z "$ac_dir" && ac_dir=.
933     if test -f $ac_dir/$ac_word; then
934       ac_cv_prog_CC="cl"
935       break
936     fi
937   done
938   IFS="$ac_save_ifs"
939 fi
940 fi
941 CC="$ac_cv_prog_CC"
942 if test -n "$CC"; then
943   echo "$ac_t""$CC" 1>&6
944 else
945   echo "$ac_t""no" 1>&6
946 fi
947  ;;
948     esac
949   fi
950   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
951 fi
952
953 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
954 echo "configure:955: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
955
956 ac_ext=c
957 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
958 ac_cpp='$CPP $CPPFLAGS'
959 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
960 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
961 cross_compiling=$ac_cv_prog_cc_cross
962
963 cat > conftest.$ac_ext << EOF
964
965 #line 966 "configure"
966 #include "confdefs.h"
967
968 main(){return(0);}
969 EOF
970 if { (eval echo configure:971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
971   ac_cv_prog_cc_works=yes
972   # If we can't run a trivial program, we are probably using a cross compiler.
973   if (./conftest; exit) 2>/dev/null; then
974     ac_cv_prog_cc_cross=no
975   else
976     ac_cv_prog_cc_cross=yes
977   fi
978 else
979   echo "configure: failed program was:" >&5
980   cat conftest.$ac_ext >&5
981   ac_cv_prog_cc_works=no
982 fi
983 rm -fr conftest*
984 ac_ext=c
985 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
986 ac_cpp='$CPP $CPPFLAGS'
987 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
988 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
989 cross_compiling=$ac_cv_prog_cc_cross
990
991 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
992 if test $ac_cv_prog_cc_works = no; then
993   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
994 fi
995 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
996 echo "configure:997: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
997 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
998 cross_compiling=$ac_cv_prog_cc_cross
999
1000 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1001 echo "configure:1002: checking whether we are using GNU C" >&5
1002 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1003   echo $ac_n "(cached) $ac_c" 1>&6
1004 else
1005   cat > conftest.c <<EOF
1006 #ifdef __GNUC__
1007   yes;
1008 #endif
1009 EOF
1010 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1011   ac_cv_prog_gcc=yes
1012 else
1013   ac_cv_prog_gcc=no
1014 fi
1015 fi
1016
1017 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1018
1019 if test $ac_cv_prog_gcc = yes; then
1020   GCC=yes
1021 else
1022   GCC=
1023 fi
1024
1025 ac_test_CFLAGS="${CFLAGS+set}"
1026 ac_save_CFLAGS="$CFLAGS"
1027 CFLAGS=
1028 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1029 echo "configure:1030: checking whether ${CC-cc} accepts -g" >&5
1030 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1031   echo $ac_n "(cached) $ac_c" 1>&6
1032 else
1033   echo 'void f(){}' > conftest.c
1034 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1035   ac_cv_prog_cc_g=yes
1036 else
1037   ac_cv_prog_cc_g=no
1038 fi
1039 rm -f conftest*
1040
1041 fi
1042
1043 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1044 if test "$ac_test_CFLAGS" = set; then
1045   CFLAGS="$ac_save_CFLAGS"
1046 elif test $ac_cv_prog_cc_g = yes; then
1047   if test "$GCC" = yes; then
1048     CFLAGS="-g -O2"
1049   else
1050     CFLAGS="-g"
1051   fi
1052 else
1053   if test "$GCC" = yes; then
1054     CFLAGS="-O2"
1055   else
1056     CFLAGS=
1057   fi
1058 fi
1059
1060 ac_aux_dir=
1061 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1062   if test -f $ac_dir/install-sh; then
1063     ac_aux_dir=$ac_dir
1064     ac_install_sh="$ac_aux_dir/install-sh -c"
1065     break
1066   elif test -f $ac_dir/install.sh; then
1067     ac_aux_dir=$ac_dir
1068     ac_install_sh="$ac_aux_dir/install.sh -c"
1069     break
1070   fi
1071 done
1072 if test -z "$ac_aux_dir"; then
1073   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1074 fi
1075 ac_config_guess=$ac_aux_dir/config.guess
1076 ac_config_sub=$ac_aux_dir/config.sub
1077 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1078
1079 # Find a good install program.  We prefer a C program (faster),
1080 # so one script is as good as another.  But avoid the broken or
1081 # incompatible versions:
1082 # SysV /etc/install, /usr/sbin/install
1083 # SunOS /usr/etc/install
1084 # IRIX /sbin/install
1085 # AIX /bin/install
1086 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1087 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1088 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1089 # ./install, which can be erroneously created by make from ./install.sh.
1090 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1091 echo "configure:1092: checking for a BSD compatible install" >&5
1092 if test -z "$INSTALL"; then
1093 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1094   echo $ac_n "(cached) $ac_c" 1>&6
1095 else
1096     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1097   for ac_dir in $PATH; do
1098     # Account for people who put trailing slashes in PATH elements.
1099     case "$ac_dir/" in
1100     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1101     *)
1102       # OSF1 and SCO ODT 3.0 have their own names for install.
1103       # Don't use installbsd from OSF since it installs stuff as root
1104       # by default.
1105       for ac_prog in ginstall scoinst install; do
1106         if test -f $ac_dir/$ac_prog; then
1107           if test $ac_prog = install &&
1108             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1109             # AIX install.  It has an incompatible calling convention.
1110             :
1111           else
1112             ac_cv_path_install="$ac_dir/$ac_prog -c"
1113             break 2
1114           fi
1115         fi
1116       done
1117       ;;
1118     esac
1119   done
1120   IFS="$ac_save_IFS"
1121
1122 fi
1123   if test "${ac_cv_path_install+set}" = set; then
1124     INSTALL="$ac_cv_path_install"
1125   else
1126     # As a last resort, use the slow shell script.  We don't cache a
1127     # path for INSTALL within a source directory, because that will
1128     # break other packages using the cache if that directory is
1129     # removed, or if the path is relative.
1130     INSTALL="$ac_install_sh"
1131   fi
1132 fi
1133 echo "$ac_t""$INSTALL" 1>&6
1134
1135 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1136 # It thinks the first close brace ends the variable substitution.
1137 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1138
1139 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1140
1141 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1142
1143 for ac_prog in gawk mawk nawk awk
1144 do
1145 # Extract the first word of "$ac_prog", so it can be a program name with args.
1146 set dummy $ac_prog; ac_word=$2
1147 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1148 echo "configure:1149: checking for $ac_word" >&5
1149 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1150   echo $ac_n "(cached) $ac_c" 1>&6
1151 else
1152   if test -n "$AWK"; then
1153   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1154 else
1155   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1156   ac_dummy="$PATH"
1157   for ac_dir in $ac_dummy; do
1158     test -z "$ac_dir" && ac_dir=.
1159     if test -f $ac_dir/$ac_word; then
1160       ac_cv_prog_AWK="$ac_prog"
1161       break
1162     fi
1163   done
1164   IFS="$ac_save_ifs"
1165 fi
1166 fi
1167 AWK="$ac_cv_prog_AWK"
1168 if test -n "$AWK"; then
1169   echo "$ac_t""$AWK" 1>&6
1170 else
1171   echo "$ac_t""no" 1>&6
1172 fi
1173
1174 test -n "$AWK" && break
1175 done
1176
1177
1178 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1179 echo "configure:1180: checking for POSIXized ISC" >&5
1180 if test -d /etc/conf/kconfig.d &&
1181   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1182 then
1183   echo "$ac_t""yes" 1>&6
1184   ISC=yes # If later tests want to check for ISC.
1185   cat >> confdefs.h <<\EOF
1186 #define _POSIX_SOURCE 1
1187 EOF
1188
1189   if test "$GCC" = yes; then
1190     CC="$CC -posix"
1191   else
1192     CC="$CC -Xp"
1193   fi
1194 else
1195   echo "$ac_t""no" 1>&6
1196   ISC=
1197 fi
1198
1199
1200 if test "x$CC" != xcc; then
1201   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1202 echo "configure:1203: checking whether $CC and cc understand -c and -o together" >&5
1203 else
1204   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1205 echo "configure:1206: checking whether cc understands -c and -o together" >&5
1206 fi
1207 set dummy $CC; ac_cc="`echo $2 |
1208                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1209 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1210   echo $ac_n "(cached) $ac_c" 1>&6
1211 else
1212   echo 'foo(){}' > conftest.c
1213 # Make sure it works both with $CC and with simple cc.
1214 # We do the test twice because some compilers refuse to overwrite an
1215 # existing .o file with -o, though they will create one.
1216 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1217 if { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1218    test -f conftest.o && { (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1219 then
1220   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1221   if test "x$CC" != xcc; then
1222     # Test first that cc exists at all.
1223     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1224       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1225       if { (eval echo configure:1226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1226          test -f conftest.o && { (eval echo configure:1227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1227       then
1228         # cc works too.
1229         :
1230       else
1231         # cc exists but doesn't like -o.
1232         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1233       fi
1234     fi
1235   fi
1236 else
1237   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1238 fi
1239 rm -f conftest*
1240
1241 fi
1242 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1243   echo "$ac_t""yes" 1>&6
1244 else
1245   echo "$ac_t""no" 1>&6
1246   cat >> confdefs.h <<\EOF
1247 #define NO_MINUS_C_MINUS_O 1
1248 EOF
1249
1250 fi
1251
1252 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1253       BROKEN_CC=
1254 else
1255       BROKEN_CC=#
1256 fi
1257
1258
1259 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1260 echo "configure:1261: checking that the C compiler understands volatile" >&5
1261 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1262   echo $ac_n "(cached) $ac_c" 1>&6
1263 else
1264   
1265     cat > conftest.$ac_ext <<EOF
1266 #line 1267 "configure"
1267 #include "confdefs.h"
1268 #include <sys/types.h>
1269 int main() {
1270 volatile int i = 0
1271 ; return 0; }
1272 EOF
1273 if { (eval echo configure:1274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1274   rm -rf conftest*
1275   samba_cv_volatile=yes
1276 else
1277   echo "configure: failed program was:" >&5
1278   cat conftest.$ac_ext >&5
1279   rm -rf conftest*
1280   samba_cv_volatile=no
1281 fi
1282 rm -f conftest*
1283 fi
1284
1285 echo "$ac_t""$samba_cv_volatile" 1>&6
1286 if test x"$samba_cv_volatile" = x"yes"; then
1287    cat >> confdefs.h <<\EOF
1288 #define HAVE_VOLATILE 1
1289 EOF
1290
1291 fi
1292
1293
1294
1295 # Do some error checking and defaulting for the host and target type.
1296 # The inputs are:
1297 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1298 #
1299 # The rules are:
1300 # 1. You are not allowed to specify --host, --target, and nonopt at the
1301 #    same time.
1302 # 2. Host defaults to nonopt.
1303 # 3. If nonopt is not specified, then host defaults to the current host,
1304 #    as determined by config.guess.
1305 # 4. Target and build default to nonopt.
1306 # 5. If nonopt is not specified, then target and build default to host.
1307
1308 # The aliases save the names the user supplied, while $host etc.
1309 # will get canonicalized.
1310 case $host---$target---$nonopt in
1311 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1312 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1313 esac
1314
1315
1316 # Make sure we can run config.sub.
1317 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1318 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1319 fi
1320
1321 echo $ac_n "checking host system type""... $ac_c" 1>&6
1322 echo "configure:1323: checking host system type" >&5
1323
1324 host_alias=$host
1325 case "$host_alias" in
1326 NONE)
1327   case $nonopt in
1328   NONE)
1329     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1330     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1331     fi ;;
1332   *) host_alias=$nonopt ;;
1333   esac ;;
1334 esac
1335
1336 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1337 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1338 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1339 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1340 echo "$ac_t""$host" 1>&6
1341
1342 echo $ac_n "checking target system type""... $ac_c" 1>&6
1343 echo "configure:1344: checking target system type" >&5
1344
1345 target_alias=$target
1346 case "$target_alias" in
1347 NONE)
1348   case $nonopt in
1349   NONE) target_alias=$host_alias ;;
1350   *) target_alias=$nonopt ;;
1351   esac ;;
1352 esac
1353
1354 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1355 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1356 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1357 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1358 echo "$ac_t""$target" 1>&6
1359
1360 echo $ac_n "checking build system type""... $ac_c" 1>&6
1361 echo "configure:1362: checking build system type" >&5
1362
1363 build_alias=$build
1364 case "$build_alias" in
1365 NONE)
1366   case $nonopt in
1367   NONE) build_alias=$host_alias ;;
1368   *) build_alias=$nonopt ;;
1369   esac ;;
1370 esac
1371
1372 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1373 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1374 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1375 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1376 echo "$ac_t""$build" 1>&6
1377
1378 test "$host_alias" != "$target_alias" &&
1379   test "$program_prefix$program_suffix$program_transform_name" = \
1380     NONENONEs,x,x, &&
1381   program_prefix=${target_alias}-
1382
1383
1384   case "$host_os" in
1385         *irix6*) cat >> confdefs.h <<\EOF
1386 #include <standards.h>
1387 EOF
1388
1389         ;;
1390 esac
1391
1392
1393     
1394     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1395 echo "configure:1396: checking config.cache system type" >&5
1396     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1397          test x"$ac_cv_host_system_type" != x"$host"; } ||
1398        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1399          test x"$ac_cv_build_system_type" != x"$build"; } ||
1400        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1401          test x"$ac_cv_target_system_type" != x"$target"; }; then
1402         echo "$ac_t""different" 1>&6
1403         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1404     else
1405         echo "$ac_t""same" 1>&6
1406     fi
1407     ac_cv_host_system_type="$host"
1408     ac_cv_build_system_type="$build"
1409     ac_cv_target_system_type="$target"
1410
1411
1412 DYNEXP=
1413
1414 #
1415 # Config CPPFLAG settings for strange OS's that must be set
1416 # before other tests.
1417 #
1418 case "$host_os" in
1419 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1420     *hpux*)
1421     
1422       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1423 echo "configure:1424: checking whether ${CC-cc} accepts -Ae" >&5
1424 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1425   echo $ac_n "(cached) $ac_c" 1>&6
1426 else
1427   echo 'void f(){}' > conftest.c
1428 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1429   ac_cv_prog_cc_Ae=yes
1430 else
1431   ac_cv_prog_cc_Ae=no
1432 fi
1433 rm -f conftest*
1434
1435 fi
1436
1437 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1438       # mmap on HPUX is completely broken...
1439       cat >> confdefs.h <<\EOF
1440 #define MMAP_BLACKLIST 1
1441 EOF
1442
1443       if test $ac_cv_prog_cc_Ae = yes; then
1444         CPPFLAGS="$CPPFLAGS -Ae"
1445       fi
1446 #
1447 # Defines needed for HPUX support.
1448 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1449 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1450 #
1451       case `uname -r` in
1452                         *9*|*10*)
1453                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1454                                 cat >> confdefs.h <<\EOF
1455 #define USE_BOTH_CRYPT_CALLS 1
1456 EOF
1457
1458                                 cat >> confdefs.h <<\EOF
1459 #define _HPUX_SOURCE 1
1460 EOF
1461
1462                                 cat >> confdefs.h <<\EOF
1463 #define _POSIX_SOURCE 1
1464 EOF
1465
1466                                 cat >> confdefs.h <<\EOF
1467 #define _ALIGNMENT_REQUIRED 1
1468 EOF
1469
1470                                 cat >> confdefs.h <<\EOF
1471 #define _MAX_ALIGNMENT 4
1472 EOF
1473
1474                                 ;;
1475                         *11*)
1476                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1477                                 cat >> confdefs.h <<\EOF
1478 #define USE_BOTH_CRYPT_CALLS 1
1479 EOF
1480
1481                                 cat >> confdefs.h <<\EOF
1482 #define _HPUX_SOURCE 1
1483 EOF
1484
1485                                 cat >> confdefs.h <<\EOF
1486 #define _POSIX_SOURCE 1
1487 EOF
1488
1489                                 cat >> confdefs.h <<\EOF
1490 #define _LARGEFILE64_SOURCE 1
1491 EOF
1492
1493                                 cat >> confdefs.h <<\EOF
1494 #define _ALIGNMENT_REQUIRED 1
1495 EOF
1496
1497                                 cat >> confdefs.h <<\EOF
1498 #define _MAX_ALIGNMENT 4
1499 EOF
1500
1501                                 ;;
1502       esac
1503       DYNEXP="-Wl,-E"
1504       ;;
1505
1506 #
1507 # CRAY Unicos has broken const handling
1508        *unicos*)
1509           echo "$ac_t""disabling const" 1>&6
1510           CPPFLAGS="$CPPFLAGS -Dconst="
1511           ;;
1512         
1513 #
1514 # AIX4.x doesn't even admit to having large
1515 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1516 #
1517     *aix4*)
1518           echo "$ac_t""enabling large file support" 1>&6
1519       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1520       cat >> confdefs.h <<\EOF
1521 #define _LARGE_FILES 1
1522 EOF
1523
1524       ;;    
1525 #
1526 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1527 # to the existance of large files..
1528 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1529 # recommendations on large file support, however it makes the
1530 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1531 # recommendation makes the compile fail on gcc2.7. JRA.
1532 #
1533         *solaris*)
1534                 case `uname -r` in
1535                         5.0*|5.1*|5.2*|5.3*|5.5*)
1536                                 echo "$ac_t""no large file support" 1>&6
1537                                 ;;
1538                         5.*)
1539                         echo "$ac_t""enabling large file support" 1>&6
1540                         if test "$ac_cv_prog_gcc" = yes; then
1541                                 ${CC-cc} -v >conftest.c 2>&1
1542                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1543                                 rm -fr conftest.c
1544                                 case "$ac_cv_gcc_compiler_version_number" in
1545                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1546                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1547                                                 cat >> confdefs.h <<\EOF
1548 #define _LARGEFILE64_SOURCE 1
1549 EOF
1550
1551                                                 ;;
1552                                         *)
1553                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1554                                                 cat >> confdefs.h <<\EOF
1555 #define _LARGEFILE64_SOURCE 1
1556 EOF
1557
1558                                                 cat >> confdefs.h <<\EOF
1559 #define _FILE_OFFSET_BITS 64
1560 EOF
1561
1562                                                 ;;
1563                                 esac
1564                         else
1565                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1566                                 cat >> confdefs.h <<\EOF
1567 #define _LARGEFILE64_SOURCE 1
1568 EOF
1569
1570                                 cat >> confdefs.h <<\EOF
1571 #define _FILE_OFFSET_BITS 64
1572 EOF
1573
1574                         fi
1575                         ;;
1576                 esac
1577                 ;;
1578 #
1579 # Tests needed for SINIX large file support.
1580 #
1581     *sysv4*)
1582       if test $host = mips-sni-sysv4 ; then
1583         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1584 echo "configure:1585: checking for LFS support" >&5
1585         old_CPPFLAGS="$CPPFLAGS"
1586         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1587         if test "$cross_compiling" = yes; then
1588   SINIX_LFS_SUPPORT=cross
1589 else
1590   cat > conftest.$ac_ext <<EOF
1591 #line 1592 "configure"
1592 #include "confdefs.h"
1593
1594 #include <unistd.h>
1595 main () {
1596 #if _LFS64_LARGEFILE == 1
1597 exit(0);
1598 #else
1599 exit(1);
1600 #endif
1601 }
1602 EOF
1603 if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1604 then
1605   SINIX_LFS_SUPPORT=yes
1606 else
1607   echo "configure: failed program was:" >&5
1608   cat conftest.$ac_ext >&5
1609   rm -fr conftest*
1610   SINIX_LFS_SUPPORT=no
1611 fi
1612 rm -fr conftest*
1613 fi
1614
1615         CPPFLAGS="$old_CPPFLAGS"
1616         if test x$SINIX_LFS_SUPPORT = xyes ; then
1617           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1618           cat >> confdefs.h <<\EOF
1619 #define _LARGEFILE64_SOURCE 1
1620 EOF
1621
1622           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1623           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1624           LIBS="`getconf LFS64_LIBS` $LIBS"
1625         fi
1626       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1627       fi
1628     ;;
1629
1630 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1631 #
1632     *linux*)
1633         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1634 echo "configure:1635: checking for LFS support" >&5
1635         old_CPPFLAGS="$CPPFLAGS"
1636         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1637        if test "$cross_compiling" = yes; then
1638   LINUX_LFS_SUPPORT=cross
1639 else
1640   cat > conftest.$ac_ext <<EOF
1641 #line 1642 "configure"
1642 #include "confdefs.h"
1643
1644 #include <unistd.h>
1645 #include <sys/utsname.h>
1646 main() {
1647 #if _LFS64_LARGEFILE == 1
1648        struct utsname uts;
1649        char *release;
1650        int major, minor;
1651
1652        /* Ensure this is glibc 2.2 or higher */
1653 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1654        int libc_major = __GLIBC__;
1655        int libc_minor = __GLIBC_MINOR__;
1656
1657        if (libc_major < 2)
1658               exit(1);
1659        if (libc_minor < 2)
1660               exit(1);
1661 #endif
1662
1663        /* Ensure this is kernel 2.4 or higher */
1664
1665        uname(&uts);
1666        release = uts.release;
1667        major = atoi(strsep(&release, "."));
1668        minor = atoi(strsep(&release, "."));
1669
1670        if (major > 2 || (major == 2 && minor > 3))
1671                exit(0);
1672        exit(1);
1673 #else
1674        exit(1);
1675 #endif
1676 }
1677
1678 EOF
1679 if { (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1680 then
1681   LINUX_LFS_SUPPORT=yes
1682 else
1683   echo "configure: failed program was:" >&5
1684   cat conftest.$ac_ext >&5
1685   rm -fr conftest*
1686   LINUX_LFS_SUPPORT=no
1687 fi
1688 rm -fr conftest*
1689 fi
1690
1691         CPPFLAGS="$old_CPPFLAGS"
1692         if test x$LINUX_LFS_SUPPORT = xyes ; then
1693           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1694           cat >> confdefs.h <<\EOF
1695 #define _LARGEFILE64_SOURCE 1
1696 EOF
1697
1698           cat >> confdefs.h <<\EOF
1699 #define _FILE_OFFSET_BITS 64
1700 EOF
1701
1702           cat >> confdefs.h <<\EOF
1703 #define _GNU_SOURCE 1
1704 EOF
1705
1706         fi
1707        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1708                 ;;
1709
1710     *hurd*)
1711         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1712 echo "configure:1713: checking for LFS support" >&5
1713         old_CPPFLAGS="$CPPFLAGS"
1714         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1715         if test "$cross_compiling" = yes; then
1716   GLIBC_LFS_SUPPORT=cross
1717 else
1718   cat > conftest.$ac_ext <<EOF
1719 #line 1720 "configure"
1720 #include "confdefs.h"
1721
1722 #include <unistd.h>
1723 main () {
1724 #if _LFS64_LARGEFILE == 1
1725 exit(0);
1726 #else
1727 exit(1);
1728 #endif
1729 }
1730 EOF
1731 if { (eval echo configure:1732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1732 then
1733   GLIBC_LFS_SUPPORT=yes
1734 else
1735   echo "configure: failed program was:" >&5
1736   cat conftest.$ac_ext >&5
1737   rm -fr conftest*
1738   GLIBC_LFS_SUPPORT=no
1739 fi
1740 rm -fr conftest*
1741 fi
1742
1743         CPPFLAGS="$old_CPPFLAGS"
1744         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1745           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1746           cat >> confdefs.h <<\EOF
1747 #define _LARGEFILE64_SOURCE 1
1748 EOF
1749
1750           cat >> confdefs.h <<\EOF
1751 #define _GNU_SOURCE 1
1752 EOF
1753
1754         fi
1755       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1756     ;;
1757
1758 esac
1759
1760 echo $ac_n "checking for inline""... $ac_c" 1>&6
1761 echo "configure:1762: checking for inline" >&5
1762 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1763   echo $ac_n "(cached) $ac_c" 1>&6
1764 else
1765   ac_cv_c_inline=no
1766 for ac_kw in inline __inline__ __inline; do
1767   cat > conftest.$ac_ext <<EOF
1768 #line 1769 "configure"
1769 #include "confdefs.h"
1770
1771 int main() {
1772 } $ac_kw foo() {
1773 ; return 0; }
1774 EOF
1775 if { (eval echo configure:1776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1776   rm -rf conftest*
1777   ac_cv_c_inline=$ac_kw; break
1778 else
1779   echo "configure: failed program was:" >&5
1780   cat conftest.$ac_ext >&5
1781 fi
1782 rm -f conftest*
1783 done
1784
1785 fi
1786
1787 echo "$ac_t""$ac_cv_c_inline" 1>&6
1788 case "$ac_cv_c_inline" in
1789   inline | yes) ;;
1790   no) cat >> confdefs.h <<\EOF
1791 #define inline 
1792 EOF
1793  ;;
1794   *)  cat >> confdefs.h <<EOF
1795 #define inline $ac_cv_c_inline
1796 EOF
1797  ;;
1798 esac
1799
1800 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1801 echo "configure:1802: checking how to run the C preprocessor" >&5
1802 # On Suns, sometimes $CPP names a directory.
1803 if test -n "$CPP" && test -d "$CPP"; then
1804   CPP=
1805 fi
1806 if test -z "$CPP"; then
1807 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1808   echo $ac_n "(cached) $ac_c" 1>&6
1809 else
1810     # This must be in double quotes, not single quotes, because CPP may get
1811   # substituted into the Makefile and "${CC-cc}" will confuse make.
1812   CPP="${CC-cc} -E"
1813   # On the NeXT, cc -E runs the code through the compiler's parser,
1814   # not just through cpp.
1815   cat > conftest.$ac_ext <<EOF
1816 #line 1817 "configure"
1817 #include "confdefs.h"
1818 #include <assert.h>
1819 Syntax Error
1820 EOF
1821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1822 { (eval echo configure:1823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1824 if test -z "$ac_err"; then
1825   :
1826 else
1827   echo "$ac_err" >&5
1828   echo "configure: failed program was:" >&5
1829   cat conftest.$ac_ext >&5
1830   rm -rf conftest*
1831   CPP="${CC-cc} -E -traditional-cpp"
1832   cat > conftest.$ac_ext <<EOF
1833 #line 1834 "configure"
1834 #include "confdefs.h"
1835 #include <assert.h>
1836 Syntax Error
1837 EOF
1838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1839 { (eval echo configure:1840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1841 if test -z "$ac_err"; then
1842   :
1843 else
1844   echo "$ac_err" >&5
1845   echo "configure: failed program was:" >&5
1846   cat conftest.$ac_ext >&5
1847   rm -rf conftest*
1848   CPP="${CC-cc} -nologo -E"
1849   cat > conftest.$ac_ext <<EOF
1850 #line 1851 "configure"
1851 #include "confdefs.h"
1852 #include <assert.h>
1853 Syntax Error
1854 EOF
1855 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1856 { (eval echo configure:1857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1857 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1858 if test -z "$ac_err"; then
1859   :
1860 else
1861   echo "$ac_err" >&5
1862   echo "configure: failed program was:" >&5
1863   cat conftest.$ac_ext >&5
1864   rm -rf conftest*
1865   CPP=/lib/cpp
1866 fi
1867 rm -f conftest*
1868 fi
1869 rm -f conftest*
1870 fi
1871 rm -f conftest*
1872   ac_cv_prog_CPP="$CPP"
1873 fi
1874   CPP="$ac_cv_prog_CPP"
1875 else
1876   ac_cv_prog_CPP="$CPP"
1877 fi
1878 echo "$ac_t""$CPP" 1>&6
1879
1880 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1881 echo "configure:1882: checking for ANSI C header files" >&5
1882 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1883   echo $ac_n "(cached) $ac_c" 1>&6
1884 else
1885   cat > conftest.$ac_ext <<EOF
1886 #line 1887 "configure"
1887 #include "confdefs.h"
1888 #include <stdlib.h>
1889 #include <stdarg.h>
1890 #include <string.h>
1891 #include <float.h>
1892 EOF
1893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1894 { (eval echo configure:1895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1896 if test -z "$ac_err"; then
1897   rm -rf conftest*
1898   ac_cv_header_stdc=yes
1899 else
1900   echo "$ac_err" >&5
1901   echo "configure: failed program was:" >&5
1902   cat conftest.$ac_ext >&5
1903   rm -rf conftest*
1904   ac_cv_header_stdc=no
1905 fi
1906 rm -f conftest*
1907
1908 if test $ac_cv_header_stdc = yes; then
1909   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1910 cat > conftest.$ac_ext <<EOF
1911 #line 1912 "configure"
1912 #include "confdefs.h"
1913 #include <string.h>
1914 EOF
1915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1916   egrep "memchr" >/dev/null 2>&1; then
1917   :
1918 else
1919   rm -rf conftest*
1920   ac_cv_header_stdc=no
1921 fi
1922 rm -f conftest*
1923
1924 fi
1925
1926 if test $ac_cv_header_stdc = yes; then
1927   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1928 cat > conftest.$ac_ext <<EOF
1929 #line 1930 "configure"
1930 #include "confdefs.h"
1931 #include <stdlib.h>
1932 EOF
1933 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1934   egrep "free" >/dev/null 2>&1; then
1935   :
1936 else
1937   rm -rf conftest*
1938   ac_cv_header_stdc=no
1939 fi
1940 rm -f conftest*
1941
1942 fi
1943
1944 if test $ac_cv_header_stdc = yes; then
1945   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1946 if test "$cross_compiling" = yes; then
1947   :
1948 else
1949   cat > conftest.$ac_ext <<EOF
1950 #line 1951 "configure"
1951 #include "confdefs.h"
1952 #include <ctype.h>
1953 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1954 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1955 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1956 int main () { int i; for (i = 0; i < 256; i++)
1957 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1958 exit (0); }
1959
1960 EOF
1961 if { (eval echo configure:1962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1962 then
1963   :
1964 else
1965   echo "configure: failed program was:" >&5
1966   cat conftest.$ac_ext >&5
1967   rm -fr conftest*
1968   ac_cv_header_stdc=no
1969 fi
1970 rm -fr conftest*
1971 fi
1972
1973 fi
1974 fi
1975
1976 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1977 if test $ac_cv_header_stdc = yes; then
1978   cat >> confdefs.h <<\EOF
1979 #define STDC_HEADERS 1
1980 EOF
1981
1982 fi
1983
1984 ac_header_dirent=no
1985 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1986 do
1987 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1988 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1989 echo "configure:1990: checking for $ac_hdr that defines DIR" >&5
1990 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1991   echo $ac_n "(cached) $ac_c" 1>&6
1992 else
1993   cat > conftest.$ac_ext <<EOF
1994 #line 1995 "configure"
1995 #include "confdefs.h"
1996 #include <sys/types.h>
1997 #include <$ac_hdr>
1998 int main() {
1999 DIR *dirp = 0;
2000 ; return 0; }
2001 EOF
2002 if { (eval echo configure:2003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2003   rm -rf conftest*
2004   eval "ac_cv_header_dirent_$ac_safe=yes"
2005 else
2006   echo "configure: failed program was:" >&5
2007   cat conftest.$ac_ext >&5
2008   rm -rf conftest*
2009   eval "ac_cv_header_dirent_$ac_safe=no"
2010 fi
2011 rm -f conftest*
2012 fi
2013 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2014   echo "$ac_t""yes" 1>&6
2015     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2016   cat >> confdefs.h <<EOF
2017 #define $ac_tr_hdr 1
2018 EOF
2019  ac_header_dirent=$ac_hdr; break
2020 else
2021   echo "$ac_t""no" 1>&6
2022 fi
2023 done
2024 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2025 if test $ac_header_dirent = dirent.h; then
2026 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2027 echo "configure:2028: checking for opendir in -ldir" >&5
2028 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2029 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2030   echo $ac_n "(cached) $ac_c" 1>&6
2031 else
2032   ac_save_LIBS="$LIBS"
2033 LIBS="-ldir  $LIBS"
2034 cat > conftest.$ac_ext <<EOF
2035 #line 2036 "configure"
2036 #include "confdefs.h"
2037 /* Override any gcc2 internal prototype to avoid an error.  */
2038 /* We use char because int might match the return type of a gcc2
2039     builtin and then its argument prototype would still apply.  */
2040 char opendir();
2041
2042 int main() {
2043 opendir()
2044 ; return 0; }
2045 EOF
2046 if { (eval echo configure:2047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2047   rm -rf conftest*
2048   eval "ac_cv_lib_$ac_lib_var=yes"
2049 else
2050   echo "configure: failed program was:" >&5
2051   cat conftest.$ac_ext >&5
2052   rm -rf conftest*
2053   eval "ac_cv_lib_$ac_lib_var=no"
2054 fi
2055 rm -f conftest*
2056 LIBS="$ac_save_LIBS"
2057
2058 fi
2059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2060   echo "$ac_t""yes" 1>&6
2061   LIBS="$LIBS -ldir"
2062 else
2063   echo "$ac_t""no" 1>&6
2064 fi
2065
2066 else
2067 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2068 echo "configure:2069: checking for opendir in -lx" >&5
2069 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2070 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2071   echo $ac_n "(cached) $ac_c" 1>&6
2072 else
2073   ac_save_LIBS="$LIBS"
2074 LIBS="-lx  $LIBS"
2075 cat > conftest.$ac_ext <<EOF
2076 #line 2077 "configure"
2077 #include "confdefs.h"
2078 /* Override any gcc2 internal prototype to avoid an error.  */
2079 /* We use char because int might match the return type of a gcc2
2080     builtin and then its argument prototype would still apply.  */
2081 char opendir();
2082
2083 int main() {
2084 opendir()
2085 ; return 0; }
2086 EOF
2087 if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2088   rm -rf conftest*
2089   eval "ac_cv_lib_$ac_lib_var=yes"
2090 else
2091   echo "configure: failed program was:" >&5
2092   cat conftest.$ac_ext >&5
2093   rm -rf conftest*
2094   eval "ac_cv_lib_$ac_lib_var=no"
2095 fi
2096 rm -f conftest*
2097 LIBS="$ac_save_LIBS"
2098
2099 fi
2100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2101   echo "$ac_t""yes" 1>&6
2102   LIBS="$LIBS -lx"
2103 else
2104   echo "$ac_t""no" 1>&6
2105 fi
2106
2107 fi
2108
2109 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2110 echo "configure:2111: checking whether time.h and sys/time.h may both be included" >&5
2111 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2112   echo $ac_n "(cached) $ac_c" 1>&6
2113 else
2114   cat > conftest.$ac_ext <<EOF
2115 #line 2116 "configure"
2116 #include "confdefs.h"
2117 #include <sys/types.h>
2118 #include <sys/time.h>
2119 #include <time.h>
2120 int main() {
2121 struct tm *tp;
2122 ; return 0; }
2123 EOF
2124 if { (eval echo configure:2125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2125   rm -rf conftest*
2126   ac_cv_header_time=yes
2127 else
2128   echo "configure: failed program was:" >&5
2129   cat conftest.$ac_ext >&5
2130   rm -rf conftest*
2131   ac_cv_header_time=no
2132 fi
2133 rm -f conftest*
2134 fi
2135
2136 echo "$ac_t""$ac_cv_header_time" 1>&6
2137 if test $ac_cv_header_time = yes; then
2138   cat >> confdefs.h <<\EOF
2139 #define TIME_WITH_SYS_TIME 1
2140 EOF
2141
2142 fi
2143
2144 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2145 echo "configure:2146: checking for sys/wait.h that is POSIX.1 compatible" >&5
2146 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2147   echo $ac_n "(cached) $ac_c" 1>&6
2148 else
2149   cat > conftest.$ac_ext <<EOF
2150 #line 2151 "configure"
2151 #include "confdefs.h"
2152 #include <sys/types.h>
2153 #include <sys/wait.h>
2154 #ifndef WEXITSTATUS
2155 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2156 #endif
2157 #ifndef WIFEXITED
2158 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2159 #endif
2160 int main() {
2161 int s;
2162 wait (&s);
2163 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2164 ; return 0; }
2165 EOF
2166 if { (eval echo configure:2167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2167   rm -rf conftest*
2168   ac_cv_header_sys_wait_h=yes
2169 else
2170   echo "configure: failed program was:" >&5
2171   cat conftest.$ac_ext >&5
2172   rm -rf conftest*
2173   ac_cv_header_sys_wait_h=no
2174 fi
2175 rm -f conftest*
2176 fi
2177
2178 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2179 if test $ac_cv_header_sys_wait_h = yes; then
2180   cat >> confdefs.h <<\EOF
2181 #define HAVE_SYS_WAIT_H 1
2182 EOF
2183
2184 fi
2185
2186 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2187 do
2188 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2189 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2190 echo "configure:2191: checking for $ac_hdr" >&5
2191 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2192   echo $ac_n "(cached) $ac_c" 1>&6
2193 else
2194   cat > conftest.$ac_ext <<EOF
2195 #line 2196 "configure"
2196 #include "confdefs.h"
2197 #include <$ac_hdr>
2198 EOF
2199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2200 { (eval echo configure:2201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2202 if test -z "$ac_err"; then
2203   rm -rf conftest*
2204   eval "ac_cv_header_$ac_safe=yes"
2205 else
2206   echo "$ac_err" >&5
2207   echo "configure: failed program was:" >&5
2208   cat conftest.$ac_ext >&5
2209   rm -rf conftest*
2210   eval "ac_cv_header_$ac_safe=no"
2211 fi
2212 rm -f conftest*
2213 fi
2214 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2215   echo "$ac_t""yes" 1>&6
2216     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2217   cat >> confdefs.h <<EOF
2218 #define $ac_tr_hdr 1
2219 EOF
2220  
2221 else
2222   echo "$ac_t""no" 1>&6
2223 fi
2224 done
2225
2226 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2227 do
2228 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2229 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2230 echo "configure:2231: checking for $ac_hdr" >&5
2231 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2232   echo $ac_n "(cached) $ac_c" 1>&6
2233 else
2234   cat > conftest.$ac_ext <<EOF
2235 #line 2236 "configure"
2236 #include "confdefs.h"
2237 #include <$ac_hdr>
2238 EOF
2239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2240 { (eval echo configure:2241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2242 if test -z "$ac_err"; then
2243   rm -rf conftest*
2244   eval "ac_cv_header_$ac_safe=yes"
2245 else
2246   echo "$ac_err" >&5
2247   echo "configure: failed program was:" >&5
2248   cat conftest.$ac_ext >&5
2249   rm -rf conftest*
2250   eval "ac_cv_header_$ac_safe=no"
2251 fi
2252 rm -f conftest*
2253 fi
2254 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2255   echo "$ac_t""yes" 1>&6
2256     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2257   cat >> confdefs.h <<EOF
2258 #define $ac_tr_hdr 1
2259 EOF
2260  
2261 else
2262   echo "$ac_t""no" 1>&6
2263 fi
2264 done
2265
2266 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2267 do
2268 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2269 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2270 echo "configure:2271: checking for $ac_hdr" >&5
2271 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2272   echo $ac_n "(cached) $ac_c" 1>&6
2273 else
2274   cat > conftest.$ac_ext <<EOF
2275 #line 2276 "configure"
2276 #include "confdefs.h"
2277 #include <$ac_hdr>
2278 EOF
2279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2280 { (eval echo configure:2281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2282 if test -z "$ac_err"; then
2283   rm -rf conftest*
2284   eval "ac_cv_header_$ac_safe=yes"
2285 else
2286   echo "$ac_err" >&5
2287   echo "configure: failed program was:" >&5
2288   cat conftest.$ac_ext >&5
2289   rm -rf conftest*
2290   eval "ac_cv_header_$ac_safe=no"
2291 fi
2292 rm -f conftest*
2293 fi
2294 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2295   echo "$ac_t""yes" 1>&6
2296     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2297   cat >> confdefs.h <<EOF
2298 #define $ac_tr_hdr 1
2299 EOF
2300  
2301 else
2302   echo "$ac_t""no" 1>&6
2303 fi
2304 done
2305
2306 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2307 do
2308 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2309 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2310 echo "configure:2311: checking for $ac_hdr" >&5
2311 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2312   echo $ac_n "(cached) $ac_c" 1>&6
2313 else
2314   cat > conftest.$ac_ext <<EOF
2315 #line 2316 "configure"
2316 #include "confdefs.h"
2317 #include <$ac_hdr>
2318 EOF
2319 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2320 { (eval echo configure:2321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2321 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2322 if test -z "$ac_err"; then
2323   rm -rf conftest*
2324   eval "ac_cv_header_$ac_safe=yes"
2325 else
2326   echo "$ac_err" >&5
2327   echo "configure: failed program was:" >&5
2328   cat conftest.$ac_ext >&5
2329   rm -rf conftest*
2330   eval "ac_cv_header_$ac_safe=no"
2331 fi
2332 rm -f conftest*
2333 fi
2334 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2335   echo "$ac_t""yes" 1>&6
2336     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2337   cat >> confdefs.h <<EOF
2338 #define $ac_tr_hdr 1
2339 EOF
2340  
2341 else
2342   echo "$ac_t""no" 1>&6
2343 fi
2344 done
2345
2346 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
2347 do
2348 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2349 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2350 echo "configure:2351: checking for $ac_hdr" >&5
2351 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2352   echo $ac_n "(cached) $ac_c" 1>&6
2353 else
2354   cat > conftest.$ac_ext <<EOF
2355 #line 2356 "configure"
2356 #include "confdefs.h"
2357 #include <$ac_hdr>
2358 EOF
2359 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2360 { (eval echo configure:2361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2361 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2362 if test -z "$ac_err"; then
2363   rm -rf conftest*
2364   eval "ac_cv_header_$ac_safe=yes"
2365 else
2366   echo "$ac_err" >&5
2367   echo "configure: failed program was:" >&5
2368   cat conftest.$ac_ext >&5
2369   rm -rf conftest*
2370   eval "ac_cv_header_$ac_safe=no"
2371 fi
2372 rm -f conftest*
2373 fi
2374 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2375   echo "$ac_t""yes" 1>&6
2376     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2377   cat >> confdefs.h <<EOF
2378 #define $ac_tr_hdr 1
2379 EOF
2380  
2381 else
2382   echo "$ac_t""no" 1>&6
2383 fi
2384 done
2385
2386 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2387 do
2388 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2389 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2390 echo "configure:2391: checking for $ac_hdr" >&5
2391 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2392   echo $ac_n "(cached) $ac_c" 1>&6
2393 else
2394   cat > conftest.$ac_ext <<EOF
2395 #line 2396 "configure"
2396 #include "confdefs.h"
2397 #include <$ac_hdr>
2398 EOF
2399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2400 { (eval echo configure:2401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2402 if test -z "$ac_err"; then
2403   rm -rf conftest*
2404   eval "ac_cv_header_$ac_safe=yes"
2405 else
2406   echo "$ac_err" >&5
2407   echo "configure: failed program was:" >&5
2408   cat conftest.$ac_ext >&5
2409   rm -rf conftest*
2410   eval "ac_cv_header_$ac_safe=no"
2411 fi
2412 rm -f conftest*
2413 fi
2414 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2415   echo "$ac_t""yes" 1>&6
2416     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2417   cat >> confdefs.h <<EOF
2418 #define $ac_tr_hdr 1
2419 EOF
2420  
2421 else
2422   echo "$ac_t""no" 1>&6
2423 fi
2424 done
2425
2426 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2427 do
2428 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2429 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2430 echo "configure:2431: checking for $ac_hdr" >&5
2431 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2432   echo $ac_n "(cached) $ac_c" 1>&6
2433 else
2434   cat > conftest.$ac_ext <<EOF
2435 #line 2436 "configure"
2436 #include "confdefs.h"
2437 #include <$ac_hdr>
2438 EOF
2439 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2440 { (eval echo configure:2441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2441 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2442 if test -z "$ac_err"; then
2443   rm -rf conftest*
2444   eval "ac_cv_header_$ac_safe=yes"
2445 else
2446   echo "$ac_err" >&5
2447   echo "configure: failed program was:" >&5
2448   cat conftest.$ac_ext >&5
2449   rm -rf conftest*
2450   eval "ac_cv_header_$ac_safe=no"
2451 fi
2452 rm -f conftest*
2453 fi
2454 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2455   echo "$ac_t""yes" 1>&6
2456     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2457   cat >> confdefs.h <<EOF
2458 #define $ac_tr_hdr 1
2459 EOF
2460  
2461 else
2462   echo "$ac_t""no" 1>&6
2463 fi
2464 done
2465
2466 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
2467 do
2468 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2469 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2470 echo "configure:2471: checking for $ac_hdr" >&5
2471 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2472   echo $ac_n "(cached) $ac_c" 1>&6
2473 else
2474   cat > conftest.$ac_ext <<EOF
2475 #line 2476 "configure"
2476 #include "confdefs.h"
2477 #include <$ac_hdr>
2478 EOF
2479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2480 { (eval echo configure:2481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2482 if test -z "$ac_err"; then
2483   rm -rf conftest*
2484   eval "ac_cv_header_$ac_safe=yes"
2485 else
2486   echo "$ac_err" >&5
2487   echo "configure: failed program was:" >&5
2488   cat conftest.$ac_ext >&5
2489   rm -rf conftest*
2490   eval "ac_cv_header_$ac_safe=no"
2491 fi
2492 rm -f conftest*
2493 fi
2494 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2495   echo "$ac_t""yes" 1>&6
2496     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2497   cat >> confdefs.h <<EOF
2498 #define $ac_tr_hdr 1
2499 EOF
2500  
2501 else
2502   echo "$ac_t""no" 1>&6
2503 fi
2504 done
2505
2506
2507 #
2508 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2509 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2510 #
2511 case "$host_os" in
2512     *hpux*)
2513                 cat > conftest.$ac_ext <<EOF
2514 #line 2515 "configure"
2515 #include "confdefs.h"
2516 #include <shadow.h>
2517 int main() {
2518 struct spwd testme
2519 ; return 0; }
2520 EOF
2521 if { (eval echo configure:2522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2522   rm -rf conftest*
2523   ac_cv_header_shadow_h=yes
2524 else
2525   echo "configure: failed program was:" >&5
2526   cat conftest.$ac_ext >&5
2527   rm -rf conftest*
2528   ac_cv_header_shadow_h=no
2529 fi
2530 rm -f conftest*
2531                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2532                    cat >> confdefs.h <<\EOF
2533 #define HAVE_SHADOW_H 1
2534 EOF
2535
2536                 fi
2537         ;;
2538 esac
2539 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2540 do
2541 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2542 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2543 echo "configure:2544: checking for $ac_hdr" >&5
2544 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2545   echo $ac_n "(cached) $ac_c" 1>&6
2546 else
2547   cat > conftest.$ac_ext <<EOF
2548 #line 2549 "configure"
2549 #include "confdefs.h"
2550 #include <$ac_hdr>
2551 EOF
2552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2553 { (eval echo configure:2554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2555 if test -z "$ac_err"; then
2556   rm -rf conftest*
2557   eval "ac_cv_header_$ac_safe=yes"
2558 else
2559   echo "$ac_err" >&5
2560   echo "configure: failed program was:" >&5
2561   cat conftest.$ac_ext >&5
2562   rm -rf conftest*
2563   eval "ac_cv_header_$ac_safe=no"
2564 fi
2565 rm -f conftest*
2566 fi
2567 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2568   echo "$ac_t""yes" 1>&6
2569     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2570   cat >> confdefs.h <<EOF
2571 #define $ac_tr_hdr 1
2572 EOF
2573  
2574 else
2575   echo "$ac_t""no" 1>&6
2576 fi
2577 done
2578
2579 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2580 do
2581 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2582 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2583 echo "configure:2584: checking for $ac_hdr" >&5
2584 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2585   echo $ac_n "(cached) $ac_c" 1>&6
2586 else
2587   cat > conftest.$ac_ext <<EOF
2588 #line 2589 "configure"
2589 #include "confdefs.h"
2590 #include <$ac_hdr>
2591 EOF
2592 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2593 { (eval echo configure:2594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2594 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2595 if test -z "$ac_err"; then
2596   rm -rf conftest*
2597   eval "ac_cv_header_$ac_safe=yes"
2598 else
2599   echo "$ac_err" >&5
2600   echo "configure: failed program was:" >&5
2601   cat conftest.$ac_ext >&5
2602   rm -rf conftest*
2603   eval "ac_cv_header_$ac_safe=no"
2604 fi
2605 rm -f conftest*
2606 fi
2607 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2608   echo "$ac_t""yes" 1>&6
2609     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2610   cat >> confdefs.h <<EOF
2611 #define $ac_tr_hdr 1
2612 EOF
2613  
2614 else
2615   echo "$ac_t""no" 1>&6
2616 fi
2617 done
2618
2619 for ac_hdr in stropts.h poll.h
2620 do
2621 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2622 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2623 echo "configure:2624: checking for $ac_hdr" >&5
2624 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2625   echo $ac_n "(cached) $ac_c" 1>&6
2626 else
2627   cat > conftest.$ac_ext <<EOF
2628 #line 2629 "configure"
2629 #include "confdefs.h"
2630 #include <$ac_hdr>
2631 EOF
2632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2633 { (eval echo configure:2634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2635 if test -z "$ac_err"; then
2636   rm -rf conftest*
2637   eval "ac_cv_header_$ac_safe=yes"
2638 else
2639   echo "$ac_err" >&5
2640   echo "configure: failed program was:" >&5
2641   cat conftest.$ac_ext >&5
2642   rm -rf conftest*
2643   eval "ac_cv_header_$ac_safe=no"
2644 fi
2645 rm -f conftest*
2646 fi
2647 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2648   echo "$ac_t""yes" 1>&6
2649     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2650   cat >> confdefs.h <<EOF
2651 #define $ac_tr_hdr 1
2652 EOF
2653  
2654 else
2655   echo "$ac_t""no" 1>&6
2656 fi
2657 done
2658
2659 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2660 do
2661 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2662 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2663 echo "configure:2664: checking for $ac_hdr" >&5
2664 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2665   echo $ac_n "(cached) $ac_c" 1>&6
2666 else
2667   cat > conftest.$ac_ext <<EOF
2668 #line 2669 "configure"
2669 #include "confdefs.h"
2670 #include <$ac_hdr>
2671 EOF
2672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2673 { (eval echo configure:2674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2675 if test -z "$ac_err"; then
2676   rm -rf conftest*
2677   eval "ac_cv_header_$ac_safe=yes"
2678 else
2679   echo "$ac_err" >&5
2680   echo "configure: failed program was:" >&5
2681   cat conftest.$ac_ext >&5
2682   rm -rf conftest*
2683   eval "ac_cv_header_$ac_safe=no"
2684 fi
2685 rm -f conftest*
2686 fi
2687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2688   echo "$ac_t""yes" 1>&6
2689     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2690   cat >> confdefs.h <<EOF
2691 #define $ac_tr_hdr 1
2692 EOF
2693  
2694 else
2695   echo "$ac_t""no" 1>&6
2696 fi
2697 done
2698
2699 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2700 do
2701 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2702 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2703 echo "configure:2704: checking for $ac_hdr" >&5
2704 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2705   echo $ac_n "(cached) $ac_c" 1>&6
2706 else
2707   cat > conftest.$ac_ext <<EOF
2708 #line 2709 "configure"
2709 #include "confdefs.h"
2710 #include <$ac_hdr>
2711 EOF
2712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2713 { (eval echo configure:2714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2714 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2715 if test -z "$ac_err"; then
2716   rm -rf conftest*
2717   eval "ac_cv_header_$ac_safe=yes"
2718 else
2719   echo "$ac_err" >&5
2720   echo "configure: failed program was:" >&5
2721   cat conftest.$ac_ext >&5
2722   rm -rf conftest*
2723   eval "ac_cv_header_$ac_safe=no"
2724 fi
2725 rm -f conftest*
2726 fi
2727 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2728   echo "$ac_t""yes" 1>&6
2729     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2730   cat >> confdefs.h <<EOF
2731 #define $ac_tr_hdr 1
2732 EOF
2733  
2734 else
2735   echo "$ac_t""no" 1>&6
2736 fi
2737 done
2738
2739
2740 # For experimental utmp support (lastlog on some BSD-like systems)
2741 for ac_hdr in utmp.h utmpx.h lastlog.h
2742 do
2743 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2744 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2745 echo "configure:2746: checking for $ac_hdr" >&5
2746 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2747   echo $ac_n "(cached) $ac_c" 1>&6
2748 else
2749   cat > conftest.$ac_ext <<EOF
2750 #line 2751 "configure"
2751 #include "confdefs.h"
2752 #include <$ac_hdr>
2753 EOF
2754 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2755 { (eval echo configure:2756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2756 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2757 if test -z "$ac_err"; then
2758   rm -rf conftest*
2759   eval "ac_cv_header_$ac_safe=yes"
2760 else
2761   echo "$ac_err" >&5
2762   echo "configure: failed program was:" >&5
2763   cat conftest.$ac_ext >&5
2764   rm -rf conftest*
2765   eval "ac_cv_header_$ac_safe=no"
2766 fi
2767 rm -f conftest*
2768 fi
2769 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2770   echo "$ac_t""yes" 1>&6
2771     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2772   cat >> confdefs.h <<EOF
2773 #define $ac_tr_hdr 1
2774 EOF
2775  
2776 else
2777   echo "$ac_t""no" 1>&6
2778 fi
2779 done
2780
2781  
2782 # For quotas on Veritas VxFS filesystems
2783 for ac_hdr in sys/fs/vx_quota.h
2784 do
2785 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2786 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2787 echo "configure:2788: checking for $ac_hdr" >&5
2788 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2789   echo $ac_n "(cached) $ac_c" 1>&6
2790 else
2791   cat > conftest.$ac_ext <<EOF
2792 #line 2793 "configure"
2793 #include "confdefs.h"
2794 #include <$ac_hdr>
2795 EOF
2796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2797 { (eval echo configure:2798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2798 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2799 if test -z "$ac_err"; then
2800   rm -rf conftest*
2801   eval "ac_cv_header_$ac_safe=yes"
2802 else
2803   echo "$ac_err" >&5
2804   echo "configure: failed program was:" >&5
2805   cat conftest.$ac_ext >&5
2806   rm -rf conftest*
2807   eval "ac_cv_header_$ac_safe=no"
2808 fi
2809 rm -f conftest*
2810 fi
2811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2812   echo "$ac_t""yes" 1>&6
2813     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2814   cat >> confdefs.h <<EOF
2815 #define $ac_tr_hdr 1
2816 EOF
2817  
2818 else
2819   echo "$ac_t""no" 1>&6
2820 fi
2821 done
2822
2823
2824 # For quotas on Linux XFS filesystems
2825 for ac_hdr in linux/xqm.h
2826 do
2827 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2828 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2829 echo "configure:2830: checking for $ac_hdr" >&5
2830 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2831   echo $ac_n "(cached) $ac_c" 1>&6
2832 else
2833   cat > conftest.$ac_ext <<EOF
2834 #line 2835 "configure"
2835 #include "confdefs.h"
2836 #include <$ac_hdr>
2837 EOF
2838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2839 { (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2841 if test -z "$ac_err"; then
2842   rm -rf conftest*
2843   eval "ac_cv_header_$ac_safe=yes"
2844 else
2845   echo "$ac_err" >&5
2846   echo "configure: failed program was:" >&5
2847   cat conftest.$ac_ext >&5
2848   rm -rf conftest*
2849   eval "ac_cv_header_$ac_safe=no"
2850 fi
2851 rm -f conftest*
2852 fi
2853 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2854   echo "$ac_t""yes" 1>&6
2855     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2856   cat >> confdefs.h <<EOF
2857 #define $ac_tr_hdr 1
2858 EOF
2859  
2860 else
2861   echo "$ac_t""no" 1>&6
2862 fi
2863 done
2864
2865
2866 echo $ac_n "checking size of int""... $ac_c" 1>&6
2867 echo "configure:2868: checking size of int" >&5
2868 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2869   echo $ac_n "(cached) $ac_c" 1>&6
2870 else
2871   if test "$cross_compiling" = yes; then
2872   ac_cv_sizeof_int=cross
2873 else
2874   cat > conftest.$ac_ext <<EOF
2875 #line 2876 "configure"
2876 #include "confdefs.h"
2877 #include <stdio.h>
2878 int main()
2879 {
2880   FILE *f=fopen("conftestval", "w");
2881   if (!f) return(1);
2882   fprintf(f, "%d\n", sizeof(int));
2883   return(0);
2884 }
2885 EOF
2886 if { (eval echo configure:2887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2887 then
2888   ac_cv_sizeof_int=`cat conftestval`
2889 else
2890   echo "configure: failed program was:" >&5
2891   cat conftest.$ac_ext >&5
2892   rm -fr conftest*
2893   ac_cv_sizeof_int=0
2894 fi
2895 rm -fr conftest*
2896 fi
2897
2898 fi
2899 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2900 cat >> confdefs.h <<EOF
2901 #define SIZEOF_INT $ac_cv_sizeof_int
2902 EOF
2903
2904
2905 echo $ac_n "checking size of long""... $ac_c" 1>&6
2906 echo "configure:2907: checking size of long" >&5
2907 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2908   echo $ac_n "(cached) $ac_c" 1>&6
2909 else
2910   if test "$cross_compiling" = yes; then
2911   ac_cv_sizeof_long=cross
2912 else
2913   cat > conftest.$ac_ext <<EOF
2914 #line 2915 "configure"
2915 #include "confdefs.h"
2916 #include <stdio.h>
2917 int main()
2918 {
2919   FILE *f=fopen("conftestval", "w");
2920   if (!f) return(1);
2921   fprintf(f, "%d\n", sizeof(long));
2922   return(0);
2923 }
2924 EOF
2925 if { (eval echo configure:2926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2926 then
2927   ac_cv_sizeof_long=`cat conftestval`
2928 else
2929   echo "configure: failed program was:" >&5
2930   cat conftest.$ac_ext >&5
2931   rm -fr conftest*
2932   ac_cv_sizeof_long=0
2933 fi
2934 rm -fr conftest*
2935 fi
2936
2937 fi
2938 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2939 cat >> confdefs.h <<EOF
2940 #define SIZEOF_LONG $ac_cv_sizeof_long
2941 EOF
2942
2943
2944 echo $ac_n "checking size of short""... $ac_c" 1>&6
2945 echo "configure:2946: checking size of short" >&5
2946 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2947   echo $ac_n "(cached) $ac_c" 1>&6
2948 else
2949   if test "$cross_compiling" = yes; then
2950   ac_cv_sizeof_short=cross
2951 else
2952   cat > conftest.$ac_ext <<EOF
2953 #line 2954 "configure"
2954 #include "confdefs.h"
2955 #include <stdio.h>
2956 int main()
2957 {
2958   FILE *f=fopen("conftestval", "w");
2959   if (!f) return(1);
2960   fprintf(f, "%d\n", sizeof(short));
2961   return(0);
2962 }
2963 EOF
2964 if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2965 then
2966   ac_cv_sizeof_short=`cat conftestval`
2967 else
2968   echo "configure: failed program was:" >&5
2969   cat conftest.$ac_ext >&5
2970   rm -fr conftest*
2971   ac_cv_sizeof_short=0
2972 fi
2973 rm -fr conftest*
2974 fi
2975
2976 fi
2977 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2978 cat >> confdefs.h <<EOF
2979 #define SIZEOF_SHORT $ac_cv_sizeof_short
2980 EOF
2981
2982
2983
2984 echo $ac_n "checking for working const""... $ac_c" 1>&6
2985 echo "configure:2986: checking for working const" >&5
2986 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2987   echo $ac_n "(cached) $ac_c" 1>&6
2988 else
2989   cat > conftest.$ac_ext <<EOF
2990 #line 2991 "configure"
2991 #include "confdefs.h"
2992
2993 int main() {
2994
2995 /* Ultrix mips cc rejects this.  */
2996 typedef int charset[2]; const charset x;
2997 /* SunOS 4.1.1 cc rejects this.  */
2998 char const *const *ccp;
2999 char **p;
3000 /* NEC SVR4.0.2 mips cc rejects this.  */
3001 struct point {int x, y;};
3002 static struct point const zero = {0,0};
3003 /* AIX XL C 1.02.0.0 rejects this.
3004    It does not let you subtract one const X* pointer from another in an arm
3005    of an if-expression whose if-part is not a constant expression */
3006 const char *g = "string";
3007 ccp = &g + (g ? g-g : 0);
3008 /* HPUX 7.0 cc rejects these. */
3009 ++ccp;
3010 p = (char**) ccp;
3011 ccp = (char const *const *) p;
3012 { /* SCO 3.2v4 cc rejects this.  */
3013   char *t;
3014   char const *s = 0 ? (char *) 0 : (char const *) 0;
3015
3016   *t++ = 0;
3017 }
3018 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3019   int x[] = {25, 17};
3020   const int *foo = &x[0];
3021   ++foo;
3022 }
3023 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3024   typedef const int *iptr;
3025   iptr p = 0;
3026   ++p;
3027 }
3028 { /* AIX XL C 1.02.0.0 rejects this saying
3029      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3030   struct s { int j; const int *ap[3]; };
3031   struct s *b; b->j = 5;
3032 }
3033 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3034   const int foo = 10;
3035 }
3036
3037 ; return 0; }
3038 EOF
3039 if { (eval echo configure:3040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3040   rm -rf conftest*
3041   ac_cv_c_const=yes
3042 else
3043   echo "configure: failed program was:" >&5
3044   cat conftest.$ac_ext >&5
3045   rm -rf conftest*
3046   ac_cv_c_const=no
3047 fi
3048 rm -f conftest*
3049 fi
3050
3051 echo "$ac_t""$ac_cv_c_const" 1>&6
3052 if test $ac_cv_c_const = no; then
3053   cat >> confdefs.h <<\EOF
3054 #define const 
3055 EOF
3056
3057 fi
3058
3059 echo $ac_n "checking for inline""... $ac_c" 1>&6
3060 echo "configure:3061: checking for inline" >&5
3061 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3062   echo $ac_n "(cached) $ac_c" 1>&6
3063 else
3064   ac_cv_c_inline=no
3065 for ac_kw in inline __inline__ __inline; do
3066   cat > conftest.$ac_ext <<EOF
3067 #line 3068 "configure"
3068 #include "confdefs.h"
3069
3070 int main() {
3071 } $ac_kw foo() {
3072 ; return 0; }
3073 EOF
3074 if { (eval echo configure:3075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3075   rm -rf conftest*
3076   ac_cv_c_inline=$ac_kw; break
3077 else
3078   echo "configure: failed program was:" >&5
3079   cat conftest.$ac_ext >&5
3080 fi
3081 rm -f conftest*
3082 done
3083
3084 fi
3085
3086 echo "$ac_t""$ac_cv_c_inline" 1>&6
3087 case "$ac_cv_c_inline" in
3088   inline | yes) ;;
3089   no) cat >> confdefs.h <<\EOF
3090 #define inline 
3091 EOF
3092  ;;
3093   *)  cat >> confdefs.h <<EOF
3094 #define inline $ac_cv_c_inline
3095 EOF
3096  ;;
3097 esac
3098
3099 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3100 echo "configure:3101: checking whether byte ordering is bigendian" >&5
3101 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3102   echo $ac_n "(cached) $ac_c" 1>&6
3103 else
3104   ac_cv_c_bigendian=unknown
3105 # See if sys/param.h defines the BYTE_ORDER macro.
3106 cat > conftest.$ac_ext <<EOF
3107 #line 3108 "configure"
3108 #include "confdefs.h"
3109 #include <sys/types.h>
3110 #include <sys/param.h>
3111 int main() {
3112
3113 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3114  bogus endian macros
3115 #endif
3116 ; return 0; }
3117 EOF
3118 if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3119   rm -rf conftest*
3120   # It does; now see whether it defined to BIG_ENDIAN or not.
3121 cat > conftest.$ac_ext <<EOF
3122 #line 3123 "configure"
3123 #include "confdefs.h"
3124 #include <sys/types.h>
3125 #include <sys/param.h>
3126 int main() {
3127
3128 #if BYTE_ORDER != BIG_ENDIAN
3129  not big endian
3130 #endif
3131 ; return 0; }
3132 EOF
3133 if { (eval echo configure:3134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3134   rm -rf conftest*
3135   ac_cv_c_bigendian=yes
3136 else
3137   echo "configure: failed program was:" >&5
3138   cat conftest.$ac_ext >&5
3139   rm -rf conftest*
3140   ac_cv_c_bigendian=no
3141 fi
3142 rm -f conftest*
3143 else
3144   echo "configure: failed program was:" >&5
3145   cat conftest.$ac_ext >&5
3146 fi
3147 rm -f conftest*
3148 if test $ac_cv_c_bigendian = unknown; then
3149 if test "$cross_compiling" = yes; then
3150     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3151 else
3152   cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155 main () {
3156   /* Are we little or big endian?  From Harbison&Steele.  */
3157   union
3158   {
3159     long l;
3160     char c[sizeof (long)];
3161   } u;
3162   u.l = 1;
3163   exit (u.c[sizeof (long) - 1] == 1);
3164 }
3165 EOF
3166 if { (eval echo configure:3167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3167 then
3168   ac_cv_c_bigendian=no
3169 else
3170   echo "configure: failed program was:" >&5
3171   cat conftest.$ac_ext >&5
3172   rm -fr conftest*
3173   ac_cv_c_bigendian=yes
3174 fi
3175 rm -fr conftest*
3176 fi
3177
3178 fi
3179 fi
3180
3181 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3182 if test $ac_cv_c_bigendian = yes; then
3183   cat >> confdefs.h <<\EOF
3184 #define WORDS_BIGENDIAN 1
3185 EOF
3186
3187 fi
3188
3189 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3190 echo "configure:3191: checking whether char is unsigned" >&5
3191 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3192   echo $ac_n "(cached) $ac_c" 1>&6
3193 else
3194   if test "$GCC" = yes; then
3195   # GCC predefines this symbol on systems where it applies.
3196 cat > conftest.$ac_ext <<EOF
3197 #line 3198 "configure"
3198 #include "confdefs.h"
3199 #ifdef __CHAR_UNSIGNED__
3200   yes
3201 #endif
3202
3203 EOF
3204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3205   egrep "yes" >/dev/null 2>&1; then
3206   rm -rf conftest*
3207   ac_cv_c_char_unsigned=yes
3208 else
3209   rm -rf conftest*
3210   ac_cv_c_char_unsigned=no
3211 fi
3212 rm -f conftest*
3213
3214 else
3215 if test "$cross_compiling" = yes; then
3216     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3217 else
3218   cat > conftest.$ac_ext <<EOF
3219 #line 3220 "configure"
3220 #include "confdefs.h"
3221 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3222 #if !defined(__STDC__) || __STDC__ != 1
3223 #define volatile
3224 #endif
3225 main() {
3226   volatile char c = 255; exit(c < 0);
3227 }
3228 EOF
3229 if { (eval echo configure:3230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3230 then
3231   ac_cv_c_char_unsigned=yes
3232 else
3233   echo "configure: failed program was:" >&5
3234   cat conftest.$ac_ext >&5
3235   rm -fr conftest*
3236   ac_cv_c_char_unsigned=no
3237 fi
3238 rm -fr conftest*
3239 fi
3240
3241 fi
3242 fi
3243
3244 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3245 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3246   cat >> confdefs.h <<\EOF
3247 #define __CHAR_UNSIGNED__ 1
3248 EOF
3249
3250 fi
3251
3252
3253 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3254 echo "configure:3255: checking return type of signal handlers" >&5
3255 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3256   echo $ac_n "(cached) $ac_c" 1>&6
3257 else
3258   cat > conftest.$ac_ext <<EOF
3259 #line 3260 "configure"
3260 #include "confdefs.h"
3261 #include <sys/types.h>
3262 #include <signal.h>
3263 #ifdef signal
3264 #undef signal
3265 #endif
3266 #ifdef __cplusplus
3267 extern "C" void (*signal (int, void (*)(int)))(int);
3268 #else
3269 void (*signal ()) ();
3270 #endif
3271
3272 int main() {
3273 int i;
3274 ; return 0; }
3275 EOF
3276 if { (eval echo configure:3277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3277   rm -rf conftest*
3278   ac_cv_type_signal=void
3279 else
3280   echo "configure: failed program was:" >&5
3281   cat conftest.$ac_ext >&5
3282   rm -rf conftest*
3283   ac_cv_type_signal=int
3284 fi
3285 rm -f conftest*
3286 fi
3287
3288 echo "$ac_t""$ac_cv_type_signal" 1>&6
3289 cat >> confdefs.h <<EOF
3290 #define RETSIGTYPE $ac_cv_type_signal
3291 EOF
3292
3293
3294 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3295 echo "configure:3296: checking for uid_t in sys/types.h" >&5
3296 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3297   echo $ac_n "(cached) $ac_c" 1>&6
3298 else
3299   cat > conftest.$ac_ext <<EOF
3300 #line 3301 "configure"
3301 #include "confdefs.h"
3302 #include <sys/types.h>
3303 EOF
3304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3305   egrep "uid_t" >/dev/null 2>&1; then
3306   rm -rf conftest*
3307   ac_cv_type_uid_t=yes
3308 else
3309   rm -rf conftest*
3310   ac_cv_type_uid_t=no
3311 fi
3312 rm -f conftest*
3313
3314 fi
3315
3316 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3317 if test $ac_cv_type_uid_t = no; then
3318   cat >> confdefs.h <<\EOF
3319 #define uid_t int
3320 EOF
3321
3322   cat >> confdefs.h <<\EOF
3323 #define gid_t int
3324 EOF
3325
3326 fi
3327
3328 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3329 echo "configure:3330: checking for mode_t" >&5
3330 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3331   echo $ac_n "(cached) $ac_c" 1>&6
3332 else
3333   cat > conftest.$ac_ext <<EOF
3334 #line 3335 "configure"
3335 #include "confdefs.h"
3336 #include <sys/types.h>
3337 #if STDC_HEADERS
3338 #include <stdlib.h>
3339 #include <stddef.h>
3340 #endif
3341 EOF
3342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3343   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3344   rm -rf conftest*
3345   ac_cv_type_mode_t=yes
3346 else
3347   rm -rf conftest*
3348   ac_cv_type_mode_t=no
3349 fi
3350 rm -f conftest*
3351
3352 fi
3353 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3354 if test $ac_cv_type_mode_t = no; then
3355   cat >> confdefs.h <<\EOF
3356 #define mode_t int
3357 EOF
3358
3359 fi
3360
3361 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3362 echo "configure:3363: checking for off_t" >&5
3363 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3364   echo $ac_n "(cached) $ac_c" 1>&6
3365 else
3366   cat > conftest.$ac_ext <<EOF
3367 #line 3368 "configure"
3368 #include "confdefs.h"
3369 #include <sys/types.h>
3370 #if STDC_HEADERS
3371 #include <stdlib.h>
3372 #include <stddef.h>
3373 #endif
3374 EOF
3375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3376   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3377   rm -rf conftest*
3378   ac_cv_type_off_t=yes
3379 else
3380   rm -rf conftest*
3381   ac_cv_type_off_t=no
3382 fi
3383 rm -f conftest*
3384
3385 fi
3386 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3387 if test $ac_cv_type_off_t = no; then
3388   cat >> confdefs.h <<\EOF
3389 #define off_t long
3390 EOF
3391
3392 fi
3393
3394 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3395 echo "configure:3396: checking for size_t" >&5
3396 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3397   echo $ac_n "(cached) $ac_c" 1>&6
3398 else
3399   cat > conftest.$ac_ext <<EOF
3400 #line 3401 "configure"
3401 #include "confdefs.h"
3402 #include <sys/types.h>
3403 #if STDC_HEADERS
3404 #include <stdlib.h>
3405 #include <stddef.h>
3406 #endif
3407 EOF
3408 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3409   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3410   rm -rf conftest*
3411   ac_cv_type_size_t=yes
3412 else
3413   rm -rf conftest*
3414   ac_cv_type_size_t=no
3415 fi
3416 rm -f conftest*
3417
3418 fi
3419 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3420 if test $ac_cv_type_size_t = no; then
3421   cat >> confdefs.h <<\EOF
3422 #define size_t unsigned
3423 EOF
3424
3425 fi
3426
3427 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3428 echo "configure:3429: checking for pid_t" >&5
3429 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3430   echo $ac_n "(cached) $ac_c" 1>&6
3431 else
3432   cat > conftest.$ac_ext <<EOF
3433 #line 3434 "configure"
3434 #include "confdefs.h"
3435 #include <sys/types.h>
3436 #if STDC_HEADERS
3437 #include <stdlib.h>
3438 #include <stddef.h>
3439 #endif
3440 EOF
3441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3442   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3443   rm -rf conftest*
3444   ac_cv_type_pid_t=yes
3445 else
3446   rm -rf conftest*
3447   ac_cv_type_pid_t=no
3448 fi
3449 rm -f conftest*
3450
3451 fi
3452 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3453 if test $ac_cv_type_pid_t = no; then
3454   cat >> confdefs.h <<\EOF
3455 #define pid_t int
3456 EOF
3457
3458 fi
3459
3460 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3461 echo "configure:3462: checking for st_rdev in struct stat" >&5
3462 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3463   echo $ac_n "(cached) $ac_c" 1>&6
3464 else
3465   cat > conftest.$ac_ext <<EOF
3466 #line 3467 "configure"
3467 #include "confdefs.h"
3468 #include <sys/types.h>
3469 #include <sys/stat.h>
3470 int main() {
3471 struct stat s; s.st_rdev;
3472 ; return 0; }
3473 EOF
3474 if { (eval echo configure:3475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3475   rm -rf conftest*
3476   ac_cv_struct_st_rdev=yes
3477 else
3478   echo "configure: failed program was:" >&5
3479   cat conftest.$ac_ext >&5
3480   rm -rf conftest*
3481   ac_cv_struct_st_rdev=no
3482 fi
3483 rm -f conftest*
3484 fi
3485
3486 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3487 if test $ac_cv_struct_st_rdev = yes; then
3488   cat >> confdefs.h <<\EOF
3489 #define HAVE_ST_RDEV 1
3490 EOF
3491
3492 fi
3493
3494 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3495 echo "configure:3496: checking for d_off in dirent" >&5
3496 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3497   echo $ac_n "(cached) $ac_c" 1>&6
3498 else
3499   cat > conftest.$ac_ext <<EOF
3500 #line 3501 "configure"
3501 #include "confdefs.h"
3502
3503 #include <unistd.h>
3504 #include <sys/types.h>
3505 #include <dirent.h>
3506 int main() {
3507 struct dirent d; d.d_off;
3508 ; return 0; }
3509 EOF
3510 if { (eval echo configure:3511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3511   rm -rf conftest*
3512   ac_cv_dirent_d_off=yes
3513 else
3514   echo "configure: failed program was:" >&5
3515   cat conftest.$ac_ext >&5
3516   rm -rf conftest*
3517   ac_cv_dirent_d_off=no
3518 fi
3519 rm -f conftest*
3520 fi
3521
3522 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3523 if test $ac_cv_dirent_d_off = yes; then
3524   cat >> confdefs.h <<\EOF
3525 #define HAVE_DIRENT_D_OFF 1
3526 EOF
3527
3528 fi
3529
3530 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3531 echo "configure:3532: checking for ino_t" >&5
3532 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3533   echo $ac_n "(cached) $ac_c" 1>&6
3534 else
3535   cat > conftest.$ac_ext <<EOF
3536 #line 3537 "configure"
3537 #include "confdefs.h"
3538 #include <sys/types.h>
3539 #if STDC_HEADERS
3540 #include <stdlib.h>
3541 #include <stddef.h>
3542 #endif
3543 EOF
3544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3545   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3546   rm -rf conftest*
3547   ac_cv_type_ino_t=yes
3548 else
3549   rm -rf conftest*
3550   ac_cv_type_ino_t=no
3551 fi
3552 rm -f conftest*
3553
3554 fi
3555 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3556 if test $ac_cv_type_ino_t = no; then
3557   cat >> confdefs.h <<\EOF
3558 #define ino_t unsigned
3559 EOF
3560
3561 fi
3562
3563 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3564 echo "configure:3565: checking for loff_t" >&5
3565 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3566   echo $ac_n "(cached) $ac_c" 1>&6
3567 else
3568   cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 #include <sys/types.h>
3572 #if STDC_HEADERS
3573 #include <stdlib.h>
3574 #include <stddef.h>
3575 #endif
3576 EOF
3577 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3578   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3579   rm -rf conftest*
3580   ac_cv_type_loff_t=yes
3581 else
3582   rm -rf conftest*
3583   ac_cv_type_loff_t=no
3584 fi
3585 rm -f conftest*
3586
3587 fi
3588 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3589 if test $ac_cv_type_loff_t = no; then
3590   cat >> confdefs.h <<\EOF
3591 #define loff_t off_t
3592 EOF
3593
3594 fi
3595
3596 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3597 echo "configure:3598: checking for offset_t" >&5
3598 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3599   echo $ac_n "(cached) $ac_c" 1>&6
3600 else
3601   cat > conftest.$ac_ext <<EOF
3602 #line 3603 "configure"
3603 #include "confdefs.h"
3604 #include <sys/types.h>
3605 #if STDC_HEADERS
3606 #include <stdlib.h>
3607 #include <stddef.h>
3608 #endif
3609 EOF
3610 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3611   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3612   rm -rf conftest*
3613   ac_cv_type_offset_t=yes
3614 else
3615   rm -rf conftest*
3616   ac_cv_type_offset_t=no
3617 fi
3618 rm -f conftest*
3619
3620 fi
3621 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3622 if test $ac_cv_type_offset_t = no; then
3623   cat >> confdefs.h <<\EOF
3624 #define offset_t loff_t
3625 EOF
3626
3627 fi
3628
3629 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3630 echo "configure:3631: checking for ssize_t" >&5
3631 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3632   echo $ac_n "(cached) $ac_c" 1>&6
3633 else
3634   cat > conftest.$ac_ext <<EOF
3635 #line 3636 "configure"
3636 #include "confdefs.h"
3637 #include <sys/types.h>
3638 #if STDC_HEADERS
3639 #include <stdlib.h>
3640 #include <stddef.h>
3641 #endif
3642 EOF
3643 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3644   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3645   rm -rf conftest*
3646   ac_cv_type_ssize_t=yes
3647 else
3648   rm -rf conftest*
3649   ac_cv_type_ssize_t=no
3650 fi
3651 rm -f conftest*
3652
3653 fi
3654 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3655 if test $ac_cv_type_ssize_t = no; then
3656   cat >> confdefs.h <<\EOF
3657 #define ssize_t int
3658 EOF
3659
3660 fi
3661
3662 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3663 echo "configure:3664: checking for wchar_t" >&5
3664 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3665   echo $ac_n "(cached) $ac_c" 1>&6
3666 else
3667   cat > conftest.$ac_ext <<EOF
3668 #line 3669 "configure"
3669 #include "confdefs.h"
3670 #include <sys/types.h>
3671 #if STDC_HEADERS
3672 #include <stdlib.h>
3673 #include <stddef.h>
3674 #endif
3675 EOF
3676 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3677   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3678   rm -rf conftest*
3679   ac_cv_type_wchar_t=yes
3680 else
3681   rm -rf conftest*
3682   ac_cv_type_wchar_t=no
3683 fi
3684 rm -f conftest*
3685
3686 fi
3687 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3688 if test $ac_cv_type_wchar_t = no; then
3689   cat >> confdefs.h <<\EOF
3690 #define wchar_t unsigned short
3691 EOF
3692
3693 fi
3694
3695
3696 ############################################
3697 # for cups support we need libcups, and a handful of header files
3698
3699 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3700 echo "configure:3701: checking for httpConnect in -lcups" >&5
3701 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3702 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3703   echo $ac_n "(cached) $ac_c" 1>&6
3704 else
3705   ac_save_LIBS="$LIBS"
3706 LIBS="-lcups  $LIBS"
3707 cat > conftest.$ac_ext <<EOF
3708 #line 3709 "configure"
3709 #include "confdefs.h"
3710 /* Override any gcc2 internal prototype to avoid an error.  */
3711 /* We use char because int might match the return type of a gcc2
3712     builtin and then its argument prototype would still apply.  */
3713 char httpConnect();
3714
3715 int main() {
3716 httpConnect()
3717 ; return 0; }
3718 EOF
3719 if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3720   rm -rf conftest*
3721   eval "ac_cv_lib_$ac_lib_var=yes"
3722 else
3723   echo "configure: failed program was:" >&5
3724   cat conftest.$ac_ext >&5
3725   rm -rf conftest*
3726   eval "ac_cv_lib_$ac_lib_var=no"
3727 fi
3728 rm -f conftest*
3729 LIBS="$ac_save_LIBS"
3730
3731 fi
3732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3733   echo "$ac_t""yes" 1>&6
3734     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3735     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3736   cat >> confdefs.h <<EOF
3737 #define $ac_tr_lib 1
3738 EOF
3739
3740   LIBS="-lcups $LIBS"
3741
3742 else
3743   echo "$ac_t""no" 1>&6
3744 fi
3745
3746
3747 # I wonder if there is a nicer way of doing this?
3748
3749 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3750         for ac_hdr in cups/cups.h cups/language.h
3751 do
3752 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3753 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3754 echo "configure:3755: checking for $ac_hdr" >&5
3755 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3756   echo $ac_n "(cached) $ac_c" 1>&6
3757 else
3758   cat > conftest.$ac_ext <<EOF
3759 #line 3760 "configure"
3760 #include "confdefs.h"
3761 #include <$ac_hdr>
3762 EOF
3763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3764 { (eval echo configure:3765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3766 if test -z "$ac_err"; then
3767   rm -rf conftest*
3768   eval "ac_cv_header_$ac_safe=yes"
3769 else
3770   echo "$ac_err" >&5
3771   echo "configure: failed program was:" >&5
3772   cat conftest.$ac_ext >&5
3773   rm -rf conftest*
3774   eval "ac_cv_header_$ac_safe=no"
3775 fi
3776 rm -f conftest*
3777 fi
3778 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3779   echo "$ac_t""yes" 1>&6
3780     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3781   cat >> confdefs.h <<EOF
3782 #define $ac_tr_hdr 1
3783 EOF
3784  
3785 else
3786   echo "$ac_t""no" 1>&6
3787 fi
3788 done
3789
3790         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3791                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3792                         cat >> confdefs.h <<\EOF
3793 #define HAVE_CUPS 1
3794 EOF
3795
3796                 fi
3797         fi
3798 fi
3799
3800 ############################################
3801 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3802 for ac_func in dlopen
3803 do
3804 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3805 echo "configure:3806: checking for $ac_func" >&5
3806 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3807   echo $ac_n "(cached) $ac_c" 1>&6
3808 else
3809   cat > conftest.$ac_ext <<EOF
3810 #line 3811 "configure"
3811 #include "confdefs.h"
3812 /* System header to define __stub macros and hopefully few prototypes,
3813     which can conflict with char $ac_func(); below.  */
3814 #include <assert.h>
3815 /* Override any gcc2 internal prototype to avoid an error.  */
3816 /* We use char because int might match the return type of a gcc2
3817     builtin and then its argument prototype would still apply.  */
3818 char $ac_func();
3819
3820 int main() {
3821
3822 /* The GNU C library defines this for functions which it implements
3823     to always fail with ENOSYS.  Some functions are actually named
3824     something starting with __ and the normal name is an alias.  */
3825 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3826 choke me
3827 #else
3828 $ac_func();
3829 #endif
3830
3831 ; return 0; }
3832 EOF
3833 if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3834   rm -rf conftest*
3835   eval "ac_cv_func_$ac_func=yes"
3836 else
3837   echo "configure: failed program was:" >&5
3838   cat conftest.$ac_ext >&5
3839   rm -rf conftest*
3840   eval "ac_cv_func_$ac_func=no"
3841 fi
3842 rm -f conftest*
3843 fi
3844
3845 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3846   echo "$ac_t""yes" 1>&6
3847     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3848   cat >> confdefs.h <<EOF
3849 #define $ac_tr_func 1
3850 EOF
3851  
3852 else
3853   echo "$ac_t""no" 1>&6
3854 fi
3855 done
3856
3857 if test x"$ac_cv_func_dlopen" = x"no"; then
3858     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3859 echo "configure:3860: checking for dlopen in -ldl" >&5
3860 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3861 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3862   echo $ac_n "(cached) $ac_c" 1>&6
3863 else
3864   ac_save_LIBS="$LIBS"
3865 LIBS="-ldl  $LIBS"
3866 cat > conftest.$ac_ext <<EOF
3867 #line 3868 "configure"
3868 #include "confdefs.h"
3869 /* Override any gcc2 internal prototype to avoid an error.  */
3870 /* We use char because int might match the return type of a gcc2
3871     builtin and then its argument prototype would still apply.  */
3872 char dlopen();
3873
3874 int main() {
3875 dlopen()
3876 ; return 0; }
3877 EOF
3878 if { (eval echo configure:3879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3879   rm -rf conftest*
3880   eval "ac_cv_lib_$ac_lib_var=yes"
3881 else
3882   echo "configure: failed program was:" >&5
3883   cat conftest.$ac_ext >&5
3884   rm -rf conftest*
3885   eval "ac_cv_lib_$ac_lib_var=no"
3886 fi
3887 rm -f conftest*
3888 LIBS="$ac_save_LIBS"
3889
3890 fi
3891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3892   echo "$ac_t""yes" 1>&6
3893   LIBS="$LIBS -ldl";
3894         cat >> confdefs.h <<\EOF
3895 #define HAVE_DLOPEN 1
3896 EOF
3897
3898 else
3899   echo "$ac_t""no" 1>&6
3900 fi
3901
3902 fi
3903 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3904
3905 ############################################
3906 # check if the compiler can do immediate structures
3907 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3908 echo "configure:3909: checking for immediate structures" >&5
3909 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3910   echo $ac_n "(cached) $ac_c" 1>&6
3911 else
3912   
3913     cat > conftest.$ac_ext <<EOF
3914 #line 3915 "configure"
3915 #include "confdefs.h"
3916
3917 #include <stdio.h>
3918 int main() {
3919
3920    typedef struct {unsigned x;} FOOBAR;
3921    #define X_FOOBAR(x) ((FOOBAR) { x })
3922    #define FOO_ONE X_FOOBAR(1)
3923    FOOBAR f = FOO_ONE;   
3924    static struct {
3925         FOOBAR y; 
3926         } f2[] = {
3927                 {FOO_ONE}
3928         };   
3929
3930 ; return 0; }
3931 EOF
3932 if { (eval echo configure:3933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3933   rm -rf conftest*
3934   samba_cv_immediate_structures=yes
3935 else
3936   echo "configure: failed program was:" >&5
3937   cat conftest.$ac_ext >&5
3938   rm -rf conftest*
3939   samba_cv_immediate_structures=no
3940 fi
3941 rm -f conftest*
3942 fi
3943
3944 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3945 if test x"$samba_cv_immediate_structures" = x"yes"; then
3946    cat >> confdefs.h <<\EOF
3947 #define HAVE_IMMEDIATE_STRUCTURES 1
3948 EOF
3949
3950 fi
3951
3952 ############################################
3953 # check for unix domain sockets
3954 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3955 echo "configure:3956: checking for unix domain sockets" >&5
3956 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3957   echo $ac_n "(cached) $ac_c" 1>&6
3958 else
3959   
3960     cat > conftest.$ac_ext <<EOF
3961 #line 3962 "configure"
3962 #include "confdefs.h"
3963
3964 #include <sys/types.h>
3965 #include <stdlib.h>
3966 #include <stddef.h>
3967 #include <sys/socket.h>
3968 #include <sys/un.h>
3969 int main() {
3970
3971   struct sockaddr_un sunaddr; 
3972   sunaddr.sun_family = AF_UNIX;
3973
3974 ; return 0; }
3975 EOF
3976 if { (eval echo configure:3977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3977   rm -rf conftest*
3978   samba_cv_unixsocket=yes
3979 else
3980   echo "configure: failed program was:" >&5
3981   cat conftest.$ac_ext >&5
3982   rm -rf conftest*
3983   samba_cv_unixsocket=no
3984 fi
3985 rm -f conftest*
3986 fi
3987
3988 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3989 if test x"$samba_cv_unixsocket" = x"yes"; then
3990    cat >> confdefs.h <<\EOF
3991 #define HAVE_UNIXSOCKET 1
3992 EOF
3993
3994 fi
3995
3996
3997 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3998 echo "configure:3999: checking for socklen_t type" >&5
3999 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
4000   echo $ac_n "(cached) $ac_c" 1>&6
4001 else
4002   
4003     cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4006
4007 #include <sys/types.h>
4008 #if STDC_HEADERS
4009 #include <stdlib.h>
4010 #include <stddef.h>
4011 #endif
4012 #include <sys/socket.h>
4013 int main() {
4014 socklen_t i = 0
4015 ; return 0; }
4016 EOF
4017 if { (eval echo configure:4018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4018   rm -rf conftest*
4019   samba_cv_socklen_t=yes
4020 else
4021   echo "configure: failed program was:" >&5
4022   cat conftest.$ac_ext >&5
4023   rm -rf conftest*
4024   samba_cv_socklen_t=no
4025 fi
4026 rm -f conftest*
4027 fi
4028
4029 echo "$ac_t""$samba_cv_socklen_t" 1>&6
4030 if test x"$samba_cv_socklen_t" = x"yes"; then
4031    cat >> confdefs.h <<\EOF
4032 #define HAVE_SOCKLEN_T_TYPE 1
4033 EOF
4034
4035 fi
4036
4037 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
4038 echo "configure:4039: checking for sig_atomic_t type" >&5
4039 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
4040   echo $ac_n "(cached) $ac_c" 1>&6
4041 else
4042   
4043     cat > conftest.$ac_ext <<EOF
4044 #line 4045 "configure"
4045 #include "confdefs.h"
4046
4047 #include <sys/types.h>
4048 #if STDC_HEADERS
4049 #include <stdlib.h>
4050 #include <stddef.h>
4051 #endif
4052 #include <signal.h>
4053 int main() {
4054 sig_atomic_t i = 0
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   samba_cv_sig_atomic_t=yes
4060 else
4061   echo "configure: failed program was:" >&5
4062   cat conftest.$ac_ext >&5
4063   rm -rf conftest*
4064   samba_cv_sig_atomic_t=no
4065 fi
4066 rm -f conftest*
4067 fi
4068
4069 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4070 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4071    cat >> confdefs.h <<\EOF
4072 #define HAVE_SIG_ATOMIC_T_TYPE 1
4073 EOF
4074
4075 fi
4076
4077 # stupid headers have the functions but no declaration. grrrr.
4078
4079  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4080 echo "configure:4081: checking for errno declaration" >&5
4081 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4082   echo $ac_n "(cached) $ac_c" 1>&6
4083 else
4084   
4085     cat > conftest.$ac_ext <<EOF
4086 #line 4087 "configure"
4087 #include "confdefs.h"
4088 #include <errno.h>
4089 int main() {
4090 int i = (int)errno
4091 ; return 0; }
4092 EOF
4093 if { (eval echo configure:4094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4094   rm -rf conftest*
4095   ac_cv_have_errno_decl=yes
4096 else
4097   echo "configure: failed program was:" >&5
4098   cat conftest.$ac_ext >&5
4099   rm -rf conftest*
4100   ac_cv_have_errno_decl=no
4101 fi
4102 rm -f conftest*
4103 fi
4104
4105 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4106  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4107     cat >> confdefs.h <<\EOF
4108 #define HAVE_ERRNO_DECL 1
4109 EOF
4110
4111  fi
4112
4113
4114  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4115 echo "configure:4116: checking for setresuid declaration" >&5
4116 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4117   echo $ac_n "(cached) $ac_c" 1>&6
4118 else
4119   
4120     cat > conftest.$ac_ext <<EOF
4121 #line 4122 "configure"
4122 #include "confdefs.h"
4123 #include <unistd.h>
4124 int main() {
4125 int i = (int)setresuid
4126 ; return 0; }
4127 EOF
4128 if { (eval echo configure:4129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4129   rm -rf conftest*
4130   ac_cv_have_setresuid_decl=yes
4131 else
4132   echo "configure: failed program was:" >&5
4133   cat conftest.$ac_ext >&5
4134   rm -rf conftest*
4135   ac_cv_have_setresuid_decl=no
4136 fi
4137 rm -f conftest*
4138 fi
4139
4140 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4141  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4142     cat >> confdefs.h <<\EOF
4143 #define HAVE_SETRESUID_DECL 1
4144 EOF
4145
4146  fi
4147
4148
4149  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4150 echo "configure:4151: checking for setresgid declaration" >&5
4151 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4152   echo $ac_n "(cached) $ac_c" 1>&6
4153 else
4154   
4155     cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 #include <unistd.h>
4159 int main() {
4160 int i = (int)setresgid
4161 ; return 0; }
4162 EOF
4163 if { (eval echo configure:4164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4164   rm -rf conftest*
4165   ac_cv_have_setresgid_decl=yes
4166 else
4167   echo "configure: failed program was:" >&5
4168   cat conftest.$ac_ext >&5
4169   rm -rf conftest*
4170   ac_cv_have_setresgid_decl=no
4171 fi
4172 rm -f conftest*
4173 fi
4174
4175 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4176  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4177     cat >> confdefs.h <<\EOF
4178 #define HAVE_SETRESGID_DECL 1
4179 EOF
4180
4181  fi
4182
4183
4184  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4185 echo "configure:4186: checking for asprintf declaration" >&5
4186 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4187   echo $ac_n "(cached) $ac_c" 1>&6
4188 else
4189   
4190     cat > conftest.$ac_ext <<EOF
4191 #line 4192 "configure"
4192 #include "confdefs.h"
4193 #include <stdio.h>
4194 int main() {
4195 int i = (int)asprintf
4196 ; return 0; }
4197 EOF
4198 if { (eval echo configure:4199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4199   rm -rf conftest*
4200   ac_cv_have_asprintf_decl=yes
4201 else
4202   echo "configure: failed program was:" >&5
4203   cat conftest.$ac_ext >&5
4204   rm -rf conftest*
4205   ac_cv_have_asprintf_decl=no
4206 fi
4207 rm -f conftest*
4208 fi
4209
4210 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4211  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4212     cat >> confdefs.h <<\EOF
4213 #define HAVE_ASPRINTF_DECL 1
4214 EOF
4215
4216  fi
4217
4218
4219  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4220 echo "configure:4221: checking for vasprintf declaration" >&5
4221 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4222   echo $ac_n "(cached) $ac_c" 1>&6
4223 else
4224   
4225     cat > conftest.$ac_ext <<EOF
4226 #line 4227 "configure"
4227 #include "confdefs.h"
4228 #include <stdio.h>
4229 int main() {
4230 int i = (int)vasprintf
4231 ; return 0; }
4232 EOF
4233 if { (eval echo configure:4234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4234   rm -rf conftest*
4235   ac_cv_have_vasprintf_decl=yes
4236 else
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -rf conftest*
4240   ac_cv_have_vasprintf_decl=no
4241 fi
4242 rm -f conftest*
4243 fi
4244
4245 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4246  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4247     cat >> confdefs.h <<\EOF
4248 #define HAVE_VASPRINTF_DECL 1
4249 EOF
4250
4251  fi
4252
4253
4254  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4255 echo "configure:4256: checking for vsnprintf declaration" >&5
4256 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4257   echo $ac_n "(cached) $ac_c" 1>&6
4258 else
4259   
4260     cat > conftest.$ac_ext <<EOF
4261 #line 4262 "configure"
4262 #include "confdefs.h"
4263 #include <stdio.h>
4264 int main() {
4265 int i = (int)vsnprintf
4266 ; return 0; }
4267 EOF
4268 if { (eval echo configure:4269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4269   rm -rf conftest*
4270   ac_cv_have_vsnprintf_decl=yes
4271 else
4272   echo "configure: failed program was:" >&5
4273   cat conftest.$ac_ext >&5
4274   rm -rf conftest*
4275   ac_cv_have_vsnprintf_decl=no
4276 fi
4277 rm -f conftest*
4278 fi
4279
4280 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4281  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4282     cat >> confdefs.h <<\EOF
4283 #define HAVE_VSNPRINTF_DECL 1
4284 EOF
4285
4286  fi
4287
4288
4289  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4290 echo "configure:4291: checking for snprintf declaration" >&5
4291 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4292   echo $ac_n "(cached) $ac_c" 1>&6
4293 else
4294   
4295     cat > conftest.$ac_ext <<EOF
4296 #line 4297 "configure"
4297 #include "confdefs.h"
4298 #include <stdio.h>
4299 int main() {
4300 int i = (int)snprintf
4301 ; return 0; }
4302 EOF
4303 if { (eval echo configure:4304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4304   rm -rf conftest*
4305   ac_cv_have_snprintf_decl=yes
4306 else
4307   echo "configure: failed program was:" >&5
4308   cat conftest.$ac_ext >&5
4309   rm -rf conftest*
4310   ac_cv_have_snprintf_decl=no
4311 fi
4312 rm -f conftest*
4313 fi
4314
4315 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4316  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4317     cat >> confdefs.h <<\EOF
4318 #define HAVE_SNPRINTF_DECL 1
4319 EOF
4320
4321  fi
4322
4323
4324 # and glibc has setresuid under linux but the function does
4325 # nothing until kernel 2.1.44! very dumb.
4326 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4327 echo "configure:4328: checking for real setresuid" >&5
4328 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4329   echo $ac_n "(cached) $ac_c" 1>&6
4330 else
4331   
4332     if test "$cross_compiling" = yes; then
4333   samba_cv_have_setresuid=cross
4334 else
4335   cat > conftest.$ac_ext <<EOF
4336 #line 4337 "configure"
4337 #include "confdefs.h"
4338 #include <errno.h>
4339 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4340 EOF
4341 if { (eval echo configure:4342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4342 then
4343   samba_cv_have_setresuid=yes
4344 else
4345   echo "configure: failed program was:" >&5
4346   cat conftest.$ac_ext >&5
4347   rm -fr conftest*
4348   samba_cv_have_setresuid=no
4349 fi
4350 rm -fr conftest*
4351 fi
4352
4353 fi
4354
4355 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4356 if test x"$samba_cv_have_setresuid" = x"yes"; then
4357     cat >> confdefs.h <<\EOF
4358 #define HAVE_SETRESUID 1
4359 EOF
4360
4361 fi
4362
4363 # Do the same check for setresguid...
4364 #
4365 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4366 echo "configure:4367: checking for real setresgid" >&5
4367 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4368   echo $ac_n "(cached) $ac_c" 1>&6
4369 else
4370   
4371     if test "$cross_compiling" = yes; then
4372   samba_cv_have_setresgid=cross
4373 else
4374   cat > conftest.$ac_ext <<EOF
4375 #line 4376 "configure"
4376 #include "confdefs.h"
4377 #include <unistd.h>
4378 #include <errno.h>
4379 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4380 EOF
4381 if { (eval echo configure:4382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4382 then
4383   samba_cv_have_setresgid=yes
4384 else
4385   echo "configure: failed program was:" >&5
4386   cat conftest.$ac_ext >&5
4387   rm -fr conftest*
4388   samba_cv_have_setresgid=no
4389 fi
4390 rm -fr conftest*
4391 fi
4392
4393 fi
4394
4395 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4396 if test x"$samba_cv_have_setresgid" = x"yes"; then
4397     cat >> confdefs.h <<\EOF
4398 #define HAVE_SETRESGID 1
4399 EOF
4400
4401 fi
4402
4403 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4404 echo "configure:4405: checking for 8-bit clean memcmp" >&5
4405 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4406   echo $ac_n "(cached) $ac_c" 1>&6
4407 else
4408   if test "$cross_compiling" = yes; then
4409   ac_cv_func_memcmp_clean=no
4410 else
4411   cat > conftest.$ac_ext <<EOF
4412 #line 4413 "configure"
4413 #include "confdefs.h"
4414
4415 main()
4416 {
4417   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4418   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4419 }
4420
4421 EOF
4422 if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4423 then
4424   ac_cv_func_memcmp_clean=yes
4425 else
4426   echo "configure: failed program was:" >&5
4427   cat conftest.$ac_ext >&5
4428   rm -fr conftest*
4429   ac_cv_func_memcmp_clean=no
4430 fi
4431 rm -fr conftest*
4432 fi
4433
4434 fi
4435
4436 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4437 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4438
4439
4440 ###############################################
4441 # test for where we get crypt() from
4442 for ac_func in crypt
4443 do
4444 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4445 echo "configure:4446: checking for $ac_func" >&5
4446 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4447   echo $ac_n "(cached) $ac_c" 1>&6
4448 else
4449   cat > conftest.$ac_ext <<EOF
4450 #line 4451 "configure"
4451 #include "confdefs.h"
4452 /* System header to define __stub macros and hopefully few prototypes,
4453     which can conflict with char $ac_func(); below.  */
4454 #include <assert.h>
4455 /* Override any gcc2 internal prototype to avoid an error.  */
4456 /* We use char because int might match the return type of a gcc2
4457     builtin and then its argument prototype would still apply.  */
4458 char $ac_func();
4459
4460 int main() {
4461
4462 /* The GNU C library defines this for functions which it implements
4463     to always fail with ENOSYS.  Some functions are actually named
4464     something starting with __ and the normal name is an alias.  */
4465 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4466 choke me
4467 #else
4468 $ac_func();
4469 #endif
4470
4471 ; return 0; }
4472 EOF
4473 if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4474   rm -rf conftest*
4475   eval "ac_cv_func_$ac_func=yes"
4476 else
4477   echo "configure: failed program was:" >&5
4478   cat conftest.$ac_ext >&5
4479   rm -rf conftest*
4480   eval "ac_cv_func_$ac_func=no"
4481 fi
4482 rm -f conftest*
4483 fi
4484
4485 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4486   echo "$ac_t""yes" 1>&6
4487     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4488   cat >> confdefs.h <<EOF
4489 #define $ac_tr_func 1
4490 EOF
4491  
4492 else
4493   echo "$ac_t""no" 1>&6
4494 fi
4495 done
4496
4497 if test x"$ac_cv_func_crypt" = x"no"; then
4498     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4499 echo "configure:4500: checking for crypt in -lcrypt" >&5
4500 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4501 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4502   echo $ac_n "(cached) $ac_c" 1>&6
4503 else
4504   ac_save_LIBS="$LIBS"
4505 LIBS="-lcrypt  $LIBS"
4506 cat > conftest.$ac_ext <<EOF
4507 #line 4508 "configure"
4508 #include "confdefs.h"
4509 /* Override any gcc2 internal prototype to avoid an error.  */
4510 /* We use char because int might match the return type of a gcc2
4511     builtin and then its argument prototype would still apply.  */
4512 char crypt();
4513
4514 int main() {
4515 crypt()
4516 ; return 0; }
4517 EOF
4518 if { (eval echo configure:4519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4519   rm -rf conftest*
4520   eval "ac_cv_lib_$ac_lib_var=yes"
4521 else
4522   echo "configure: failed program was:" >&5
4523   cat conftest.$ac_ext >&5
4524   rm -rf conftest*
4525   eval "ac_cv_lib_$ac_lib_var=no"
4526 fi
4527 rm -f conftest*
4528 LIBS="$ac_save_LIBS"
4529
4530 fi
4531 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4532   echo "$ac_t""yes" 1>&6
4533   LIBS="$LIBS -lcrypt";
4534         cat >> confdefs.h <<\EOF
4535 #define HAVE_CRYPT 1
4536 EOF
4537
4538 else
4539   echo "$ac_t""no" 1>&6
4540 fi
4541
4542 fi
4543
4544
4545 ###############################################
4546 # Readline included by default unless explicitly asked not to
4547 test "${with_readline+set}" != "set" && with_readline=yes
4548
4549 # test for where we get readline() from
4550 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4551 echo "configure:4552: checking whether to use readline" >&5
4552 # Check whether --with-readline or --without-readline was given.
4553 if test "${with_readline+set}" = set; then
4554   withval="$with_readline"
4555     case "$with_readline" in
4556   yes)
4557     echo "$ac_t""yes" 1>&6
4558
4559     for ac_hdr in readline.h history.h readline/readline.h
4560 do
4561 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4562 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4563 echo "configure:4564: checking for $ac_hdr" >&5
4564 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4565   echo $ac_n "(cached) $ac_c" 1>&6
4566 else
4567   cat > conftest.$ac_ext <<EOF
4568 #line 4569 "configure"
4569 #include "confdefs.h"
4570 #include <$ac_hdr>
4571 EOF
4572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4573 { (eval echo configure:4574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4575 if test -z "$ac_err"; then
4576   rm -rf conftest*
4577   eval "ac_cv_header_$ac_safe=yes"
4578 else
4579   echo "$ac_err" >&5
4580   echo "configure: failed program was:" >&5
4581   cat conftest.$ac_ext >&5
4582   rm -rf conftest*
4583   eval "ac_cv_header_$ac_safe=no"
4584 fi
4585 rm -f conftest*
4586 fi
4587 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4588   echo "$ac_t""yes" 1>&6
4589     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4590   cat >> confdefs.h <<EOF
4591 #define $ac_tr_hdr 1
4592 EOF
4593  
4594 else
4595   echo "$ac_t""no" 1>&6
4596 fi
4597 done
4598
4599     for ac_hdr in readline/history.h
4600 do
4601 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4602 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4603 echo "configure:4604: checking for $ac_hdr" >&5
4604 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4605   echo $ac_n "(cached) $ac_c" 1>&6
4606 else
4607   cat > conftest.$ac_ext <<EOF
4608 #line 4609 "configure"
4609 #include "confdefs.h"
4610 #include <$ac_hdr>
4611 EOF
4612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4613 { (eval echo configure:4614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4615 if test -z "$ac_err"; then
4616   rm -rf conftest*
4617   eval "ac_cv_header_$ac_safe=yes"
4618 else
4619   echo "$ac_err" >&5
4620   echo "configure: failed program was:" >&5
4621   cat conftest.$ac_ext >&5
4622   rm -rf conftest*
4623   eval "ac_cv_header_$ac_safe=no"
4624 fi
4625 rm -f conftest*
4626 fi
4627 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4628   echo "$ac_t""yes" 1>&6
4629     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4630   cat >> confdefs.h <<EOF
4631 #define $ac_tr_hdr 1
4632 EOF
4633  
4634 else
4635   echo "$ac_t""no" 1>&6
4636 fi
4637 done
4638
4639
4640     for ac_hdr in readline.h readline/readline.h
4641 do
4642 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4643 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4644 echo "configure:4645: checking for $ac_hdr" >&5
4645 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4646   echo $ac_n "(cached) $ac_c" 1>&6
4647 else
4648   cat > conftest.$ac_ext <<EOF
4649 #line 4650 "configure"
4650 #include "confdefs.h"
4651 #include <$ac_hdr>
4652 EOF
4653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4654 { (eval echo configure:4655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4656 if test -z "$ac_err"; then
4657   rm -rf conftest*
4658   eval "ac_cv_header_$ac_safe=yes"
4659 else
4660   echo "$ac_err" >&5
4661   echo "configure: failed program was:" >&5
4662   cat conftest.$ac_ext >&5
4663   rm -rf conftest*
4664   eval "ac_cv_header_$ac_safe=no"
4665 fi
4666 rm -f conftest*
4667 fi
4668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4669   echo "$ac_t""yes" 1>&6
4670     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4671   cat >> confdefs.h <<EOF
4672 #define $ac_tr_hdr 1
4673 EOF
4674  
4675       for termlib in ncurses curses termcap terminfo termlib; do
4676        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4677 echo "configure:4678: checking for tgetent in -l${termlib}" >&5
4678 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4679 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4680   echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682   ac_save_LIBS="$LIBS"
4683 LIBS="-l${termlib}  $LIBS"
4684 cat > conftest.$ac_ext <<EOF
4685 #line 4686 "configure"
4686 #include "confdefs.h"
4687 /* Override any gcc2 internal prototype to avoid an error.  */
4688 /* We use char because int might match the return type of a gcc2
4689     builtin and then its argument prototype would still apply.  */
4690 char tgetent();
4691
4692 int main() {
4693 tgetent()
4694 ; return 0; }
4695 EOF
4696 if { (eval echo configure:4697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4697   rm -rf conftest*
4698   eval "ac_cv_lib_$ac_lib_var=yes"
4699 else
4700   echo "configure: failed program was:" >&5
4701   cat conftest.$ac_ext >&5
4702   rm -rf conftest*
4703   eval "ac_cv_lib_$ac_lib_var=no"
4704 fi
4705 rm -f conftest*
4706 LIBS="$ac_save_LIBS"
4707
4708 fi
4709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4710   echo "$ac_t""yes" 1>&6
4711   TERMLIBS="-l${termlib}"; break
4712 else
4713   echo "$ac_t""no" 1>&6
4714 fi
4715
4716       done
4717       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4718 echo "configure:4719: checking for rl_callback_handler_install in -lreadline" >&5
4719 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4720 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4721   echo $ac_n "(cached) $ac_c" 1>&6
4722 else
4723   ac_save_LIBS="$LIBS"
4724 LIBS="-lreadline $TERMLIBS $LIBS"
4725 cat > conftest.$ac_ext <<EOF
4726 #line 4727 "configure"
4727 #include "confdefs.h"
4728 /* Override any gcc2 internal prototype to avoid an error.  */
4729 /* We use char because int might match the return type of a gcc2
4730     builtin and then its argument prototype would still apply.  */
4731 char rl_callback_handler_install();
4732
4733 int main() {
4734 rl_callback_handler_install()
4735 ; return 0; }
4736 EOF
4737 if { (eval echo configure:4738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4738   rm -rf conftest*
4739   eval "ac_cv_lib_$ac_lib_var=yes"
4740 else
4741   echo "configure: failed program was:" >&5
4742   cat conftest.$ac_ext >&5
4743   rm -rf conftest*
4744   eval "ac_cv_lib_$ac_lib_var=no"
4745 fi
4746 rm -f conftest*
4747 LIBS="$ac_save_LIBS"
4748
4749 fi
4750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4751   echo "$ac_t""yes" 1>&6
4752   TERMLIBS="-lreadline $TERMLIBS"
4753        cat >> confdefs.h <<\EOF
4754 #define HAVE_LIBREADLINE 1
4755 EOF
4756
4757        break
4758 else
4759   echo "$ac_t""no" 1>&6
4760 TERMLIBS=
4761 fi
4762
4763 else
4764   echo "$ac_t""no" 1>&6
4765 fi
4766 done
4767
4768     ;;
4769   no)
4770     echo "$ac_t""no" 1>&6
4771     ;;
4772   *)
4773     echo "$ac_t""yes" 1>&6
4774
4775     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4776     # alternate readline path
4777     _ldflags=${LDFLAGS}
4778     _cppflags=${CPPFLAGS}
4779
4780     # Add additional search path
4781     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4782     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4783
4784     for ac_hdr in readline.h history.h readline/readline.h
4785 do
4786 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4787 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4788 echo "configure:4789: checking for $ac_hdr" >&5
4789 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4790   echo $ac_n "(cached) $ac_c" 1>&6
4791 else
4792   cat > conftest.$ac_ext <<EOF
4793 #line 4794 "configure"
4794 #include "confdefs.h"
4795 #include <$ac_hdr>
4796 EOF
4797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4798 { (eval echo configure:4799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4800 if test -z "$ac_err"; then
4801   rm -rf conftest*
4802   eval "ac_cv_header_$ac_safe=yes"
4803 else
4804   echo "$ac_err" >&5
4805   echo "configure: failed program was:" >&5
4806   cat conftest.$ac_ext >&5
4807   rm -rf conftest*
4808   eval "ac_cv_header_$ac_safe=no"
4809 fi
4810 rm -f conftest*
4811 fi
4812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4813   echo "$ac_t""yes" 1>&6
4814     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4815   cat >> confdefs.h <<EOF
4816 #define $ac_tr_hdr 1
4817 EOF
4818  
4819 else
4820   echo "$ac_t""no" 1>&6
4821 fi
4822 done
4823
4824     for ac_hdr in readline/history.h
4825 do
4826 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4827 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4828 echo "configure:4829: checking for $ac_hdr" >&5
4829 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4830   echo $ac_n "(cached) $ac_c" 1>&6
4831 else
4832   cat > conftest.$ac_ext <<EOF
4833 #line 4834 "configure"
4834 #include "confdefs.h"
4835 #include <$ac_hdr>
4836 EOF
4837 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4838 { (eval echo configure:4839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4839 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4840 if test -z "$ac_err"; then
4841   rm -rf conftest*
4842   eval "ac_cv_header_$ac_safe=yes"
4843 else
4844   echo "$ac_err" >&5
4845   echo "configure: failed program was:" >&5
4846   cat conftest.$ac_ext >&5
4847   rm -rf conftest*
4848   eval "ac_cv_header_$ac_safe=no"
4849 fi
4850 rm -f conftest*
4851 fi
4852 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4853   echo "$ac_t""yes" 1>&6
4854     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4855   cat >> confdefs.h <<EOF
4856 #define $ac_tr_hdr 1
4857 EOF
4858  
4859 else
4860   echo "$ac_t""no" 1>&6
4861 fi
4862 done
4863
4864
4865     for ac_hdr in readline.h readline/readline.h
4866 do
4867 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4868 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4869 echo "configure:4870: checking for $ac_hdr" >&5
4870 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873   cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876 #include <$ac_hdr>
4877 EOF
4878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4879 { (eval echo configure:4880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4881 if test -z "$ac_err"; then
4882   rm -rf conftest*
4883   eval "ac_cv_header_$ac_safe=yes"
4884 else
4885   echo "$ac_err" >&5
4886   echo "configure: failed program was:" >&5
4887   cat conftest.$ac_ext >&5
4888   rm -rf conftest*
4889   eval "ac_cv_header_$ac_safe=no"
4890 fi
4891 rm -f conftest*
4892 fi
4893 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4894   echo "$ac_t""yes" 1>&6
4895     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4896   cat >> confdefs.h <<EOF
4897 #define $ac_tr_hdr 1
4898 EOF
4899  
4900       for termlib in ncurses curses termcap terminfo termlib; do
4901        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4902 echo "configure:4903: checking for tgetent in -l${termlib}" >&5
4903 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4904 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4905   echo $ac_n "(cached) $ac_c" 1>&6
4906 else
4907   ac_save_LIBS="$LIBS"
4908 LIBS="-l${termlib}  $LIBS"
4909 cat > conftest.$ac_ext <<EOF
4910 #line 4911 "configure"
4911 #include "confdefs.h"
4912 /* Override any gcc2 internal prototype to avoid an error.  */
4913 /* We use char because int might match the return type of a gcc2
4914     builtin and then its argument prototype would still apply.  */
4915 char tgetent();
4916
4917 int main() {
4918 tgetent()
4919 ; return 0; }
4920 EOF
4921 if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4922   rm -rf conftest*
4923   eval "ac_cv_lib_$ac_lib_var=yes"
4924 else
4925   echo "configure: failed program was:" >&5
4926   cat conftest.$ac_ext >&5
4927   rm -rf conftest*
4928   eval "ac_cv_lib_$ac_lib_var=no"
4929 fi
4930 rm -f conftest*
4931 LIBS="$ac_save_LIBS"
4932
4933 fi
4934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4935   echo "$ac_t""yes" 1>&6
4936   TERMLIBS="-l${termlib}"; break
4937 else
4938   echo "$ac_t""no" 1>&6
4939 fi
4940
4941       done
4942       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4943 echo "configure:4944: checking for rl_callback_handler_install in -lreadline" >&5
4944 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4945 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4946   echo $ac_n "(cached) $ac_c" 1>&6
4947 else
4948   ac_save_LIBS="$LIBS"
4949 LIBS="-lreadline $TERMLIBS $LIBS"
4950 cat > conftest.$ac_ext <<EOF
4951 #line 4952 "configure"
4952 #include "confdefs.h"
4953 /* Override any gcc2 internal prototype to avoid an error.  */
4954 /* We use char because int might match the return type of a gcc2
4955     builtin and then its argument prototype would still apply.  */
4956 char rl_callback_handler_install();
4957
4958 int main() {
4959 rl_callback_handler_install()
4960 ; return 0; }
4961 EOF
4962 if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4963   rm -rf conftest*
4964   eval "ac_cv_lib_$ac_lib_var=yes"
4965 else
4966   echo "configure: failed program was:" >&5
4967   cat conftest.$ac_ext >&5
4968   rm -rf conftest*
4969   eval "ac_cv_lib_$ac_lib_var=no"
4970 fi
4971 rm -f conftest*
4972 LIBS="$ac_save_LIBS"
4973
4974 fi
4975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4976   echo "$ac_t""yes" 1>&6
4977   TERMLDFLAGS="-L$with_readline/lib"
4978        TERMCPPFLAGS="-I$with_readline/include"
4979        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4980        TERMLIBS="-lreadline $TERMLIBS"
4981        cat >> confdefs.h <<\EOF
4982 #define HAVE_LIBREADLINE 1
4983 EOF
4984
4985        break
4986 else
4987   echo "$ac_t""no" 1>&6
4988 TERMLIBS= CPPFLAGS=$_cppflags
4989 fi
4990
4991 else
4992   echo "$ac_t""no" 1>&6
4993 fi
4994 done
4995
4996
4997     LDFLAGS=$_ldflags
4998     ;;
4999   esac
5000 else
5001   echo "$ac_t""no" 1>&6
5002
5003 fi
5004
5005
5006
5007
5008 # The readline API changed slightly from readline3 to readline4, so
5009 # code will generate warnings on one of them unless we have a few
5010 # special cases.
5011 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
5012 echo "configure:5013: checking for rl_completion_matches in -lreadline" >&5
5013 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
5014 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5015   echo $ac_n "(cached) $ac_c" 1>&6
5016 else
5017   ac_save_LIBS="$LIBS"
5018 LIBS="-lreadline $TERMLIBS $LIBS"
5019 cat > conftest.$ac_ext <<EOF
5020 #line 5021 "configure"
5021 #include "confdefs.h"
5022 /* Override any gcc2 internal prototype to avoid an error.  */
5023 /* We use char because int might match the return type of a gcc2
5024     builtin and then its argument prototype would still apply.  */
5025 char rl_completion_matches();
5026
5027 int main() {
5028 rl_completion_matches()
5029 ; return 0; }
5030 EOF
5031 if { (eval echo configure:5032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5032   rm -rf conftest*
5033   eval "ac_cv_lib_$ac_lib_var=yes"
5034 else
5035   echo "configure: failed program was:" >&5
5036   cat conftest.$ac_ext >&5
5037   rm -rf conftest*
5038   eval "ac_cv_lib_$ac_lib_var=no"
5039 fi
5040 rm -f conftest*
5041 LIBS="$ac_save_LIBS"
5042
5043 fi
5044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5045   echo "$ac_t""yes" 1>&6
5046   cat >> confdefs.h <<\EOF
5047 #define HAVE_NEW_LIBREADLINE 1
5048 EOF
5049
5050 else
5051   echo "$ac_t""no" 1>&6
5052 fi
5053
5054
5055 # The following test taken from the cvs sources
5056 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5057 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5058 # libsocket.so which has a bad implementation of gethostbyname (it
5059 # only looks in /etc/hosts), so we only look for -lsocket if we need
5060 # it.
5061 for ac_func in connect
5062 do
5063 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5064 echo "configure:5065: checking for $ac_func" >&5
5065 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5066   echo $ac_n "(cached) $ac_c" 1>&6
5067 else
5068   cat > conftest.$ac_ext <<EOF
5069 #line 5070 "configure"
5070 #include "confdefs.h"
5071 /* System header to define __stub macros and hopefully few prototypes,
5072     which can conflict with char $ac_func(); below.  */
5073 #include <assert.h>
5074 /* Override any gcc2 internal prototype to avoid an error.  */
5075 /* We use char because int might match the return type of a gcc2
5076     builtin and then its argument prototype would still apply.  */
5077 char $ac_func();
5078
5079 int main() {
5080
5081 /* The GNU C library defines this for functions which it implements
5082     to always fail with ENOSYS.  Some functions are actually named
5083     something starting with __ and the normal name is an alias.  */
5084 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5085 choke me
5086 #else
5087 $ac_func();
5088 #endif
5089
5090 ; return 0; }
5091 EOF
5092 if { (eval echo configure:5093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5093   rm -rf conftest*
5094   eval "ac_cv_func_$ac_func=yes"
5095 else
5096   echo "configure: failed program was:" >&5
5097   cat conftest.$ac_ext >&5
5098   rm -rf conftest*
5099   eval "ac_cv_func_$ac_func=no"
5100 fi
5101 rm -f conftest*
5102 fi
5103
5104 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5105   echo "$ac_t""yes" 1>&6
5106     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5107   cat >> confdefs.h <<EOF
5108 #define $ac_tr_func 1
5109 EOF
5110  
5111 else
5112   echo "$ac_t""no" 1>&6
5113 fi
5114 done
5115
5116 if test x"$ac_cv_func_connect" = x"no"; then
5117     case "$LIBS" in
5118     *-lnsl*) ;;
5119     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5120 echo "configure:5121: checking for printf in -lnsl_s" >&5
5121 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5122 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5123   echo $ac_n "(cached) $ac_c" 1>&6
5124 else
5125   ac_save_LIBS="$LIBS"
5126 LIBS="-lnsl_s  $LIBS"
5127 cat > conftest.$ac_ext <<EOF
5128 #line 5129 "configure"
5129 #include "confdefs.h"
5130 /* Override any gcc2 internal prototype to avoid an error.  */
5131 /* We use char because int might match the return type of a gcc2
5132     builtin and then its argument prototype would still apply.  */
5133 char printf();
5134
5135 int main() {
5136 printf()
5137 ; return 0; }
5138 EOF
5139 if { (eval echo configure:5140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5140   rm -rf conftest*
5141   eval "ac_cv_lib_$ac_lib_var=yes"
5142 else
5143   echo "configure: failed program was:" >&5
5144   cat conftest.$ac_ext >&5
5145   rm -rf conftest*
5146   eval "ac_cv_lib_$ac_lib_var=no"
5147 fi
5148 rm -f conftest*
5149 LIBS="$ac_save_LIBS"
5150
5151 fi
5152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5153   echo "$ac_t""yes" 1>&6
5154     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5155     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5156   cat >> confdefs.h <<EOF
5157 #define $ac_tr_lib 1
5158 EOF
5159
5160   LIBS="-lnsl_s $LIBS"
5161
5162 else
5163   echo "$ac_t""no" 1>&6
5164 fi
5165  ;;
5166     esac
5167     case "$LIBS" in
5168     *-lnsl*) ;;
5169     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5170 echo "configure:5171: checking for printf in -lnsl" >&5
5171 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5172 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5173   echo $ac_n "(cached) $ac_c" 1>&6
5174 else
5175   ac_save_LIBS="$LIBS"
5176 LIBS="-lnsl  $LIBS"
5177 cat > conftest.$ac_ext <<EOF
5178 #line 5179 "configure"
5179 #include "confdefs.h"
5180 /* Override any gcc2 internal prototype to avoid an error.  */
5181 /* We use char because int might match the return type of a gcc2
5182     builtin and then its argument prototype would still apply.  */
5183 char printf();
5184
5185 int main() {
5186 printf()
5187 ; return 0; }
5188 EOF
5189 if { (eval echo configure:5190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5190   rm -rf conftest*
5191   eval "ac_cv_lib_$ac_lib_var=yes"
5192 else
5193   echo "configure: failed program was:" >&5
5194   cat conftest.$ac_ext >&5
5195   rm -rf conftest*
5196   eval "ac_cv_lib_$ac_lib_var=no"
5197 fi
5198 rm -f conftest*
5199 LIBS="$ac_save_LIBS"
5200
5201 fi
5202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5203   echo "$ac_t""yes" 1>&6
5204     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5205     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5206   cat >> confdefs.h <<EOF
5207 #define $ac_tr_lib 1
5208 EOF
5209
5210   LIBS="-lnsl $LIBS"
5211
5212 else
5213   echo "$ac_t""no" 1>&6
5214 fi
5215  ;;
5216     esac
5217     case "$LIBS" in
5218     *-lsocket*) ;;
5219     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5220 echo "configure:5221: checking for connect in -lsocket" >&5
5221 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5222 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5223   echo $ac_n "(cached) $ac_c" 1>&6
5224 else
5225   ac_save_LIBS="$LIBS"
5226 LIBS="-lsocket  $LIBS"
5227 cat > conftest.$ac_ext <<EOF
5228 #line 5229 "configure"
5229 #include "confdefs.h"
5230 /* Override any gcc2 internal prototype to avoid an error.  */
5231 /* We use char because int might match the return type of a gcc2
5232     builtin and then its argument prototype would still apply.  */
5233 char connect();
5234
5235 int main() {
5236 connect()
5237 ; return 0; }
5238 EOF
5239 if { (eval echo configure:5240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5240   rm -rf conftest*
5241   eval "ac_cv_lib_$ac_lib_var=yes"
5242 else
5243   echo "configure: failed program was:" >&5
5244   cat conftest.$ac_ext >&5
5245   rm -rf conftest*
5246   eval "ac_cv_lib_$ac_lib_var=no"
5247 fi
5248 rm -f conftest*
5249 LIBS="$ac_save_LIBS"
5250
5251 fi
5252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5253   echo "$ac_t""yes" 1>&6
5254     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5255     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5256   cat >> confdefs.h <<EOF
5257 #define $ac_tr_lib 1
5258 EOF
5259
5260   LIBS="-lsocket $LIBS"
5261
5262 else
5263   echo "$ac_t""no" 1>&6
5264 fi
5265  ;;
5266     esac
5267     case "$LIBS" in
5268     *-linet*) ;;
5269     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5270 echo "configure:5271: checking for connect in -linet" >&5
5271 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5272 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5273   echo $ac_n "(cached) $ac_c" 1>&6
5274 else
5275   ac_save_LIBS="$LIBS"
5276 LIBS="-linet  $LIBS"
5277 cat > conftest.$ac_ext <<EOF
5278 #line 5279 "configure"
5279 #include "confdefs.h"
5280 /* Override any gcc2 internal prototype to avoid an error.  */
5281 /* We use char because int might match the return type of a gcc2
5282     builtin and then its argument prototype would still apply.  */
5283 char connect();
5284
5285 int main() {
5286 connect()
5287 ; return 0; }
5288 EOF
5289 if { (eval echo configure:5290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5290   rm -rf conftest*
5291   eval "ac_cv_lib_$ac_lib_var=yes"
5292 else
5293   echo "configure: failed program was:" >&5
5294   cat conftest.$ac_ext >&5
5295   rm -rf conftest*
5296   eval "ac_cv_lib_$ac_lib_var=no"
5297 fi
5298 rm -f conftest*
5299 LIBS="$ac_save_LIBS"
5300
5301 fi
5302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5303   echo "$ac_t""yes" 1>&6
5304     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5305     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5306   cat >> confdefs.h <<EOF
5307 #define $ac_tr_lib 1
5308 EOF
5309
5310   LIBS="-linet $LIBS"
5311
5312 else
5313   echo "$ac_t""no" 1>&6
5314 fi
5315  ;;
5316     esac
5317             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5318        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5319         # ac_cv_func_connect=yes
5320         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5321         cat >> confdefs.h <<\EOF
5322 #define HAVE_CONNECT 1
5323 EOF
5324
5325     fi
5326 fi
5327
5328 ###############################################
5329 # test for where we get get_yp_default_domain() from
5330 for ac_func in yp_get_default_domain
5331 do
5332 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5333 echo "configure:5334: checking for $ac_func" >&5
5334 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5335   echo $ac_n "(cached) $ac_c" 1>&6
5336 else
5337   cat > conftest.$ac_ext <<EOF
5338 #line 5339 "configure"
5339 #include "confdefs.h"
5340 /* System header to define __stub macros and hopefully few prototypes,
5341     which can conflict with char $ac_func(); below.  */
5342 #include <assert.h>
5343 /* Override any gcc2 internal prototype to avoid an error.  */
5344 /* We use char because int might match the return type of a gcc2
5345     builtin and then its argument prototype would still apply.  */
5346 char $ac_func();
5347
5348 int main() {
5349
5350 /* The GNU C library defines this for functions which it implements
5351     to always fail with ENOSYS.  Some functions are actually named
5352     something starting with __ and the normal name is an alias.  */
5353 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5354 choke me
5355 #else
5356 $ac_func();
5357 #endif
5358
5359 ; return 0; }
5360 EOF
5361 if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5362   rm -rf conftest*
5363   eval "ac_cv_func_$ac_func=yes"
5364 else
5365   echo "configure: failed program was:" >&5
5366   cat conftest.$ac_ext >&5
5367   rm -rf conftest*
5368   eval "ac_cv_func_$ac_func=no"
5369 fi
5370 rm -f conftest*
5371 fi
5372
5373 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5374   echo "$ac_t""yes" 1>&6
5375     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5376   cat >> confdefs.h <<EOF
5377 #define $ac_tr_func 1
5378 EOF
5379  
5380 else
5381   echo "$ac_t""no" 1>&6
5382 fi
5383 done
5384
5385 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5386         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5387 echo "configure:5388: checking for yp_get_default_domain in -lnsl" >&5
5388 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5389 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5390   echo $ac_n "(cached) $ac_c" 1>&6
5391 else
5392   ac_save_LIBS="$LIBS"
5393 LIBS="-lnsl  $LIBS"
5394 cat > conftest.$ac_ext <<EOF
5395 #line 5396 "configure"
5396 #include "confdefs.h"
5397 /* Override any gcc2 internal prototype to avoid an error.  */
5398 /* We use char because int might match the return type of a gcc2
5399     builtin and then its argument prototype would still apply.  */
5400 char yp_get_default_domain();
5401
5402 int main() {
5403 yp_get_default_domain()
5404 ; return 0; }
5405 EOF
5406 if { (eval echo configure:5407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5407   rm -rf conftest*
5408   eval "ac_cv_lib_$ac_lib_var=yes"
5409 else
5410   echo "configure: failed program was:" >&5
5411   cat conftest.$ac_ext >&5
5412   rm -rf conftest*
5413   eval "ac_cv_lib_$ac_lib_var=no"
5414 fi
5415 rm -f conftest*
5416 LIBS="$ac_save_LIBS"
5417
5418 fi
5419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5420   echo "$ac_t""yes" 1>&6
5421   LIBS="$LIBS -lnsl";
5422         cat >> confdefs.h <<\EOF
5423 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5424 EOF
5425
5426 else
5427   echo "$ac_t""no" 1>&6
5428 fi
5429  
5430 fi
5431
5432 # Check if we have execl, if not we need to compile smbrun.
5433 for ac_func in execl
5434 do
5435 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5436 echo "configure:5437: checking for $ac_func" >&5
5437 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5438   echo $ac_n "(cached) $ac_c" 1>&6
5439 else
5440   cat > conftest.$ac_ext <<EOF
5441 #line 5442 "configure"
5442 #include "confdefs.h"
5443 /* System header to define __stub macros and hopefully few prototypes,
5444     which can conflict with char $ac_func(); below.  */
5445 #include <assert.h>
5446 /* Override any gcc2 internal prototype to avoid an error.  */
5447 /* We use char because int might match the return type of a gcc2
5448     builtin and then its argument prototype would still apply.  */
5449 char $ac_func();
5450
5451 int main() {
5452
5453 /* The GNU C library defines this for functions which it implements
5454     to always fail with ENOSYS.  Some functions are actually named
5455     something starting with __ and the normal name is an alias.  */
5456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5457 choke me
5458 #else
5459 $ac_func();
5460 #endif
5461
5462 ; return 0; }
5463 EOF
5464 if { (eval echo configure:5465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5465   rm -rf conftest*
5466   eval "ac_cv_func_$ac_func=yes"
5467 else
5468   echo "configure: failed program was:" >&5
5469   cat conftest.$ac_ext >&5
5470   rm -rf conftest*
5471   eval "ac_cv_func_$ac_func=no"
5472 fi
5473 rm -f conftest*
5474 fi
5475
5476 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5477   echo "$ac_t""yes" 1>&6
5478     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5479   cat >> confdefs.h <<EOF
5480 #define $ac_tr_func 1
5481 EOF
5482  
5483 else
5484   echo "$ac_t""no" 1>&6
5485 fi
5486 done
5487
5488 if test x"$ac_cv_func_execl" = x"no"; then
5489     RUNPROG="bin/smbrun"
5490 else
5491     RUNPROG=""
5492 fi
5493
5494 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5495 do
5496 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5497 echo "configure:5498: checking for $ac_func" >&5
5498 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5499   echo $ac_n "(cached) $ac_c" 1>&6
5500 else
5501   cat > conftest.$ac_ext <<EOF
5502 #line 5503 "configure"
5503 #include "confdefs.h"
5504 /* System header to define __stub macros and hopefully few prototypes,
5505     which can conflict with char $ac_func(); below.  */
5506 #include <assert.h>
5507 /* Override any gcc2 internal prototype to avoid an error.  */
5508 /* We use char because int might match the return type of a gcc2
5509     builtin and then its argument prototype would still apply.  */
5510 char $ac_func();
5511
5512 int main() {
5513
5514 /* The GNU C library defines this for functions which it implements
5515     to always fail with ENOSYS.  Some functions are actually named
5516     something starting with __ and the normal name is an alias.  */
5517 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5518 choke me
5519 #else
5520 $ac_func();
5521 #endif
5522
5523 ; return 0; }
5524 EOF
5525 if { (eval echo configure:5526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5526   rm -rf conftest*
5527   eval "ac_cv_func_$ac_func=yes"
5528 else
5529   echo "configure: failed program was:" >&5
5530   cat conftest.$ac_ext >&5
5531   rm -rf conftest*
5532   eval "ac_cv_func_$ac_func=no"
5533 fi
5534 rm -f conftest*
5535 fi
5536
5537 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5538   echo "$ac_t""yes" 1>&6
5539     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5540   cat >> confdefs.h <<EOF
5541 #define $ac_tr_func 1
5542 EOF
5543  
5544 else
5545   echo "$ac_t""no" 1>&6
5546 fi
5547 done
5548
5549 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5550 do
5551 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5552 echo "configure:5553: checking for $ac_func" >&5
5553 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5554   echo $ac_n "(cached) $ac_c" 1>&6
5555 else
5556   cat > conftest.$ac_ext <<EOF
5557 #line 5558 "configure"
5558 #include "confdefs.h"
5559 /* System header to define __stub macros and hopefully few prototypes,
5560     which can conflict with char $ac_func(); below.  */
5561 #include <assert.h>
5562 /* Override any gcc2 internal prototype to avoid an error.  */
5563 /* We use char because int might match the return type of a gcc2
5564     builtin and then its argument prototype would still apply.  */
5565 char $ac_func();
5566
5567 int main() {
5568
5569 /* The GNU C library defines this for functions which it implements
5570     to always fail with ENOSYS.  Some functions are actually named
5571     something starting with __ and the normal name is an alias.  */
5572 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5573 choke me
5574 #else
5575 $ac_func();
5576 #endif
5577
5578 ; return 0; }
5579 EOF
5580 if { (eval echo configure:5581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5581   rm -rf conftest*
5582   eval "ac_cv_func_$ac_func=yes"
5583 else
5584   echo "configure: failed program was:" >&5
5585   cat conftest.$ac_ext >&5
5586   rm -rf conftest*
5587   eval "ac_cv_func_$ac_func=no"
5588 fi
5589 rm -f conftest*
5590 fi
5591
5592 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5593   echo "$ac_t""yes" 1>&6
5594     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5595   cat >> confdefs.h <<EOF
5596 #define $ac_tr_func 1
5597 EOF
5598  
5599 else
5600   echo "$ac_t""no" 1>&6
5601 fi
5602 done
5603
5604 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5605 do
5606 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5607 echo "configure:5608: checking for $ac_func" >&5
5608 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5609   echo $ac_n "(cached) $ac_c" 1>&6
5610 else
5611   cat > conftest.$ac_ext <<EOF
5612 #line 5613 "configure"
5613 #include "confdefs.h"
5614 /* System header to define __stub macros and hopefully few prototypes,
5615     which can conflict with char $ac_func(); below.  */
5616 #include <assert.h>
5617 /* Override any gcc2 internal prototype to avoid an error.  */
5618 /* We use char because int might match the return type of a gcc2
5619     builtin and then its argument prototype would still apply.  */
5620 char $ac_func();
5621
5622 int main() {
5623
5624 /* The GNU C library defines this for functions which it implements
5625     to always fail with ENOSYS.  Some functions are actually named
5626     something starting with __ and the normal name is an alias.  */
5627 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5628 choke me
5629 #else
5630 $ac_func();
5631 #endif
5632
5633 ; return 0; }
5634 EOF
5635 if { (eval echo configure:5636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5636   rm -rf conftest*
5637   eval "ac_cv_func_$ac_func=yes"
5638 else
5639   echo "configure: failed program was:" >&5
5640   cat conftest.$ac_ext >&5
5641   rm -rf conftest*
5642   eval "ac_cv_func_$ac_func=no"
5643 fi
5644 rm -f conftest*
5645 fi
5646
5647 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5648   echo "$ac_t""yes" 1>&6
5649     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5650   cat >> confdefs.h <<EOF
5651 #define $ac_tr_func 1
5652 EOF
5653  
5654 else
5655   echo "$ac_t""no" 1>&6
5656 fi
5657 done
5658
5659 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5660 do
5661 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5662 echo "configure:5663: checking for $ac_func" >&5
5663 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5664   echo $ac_n "(cached) $ac_c" 1>&6
5665 else
5666   cat > conftest.$ac_ext <<EOF
5667 #line 5668 "configure"
5668 #include "confdefs.h"
5669 /* System header to define __stub macros and hopefully few prototypes,
5670     which can conflict with char $ac_func(); below.  */
5671 #include <assert.h>
5672 /* Override any gcc2 internal prototype to avoid an error.  */
5673 /* We use char because int might match the return type of a gcc2
5674     builtin and then its argument prototype would still apply.  */
5675 char $ac_func();
5676
5677 int main() {
5678
5679 /* The GNU C library defines this for functions which it implements
5680     to always fail with ENOSYS.  Some functions are actually named
5681     something starting with __ and the normal name is an alias.  */
5682 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5683 choke me
5684 #else
5685 $ac_func();
5686 #endif
5687
5688 ; return 0; }
5689 EOF
5690 if { (eval echo configure:5691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5691   rm -rf conftest*
5692   eval "ac_cv_func_$ac_func=yes"
5693 else
5694   echo "configure: failed program was:" >&5
5695   cat conftest.$ac_ext >&5
5696   rm -rf conftest*
5697   eval "ac_cv_func_$ac_func=no"
5698 fi
5699 rm -f conftest*
5700 fi
5701
5702 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5703   echo "$ac_t""yes" 1>&6
5704     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5705   cat >> confdefs.h <<EOF
5706 #define $ac_tr_func 1
5707 EOF
5708  
5709 else
5710   echo "$ac_t""no" 1>&6
5711 fi
5712 done
5713
5714 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5715 do
5716 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5717 echo "configure:5718: checking for $ac_func" >&5
5718 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5719   echo $ac_n "(cached) $ac_c" 1>&6
5720 else
5721   cat > conftest.$ac_ext <<EOF
5722 #line 5723 "configure"
5723 #include "confdefs.h"
5724 /* System header to define __stub macros and hopefully few prototypes,
5725     which can conflict with char $ac_func(); below.  */
5726 #include <assert.h>
5727 /* Override any gcc2 internal prototype to avoid an error.  */
5728 /* We use char because int might match the return type of a gcc2
5729     builtin and then its argument prototype would still apply.  */
5730 char $ac_func();
5731
5732 int main() {
5733
5734 /* The GNU C library defines this for functions which it implements
5735     to always fail with ENOSYS.  Some functions are actually named
5736     something starting with __ and the normal name is an alias.  */
5737 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5738 choke me
5739 #else
5740 $ac_func();
5741 #endif
5742
5743 ; return 0; }
5744 EOF
5745 if { (eval echo configure:5746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5746   rm -rf conftest*
5747   eval "ac_cv_func_$ac_func=yes"
5748 else
5749   echo "configure: failed program was:" >&5
5750   cat conftest.$ac_ext >&5
5751   rm -rf conftest*
5752   eval "ac_cv_func_$ac_func=no"
5753 fi
5754 rm -f conftest*
5755 fi
5756
5757 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5758   echo "$ac_t""yes" 1>&6
5759     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5760   cat >> confdefs.h <<EOF
5761 #define $ac_tr_func 1
5762 EOF
5763  
5764 else
5765   echo "$ac_t""no" 1>&6
5766 fi
5767 done
5768
5769 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5770 do
5771 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5772 echo "configure:5773: checking for $ac_func" >&5
5773 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5774   echo $ac_n "(cached) $ac_c" 1>&6
5775 else
5776   cat > conftest.$ac_ext <<EOF
5777 #line 5778 "configure"
5778 #include "confdefs.h"
5779 /* System header to define __stub macros and hopefully few prototypes,
5780     which can conflict with char $ac_func(); below.  */
5781 #include <assert.h>
5782 /* Override any gcc2 internal prototype to avoid an error.  */
5783 /* We use char because int might match the return type of a gcc2
5784     builtin and then its argument prototype would still apply.  */
5785 char $ac_func();
5786
5787 int main() {
5788
5789 /* The GNU C library defines this for functions which it implements
5790     to always fail with ENOSYS.  Some functions are actually named
5791     something starting with __ and the normal name is an alias.  */
5792 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5793 choke me
5794 #else
5795 $ac_func();
5796 #endif
5797
5798 ; return 0; }
5799 EOF
5800 if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5801   rm -rf conftest*
5802   eval "ac_cv_func_$ac_func=yes"
5803 else
5804   echo "configure: failed program was:" >&5
5805   cat conftest.$ac_ext >&5
5806   rm -rf conftest*
5807   eval "ac_cv_func_$ac_func=no"
5808 fi
5809 rm -f conftest*
5810 fi
5811
5812 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5813   echo "$ac_t""yes" 1>&6
5814     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5815   cat >> confdefs.h <<EOF
5816 #define $ac_tr_func 1
5817 EOF
5818  
5819 else
5820   echo "$ac_t""no" 1>&6
5821 fi
5822 done
5823
5824 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5825 do
5826 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5827 echo "configure:5828: checking for $ac_func" >&5
5828 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5829   echo $ac_n "(cached) $ac_c" 1>&6
5830 else
5831   cat > conftest.$ac_ext <<EOF
5832 #line 5833 "configure"
5833 #include "confdefs.h"
5834 /* System header to define __stub macros and hopefully few prototypes,
5835     which can conflict with char $ac_func(); below.  */
5836 #include <assert.h>
5837 /* Override any gcc2 internal prototype to avoid an error.  */
5838 /* We use char because int might match the return type of a gcc2
5839     builtin and then its argument prototype would still apply.  */
5840 char $ac_func();
5841
5842 int main() {
5843
5844 /* The GNU C library defines this for functions which it implements
5845     to always fail with ENOSYS.  Some functions are actually named
5846     something starting with __ and the normal name is an alias.  */
5847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5848 choke me
5849 #else
5850 $ac_func();
5851 #endif
5852
5853 ; return 0; }
5854 EOF
5855 if { (eval echo configure:5856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5856   rm -rf conftest*
5857   eval "ac_cv_func_$ac_func=yes"
5858 else
5859   echo "configure: failed program was:" >&5
5860   cat conftest.$ac_ext >&5
5861   rm -rf conftest*
5862   eval "ac_cv_func_$ac_func=no"
5863 fi
5864 rm -f conftest*
5865 fi
5866
5867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5868   echo "$ac_t""yes" 1>&6
5869     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5870   cat >> confdefs.h <<EOF
5871 #define $ac_tr_func 1
5872 EOF
5873  
5874 else
5875   echo "$ac_t""no" 1>&6
5876 fi
5877 done
5878
5879 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5880 do
5881 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5882 echo "configure:5883: checking for $ac_func" >&5
5883 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5884   echo $ac_n "(cached) $ac_c" 1>&6
5885 else
5886   cat > conftest.$ac_ext <<EOF
5887 #line 5888 "configure"
5888 #include "confdefs.h"
5889 /* System header to define __stub macros and hopefully few prototypes,
5890     which can conflict with char $ac_func(); below.  */
5891 #include <assert.h>
5892 /* Override any gcc2 internal prototype to avoid an error.  */
5893 /* We use char because int might match the return type of a gcc2
5894     builtin and then its argument prototype would still apply.  */
5895 char $ac_func();
5896
5897 int main() {
5898
5899 /* The GNU C library defines this for functions which it implements
5900     to always fail with ENOSYS.  Some functions are actually named
5901     something starting with __ and the normal name is an alias.  */
5902 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5903 choke me
5904 #else
5905 $ac_func();
5906 #endif
5907
5908 ; return 0; }
5909 EOF
5910 if { (eval echo configure:5911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5911   rm -rf conftest*
5912   eval "ac_cv_func_$ac_func=yes"
5913 else
5914   echo "configure: failed program was:" >&5
5915   cat conftest.$ac_ext >&5
5916   rm -rf conftest*
5917   eval "ac_cv_func_$ac_func=no"
5918 fi
5919 rm -f conftest*
5920 fi
5921
5922 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5923   echo "$ac_t""yes" 1>&6
5924     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5925   cat >> confdefs.h <<EOF
5926 #define $ac_tr_func 1
5927 EOF
5928  
5929 else
5930   echo "$ac_t""no" 1>&6
5931 fi
5932 done
5933
5934 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5935 do
5936 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5937 echo "configure:5938: checking for $ac_func" >&5
5938 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5939   echo $ac_n "(cached) $ac_c" 1>&6
5940 else
5941   cat > conftest.$ac_ext <<EOF
5942 #line 5943 "configure"
5943 #include "confdefs.h"
5944 /* System header to define __stub macros and hopefully few prototypes,
5945     which can conflict with char $ac_func(); below.  */
5946 #include <assert.h>
5947 /* Override any gcc2 internal prototype to avoid an error.  */
5948 /* We use char because int might match the return type of a gcc2
5949     builtin and then its argument prototype would still apply.  */
5950 char $ac_func();
5951
5952 int main() {
5953
5954 /* The GNU C library defines this for functions which it implements
5955     to always fail with ENOSYS.  Some functions are actually named
5956     something starting with __ and the normal name is an alias.  */
5957 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5958 choke me
5959 #else
5960 $ac_func();
5961 #endif
5962
5963 ; return 0; }
5964 EOF
5965 if { (eval echo configure:5966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5966   rm -rf conftest*
5967   eval "ac_cv_func_$ac_func=yes"
5968 else
5969   echo "configure: failed program was:" >&5
5970   cat conftest.$ac_ext >&5
5971   rm -rf conftest*
5972   eval "ac_cv_func_$ac_func=no"
5973 fi
5974 rm -f conftest*
5975 fi
5976
5977 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5978   echo "$ac_t""yes" 1>&6
5979     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5980   cat >> confdefs.h <<EOF
5981 #define $ac_tr_func 1
5982 EOF
5983  
5984 else
5985   echo "$ac_t""no" 1>&6
5986 fi
5987 done
5988
5989 for ac_func in syslog vsyslog
5990 do
5991 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5992 echo "configure:5993: checking for $ac_func" >&5
5993 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5994   echo $ac_n "(cached) $ac_c" 1>&6
5995 else
5996   cat > conftest.$ac_ext <<EOF
5997 #line 5998 "configure"
5998 #include "confdefs.h"
5999 /* System header to define __stub macros and hopefully few prototypes,
6000     which can conflict with char $ac_func(); below.  */
6001 #include <assert.h>
6002 /* Override any gcc2 internal prototype to avoid an error.  */
6003 /* We use char because int might match the return type of a gcc2
6004     builtin and then its argument prototype would still apply.  */
6005 char $ac_func();
6006
6007 int main() {
6008
6009 /* The GNU C library defines this for functions which it implements
6010     to always fail with ENOSYS.  Some functions are actually named
6011     something starting with __ and the normal name is an alias.  */
6012 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6013 choke me
6014 #else
6015 $ac_func();
6016 #endif
6017
6018 ; return 0; }
6019 EOF
6020 if { (eval echo configure:6021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6021   rm -rf conftest*
6022   eval "ac_cv_func_$ac_func=yes"
6023 else
6024   echo "configure: failed program was:" >&5
6025   cat conftest.$ac_ext >&5
6026   rm -rf conftest*
6027   eval "ac_cv_func_$ac_func=no"
6028 fi
6029 rm -f conftest*
6030 fi
6031
6032 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6033   echo "$ac_t""yes" 1>&6
6034     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6035   cat >> confdefs.h <<EOF
6036 #define $ac_tr_func 1
6037 EOF
6038  
6039 else
6040   echo "$ac_t""no" 1>&6
6041 fi
6042 done
6043
6044 # setbuffer is needed for smbtorture
6045 for ac_func in setbuffer
6046 do
6047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6048 echo "configure:6049: checking for $ac_func" >&5
6049 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6050   echo $ac_n "(cached) $ac_c" 1>&6
6051 else
6052   cat > conftest.$ac_ext <<EOF
6053 #line 6054 "configure"
6054 #include "confdefs.h"
6055 /* System header to define __stub macros and hopefully few prototypes,
6056     which can conflict with char $ac_func(); below.  */
6057 #include <assert.h>
6058 /* Override any gcc2 internal prototype to avoid an error.  */
6059 /* We use char because int might match the return type of a gcc2
6060     builtin and then its argument prototype would still apply.  */
6061 char $ac_func();
6062
6063 int main() {
6064
6065 /* The GNU C library defines this for functions which it implements
6066     to always fail with ENOSYS.  Some functions are actually named
6067     something starting with __ and the normal name is an alias.  */
6068 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6069 choke me
6070 #else
6071 $ac_func();
6072 #endif
6073
6074 ; return 0; }
6075 EOF
6076 if { (eval echo configure:6077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6077   rm -rf conftest*
6078   eval "ac_cv_func_$ac_func=yes"
6079 else
6080   echo "configure: failed program was:" >&5
6081   cat conftest.$ac_ext >&5
6082   rm -rf conftest*
6083   eval "ac_cv_func_$ac_func=no"
6084 fi
6085 rm -f conftest*
6086 fi
6087
6088 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6089   echo "$ac_t""yes" 1>&6
6090     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6091   cat >> confdefs.h <<EOF
6092 #define $ac_tr_func 1
6093 EOF
6094  
6095 else
6096   echo "$ac_t""no" 1>&6
6097 fi
6098 done
6099
6100
6101 # syscall() is needed for smbwrapper.
6102 for ac_func in syscall
6103 do
6104 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6105 echo "configure:6106: checking for $ac_func" >&5
6106 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6107   echo $ac_n "(cached) $ac_c" 1>&6
6108 else
6109   cat > conftest.$ac_ext <<EOF
6110 #line 6111 "configure"
6111 #include "confdefs.h"
6112 /* System header to define __stub macros and hopefully few prototypes,
6113     which can conflict with char $ac_func(); below.  */
6114 #include <assert.h>
6115 /* Override any gcc2 internal prototype to avoid an error.  */
6116 /* We use char because int might match the return type of a gcc2
6117     builtin and then its argument prototype would still apply.  */
6118 char $ac_func();
6119
6120 int main() {
6121
6122 /* The GNU C library defines this for functions which it implements
6123     to always fail with ENOSYS.  Some functions are actually named
6124     something starting with __ and the normal name is an alias.  */
6125 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6126 choke me
6127 #else
6128 $ac_func();
6129 #endif
6130
6131 ; return 0; }
6132 EOF
6133 if { (eval echo configure:6134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6134   rm -rf conftest*
6135   eval "ac_cv_func_$ac_func=yes"
6136 else
6137   echo "configure: failed program was:" >&5
6138   cat conftest.$ac_ext >&5
6139   rm -rf conftest*
6140   eval "ac_cv_func_$ac_func=no"
6141 fi
6142 rm -f conftest*
6143 fi
6144
6145 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6146   echo "$ac_t""yes" 1>&6
6147     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6148   cat >> confdefs.h <<EOF
6149 #define $ac_tr_func 1
6150 EOF
6151  
6152 else
6153   echo "$ac_t""no" 1>&6
6154 fi
6155 done
6156
6157
6158 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6159 do
6160 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6161 echo "configure:6162: checking for $ac_func" >&5
6162 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6163   echo $ac_n "(cached) $ac_c" 1>&6
6164 else
6165   cat > conftest.$ac_ext <<EOF
6166 #line 6167 "configure"
6167 #include "confdefs.h"
6168 /* System header to define __stub macros and hopefully few prototypes,
6169     which can conflict with char $ac_func(); below.  */
6170 #include <assert.h>
6171 /* Override any gcc2 internal prototype to avoid an error.  */
6172 /* We use char because int might match the return type of a gcc2
6173     builtin and then its argument prototype would still apply.  */
6174 char $ac_func();
6175
6176 int main() {
6177
6178 /* The GNU C library defines this for functions which it implements
6179     to always fail with ENOSYS.  Some functions are actually named
6180     something starting with __ and the normal name is an alias.  */
6181 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6182 choke me
6183 #else
6184 $ac_func();
6185 #endif
6186
6187 ; return 0; }
6188 EOF
6189 if { (eval echo configure:6190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6190   rm -rf conftest*
6191   eval "ac_cv_func_$ac_func=yes"
6192 else
6193   echo "configure: failed program was:" >&5
6194   cat conftest.$ac_ext >&5
6195   rm -rf conftest*
6196   eval "ac_cv_func_$ac_func=no"
6197 fi
6198 rm -f conftest*
6199 fi
6200
6201 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6202   echo "$ac_t""yes" 1>&6
6203     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6204   cat >> confdefs.h <<EOF
6205 #define $ac_tr_func 1
6206 EOF
6207  
6208 else
6209   echo "$ac_t""no" 1>&6
6210 fi
6211 done
6212
6213 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6214 do
6215 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6216 echo "configure:6217: checking for $ac_func" >&5
6217 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6218   echo $ac_n "(cached) $ac_c" 1>&6
6219 else
6220   cat > conftest.$ac_ext <<EOF
6221 #line 6222 "configure"
6222 #include "confdefs.h"
6223 /* System header to define __stub macros and hopefully few prototypes,
6224     which can conflict with char $ac_func(); below.  */
6225 #include <assert.h>
6226 /* Override any gcc2 internal prototype to avoid an error.  */
6227 /* We use char because int might match the return type of a gcc2
6228     builtin and then its argument prototype would still apply.  */
6229 char $ac_func();
6230
6231 int main() {
6232
6233 /* The GNU C library defines this for functions which it implements
6234     to always fail with ENOSYS.  Some functions are actually named
6235     something starting with __ and the normal name is an alias.  */
6236 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6237 choke me
6238 #else
6239 $ac_func();
6240 #endif
6241
6242 ; return 0; }
6243 EOF
6244 if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6245   rm -rf conftest*
6246   eval "ac_cv_func_$ac_func=yes"
6247 else
6248   echo "configure: failed program was:" >&5
6249   cat conftest.$ac_ext >&5
6250   rm -rf conftest*
6251   eval "ac_cv_func_$ac_func=no"
6252 fi
6253 rm -f conftest*
6254 fi
6255
6256 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6257   echo "$ac_t""yes" 1>&6
6258     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6259   cat >> confdefs.h <<EOF
6260 #define $ac_tr_func 1
6261 EOF
6262  
6263 else
6264   echo "$ac_t""no" 1>&6
6265 fi
6266 done
6267
6268 for ac_func in __getcwd _getcwd
6269 do
6270 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6271 echo "configure:6272: checking for $ac_func" >&5
6272 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6273   echo $ac_n "(cached) $ac_c" 1>&6
6274 else
6275   cat > conftest.$ac_ext <<EOF
6276 #line 6277 "configure"
6277 #include "confdefs.h"
6278 /* System header to define __stub macros and hopefully few prototypes,
6279     which can conflict with char $ac_func(); below.  */
6280 #include <assert.h>
6281 /* Override any gcc2 internal prototype to avoid an error.  */
6282 /* We use char because int might match the return type of a gcc2
6283     builtin and then its argument prototype would still apply.  */
6284 char $ac_func();
6285
6286 int main() {
6287
6288 /* The GNU C library defines this for functions which it implements
6289     to always fail with ENOSYS.  Some functions are actually named
6290     something starting with __ and the normal name is an alias.  */
6291 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6292 choke me
6293 #else
6294 $ac_func();
6295 #endif
6296
6297 ; return 0; }
6298 EOF
6299 if { (eval echo configure:6300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6300   rm -rf conftest*
6301   eval "ac_cv_func_$ac_func=yes"
6302 else
6303   echo "configure: failed program was:" >&5
6304   cat conftest.$ac_ext >&5
6305   rm -rf conftest*
6306   eval "ac_cv_func_$ac_func=no"
6307 fi
6308 rm -f conftest*
6309 fi
6310
6311 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6312   echo "$ac_t""yes" 1>&6
6313     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6314   cat >> confdefs.h <<EOF
6315 #define $ac_tr_func 1
6316 EOF
6317  
6318 else
6319   echo "$ac_t""no" 1>&6
6320 fi
6321 done
6322
6323 for ac_func in __xstat __fxstat __lxstat
6324 do
6325 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6326 echo "configure:6327: checking for $ac_func" >&5
6327 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6328   echo $ac_n "(cached) $ac_c" 1>&6
6329 else
6330   cat > conftest.$ac_ext <<EOF
6331 #line 6332 "configure"
6332 #include "confdefs.h"
6333 /* System header to define __stub macros and hopefully few prototypes,
6334     which can conflict with char $ac_func(); below.  */
6335 #include <assert.h>
6336 /* Override any gcc2 internal prototype to avoid an error.  */
6337 /* We use char because int might match the return type of a gcc2
6338     builtin and then its argument prototype would still apply.  */
6339 char $ac_func();
6340
6341 int main() {
6342
6343 /* The GNU C library defines this for functions which it implements
6344     to always fail with ENOSYS.  Some functions are actually named
6345     something starting with __ and the normal name is an alias.  */
6346 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6347 choke me
6348 #else
6349 $ac_func();
6350 #endif
6351
6352 ; return 0; }
6353 EOF
6354 if { (eval echo configure:6355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6355   rm -rf conftest*
6356   eval "ac_cv_func_$ac_func=yes"
6357 else
6358   echo "configure: failed program was:" >&5
6359   cat conftest.$ac_ext >&5
6360   rm -rf conftest*
6361   eval "ac_cv_func_$ac_func=no"
6362 fi
6363 rm -f conftest*
6364 fi
6365
6366 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6367   echo "$ac_t""yes" 1>&6
6368     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6369   cat >> confdefs.h <<EOF
6370 #define $ac_tr_func 1
6371 EOF
6372  
6373 else
6374   echo "$ac_t""no" 1>&6
6375 fi
6376 done
6377
6378 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6379 do
6380 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6381 echo "configure:6382: checking for $ac_func" >&5
6382 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6383   echo $ac_n "(cached) $ac_c" 1>&6
6384 else
6385   cat > conftest.$ac_ext <<EOF
6386 #line 6387 "configure"
6387 #include "confdefs.h"
6388 /* System header to define __stub macros and hopefully few prototypes,
6389     which can conflict with char $ac_func(); below.  */
6390 #include <assert.h>
6391 /* Override any gcc2 internal prototype to avoid an error.  */
6392 /* We use char because int might match the return type of a gcc2
6393     builtin and then its argument prototype would still apply.  */
6394 char $ac_func();
6395
6396 int main() {
6397
6398 /* The GNU C library defines this for functions which it implements
6399     to always fail with ENOSYS.  Some functions are actually named
6400     something starting with __ and the normal name is an alias.  */
6401 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6402 choke me
6403 #else
6404 $ac_func();
6405 #endif
6406
6407 ; return 0; }
6408 EOF
6409 if { (eval echo configure:6410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6410   rm -rf conftest*
6411   eval "ac_cv_func_$ac_func=yes"
6412 else
6413   echo "configure: failed program was:" >&5
6414   cat conftest.$ac_ext >&5
6415   rm -rf conftest*
6416   eval "ac_cv_func_$ac_func=no"
6417 fi
6418 rm -f conftest*
6419 fi
6420
6421 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6422   echo "$ac_t""yes" 1>&6
6423     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6424   cat >> confdefs.h <<EOF
6425 #define $ac_tr_func 1
6426 EOF
6427  
6428 else
6429   echo "$ac_t""no" 1>&6
6430 fi
6431 done
6432
6433 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6434 do
6435 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6436 echo "configure:6437: checking for $ac_func" >&5
6437 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6438   echo $ac_n "(cached) $ac_c" 1>&6
6439 else
6440   cat > conftest.$ac_ext <<EOF
6441 #line 6442 "configure"
6442 #include "confdefs.h"
6443 /* System header to define __stub macros and hopefully few prototypes,
6444     which can conflict with char $ac_func(); below.  */
6445 #include <assert.h>
6446 /* Override any gcc2 internal prototype to avoid an error.  */
6447 /* We use char because int might match the return type of a gcc2
6448     builtin and then its argument prototype would still apply.  */
6449 char $ac_func();
6450
6451 int main() {
6452
6453 /* The GNU C library defines this for functions which it implements
6454     to always fail with ENOSYS.  Some functions are actually named
6455     something starting with __ and the normal name is an alias.  */
6456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6457 choke me
6458 #else
6459 $ac_func();
6460 #endif
6461
6462 ; return 0; }
6463 EOF
6464 if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6465   rm -rf conftest*
6466   eval "ac_cv_func_$ac_func=yes"
6467 else
6468   echo "configure: failed program was:" >&5
6469   cat conftest.$ac_ext >&5
6470   rm -rf conftest*
6471   eval "ac_cv_func_$ac_func=no"
6472 fi
6473 rm -f conftest*
6474 fi
6475
6476 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6477   echo "$ac_t""yes" 1>&6
6478     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6479   cat >> confdefs.h <<EOF
6480 #define $ac_tr_func 1
6481 EOF
6482  
6483 else
6484   echo "$ac_t""no" 1>&6
6485 fi
6486 done
6487
6488 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6489 do
6490 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6491 echo "configure:6492: checking for $ac_func" >&5
6492 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6493   echo $ac_n "(cached) $ac_c" 1>&6
6494 else
6495   cat > conftest.$ac_ext <<EOF
6496 #line 6497 "configure"
6497 #include "confdefs.h"
6498 /* System header to define __stub macros and hopefully few prototypes,
6499     which can conflict with char $ac_func(); below.  */
6500 #include <assert.h>
6501 /* Override any gcc2 internal prototype to avoid an error.  */
6502 /* We use char because int might match the return type of a gcc2
6503     builtin and then its argument prototype would still apply.  */
6504 char $ac_func();
6505
6506 int main() {
6507
6508 /* The GNU C library defines this for functions which it implements
6509     to always fail with ENOSYS.  Some functions are actually named
6510     something starting with __ and the normal name is an alias.  */
6511 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6512 choke me
6513 #else
6514 $ac_func();
6515 #endif
6516
6517 ; return 0; }
6518 EOF
6519 if { (eval echo configure:6520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6520   rm -rf conftest*
6521   eval "ac_cv_func_$ac_func=yes"
6522 else
6523   echo "configure: failed program was:" >&5
6524   cat conftest.$ac_ext >&5
6525   rm -rf conftest*
6526   eval "ac_cv_func_$ac_func=no"
6527 fi
6528 rm -f conftest*
6529 fi
6530
6531 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6532   echo "$ac_t""yes" 1>&6
6533     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6534   cat >> confdefs.h <<EOF
6535 #define $ac_tr_func 1
6536 EOF
6537  
6538 else
6539   echo "$ac_t""no" 1>&6
6540 fi
6541 done
6542
6543 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6544 do
6545 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6546 echo "configure:6547: checking for $ac_func" >&5
6547 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6548   echo $ac_n "(cached) $ac_c" 1>&6
6549 else
6550   cat > conftest.$ac_ext <<EOF
6551 #line 6552 "configure"
6552 #include "confdefs.h"
6553 /* System header to define __stub macros and hopefully few prototypes,
6554     which can conflict with char $ac_func(); below.  */
6555 #include <assert.h>
6556 /* Override any gcc2 internal prototype to avoid an error.  */
6557 /* We use char because int might match the return type of a gcc2
6558     builtin and then its argument prototype would still apply.  */
6559 char $ac_func();
6560
6561 int main() {
6562
6563 /* The GNU C library defines this for functions which it implements
6564     to always fail with ENOSYS.  Some functions are actually named
6565     something starting with __ and the normal name is an alias.  */
6566 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6567 choke me
6568 #else
6569 $ac_func();
6570 #endif
6571
6572 ; return 0; }
6573 EOF
6574 if { (eval echo configure:6575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6575   rm -rf conftest*
6576   eval "ac_cv_func_$ac_func=yes"
6577 else
6578   echo "configure: failed program was:" >&5
6579   cat conftest.$ac_ext >&5
6580   rm -rf conftest*
6581   eval "ac_cv_func_$ac_func=no"
6582 fi
6583 rm -f conftest*
6584 fi
6585
6586 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6587   echo "$ac_t""yes" 1>&6
6588     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6589   cat >> confdefs.h <<EOF
6590 #define $ac_tr_func 1
6591 EOF
6592  
6593 else
6594   echo "$ac_t""no" 1>&6
6595 fi
6596 done
6597
6598 for ac_func in _write __write _fork __fork
6599 do
6600 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6601 echo "configure:6602: checking for $ac_func" >&5
6602 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6603   echo $ac_n "(cached) $ac_c" 1>&6
6604 else
6605   cat > conftest.$ac_ext <<EOF
6606 #line 6607 "configure"
6607 #include "confdefs.h"
6608 /* System header to define __stub macros and hopefully few prototypes,
6609     which can conflict with char $ac_func(); below.  */
6610 #include <assert.h>
6611 /* Override any gcc2 internal prototype to avoid an error.  */
6612 /* We use char because int might match the return type of a gcc2
6613     builtin and then its argument prototype would still apply.  */
6614 char $ac_func();
6615
6616 int main() {
6617
6618 /* The GNU C library defines this for functions which it implements
6619     to always fail with ENOSYS.  Some functions are actually named
6620     something starting with __ and the normal name is an alias.  */
6621 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6622 choke me
6623 #else
6624 $ac_func();
6625 #endif
6626
6627 ; return 0; }
6628 EOF
6629 if { (eval echo configure:6630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6630   rm -rf conftest*
6631   eval "ac_cv_func_$ac_func=yes"
6632 else
6633   echo "configure: failed program was:" >&5
6634   cat conftest.$ac_ext >&5
6635   rm -rf conftest*
6636   eval "ac_cv_func_$ac_func=no"
6637 fi
6638 rm -f conftest*
6639 fi
6640
6641 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6642   echo "$ac_t""yes" 1>&6
6643     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6644   cat >> confdefs.h <<EOF
6645 #define $ac_tr_func 1
6646 EOF
6647  
6648 else
6649   echo "$ac_t""no" 1>&6
6650 fi
6651 done
6652
6653 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6654 do
6655 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6656 echo "configure:6657: checking for $ac_func" >&5
6657 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6658   echo $ac_n "(cached) $ac_c" 1>&6
6659 else
6660   cat > conftest.$ac_ext <<EOF
6661 #line 6662 "configure"
6662 #include "confdefs.h"
6663 /* System header to define __stub macros and hopefully few prototypes,
6664     which can conflict with char $ac_func(); below.  */
6665 #include <assert.h>
6666 /* Override any gcc2 internal prototype to avoid an error.  */
6667 /* We use char because int might match the return type of a gcc2
6668     builtin and then its argument prototype would still apply.  */
6669 char $ac_func();
6670
6671 int main() {
6672
6673 /* The GNU C library defines this for functions which it implements
6674     to always fail with ENOSYS.  Some functions are actually named
6675     something starting with __ and the normal name is an alias.  */
6676 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6677 choke me
6678 #else
6679 $ac_func();
6680 #endif
6681
6682 ; return 0; }
6683 EOF
6684 if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6685   rm -rf conftest*
6686   eval "ac_cv_func_$ac_func=yes"
6687 else
6688   echo "configure: failed program was:" >&5
6689   cat conftest.$ac_ext >&5
6690   rm -rf conftest*
6691   eval "ac_cv_func_$ac_func=no"
6692 fi
6693 rm -f conftest*
6694 fi
6695
6696 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6697   echo "$ac_t""yes" 1>&6
6698     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6699   cat >> confdefs.h <<EOF
6700 #define $ac_tr_func 1
6701 EOF
6702  
6703 else
6704   echo "$ac_t""no" 1>&6
6705 fi
6706 done
6707
6708 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6709 do
6710 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6711 echo "configure:6712: checking for $ac_func" >&5
6712 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6713   echo $ac_n "(cached) $ac_c" 1>&6
6714 else
6715   cat > conftest.$ac_ext <<EOF
6716 #line 6717 "configure"
6717 #include "confdefs.h"
6718 /* System header to define __stub macros and hopefully few prototypes,
6719     which can conflict with char $ac_func(); below.  */
6720 #include <assert.h>
6721 /* Override any gcc2 internal prototype to avoid an error.  */
6722 /* We use char because int might match the return type of a gcc2
6723     builtin and then its argument prototype would still apply.  */
6724 char $ac_func();
6725
6726 int main() {
6727
6728 /* The GNU C library defines this for functions which it implements
6729     to always fail with ENOSYS.  Some functions are actually named
6730     something starting with __ and the normal name is an alias.  */
6731 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6732 choke me
6733 #else
6734 $ac_func();
6735 #endif
6736
6737 ; return 0; }
6738 EOF
6739 if { (eval echo configure:6740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6740   rm -rf conftest*
6741   eval "ac_cv_func_$ac_func=yes"
6742 else
6743   echo "configure: failed program was:" >&5
6744   cat conftest.$ac_ext >&5
6745   rm -rf conftest*
6746   eval "ac_cv_func_$ac_func=no"
6747 fi
6748 rm -f conftest*
6749 fi
6750
6751 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6752   echo "$ac_t""yes" 1>&6
6753     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6754   cat >> confdefs.h <<EOF
6755 #define $ac_tr_func 1
6756 EOF
6757  
6758 else
6759   echo "$ac_t""no" 1>&6
6760 fi
6761 done
6762
6763 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6764 do
6765 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6766 echo "configure:6767: checking for $ac_func" >&5
6767 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6768   echo $ac_n "(cached) $ac_c" 1>&6
6769 else
6770   cat > conftest.$ac_ext <<EOF
6771 #line 6772 "configure"
6772 #include "confdefs.h"
6773 /* System header to define __stub macros and hopefully few prototypes,
6774     which can conflict with char $ac_func(); below.  */
6775 #include <assert.h>
6776 /* Override any gcc2 internal prototype to avoid an error.  */
6777 /* We use char because int might match the return type of a gcc2
6778     builtin and then its argument prototype would still apply.  */
6779 char $ac_func();
6780
6781 int main() {
6782
6783 /* The GNU C library defines this for functions which it implements
6784     to always fail with ENOSYS.  Some functions are actually named
6785     something starting with __ and the normal name is an alias.  */
6786 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6787 choke me
6788 #else
6789 $ac_func();
6790 #endif
6791
6792 ; return 0; }
6793 EOF
6794 if { (eval echo configure:6795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6795   rm -rf conftest*
6796   eval "ac_cv_func_$ac_func=yes"
6797 else
6798   echo "configure: failed program was:" >&5
6799   cat conftest.$ac_ext >&5
6800   rm -rf conftest*
6801   eval "ac_cv_func_$ac_func=no"
6802 fi
6803 rm -f conftest*
6804 fi
6805
6806 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6807   echo "$ac_t""yes" 1>&6
6808     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6809   cat >> confdefs.h <<EOF
6810 #define $ac_tr_func 1
6811 EOF
6812  
6813 else
6814   echo "$ac_t""no" 1>&6
6815 fi
6816 done
6817
6818 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6819 do
6820 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6821 echo "configure:6822: checking for $ac_func" >&5
6822 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6823   echo $ac_n "(cached) $ac_c" 1>&6
6824 else
6825   cat > conftest.$ac_ext <<EOF
6826 #line 6827 "configure"
6827 #include "confdefs.h"
6828 /* System header to define __stub macros and hopefully few prototypes,
6829     which can conflict with char $ac_func(); below.  */
6830 #include <assert.h>
6831 /* Override any gcc2 internal prototype to avoid an error.  */
6832 /* We use char because int might match the return type of a gcc2
6833     builtin and then its argument prototype would still apply.  */
6834 char $ac_func();
6835
6836 int main() {
6837
6838 /* The GNU C library defines this for functions which it implements
6839     to always fail with ENOSYS.  Some functions are actually named
6840     something starting with __ and the normal name is an alias.  */
6841 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6842 choke me
6843 #else
6844 $ac_func();
6845 #endif
6846
6847 ; return 0; }
6848 EOF
6849 if { (eval echo configure:6850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6850   rm -rf conftest*
6851   eval "ac_cv_func_$ac_func=yes"
6852 else
6853   echo "configure: failed program was:" >&5
6854   cat conftest.$ac_ext >&5
6855   rm -rf conftest*
6856   eval "ac_cv_func_$ac_func=no"
6857 fi
6858 rm -f conftest*
6859 fi
6860
6861 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6862   echo "$ac_t""yes" 1>&6
6863     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6864   cat >> confdefs.h <<EOF
6865 #define $ac_tr_func 1
6866 EOF
6867  
6868 else
6869   echo "$ac_t""no" 1>&6
6870 fi
6871 done
6872
6873 for ac_func in open64 _open64 __open64 creat64
6874 do
6875 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6876 echo "configure:6877: checking for $ac_func" >&5
6877 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6878   echo $ac_n "(cached) $ac_c" 1>&6
6879 else
6880   cat > conftest.$ac_ext <<EOF
6881 #line 6882 "configure"
6882 #include "confdefs.h"
6883 /* System header to define __stub macros and hopefully few prototypes,
6884     which can conflict with char $ac_func(); below.  */
6885 #include <assert.h>
6886 /* Override any gcc2 internal prototype to avoid an error.  */
6887 /* We use char because int might match the return type of a gcc2
6888     builtin and then its argument prototype would still apply.  */
6889 char $ac_func();
6890
6891 int main() {
6892
6893 /* The GNU C library defines this for functions which it implements
6894     to always fail with ENOSYS.  Some functions are actually named
6895     something starting with __ and the normal name is an alias.  */
6896 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6897 choke me
6898 #else
6899 $ac_func();
6900 #endif
6901
6902 ; return 0; }
6903 EOF
6904 if { (eval echo configure:6905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6905   rm -rf conftest*
6906   eval "ac_cv_func_$ac_func=yes"
6907 else
6908   echo "configure: failed program was:" >&5
6909   cat conftest.$ac_ext >&5
6910   rm -rf conftest*
6911   eval "ac_cv_func_$ac_func=no"
6912 fi
6913 rm -f conftest*
6914 fi
6915
6916 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6917   echo "$ac_t""yes" 1>&6
6918     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6919   cat >> confdefs.h <<EOF
6920 #define $ac_tr_func 1
6921 EOF
6922  
6923 else
6924   echo "$ac_t""no" 1>&6
6925 fi
6926 done
6927
6928
6929 #
6930 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6931 #
6932
6933 if test x$ac_cv_func_stat64 = xno ; then
6934   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6935 echo "configure:6936: checking for stat64 in <sys/stat.h>" >&5
6936   cat > conftest.$ac_ext <<EOF
6937 #line 6938 "configure"
6938 #include "confdefs.h"
6939
6940 #if defined(HAVE_UNISTD_H)
6941 #include <unistd.h>
6942 #endif
6943 #include <sys/stat.h>
6944
6945 int main() {
6946 struct stat64 st64; exit(stat64(".",&st64));
6947 ; return 0; }
6948 EOF
6949 if { (eval echo configure:6950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6950   rm -rf conftest*
6951   ac_cv_func_stat64=yes
6952 else
6953   echo "configure: failed program was:" >&5
6954   cat conftest.$ac_ext >&5
6955 fi
6956 rm -f conftest*
6957   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6958   if test x$ac_cv_func_stat64 = xyes ; then
6959     cat >> confdefs.h <<\EOF
6960 #define HAVE_STAT64 1
6961 EOF
6962
6963   fi
6964 fi
6965
6966 if test x$ac_cv_func_lstat64 = xno ; then
6967   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6968 echo "configure:6969: checking for lstat64 in <sys/stat.h>" >&5
6969   cat > conftest.$ac_ext <<EOF
6970 #line 6971 "configure"
6971 #include "confdefs.h"
6972
6973 #if defined(HAVE_UNISTD_H)
6974 #include <unistd.h>
6975 #endif
6976 #include <sys/stat.h>
6977
6978 int main() {
6979 struct stat64 st64; exit(lstat64(".",&st64));
6980 ; return 0; }
6981 EOF
6982 if { (eval echo configure:6983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6983   rm -rf conftest*
6984   ac_cv_func_lstat64=yes
6985 else
6986   echo "configure: failed program was:" >&5
6987   cat conftest.$ac_ext >&5
6988 fi
6989 rm -f conftest*
6990   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6991   if test x$ac_cv_func_lstat64 = xyes ; then
6992     cat >> confdefs.h <<\EOF
6993 #define HAVE_LSTAT64 1
6994 EOF
6995
6996   fi
6997 fi
6998
6999 if test x$ac_cv_func_fstat64 = xno ; then
7000   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
7001 echo "configure:7002: checking for fstat64 in <sys/stat.h>" >&5
7002   cat > conftest.$ac_ext <<EOF
7003 #line 7004 "configure"
7004 #include "confdefs.h"
7005
7006 #if defined(HAVE_UNISTD_H)
7007 #include <unistd.h>
7008 #endif
7009 #include <sys/stat.h>
7010
7011 int main() {
7012 struct stat64 st64; exit(fstat64(0,&st64));
7013 ; return 0; }
7014 EOF
7015 if { (eval echo configure:7016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7016   rm -rf conftest*
7017   ac_cv_func_fstat64=yes
7018 else
7019   echo "configure: failed program was:" >&5
7020   cat conftest.$ac_ext >&5
7021 fi
7022 rm -f conftest*
7023   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
7024   if test x$ac_cv_func_fstat64 = xyes ; then
7025     cat >> confdefs.h <<\EOF
7026 #define HAVE_FSTAT64 1
7027 EOF
7028
7029   fi
7030 fi
7031
7032 #####################################
7033 # we might need the resolv library on some systems
7034 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
7035 echo "configure:7036: checking for dn_expand in -lresolv" >&5
7036 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
7037 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7038   echo $ac_n "(cached) $ac_c" 1>&6
7039 else
7040   ac_save_LIBS="$LIBS"
7041 LIBS="-lresolv  $LIBS"
7042 cat > conftest.$ac_ext <<EOF
7043 #line 7044 "configure"
7044 #include "confdefs.h"
7045 /* Override any gcc2 internal prototype to avoid an error.  */
7046 /* We use char because int might match the return type of a gcc2
7047     builtin and then its argument prototype would still apply.  */
7048 char dn_expand();
7049
7050 int main() {
7051 dn_expand()
7052 ; return 0; }
7053 EOF
7054 if { (eval echo configure:7055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7055   rm -rf conftest*
7056   eval "ac_cv_lib_$ac_lib_var=yes"
7057 else
7058   echo "configure: failed program was:" >&5
7059   cat conftest.$ac_ext >&5
7060   rm -rf conftest*
7061   eval "ac_cv_lib_$ac_lib_var=no"
7062 fi
7063 rm -f conftest*
7064 LIBS="$ac_save_LIBS"
7065
7066 fi
7067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7068   echo "$ac_t""yes" 1>&6
7069     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7071   cat >> confdefs.h <<EOF
7072 #define $ac_tr_lib 1
7073 EOF
7074
7075   LIBS="-lresolv $LIBS"
7076
7077 else
7078   echo "$ac_t""no" 1>&6
7079 fi
7080
7081
7082 #
7083 # Check for the functions putprpwnam, set_auth_parameters,
7084 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7085 # Needed for OSF1 and HPUX.
7086 #
7087
7088 case "$LIBS" in
7089   *-lsecurity*) for ac_func in putprpwnam
7090 do
7091 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7092 echo "configure:7093: checking for $ac_func" >&5
7093 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7094   echo $ac_n "(cached) $ac_c" 1>&6
7095 else
7096   cat > conftest.$ac_ext <<EOF
7097 #line 7098 "configure"
7098 #include "confdefs.h"
7099 /* System header to define __stub macros and hopefully few prototypes,
7100     which can conflict with char $ac_func(); below.  */
7101 #include <assert.h>
7102 /* Override any gcc2 internal prototype to avoid an error.  */
7103 /* We use char because int might match the return type of a gcc2
7104     builtin and then its argument prototype would still apply.  */
7105 char $ac_func();
7106
7107 int main() {
7108
7109 /* The GNU C library defines this for functions which it implements
7110     to always fail with ENOSYS.  Some functions are actually named
7111     something starting with __ and the normal name is an alias.  */
7112 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7113 choke me
7114 #else
7115 $ac_func();
7116 #endif
7117
7118 ; return 0; }
7119 EOF
7120 if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7121   rm -rf conftest*
7122   eval "ac_cv_func_$ac_func=yes"
7123 else
7124   echo "configure: failed program was:" >&5
7125   cat conftest.$ac_ext >&5
7126   rm -rf conftest*
7127   eval "ac_cv_func_$ac_func=no"
7128 fi
7129 rm -f conftest*
7130 fi
7131
7132 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7133   echo "$ac_t""yes" 1>&6
7134     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7135   cat >> confdefs.h <<EOF
7136 #define $ac_tr_func 1
7137 EOF
7138  
7139 else
7140   echo "$ac_t""no" 1>&6
7141 fi
7142 done
7143  ;;
7144   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7145 echo "configure:7146: checking for putprpwnam in -lsecurity" >&5
7146 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7147 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7148   echo $ac_n "(cached) $ac_c" 1>&6
7149 else
7150   ac_save_LIBS="$LIBS"
7151 LIBS="-lsecurity  $LIBS"
7152 cat > conftest.$ac_ext <<EOF
7153 #line 7154 "configure"
7154 #include "confdefs.h"
7155 /* Override any gcc2 internal prototype to avoid an error.  */
7156 /* We use char because int might match the return type of a gcc2
7157     builtin and then its argument prototype would still apply.  */
7158 char putprpwnam();
7159
7160 int main() {
7161 putprpwnam()
7162 ; return 0; }
7163 EOF
7164 if { (eval echo configure:7165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7165   rm -rf conftest*
7166   eval "ac_cv_lib_$ac_lib_var=yes"
7167 else
7168   echo "configure: failed program was:" >&5
7169   cat conftest.$ac_ext >&5
7170   rm -rf conftest*
7171   eval "ac_cv_lib_$ac_lib_var=no"
7172 fi
7173 rm -f conftest*
7174 LIBS="$ac_save_LIBS"
7175
7176 fi
7177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7178   echo "$ac_t""yes" 1>&6
7179     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7180     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7181   cat >> confdefs.h <<EOF
7182 #define $ac_tr_lib 1
7183 EOF
7184
7185   LIBS="-lsecurity $LIBS"
7186
7187 else
7188   echo "$ac_t""no" 1>&6
7189 fi
7190  
7191      for ac_func in putprpwnam
7192 do
7193 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7194 echo "configure:7195: checking for $ac_func" >&5
7195 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7196   echo $ac_n "(cached) $ac_c" 1>&6
7197 else
7198   cat > conftest.$ac_ext <<EOF
7199 #line 7200 "configure"
7200 #include "confdefs.h"
7201 /* System header to define __stub macros and hopefully few prototypes,
7202     which can conflict with char $ac_func(); below.  */
7203 #include <assert.h>
7204 /* Override any gcc2 internal prototype to avoid an error.  */
7205 /* We use char because int might match the return type of a gcc2
7206     builtin and then its argument prototype would still apply.  */
7207 char $ac_func();
7208
7209 int main() {
7210
7211 /* The GNU C library defines this for functions which it implements
7212     to always fail with ENOSYS.  Some functions are actually named
7213     something starting with __ and the normal name is an alias.  */
7214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7215 choke me
7216 #else
7217 $ac_func();
7218 #endif
7219
7220 ; return 0; }
7221 EOF
7222 if { (eval echo configure:7223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7223   rm -rf conftest*
7224   eval "ac_cv_func_$ac_func=yes"
7225 else
7226   echo "configure: failed program was:" >&5
7227   cat conftest.$ac_ext >&5
7228   rm -rf conftest*
7229   eval "ac_cv_func_$ac_func=no"
7230 fi
7231 rm -f conftest*
7232 fi
7233
7234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7235   echo "$ac_t""yes" 1>&6
7236     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7237   cat >> confdefs.h <<EOF
7238 #define $ac_tr_func 1
7239 EOF
7240  
7241 else
7242   echo "$ac_t""no" 1>&6
7243 fi
7244 done
7245
7246   ;;
7247   esac
7248
7249 case "$LIBS" in
7250   *-lsec*) for ac_func in putprpwnam
7251 do
7252 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7253 echo "configure:7254: checking for $ac_func" >&5
7254 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7255   echo $ac_n "(cached) $ac_c" 1>&6
7256 else
7257   cat > conftest.$ac_ext <<EOF
7258 #line 7259 "configure"
7259 #include "confdefs.h"
7260 /* System header to define __stub macros and hopefully few prototypes,
7261     which can conflict with char $ac_func(); below.  */
7262 #include <assert.h>
7263 /* Override any gcc2 internal prototype to avoid an error.  */
7264 /* We use char because int might match the return type of a gcc2
7265     builtin and then its argument prototype would still apply.  */
7266 char $ac_func();
7267
7268 int main() {
7269
7270 /* The GNU C library defines this for functions which it implements
7271     to always fail with ENOSYS.  Some functions are actually named
7272     something starting with __ and the normal name is an alias.  */
7273 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7274 choke me
7275 #else
7276 $ac_func();
7277 #endif
7278
7279 ; return 0; }
7280 EOF
7281 if { (eval echo configure:7282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7282   rm -rf conftest*
7283   eval "ac_cv_func_$ac_func=yes"
7284 else
7285   echo "configure: failed program was:" >&5
7286   cat conftest.$ac_ext >&5
7287   rm -rf conftest*
7288   eval "ac_cv_func_$ac_func=no"
7289 fi
7290 rm -f conftest*
7291 fi
7292
7293 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7294   echo "$ac_t""yes" 1>&6
7295     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7296   cat >> confdefs.h <<EOF
7297 #define $ac_tr_func 1
7298 EOF
7299  
7300 else
7301   echo "$ac_t""no" 1>&6
7302 fi
7303 done
7304  ;;
7305   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7306 echo "configure:7307: checking for putprpwnam in -lsec" >&5
7307 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7308 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7309   echo $ac_n "(cached) $ac_c" 1>&6
7310 else
7311   ac_save_LIBS="$LIBS"
7312 LIBS="-lsec  $LIBS"
7313 cat > conftest.$ac_ext <<EOF
7314 #line 7315 "configure"
7315 #include "confdefs.h"
7316 /* Override any gcc2 internal prototype to avoid an error.  */
7317 /* We use char because int might match the return type of a gcc2
7318     builtin and then its argument prototype would still apply.  */
7319 char putprpwnam();
7320
7321 int main() {
7322 putprpwnam()
7323 ; return 0; }
7324 EOF
7325 if { (eval echo configure:7326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7326   rm -rf conftest*
7327   eval "ac_cv_lib_$ac_lib_var=yes"
7328 else
7329   echo "configure: failed program was:" >&5
7330   cat conftest.$ac_ext >&5
7331   rm -rf conftest*
7332   eval "ac_cv_lib_$ac_lib_var=no"
7333 fi
7334 rm -f conftest*
7335 LIBS="$ac_save_LIBS"
7336
7337 fi
7338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7339   echo "$ac_t""yes" 1>&6
7340     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7341     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7342   cat >> confdefs.h <<EOF
7343 #define $ac_tr_lib 1
7344 EOF
7345
7346   LIBS="-lsec $LIBS"
7347
7348 else
7349   echo "$ac_t""no" 1>&6
7350 fi
7351  
7352      for ac_func in putprpwnam
7353 do
7354 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7355 echo "configure:7356: checking for $ac_func" >&5
7356 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7357   echo $ac_n "(cached) $ac_c" 1>&6
7358 else
7359   cat > conftest.$ac_ext <<EOF
7360 #line 7361 "configure"
7361 #include "confdefs.h"
7362 /* System header to define __stub macros and hopefully few prototypes,
7363     which can conflict with char $ac_func(); below.  */
7364 #include <assert.h>
7365 /* Override any gcc2 internal prototype to avoid an error.  */
7366 /* We use char because int might match the return type of a gcc2
7367     builtin and then its argument prototype would still apply.  */
7368 char $ac_func();
7369
7370 int main() {
7371
7372 /* The GNU C library defines this for functions which it implements
7373     to always fail with ENOSYS.  Some functions are actually named
7374     something starting with __ and the normal name is an alias.  */
7375 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7376 choke me
7377 #else
7378 $ac_func();
7379 #endif
7380
7381 ; return 0; }
7382 EOF
7383 if { (eval echo configure:7384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7384   rm -rf conftest*
7385   eval "ac_cv_func_$ac_func=yes"
7386 else
7387   echo "configure: failed program was:" >&5
7388   cat conftest.$ac_ext >&5
7389   rm -rf conftest*
7390   eval "ac_cv_func_$ac_func=no"
7391 fi
7392 rm -f conftest*
7393 fi
7394
7395 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7396   echo "$ac_t""yes" 1>&6
7397     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7398   cat >> confdefs.h <<EOF
7399 #define $ac_tr_func 1
7400 EOF
7401  
7402 else
7403   echo "$ac_t""no" 1>&6
7404 fi
7405 done
7406
7407   ;;
7408   esac
7409
7410
7411 case "$LIBS" in
7412   *-lsecurity*) for ac_func in set_auth_parameters
7413 do
7414 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7415 echo "configure:7416: checking for $ac_func" >&5
7416 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7417   echo $ac_n "(cached) $ac_c" 1>&6
7418 else
7419   cat > conftest.$ac_ext <<EOF
7420 #line 7421 "configure"
7421 #include "confdefs.h"
7422 /* System header to define __stub macros and hopefully few prototypes,
7423     which can conflict with char $ac_func(); below.  */
7424 #include <assert.h>
7425 /* Override any gcc2 internal prototype to avoid an error.  */
7426 /* We use char because int might match the return type of a gcc2
7427     builtin and then its argument prototype would still apply.  */
7428 char $ac_func();
7429
7430 int main() {
7431
7432 /* The GNU C library defines this for functions which it implements
7433     to always fail with ENOSYS.  Some functions are actually named
7434     something starting with __ and the normal name is an alias.  */
7435 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7436 choke me
7437 #else
7438 $ac_func();
7439 #endif
7440
7441 ; return 0; }
7442 EOF
7443 if { (eval echo configure:7444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7444   rm -rf conftest*
7445   eval "ac_cv_func_$ac_func=yes"
7446 else
7447   echo "configure: failed program was:" >&5
7448   cat conftest.$ac_ext >&5
7449   rm -rf conftest*
7450   eval "ac_cv_func_$ac_func=no"
7451 fi
7452 rm -f conftest*
7453 fi
7454
7455 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7456   echo "$ac_t""yes" 1>&6
7457     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7458   cat >> confdefs.h <<EOF
7459 #define $ac_tr_func 1
7460 EOF
7461  
7462 else
7463   echo "$ac_t""no" 1>&6
7464 fi
7465 done
7466  ;;
7467   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7468 echo "configure:7469: checking for set_auth_parameters in -lsecurity" >&5
7469 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7470 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7471   echo $ac_n "(cached) $ac_c" 1>&6
7472 else
7473   ac_save_LIBS="$LIBS"
7474 LIBS="-lsecurity  $LIBS"
7475 cat > conftest.$ac_ext <<EOF
7476 #line 7477 "configure"
7477 #include "confdefs.h"
7478 /* Override any gcc2 internal prototype to avoid an error.  */
7479 /* We use char because int might match the return type of a gcc2
7480     builtin and then its argument prototype would still apply.  */
7481 char set_auth_parameters();
7482
7483 int main() {
7484 set_auth_parameters()
7485 ; return 0; }
7486 EOF
7487 if { (eval echo configure:7488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7488   rm -rf conftest*
7489   eval "ac_cv_lib_$ac_lib_var=yes"
7490 else
7491   echo "configure: failed program was:" >&5
7492   cat conftest.$ac_ext >&5
7493   rm -rf conftest*
7494   eval "ac_cv_lib_$ac_lib_var=no"
7495 fi
7496 rm -f conftest*
7497 LIBS="$ac_save_LIBS"
7498
7499 fi
7500 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7501   echo "$ac_t""yes" 1>&6
7502     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7503     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7504   cat >> confdefs.h <<EOF
7505 #define $ac_tr_lib 1
7506 EOF
7507
7508   LIBS="-lsecurity $LIBS"
7509
7510 else
7511   echo "$ac_t""no" 1>&6
7512 fi
7513  
7514      for ac_func in set_auth_parameters
7515 do
7516 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7517 echo "configure:7518: checking for $ac_func" >&5
7518 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7519   echo $ac_n "(cached) $ac_c" 1>&6
7520 else
7521   cat > conftest.$ac_ext <<EOF
7522 #line 7523 "configure"
7523 #include "confdefs.h"
7524 /* System header to define __stub macros and hopefully few prototypes,
7525     which can conflict with char $ac_func(); below.  */
7526 #include <assert.h>
7527 /* Override any gcc2 internal prototype to avoid an error.  */
7528 /* We use char because int might match the return type of a gcc2
7529     builtin and then its argument prototype would still apply.  */
7530 char $ac_func();
7531
7532 int main() {
7533
7534 /* The GNU C library defines this for functions which it implements
7535     to always fail with ENOSYS.  Some functions are actually named
7536     something starting with __ and the normal name is an alias.  */
7537 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7538 choke me
7539 #else
7540 $ac_func();
7541 #endif
7542
7543 ; return 0; }
7544 EOF
7545 if { (eval echo configure:7546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7546   rm -rf conftest*
7547   eval "ac_cv_func_$ac_func=yes"
7548 else
7549   echo "configure: failed program was:" >&5
7550   cat conftest.$ac_ext >&5
7551   rm -rf conftest*
7552   eval "ac_cv_func_$ac_func=no"
7553 fi
7554 rm -f conftest*
7555 fi
7556
7557 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7558   echo "$ac_t""yes" 1>&6
7559     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7560   cat >> confdefs.h <<EOF
7561 #define $ac_tr_func 1
7562 EOF
7563  
7564 else
7565   echo "$ac_t""no" 1>&6
7566 fi
7567 done
7568
7569   ;;
7570   esac
7571
7572 case "$LIBS" in
7573   *-lsec*) for ac_func in set_auth_parameters
7574 do
7575 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7576 echo "configure:7577: checking for $ac_func" >&5
7577 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7578   echo $ac_n "(cached) $ac_c" 1>&6
7579 else
7580   cat > conftest.$ac_ext <<EOF
7581 #line 7582 "configure"
7582 #include "confdefs.h"
7583 /* System header to define __stub macros and hopefully few prototypes,
7584     which can conflict with char $ac_func(); below.  */
7585 #include <assert.h>
7586 /* Override any gcc2 internal prototype to avoid an error.  */
7587 /* We use char because int might match the return type of a gcc2
7588     builtin and then its argument prototype would still apply.  */
7589 char $ac_func();
7590
7591 int main() {
7592
7593 /* The GNU C library defines this for functions which it implements
7594     to always fail with ENOSYS.  Some functions are actually named
7595     something starting with __ and the normal name is an alias.  */
7596 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7597 choke me
7598 #else
7599 $ac_func();
7600 #endif
7601
7602 ; return 0; }
7603 EOF
7604 if { (eval echo configure:7605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7605   rm -rf conftest*
7606   eval "ac_cv_func_$ac_func=yes"
7607 else
7608   echo "configure: failed program was:" >&5
7609   cat conftest.$ac_ext >&5
7610   rm -rf conftest*
7611   eval "ac_cv_func_$ac_func=no"
7612 fi
7613 rm -f conftest*
7614 fi
7615
7616 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7617   echo "$ac_t""yes" 1>&6
7618     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7619   cat >> confdefs.h <<EOF
7620 #define $ac_tr_func 1
7621 EOF
7622  
7623 else
7624   echo "$ac_t""no" 1>&6
7625 fi
7626 done
7627  ;;
7628   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7629 echo "configure:7630: checking for set_auth_parameters in -lsec" >&5
7630 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7631 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7632   echo $ac_n "(cached) $ac_c" 1>&6
7633 else
7634   ac_save_LIBS="$LIBS"
7635 LIBS="-lsec  $LIBS"
7636 cat > conftest.$ac_ext <<EOF
7637 #line 7638 "configure"
7638 #include "confdefs.h"
7639 /* Override any gcc2 internal prototype to avoid an error.  */
7640 /* We use char because int might match the return type of a gcc2
7641     builtin and then its argument prototype would still apply.  */
7642 char set_auth_parameters();
7643
7644 int main() {
7645 set_auth_parameters()
7646 ; return 0; }
7647 EOF
7648 if { (eval echo configure:7649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7649   rm -rf conftest*
7650   eval "ac_cv_lib_$ac_lib_var=yes"
7651 else
7652   echo "configure: failed program was:" >&5
7653   cat conftest.$ac_ext >&5
7654   rm -rf conftest*
7655   eval "ac_cv_lib_$ac_lib_var=no"
7656 fi
7657 rm -f conftest*
7658 LIBS="$ac_save_LIBS"
7659
7660 fi
7661 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7662   echo "$ac_t""yes" 1>&6
7663     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7664     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7665   cat >> confdefs.h <<EOF
7666 #define $ac_tr_lib 1
7667 EOF
7668
7669   LIBS="-lsec $LIBS"
7670
7671 else
7672   echo "$ac_t""no" 1>&6
7673 fi
7674  
7675      for ac_func in set_auth_parameters
7676 do
7677 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7678 echo "configure:7679: checking for $ac_func" >&5
7679 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7680   echo $ac_n "(cached) $ac_c" 1>&6
7681 else
7682   cat > conftest.$ac_ext <<EOF
7683 #line 7684 "configure"
7684 #include "confdefs.h"
7685 /* System header to define __stub macros and hopefully few prototypes,
7686     which can conflict with char $ac_func(); below.  */
7687 #include <assert.h>
7688 /* Override any gcc2 internal prototype to avoid an error.  */
7689 /* We use char because int might match the return type of a gcc2
7690     builtin and then its argument prototype would still apply.  */
7691 char $ac_func();
7692
7693 int main() {
7694
7695 /* The GNU C library defines this for functions which it implements
7696     to always fail with ENOSYS.  Some functions are actually named
7697     something starting with __ and the normal name is an alias.  */
7698 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7699 choke me
7700 #else
7701 $ac_func();
7702 #endif
7703
7704 ; return 0; }
7705 EOF
7706 if { (eval echo configure:7707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7707   rm -rf conftest*
7708   eval "ac_cv_func_$ac_func=yes"
7709 else
7710   echo "configure: failed program was:" >&5
7711   cat conftest.$ac_ext >&5
7712   rm -rf conftest*
7713   eval "ac_cv_func_$ac_func=no"
7714 fi
7715 rm -f conftest*
7716 fi
7717
7718 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7719   echo "$ac_t""yes" 1>&6
7720     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7721   cat >> confdefs.h <<EOF
7722 #define $ac_tr_func 1
7723 EOF
7724  
7725 else
7726   echo "$ac_t""no" 1>&6
7727 fi
7728 done
7729
7730   ;;
7731   esac
7732
7733
7734 # UnixWare 7.x has its getspnam in -lgen
7735 case "$LIBS" in
7736   *-lgen*) for ac_func in getspnam
7737 do
7738 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7739 echo "configure:7740: checking for $ac_func" >&5
7740 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7741   echo $ac_n "(cached) $ac_c" 1>&6
7742 else
7743   cat > conftest.$ac_ext <<EOF
7744 #line 7745 "configure"
7745 #include "confdefs.h"
7746 /* System header to define __stub macros and hopefully few prototypes,
7747     which can conflict with char $ac_func(); below.  */
7748 #include <assert.h>
7749 /* Override any gcc2 internal prototype to avoid an error.  */
7750 /* We use char because int might match the return type of a gcc2
7751     builtin and then its argument prototype would still apply.  */
7752 char $ac_func();
7753
7754 int main() {
7755
7756 /* The GNU C library defines this for functions which it implements
7757     to always fail with ENOSYS.  Some functions are actually named
7758     something starting with __ and the normal name is an alias.  */
7759 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7760 choke me
7761 #else
7762 $ac_func();
7763 #endif
7764
7765 ; return 0; }
7766 EOF
7767 if { (eval echo configure:7768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7768   rm -rf conftest*
7769   eval "ac_cv_func_$ac_func=yes"
7770 else
7771   echo "configure: failed program was:" >&5
7772   cat conftest.$ac_ext >&5
7773   rm -rf conftest*
7774   eval "ac_cv_func_$ac_func=no"
7775 fi
7776 rm -f conftest*
7777 fi
7778
7779 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7780   echo "$ac_t""yes" 1>&6
7781     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7782   cat >> confdefs.h <<EOF
7783 #define $ac_tr_func 1
7784 EOF
7785  
7786 else
7787   echo "$ac_t""no" 1>&6
7788 fi
7789 done
7790  ;;
7791   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7792 echo "configure:7793: checking for getspnam in -lgen" >&5
7793 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7794 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7795   echo $ac_n "(cached) $ac_c" 1>&6
7796 else
7797   ac_save_LIBS="$LIBS"
7798 LIBS="-lgen  $LIBS"
7799 cat > conftest.$ac_ext <<EOF
7800 #line 7801 "configure"
7801 #include "confdefs.h"
7802 /* Override any gcc2 internal prototype to avoid an error.  */
7803 /* We use char because int might match the return type of a gcc2
7804     builtin and then its argument prototype would still apply.  */
7805 char getspnam();
7806
7807 int main() {
7808 getspnam()
7809 ; return 0; }
7810 EOF
7811 if { (eval echo configure:7812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7812   rm -rf conftest*
7813   eval "ac_cv_lib_$ac_lib_var=yes"
7814 else
7815   echo "configure: failed program was:" >&5
7816   cat conftest.$ac_ext >&5
7817   rm -rf conftest*
7818   eval "ac_cv_lib_$ac_lib_var=no"
7819 fi
7820 rm -f conftest*
7821 LIBS="$ac_save_LIBS"
7822
7823 fi
7824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7825   echo "$ac_t""yes" 1>&6
7826     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7827     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7828   cat >> confdefs.h <<EOF
7829 #define $ac_tr_lib 1
7830 EOF
7831
7832   LIBS="-lgen $LIBS"
7833
7834 else
7835   echo "$ac_t""no" 1>&6
7836 fi
7837  
7838      for ac_func in getspnam
7839 do
7840 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7841 echo "configure:7842: checking for $ac_func" >&5
7842 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7843   echo $ac_n "(cached) $ac_c" 1>&6
7844 else
7845   cat > conftest.$ac_ext <<EOF
7846 #line 7847 "configure"
7847 #include "confdefs.h"
7848 /* System header to define __stub macros and hopefully few prototypes,
7849     which can conflict with char $ac_func(); below.  */
7850 #include <assert.h>
7851 /* Override any gcc2 internal prototype to avoid an error.  */
7852 /* We use char because int might match the return type of a gcc2
7853     builtin and then its argument prototype would still apply.  */
7854 char $ac_func();
7855
7856 int main() {
7857
7858 /* The GNU C library defines this for functions which it implements
7859     to always fail with ENOSYS.  Some functions are actually named
7860     something starting with __ and the normal name is an alias.  */
7861 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7862 choke me
7863 #else
7864 $ac_func();
7865 #endif
7866
7867 ; return 0; }
7868 EOF
7869 if { (eval echo configure:7870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7870   rm -rf conftest*
7871   eval "ac_cv_func_$ac_func=yes"
7872 else
7873   echo "configure: failed program was:" >&5
7874   cat conftest.$ac_ext >&5
7875   rm -rf conftest*
7876   eval "ac_cv_func_$ac_func=no"
7877 fi
7878 rm -f conftest*
7879 fi
7880
7881 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7882   echo "$ac_t""yes" 1>&6
7883     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7884   cat >> confdefs.h <<EOF
7885 #define $ac_tr_func 1
7886 EOF
7887  
7888 else
7889   echo "$ac_t""no" 1>&6
7890 fi
7891 done
7892
7893   ;;
7894   esac
7895
7896
7897 case "$LIBS" in
7898   *-lsecurity*) for ac_func in getspnam
7899 do
7900 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7901 echo "configure:7902: checking for $ac_func" >&5
7902 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7903   echo $ac_n "(cached) $ac_c" 1>&6
7904 else
7905   cat > conftest.$ac_ext <<EOF
7906 #line 7907 "configure"
7907 #include "confdefs.h"
7908 /* System header to define __stub macros and hopefully few prototypes,
7909     which can conflict with char $ac_func(); below.  */
7910 #include <assert.h>
7911 /* Override any gcc2 internal prototype to avoid an error.  */
7912 /* We use char because int might match the return type of a gcc2
7913     builtin and then its argument prototype would still apply.  */
7914 char $ac_func();
7915
7916 int main() {
7917
7918 /* The GNU C library defines this for functions which it implements
7919     to always fail with ENOSYS.  Some functions are actually named
7920     something starting with __ and the normal name is an alias.  */
7921 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7922 choke me
7923 #else
7924 $ac_func();
7925 #endif
7926
7927 ; return 0; }
7928 EOF
7929 if { (eval echo configure:7930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7930   rm -rf conftest*
7931   eval "ac_cv_func_$ac_func=yes"
7932 else
7933   echo "configure: failed program was:" >&5
7934   cat conftest.$ac_ext >&5
7935   rm -rf conftest*
7936   eval "ac_cv_func_$ac_func=no"
7937 fi
7938 rm -f conftest*
7939 fi
7940
7941 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7942   echo "$ac_t""yes" 1>&6
7943     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7944   cat >> confdefs.h <<EOF
7945 #define $ac_tr_func 1
7946 EOF
7947  
7948 else
7949   echo "$ac_t""no" 1>&6
7950 fi
7951 done
7952  ;;
7953   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7954 echo "configure:7955: checking for getspnam in -lsecurity" >&5
7955 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7956 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7957   echo $ac_n "(cached) $ac_c" 1>&6
7958 else
7959   ac_save_LIBS="$LIBS"
7960 LIBS="-lsecurity  $LIBS"
7961 cat > conftest.$ac_ext <<EOF
7962 #line 7963 "configure"
7963 #include "confdefs.h"
7964 /* Override any gcc2 internal prototype to avoid an error.  */
7965 /* We use char because int might match the return type of a gcc2
7966     builtin and then its argument prototype would still apply.  */
7967 char getspnam();
7968
7969 int main() {
7970 getspnam()
7971 ; return 0; }
7972 EOF
7973 if { (eval echo configure:7974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7974   rm -rf conftest*
7975   eval "ac_cv_lib_$ac_lib_var=yes"
7976 else
7977   echo "configure: failed program was:" >&5
7978   cat conftest.$ac_ext >&5
7979   rm -rf conftest*
7980   eval "ac_cv_lib_$ac_lib_var=no"
7981 fi
7982 rm -f conftest*
7983 LIBS="$ac_save_LIBS"
7984
7985 fi
7986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7987   echo "$ac_t""yes" 1>&6
7988     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7989     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7990   cat >> confdefs.h <<EOF
7991 #define $ac_tr_lib 1
7992 EOF
7993
7994   LIBS="-lsecurity $LIBS"
7995
7996 else
7997   echo "$ac_t""no" 1>&6
7998 fi
7999  
8000      for ac_func in getspnam
8001 do
8002 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8003 echo "configure:8004: checking for $ac_func" >&5
8004 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8005   echo $ac_n "(cached) $ac_c" 1>&6
8006 else
8007   cat > conftest.$ac_ext <<EOF
8008 #line 8009 "configure"
8009 #include "confdefs.h"
8010 /* System header to define __stub macros and hopefully few prototypes,
8011     which can conflict with char $ac_func(); below.  */
8012 #include <assert.h>
8013 /* Override any gcc2 internal prototype to avoid an error.  */
8014 /* We use char because int might match the return type of a gcc2
8015     builtin and then its argument prototype would still apply.  */
8016 char $ac_func();
8017
8018 int main() {
8019
8020 /* The GNU C library defines this for functions which it implements
8021     to always fail with ENOSYS.  Some functions are actually named
8022     something starting with __ and the normal name is an alias.  */
8023 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8024 choke me
8025 #else
8026 $ac_func();
8027 #endif
8028
8029 ; return 0; }
8030 EOF
8031 if { (eval echo configure:8032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8032   rm -rf conftest*
8033   eval "ac_cv_func_$ac_func=yes"
8034 else
8035   echo "configure: failed program was:" >&5
8036   cat conftest.$ac_ext >&5
8037   rm -rf conftest*
8038   eval "ac_cv_func_$ac_func=no"
8039 fi
8040 rm -f conftest*
8041 fi
8042
8043 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8044   echo "$ac_t""yes" 1>&6
8045     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8046   cat >> confdefs.h <<EOF
8047 #define $ac_tr_func 1
8048 EOF
8049  
8050 else
8051   echo "$ac_t""no" 1>&6
8052 fi
8053 done
8054
8055   ;;
8056   esac
8057
8058 case "$LIBS" in
8059   *-lsec*) for ac_func in getspnam
8060 do
8061 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8062 echo "configure:8063: checking for $ac_func" >&5
8063 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8064   echo $ac_n "(cached) $ac_c" 1>&6
8065 else
8066   cat > conftest.$ac_ext <<EOF
8067 #line 8068 "configure"
8068 #include "confdefs.h"
8069 /* System header to define __stub macros and hopefully few prototypes,
8070     which can conflict with char $ac_func(); below.  */
8071 #include <assert.h>
8072 /* Override any gcc2 internal prototype to avoid an error.  */
8073 /* We use char because int might match the return type of a gcc2
8074     builtin and then its argument prototype would still apply.  */
8075 char $ac_func();
8076
8077 int main() {
8078
8079 /* The GNU C library defines this for functions which it implements
8080     to always fail with ENOSYS.  Some functions are actually named
8081     something starting with __ and the normal name is an alias.  */
8082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8083 choke me
8084 #else
8085 $ac_func();
8086 #endif
8087
8088 ; return 0; }
8089 EOF
8090 if { (eval echo configure:8091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8091   rm -rf conftest*
8092   eval "ac_cv_func_$ac_func=yes"
8093 else
8094   echo "configure: failed program was:" >&5
8095   cat conftest.$ac_ext >&5
8096   rm -rf conftest*
8097   eval "ac_cv_func_$ac_func=no"
8098 fi
8099 rm -f conftest*
8100 fi
8101
8102 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8103   echo "$ac_t""yes" 1>&6
8104     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8105   cat >> confdefs.h <<EOF
8106 #define $ac_tr_func 1
8107 EOF
8108  
8109 else
8110   echo "$ac_t""no" 1>&6
8111 fi
8112 done
8113  ;;
8114   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8115 echo "configure:8116: checking for getspnam in -lsec" >&5
8116 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8117 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8118   echo $ac_n "(cached) $ac_c" 1>&6
8119 else
8120   ac_save_LIBS="$LIBS"
8121 LIBS="-lsec  $LIBS"
8122 cat > conftest.$ac_ext <<EOF
8123 #line 8124 "configure"
8124 #include "confdefs.h"
8125 /* Override any gcc2 internal prototype to avoid an error.  */
8126 /* We use char because int might match the return type of a gcc2
8127     builtin and then its argument prototype would still apply.  */
8128 char getspnam();
8129
8130 int main() {
8131 getspnam()
8132 ; return 0; }
8133 EOF
8134 if { (eval echo configure:8135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8135   rm -rf conftest*
8136   eval "ac_cv_lib_$ac_lib_var=yes"
8137 else
8138   echo "configure: failed program was:" >&5
8139   cat conftest.$ac_ext >&5
8140   rm -rf conftest*
8141   eval "ac_cv_lib_$ac_lib_var=no"
8142 fi
8143 rm -f conftest*
8144 LIBS="$ac_save_LIBS"
8145
8146 fi
8147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8148   echo "$ac_t""yes" 1>&6
8149     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8150     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8151   cat >> confdefs.h <<EOF
8152 #define $ac_tr_lib 1
8153 EOF
8154
8155   LIBS="-lsec $LIBS"
8156
8157 else
8158   echo "$ac_t""no" 1>&6
8159 fi
8160  
8161      for ac_func in getspnam
8162 do
8163 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8164 echo "configure:8165: checking for $ac_func" >&5
8165 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8166   echo $ac_n "(cached) $ac_c" 1>&6
8167 else
8168   cat > conftest.$ac_ext <<EOF
8169 #line 8170 "configure"
8170 #include "confdefs.h"
8171 /* System header to define __stub macros and hopefully few prototypes,
8172     which can conflict with char $ac_func(); below.  */
8173 #include <assert.h>
8174 /* Override any gcc2 internal prototype to avoid an error.  */
8175 /* We use char because int might match the return type of a gcc2
8176     builtin and then its argument prototype would still apply.  */
8177 char $ac_func();
8178
8179 int main() {
8180
8181 /* The GNU C library defines this for functions which it implements
8182     to always fail with ENOSYS.  Some functions are actually named
8183     something starting with __ and the normal name is an alias.  */
8184 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8185 choke me
8186 #else
8187 $ac_func();
8188 #endif
8189
8190 ; return 0; }
8191 EOF
8192 if { (eval echo configure:8193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8193   rm -rf conftest*
8194   eval "ac_cv_func_$ac_func=yes"
8195 else
8196   echo "configure: failed program was:" >&5
8197   cat conftest.$ac_ext >&5
8198   rm -rf conftest*
8199   eval "ac_cv_func_$ac_func=no"
8200 fi
8201 rm -f conftest*
8202 fi
8203
8204 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8205   echo "$ac_t""yes" 1>&6
8206     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8207   cat >> confdefs.h <<EOF
8208 #define $ac_tr_func 1
8209 EOF
8210  
8211 else
8212   echo "$ac_t""no" 1>&6
8213 fi
8214 done
8215
8216   ;;
8217   esac
8218
8219
8220 case "$LIBS" in
8221   *-lsecurity*) for ac_func in bigcrypt
8222 do
8223 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8224 echo "configure:8225: checking for $ac_func" >&5
8225 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8226   echo $ac_n "(cached) $ac_c" 1>&6
8227 else
8228   cat > conftest.$ac_ext <<EOF
8229 #line 8230 "configure"
8230 #include "confdefs.h"
8231 /* System header to define __stub macros and hopefully few prototypes,
8232     which can conflict with char $ac_func(); below.  */
8233 #include <assert.h>
8234 /* Override any gcc2 internal prototype to avoid an error.  */
8235 /* We use char because int might match the return type of a gcc2
8236     builtin and then its argument prototype would still apply.  */
8237 char $ac_func();
8238
8239 int main() {
8240
8241 /* The GNU C library defines this for functions which it implements
8242     to always fail with ENOSYS.  Some functions are actually named
8243     something starting with __ and the normal name is an alias.  */
8244 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8245 choke me
8246 #else
8247 $ac_func();
8248 #endif
8249
8250 ; return 0; }
8251 EOF
8252 if { (eval echo configure:8253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8253   rm -rf conftest*
8254   eval "ac_cv_func_$ac_func=yes"
8255 else
8256   echo "configure: failed program was:" >&5
8257   cat conftest.$ac_ext >&5
8258   rm -rf conftest*
8259   eval "ac_cv_func_$ac_func=no"
8260 fi
8261 rm -f conftest*
8262 fi
8263
8264 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8265   echo "$ac_t""yes" 1>&6
8266     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8267   cat >> confdefs.h <<EOF
8268 #define $ac_tr_func 1
8269 EOF
8270  
8271 else
8272   echo "$ac_t""no" 1>&6
8273 fi
8274 done
8275  ;;
8276   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8277 echo "configure:8278: checking for bigcrypt in -lsecurity" >&5
8278 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8279 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8280   echo $ac_n "(cached) $ac_c" 1>&6
8281 else
8282   ac_save_LIBS="$LIBS"
8283 LIBS="-lsecurity  $LIBS"
8284 cat > conftest.$ac_ext <<EOF
8285 #line 8286 "configure"
8286 #include "confdefs.h"
8287 /* Override any gcc2 internal prototype to avoid an error.  */
8288 /* We use char because int might match the return type of a gcc2
8289     builtin and then its argument prototype would still apply.  */
8290 char bigcrypt();
8291
8292 int main() {
8293 bigcrypt()
8294 ; return 0; }
8295 EOF
8296 if { (eval echo configure:8297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8297   rm -rf conftest*
8298   eval "ac_cv_lib_$ac_lib_var=yes"
8299 else
8300   echo "configure: failed program was:" >&5
8301   cat conftest.$ac_ext >&5
8302   rm -rf conftest*
8303   eval "ac_cv_lib_$ac_lib_var=no"
8304 fi
8305 rm -f conftest*
8306 LIBS="$ac_save_LIBS"
8307
8308 fi
8309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8310   echo "$ac_t""yes" 1>&6
8311     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8312     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8313   cat >> confdefs.h <<EOF
8314 #define $ac_tr_lib 1
8315 EOF
8316
8317   LIBS="-lsecurity $LIBS"
8318
8319 else
8320   echo "$ac_t""no" 1>&6
8321 fi
8322  
8323      for ac_func in bigcrypt
8324 do
8325 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8326 echo "configure:8327: checking for $ac_func" >&5
8327 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8328   echo $ac_n "(cached) $ac_c" 1>&6
8329 else
8330   cat > conftest.$ac_ext <<EOF
8331 #line 8332 "configure"
8332 #include "confdefs.h"
8333 /* System header to define __stub macros and hopefully few prototypes,
8334     which can conflict with char $ac_func(); below.  */
8335 #include <assert.h>
8336 /* Override any gcc2 internal prototype to avoid an error.  */
8337 /* We use char because int might match the return type of a gcc2
8338     builtin and then its argument prototype would still apply.  */
8339 char $ac_func();
8340
8341 int main() {
8342
8343 /* The GNU C library defines this for functions which it implements
8344     to always fail with ENOSYS.  Some functions are actually named
8345     something starting with __ and the normal name is an alias.  */
8346 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8347 choke me
8348 #else
8349 $ac_func();
8350 #endif
8351
8352 ; return 0; }
8353 EOF
8354 if { (eval echo configure:8355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8355   rm -rf conftest*
8356   eval "ac_cv_func_$ac_func=yes"
8357 else
8358   echo "configure: failed program was:" >&5
8359   cat conftest.$ac_ext >&5
8360   rm -rf conftest*
8361   eval "ac_cv_func_$ac_func=no"
8362 fi
8363 rm -f conftest*
8364 fi
8365
8366 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8367   echo "$ac_t""yes" 1>&6
8368     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8369   cat >> confdefs.h <<EOF
8370 #define $ac_tr_func 1
8371 EOF
8372  
8373 else
8374   echo "$ac_t""no" 1>&6
8375 fi
8376 done
8377
8378   ;;
8379   esac
8380
8381 case "$LIBS" in
8382   *-lsec*) for ac_func in bigcrypt
8383 do
8384 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8385 echo "configure:8386: checking for $ac_func" >&5
8386 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8387   echo $ac_n "(cached) $ac_c" 1>&6
8388 else
8389   cat > conftest.$ac_ext <<EOF
8390 #line 8391 "configure"
8391 #include "confdefs.h"
8392 /* System header to define __stub macros and hopefully few prototypes,
8393     which can conflict with char $ac_func(); below.  */
8394 #include <assert.h>
8395 /* Override any gcc2 internal prototype to avoid an error.  */
8396 /* We use char because int might match the return type of a gcc2
8397     builtin and then its argument prototype would still apply.  */
8398 char $ac_func();
8399
8400 int main() {
8401
8402 /* The GNU C library defines this for functions which it implements
8403     to always fail with ENOSYS.  Some functions are actually named
8404     something starting with __ and the normal name is an alias.  */
8405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8406 choke me
8407 #else
8408 $ac_func();
8409 #endif
8410
8411 ; return 0; }
8412 EOF
8413 if { (eval echo configure:8414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8414   rm -rf conftest*
8415   eval "ac_cv_func_$ac_func=yes"
8416 else
8417   echo "configure: failed program was:" >&5
8418   cat conftest.$ac_ext >&5
8419   rm -rf conftest*
8420   eval "ac_cv_func_$ac_func=no"
8421 fi
8422 rm -f conftest*
8423 fi
8424
8425 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8426   echo "$ac_t""yes" 1>&6
8427     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8428   cat >> confdefs.h <<EOF
8429 #define $ac_tr_func 1
8430 EOF
8431  
8432 else
8433   echo "$ac_t""no" 1>&6
8434 fi
8435 done
8436  ;;
8437   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8438 echo "configure:8439: checking for bigcrypt in -lsec" >&5
8439 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8440 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8441   echo $ac_n "(cached) $ac_c" 1>&6
8442 else
8443   ac_save_LIBS="$LIBS"
8444 LIBS="-lsec  $LIBS"
8445 cat > conftest.$ac_ext <<EOF
8446 #line 8447 "configure"
8447 #include "confdefs.h"
8448 /* Override any gcc2 internal prototype to avoid an error.  */
8449 /* We use char because int might match the return type of a gcc2
8450     builtin and then its argument prototype would still apply.  */
8451 char bigcrypt();
8452
8453 int main() {
8454 bigcrypt()
8455 ; return 0; }
8456 EOF
8457 if { (eval echo configure:8458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8458   rm -rf conftest*
8459   eval "ac_cv_lib_$ac_lib_var=yes"
8460 else
8461   echo "configure: failed program was:" >&5
8462   cat conftest.$ac_ext >&5
8463   rm -rf conftest*
8464   eval "ac_cv_lib_$ac_lib_var=no"
8465 fi
8466 rm -f conftest*
8467 LIBS="$ac_save_LIBS"
8468
8469 fi
8470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8471   echo "$ac_t""yes" 1>&6
8472     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8473     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8474   cat >> confdefs.h <<EOF
8475 #define $ac_tr_lib 1
8476 EOF
8477
8478   LIBS="-lsec $LIBS"
8479
8480 else
8481   echo "$ac_t""no" 1>&6
8482 fi
8483  
8484      for ac_func in bigcrypt
8485 do
8486 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8487 echo "configure:8488: checking for $ac_func" >&5
8488 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8489   echo $ac_n "(cached) $ac_c" 1>&6
8490 else
8491   cat > conftest.$ac_ext <<EOF
8492 #line 8493 "configure"
8493 #include "confdefs.h"
8494 /* System header to define __stub macros and hopefully few prototypes,
8495     which can conflict with char $ac_func(); below.  */
8496 #include <assert.h>
8497 /* Override any gcc2 internal prototype to avoid an error.  */
8498 /* We use char because int might match the return type of a gcc2
8499     builtin and then its argument prototype would still apply.  */
8500 char $ac_func();
8501
8502 int main() {
8503
8504 /* The GNU C library defines this for functions which it implements
8505     to always fail with ENOSYS.  Some functions are actually named
8506     something starting with __ and the normal name is an alias.  */
8507 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8508 choke me
8509 #else
8510 $ac_func();
8511 #endif
8512
8513 ; return 0; }
8514 EOF
8515 if { (eval echo configure:8516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8516   rm -rf conftest*
8517   eval "ac_cv_func_$ac_func=yes"
8518 else
8519   echo "configure: failed program was:" >&5
8520   cat conftest.$ac_ext >&5
8521   rm -rf conftest*
8522   eval "ac_cv_func_$ac_func=no"
8523 fi
8524 rm -f conftest*
8525 fi
8526
8527 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8528   echo "$ac_t""yes" 1>&6
8529     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8530   cat >> confdefs.h <<EOF
8531 #define $ac_tr_func 1
8532 EOF
8533  
8534 else
8535   echo "$ac_t""no" 1>&6
8536 fi
8537 done
8538
8539   ;;
8540   esac
8541
8542
8543 case "$LIBS" in
8544   *-lsecurity*) for ac_func in getprpwnam
8545 do
8546 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8547 echo "configure:8548: checking for $ac_func" >&5
8548 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8549   echo $ac_n "(cached) $ac_c" 1>&6
8550 else
8551   cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 /* System header to define __stub macros and hopefully few prototypes,
8555     which can conflict with char $ac_func(); below.  */
8556 #include <assert.h>
8557 /* Override any gcc2 internal prototype to avoid an error.  */
8558 /* We use char because int might match the return type of a gcc2
8559     builtin and then its argument prototype would still apply.  */
8560 char $ac_func();
8561
8562 int main() {
8563
8564 /* The GNU C library defines this for functions which it implements
8565     to always fail with ENOSYS.  Some functions are actually named
8566     something starting with __ and the normal name is an alias.  */
8567 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8568 choke me
8569 #else
8570 $ac_func();
8571 #endif
8572
8573 ; return 0; }
8574 EOF
8575 if { (eval echo configure:8576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8576   rm -rf conftest*
8577   eval "ac_cv_func_$ac_func=yes"
8578 else
8579   echo "configure: failed program was:" >&5
8580   cat conftest.$ac_ext >&5
8581   rm -rf conftest*
8582   eval "ac_cv_func_$ac_func=no"
8583 fi
8584 rm -f conftest*
8585 fi
8586
8587 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8588   echo "$ac_t""yes" 1>&6
8589     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8590   cat >> confdefs.h <<EOF
8591 #define $ac_tr_func 1
8592 EOF
8593  
8594 else
8595   echo "$ac_t""no" 1>&6
8596 fi
8597 done
8598  ;;
8599   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8600 echo "configure:8601: checking for getprpwnam in -lsecurity" >&5
8601 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8603   echo $ac_n "(cached) $ac_c" 1>&6
8604 else
8605   ac_save_LIBS="$LIBS"
8606 LIBS="-lsecurity  $LIBS"
8607 cat > conftest.$ac_ext <<EOF
8608 #line 8609 "configure"
8609 #include "confdefs.h"
8610 /* Override any gcc2 internal prototype to avoid an error.  */
8611 /* We use char because int might match the return type of a gcc2
8612     builtin and then its argument prototype would still apply.  */
8613 char getprpwnam();
8614
8615 int main() {
8616 getprpwnam()
8617 ; return 0; }
8618 EOF
8619 if { (eval echo configure:8620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8620   rm -rf conftest*
8621   eval "ac_cv_lib_$ac_lib_var=yes"
8622 else
8623   echo "configure: failed program was:" >&5
8624   cat conftest.$ac_ext >&5
8625   rm -rf conftest*
8626   eval "ac_cv_lib_$ac_lib_var=no"
8627 fi
8628 rm -f conftest*
8629 LIBS="$ac_save_LIBS"
8630
8631 fi
8632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8633   echo "$ac_t""yes" 1>&6
8634     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8635     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8636   cat >> confdefs.h <<EOF
8637 #define $ac_tr_lib 1
8638 EOF
8639
8640   LIBS="-lsecurity $LIBS"
8641
8642 else
8643   echo "$ac_t""no" 1>&6
8644 fi
8645  
8646      for ac_func in getprpwnam
8647 do
8648 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8649 echo "configure:8650: checking for $ac_func" >&5
8650 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8651   echo $ac_n "(cached) $ac_c" 1>&6
8652 else
8653   cat > conftest.$ac_ext <<EOF
8654 #line 8655 "configure"
8655 #include "confdefs.h"
8656 /* System header to define __stub macros and hopefully few prototypes,
8657     which can conflict with char $ac_func(); below.  */
8658 #include <assert.h>
8659 /* Override any gcc2 internal prototype to avoid an error.  */
8660 /* We use char because int might match the return type of a gcc2
8661     builtin and then its argument prototype would still apply.  */
8662 char $ac_func();
8663
8664 int main() {
8665
8666 /* The GNU C library defines this for functions which it implements
8667     to always fail with ENOSYS.  Some functions are actually named
8668     something starting with __ and the normal name is an alias.  */
8669 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8670 choke me
8671 #else
8672 $ac_func();
8673 #endif
8674
8675 ; return 0; }
8676 EOF
8677 if { (eval echo configure:8678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8678   rm -rf conftest*
8679   eval "ac_cv_func_$ac_func=yes"
8680 else
8681   echo "configure: failed program was:" >&5
8682   cat conftest.$ac_ext >&5
8683   rm -rf conftest*
8684   eval "ac_cv_func_$ac_func=no"
8685 fi
8686 rm -f conftest*
8687 fi
8688
8689 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8690   echo "$ac_t""yes" 1>&6
8691     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8692   cat >> confdefs.h <<EOF
8693 #define $ac_tr_func 1
8694 EOF
8695  
8696 else
8697   echo "$ac_t""no" 1>&6
8698 fi
8699 done
8700
8701   ;;
8702   esac
8703
8704 case "$LIBS" in
8705   *-lsec*) for ac_func in getprpwnam
8706 do
8707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8708 echo "configure:8709: checking for $ac_func" >&5
8709 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8710   echo $ac_n "(cached) $ac_c" 1>&6
8711 else
8712   cat > conftest.$ac_ext <<EOF
8713 #line 8714 "configure"
8714 #include "confdefs.h"
8715 /* System header to define __stub macros and hopefully few prototypes,
8716     which can conflict with char $ac_func(); below.  */
8717 #include <assert.h>
8718 /* Override any gcc2 internal prototype to avoid an error.  */
8719 /* We use char because int might match the return type of a gcc2
8720     builtin and then its argument prototype would still apply.  */
8721 char $ac_func();
8722
8723 int main() {
8724
8725 /* The GNU C library defines this for functions which it implements
8726     to always fail with ENOSYS.  Some functions are actually named
8727     something starting with __ and the normal name is an alias.  */
8728 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8729 choke me
8730 #else
8731 $ac_func();
8732 #endif
8733
8734 ; return 0; }
8735 EOF
8736 if { (eval echo configure:8737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8737   rm -rf conftest*
8738   eval "ac_cv_func_$ac_func=yes"
8739 else
8740   echo "configure: failed program was:" >&5
8741   cat conftest.$ac_ext >&5
8742   rm -rf conftest*
8743   eval "ac_cv_func_$ac_func=no"
8744 fi
8745 rm -f conftest*
8746 fi
8747
8748 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8749   echo "$ac_t""yes" 1>&6
8750     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8751   cat >> confdefs.h <<EOF
8752 #define $ac_tr_func 1
8753 EOF
8754  
8755 else
8756   echo "$ac_t""no" 1>&6
8757 fi
8758 done
8759  ;;
8760   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8761 echo "configure:8762: checking for getprpwnam in -lsec" >&5
8762 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8763 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8764   echo $ac_n "(cached) $ac_c" 1>&6
8765 else
8766   ac_save_LIBS="$LIBS"
8767 LIBS="-lsec  $LIBS"
8768 cat > conftest.$ac_ext <<EOF
8769 #line 8770 "configure"
8770 #include "confdefs.h"
8771 /* Override any gcc2 internal prototype to avoid an error.  */
8772 /* We use char because int might match the return type of a gcc2
8773     builtin and then its argument prototype would still apply.  */
8774 char getprpwnam();
8775
8776 int main() {
8777 getprpwnam()
8778 ; return 0; }
8779 EOF
8780 if { (eval echo configure:8781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8781   rm -rf conftest*
8782   eval "ac_cv_lib_$ac_lib_var=yes"
8783 else
8784   echo "configure: failed program was:" >&5
8785   cat conftest.$ac_ext >&5
8786   rm -rf conftest*
8787   eval "ac_cv_lib_$ac_lib_var=no"
8788 fi
8789 rm -f conftest*
8790 LIBS="$ac_save_LIBS"
8791
8792 fi
8793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8794   echo "$ac_t""yes" 1>&6
8795     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8796     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8797   cat >> confdefs.h <<EOF
8798 #define $ac_tr_lib 1
8799 EOF
8800
8801   LIBS="-lsec $LIBS"
8802
8803 else
8804   echo "$ac_t""no" 1>&6
8805 fi
8806  
8807      for ac_func in getprpwnam
8808 do
8809 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8810 echo "configure:8811: checking for $ac_func" >&5
8811 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8812   echo $ac_n "(cached) $ac_c" 1>&6
8813 else
8814   cat > conftest.$ac_ext <<EOF
8815 #line 8816 "configure"
8816 #include "confdefs.h"
8817 /* System header to define __stub macros and hopefully few prototypes,
8818     which can conflict with char $ac_func(); below.  */
8819 #include <assert.h>
8820 /* Override any gcc2 internal prototype to avoid an error.  */
8821 /* We use char because int might match the return type of a gcc2
8822     builtin and then its argument prototype would still apply.  */
8823 char $ac_func();
8824
8825 int main() {
8826
8827 /* The GNU C library defines this for functions which it implements
8828     to always fail with ENOSYS.  Some functions are actually named
8829     something starting with __ and the normal name is an alias.  */
8830 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8831 choke me
8832 #else
8833 $ac_func();
8834 #endif
8835
8836 ; return 0; }
8837 EOF
8838 if { (eval echo configure:8839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8839   rm -rf conftest*
8840   eval "ac_cv_func_$ac_func=yes"
8841 else
8842   echo "configure: failed program was:" >&5
8843   cat conftest.$ac_ext >&5
8844   rm -rf conftest*
8845   eval "ac_cv_func_$ac_func=no"
8846 fi
8847 rm -f conftest*
8848 fi
8849
8850 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8851   echo "$ac_t""yes" 1>&6
8852     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8853   cat >> confdefs.h <<EOF
8854 #define $ac_tr_func 1
8855 EOF
8856  
8857 else
8858   echo "$ac_t""no" 1>&6
8859 fi
8860 done
8861
8862   ;;
8863   esac
8864
8865
8866 # this bit needs to be modified for each OS that is suported by
8867 # smbwrapper. You need to specify how to created a shared library and
8868 # how to compile C code to produce PIC object files
8869
8870 # these are the defaults, good for lots of systems
8871 HOST_OS="$host_os"
8872 LDSHFLAGS="-shared"
8873 SHLD="\${CC}"
8874 PICFLAG=""
8875 PICSUFFIX="po"
8876 POBAD_CC="#"
8877 SHLIBEXT="so"
8878 # Assume non-shared by default and override below
8879 BLDSHARED="false"
8880 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8881 echo "configure:8882: checking ability to build shared libraries" >&5
8882
8883 # and these are for particular systems
8884 case "$host_os" in
8885                 *linux*)   cat >> confdefs.h <<\EOF
8886 #define LINUX 1
8887 EOF
8888
8889                         BLDSHARED="true"
8890                         LDSHFLAGS="-shared" 
8891                         DYNEXP="-Wl,--export-dynamic"
8892                         PICFLAG="-fPIC"
8893                         cat >> confdefs.h <<\EOF
8894 #define STAT_ST_BLOCKSIZE 512
8895 EOF
8896
8897                 ;;
8898                 *solaris*) 
8899                         cat >> confdefs.h <<\EOF
8900 #define SUNOS5 1
8901 EOF
8902
8903                         BLDSHARED="true"
8904                         LDSHFLAGS="-h \$@ -G"
8905                         if test "${GCC}" = "yes"; then
8906                                 PICFLAG="-fPIC"
8907                         else
8908                                 PICFLAG="-KPIC"
8909                                 POBAD_CC=""
8910                                 PICSUFFIX="po.o"
8911                         fi
8912                         cat >> confdefs.h <<\EOF
8913 #define STAT_ST_BLOCKSIZE 512
8914 EOF
8915
8916                 ;;
8917                 *sunos*) cat >> confdefs.h <<\EOF
8918 #define SUNOS4 1
8919 EOF
8920
8921                         BLDSHARED="true"
8922                         LDSHFLAGS="-Wl,-h,\$@ -G"
8923                         PICFLAG="-KPIC"   # Is this correct for SunOS
8924                 ;;
8925                 *bsd*)  BLDSHARED="true"
8926                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8927                         DYNEXP="-Wl,-Bdynamic"
8928                         PICFLAG="-fPIC"
8929                         cat >> confdefs.h <<\EOF
8930 #define STAT_ST_BLOCKSIZE 512
8931 EOF
8932
8933                 ;;
8934                 *irix*) cat >> confdefs.h <<\EOF
8935 #define IRIX 1
8936 EOF
8937
8938                         case "$host_os" in
8939                         *irix6*) cat >> confdefs.h <<\EOF
8940 #define IRIX6 1
8941 EOF
8942
8943                         ;;
8944                         esac
8945                         ATTEMPT_WRAP32_BUILD=yes
8946                         BLDSHARED="true"
8947                         LDSHFLAGS="-soname \$@ -shared"
8948                         SHLD="\${LD}"
8949                         if test "${GCC}" = "yes"; then
8950                                 PICFLAG="-fPIC"
8951                         else 
8952                                 PICFLAG="-KPIC"
8953                         fi
8954                         cat >> confdefs.h <<\EOF
8955 #define STAT_ST_BLOCKSIZE 512
8956 EOF
8957
8958                 ;;
8959                 *aix*) cat >> confdefs.h <<\EOF
8960 #define AIX 1
8961 EOF
8962
8963                         BLDSHARED="true"
8964                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8965                         PICFLAG="-O2 -qmaxmem=6000"
8966                         cat >> confdefs.h <<\EOF
8967 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8968 EOF
8969
8970                 ;;
8971                 *hpux*) cat >> confdefs.h <<\EOF
8972 #define HPUX 1
8973 EOF
8974
8975                         SHLIBEXT="sl"
8976                         # Use special PIC flags for the native HP-UX compiler.
8977                         if test $ac_cv_prog_cc_Ae = yes; then
8978                                 SHLD="/usr/bin/ld"
8979                                 BLDSHARED="true"
8980                                 LDSHFLAGS="-B symbolic -b -z +h \$@"
8981                                 PICFLAG="+z"
8982                         fi
8983                         DYNEXP="-Wl,-E"
8984                         cat >> confdefs.h <<\EOF
8985 #define STAT_ST_BLOCKSIZE 8192
8986 EOF
8987
8988                 ;;
8989                 *qnx*) cat >> confdefs.h <<\EOF
8990 #define QNX 1
8991 EOF
8992 ;;
8993                 *osf*) cat >> confdefs.h <<\EOF
8994 #define OSF1 1
8995 EOF
8996
8997                         BLDSHARED="true"
8998                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8999                         PICFLAG="-fPIC"
9000                 ;;
9001                 *sco*) 
9002                         cat >> confdefs.h <<\EOF
9003 #define SCO 1
9004 EOF
9005
9006                 ;;
9007                 *unixware*) cat >> confdefs.h <<\EOF
9008 #define UNIXWARE 1
9009 EOF
9010
9011                         BLDSHARED="true"
9012                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
9013                         PICFLAG="-KPIC"
9014                 ;;
9015                 *next2*) cat >> confdefs.h <<\EOF
9016 #define NEXT2 1
9017 EOF
9018 ;;
9019                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
9020 set dummy groff; ac_word=$2
9021 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9022 echo "configure:9023: checking for $ac_word" >&5
9023 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
9024   echo $ac_n "(cached) $ac_c" 1>&6
9025 else
9026   if test -n "$ROFF"; then
9027   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
9028 else
9029   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
9030   ac_dummy="$PATH"
9031   for ac_dir in $ac_dummy; do
9032     test -z "$ac_dir" && ac_dir=.
9033     if test -f $ac_dir/$ac_word; then
9034       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9035       break
9036     fi
9037   done
9038   IFS="$ac_save_ifs"
9039 fi
9040 fi
9041 ROFF="$ac_cv_prog_ROFF"
9042 if test -n "$ROFF"; then
9043   echo "$ac_t""$ROFF" 1>&6
9044 else
9045   echo "$ac_t""no" 1>&6
9046 fi
9047 ;;
9048                 *sysv4*)
9049                         case "$host" in
9050                                 *-univel-*)
9051                                         if  test "$GCC" != yes ; then
9052                                                 cat >> confdefs.h <<\EOF
9053 #define HAVE_MEMSET 1
9054 EOF
9055
9056                                         fi
9057                                         LDSHFLAGS="-G"
9058                                         DYNEXP="-Bexport"
9059                                 ;;
9060                                 *mips-sni-sysv4*)
9061                                         cat >> confdefs.h <<\EOF
9062 #define RELIANTUNIX 1
9063 EOF
9064
9065                                 ;;
9066                         esac
9067                 ;;
9068
9069                 *sysv5*)
9070                         if  test "$GCC" != yes ; then
9071                                 cat >> confdefs.h <<\EOF
9072 #define HAVE_MEMSET 1
9073 EOF
9074
9075                         fi
9076                         LDSHFLAGS="-G"
9077                 ;;
9078 esac
9079
9080 echo "$ac_t""$BLDSHARED" 1>&6
9081 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9082 echo "configure:9083: checking linker flags for shared libraries" >&5
9083 echo "$ac_t""$LDSHFLAGS" 1>&6
9084 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9085 echo "configure:9086: checking compiler flags for position-independent code" >&5
9086 echo "$ac_t""$PICFLAGS" 1>&6
9087
9088 #######################################################
9089 # test whether building a shared library actually works
9090 if test $BLDSHARED = true; then
9091 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9092 echo "configure:9093: checking whether building shared libraries actually works" >&5
9093 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9094   echo $ac_n "(cached) $ac_c" 1>&6
9095 else
9096   
9097    ac_cv_shlib_works=no
9098    # try building a trivial shared library
9099    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9100      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
9101      ac_cv_shlib_works=yes
9102    rm -f shlib.so shlib.po
9103
9104 fi
9105
9106 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9107 if test $ac_cv_shlib_works = no; then
9108    BLDSHARED=false
9109 fi
9110 fi
9111
9112
9113 # this updates our target list if we can build shared libs
9114 if test $BLDSHARED = true; then
9115    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9116 else
9117    LIBSMBCLIENT_SHARED=
9118 fi
9119
9120 ################
9121
9122 echo $ac_n "checking for long long""... $ac_c" 1>&6
9123 echo "configure:9124: checking for long long" >&5
9124 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9125   echo $ac_n "(cached) $ac_c" 1>&6
9126 else
9127   
9128 if test "$cross_compiling" = yes; then
9129   samba_cv_have_longlong=cross
9130 else
9131   cat > conftest.$ac_ext <<EOF
9132 #line 9133 "configure"
9133 #include "confdefs.h"
9134 #include <stdio.h>
9135 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9136 EOF
9137 if { (eval echo configure:9138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9138 then
9139   samba_cv_have_longlong=yes
9140 else
9141   echo "configure: failed program was:" >&5
9142   cat conftest.$ac_ext >&5
9143   rm -fr conftest*
9144   samba_cv_have_longlong=no
9145 fi
9146 rm -fr conftest*
9147 fi
9148
9149 fi
9150
9151 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9152 if test x"$samba_cv_have_longlong" = x"yes"; then
9153     cat >> confdefs.h <<\EOF
9154 #define HAVE_LONGLONG 1
9155 EOF
9156
9157 fi
9158
9159 #
9160 # Check if the compiler supports the LL prefix on long long integers.
9161 # AIX needs this.
9162
9163 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9164 echo "configure:9165: checking for LL suffix on long long integers" >&5
9165 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9166   echo $ac_n "(cached) $ac_c" 1>&6
9167 else
9168   
9169     cat > conftest.$ac_ext <<EOF
9170 #line 9171 "configure"
9171 #include "confdefs.h"
9172 #include <stdio.h>
9173 int main() {
9174 long long i = 0x8000000000LL
9175 ; return 0; }
9176 EOF
9177 if { (eval echo configure:9178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9178   rm -rf conftest*
9179   samba_cv_compiler_supports_ll=yes
9180 else
9181   echo "configure: failed program was:" >&5
9182   cat conftest.$ac_ext >&5
9183   rm -rf conftest*
9184   samba_cv_compiler_supports_ll=no
9185 fi
9186 rm -f conftest*
9187 fi
9188
9189 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9190 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9191    cat >> confdefs.h <<\EOF
9192 #define COMPILER_SUPPORTS_LL 1
9193 EOF
9194
9195 fi
9196
9197   
9198 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9199 echo "configure:9200: checking for 64 bit off_t" >&5
9200 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9201   echo $ac_n "(cached) $ac_c" 1>&6
9202 else
9203   
9204 if test "$cross_compiling" = yes; then
9205   samba_cv_SIZEOF_OFF_T=cross
9206 else
9207   cat > conftest.$ac_ext <<EOF
9208 #line 9209 "configure"
9209 #include "confdefs.h"
9210 #include <stdio.h>
9211 #include <sys/stat.h>
9212 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9213 EOF
9214 if { (eval echo configure:9215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9215 then
9216   samba_cv_SIZEOF_OFF_T=yes
9217 else
9218   echo "configure: failed program was:" >&5
9219   cat conftest.$ac_ext >&5
9220   rm -fr conftest*
9221   samba_cv_SIZEOF_OFF_T=no
9222 fi
9223 rm -fr conftest*
9224 fi
9225
9226 fi
9227
9228 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9229 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9230     cat >> confdefs.h <<\EOF
9231 #define SIZEOF_OFF_T 8
9232 EOF
9233
9234 fi
9235
9236 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9237 echo "configure:9238: checking for off64_t" >&5
9238 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9239   echo $ac_n "(cached) $ac_c" 1>&6
9240 else
9241   
9242 if test "$cross_compiling" = yes; then
9243   samba_cv_HAVE_OFF64_T=cross
9244 else
9245   cat > conftest.$ac_ext <<EOF
9246 #line 9247 "configure"
9247 #include "confdefs.h"
9248
9249 #if defined(HAVE_UNISTD_H)
9250 #include <unistd.h>
9251 #endif
9252 #include <stdio.h>
9253 #include <sys/stat.h>
9254 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9255 EOF
9256 if { (eval echo configure:9257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9257 then
9258   samba_cv_HAVE_OFF64_T=yes
9259 else
9260   echo "configure: failed program was:" >&5
9261   cat conftest.$ac_ext >&5
9262   rm -fr conftest*
9263   samba_cv_HAVE_OFF64_T=no
9264 fi
9265 rm -fr conftest*
9266 fi
9267
9268 fi
9269
9270 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9271 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9272     cat >> confdefs.h <<\EOF
9273 #define HAVE_OFF64_T 1
9274 EOF
9275
9276 fi
9277
9278 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9279 echo "configure:9280: checking for 64 bit ino_t" >&5
9280 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9281   echo $ac_n "(cached) $ac_c" 1>&6
9282 else
9283   
9284 if test "$cross_compiling" = yes; then
9285   samba_cv_SIZEOF_INO_T=cross
9286 else
9287   cat > conftest.$ac_ext <<EOF
9288 #line 9289 "configure"
9289 #include "confdefs.h"
9290 #include <stdio.h>
9291 #include <sys/stat.h>
9292 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9293 EOF
9294 if { (eval echo configure:9295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9295 then
9296   samba_cv_SIZEOF_INO_T=yes
9297 else
9298   echo "configure: failed program was:" >&5
9299   cat conftest.$ac_ext >&5
9300   rm -fr conftest*
9301   samba_cv_SIZEOF_INO_T=no
9302 fi
9303 rm -fr conftest*
9304 fi
9305
9306 fi
9307
9308 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9309 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9310     cat >> confdefs.h <<\EOF
9311 #define SIZEOF_INO_T 8
9312 EOF
9313
9314 fi
9315
9316 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9317 echo "configure:9318: checking for ino64_t" >&5
9318 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9319   echo $ac_n "(cached) $ac_c" 1>&6
9320 else
9321   
9322 if test "$cross_compiling" = yes; then
9323   samba_cv_HAVE_INO64_T=cross
9324 else
9325   cat > conftest.$ac_ext <<EOF
9326 #line 9327 "configure"
9327 #include "confdefs.h"
9328
9329 #if defined(HAVE_UNISTD_H)
9330 #include <unistd.h>
9331 #endif
9332 #include <stdio.h>
9333 #include <sys/stat.h>
9334 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9335 EOF
9336 if { (eval echo configure:9337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9337 then
9338   samba_cv_HAVE_INO64_T=yes
9339 else
9340   echo "configure: failed program was:" >&5
9341   cat conftest.$ac_ext >&5
9342   rm -fr conftest*
9343   samba_cv_HAVE_INO64_T=no
9344 fi
9345 rm -fr conftest*
9346 fi
9347
9348 fi
9349
9350 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9351 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9352     cat >> confdefs.h <<\EOF
9353 #define HAVE_INO64_T 1
9354 EOF
9355
9356 fi
9357
9358 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9359 echo "configure:9360: checking for dev64_t" >&5
9360 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9361   echo $ac_n "(cached) $ac_c" 1>&6
9362 else
9363   
9364 if test "$cross_compiling" = yes; then
9365   samba_cv_HAVE_DEV64_T=cross
9366 else
9367   cat > conftest.$ac_ext <<EOF
9368 #line 9369 "configure"
9369 #include "confdefs.h"
9370
9371 #if defined(HAVE_UNISTD_H)
9372 #include <unistd.h>
9373 #endif
9374 #include <stdio.h>
9375 #include <sys/stat.h>
9376 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9377 EOF
9378 if { (eval echo configure:9379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9379 then
9380   samba_cv_HAVE_DEV64_T=yes
9381 else
9382   echo "configure: failed program was:" >&5
9383   cat conftest.$ac_ext >&5
9384   rm -fr conftest*
9385   samba_cv_HAVE_DEV64_T=no
9386 fi
9387 rm -fr conftest*
9388 fi
9389
9390 fi
9391
9392 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9393 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9394     cat >> confdefs.h <<\EOF
9395 #define HAVE_DEV64_T 1
9396 EOF
9397
9398 fi
9399
9400 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9401 echo "configure:9402: checking for struct dirent64" >&5
9402 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9403   echo $ac_n "(cached) $ac_c" 1>&6
9404 else
9405   
9406 cat > conftest.$ac_ext <<EOF
9407 #line 9408 "configure"
9408 #include "confdefs.h"
9409
9410 #if defined(HAVE_UNISTD_H)
9411 #include <unistd.h>
9412 #endif
9413 #include <sys/types.h>
9414 #include <dirent.h>
9415 int main() {
9416 struct dirent64 de;
9417 ; return 0; }
9418 EOF
9419 if { (eval echo configure:9420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9420   rm -rf conftest*
9421   samba_cv_HAVE_STRUCT_DIRENT64=yes
9422 else
9423   echo "configure: failed program was:" >&5
9424   cat conftest.$ac_ext >&5
9425   rm -rf conftest*
9426   samba_cv_HAVE_STRUCT_DIRENT64=no
9427 fi
9428 rm -f conftest*
9429 fi
9430
9431 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9432 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9433     cat >> confdefs.h <<\EOF
9434 #define HAVE_STRUCT_DIRENT64 1
9435 EOF
9436
9437 fi
9438
9439 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9440 echo "configure:9441: checking for major macro" >&5
9441 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9442   echo $ac_n "(cached) $ac_c" 1>&6
9443 else
9444   
9445 if test "$cross_compiling" = yes; then
9446   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9447 else
9448   cat > conftest.$ac_ext <<EOF
9449 #line 9450 "configure"
9450 #include "confdefs.h"
9451
9452 #if defined(HAVE_UNISTD_H)
9453 #include <unistd.h>
9454 #endif
9455 #include <sys/types.h>
9456 main() { dev_t dev; int i = major(dev); return 0; }
9457 EOF
9458 if { (eval echo configure:9459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9459 then
9460   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9461 else
9462   echo "configure: failed program was:" >&5
9463   cat conftest.$ac_ext >&5
9464   rm -fr conftest*
9465   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9466 fi
9467 rm -fr conftest*
9468 fi
9469
9470 fi
9471
9472 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9473 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9474     cat >> confdefs.h <<\EOF
9475 #define HAVE_DEVICE_MAJOR_FN 1
9476 EOF
9477
9478 fi
9479
9480 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9481 echo "configure:9482: checking for minor macro" >&5
9482 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9483   echo $ac_n "(cached) $ac_c" 1>&6
9484 else
9485   
9486 if test "$cross_compiling" = yes; then
9487   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9488 else
9489   cat > conftest.$ac_ext <<EOF
9490 #line 9491 "configure"
9491 #include "confdefs.h"
9492
9493 #if defined(HAVE_UNISTD_H)
9494 #include <unistd.h>
9495 #endif
9496 #include <sys/types.h>
9497 main() { dev_t dev; int i = minor(dev); return 0; }
9498 EOF
9499 if { (eval echo configure:9500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9500 then
9501   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9502 else
9503   echo "configure: failed program was:" >&5
9504   cat conftest.$ac_ext >&5
9505   rm -fr conftest*
9506   samba_cv_HAVE_DEVICE_MINOR_FN=no
9507 fi
9508 rm -fr conftest*
9509 fi
9510
9511 fi
9512
9513 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9514 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9515     cat >> confdefs.h <<\EOF
9516 #define HAVE_DEVICE_MINOR_FN 1
9517 EOF
9518
9519 fi
9520
9521 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9522 echo "configure:9523: checking for unsigned char" >&5
9523 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+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_UNSIGNED_CHAR=cross
9529 else
9530   cat > conftest.$ac_ext <<EOF
9531 #line 9532 "configure"
9532 #include "confdefs.h"
9533 #include <stdio.h>
9534 main() { char c; c=250; exit((c > 0)?0:1); }
9535 EOF
9536 if { (eval echo configure:9537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9537 then
9538   samba_cv_HAVE_UNSIGNED_CHAR=yes
9539 else
9540   echo "configure: failed program was:" >&5
9541   cat conftest.$ac_ext >&5
9542   rm -fr conftest*
9543   samba_cv_HAVE_UNSIGNED_CHAR=no
9544 fi
9545 rm -fr conftest*
9546 fi
9547
9548 fi
9549
9550 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9551 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9552     cat >> confdefs.h <<\EOF
9553 #define HAVE_UNSIGNED_CHAR 1
9554 EOF
9555
9556 fi
9557
9558 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9559 echo "configure:9560: checking for sin_len in sock" >&5
9560 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9561   echo $ac_n "(cached) $ac_c" 1>&6
9562 else
9563   
9564 cat > conftest.$ac_ext <<EOF
9565 #line 9566 "configure"
9566 #include "confdefs.h"
9567 #include <sys/types.h>
9568 #include <sys/socket.h>
9569 #include <netinet/in.h>
9570 int main() {
9571 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9572 ; return 0; }
9573 EOF
9574 if { (eval echo configure:9575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9575   rm -rf conftest*
9576   samba_cv_HAVE_SOCK_SIN_LEN=yes
9577 else
9578   echo "configure: failed program was:" >&5
9579   cat conftest.$ac_ext >&5
9580   rm -rf conftest*
9581   samba_cv_HAVE_SOCK_SIN_LEN=no
9582 fi
9583 rm -f conftest*
9584 fi
9585
9586 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9587 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9588     cat >> confdefs.h <<\EOF
9589 #define HAVE_SOCK_SIN_LEN 1
9590 EOF
9591
9592 fi
9593
9594 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9595 echo "configure:9596: checking whether seekdir returns void" >&5
9596 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9597   echo $ac_n "(cached) $ac_c" 1>&6
9598 else
9599   
9600 cat > conftest.$ac_ext <<EOF
9601 #line 9602 "configure"
9602 #include "confdefs.h"
9603 #include <sys/types.h>
9604 #include <dirent.h>
9605 void seekdir(DIR *d, long loc) { return; }
9606 int main() {
9607 return 0;
9608 ; return 0; }
9609 EOF
9610 if { (eval echo configure:9611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9611   rm -rf conftest*
9612   samba_cv_SEEKDIR_RETURNS_VOID=yes
9613 else
9614   echo "configure: failed program was:" >&5
9615   cat conftest.$ac_ext >&5
9616   rm -rf conftest*
9617   samba_cv_SEEKDIR_RETURNS_VOID=no
9618 fi
9619 rm -f conftest*
9620 fi
9621
9622 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9623 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9624     cat >> confdefs.h <<\EOF
9625 #define SEEKDIR_RETURNS_VOID 1
9626 EOF
9627
9628 fi
9629
9630 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9631 echo "configure:9632: checking for __FILE__ macro" >&5
9632 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9633   echo $ac_n "(cached) $ac_c" 1>&6
9634 else
9635   
9636 cat > conftest.$ac_ext <<EOF
9637 #line 9638 "configure"
9638 #include "confdefs.h"
9639 #include <stdio.h>
9640 int main() {
9641 printf("%s\n", __FILE__);
9642 ; return 0; }
9643 EOF
9644 if { (eval echo configure:9645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9645   rm -rf conftest*
9646   samba_cv_HAVE_FILE_MACRO=yes
9647 else
9648   echo "configure: failed program was:" >&5
9649   cat conftest.$ac_ext >&5
9650   rm -rf conftest*
9651   samba_cv_HAVE_FILE_MACRO=no
9652 fi
9653 rm -f conftest*
9654 fi
9655
9656 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9657 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9658     cat >> confdefs.h <<\EOF
9659 #define HAVE_FILE_MACRO 1
9660 EOF
9661
9662 fi
9663
9664 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9665 echo "configure:9666: checking for __FUNCTION__ macro" >&5
9666 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9667   echo $ac_n "(cached) $ac_c" 1>&6
9668 else
9669   
9670 cat > conftest.$ac_ext <<EOF
9671 #line 9672 "configure"
9672 #include "confdefs.h"
9673 #include <stdio.h>
9674 int main() {
9675 printf("%s\n", __FUNCTION__);
9676 ; return 0; }
9677 EOF
9678 if { (eval echo configure:9679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9679   rm -rf conftest*
9680   samba_cv_HAVE_FUNCTION_MACRO=yes
9681 else
9682   echo "configure: failed program was:" >&5
9683   cat conftest.$ac_ext >&5
9684   rm -rf conftest*
9685   samba_cv_HAVE_FUNCTION_MACRO=no
9686 fi
9687 rm -f conftest*
9688 fi
9689
9690 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9691 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9692     cat >> confdefs.h <<\EOF
9693 #define HAVE_FUNCTION_MACRO 1
9694 EOF
9695
9696 fi
9697
9698 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9699 echo "configure:9700: checking if gettimeofday takes tz argument" >&5
9700 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9701   echo $ac_n "(cached) $ac_c" 1>&6
9702 else
9703   
9704 if test "$cross_compiling" = yes; then
9705   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9706 else
9707   cat > conftest.$ac_ext <<EOF
9708 #line 9709 "configure"
9709 #include "confdefs.h"
9710
9711 #include <sys/time.h>
9712 #include <unistd.h>
9713 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9714 EOF
9715 if { (eval echo configure:9716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9716 then
9717   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9718 else
9719   echo "configure: failed program was:" >&5
9720   cat conftest.$ac_ext >&5
9721   rm -fr conftest*
9722   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9723 fi
9724 rm -fr conftest*
9725 fi
9726
9727 fi
9728
9729 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9730 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9731     cat >> confdefs.h <<\EOF
9732 #define HAVE_GETTIMEOFDAY_TZ 1
9733 EOF
9734
9735 fi
9736
9737 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9738 echo "configure:9739: checking for __va_copy" >&5
9739 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9740   echo $ac_n "(cached) $ac_c" 1>&6
9741 else
9742   
9743 cat > conftest.$ac_ext <<EOF
9744 #line 9745 "configure"
9745 #include "confdefs.h"
9746 #include <stdarg.h>
9747 va_list ap1,ap2;
9748 int main() {
9749 __va_copy(ap1,ap2);
9750 ; return 0; }
9751 EOF
9752 if { (eval echo configure:9753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9753   rm -rf conftest*
9754   samba_cv_HAVE_VA_COPY=yes
9755 else
9756   echo "configure: failed program was:" >&5
9757   cat conftest.$ac_ext >&5
9758   rm -rf conftest*
9759   samba_cv_HAVE_VA_COPY=no
9760 fi
9761 rm -f conftest*
9762 fi
9763
9764 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9765 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9766     cat >> confdefs.h <<\EOF
9767 #define HAVE_VA_COPY 1
9768 EOF
9769
9770 fi
9771
9772 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9773 echo "configure:9774: checking for C99 vsnprintf" >&5
9774 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9775   echo $ac_n "(cached) $ac_c" 1>&6
9776 else
9777   
9778 if test "$cross_compiling" = yes; then
9779   samba_cv_HAVE_C99_VSNPRINTF=cross
9780 else
9781   cat > conftest.$ac_ext <<EOF
9782 #line 9783 "configure"
9783 #include "confdefs.h"
9784
9785 #include <sys/types.h>
9786 #include <stdarg.h>
9787 void foo(const char *format, ...) { 
9788        va_list ap;
9789        int len;
9790        char buf[5];
9791
9792        va_start(ap, format);
9793        len = vsnprintf(buf, 0, format, ap);
9794        va_end(ap);
9795        if (len != 5) exit(1);
9796
9797        va_start(ap, format);
9798        len = vsnprintf(0, 0, format, ap);
9799        va_end(ap);
9800        if (len != 5) exit(1);
9801
9802        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9803
9804        exit(0);
9805 }
9806 main() { foo("hello"); }
9807
9808 EOF
9809 if { (eval echo configure:9810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9810 then
9811   samba_cv_HAVE_C99_VSNPRINTF=yes
9812 else
9813   echo "configure: failed program was:" >&5
9814   cat conftest.$ac_ext >&5
9815   rm -fr conftest*
9816   samba_cv_HAVE_C99_VSNPRINTF=no
9817 fi
9818 rm -fr conftest*
9819 fi
9820
9821 fi
9822
9823 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9824 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9825     cat >> confdefs.h <<\EOF
9826 #define HAVE_C99_VSNPRINTF 1
9827 EOF
9828
9829 fi
9830
9831 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9832 echo "configure:9833: checking for broken readdir" >&5
9833 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9834   echo $ac_n "(cached) $ac_c" 1>&6
9835 else
9836   
9837 if test "$cross_compiling" = yes; then
9838   samba_cv_HAVE_BROKEN_READDIR=cross
9839 else
9840   cat > conftest.$ac_ext <<EOF
9841 #line 9842 "configure"
9842 #include "confdefs.h"
9843 #include <sys/types.h>
9844 #include <dirent.h>
9845 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9846 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9847 di->d_name[0] == 0) exit(0); exit(1);} 
9848 EOF
9849 if { (eval echo configure:9850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9850 then
9851   samba_cv_HAVE_BROKEN_READDIR=yes
9852 else
9853   echo "configure: failed program was:" >&5
9854   cat conftest.$ac_ext >&5
9855   rm -fr conftest*
9856   samba_cv_HAVE_BROKEN_READDIR=no
9857 fi
9858 rm -fr conftest*
9859 fi
9860
9861 fi
9862
9863 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9864 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9865     cat >> confdefs.h <<\EOF
9866 #define HAVE_BROKEN_READDIR 1
9867 EOF
9868
9869 fi
9870
9871 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9872 echo "configure:9873: checking for utimbuf" >&5
9873 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9874   echo $ac_n "(cached) $ac_c" 1>&6
9875 else
9876   
9877 cat > conftest.$ac_ext <<EOF
9878 #line 9879 "configure"
9879 #include "confdefs.h"
9880 #include <sys/types.h>
9881 #include <utime.h>
9882 int main() {
9883 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9884 ; return 0; }
9885 EOF
9886 if { (eval echo configure:9887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9887   rm -rf conftest*
9888   samba_cv_HAVE_UTIMBUF=yes
9889 else
9890   echo "configure: failed program was:" >&5
9891   cat conftest.$ac_ext >&5
9892   rm -rf conftest*
9893   samba_cv_HAVE_UTIMBUF=no
9894 fi
9895 rm -f conftest*
9896 fi
9897
9898 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9899 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9900     cat >> confdefs.h <<\EOF
9901 #define HAVE_UTIMBUF 1
9902 EOF
9903
9904 fi
9905
9906
9907 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9908 do
9909 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9910 echo "configure:9911: checking for $ac_func" >&5
9911 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9912   echo $ac_n "(cached) $ac_c" 1>&6
9913 else
9914   cat > conftest.$ac_ext <<EOF
9915 #line 9916 "configure"
9916 #include "confdefs.h"
9917 /* System header to define __stub macros and hopefully few prototypes,
9918     which can conflict with char $ac_func(); below.  */
9919 #include <assert.h>
9920 /* Override any gcc2 internal prototype to avoid an error.  */
9921 /* We use char because int might match the return type of a gcc2
9922     builtin and then its argument prototype would still apply.  */
9923 char $ac_func();
9924
9925 int main() {
9926
9927 /* The GNU C library defines this for functions which it implements
9928     to always fail with ENOSYS.  Some functions are actually named
9929     something starting with __ and the normal name is an alias.  */
9930 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9931 choke me
9932 #else
9933 $ac_func();
9934 #endif
9935
9936 ; return 0; }
9937 EOF
9938 if { (eval echo configure:9939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9939   rm -rf conftest*
9940   eval "ac_cv_func_$ac_func=yes"
9941 else
9942   echo "configure: failed program was:" >&5
9943   cat conftest.$ac_ext >&5
9944   rm -rf conftest*
9945   eval "ac_cv_func_$ac_func=no"
9946 fi
9947 rm -f conftest*
9948 fi
9949
9950 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9951   echo "$ac_t""yes" 1>&6
9952     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9953   cat >> confdefs.h <<EOF
9954 #define $ac_tr_func 1
9955 EOF
9956  
9957 else
9958   echo "$ac_t""no" 1>&6
9959 fi
9960 done
9961
9962
9963 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9964 echo "configure:9965: checking for ut_name in utmp" >&5
9965 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9966   echo $ac_n "(cached) $ac_c" 1>&6
9967 else
9968   
9969 cat > conftest.$ac_ext <<EOF
9970 #line 9971 "configure"
9971 #include "confdefs.h"
9972 #include <sys/types.h>
9973 #include <utmp.h>
9974 int main() {
9975 struct utmp ut;  ut.ut_name[0] = 'a';
9976 ; return 0; }
9977 EOF
9978 if { (eval echo configure:9979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9979   rm -rf conftest*
9980   samba_cv_HAVE_UT_UT_NAME=yes
9981 else
9982   echo "configure: failed program was:" >&5
9983   cat conftest.$ac_ext >&5
9984   rm -rf conftest*
9985   samba_cv_HAVE_UT_UT_NAME=no
9986 fi
9987 rm -f conftest*
9988 fi
9989
9990 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9991 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9992     cat >> confdefs.h <<\EOF
9993 #define HAVE_UT_UT_NAME 1
9994 EOF
9995
9996 fi 
9997
9998 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9999 echo "configure:10000: checking for ut_user in utmp" >&5
10000 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
10001   echo $ac_n "(cached) $ac_c" 1>&6
10002 else
10003   
10004 cat > conftest.$ac_ext <<EOF
10005 #line 10006 "configure"
10006 #include "confdefs.h"
10007 #include <sys/types.h>
10008 #include <utmp.h>
10009 int main() {
10010 struct utmp ut;  ut.ut_user[0] = 'a';
10011 ; return 0; }
10012 EOF
10013 if { (eval echo configure:10014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10014   rm -rf conftest*
10015   samba_cv_HAVE_UT_UT_USER=yes
10016 else
10017   echo "configure: failed program was:" >&5
10018   cat conftest.$ac_ext >&5
10019   rm -rf conftest*
10020   samba_cv_HAVE_UT_UT_USER=no
10021 fi
10022 rm -f conftest*
10023 fi
10024
10025 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
10026 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
10027     cat >> confdefs.h <<\EOF
10028 #define HAVE_UT_UT_USER 1
10029 EOF
10030
10031 fi 
10032
10033 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
10034 echo "configure:10035: checking for ut_id in utmp" >&5
10035 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10036   echo $ac_n "(cached) $ac_c" 1>&6
10037 else
10038   
10039 cat > conftest.$ac_ext <<EOF
10040 #line 10041 "configure"
10041 #include "confdefs.h"
10042 #include <sys/types.h>
10043 #include <utmp.h>
10044 int main() {
10045 struct utmp ut;  ut.ut_id[0] = 'a';
10046 ; return 0; }
10047 EOF
10048 if { (eval echo configure:10049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10049   rm -rf conftest*
10050   samba_cv_HAVE_UT_UT_ID=yes
10051 else
10052   echo "configure: failed program was:" >&5
10053   cat conftest.$ac_ext >&5
10054   rm -rf conftest*
10055   samba_cv_HAVE_UT_UT_ID=no
10056 fi
10057 rm -f conftest*
10058 fi
10059
10060 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10061 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10062     cat >> confdefs.h <<\EOF
10063 #define HAVE_UT_UT_ID 1
10064 EOF
10065
10066 fi 
10067
10068 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10069 echo "configure:10070: checking for ut_host in utmp" >&5
10070 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10071   echo $ac_n "(cached) $ac_c" 1>&6
10072 else
10073   
10074 cat > conftest.$ac_ext <<EOF
10075 #line 10076 "configure"
10076 #include "confdefs.h"
10077 #include <sys/types.h>
10078 #include <utmp.h>
10079 int main() {
10080 struct utmp ut;  ut.ut_host[0] = 'a';
10081 ; return 0; }
10082 EOF
10083 if { (eval echo configure:10084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10084   rm -rf conftest*
10085   samba_cv_HAVE_UT_UT_HOST=yes
10086 else
10087   echo "configure: failed program was:" >&5
10088   cat conftest.$ac_ext >&5
10089   rm -rf conftest*
10090   samba_cv_HAVE_UT_UT_HOST=no
10091 fi
10092 rm -f conftest*
10093 fi
10094
10095 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10096 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10097     cat >> confdefs.h <<\EOF
10098 #define HAVE_UT_UT_HOST 1
10099 EOF
10100
10101 fi 
10102
10103 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10104 echo "configure:10105: checking for ut_time in utmp" >&5
10105 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10106   echo $ac_n "(cached) $ac_c" 1>&6
10107 else
10108   
10109 cat > conftest.$ac_ext <<EOF
10110 #line 10111 "configure"
10111 #include "confdefs.h"
10112 #include <sys/types.h>
10113 #include <utmp.h>
10114 int main() {
10115 struct utmp ut;  time_t t; ut.ut_time = t;
10116 ; return 0; }
10117 EOF
10118 if { (eval echo configure:10119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10119   rm -rf conftest*
10120   samba_cv_HAVE_UT_UT_TIME=yes
10121 else
10122   echo "configure: failed program was:" >&5
10123   cat conftest.$ac_ext >&5
10124   rm -rf conftest*
10125   samba_cv_HAVE_UT_UT_TIME=no
10126 fi
10127 rm -f conftest*
10128 fi
10129
10130 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10131 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10132     cat >> confdefs.h <<\EOF
10133 #define HAVE_UT_UT_TIME 1
10134 EOF
10135
10136 fi 
10137
10138 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10139 echo "configure:10140: checking for ut_tv in utmp" >&5
10140 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+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 <utmp.h>
10149 int main() {
10150 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
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_UT_UT_TV=yes
10156 else
10157   echo "configure: failed program was:" >&5
10158   cat conftest.$ac_ext >&5
10159   rm -rf conftest*
10160   samba_cv_HAVE_UT_UT_TV=no
10161 fi
10162 rm -f conftest*
10163 fi
10164
10165 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10166 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10167     cat >> confdefs.h <<\EOF
10168 #define HAVE_UT_UT_TV 1
10169 EOF
10170
10171 fi 
10172
10173 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10174 echo "configure:10175: checking for ut_type in utmp" >&5
10175 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10176   echo $ac_n "(cached) $ac_c" 1>&6
10177 else
10178   
10179 cat > conftest.$ac_ext <<EOF
10180 #line 10181 "configure"
10181 #include "confdefs.h"
10182 #include <sys/types.h>
10183 #include <utmp.h>
10184 int main() {
10185 struct utmp ut;  ut.ut_type = 0;
10186 ; return 0; }
10187 EOF
10188 if { (eval echo configure:10189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10189   rm -rf conftest*
10190   samba_cv_HAVE_UT_UT_TYPE=yes
10191 else
10192   echo "configure: failed program was:" >&5
10193   cat conftest.$ac_ext >&5
10194   rm -rf conftest*
10195   samba_cv_HAVE_UT_UT_TYPE=no
10196 fi
10197 rm -f conftest*
10198 fi
10199
10200 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10201 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10202     cat >> confdefs.h <<\EOF
10203 #define HAVE_UT_UT_TYPE 1
10204 EOF
10205
10206 fi 
10207
10208 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10209 echo "configure:10210: checking for ut_pid in utmp" >&5
10210 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10211   echo $ac_n "(cached) $ac_c" 1>&6
10212 else
10213   
10214 cat > conftest.$ac_ext <<EOF
10215 #line 10216 "configure"
10216 #include "confdefs.h"
10217 #include <sys/types.h>
10218 #include <utmp.h>
10219 int main() {
10220 struct utmp ut;  ut.ut_pid = 0;
10221 ; return 0; }
10222 EOF
10223 if { (eval echo configure:10224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10224   rm -rf conftest*
10225   samba_cv_HAVE_UT_UT_PID=yes
10226 else
10227   echo "configure: failed program was:" >&5
10228   cat conftest.$ac_ext >&5
10229   rm -rf conftest*
10230   samba_cv_HAVE_UT_UT_PID=no
10231 fi
10232 rm -f conftest*
10233 fi
10234
10235 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10236 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10237     cat >> confdefs.h <<\EOF
10238 #define HAVE_UT_UT_PID 1
10239 EOF
10240
10241 fi 
10242
10243 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10244 echo "configure:10245: checking for ut_exit in utmp" >&5
10245 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10246   echo $ac_n "(cached) $ac_c" 1>&6
10247 else
10248   
10249 cat > conftest.$ac_ext <<EOF
10250 #line 10251 "configure"
10251 #include "confdefs.h"
10252 #include <sys/types.h>
10253 #include <utmp.h>
10254 int main() {
10255 struct utmp ut;  ut.ut_exit.e_exit = 0;
10256 ; return 0; }
10257 EOF
10258 if { (eval echo configure:10259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10259   rm -rf conftest*
10260   samba_cv_HAVE_UT_UT_EXIT=yes
10261 else
10262   echo "configure: failed program was:" >&5
10263   cat conftest.$ac_ext >&5
10264   rm -rf conftest*
10265   samba_cv_HAVE_UT_UT_EXIT=no
10266 fi
10267 rm -f conftest*
10268 fi
10269
10270 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10271 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10272     cat >> confdefs.h <<\EOF
10273 #define HAVE_UT_UT_EXIT 1
10274 EOF
10275
10276 fi 
10277
10278 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10279 echo "configure:10280: checking for ut_addr in utmp" >&5
10280 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10281   echo $ac_n "(cached) $ac_c" 1>&6
10282 else
10283   
10284 cat > conftest.$ac_ext <<EOF
10285 #line 10286 "configure"
10286 #include "confdefs.h"
10287 #include <sys/types.h>
10288 #include <utmp.h>
10289 int main() {
10290 struct utmp ut;  ut.ut_addr = 0;
10291 ; return 0; }
10292 EOF
10293 if { (eval echo configure:10294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10294   rm -rf conftest*
10295   samba_cv_HAVE_UT_UT_ADDR=yes
10296 else
10297   echo "configure: failed program was:" >&5
10298   cat conftest.$ac_ext >&5
10299   rm -rf conftest*
10300   samba_cv_HAVE_UT_UT_ADDR=no
10301 fi
10302 rm -f conftest*
10303 fi
10304
10305 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10306 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10307     cat >> confdefs.h <<\EOF
10308 #define HAVE_UT_UT_ADDR 1
10309 EOF
10310
10311 fi 
10312
10313 if test x$ac_cv_func_pututline = xyes ; then
10314   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10315 echo "configure:10316: checking whether pututline returns pointer" >&5
10316 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10317   echo $ac_n "(cached) $ac_c" 1>&6
10318 else
10319   
10320   cat > conftest.$ac_ext <<EOF
10321 #line 10322 "configure"
10322 #include "confdefs.h"
10323 #include <sys/types.h>
10324 #include <utmp.h>
10325 int main() {
10326 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10327 ; return 0; }
10328 EOF
10329 if { (eval echo configure:10330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10330   rm -rf conftest*
10331   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10332 else
10333   echo "configure: failed program was:" >&5
10334   cat conftest.$ac_ext >&5
10335   rm -rf conftest*
10336   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10337 fi
10338 rm -f conftest*
10339 fi
10340
10341 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10342   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10343       cat >> confdefs.h <<\EOF
10344 #define PUTUTLINE_RETURNS_UTMP 1
10345 EOF
10346
10347   fi
10348 fi
10349
10350 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10351 echo "configure:10352: checking for ut_syslen in utmpx" >&5
10352 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10353   echo $ac_n "(cached) $ac_c" 1>&6
10354 else
10355   
10356 cat > conftest.$ac_ext <<EOF
10357 #line 10358 "configure"
10358 #include "confdefs.h"
10359 #include <sys/types.h>
10360 #include <utmpx.h>
10361 int main() {
10362 struct utmpx ux;  ux.ut_syslen = 0;
10363 ; return 0; }
10364 EOF
10365 if { (eval echo configure:10366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10366   rm -rf conftest*
10367   samba_cv_HAVE_UX_UT_SYSLEN=yes
10368 else
10369   echo "configure: failed program was:" >&5
10370   cat conftest.$ac_ext >&5
10371   rm -rf conftest*
10372   samba_cv_HAVE_UX_UT_SYSLEN=no
10373 fi
10374 rm -f conftest*
10375 fi
10376
10377 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10378 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10379     cat >> confdefs.h <<\EOF
10380 #define HAVE_UX_UT_SYSLEN 1
10381 EOF
10382
10383 fi 
10384
10385
10386 #################################################
10387 # check for libiconv support
10388 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10389 echo "configure:10390: checking whether to use libiconv" >&5
10390 # Check whether --with-libiconv or --without-libiconv was given.
10391 if test "${with_libiconv+set}" = set; then
10392   withval="$with_libiconv"
10393    case "$withval" in
10394   no)
10395     echo "$ac_t""no" 1>&6
10396     ;;
10397   *)
10398     echo "$ac_t""yes" 1>&6
10399     CFLAGS="$CFLAGS -I$withval/include"
10400     LDFLAGS="$LDFLAGS -L$withval/lib"
10401     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10402 echo "configure:10403: checking for iconv_open in -liconv" >&5
10403 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10404 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10405   echo $ac_n "(cached) $ac_c" 1>&6
10406 else
10407   ac_save_LIBS="$LIBS"
10408 LIBS="-liconv  $LIBS"
10409 cat > conftest.$ac_ext <<EOF
10410 #line 10411 "configure"
10411 #include "confdefs.h"
10412 /* Override any gcc2 internal prototype to avoid an error.  */
10413 /* We use char because int might match the return type of a gcc2
10414     builtin and then its argument prototype would still apply.  */
10415 char iconv_open();
10416
10417 int main() {
10418 iconv_open()
10419 ; return 0; }
10420 EOF
10421 if { (eval echo configure:10422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10422   rm -rf conftest*
10423   eval "ac_cv_lib_$ac_lib_var=yes"
10424 else
10425   echo "configure: failed program was:" >&5
10426   cat conftest.$ac_ext >&5
10427   rm -rf conftest*
10428   eval "ac_cv_lib_$ac_lib_var=no"
10429 fi
10430 rm -f conftest*
10431 LIBS="$ac_save_LIBS"
10432
10433 fi
10434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10435   echo "$ac_t""yes" 1>&6
10436     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10437     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10438   cat >> confdefs.h <<EOF
10439 #define $ac_tr_lib 1
10440 EOF
10441
10442   LIBS="-liconv $LIBS"
10443
10444 else
10445   echo "$ac_t""no" 1>&6
10446 fi
10447
10448     cat >> confdefs.h <<EOF
10449 #define WITH_LIBICONV "${withval}"
10450 EOF
10451
10452     ;;
10453   esac 
10454 else
10455   echo "$ac_t""no" 1>&6
10456
10457 fi
10458
10459
10460
10461 ############
10462 # check for iconv in libc
10463 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10464 echo "configure:10465: checking for working iconv" >&5
10465 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10466   echo $ac_n "(cached) $ac_c" 1>&6
10467 else
10468   
10469 if test "$cross_compiling" = yes; then
10470   samba_cv_HAVE_NATIVE_ICONV=cross
10471 else
10472   cat > conftest.$ac_ext <<EOF
10473 #line 10474 "configure"
10474 #include "confdefs.h"
10475
10476 #include <iconv.h>
10477 main() {
10478        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10479        if (cd == 0 || cd == (iconv_t)-1) return -1;
10480        return 0;
10481 }
10482
10483 EOF
10484 if { (eval echo configure:10485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10485 then
10486   samba_cv_HAVE_NATIVE_ICONV=yes
10487 else
10488   echo "configure: failed program was:" >&5
10489   cat conftest.$ac_ext >&5
10490   rm -fr conftest*
10491   samba_cv_HAVE_NATIVE_ICONV=no
10492 fi
10493 rm -fr conftest*
10494 fi
10495
10496 fi
10497
10498 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10499 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10500     cat >> confdefs.h <<\EOF
10501 #define HAVE_NATIVE_ICONV 1
10502 EOF
10503
10504 fi
10505
10506
10507 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10508 echo "configure:10509: checking for Linux kernel oplocks" >&5
10509 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10510   echo $ac_n "(cached) $ac_c" 1>&6
10511 else
10512   
10513 if test "$cross_compiling" = yes; then
10514   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10515 else
10516   cat > conftest.$ac_ext <<EOF
10517 #line 10518 "configure"
10518 #include "confdefs.h"
10519
10520 #include <sys/types.h>
10521 #include <fcntl.h>
10522 #ifndef F_GETLEASE
10523 #define F_GETLEASE      1025
10524 #endif
10525 main() {
10526        int fd = open("/dev/null", O_RDONLY);
10527        return fcntl(fd, F_GETLEASE, 0) == -1;
10528 }
10529
10530 EOF
10531 if { (eval echo configure:10532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10532 then
10533   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10534 else
10535   echo "configure: failed program was:" >&5
10536   cat conftest.$ac_ext >&5
10537   rm -fr conftest*
10538   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10539 fi
10540 rm -fr conftest*
10541 fi
10542
10543 fi
10544
10545 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10546 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10547     cat >> confdefs.h <<\EOF
10548 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10549 EOF
10550
10551 fi
10552
10553 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10554 echo "configure:10555: checking for kernel change notify support" >&5
10555 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10556   echo $ac_n "(cached) $ac_c" 1>&6
10557 else
10558   
10559 if test "$cross_compiling" = yes; then
10560   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10561 else
10562   cat > conftest.$ac_ext <<EOF
10563 #line 10564 "configure"
10564 #include "confdefs.h"
10565
10566 #include <sys/types.h>
10567 #include <fcntl.h>
10568 #include <signal.h>
10569 #ifndef F_NOTIFY
10570 #define F_NOTIFY 1026
10571 #endif
10572 main() {
10573         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10574 }
10575
10576 EOF
10577 if { (eval echo configure:10578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10578 then
10579   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10580 else
10581   echo "configure: failed program was:" >&5
10582   cat conftest.$ac_ext >&5
10583   rm -fr conftest*
10584   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10585 fi
10586 rm -fr conftest*
10587 fi
10588
10589 fi
10590
10591 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10592 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10593     cat >> confdefs.h <<\EOF
10594 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10595 EOF
10596
10597 fi
10598
10599 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10600 echo "configure:10601: checking for kernel share modes" >&5
10601 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10602   echo $ac_n "(cached) $ac_c" 1>&6
10603 else
10604   
10605 if test "$cross_compiling" = yes; then
10606   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10607 else
10608   cat > conftest.$ac_ext <<EOF
10609 #line 10610 "configure"
10610 #include "confdefs.h"
10611
10612 #include <sys/types.h>
10613 #include <fcntl.h>
10614 #include <signal.h>
10615 #include <sys/file.h>
10616 #ifndef LOCK_MAND
10617 #define LOCK_MAND       32
10618 #define LOCK_READ       64
10619 #endif
10620 main() {
10621         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10622 }
10623
10624 EOF
10625 if { (eval echo configure:10626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10626 then
10627   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10628 else
10629   echo "configure: failed program was:" >&5
10630   cat conftest.$ac_ext >&5
10631   rm -fr conftest*
10632   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10633 fi
10634 rm -fr conftest*
10635 fi
10636
10637 fi
10638
10639 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10640 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10641     cat >> confdefs.h <<\EOF
10642 #define HAVE_KERNEL_SHARE_MODES 1
10643 EOF
10644
10645 fi
10646
10647
10648
10649
10650 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10651 echo "configure:10652: checking for IRIX kernel oplock type definitions" >&5
10652 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10653   echo $ac_n "(cached) $ac_c" 1>&6
10654 else
10655   
10656 cat > conftest.$ac_ext <<EOF
10657 #line 10658 "configure"
10658 #include "confdefs.h"
10659 #include <sys/types.h>
10660 #include <fcntl.h>
10661 int main() {
10662 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10663 ; return 0; }
10664 EOF
10665 if { (eval echo configure:10666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10666   rm -rf conftest*
10667   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10668 else
10669   echo "configure: failed program was:" >&5
10670   cat conftest.$ac_ext >&5
10671   rm -rf conftest*
10672   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10673 fi
10674 rm -f conftest*
10675 fi
10676
10677 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10678 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10679     cat >> confdefs.h <<\EOF
10680 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10681 EOF
10682
10683 fi
10684
10685 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10686 echo "configure:10687: checking for irix specific capabilities" >&5
10687 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10688   echo $ac_n "(cached) $ac_c" 1>&6
10689 else
10690   
10691 if test "$cross_compiling" = yes; then
10692   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10693 else
10694   cat > conftest.$ac_ext <<EOF
10695 #line 10696 "configure"
10696 #include "confdefs.h"
10697 #include <sys/types.h>
10698 #include <sys/capability.h>
10699 main() {
10700  cap_t cap;
10701  if ((cap = cap_get_proc()) == NULL)
10702    exit(1);
10703  cap->cap_effective |= CAP_NETWORK_MGT;
10704  cap->cap_inheritable |= CAP_NETWORK_MGT;
10705  cap_set_proc(cap);
10706  exit(0);
10707 }
10708
10709 EOF
10710 if { (eval echo configure:10711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10711 then
10712   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10713 else
10714   echo "configure: failed program was:" >&5
10715   cat conftest.$ac_ext >&5
10716   rm -fr conftest*
10717   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10718 fi
10719 rm -fr conftest*
10720 fi
10721
10722 fi
10723
10724 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10725 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10726     cat >> confdefs.h <<\EOF
10727 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10728 EOF
10729
10730 fi
10731
10732 #
10733 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10734 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10735 #
10736
10737 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10738 echo "configure:10739: checking for int16 typedef included by rpc/rpc.h" >&5
10739 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10740   echo $ac_n "(cached) $ac_c" 1>&6
10741 else
10742   
10743 cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746 #include <sys/types.h>
10747 #if defined(HAVE_RPC_RPC_H)
10748 #include <rpc/rpc.h>
10749 #endif
10750 int main() {
10751 int16 testvar;
10752 ; return 0; }
10753 EOF
10754 if { (eval echo configure:10755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10755   rm -rf conftest*
10756   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10757 else
10758   echo "configure: failed program was:" >&5
10759   cat conftest.$ac_ext >&5
10760   rm -rf conftest*
10761   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10762 fi
10763 rm -f conftest*
10764 fi
10765
10766 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10767 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10768     cat >> confdefs.h <<\EOF
10769 #define HAVE_INT16_FROM_RPC_RPC_H 1
10770 EOF
10771
10772 fi
10773
10774 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10775 echo "configure:10776: checking for uint16 typedef included by rpc/rpc.h" >&5
10776 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10777   echo $ac_n "(cached) $ac_c" 1>&6
10778 else
10779   
10780 cat > conftest.$ac_ext <<EOF
10781 #line 10782 "configure"
10782 #include "confdefs.h"
10783 #include <sys/types.h>
10784 #if defined(HAVE_RPC_RPC_H)
10785 #include <rpc/rpc.h>
10786 #endif
10787 int main() {
10788 uint16 testvar;
10789 ; return 0; }
10790 EOF
10791 if { (eval echo configure:10792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10792   rm -rf conftest*
10793   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10794 else
10795   echo "configure: failed program was:" >&5
10796   cat conftest.$ac_ext >&5
10797   rm -rf conftest*
10798   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10799 fi
10800 rm -f conftest*
10801 fi
10802
10803 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10804 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10805     cat >> confdefs.h <<\EOF
10806 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10807 EOF
10808
10809 fi
10810
10811 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10812 echo "configure:10813: checking for int32 typedef included by rpc/rpc.h" >&5
10813 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10814   echo $ac_n "(cached) $ac_c" 1>&6
10815 else
10816   
10817 cat > conftest.$ac_ext <<EOF
10818 #line 10819 "configure"
10819 #include "confdefs.h"
10820 #include <sys/types.h>
10821 #if defined(HAVE_RPC_RPC_H)
10822 #include <rpc/rpc.h>
10823 #endif
10824 int main() {
10825 int32 testvar;
10826 ; return 0; }
10827 EOF
10828 if { (eval echo configure:10829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10829   rm -rf conftest*
10830   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10831 else
10832   echo "configure: failed program was:" >&5
10833   cat conftest.$ac_ext >&5
10834   rm -rf conftest*
10835   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10836 fi
10837 rm -f conftest*
10838 fi
10839
10840 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10841 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10842     cat >> confdefs.h <<\EOF
10843 #define HAVE_INT32_FROM_RPC_RPC_H 1
10844 EOF
10845
10846 fi
10847
10848 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10849 echo "configure:10850: checking for uint32 typedef included by rpc/rpc.h" >&5
10850 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10851   echo $ac_n "(cached) $ac_c" 1>&6
10852 else
10853   
10854 cat > conftest.$ac_ext <<EOF
10855 #line 10856 "configure"
10856 #include "confdefs.h"
10857 #include <sys/types.h>
10858 #if defined(HAVE_RPC_RPC_H)
10859 #include <rpc/rpc.h>
10860 #endif
10861 int main() {
10862 uint32 testvar;
10863 ; return 0; }
10864 EOF
10865 if { (eval echo configure:10866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10866   rm -rf conftest*
10867   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10868 else
10869   echo "configure: failed program was:" >&5
10870   cat conftest.$ac_ext >&5
10871   rm -rf conftest*
10872   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10873 fi
10874 rm -f conftest*
10875 fi
10876
10877 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10878 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10879     cat >> confdefs.h <<\EOF
10880 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10881 EOF
10882
10883 fi
10884
10885
10886 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10887 echo "configure:10888: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10888 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10889   echo $ac_n "(cached) $ac_c" 1>&6
10890 else
10891   
10892 cat > conftest.$ac_ext <<EOF
10893 #line 10894 "configure"
10894 #include "confdefs.h"
10895 #include <sys/types.h>
10896 #ifdef HAVE_SYS_SECURITY_H
10897 #include <sys/security.h>
10898 #include <prot.h>
10899 #endif  /* HAVE_SYS_SECURITY_H */
10900 #if defined(HAVE_RPC_RPC_H)
10901 #include <rpc/rpc.h>
10902 #endif
10903 int main() {
10904 int testvar;
10905 ; return 0; }
10906 EOF
10907 if { (eval echo configure:10908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10908   rm -rf conftest*
10909   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10910 else
10911   echo "configure: failed program was:" >&5
10912   cat conftest.$ac_ext >&5
10913   rm -rf conftest*
10914   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10915 fi
10916 rm -f conftest*
10917 fi
10918
10919 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10920 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10921     cat >> confdefs.h <<\EOF
10922 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10923 EOF
10924
10925 fi
10926
10927 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10928 echo "configure:10929: checking for test routines" >&5
10929 if test "$cross_compiling" = yes; then
10930   echo "configure: warning: cannot run when cross-compiling" 1>&2
10931 else
10932   cat > conftest.$ac_ext <<EOF
10933 #line 10934 "configure"
10934 #include "confdefs.h"
10935 #include "${srcdir-.}/tests/trivial.c"
10936 EOF
10937 if { (eval echo configure:10938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10938 then
10939   echo "$ac_t""yes" 1>&6
10940 else
10941   echo "configure: failed program was:" >&5
10942   cat conftest.$ac_ext >&5
10943   rm -fr conftest*
10944   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10945 fi
10946 rm -fr conftest*
10947 fi
10948
10949
10950 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10951 echo "configure:10952: checking for ftruncate extend" >&5
10952 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10953   echo $ac_n "(cached) $ac_c" 1>&6
10954 else
10955   
10956 if test "$cross_compiling" = yes; then
10957   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10958 else
10959   cat > conftest.$ac_ext <<EOF
10960 #line 10961 "configure"
10961 #include "confdefs.h"
10962 #include "${srcdir-.}/tests/ftruncate.c"
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_FTRUNCATE_EXTEND=yes
10967 else
10968   echo "configure: failed program was:" >&5
10969   cat conftest.$ac_ext >&5
10970   rm -fr conftest*
10971   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10972 fi
10973 rm -fr conftest*
10974 fi
10975
10976 fi
10977
10978 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10979 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10980     cat >> confdefs.h <<\EOF
10981 #define HAVE_FTRUNCATE_EXTEND 1
10982 EOF
10983
10984 fi
10985
10986 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10987 echo "configure:10988: checking for AF_LOCAL socket support" >&5
10988 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+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_HAVE_WORKING_AF_LOCAL=cross
10994 else
10995   cat > conftest.$ac_ext <<EOF
10996 #line 10997 "configure"
10997 #include "confdefs.h"
10998 #include "${srcdir-.}/tests/unixsock.c"
10999 EOF
11000 if { (eval echo configure:11001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11001 then
11002   samba_cv_HAVE_WORKING_AF_LOCAL=yes
11003 else
11004   echo "configure: failed program was:" >&5
11005   cat conftest.$ac_ext >&5
11006   rm -fr conftest*
11007   samba_cv_HAVE_WORKING_AF_LOCAL=no
11008 fi
11009 rm -fr conftest*
11010 fi
11011
11012 fi
11013
11014 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
11015 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
11016 then
11017     cat >> confdefs.h <<\EOF
11018 #define HAVE_WORKING_AF_LOCAL 1
11019 EOF
11020
11021 fi
11022
11023 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
11024 echo "configure:11025: checking for broken getgroups" >&5
11025 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+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_BROKEN_GETGROUPS=cross
11031 else
11032   cat > conftest.$ac_ext <<EOF
11033 #line 11034 "configure"
11034 #include "confdefs.h"
11035 #include "${srcdir-.}/tests/getgroups.c"
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_BROKEN_GETGROUPS=yes
11040 else
11041   echo "configure: failed program was:" >&5
11042   cat conftest.$ac_ext >&5
11043   rm -fr conftest*
11044   samba_cv_HAVE_BROKEN_GETGROUPS=no
11045 fi
11046 rm -fr conftest*
11047 fi
11048
11049 fi
11050
11051 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11052 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11053     cat >> confdefs.h <<\EOF
11054 #define HAVE_BROKEN_GETGROUPS 1
11055 EOF
11056
11057 fi
11058
11059 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11060 echo "configure:11061: checking whether getpass should be replaced" >&5
11061 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11062   echo $ac_n "(cached) $ac_c" 1>&6
11063 else
11064   
11065 SAVE_CPPFLAGS="$CPPFLAGS"
11066 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/popt -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
11067 cat > conftest.$ac_ext <<EOF
11068 #line 11069 "configure"
11069 #include "confdefs.h"
11070
11071 #define REPLACE_GETPASS 1
11072 #define NO_CONFIG_H 1
11073 #define main dont_declare_main
11074 #include "${srcdir-.}/lib/getsmbpass.c"
11075 #undef main
11076
11077 int main() {
11078
11079 ; return 0; }
11080 EOF
11081 if { (eval echo configure:11082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11082   rm -rf conftest*
11083   samba_cv_REPLACE_GETPASS=yes
11084 else
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -rf conftest*
11088   samba_cv_REPLACE_GETPASS=no
11089 fi
11090 rm -f conftest*
11091 CPPFLAGS="$SAVE_CPPFLAGS"
11092
11093 fi
11094
11095 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11096 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11097         cat >> confdefs.h <<\EOF
11098 #define REPLACE_GETPASS 1
11099 EOF
11100
11101 fi
11102
11103 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11104 echo "configure:11105: checking for broken inet_ntoa" >&5
11105 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11106   echo $ac_n "(cached) $ac_c" 1>&6
11107 else
11108   
11109 if test "$cross_compiling" = yes; then
11110   samba_cv_REPLACE_INET_NTOA=cross
11111 else
11112   cat > conftest.$ac_ext <<EOF
11113 #line 11114 "configure"
11114 #include "confdefs.h"
11115
11116 #include <stdio.h>
11117 #include <sys/types.h>
11118 #include <netinet/in.h>
11119 #ifdef HAVE_ARPA_INET_H
11120 #include <arpa/inet.h>
11121 #endif
11122 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11123 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11124     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11125 exit(1);}
11126 EOF
11127 if { (eval echo configure:11128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11128 then
11129   samba_cv_REPLACE_INET_NTOA=yes
11130 else
11131   echo "configure: failed program was:" >&5
11132   cat conftest.$ac_ext >&5
11133   rm -fr conftest*
11134   samba_cv_REPLACE_INET_NTOA=no
11135 fi
11136 rm -fr conftest*
11137 fi
11138
11139 fi
11140
11141 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11142 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11143     cat >> confdefs.h <<\EOF
11144 #define REPLACE_INET_NTOA 1
11145 EOF
11146
11147 fi
11148
11149 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11150 echo "configure:11151: checking for secure mkstemp" >&5
11151 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11152   echo $ac_n "(cached) $ac_c" 1>&6
11153 else
11154   
11155 if test "$cross_compiling" = yes; then
11156   samba_cv_HAVE_SECURE_MKSTEMP=cross
11157 else
11158   cat > conftest.$ac_ext <<EOF
11159 #line 11160 "configure"
11160 #include "confdefs.h"
11161 #include <stdlib.h>
11162 #include <sys/types.h>
11163 #include <sys/stat.h>
11164 #include <unistd.h>
11165 main() { 
11166   struct stat st;
11167   char tpl[20]="/tmp/test.XXXXXX"; 
11168   int fd = mkstemp(tpl); 
11169   if (fd == -1) exit(1);
11170   unlink(tpl);
11171   if (fstat(fd, &st) != 0) exit(1);
11172   if ((st.st_mode & 0777) != 0600) exit(1);
11173   exit(0);
11174 }
11175 EOF
11176 if { (eval echo configure:11177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11177 then
11178   samba_cv_HAVE_SECURE_MKSTEMP=yes
11179 else
11180   echo "configure: failed program was:" >&5
11181   cat conftest.$ac_ext >&5
11182   rm -fr conftest*
11183   samba_cv_HAVE_SECURE_MKSTEMP=no
11184 fi
11185 rm -fr conftest*
11186 fi
11187
11188 fi
11189
11190 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11191 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11192     cat >> confdefs.h <<\EOF
11193 #define HAVE_SECURE_MKSTEMP 1
11194 EOF
11195
11196 fi
11197
11198 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11199 echo "configure:11200: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11200 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11201   echo $ac_n "(cached) $ac_c" 1>&6
11202 else
11203   
11204 if test "$cross_compiling" = yes; then
11205   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11206 else
11207   cat > conftest.$ac_ext <<EOF
11208 #line 11209 "configure"
11209 #include "confdefs.h"
11210 #include <unistd.h>
11211 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11212 EOF
11213 if { (eval echo configure:11214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11214 then
11215   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11216 else
11217   echo "configure: failed program was:" >&5
11218   cat conftest.$ac_ext >&5
11219   rm -fr conftest*
11220   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11221 fi
11222 rm -fr conftest*
11223 fi
11224
11225 fi
11226
11227 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11228 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11229     cat >> confdefs.h <<\EOF
11230 #define SYSCONF_SC_NGROUPS_MAX 1
11231 EOF
11232
11233 fi
11234
11235 echo $ac_n "checking for root""... $ac_c" 1>&6
11236 echo "configure:11237: checking for root" >&5
11237 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11238   echo $ac_n "(cached) $ac_c" 1>&6
11239 else
11240   
11241 if test "$cross_compiling" = yes; then
11242   samba_cv_HAVE_ROOT=cross
11243 else
11244   cat > conftest.$ac_ext <<EOF
11245 #line 11246 "configure"
11246 #include "confdefs.h"
11247 main() { exit(getuid() != 0); }
11248 EOF
11249 if { (eval echo configure:11250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11250 then
11251   samba_cv_HAVE_ROOT=yes
11252 else
11253   echo "configure: failed program was:" >&5
11254   cat conftest.$ac_ext >&5
11255   rm -fr conftest*
11256   samba_cv_HAVE_ROOT=no
11257 fi
11258 rm -fr conftest*
11259 fi
11260
11261 fi
11262
11263 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11264 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11265     cat >> confdefs.h <<\EOF
11266 #define HAVE_ROOT 1
11267 EOF
11268
11269 else
11270     echo "configure: warning: running as non-root will disable some tests" 1>&2
11271 fi
11272
11273 ##################
11274 # look for a method of finding the list of network interfaces
11275 iface=no;
11276 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11277 echo "configure:11278: checking for iface AIX" >&5
11278 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11279   echo $ac_n "(cached) $ac_c" 1>&6
11280 else
11281   
11282 if test "$cross_compiling" = yes; then
11283   samba_cv_HAVE_IFACE_AIX=cross
11284 else
11285   cat > conftest.$ac_ext <<EOF
11286 #line 11287 "configure"
11287 #include "confdefs.h"
11288
11289 #define HAVE_IFACE_AIX 1
11290 #define AUTOCONF_TEST 1
11291 #include "confdefs.h"
11292 #include "${srcdir-.}/lib/interfaces.c"
11293 EOF
11294 if { (eval echo configure:11295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11295 then
11296   samba_cv_HAVE_IFACE_AIX=yes
11297 else
11298   echo "configure: failed program was:" >&5
11299   cat conftest.$ac_ext >&5
11300   rm -fr conftest*
11301   samba_cv_HAVE_IFACE_AIX=no
11302 fi
11303 rm -fr conftest*
11304 fi
11305
11306 fi
11307
11308 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11309 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11310     iface=yes;cat >> confdefs.h <<\EOF
11311 #define HAVE_IFACE_AIX 1
11312 EOF
11313
11314 fi
11315
11316 if test $iface = no; then
11317 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11318 echo "configure:11319: checking for iface ifconf" >&5
11319 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11320   echo $ac_n "(cached) $ac_c" 1>&6
11321 else
11322   
11323 if test "$cross_compiling" = yes; then
11324   samba_cv_HAVE_IFACE_IFCONF=cross
11325 else
11326   cat > conftest.$ac_ext <<EOF
11327 #line 11328 "configure"
11328 #include "confdefs.h"
11329
11330 #define HAVE_IFACE_IFCONF 1
11331 #define AUTOCONF_TEST 1
11332 #include "confdefs.h"
11333 #include "${srcdir-.}/lib/interfaces.c"
11334 EOF
11335 if { (eval echo configure:11336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11336 then
11337   samba_cv_HAVE_IFACE_IFCONF=yes
11338 else
11339   echo "configure: failed program was:" >&5
11340   cat conftest.$ac_ext >&5
11341   rm -fr conftest*
11342   samba_cv_HAVE_IFACE_IFCONF=no
11343 fi
11344 rm -fr conftest*
11345 fi
11346
11347 fi
11348
11349 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11350 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11351     iface=yes;cat >> confdefs.h <<\EOF
11352 #define HAVE_IFACE_IFCONF 1
11353 EOF
11354
11355 fi
11356 fi
11357
11358 if test $iface = no; then
11359 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11360 echo "configure:11361: checking for iface ifreq" >&5
11361 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11362   echo $ac_n "(cached) $ac_c" 1>&6
11363 else
11364   
11365 if test "$cross_compiling" = yes; then
11366   samba_cv_HAVE_IFACE_IFREQ=cross
11367 else
11368   cat > conftest.$ac_ext <<EOF
11369 #line 11370 "configure"
11370 #include "confdefs.h"
11371
11372 #define HAVE_IFACE_IFREQ 1
11373 #define AUTOCONF_TEST 1
11374 #include "confdefs.h"
11375 #include "${srcdir-.}/lib/interfaces.c"
11376 EOF
11377 if { (eval echo configure:11378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11378 then
11379   samba_cv_HAVE_IFACE_IFREQ=yes
11380 else
11381   echo "configure: failed program was:" >&5
11382   cat conftest.$ac_ext >&5
11383   rm -fr conftest*
11384   samba_cv_HAVE_IFACE_IFREQ=no
11385 fi
11386 rm -fr conftest*
11387 fi
11388
11389 fi
11390
11391 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11392 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11393     iface=yes;cat >> confdefs.h <<\EOF
11394 #define HAVE_IFACE_IFREQ 1
11395 EOF
11396
11397 fi
11398 fi
11399
11400
11401 ################################################
11402 # look for a method of setting the effective uid
11403 seteuid=no;
11404 if test $seteuid = no; then
11405 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11406 echo "configure:11407: checking for setresuid" >&5
11407 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11408   echo $ac_n "(cached) $ac_c" 1>&6
11409 else
11410   
11411 if test "$cross_compiling" = yes; then
11412   samba_cv_USE_SETRESUID=cross
11413 else
11414   cat > conftest.$ac_ext <<EOF
11415 #line 11416 "configure"
11416 #include "confdefs.h"
11417
11418 #define AUTOCONF_TEST 1
11419 #define USE_SETRESUID 1
11420 #include "confdefs.h"
11421 #include "${srcdir-.}/lib/util_sec.c"
11422 EOF
11423 if { (eval echo configure:11424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11424 then
11425   samba_cv_USE_SETRESUID=yes
11426 else
11427   echo "configure: failed program was:" >&5
11428   cat conftest.$ac_ext >&5
11429   rm -fr conftest*
11430   samba_cv_USE_SETRESUID=no
11431 fi
11432 rm -fr conftest*
11433 fi
11434
11435 fi
11436
11437 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11438 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11439     seteuid=yes;cat >> confdefs.h <<\EOF
11440 #define USE_SETRESUID 1
11441 EOF
11442
11443 fi
11444 fi
11445
11446
11447 if test $seteuid = no; then
11448 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11449 echo "configure:11450: checking for setreuid" >&5
11450 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11451   echo $ac_n "(cached) $ac_c" 1>&6
11452 else
11453   
11454 if test "$cross_compiling" = yes; then
11455   samba_cv_USE_SETREUID=cross
11456 else
11457   cat > conftest.$ac_ext <<EOF
11458 #line 11459 "configure"
11459 #include "confdefs.h"
11460
11461 #define AUTOCONF_TEST 1
11462 #define USE_SETREUID 1
11463 #include "confdefs.h"
11464 #include "${srcdir-.}/lib/util_sec.c"
11465 EOF
11466 if { (eval echo configure:11467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11467 then
11468   samba_cv_USE_SETREUID=yes
11469 else
11470   echo "configure: failed program was:" >&5
11471   cat conftest.$ac_ext >&5
11472   rm -fr conftest*
11473   samba_cv_USE_SETREUID=no
11474 fi
11475 rm -fr conftest*
11476 fi
11477
11478 fi
11479
11480 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11481 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11482     seteuid=yes;cat >> confdefs.h <<\EOF
11483 #define USE_SETREUID 1
11484 EOF
11485
11486 fi
11487 fi
11488
11489 if test $seteuid = no; then
11490 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11491 echo "configure:11492: checking for seteuid" >&5
11492 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11493   echo $ac_n "(cached) $ac_c" 1>&6
11494 else
11495   
11496 if test "$cross_compiling" = yes; then
11497   samba_cv_USE_SETEUID=cross
11498 else
11499   cat > conftest.$ac_ext <<EOF
11500 #line 11501 "configure"
11501 #include "confdefs.h"
11502
11503 #define AUTOCONF_TEST 1
11504 #define USE_SETEUID 1
11505 #include "confdefs.h"
11506 #include "${srcdir-.}/lib/util_sec.c"
11507 EOF
11508 if { (eval echo configure:11509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11509 then
11510   samba_cv_USE_SETEUID=yes
11511 else
11512   echo "configure: failed program was:" >&5
11513   cat conftest.$ac_ext >&5
11514   rm -fr conftest*
11515   samba_cv_USE_SETEUID=no
11516 fi
11517 rm -fr conftest*
11518 fi
11519
11520 fi
11521
11522 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11523 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11524     seteuid=yes;cat >> confdefs.h <<\EOF
11525 #define USE_SETEUID 1
11526 EOF
11527
11528 fi
11529 fi
11530
11531 if test $seteuid = no; then
11532 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11533 echo "configure:11534: checking for setuidx" >&5
11534 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11535   echo $ac_n "(cached) $ac_c" 1>&6
11536 else
11537   
11538 if test "$cross_compiling" = yes; then
11539   samba_cv_USE_SETUIDX=cross
11540 else
11541   cat > conftest.$ac_ext <<EOF
11542 #line 11543 "configure"
11543 #include "confdefs.h"
11544
11545 #define AUTOCONF_TEST 1
11546 #define USE_SETUIDX 1
11547 #include "confdefs.h"
11548 #include "${srcdir-.}/lib/util_sec.c"
11549 EOF
11550 if { (eval echo configure:11551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11551 then
11552   samba_cv_USE_SETUIDX=yes
11553 else
11554   echo "configure: failed program was:" >&5
11555   cat conftest.$ac_ext >&5
11556   rm -fr conftest*
11557   samba_cv_USE_SETUIDX=no
11558 fi
11559 rm -fr conftest*
11560 fi
11561
11562 fi
11563
11564 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11565 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11566     seteuid=yes;cat >> confdefs.h <<\EOF
11567 #define USE_SETUIDX 1
11568 EOF
11569
11570 fi
11571 fi
11572
11573
11574 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11575 echo "configure:11576: checking for working mmap" >&5
11576 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11577   echo $ac_n "(cached) $ac_c" 1>&6
11578 else
11579   
11580 if test "$cross_compiling" = yes; then
11581   samba_cv_HAVE_MMAP=cross
11582 else
11583   cat > conftest.$ac_ext <<EOF
11584 #line 11585 "configure"
11585 #include "confdefs.h"
11586 #include "${srcdir-.}/tests/shared_mmap.c"
11587 EOF
11588 if { (eval echo configure:11589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11589 then
11590   samba_cv_HAVE_MMAP=yes
11591 else
11592   echo "configure: failed program was:" >&5
11593   cat conftest.$ac_ext >&5
11594   rm -fr conftest*
11595   samba_cv_HAVE_MMAP=no
11596 fi
11597 rm -fr conftest*
11598 fi
11599
11600 fi
11601
11602 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11603 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11604     cat >> confdefs.h <<\EOF
11605 #define HAVE_MMAP 1
11606 EOF
11607
11608 fi
11609
11610 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11611 echo "configure:11612: checking for ftruncate needs root" >&5
11612 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11613   echo $ac_n "(cached) $ac_c" 1>&6
11614 else
11615   
11616 if test "$cross_compiling" = yes; then
11617   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11618 else
11619   cat > conftest.$ac_ext <<EOF
11620 #line 11621 "configure"
11621 #include "confdefs.h"
11622 #include "${srcdir-.}/tests/ftruncroot.c"
11623 EOF
11624 if { (eval echo configure:11625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11625 then
11626   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11627 else
11628   echo "configure: failed program was:" >&5
11629   cat conftest.$ac_ext >&5
11630   rm -fr conftest*
11631   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11632 fi
11633 rm -fr conftest*
11634 fi
11635
11636 fi
11637
11638 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11639 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11640     cat >> confdefs.h <<\EOF
11641 #define FTRUNCATE_NEEDS_ROOT 1
11642 EOF
11643
11644 fi
11645
11646 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11647 echo "configure:11648: checking for fcntl locking" >&5
11648 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11649   echo $ac_n "(cached) $ac_c" 1>&6
11650 else
11651   
11652 if test "$cross_compiling" = yes; then
11653   samba_cv_HAVE_FCNTL_LOCK=cross
11654 else
11655   cat > conftest.$ac_ext <<EOF
11656 #line 11657 "configure"
11657 #include "confdefs.h"
11658 #include "${srcdir-.}/tests/fcntl_lock.c"
11659 EOF
11660 if { (eval echo configure:11661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11661 then
11662   samba_cv_HAVE_FCNTL_LOCK=yes
11663 else
11664   echo "configure: failed program was:" >&5
11665   cat conftest.$ac_ext >&5
11666   rm -fr conftest*
11667   samba_cv_HAVE_FCNTL_LOCK=no
11668 fi
11669 rm -fr conftest*
11670 fi
11671
11672 fi
11673
11674 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11675 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11676     cat >> confdefs.h <<\EOF
11677 #define HAVE_FCNTL_LOCK 1
11678 EOF
11679
11680 fi
11681
11682 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11683 echo "configure:11684: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11684 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11685   echo $ac_n "(cached) $ac_c" 1>&6
11686 else
11687   
11688 if test "$cross_compiling" = yes; then
11689   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11690 else
11691   cat > conftest.$ac_ext <<EOF
11692 #line 11693 "configure"
11693 #include "confdefs.h"
11694 #include "${srcdir-.}/tests/fcntl_lock64.c"
11695 EOF
11696 if { (eval echo configure:11697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11697 then
11698   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11699 else
11700   echo "configure: failed program was:" >&5
11701   cat conftest.$ac_ext >&5
11702   rm -fr conftest*
11703   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11704 fi
11705 rm -fr conftest*
11706 fi
11707
11708 fi
11709
11710 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11711 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11712     cat >> confdefs.h <<\EOF
11713 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11714 EOF
11715
11716
11717 else
11718
11719
11720   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11721 echo "configure:11722: checking for 64 bit fcntl locking" >&5
11722 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11723   echo $ac_n "(cached) $ac_c" 1>&6
11724 else
11725   
11726   if test "$cross_compiling" = yes; then
11727   samba_cv_HAVE_STRUCT_FLOCK64=cross
11728 else
11729   cat > conftest.$ac_ext <<EOF
11730 #line 11731 "configure"
11731 #include "confdefs.h"
11732
11733 #if defined(HAVE_UNISTD_H)
11734 #include <unistd.h>
11735 #endif
11736 #include <stdio.h>
11737 #include <stdlib.h>
11738
11739 #ifdef HAVE_FCNTL_H
11740 #include <fcntl.h>
11741 #endif
11742
11743 #ifdef HAVE_SYS_FCNTL_H
11744 #include <sys/fcntl.h>
11745 #endif
11746 main() { struct flock64 fl64;
11747 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11748 exit(0);
11749 #else
11750 exit(1);
11751 #endif
11752 }
11753 EOF
11754 if { (eval echo configure:11755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11755 then
11756   samba_cv_HAVE_STRUCT_FLOCK64=yes
11757 else
11758   echo "configure: failed program was:" >&5
11759   cat conftest.$ac_ext >&5
11760   rm -fr conftest*
11761   samba_cv_HAVE_STRUCT_FLOCK64=no
11762 fi
11763 rm -fr conftest*
11764 fi
11765
11766 fi
11767
11768 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11769
11770   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11771       cat >> confdefs.h <<\EOF
11772 #define HAVE_STRUCT_FLOCK64 1
11773 EOF
11774
11775   fi
11776 fi
11777
11778 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11779 echo "configure:11780: checking for st_blocks in struct stat" >&5
11780 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11781   echo $ac_n "(cached) $ac_c" 1>&6
11782 else
11783   
11784 cat > conftest.$ac_ext <<EOF
11785 #line 11786 "configure"
11786 #include "confdefs.h"
11787 #include <sys/types.h>
11788 #include <sys/stat.h>
11789 #include <unistd.h>
11790 int main() {
11791 struct stat st;  st.st_blocks = 0;
11792 ; return 0; }
11793 EOF
11794 if { (eval echo configure:11795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11795   rm -rf conftest*
11796   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11797 else
11798   echo "configure: failed program was:" >&5
11799   cat conftest.$ac_ext >&5
11800   rm -rf conftest*
11801   samba_cv_HAVE_STAT_ST_BLOCKS=no
11802 fi
11803 rm -f conftest*
11804 fi
11805
11806 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11807 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11808     cat >> confdefs.h <<\EOF
11809 #define HAVE_STAT_ST_BLOCKS 1
11810 EOF
11811
11812 fi 
11813
11814 case "$host_os" in
11815 *linux*)
11816 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11817 echo "configure:11818: checking for broken RedHat 7.2 system header files" >&5
11818 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11819   echo $ac_n "(cached) $ac_c" 1>&6
11820 else
11821   
11822 cat > conftest.$ac_ext <<EOF
11823 #line 11824 "configure"
11824 #include "confdefs.h"
11825
11826 #ifdef HAVE_SYS_VFS_H
11827 #include <sys/vfs.h>
11828 #endif
11829 #ifdef HAVE_SYS_CAPABILITY_H
11830 #include <sys/capability.h>
11831 #endif
11832
11833 int main() {
11834 int i;
11835 ; return 0; }
11836 EOF
11837 if { (eval echo configure:11838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11838   rm -rf conftest*
11839   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11840 else
11841   echo "configure: failed program was:" >&5
11842   cat conftest.$ac_ext >&5
11843   rm -rf conftest*
11844   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11845 fi
11846 rm -f conftest*
11847 fi
11848
11849 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11850 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11851    cat >> confdefs.h <<\EOF
11852 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11853 EOF
11854
11855 fi
11856 ;;
11857 esac
11858
11859 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11860 echo "configure:11861: checking for broken nisplus include files" >&5
11861 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11862   echo $ac_n "(cached) $ac_c" 1>&6
11863 else
11864   
11865 cat > conftest.$ac_ext <<EOF
11866 #line 11867 "configure"
11867 #include "confdefs.h"
11868 #include <sys/acl.h>
11869 #if defined(HAVE_RPCSVC_NIS_H)
11870 #include <rpcsvc/nis.h>
11871 #endif
11872 int main() {
11873 int i;
11874 ; return 0; }
11875 EOF
11876 if { (eval echo configure:11877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11877   rm -rf conftest*
11878   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11879 else
11880   echo "configure: failed program was:" >&5
11881   cat conftest.$ac_ext >&5
11882   rm -rf conftest*
11883   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11884 fi
11885 rm -f conftest*
11886 fi
11887
11888 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11889 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11890     cat >> confdefs.h <<\EOF
11891 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11892 EOF
11893
11894 fi
11895
11896
11897 #################################################
11898 # check for smbwrapper support
11899 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11900 echo "configure:11901: checking whether to use smbwrapper" >&5
11901 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11902 if test "${with_smbwrapper+set}" = set; then
11903   withval="$with_smbwrapper"
11904    case "$withval" in
11905   yes)
11906     echo "$ac_t""yes" 1>&6
11907     cat >> confdefs.h <<\EOF
11908 #define WITH_SMBWRAPPER 1
11909 EOF
11910
11911         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11912
11913         if test x$ATTEMPT_WRAP32_BUILD = x; then
11914                 WRAP32=""
11915         else
11916                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11917         fi
11918
11919 # Conditions under which smbwrapper should not be built.
11920
11921         if test x$PICFLAG = x; then
11922            echo No support for PIC code - disabling smbwrapper and smbsh
11923            WRAP=""
11924            WRAP32=""
11925         elif test x$ac_cv_func_syscall = xno; then
11926            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11927            WRAP=""
11928            WRAP32=""
11929         fi
11930     ;;
11931   *)
11932     echo "$ac_t""no" 1>&6
11933     ;;
11934   esac 
11935 else
11936   echo "$ac_t""no" 1>&6
11937
11938 fi
11939
11940
11941 #################################################
11942 # check for AFS clear-text auth support
11943 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11944 echo "configure:11945: checking whether to use AFS clear-text auth" >&5
11945 # Check whether --with-afs or --without-afs was given.
11946 if test "${with_afs+set}" = set; then
11947   withval="$with_afs"
11948    case "$withval" in
11949   yes)
11950     echo "$ac_t""yes" 1>&6
11951     cat >> confdefs.h <<\EOF
11952 #define WITH_AFS 1
11953 EOF
11954
11955     ;;
11956   *)
11957     echo "$ac_t""no" 1>&6
11958     ;;
11959   esac 
11960 else
11961   echo "$ac_t""no" 1>&6
11962
11963 fi
11964
11965
11966
11967 #################################################
11968 # check for the DFS clear-text auth system
11969 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11970 echo "configure:11971: checking whether to use DFS clear-text auth" >&5
11971 # Check whether --with-dfs or --without-dfs was given.
11972 if test "${with_dfs+set}" = set; then
11973   withval="$with_dfs"
11974    case "$withval" in
11975   yes)
11976     echo "$ac_t""yes" 1>&6
11977     cat >> confdefs.h <<\EOF
11978 #define WITH_DFS 1
11979 EOF
11980
11981     ;;
11982   *)
11983     echo "$ac_t""no" 1>&6
11984     ;;
11985   esac 
11986 else
11987   echo "$ac_t""no" 1>&6
11988
11989 fi
11990
11991
11992
11993 #################################################
11994 # see if this box has the RedHat location for kerberos
11995 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11996 echo "configure:11997: checking for /usr/kerberos" >&5
11997 if test -d /usr/kerberos; then
11998     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11999     CFLAGS="$CFLAGS -I/usr/kerberos/include"
12000     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
12001     echo "$ac_t""yes" 1>&6
12002 else
12003     echo "$ac_t""no" 1>&6
12004 fi
12005
12006 #################################################
12007 # check for location of Kerberos 5 install
12008 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
12009 echo "configure:12010: checking for kerberos 5 install path" >&5
12010 # Check whether --with-krb5 or --without-krb5 was given.
12011 if test "${with_krb5+set}" = set; then
12012   withval="$with_krb5"
12013    case "$withval" in
12014   no)
12015     echo "$ac_t""no" 1>&6
12016     ;;
12017   *)
12018     echo "$ac_t""yes" 1>&6
12019     LIBS="$LIBS -lkrb5"
12020     CFLAGS="$CFLAGS -I$withval/include"
12021     CPPFLAGS="$CPPFLAGS -I$withval/include"
12022     LDFLAGS="$LDFLAGS -L$withval/lib"
12023     ;;
12024   esac 
12025 else
12026   echo "$ac_t""no" 1>&6
12027
12028 fi
12029
12030
12031 # now check for krb5.h. Some systems have the libraries without the headers!
12032 # note that this check is done here to allow for different kerberos
12033 # include paths
12034 for ac_hdr in krb5.h
12035 do
12036 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12037 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12038 echo "configure:12039: checking for $ac_hdr" >&5
12039 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12040   echo $ac_n "(cached) $ac_c" 1>&6
12041 else
12042   cat > conftest.$ac_ext <<EOF
12043 #line 12044 "configure"
12044 #include "confdefs.h"
12045 #include <$ac_hdr>
12046 EOF
12047 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12048 { (eval echo configure:12049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12049 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12050 if test -z "$ac_err"; then
12051   rm -rf conftest*
12052   eval "ac_cv_header_$ac_safe=yes"
12053 else
12054   echo "$ac_err" >&5
12055   echo "configure: failed program was:" >&5
12056   cat conftest.$ac_ext >&5
12057   rm -rf conftest*
12058   eval "ac_cv_header_$ac_safe=no"
12059 fi
12060 rm -f conftest*
12061 fi
12062 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12063   echo "$ac_t""yes" 1>&6
12064     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12065   cat >> confdefs.h <<EOF
12066 #define $ac_tr_hdr 1
12067 EOF
12068  
12069 else
12070   echo "$ac_t""no" 1>&6
12071 fi
12072 done
12073
12074
12075 # now check for gssapi headers.  This is also done here to allow for
12076 # different kerberos include paths
12077 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12078 do
12079 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12080 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12081 echo "configure:12082: checking for $ac_hdr" >&5
12082 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12083   echo $ac_n "(cached) $ac_c" 1>&6
12084 else
12085   cat > conftest.$ac_ext <<EOF
12086 #line 12087 "configure"
12087 #include "confdefs.h"
12088 #include <$ac_hdr>
12089 EOF
12090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12091 { (eval echo configure:12092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12092 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12093 if test -z "$ac_err"; then
12094   rm -rf conftest*
12095   eval "ac_cv_header_$ac_safe=yes"
12096 else
12097   echo "$ac_err" >&5
12098   echo "configure: failed program was:" >&5
12099   cat conftest.$ac_ext >&5
12100   rm -rf conftest*
12101   eval "ac_cv_header_$ac_safe=no"
12102 fi
12103 rm -f conftest*
12104 fi
12105 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12106   echo "$ac_t""yes" 1>&6
12107     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12108   cat >> confdefs.h <<EOF
12109 #define $ac_tr_hdr 1
12110 EOF
12111  
12112 else
12113   echo "$ac_t""no" 1>&6
12114 fi
12115 done
12116
12117
12118 ##################################################################
12119 # we might need the k5crypto and com_err libraries on some systems
12120 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12121 echo "configure:12122: checking for _et_list in -lcom_err" >&5
12122 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12123 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12124   echo $ac_n "(cached) $ac_c" 1>&6
12125 else
12126   ac_save_LIBS="$LIBS"
12127 LIBS="-lcom_err  $LIBS"
12128 cat > conftest.$ac_ext <<EOF
12129 #line 12130 "configure"
12130 #include "confdefs.h"
12131 /* Override any gcc2 internal prototype to avoid an error.  */
12132 /* We use char because int might match the return type of a gcc2
12133     builtin and then its argument prototype would still apply.  */
12134 char _et_list();
12135
12136 int main() {
12137 _et_list()
12138 ; return 0; }
12139 EOF
12140 if { (eval echo configure:12141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12141   rm -rf conftest*
12142   eval "ac_cv_lib_$ac_lib_var=yes"
12143 else
12144   echo "configure: failed program was:" >&5
12145   cat conftest.$ac_ext >&5
12146   rm -rf conftest*
12147   eval "ac_cv_lib_$ac_lib_var=no"
12148 fi
12149 rm -f conftest*
12150 LIBS="$ac_save_LIBS"
12151
12152 fi
12153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12154   echo "$ac_t""yes" 1>&6
12155   LIBS="$LIBS -lcom_err"
12156 else
12157   echo "$ac_t""no" 1>&6
12158 fi
12159
12160 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12161 echo "configure:12162: checking for krb5_encrypt_data in -lk5crypto" >&5
12162 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12163 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12164   echo $ac_n "(cached) $ac_c" 1>&6
12165 else
12166   ac_save_LIBS="$LIBS"
12167 LIBS="-lk5crypto  $LIBS"
12168 cat > conftest.$ac_ext <<EOF
12169 #line 12170 "configure"
12170 #include "confdefs.h"
12171 /* Override any gcc2 internal prototype to avoid an error.  */
12172 /* We use char because int might match the return type of a gcc2
12173     builtin and then its argument prototype would still apply.  */
12174 char krb5_encrypt_data();
12175
12176 int main() {
12177 krb5_encrypt_data()
12178 ; return 0; }
12179 EOF
12180 if { (eval echo configure:12181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12181   rm -rf conftest*
12182   eval "ac_cv_lib_$ac_lib_var=yes"
12183 else
12184   echo "configure: failed program was:" >&5
12185   cat conftest.$ac_ext >&5
12186   rm -rf conftest*
12187   eval "ac_cv_lib_$ac_lib_var=no"
12188 fi
12189 rm -f conftest*
12190 LIBS="$ac_save_LIBS"
12191
12192 fi
12193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12194   echo "$ac_t""yes" 1>&6
12195   LIBS="$LIBS -lk5crypto"
12196 else
12197   echo "$ac_t""no" 1>&6
12198 fi
12199
12200
12201 ########################################################
12202 # now see if we can find the krb5 libs in standard paths
12203 # or as specified above
12204 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12205 echo "configure:12206: checking for krb5_mk_req_extended in -lkrb5" >&5
12206 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12207 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12208   echo $ac_n "(cached) $ac_c" 1>&6
12209 else
12210   ac_save_LIBS="$LIBS"
12211 LIBS="-lkrb5  $LIBS"
12212 cat > conftest.$ac_ext <<EOF
12213 #line 12214 "configure"
12214 #include "confdefs.h"
12215 /* Override any gcc2 internal prototype to avoid an error.  */
12216 /* We use char because int might match the return type of a gcc2
12217     builtin and then its argument prototype would still apply.  */
12218 char krb5_mk_req_extended();
12219
12220 int main() {
12221 krb5_mk_req_extended()
12222 ; return 0; }
12223 EOF
12224 if { (eval echo configure:12225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12225   rm -rf conftest*
12226   eval "ac_cv_lib_$ac_lib_var=yes"
12227 else
12228   echo "configure: failed program was:" >&5
12229   cat conftest.$ac_ext >&5
12230   rm -rf conftest*
12231   eval "ac_cv_lib_$ac_lib_var=no"
12232 fi
12233 rm -f conftest*
12234 LIBS="$ac_save_LIBS"
12235
12236 fi
12237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12238   echo "$ac_t""yes" 1>&6
12239   LIBS="$LIBS -lkrb5";
12240         cat >> confdefs.h <<\EOF
12241 #define HAVE_KRB5 1
12242 EOF
12243
12244 else
12245   echo "$ac_t""no" 1>&6
12246 fi
12247
12248
12249 ########################################################
12250 # now see if we can find the gssapi libs in standard paths
12251 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12252 echo "configure:12253: checking for gss_display_status in -lgssapi_krb5" >&5
12253 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12254 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12255   echo $ac_n "(cached) $ac_c" 1>&6
12256 else
12257   ac_save_LIBS="$LIBS"
12258 LIBS="-lgssapi_krb5  $LIBS"
12259 cat > conftest.$ac_ext <<EOF
12260 #line 12261 "configure"
12261 #include "confdefs.h"
12262 /* Override any gcc2 internal prototype to avoid an error.  */
12263 /* We use char because int might match the return type of a gcc2
12264     builtin and then its argument prototype would still apply.  */
12265 char gss_display_status();
12266
12267 int main() {
12268 gss_display_status()
12269 ; return 0; }
12270 EOF
12271 if { (eval echo configure:12272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12272   rm -rf conftest*
12273   eval "ac_cv_lib_$ac_lib_var=yes"
12274 else
12275   echo "configure: failed program was:" >&5
12276   cat conftest.$ac_ext >&5
12277   rm -rf conftest*
12278   eval "ac_cv_lib_$ac_lib_var=no"
12279 fi
12280 rm -f conftest*
12281 LIBS="$ac_save_LIBS"
12282
12283 fi
12284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12285   echo "$ac_t""yes" 1>&6
12286   LIBS="$LIBS -lgssapi_krb5";
12287         cat >> confdefs.h <<\EOF
12288 #define HAVE_GSSAPI 1
12289 EOF
12290
12291 else
12292   echo "$ac_t""no" 1>&6
12293 fi
12294
12295
12296 ##################################################################
12297 # we might need the lber lib on some systems. To avoid link errors
12298 # this test must be before the libldap test
12299 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12300 echo "configure:12301: checking for ber_scanf in -llber" >&5
12301 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12302 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12303   echo $ac_n "(cached) $ac_c" 1>&6
12304 else
12305   ac_save_LIBS="$LIBS"
12306 LIBS="-llber  $LIBS"
12307 cat > conftest.$ac_ext <<EOF
12308 #line 12309 "configure"
12309 #include "confdefs.h"
12310 /* Override any gcc2 internal prototype to avoid an error.  */
12311 /* We use char because int might match the return type of a gcc2
12312     builtin and then its argument prototype would still apply.  */
12313 char ber_scanf();
12314
12315 int main() {
12316 ber_scanf()
12317 ; return 0; }
12318 EOF
12319 if { (eval echo configure:12320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12320   rm -rf conftest*
12321   eval "ac_cv_lib_$ac_lib_var=yes"
12322 else
12323   echo "configure: failed program was:" >&5
12324   cat conftest.$ac_ext >&5
12325   rm -rf conftest*
12326   eval "ac_cv_lib_$ac_lib_var=no"
12327 fi
12328 rm -f conftest*
12329 LIBS="$ac_save_LIBS"
12330
12331 fi
12332 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12333   echo "$ac_t""yes" 1>&6
12334   LIBS="$LIBS -llber"
12335 else
12336   echo "$ac_t""no" 1>&6
12337 fi
12338
12339
12340 ########################################################
12341 # now see if we can find the ldap libs in standard paths
12342 if test x$have_ldap != xyes; then
12343 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12344 echo "configure:12345: checking for ldap_domain2hostlist in -lldap" >&5
12345 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12346 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12347   echo $ac_n "(cached) $ac_c" 1>&6
12348 else
12349   ac_save_LIBS="$LIBS"
12350 LIBS="-lldap  $LIBS"
12351 cat > conftest.$ac_ext <<EOF
12352 #line 12353 "configure"
12353 #include "confdefs.h"
12354 /* Override any gcc2 internal prototype to avoid an error.  */
12355 /* We use char because int might match the return type of a gcc2
12356     builtin and then its argument prototype would still apply.  */
12357 char ldap_domain2hostlist();
12358
12359 int main() {
12360 ldap_domain2hostlist()
12361 ; return 0; }
12362 EOF
12363 if { (eval echo configure:12364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12364   rm -rf conftest*
12365   eval "ac_cv_lib_$ac_lib_var=yes"
12366 else
12367   echo "configure: failed program was:" >&5
12368   cat conftest.$ac_ext >&5
12369   rm -rf conftest*
12370   eval "ac_cv_lib_$ac_lib_var=no"
12371 fi
12372 rm -f conftest*
12373 LIBS="$ac_save_LIBS"
12374
12375 fi
12376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12377   echo "$ac_t""yes" 1>&6
12378   LIBS="$LIBS -lldap";
12379         cat >> confdefs.h <<\EOF
12380 #define HAVE_LDAP 1
12381 EOF
12382
12383 else
12384   echo "$ac_t""no" 1>&6
12385 fi
12386
12387 fi
12388
12389 #################################################
12390 # check for automount support
12391 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12392 echo "configure:12393: checking whether to use AUTOMOUNT" >&5
12393 # Check whether --with-automount or --without-automount was given.
12394 if test "${with_automount+set}" = set; then
12395   withval="$with_automount"
12396    case "$withval" in
12397   yes)
12398     echo "$ac_t""yes" 1>&6
12399     cat >> confdefs.h <<\EOF
12400 #define WITH_AUTOMOUNT 1
12401 EOF
12402
12403     ;;
12404   *)
12405     echo "$ac_t""no" 1>&6
12406     ;;
12407   esac 
12408 else
12409   echo "$ac_t""no" 1>&6
12410
12411 fi
12412
12413
12414 #################################################
12415 # check for smbmount support
12416 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12417 echo "configure:12418: checking whether to use SMBMOUNT" >&5
12418 # Check whether --with-smbmount or --without-smbmount was given.
12419 if test "${with_smbmount+set}" = set; then
12420   withval="$with_smbmount"
12421    case "$withval" in
12422   yes)
12423         case "$host_os" in
12424         *linux*)
12425                 echo "$ac_t""yes" 1>&6
12426                 cat >> confdefs.h <<\EOF
12427 #define WITH_SMBMOUNT 1
12428 EOF
12429
12430                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12431                 ;;
12432         *)
12433                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12434                 ;;
12435         esac
12436     ;;
12437   *)
12438     echo "$ac_t""no" 1>&6
12439     MPROGS=
12440     ;;
12441   esac 
12442 else
12443   echo "$ac_t""no" 1>&6
12444   MPROGS=
12445
12446 fi
12447
12448
12449
12450 #################################################
12451 # check for a PAM clear-text auth, accounts, password and session support
12452 with_pam_for_crypt=no
12453 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12454 echo "configure:12455: checking whether to use PAM" >&5
12455 # Check whether --with-pam or --without-pam was given.
12456 if test "${with_pam+set}" = set; then
12457   withval="$with_pam"
12458    case "$withval" in
12459   yes)
12460     echo "$ac_t""yes" 1>&6
12461     cat >> confdefs.h <<\EOF
12462 #define WITH_PAM 1
12463 EOF
12464
12465     LIBS="$LIBS -lpam"
12466     with_pam_for_crypt=yes
12467     ;;
12468   *)
12469     echo "$ac_t""no" 1>&6
12470     ;;
12471   esac 
12472 else
12473   echo "$ac_t""no" 1>&6
12474
12475 fi
12476
12477
12478 # we can't build a pam module if we don't have pam.
12479 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12480 echo "configure:12481: checking for pam_get_data in -lpam" >&5
12481 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12482 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12483   echo $ac_n "(cached) $ac_c" 1>&6
12484 else
12485   ac_save_LIBS="$LIBS"
12486 LIBS="-lpam  $LIBS"
12487 cat > conftest.$ac_ext <<EOF
12488 #line 12489 "configure"
12489 #include "confdefs.h"
12490 /* Override any gcc2 internal prototype to avoid an error.  */
12491 /* We use char because int might match the return type of a gcc2
12492     builtin and then its argument prototype would still apply.  */
12493 char pam_get_data();
12494
12495 int main() {
12496 pam_get_data()
12497 ; return 0; }
12498 EOF
12499 if { (eval echo configure:12500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12500   rm -rf conftest*
12501   eval "ac_cv_lib_$ac_lib_var=yes"
12502 else
12503   echo "configure: failed program was:" >&5
12504   cat conftest.$ac_ext >&5
12505   rm -rf conftest*
12506   eval "ac_cv_lib_$ac_lib_var=no"
12507 fi
12508 rm -f conftest*
12509 LIBS="$ac_save_LIBS"
12510
12511 fi
12512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12513   echo "$ac_t""yes" 1>&6
12514   cat >> confdefs.h <<\EOF
12515 #define HAVE_LIBPAM 1
12516 EOF
12517
12518 else
12519   echo "$ac_t""no" 1>&6
12520 fi
12521
12522
12523 #################################################
12524 # check for pam_smbpass support
12525 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12526 echo "configure:12527: checking whether to use pam_smbpass" >&5
12527 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12528 if test "${with_pam_smbpass+set}" = set; then
12529   withval="$with_pam_smbpass"
12530    case "$withval" in
12531   yes)
12532     echo "$ac_t""yes" 1>&6
12533
12534 # Conditions under which pam_smbpass should not be built.
12535
12536        if test x$PICFLAG = x; then
12537           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12538           PAM_MOD=""
12539        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12540           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12541           PAM_MOD=""
12542        else
12543           PAM_MOD="bin/pam_smbpass.so"
12544        fi
12545     ;;
12546   *)
12547     echo "$ac_t""no" 1>&6
12548     ;;
12549   esac 
12550 else
12551   echo "$ac_t""no" 1>&6
12552
12553 fi
12554
12555
12556
12557 ###############################################
12558 # test for where we get crypt() from, but only
12559 # if not using PAM
12560 if test $with_pam_for_crypt = no; then
12561 for ac_func in crypt
12562 do
12563 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12564 echo "configure:12565: checking for $ac_func" >&5
12565 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12566   echo $ac_n "(cached) $ac_c" 1>&6
12567 else
12568   cat > conftest.$ac_ext <<EOF
12569 #line 12570 "configure"
12570 #include "confdefs.h"
12571 /* System header to define __stub macros and hopefully few prototypes,
12572     which can conflict with char $ac_func(); below.  */
12573 #include <assert.h>
12574 /* Override any gcc2 internal prototype to avoid an error.  */
12575 /* We use char because int might match the return type of a gcc2
12576     builtin and then its argument prototype would still apply.  */
12577 char $ac_func();
12578
12579 int main() {
12580
12581 /* The GNU C library defines this for functions which it implements
12582     to always fail with ENOSYS.  Some functions are actually named
12583     something starting with __ and the normal name is an alias.  */
12584 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12585 choke me
12586 #else
12587 $ac_func();
12588 #endif
12589
12590 ; return 0; }
12591 EOF
12592 if { (eval echo configure:12593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12593   rm -rf conftest*
12594   eval "ac_cv_func_$ac_func=yes"
12595 else
12596   echo "configure: failed program was:" >&5
12597   cat conftest.$ac_ext >&5
12598   rm -rf conftest*
12599   eval "ac_cv_func_$ac_func=no"
12600 fi
12601 rm -f conftest*
12602 fi
12603
12604 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12605   echo "$ac_t""yes" 1>&6
12606     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12607   cat >> confdefs.h <<EOF
12608 #define $ac_tr_func 1
12609 EOF
12610  
12611 else
12612   echo "$ac_t""no" 1>&6
12613 fi
12614 done
12615
12616 if test x"$ac_cv_func_crypt" = x"no"; then
12617     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12618 echo "configure:12619: checking for crypt in -lcrypt" >&5
12619 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12620 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12621   echo $ac_n "(cached) $ac_c" 1>&6
12622 else
12623   ac_save_LIBS="$LIBS"
12624 LIBS="-lcrypt  $LIBS"
12625 cat > conftest.$ac_ext <<EOF
12626 #line 12627 "configure"
12627 #include "confdefs.h"
12628 /* Override any gcc2 internal prototype to avoid an error.  */
12629 /* We use char because int might match the return type of a gcc2
12630     builtin and then its argument prototype would still apply.  */
12631 char crypt();
12632
12633 int main() {
12634 crypt()
12635 ; return 0; }
12636 EOF
12637 if { (eval echo configure:12638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12638   rm -rf conftest*
12639   eval "ac_cv_lib_$ac_lib_var=yes"
12640 else
12641   echo "configure: failed program was:" >&5
12642   cat conftest.$ac_ext >&5
12643   rm -rf conftest*
12644   eval "ac_cv_lib_$ac_lib_var=no"
12645 fi
12646 rm -f conftest*
12647 LIBS="$ac_save_LIBS"
12648
12649 fi
12650 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12651   echo "$ac_t""yes" 1>&6
12652   LIBS="$LIBS -lcrypt";
12653         cat >> confdefs.h <<\EOF
12654 #define HAVE_CRYPT 1
12655 EOF
12656
12657 else
12658   echo "$ac_t""no" 1>&6
12659 fi
12660
12661 fi
12662 fi
12663
12664 ##
12665 ## moved after the check for -lcrypt in order to
12666 ## ensure that the necessary libraries are included
12667 ## check checking for truncated salt.  Wrapped by the
12668 ## $with_pam_for_crypt variable as above   --jerry
12669 ##
12670 if test $with_pam_for_crypt = no; then
12671 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12672 echo "configure:12673: checking for a crypt that needs truncated salt" >&5
12673 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12674   echo $ac_n "(cached) $ac_c" 1>&6
12675 else
12676   
12677 if test "$cross_compiling" = yes; then
12678   samba_cv_HAVE_TRUNCATED_SALT=cross
12679 else
12680   cat > conftest.$ac_ext <<EOF
12681 #line 12682 "configure"
12682 #include "confdefs.h"
12683 #include "${srcdir-.}/tests/crypttest.c"
12684 EOF
12685 if { (eval echo configure:12686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12686 then
12687   samba_cv_HAVE_TRUNCATED_SALT=no
12688 else
12689   echo "configure: failed program was:" >&5
12690   cat conftest.$ac_ext >&5
12691   rm -fr conftest*
12692   samba_cv_HAVE_TRUNCATED_SALT=yes
12693 fi
12694 rm -fr conftest*
12695 fi
12696
12697 fi
12698
12699 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12700 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12701         cat >> confdefs.h <<\EOF
12702 #define HAVE_TRUNCATED_SALT 1
12703 EOF
12704
12705 fi
12706 fi
12707
12708
12709
12710 ########################################################################################
12711 ##
12712 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12713 ##
12714 ########################################################################################
12715
12716 #################################################
12717 # check for a TDB password database
12718 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12719 echo "configure:12720: checking whether to use TDB SAM database" >&5
12720 # Check whether --with-tdbsam or --without-tdbsam was given.
12721 if test "${with_tdbsam+set}" = set; then
12722   withval="$with_tdbsam"
12723    case "$withval" in
12724   yes)
12725     echo "$ac_t""yes" 1>&6
12726     cat >> confdefs.h <<\EOF
12727 #define WITH_TDB_SAM 1
12728 EOF
12729
12730     ;;
12731   *)
12732     echo "$ac_t""no" 1>&6
12733     ;;
12734   esac 
12735 else
12736   echo "$ac_t""no" 1>&6
12737
12738 fi
12739
12740
12741 #################################################
12742 # check for a LDAP password database
12743 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
12744 echo "configure:12745: checking whether to use LDAP SAM database" >&5
12745 # Check whether --with-ldapsam or --without-ldapsam was given.
12746 if test "${with_ldapsam+set}" = set; then
12747   withval="$with_ldapsam"
12748    case "$withval" in
12749   yes)
12750     echo "$ac_t""yes" 1>&6
12751     cat >> confdefs.h <<\EOF
12752 #define WITH_LDAP_SAM 1
12753 EOF
12754
12755     LIBS="-lldap -llber $LIBS"
12756     ;;
12757   *)
12758     echo "$ac_t""no" 1>&6
12759     ;;
12760   esac 
12761 else
12762   echo "$ac_t""no" 1>&6
12763
12764 fi
12765
12766
12767 #################################################
12768 # check for a NISPLUS password database
12769 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12770 echo "configure:12771: checking whether to use NISPLUS SAM database" >&5
12771 # Check whether --with-nisplussam or --without-nisplussam was given.
12772 if test "${with_nisplussam+set}" = set; then
12773   withval="$with_nisplussam"
12774    case "$withval" in
12775   yes)
12776     echo "$ac_t""yes" 1>&6
12777     cat >> confdefs.h <<\EOF
12778 #define WITH_NISPLUS_SAM 1
12779 EOF
12780
12781     ;;
12782   *)
12783     echo "$ac_t""no" 1>&6
12784     ;;
12785   esac 
12786 else
12787   echo "$ac_t""no" 1>&6
12788
12789 fi
12790
12791
12792 ########################################################################################
12793 ##
12794 ## END OF TESTS FOR SAM BACKENDS.  
12795 ##
12796 ########################################################################################
12797
12798 #################################################
12799 # check for a NISPLUS_HOME support 
12800 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12801 echo "configure:12802: checking whether to use NISPLUS_HOME" >&5
12802 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12803 if test "${with_nisplus_home+set}" = set; then
12804   withval="$with_nisplus_home"
12805    case "$withval" in
12806   yes)
12807     echo "$ac_t""yes" 1>&6
12808     cat >> confdefs.h <<\EOF
12809 #define WITH_NISPLUS_HOME 1
12810 EOF
12811
12812     ;;
12813   *)
12814     echo "$ac_t""no" 1>&6
12815     ;;
12816   esac 
12817 else
12818   echo "$ac_t""no" 1>&6
12819
12820 fi
12821
12822
12823 #################################################
12824 # check for syslog logging
12825 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12826 echo "configure:12827: checking whether to use syslog logging" >&5
12827 # Check whether --with-syslog or --without-syslog was given.
12828 if test "${with_syslog+set}" = set; then
12829   withval="$with_syslog"
12830    case "$withval" in
12831   yes)
12832     echo "$ac_t""yes" 1>&6
12833     cat >> confdefs.h <<\EOF
12834 #define WITH_SYSLOG 1
12835 EOF
12836
12837     ;;
12838   *)
12839     echo "$ac_t""no" 1>&6
12840     ;;
12841   esac 
12842 else
12843   echo "$ac_t""no" 1>&6
12844
12845 fi
12846
12847
12848 #################################################
12849 # check for a shared memory profiling support
12850 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12851 echo "configure:12852: checking whether to use profiling" >&5
12852 # Check whether --with-profiling-data or --without-profiling-data was given.
12853 if test "${with_profiling_data+set}" = set; then
12854   withval="$with_profiling_data"
12855    case "$withval" in
12856   yes)
12857     echo "$ac_t""yes" 1>&6
12858     cat >> confdefs.h <<\EOF
12859 #define WITH_PROFILE 1
12860 EOF
12861
12862     ;;
12863   *)
12864     echo "$ac_t""no" 1>&6
12865     ;;
12866   esac 
12867 else
12868   echo "$ac_t""no" 1>&6
12869
12870 fi
12871
12872
12873
12874 #################################################
12875 # check for experimental disk-quotas support
12876 QUOTAOBJS=smbd/noquotas.o
12877
12878 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12879 echo "configure:12880: checking whether to support disk-quotas" >&5
12880 # Check whether --with-quotas or --without-quotas was given.
12881 if test "${with_quotas+set}" = set; then
12882   withval="$with_quotas"
12883    case "$withval" in
12884   yes)
12885     echo "$ac_t""yes" 1>&6
12886     case "$host_os" in
12887       *linux*)
12888         # Check for kernel 2.4.x quota braindamage...
12889         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12890 echo "configure:12891: checking for linux 2.4.x quota braindamage.." >&5
12891 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12892   echo $ac_n "(cached) $ac_c" 1>&6
12893 else
12894   
12895         cat > conftest.$ac_ext <<EOF
12896 #line 12897 "configure"
12897 #include "confdefs.h"
12898 #include <stdio.h>
12899 #include <sys/types.h>
12900 #include <asm/types.h>
12901 #include <linux/quota.h>
12902 #include <mntent.h>
12903 #include <linux/unistd.h>
12904 int main() {
12905 struct mem_dqblk D;
12906 ; return 0; }
12907 EOF
12908 if { (eval echo configure:12909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12909   rm -rf conftest*
12910   samba_cv_linux_2_4_quota_braindamage=yes
12911 else
12912   echo "configure: failed program was:" >&5
12913   cat conftest.$ac_ext >&5
12914   rm -rf conftest*
12915   samba_cv_linux_2_4_quota_braindamage=no
12916 fi
12917 rm -f conftest*
12918 fi
12919
12920 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12921 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12922         cat >> confdefs.h <<\EOF
12923 #define LINUX_QUOTAS_2 1
12924 EOF
12925
12926 else
12927         cat >> confdefs.h <<\EOF
12928 #define LINUX_QUOTAS_1 1
12929 EOF
12930
12931 fi
12932         ;;
12933       *)
12934         ;;
12935     esac
12936     QUOTAOBJS=smbd/quotas.o
12937     cat >> confdefs.h <<\EOF
12938 #define WITH_QUOTAS 1
12939 EOF
12940
12941     ;;
12942   *)
12943     echo "$ac_t""no" 1>&6
12944     ;;
12945   esac 
12946 else
12947   echo "$ac_t""no" 1>&6
12948
12949 fi
12950
12951
12952
12953 #################################################
12954 # check for experimental utmp accounting
12955
12956 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12957 echo "configure:12958: checking whether to support utmp accounting" >&5
12958 # Check whether --with-utmp or --without-utmp was given.
12959 if test "${with_utmp+set}" = set; then
12960   withval="$with_utmp"
12961    case "$withval" in
12962   yes)
12963     echo "$ac_t""yes" 1>&6
12964     cat >> confdefs.h <<\EOF
12965 #define WITH_UTMP 1
12966 EOF
12967
12968     ;;
12969   *)
12970     echo "$ac_t""no" 1>&6
12971     ;;
12972   esac 
12973 else
12974   echo "$ac_t""no" 1>&6
12975
12976 fi
12977
12978
12979 #################################################
12980 # set private directory location
12981 # Check whether --with-privatedir or --without-privatedir was given.
12982 if test "${with_privatedir+set}" = set; then
12983   withval="$with_privatedir"
12984    case "$withval" in
12985   yes|no)
12986   #
12987   # Just in case anybody calls it without argument
12988   #
12989     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12990     privatedir='${prefix}/private'
12991   ;;
12992   * )
12993     privatedir="$withval"
12994     ;;
12995   esac
12996   
12997 else
12998   privatedir='${prefix}/private'
12999    
13000
13001 fi
13002
13003
13004 #################################################
13005 # set lock directory location
13006 # Check whether --with-lockdir or --without-lockdir was given.
13007 if test "${with_lockdir+set}" = set; then
13008   withval="$with_lockdir"
13009    case "$withval" in
13010   yes|no)
13011   #
13012   # Just in case anybody calls it without argument
13013   #
13014     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
13015     lockdir='$(VARDIR)/locks'
13016   ;;
13017   * )
13018     lockdir="$withval"
13019     ;;
13020   esac
13021   
13022 else
13023   lockdir='$(VARDIR)/locks'
13024    
13025
13026 fi
13027
13028
13029 #################################################
13030 # set SWAT directory location
13031 # Check whether --with-swatdir or --without-swatdir was given.
13032 if test "${with_swatdir+set}" = set; then
13033   withval="$with_swatdir"
13034    case "$withval" in
13035   yes|no)
13036   #
13037   # Just in case anybody does it
13038   #
13039     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
13040     swatdir='${prefix}/swat'
13041   ;;
13042   * )
13043     swatdir="$withval"
13044     ;;
13045   esac
13046   
13047 else
13048   swatdir='${prefix}/swat'
13049    
13050
13051 fi
13052
13053
13054 #################################################
13055 # choose native language(s) of man pages
13056 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13057 echo "configure:13058: checking chosen man pages' language(s)" >&5
13058 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13059 if test "${with_manpages_langs+set}" = set; then
13060   withval="$with_manpages_langs"
13061    case "$withval" in
13062   yes|no)
13063     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13064     manlangs="en"
13065   ;;
13066   *)
13067     manlangs="$withval"
13068   ;;
13069   esac
13070
13071   echo "$ac_t""$manlangs" 1>&6
13072   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
13073   
13074 else
13075   manlangs="en"
13076   echo "$ac_t""$manlangs" 1>&6
13077   
13078
13079 fi
13080
13081
13082 #################################################
13083 # these tests are taken from the GNU fileutils package
13084 echo "checking how to get filesystem space usage" 1>&6
13085 echo "configure:13086: checking how to get filesystem space usage" >&5
13086 space=no
13087
13088 # Test for statvfs64.
13089 if test $space = no; then
13090   # SVR4
13091   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13092 echo "configure:13093: checking statvfs64 function (SVR4)" >&5
13093 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13094   echo $ac_n "(cached) $ac_c" 1>&6
13095 else
13096   if test "$cross_compiling" = yes; then
13097   fu_cv_sys_stat_statvfs64=cross
13098 else
13099   cat > conftest.$ac_ext <<EOF
13100 #line 13101 "configure"
13101 #include "confdefs.h"
13102
13103 #if defined(HAVE_UNISTD_H)
13104 #include <unistd.h>
13105 #endif
13106 #include <sys/types.h>
13107 #include <sys/statvfs.h>
13108   main ()
13109   {
13110     struct statvfs64 fsd;
13111     exit (statvfs64 (".", &fsd));
13112   }
13113 EOF
13114 if { (eval echo configure:13115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13115 then
13116   fu_cv_sys_stat_statvfs64=yes
13117 else
13118   echo "configure: failed program was:" >&5
13119   cat conftest.$ac_ext >&5
13120   rm -fr conftest*
13121   fu_cv_sys_stat_statvfs64=no
13122 fi
13123 rm -fr conftest*
13124 fi
13125
13126 fi
13127
13128 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13129   if test $fu_cv_sys_stat_statvfs64 = yes; then
13130     space=yes
13131     cat >> confdefs.h <<\EOF
13132 #define STAT_STATVFS64 1
13133 EOF
13134
13135   fi
13136 fi
13137
13138 # Perform only the link test since it seems there are no variants of the
13139 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13140 # because that got a false positive on SCO OSR5.  Adding the declaration
13141 # of a `struct statvfs' causes this test to fail (as it should) on such
13142 # systems.  That system is reported to work fine with STAT_STATFS4 which
13143 # is what it gets when this test fails.
13144 if test $space = no; then
13145   # SVR4
13146   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13147 echo "configure:13148: checking statvfs function (SVR4)" >&5
13148 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13149   echo $ac_n "(cached) $ac_c" 1>&6
13150 else
13151   cat > conftest.$ac_ext <<EOF
13152 #line 13153 "configure"
13153 #include "confdefs.h"
13154 #include <sys/types.h>
13155 #include <sys/statvfs.h>
13156 int main() {
13157 struct statvfs fsd; statvfs (0, &fsd);
13158 ; return 0; }
13159 EOF
13160 if { (eval echo configure:13161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13161   rm -rf conftest*
13162   fu_cv_sys_stat_statvfs=yes
13163 else
13164   echo "configure: failed program was:" >&5
13165   cat conftest.$ac_ext >&5
13166   rm -rf conftest*
13167   fu_cv_sys_stat_statvfs=no
13168 fi
13169 rm -f conftest*
13170 fi
13171
13172 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13173   if test $fu_cv_sys_stat_statvfs = yes; then
13174     space=yes
13175     cat >> confdefs.h <<\EOF
13176 #define STAT_STATVFS 1
13177 EOF
13178
13179   fi
13180 fi
13181
13182 if test $space = no; then
13183   # DEC Alpha running OSF/1
13184   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13185 echo "configure:13186: checking for 3-argument statfs function (DEC OSF/1)" >&5
13186   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13187   echo $ac_n "(cached) $ac_c" 1>&6
13188 else
13189   if test "$cross_compiling" = yes; then
13190   fu_cv_sys_stat_statfs3_osf1=no
13191 else
13192   cat > conftest.$ac_ext <<EOF
13193 #line 13194 "configure"
13194 #include "confdefs.h"
13195
13196 #include <sys/param.h>
13197 #include <sys/types.h>
13198 #include <sys/mount.h>
13199   main ()
13200   {
13201     struct statfs fsd;
13202     fsd.f_fsize = 0;
13203     exit (statfs (".", &fsd, sizeof (struct statfs)));
13204   }
13205 EOF
13206 if { (eval echo configure:13207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13207 then
13208   fu_cv_sys_stat_statfs3_osf1=yes
13209 else
13210   echo "configure: failed program was:" >&5
13211   cat conftest.$ac_ext >&5
13212   rm -fr conftest*
13213   fu_cv_sys_stat_statfs3_osf1=no
13214 fi
13215 rm -fr conftest*
13216 fi
13217
13218 fi
13219
13220   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13221   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13222     space=yes
13223     cat >> confdefs.h <<\EOF
13224 #define STAT_STATFS3_OSF1 1
13225 EOF
13226
13227   fi
13228 fi
13229
13230 if test $space = no; then
13231 # AIX
13232   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13233 echo "configure:13234: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13234   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13235   echo $ac_n "(cached) $ac_c" 1>&6
13236 else
13237   if test "$cross_compiling" = yes; then
13238   fu_cv_sys_stat_statfs2_bsize=no
13239 else
13240   cat > conftest.$ac_ext <<EOF
13241 #line 13242 "configure"
13242 #include "confdefs.h"
13243
13244 #ifdef HAVE_SYS_PARAM_H
13245 #include <sys/param.h>
13246 #endif
13247 #ifdef HAVE_SYS_MOUNT_H
13248 #include <sys/mount.h>
13249 #endif
13250 #ifdef HAVE_SYS_VFS_H
13251 #include <sys/vfs.h>
13252 #endif
13253   main ()
13254   {
13255   struct statfs fsd;
13256   fsd.f_bsize = 0;
13257   exit (statfs (".", &fsd));
13258   }
13259 EOF
13260 if { (eval echo configure:13261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13261 then
13262   fu_cv_sys_stat_statfs2_bsize=yes
13263 else
13264   echo "configure: failed program was:" >&5
13265   cat conftest.$ac_ext >&5
13266   rm -fr conftest*
13267   fu_cv_sys_stat_statfs2_bsize=no
13268 fi
13269 rm -fr conftest*
13270 fi
13271
13272 fi
13273
13274   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13275   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13276     space=yes
13277     cat >> confdefs.h <<\EOF
13278 #define STAT_STATFS2_BSIZE 1
13279 EOF
13280
13281   fi
13282 fi
13283
13284 if test $space = no; then
13285 # SVR3
13286   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13287 echo "configure:13288: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13288   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13289   echo $ac_n "(cached) $ac_c" 1>&6
13290 else
13291   if test "$cross_compiling" = yes; then
13292   fu_cv_sys_stat_statfs4=no
13293 else
13294   cat > conftest.$ac_ext <<EOF
13295 #line 13296 "configure"
13296 #include "confdefs.h"
13297 #include <sys/types.h>
13298 #include <sys/statfs.h>
13299   main ()
13300   {
13301   struct statfs fsd;
13302   exit (statfs (".", &fsd, sizeof fsd, 0));
13303   }
13304 EOF
13305 if { (eval echo configure:13306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13306 then
13307   fu_cv_sys_stat_statfs4=yes
13308 else
13309   echo "configure: failed program was:" >&5
13310   cat conftest.$ac_ext >&5
13311   rm -fr conftest*
13312   fu_cv_sys_stat_statfs4=no
13313 fi
13314 rm -fr conftest*
13315 fi
13316
13317 fi
13318
13319   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13320   if test $fu_cv_sys_stat_statfs4 = yes; then
13321     space=yes
13322     cat >> confdefs.h <<\EOF
13323 #define STAT_STATFS4 1
13324 EOF
13325
13326   fi
13327 fi
13328
13329 if test $space = no; then
13330 # 4.4BSD and NetBSD
13331   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13332 echo "configure:13333: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13333   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13334   echo $ac_n "(cached) $ac_c" 1>&6
13335 else
13336   if test "$cross_compiling" = yes; then
13337   fu_cv_sys_stat_statfs2_fsize=no
13338 else
13339   cat > conftest.$ac_ext <<EOF
13340 #line 13341 "configure"
13341 #include "confdefs.h"
13342 #include <sys/types.h>
13343 #ifdef HAVE_SYS_PARAM_H
13344 #include <sys/param.h>
13345 #endif
13346 #ifdef HAVE_SYS_MOUNT_H
13347 #include <sys/mount.h>
13348 #endif
13349   main ()
13350   {
13351   struct statfs fsd;
13352   fsd.f_fsize = 0;
13353   exit (statfs (".", &fsd));
13354   }
13355 EOF
13356 if { (eval echo configure:13357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13357 then
13358   fu_cv_sys_stat_statfs2_fsize=yes
13359 else
13360   echo "configure: failed program was:" >&5
13361   cat conftest.$ac_ext >&5
13362   rm -fr conftest*
13363   fu_cv_sys_stat_statfs2_fsize=no
13364 fi
13365 rm -fr conftest*
13366 fi
13367
13368 fi
13369
13370   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13371   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13372     space=yes
13373     cat >> confdefs.h <<\EOF
13374 #define STAT_STATFS2_FSIZE 1
13375 EOF
13376
13377   fi
13378 fi
13379
13380 if test $space = no; then
13381   # Ultrix
13382   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13383 echo "configure:13384: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13384   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13385   echo $ac_n "(cached) $ac_c" 1>&6
13386 else
13387   if test "$cross_compiling" = yes; then
13388   fu_cv_sys_stat_fs_data=no
13389 else
13390   cat > conftest.$ac_ext <<EOF
13391 #line 13392 "configure"
13392 #include "confdefs.h"
13393 #include <sys/types.h>
13394 #ifdef HAVE_SYS_PARAM_H
13395 #include <sys/param.h>
13396 #endif
13397 #ifdef HAVE_SYS_MOUNT_H
13398 #include <sys/mount.h>
13399 #endif
13400 #ifdef HAVE_SYS_FS_TYPES_H
13401 #include <sys/fs_types.h>
13402 #endif
13403   main ()
13404   {
13405   struct fs_data fsd;
13406   /* Ultrix's statfs returns 1 for success,
13407      0 for not mounted, -1 for failure.  */
13408   exit (statfs (".", &fsd) != 1);
13409   }
13410 EOF
13411 if { (eval echo configure:13412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13412 then
13413   fu_cv_sys_stat_fs_data=yes
13414 else
13415   echo "configure: failed program was:" >&5
13416   cat conftest.$ac_ext >&5
13417   rm -fr conftest*
13418   fu_cv_sys_stat_fs_data=no
13419 fi
13420 rm -fr conftest*
13421 fi
13422
13423 fi
13424
13425   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13426   if test $fu_cv_sys_stat_fs_data = yes; then
13427     space=yes
13428     cat >> confdefs.h <<\EOF
13429 #define STAT_STATFS2_FS_DATA 1
13430 EOF
13431
13432   fi
13433 fi
13434
13435 #
13436 # As a gating factor for large file support, in order to
13437 # use <4GB files we must have the following minimal support
13438 # available.
13439 # long long, and a 64 bit off_t or off64_t.
13440 # If we don't have all of these then disable large
13441 # file support.
13442 #
13443 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13444 echo "configure:13445: checking if large file support can be enabled" >&5
13445 cat > conftest.$ac_ext <<EOF
13446 #line 13447 "configure"
13447 #include "confdefs.h"
13448
13449 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13450 #include <sys/types.h>
13451 #else
13452 __COMPILE_ERROR_
13453 #endif
13454
13455 int main() {
13456 int i
13457 ; return 0; }
13458 EOF
13459 if { (eval echo configure:13460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13460   rm -rf conftest*
13461   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13462 else
13463   echo "configure: failed program was:" >&5
13464   cat conftest.$ac_ext >&5
13465   rm -rf conftest*
13466   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13467 fi
13468 rm -f conftest*
13469 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13470     cat >> confdefs.h <<\EOF
13471 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13472 EOF
13473
13474 fi
13475 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13476
13477 # Check whether --with-spinlocks or --without-spinlocks was given.
13478 if test "${with_spinlocks+set}" = set; then
13479   withval="$with_spinlocks"
13480   :
13481 fi
13482
13483 if test "x$with_spinlocks" = "xyes"; then
13484     cat >> confdefs.h <<\EOF
13485 #define USE_SPINLOCKS 1
13486 EOF
13487
13488
13489     case "$host_cpu" in
13490         sparc)
13491             cat >> confdefs.h <<\EOF
13492 #define SPARC_SPINLOCKS 1
13493 EOF
13494
13495             ;;
13496
13497         i386|i486|i586|i686)
13498             cat >> confdefs.h <<\EOF
13499 #define INTEL_SPINLOCKS 1
13500 EOF
13501
13502             ;;
13503
13504         mips)
13505             cat >> confdefs.h <<\EOF
13506 #define MIPS_SPINLOCKS 1
13507 EOF
13508
13509             ;;
13510
13511         powerpc)
13512             cat >> confdefs.h <<\EOF
13513 #define POWERPC_SPINLOCKS 1
13514 EOF
13515
13516             ;;
13517     esac
13518 fi
13519
13520 #################################################
13521 # check for ACL support
13522
13523 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13524 echo "configure:13525: checking whether to support ACLs" >&5
13525 # Check whether --with-acl-support or --without-acl-support was given.
13526 if test "${with_acl_support+set}" = set; then
13527   withval="$with_acl_support"
13528    case "$withval" in
13529   yes)
13530
13531         case "$host_os" in
13532         *sysv5*)
13533                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13534                 cat >> confdefs.h <<\EOF
13535 #define HAVE_UNIXWARE_ACLS 1
13536 EOF
13537
13538                 ;;
13539         *solaris*)
13540                 echo "$ac_t""Using solaris ACLs" 1>&6
13541                 cat >> confdefs.h <<\EOF
13542 #define HAVE_SOLARIS_ACLS 1
13543 EOF
13544
13545                 ;;
13546         *hpux*)
13547                 echo "$ac_t""Using HPUX ACLs" 1>&6
13548                 cat >> confdefs.h <<\EOF
13549 #define HAVE_HPUX_ACLS 1
13550 EOF
13551
13552                 ;;
13553         *irix*)
13554                 echo "$ac_t""Using IRIX ACLs" 1>&6
13555                 cat >> confdefs.h <<\EOF
13556 #define HAVE_IRIX_ACLS 1
13557 EOF
13558
13559                 ;;
13560         *aix*)
13561                 echo "$ac_t""Using AIX ACLs" 1>&6
13562                 cat >> confdefs.h <<\EOF
13563 #define HAVE_AIX_ACLS 1
13564 EOF
13565
13566                 ;;
13567         *osf*)
13568                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13569                 cat >> confdefs.h <<\EOF
13570 #define HAVE_TRU64_ACLS 1
13571 EOF
13572
13573                 LIBS="$LIBS -lpacl"
13574                 ;;
13575         *)
13576                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13577 echo "configure:13578: checking for acl_get_file in -lacl" >&5
13578 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13579 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13580   echo $ac_n "(cached) $ac_c" 1>&6
13581 else
13582   ac_save_LIBS="$LIBS"
13583 LIBS="-lacl  $LIBS"
13584 cat > conftest.$ac_ext <<EOF
13585 #line 13586 "configure"
13586 #include "confdefs.h"
13587 /* Override any gcc2 internal prototype to avoid an error.  */
13588 /* We use char because int might match the return type of a gcc2
13589     builtin and then its argument prototype would still apply.  */
13590 char acl_get_file();
13591
13592 int main() {
13593 acl_get_file()
13594 ; return 0; }
13595 EOF
13596 if { (eval echo configure:13597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13597   rm -rf conftest*
13598   eval "ac_cv_lib_$ac_lib_var=yes"
13599 else
13600   echo "configure: failed program was:" >&5
13601   cat conftest.$ac_ext >&5
13602   rm -rf conftest*
13603   eval "ac_cv_lib_$ac_lib_var=no"
13604 fi
13605 rm -f conftest*
13606 LIBS="$ac_save_LIBS"
13607
13608 fi
13609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13610   echo "$ac_t""yes" 1>&6
13611     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13612     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13613   cat >> confdefs.h <<EOF
13614 #define $ac_tr_lib 1
13615 EOF
13616
13617   LIBS="-lacl $LIBS"
13618
13619 else
13620   echo "$ac_t""no" 1>&6
13621 fi
13622
13623                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13624 echo "configure:13625: checking for ACL support" >&5
13625 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13626   echo $ac_n "(cached) $ac_c" 1>&6
13627 else
13628   
13629                 cat > conftest.$ac_ext <<EOF
13630 #line 13631 "configure"
13631 #include "confdefs.h"
13632 #include <sys/types.h>
13633 #include <sys/acl.h>
13634 int main() {
13635  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13636 ; return 0; }
13637 EOF
13638 if { (eval echo configure:13639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13639   rm -rf conftest*
13640   samba_cv_HAVE_POSIX_ACLS=yes
13641 else
13642   echo "configure: failed program was:" >&5
13643   cat conftest.$ac_ext >&5
13644   rm -rf conftest*
13645   samba_cv_HAVE_POSIX_ACLS=no
13646 fi
13647 rm -f conftest*
13648 fi
13649
13650 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13651                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13652                                 echo "$ac_t""Using posix ACLs" 1>&6
13653                                 cat >> confdefs.h <<\EOF
13654 #define HAVE_POSIX_ACLS 1
13655 EOF
13656
13657                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13658 echo "configure:13659: checking for acl_get_perm_np" >&5
13659 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13660   echo $ac_n "(cached) $ac_c" 1>&6
13661 else
13662   
13663                                 cat > conftest.$ac_ext <<EOF
13664 #line 13665 "configure"
13665 #include "confdefs.h"
13666 #include <sys/types.h>
13667 #include <sys/acl.h>
13668 int main() {
13669  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13670 ; return 0; }
13671 EOF
13672 if { (eval echo configure:13673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13673   rm -rf conftest*
13674   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13675 else
13676   echo "configure: failed program was:" >&5
13677   cat conftest.$ac_ext >&5
13678   rm -rf conftest*
13679   samba_cv_HAVE_ACL_GET_PERM_NP=no
13680 fi
13681 rm -f conftest*
13682 fi
13683
13684 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13685                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13686                                         cat >> confdefs.h <<\EOF
13687 #define HAVE_ACL_GET_PERM_NP 1
13688 EOF
13689
13690                                 fi
13691                         fi
13692             ;;
13693         esac
13694         ;;
13695   *)
13696     echo "$ac_t""no" 1>&6
13697     cat >> confdefs.h <<\EOF
13698 #define HAVE_NO_ACLS 1
13699 EOF
13700
13701     ;;
13702   esac 
13703 else
13704   cat >> confdefs.h <<\EOF
13705 #define HAVE_NO_ACLS 1
13706 EOF
13707
13708   echo "$ac_t""no" 1>&6
13709
13710 fi
13711
13712
13713 #################################################
13714 # Check whether winbind is supported on this platform.  If so we need to
13715 # build and install client programs (WINBIND_TARGETS), sbin programs
13716 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13717
13718 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13719 echo "configure:13720: checking whether to build winbind" >&5
13720
13721 # Initially, the value of $host_os decides whether winbind is supported
13722
13723 case "$host_os" in
13724         *linux*|*irix*)
13725                 HAVE_WINBIND=yes
13726                 ;;
13727         *solaris*)
13728                 HAVE_WINBIND=yes
13729                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13730                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
13731                 ;;
13732         *hpux11*)
13733                 HAVE_WINBIND=yes
13734                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13735                 ;;
13736         *)
13737                 HAVE_WINBIND=no
13738                 winbind_no_reason=", unsupported on $host_os"
13739                 ;;
13740 esac
13741
13742 # Check the setting of --with-winbindd
13743
13744 # Check whether --with-winbind or --without-winbind was given.
13745 if test "${with_winbind+set}" = set; then
13746   withval="$with_winbind"
13747    
13748   case "$withval" in
13749         yes)
13750                 HAVE_WINBIND=yes
13751                 ;;
13752         no)
13753                 HAVE_WINBIND=no
13754                 winbind_reason=""
13755                 ;;
13756   esac 
13757 fi
13758
13759
13760 # We need unix domain sockets for winbind
13761
13762 if test x"$HAVE_WINBIND" = x"yes"; then
13763         if test x"$samba_cv_unixsocket" = x"no"; then
13764                 winbind_no_reason=", no unix domain socket support on $host_os"
13765                 HAVE_WINBIND=no
13766         fi
13767 fi
13768
13769 # Display test results
13770
13771 WINBIND_TARGETS=""
13772 WINBIND_STARGETS=""
13773 WINBIND_LTARGETS=""
13774 WINBIND_PAM_PROGS=""
13775
13776 if test x"$HAVE_WINBIND" = x"yes"; then
13777         echo "$ac_t""yes" 1>&6
13778
13779         WINBIND_TARGETS="bin/wbinfo"
13780         WINBIND_STARGETS="bin/winbindd"
13781         if test x"$BLDSHARED" = x"true"; then
13782                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13783                 if test x"$with_pam" = x"yes"; then
13784                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13785                 fi
13786         fi
13787 else
13788         echo "$ac_t""no$winbind_no_reason" 1>&6
13789 fi
13790
13791 # Substitution time!
13792
13793
13794
13795
13796
13797
13798
13799
13800 # Solaris has some extra fields in struct passwd that need to be
13801 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
13802 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
13803 # this. 
13804
13805 #AC_CHECK_MEMBER(struct passwd.pw_comment,
13806 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
13807 #               [#include <pwd.h>])
13808
13809 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
13810 echo "configure:13811: checking whether struct passwd has pw_comment" >&5
13811 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
13812   echo $ac_n "(cached) $ac_c" 1>&6
13813 else
13814   
13815     cat > conftest.$ac_ext <<EOF
13816 #line 13817 "configure"
13817 #include "confdefs.h"
13818 #include <pwd.h>
13819 int main() {
13820 struct passwd p; p.pw_comment;
13821 ; return 0; }
13822 EOF
13823 if { (eval echo configure:13824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13824   rm -rf conftest*
13825   samba_cv_passwd_pw_comment=yes
13826 else
13827   echo "configure: failed program was:" >&5
13828   cat conftest.$ac_ext >&5
13829   rm -rf conftest*
13830   samba_cv_passwd_pw_comment=no
13831 fi
13832 rm -f conftest*
13833 fi
13834
13835 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
13836 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
13837    cat >> confdefs.h <<\EOF
13838 #define HAVE_PASSWD_PW_COMMENT 1
13839 EOF
13840
13841 fi
13842
13843 #AC_CHECK_MEMBER(struct passwd.pw_age,
13844 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
13845 #               [#include <pwd.h>])
13846
13847 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
13848 echo "configure:13849: checking whether struct passwd has pw_age" >&5
13849 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
13850   echo $ac_n "(cached) $ac_c" 1>&6
13851 else
13852   
13853     cat > conftest.$ac_ext <<EOF
13854 #line 13855 "configure"
13855 #include "confdefs.h"
13856 #include <pwd.h>
13857 int main() {
13858 struct passwd p; p.pw_age;
13859 ; return 0; }
13860 EOF
13861 if { (eval echo configure:13862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13862   rm -rf conftest*
13863   samba_cv_passwd_pw_age=yes
13864 else
13865   echo "configure: failed program was:" >&5
13866   cat conftest.$ac_ext >&5
13867   rm -rf conftest*
13868   samba_cv_passwd_pw_age=no
13869 fi
13870 rm -f conftest*
13871 fi
13872
13873 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
13874 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
13875    cat >> confdefs.h <<\EOF
13876 #define HAVE_PASSWD_PW_AGE 1
13877 EOF
13878
13879 fi
13880
13881 #################################################
13882 # Check to see if we should use the included popt 
13883
13884 # Check whether --with-included-popt or --without-included-popt was given.
13885 if test "${with_included_popt+set}" = set; then
13886   withval="$with_included_popt"
13887    
13888   case "$withval" in
13889         yes)
13890                 INCLUDED_POPT=yes
13891                 ;;
13892         no)
13893                 INCLUDED_POPT=no
13894                 ;;
13895   esac 
13896 fi
13897
13898 if test x"$INCLUDED_POPT" != x"yes"; then
13899     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13900 echo "configure:13901: checking for poptGetContext in -lpopt" >&5
13901 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13902 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13903   echo $ac_n "(cached) $ac_c" 1>&6
13904 else
13905   ac_save_LIBS="$LIBS"
13906 LIBS="-lpopt  $LIBS"
13907 cat > conftest.$ac_ext <<EOF
13908 #line 13909 "configure"
13909 #include "confdefs.h"
13910 /* Override any gcc2 internal prototype to avoid an error.  */
13911 /* We use char because int might match the return type of a gcc2
13912     builtin and then its argument prototype would still apply.  */
13913 char poptGetContext();
13914
13915 int main() {
13916 poptGetContext()
13917 ; return 0; }
13918 EOF
13919 if { (eval echo configure:13920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13920   rm -rf conftest*
13921   eval "ac_cv_lib_$ac_lib_var=yes"
13922 else
13923   echo "configure: failed program was:" >&5
13924   cat conftest.$ac_ext >&5
13925   rm -rf conftest*
13926   eval "ac_cv_lib_$ac_lib_var=no"
13927 fi
13928 rm -f conftest*
13929 LIBS="$ac_save_LIBS"
13930
13931 fi
13932 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13933   echo "$ac_t""yes" 1>&6
13934   INCLUDED_POPT=no
13935 else
13936   echo "$ac_t""no" 1>&6
13937 INCLUDED_POPT=yes
13938 fi
13939
13940 fi
13941
13942 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13943 echo "configure:13944: checking whether to use included popt" >&5
13944 if test x"$INCLUDED_POPT" = x"yes"; then
13945     echo "$ac_t""$srcdir/popt" 1>&6
13946     BUILD_POPT='$(POPT_OBJS)'
13947     FLAGS1="-I$srcdir/popt"
13948 else
13949     echo "$ac_t""no" 1>&6
13950     LIBS="$LIBS -lpopt"
13951 fi
13952
13953
13954
13955 #################################################
13956 # do extra things if we are running insure
13957
13958 if test "${ac_cv_prog_CC}" = "insure"; then
13959         CPPFLAGS="$CPPFLAGS -D__INSURE__"
13960 fi
13961
13962 #################################################
13963 # final configure stuff
13964
13965 echo $ac_n "checking configure summary""... $ac_c" 1>&6
13966 echo "configure:13967: checking configure summary" >&5
13967 if test "$cross_compiling" = yes; then
13968   echo "configure: warning: cannot run when cross-compiling" 1>&2
13969 else
13970   cat > conftest.$ac_ext <<EOF
13971 #line 13972 "configure"
13972 #include "confdefs.h"
13973 #include "${srcdir-.}/tests/summary.c"
13974 EOF
13975 if { (eval echo configure:13976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13976 then
13977   echo "$ac_t""yes" 1>&6
13978 else
13979   echo "configure: failed program was:" >&5
13980   cat conftest.$ac_ext >&5
13981   rm -fr conftest*
13982   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
13983 fi
13984 rm -fr conftest*
13985 fi
13986
13987
13988 builddir=`pwd`
13989
13990
13991 trap '' 1 2 15
13992 cat > confcache <<\EOF
13993 # This file is a shell script that caches the results of configure
13994 # tests run on this system so they can be shared between configure
13995 # scripts and configure runs.  It is not useful on other systems.
13996 # If it contains results you don't want to keep, you may remove or edit it.
13997 #
13998 # By default, configure uses ./config.cache as the cache file,
13999 # creating it if it does not exist already.  You can give configure
14000 # the --cache-file=FILE option to use a different cache file; that is
14001 # what configure does when it calls configure scripts in
14002 # subdirectories, so they share the cache.
14003 # Giving --cache-file=/dev/null disables caching, for debugging configure.
14004 # config.status only pays attention to the cache file if you give it the
14005 # --recheck option to rerun configure.
14006 #
14007 EOF
14008 # The following way of writing the cache mishandles newlines in values,
14009 # but we know of no workaround that is simple, portable, and efficient.
14010 # So, don't put newlines in cache variables' values.
14011 # Ultrix sh set writes to stderr and can't be redirected directly,
14012 # and sets the high bit in the cache file unless we assign to the vars.
14013 (set) 2>&1 |
14014   case `(ac_space=' '; set | grep ac_space) 2>&1` in
14015   *ac_space=\ *)
14016     # `set' does not quote correctly, so add quotes (double-quote substitution
14017     # turns \\\\ into \\, and sed turns \\ into \).
14018     sed -n \
14019       -e "s/'/'\\\\''/g" \
14020       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
14021     ;;
14022   *)
14023     # `set' quotes correctly as required by POSIX, so do not add quotes.
14024     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
14025     ;;
14026   esac >> confcache
14027 if cmp -s $cache_file confcache; then
14028   :
14029 else
14030   if test -w $cache_file; then
14031     echo "updating cache $cache_file"
14032     cat confcache > $cache_file
14033   else
14034     echo "not updating unwritable cache $cache_file"
14035   fi
14036 fi
14037 rm -f confcache
14038
14039 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14040
14041 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14042 # Let make expand exec_prefix.
14043 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14044
14045 # Any assignment to VPATH causes Sun make to only execute
14046 # the first set of double-colon rules, so remove it if not needed.
14047 # If there is a colon in the path, we need to keep it.
14048 if test "x$srcdir" = x.; then
14049   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14050 fi
14051
14052 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14053
14054 DEFS=-DHAVE_CONFIG_H
14055
14056 # Without the "./", some shells look in PATH for config.status.
14057 : ${CONFIG_STATUS=./config.status}
14058
14059 echo creating $CONFIG_STATUS
14060 rm -f $CONFIG_STATUS
14061 cat > $CONFIG_STATUS <<EOF
14062 #! /bin/sh
14063 # Generated automatically by configure.
14064 # Run this file to recreate the current configuration.
14065 # This directory was configured as follows,
14066 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14067 #
14068 # $0 $ac_configure_args
14069 #
14070 # Compiler output produced by configure, useful for debugging
14071 # configure, is in ./config.log if it exists.
14072
14073 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14074 for ac_option
14075 do
14076   case "\$ac_option" in
14077   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14078     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14079     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14080   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14081     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14082     exit 0 ;;
14083   -help | --help | --hel | --he | --h)
14084     echo "\$ac_cs_usage"; exit 0 ;;
14085   *) echo "\$ac_cs_usage"; exit 1 ;;
14086   esac
14087 done
14088
14089 ac_given_srcdir=$srcdir
14090 ac_given_INSTALL="$INSTALL"
14091
14092 trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14093 EOF
14094 cat >> $CONFIG_STATUS <<EOF
14095
14096 # Protect against being on the right side of a sed subst in config.status.
14097 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14098  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14099 $ac_vpsub
14100 $extrasub
14101 s%@SHELL@%$SHELL%g
14102 s%@CFLAGS@%$CFLAGS%g
14103 s%@CPPFLAGS@%$CPPFLAGS%g
14104 s%@CXXFLAGS@%$CXXFLAGS%g
14105 s%@FFLAGS@%$FFLAGS%g
14106 s%@DEFS@%$DEFS%g
14107 s%@LDFLAGS@%$LDFLAGS%g
14108 s%@LIBS@%$LIBS%g
14109 s%@exec_prefix@%$exec_prefix%g
14110 s%@prefix@%$prefix%g
14111 s%@program_transform_name@%$program_transform_name%g
14112 s%@bindir@%$bindir%g
14113 s%@sbindir@%$sbindir%g
14114 s%@libexecdir@%$libexecdir%g
14115 s%@datadir@%$datadir%g
14116 s%@sysconfdir@%$sysconfdir%g
14117 s%@sharedstatedir@%$sharedstatedir%g
14118 s%@localstatedir@%$localstatedir%g
14119 s%@libdir@%$libdir%g
14120 s%@includedir@%$includedir%g
14121 s%@oldincludedir@%$oldincludedir%g
14122 s%@infodir@%$infodir%g
14123 s%@mandir@%$mandir%g
14124 s%@codepagedir@%$codepagedir%g
14125 s%@configdir@%$configdir%g
14126 s%@lockdir@%$lockdir%g
14127 s%@piddir@%$piddir%g
14128 s%@logfilebase@%$logfilebase%g
14129 s%@privatedir@%$privatedir%g
14130 s%@swatdir@%$swatdir%g
14131 s%@RUNPROG@%$RUNPROG%g
14132 s%@MPROGS@%$MPROGS%g
14133 s%@LDSHFLAGS@%$LDSHFLAGS%g
14134 s%@SHLD@%$SHLD%g
14135 s%@HOST_OS@%$HOST_OS%g
14136 s%@PAM_MOD@%$PAM_MOD%g
14137 s%@WRAP@%$WRAP%g
14138 s%@WRAP32@%$WRAP32%g
14139 s%@PICFLAG@%$PICFLAG%g
14140 s%@PICSUFFIX@%$PICSUFFIX%g
14141 s%@POBAD_CC@%$POBAD_CC%g
14142 s%@SHLIBEXT@%$SHLIBEXT%g
14143 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14144 s%@CC@%$CC%g
14145 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14146 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14147 s%@INSTALL_DATA@%$INSTALL_DATA%g
14148 s%@AWK@%$AWK%g
14149 s%@BROKEN_CC@%$BROKEN_CC%g
14150 s%@host@%$host%g
14151 s%@host_alias@%$host_alias%g
14152 s%@host_cpu@%$host_cpu%g
14153 s%@host_vendor@%$host_vendor%g
14154 s%@host_os@%$host_os%g
14155 s%@target@%$target%g
14156 s%@target_alias@%$target_alias%g
14157 s%@target_cpu@%$target_cpu%g
14158 s%@target_vendor@%$target_vendor%g
14159 s%@target_os@%$target_os%g
14160 s%@build@%$build%g
14161 s%@build_alias@%$build_alias%g
14162 s%@build_cpu@%$build_cpu%g
14163 s%@build_vendor@%$build_vendor%g
14164 s%@build_os@%$build_os%g
14165 s%@CPP@%$CPP%g
14166 s%@LIBOBJS@%$LIBOBJS%g
14167 s%@TERMLIBS@%$TERMLIBS%g
14168 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14169 s%@ROFF@%$ROFF%g
14170 s%@DYNEXP@%$DYNEXP%g
14171 s%@QUOTAOBJS@%$QUOTAOBJS%g
14172 s%@manlangs@%$manlangs%g
14173 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14174 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14175 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14176 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
14177 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
14178 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
14179 s%@BUILD_POPT@%$BUILD_POPT%g
14180 s%@FLAGS1@%$FLAGS1%g
14181 s%@builddir@%$builddir%g
14182
14183 CEOF
14184 EOF
14185
14186 cat >> $CONFIG_STATUS <<\EOF
14187
14188 # Split the substitutions into bite-sized pieces for seds with
14189 # small command number limits, like on Digital OSF/1 and HP-UX.
14190 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14191 ac_file=1 # Number of current file.
14192 ac_beg=1 # First line for current file.
14193 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14194 ac_more_lines=:
14195 ac_sed_cmds=""
14196 while $ac_more_lines; do
14197   if test $ac_beg -gt 1; then
14198     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14199   else
14200     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14201   fi
14202   if test ! -s conftest.s$ac_file; then
14203     ac_more_lines=false
14204     rm -f conftest.s$ac_file
14205   else
14206     if test -z "$ac_sed_cmds"; then
14207       ac_sed_cmds="sed -f conftest.s$ac_file"
14208     else
14209       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14210     fi
14211     ac_file=`expr $ac_file + 1`
14212     ac_beg=$ac_end
14213     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14214   fi
14215 done
14216 if test -z "$ac_sed_cmds"; then
14217   ac_sed_cmds=cat
14218 fi
14219 EOF
14220
14221 cat >> $CONFIG_STATUS <<EOF
14222
14223 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb"}
14224 EOF
14225 cat >> $CONFIG_STATUS <<\EOF
14226 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14227   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14228   case "$ac_file" in
14229   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14230        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14231   *) ac_file_in="${ac_file}.in" ;;
14232   esac
14233
14234   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14235
14236   # Remove last slash and all that follows it.  Not all systems have dirname.
14237   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14238   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14239     # The file is in a subdirectory.
14240     test ! -d "$ac_dir" && mkdir "$ac_dir"
14241     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14242     # A "../" for each directory in $ac_dir_suffix.
14243     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14244   else
14245     ac_dir_suffix= ac_dots=
14246   fi
14247
14248   case "$ac_given_srcdir" in
14249   .)  srcdir=.
14250       if test -z "$ac_dots"; then top_srcdir=.
14251       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14252   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14253   *) # Relative path.
14254     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14255     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14256   esac
14257
14258   case "$ac_given_INSTALL" in
14259   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14260   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14261   esac
14262
14263   echo creating "$ac_file"
14264   rm -f "$ac_file"
14265   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14266   case "$ac_file" in
14267   *Makefile*) ac_comsub="1i\\
14268 # $configure_input" ;;
14269   *) ac_comsub= ;;
14270   esac
14271
14272   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14273   sed -e "$ac_comsub
14274 s%@configure_input@%$configure_input%g
14275 s%@srcdir@%$srcdir%g
14276 s%@top_srcdir@%$top_srcdir%g
14277 s%@INSTALL@%$INSTALL%g
14278 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14279 fi; done
14280 rm -f conftest.s*
14281
14282 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14283 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14284 #
14285 # ac_d sets the value in "#define NAME VALUE" lines.
14286 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14287 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14288 ac_dC='\3'
14289 ac_dD='%g'
14290 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14291 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14292 ac_uB='\([      ]\)%\1#\2define\3'
14293 ac_uC=' '
14294 ac_uD='\4%g'
14295 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14296 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14297 ac_eB='$%\1#\2define\3'
14298 ac_eC=' '
14299 ac_eD='%g'
14300
14301 if test "${CONFIG_HEADERS+set}" != set; then
14302 EOF
14303 cat >> $CONFIG_STATUS <<EOF
14304   CONFIG_HEADERS="include/config.h"
14305 EOF
14306 cat >> $CONFIG_STATUS <<\EOF
14307 fi
14308 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14309   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14310   case "$ac_file" in
14311   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14312        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14313   *) ac_file_in="${ac_file}.in" ;;
14314   esac
14315
14316   echo creating $ac_file
14317
14318   rm -f conftest.frag conftest.in conftest.out
14319   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14320   cat $ac_file_inputs > conftest.in
14321
14322 EOF
14323
14324 # Transform confdefs.h into a sed script conftest.vals that substitutes
14325 # the proper values into config.h.in to produce config.h.  And first:
14326 # Protect against being on the right side of a sed subst in config.status.
14327 # Protect against being in an unquoted here document in config.status.
14328 rm -f conftest.vals
14329 cat > conftest.hdr <<\EOF
14330 s/[\\&%]/\\&/g
14331 s%[\\$`]%\\&%g
14332 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14333 s%ac_d%ac_u%gp
14334 s%ac_u%ac_e%gp
14335 EOF
14336 sed -n -f conftest.hdr confdefs.h > conftest.vals
14337 rm -f conftest.hdr
14338
14339 # This sed command replaces #undef with comments.  This is necessary, for
14340 # example, in the case of _POSIX_SOURCE, which is predefined and required
14341 # on some systems where configure will not decide to define it.
14342 cat >> conftest.vals <<\EOF
14343 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14344 EOF
14345
14346 # Break up conftest.vals because some shells have a limit on
14347 # the size of here documents, and old seds have small limits too.
14348
14349 rm -f conftest.tail
14350 while :
14351 do
14352   ac_lines=`grep -c . conftest.vals`
14353   # grep -c gives empty output for an empty file on some AIX systems.
14354   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14355   # Write a limited-size here document to conftest.frag.
14356   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14357   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14358   echo 'CEOF
14359   sed -f conftest.frag conftest.in > conftest.out
14360   rm -f conftest.in
14361   mv conftest.out conftest.in
14362 ' >> $CONFIG_STATUS
14363   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14364   rm -f conftest.vals
14365   mv conftest.tail conftest.vals
14366 done
14367 rm -f conftest.vals
14368
14369 cat >> $CONFIG_STATUS <<\EOF
14370   rm -f conftest.frag conftest.h
14371   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14372   cat conftest.in >> conftest.h
14373   rm -f conftest.in
14374   if cmp -s $ac_file conftest.h 2>/dev/null; then
14375     echo "$ac_file is unchanged"
14376     rm -f conftest.h
14377   else
14378     # Remove last slash and all that follows it.  Not all systems have dirname.
14379       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14380       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14381       # The file is in a subdirectory.
14382       test ! -d "$ac_dir" && mkdir "$ac_dir"
14383     fi
14384     rm -f $ac_file
14385     mv conftest.h $ac_file
14386   fi
14387 fi; done
14388
14389 EOF
14390 cat >> $CONFIG_STATUS <<EOF
14391
14392 EOF
14393 cat >> $CONFIG_STATUS <<\EOF
14394
14395 exit 0
14396 EOF
14397 chmod +x $CONFIG_STATUS
14398 rm -fr confdefs* $ac_clean_files
14399 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14400
14401
14402 #################################################
14403 # Print very concise instructions on building/use
14404 if test "x$enable_dmalloc" = xyes
14405 then
14406         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14407         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14408 fi