Commit an updated configure, but the build_farm should run autoconf!
[nivanova/samba-autobuild/.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --enable-debug        turn on debugging [default=no]"
17 ac_help="$ac_help
18   --with-codepagedir=DIR     Where to put codepage files (\$libdir/codepages)"
19 ac_help="$ac_help
20   --with-readline[=DIR]   Look for readline include/libs in DIR
21   --without-readline      Don't include readline support"
22 ac_help="$ac_help
23   --with-smbwrapper     Include SMB wrapper support
24   --without-smbwrapper  Don't include SMB wrapper support (default)"
25 ac_help="$ac_help
26   --with-afs     Include AFS support
27   --without-afs  Don't include AFS support (default)"
28 ac_help="$ac_help
29   --with-dfs     Include DFS support
30   --without-dfs  Don't include DFS support (default)"
31 ac_help="$ac_help
32   --with-krb4=base-dir     Include Kerberos IV support
33   --without-krb4          Don't include Kerberos IV support (default)"
34 ac_help="$ac_help
35   --with-krb5=base-dir     Include Kerberos 5 support
36   --without-krb5          Don't include Kerberos 5 support (default)"
37 ac_help="$ac_help
38   --with-automount     Include AUTOMOUNT support
39   --without-automount  Don't include AUTOMOUNT support (default)"
40 ac_help="$ac_help
41   --with-smbmount     Include SMBMOUNT (Linux only) support
42   --without-smbmount  Don't include SMBMOUNT support (default)"
43 ac_help="$ac_help
44   --with-pam     Include PAM password database support
45   --without-pam  Don't include PAM password database support (default)"
46 ac_help="$ac_help
47   --with-pam_smbpass     Include the smbpass PAM module
48   --without-pam_smbpass  Don't include the smbpass PAM module (default)"
49 ac_help="$ac_help
50   --with-tdbsam   Include experimental TDB password database
51   --without-tdbsam  Don't include experimental TDB password database (default)"
52 ac_help="$ac_help
53   --with-ldap     Include LDAP support
54   --without-ldap  Don't include LDAP support (default)"
55 ac_help="$ac_help
56   --with-nisplus     Include NISPLUS password database support
57   --without-nisplus  Don't include NISPLUS password database support (default)"
58 ac_help="$ac_help
59   --with-nisplus-home     Include NISPLUS_HOME support
60   --without-nisplus-home  Don't include NISPLUS_HOME support (default)"
61 ac_help="$ac_help
62   --with-ssl     Include SSL support
63   --without-ssl  Don't include SSL support (default)
64   --with-sslinc=DIR Where the SSL includes are (defaults to /usr/local/ssl)"
65 ac_help="$ac_help
66   --with-syslog     Include experimental SYSLOG support
67   --without-syslog  Don't include SYSLOG support (default)"
68 ac_help="$ac_help
69   --with-profile     Include profile support
70   --without-profile  Don't include profile support (default)"
71 ac_help="$ac_help
72   --with-netatalk     Include experimental Netatalk support
73   --without-netatalk  Don't include experimental Netatalk support (default)"
74 ac_help="$ac_help
75   --with-quotas     Include experimental disk-quota support
76   --without-quotas  Don't include experimental disk-quota support (default)"
77 ac_help="$ac_help
78   --with-utmp     Include experimental utmp accounting
79   --without-utmp  Don't include experimental utmp accounting (default)"
80 ac_help="$ac_help
81   --with-msdfs          Include MS Dfs support
82   --without-msdfs       Don't include MS Dfs support (default)"
83 ac_help="$ac_help
84   --with-privatedir=DIR     Where to put smbpasswd ($ac_default_prefix/private)"
85 ac_help="$ac_help
86   --with-lockdir=DIR     Where to put lock files ($ac_default_prefix/var/locks)"
87 ac_help="$ac_help
88   --with-swatdir=DIR     Where to put SWAT files ($ac_default_prefix/swat)"
89 ac_help="$ac_help
90   --with-spinlocks        use spin locks instead of fcntl locks "
91 ac_help="$ac_help
92   --with-acl-support        Include ACL support
93   --without-acl-support  Don't include ACL support (default)"
94 ac_help="$ac_help
95   --with-winbind        Build winbind library (default, if supported by OS)
96   --without-winbind     Don't build winbind library"
97
98 # Initialize some variables set by options.
99 # The variables have the same names as the options, with
100 # dashes changed to underlines.
101 build=NONE
102 cache_file=./config.cache
103 exec_prefix=NONE
104 host=NONE
105 no_create=
106 nonopt=NONE
107 no_recursion=
108 prefix=NONE
109 program_prefix=NONE
110 program_suffix=NONE
111 program_transform_name=s,x,x,
112 silent=
113 site=
114 srcdir=
115 target=NONE
116 verbose=
117 x_includes=NONE
118 x_libraries=NONE
119 bindir='${exec_prefix}/bin'
120 sbindir='${exec_prefix}/sbin'
121 libexecdir='${exec_prefix}/libexec'
122 datadir='${prefix}/share'
123 sysconfdir='${prefix}/etc'
124 sharedstatedir='${prefix}/com'
125 localstatedir='${prefix}/var'
126 libdir='${exec_prefix}/lib'
127 includedir='${prefix}/include'
128 oldincludedir='/usr/include'
129 infodir='${prefix}/info'
130 mandir='${prefix}/man'
131
132 # Initialize some other variables.
133 subdirs=
134 MFLAGS= MAKEFLAGS=
135 SHELL=${CONFIG_SHELL-/bin/sh}
136 # Maximum number of lines to put in a shell here document.
137 ac_max_here_lines=12
138
139 ac_prev=
140 for ac_option
141 do
142
143   # If the previous option needs an argument, assign it.
144   if test -n "$ac_prev"; then
145     eval "$ac_prev=\$ac_option"
146     ac_prev=
147     continue
148   fi
149
150   case "$ac_option" in
151   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
152   *) ac_optarg= ;;
153   esac
154
155   # Accept the important Cygnus configure options, so we can diagnose typos.
156
157   case "$ac_option" in
158
159   -bindir | --bindir | --bindi | --bind | --bin | --bi)
160     ac_prev=bindir ;;
161   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
162     bindir="$ac_optarg" ;;
163
164   -build | --build | --buil | --bui | --bu)
165     ac_prev=build ;;
166   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
167     build="$ac_optarg" ;;
168
169   -cache-file | --cache-file | --cache-fil | --cache-fi \
170   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
171     ac_prev=cache_file ;;
172   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
173   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
174     cache_file="$ac_optarg" ;;
175
176   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
177     ac_prev=datadir ;;
178   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
179   | --da=*)
180     datadir="$ac_optarg" ;;
181
182   -disable-* | --disable-*)
183     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
184     # Reject names that are not valid shell variable names.
185     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
186       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
187     fi
188     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
189     eval "enable_${ac_feature}=no" ;;
190
191   -enable-* | --enable-*)
192     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
193     # Reject names that are not valid shell variable names.
194     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
195       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
196     fi
197     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
198     case "$ac_option" in
199       *=*) ;;
200       *) ac_optarg=yes ;;
201     esac
202     eval "enable_${ac_feature}='$ac_optarg'" ;;
203
204   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
205   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
206   | --exec | --exe | --ex)
207     ac_prev=exec_prefix ;;
208   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
209   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
210   | --exec=* | --exe=* | --ex=*)
211     exec_prefix="$ac_optarg" ;;
212
213   -gas | --gas | --ga | --g)
214     # Obsolete; use --with-gas.
215     with_gas=yes ;;
216
217   -help | --help | --hel | --he)
218     # Omit some internal or obsolete options to make the list less imposing.
219     # This message is too long to be a string in the A/UX 3.1 sh.
220     cat << EOF
221 Usage: configure [options] [host]
222 Options: [defaults in brackets after descriptions]
223 Configuration:
224   --cache-file=FILE       cache test results in FILE
225   --help                  print this message
226   --no-create             do not create output files
227   --quiet, --silent       do not print \`checking...' messages
228   --version               print the version of autoconf that created configure
229 Directory and file names:
230   --prefix=PREFIX         install architecture-independent files in PREFIX
231                           [$ac_default_prefix]
232   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
233                           [same as prefix]
234   --bindir=DIR            user executables in DIR [EPREFIX/bin]
235   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
236   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
237   --datadir=DIR           read-only architecture-independent data in DIR
238                           [PREFIX/share]
239   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
240   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
241                           [PREFIX/com]
242   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
243   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
244   --includedir=DIR        C header files in DIR [PREFIX/include]
245   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
246   --infodir=DIR           info documentation in DIR [PREFIX/info]
247   --mandir=DIR            man documentation in DIR [PREFIX/man]
248   --srcdir=DIR            find the sources in DIR [configure dir or ..]
249   --program-prefix=PREFIX prepend PREFIX to installed program names
250   --program-suffix=SUFFIX append SUFFIX to installed program names
251   --program-transform-name=PROGRAM
252                           run sed PROGRAM on installed program names
253 EOF
254     cat << EOF
255 Host type:
256   --build=BUILD           configure for building on BUILD [BUILD=HOST]
257   --host=HOST             configure for HOST [guessed]
258   --target=TARGET         configure for TARGET [TARGET=HOST]
259 Features and packages:
260   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
261   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
262   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
263   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
264   --x-includes=DIR        X include files are in DIR
265   --x-libraries=DIR       X library files are in DIR
266 EOF
267     if test -n "$ac_help"; then
268       echo "--enable and --with options recognized:$ac_help"
269     fi
270     exit 0 ;;
271
272   -host | --host | --hos | --ho)
273     ac_prev=host ;;
274   -host=* | --host=* | --hos=* | --ho=*)
275     host="$ac_optarg" ;;
276
277   -includedir | --includedir | --includedi | --included | --include \
278   | --includ | --inclu | --incl | --inc)
279     ac_prev=includedir ;;
280   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
281   | --includ=* | --inclu=* | --incl=* | --inc=*)
282     includedir="$ac_optarg" ;;
283
284   -infodir | --infodir | --infodi | --infod | --info | --inf)
285     ac_prev=infodir ;;
286   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
287     infodir="$ac_optarg" ;;
288
289   -libdir | --libdir | --libdi | --libd)
290     ac_prev=libdir ;;
291   -libdir=* | --libdir=* | --libdi=* | --libd=*)
292     libdir="$ac_optarg" ;;
293
294   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
295   | --libexe | --libex | --libe)
296     ac_prev=libexecdir ;;
297   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
298   | --libexe=* | --libex=* | --libe=*)
299     libexecdir="$ac_optarg" ;;
300
301   -localstatedir | --localstatedir | --localstatedi | --localstated \
302   | --localstate | --localstat | --localsta | --localst \
303   | --locals | --local | --loca | --loc | --lo)
304     ac_prev=localstatedir ;;
305   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
306   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
307   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
308     localstatedir="$ac_optarg" ;;
309
310   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
311     ac_prev=mandir ;;
312   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
313     mandir="$ac_optarg" ;;
314
315   -nfp | --nfp | --nf)
316     # Obsolete; use --without-fp.
317     with_fp=no ;;
318
319   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
320   | --no-cr | --no-c)
321     no_create=yes ;;
322
323   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
324   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
325     no_recursion=yes ;;
326
327   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
328   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
329   | --oldin | --oldi | --old | --ol | --o)
330     ac_prev=oldincludedir ;;
331   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
332   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
333   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
334     oldincludedir="$ac_optarg" ;;
335
336   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
337     ac_prev=prefix ;;
338   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
339     prefix="$ac_optarg" ;;
340
341   -program-prefix | --program-prefix | --program-prefi | --program-pref \
342   | --program-pre | --program-pr | --program-p)
343     ac_prev=program_prefix ;;
344   -program-prefix=* | --program-prefix=* | --program-prefi=* \
345   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
346     program_prefix="$ac_optarg" ;;
347
348   -program-suffix | --program-suffix | --program-suffi | --program-suff \
349   | --program-suf | --program-su | --program-s)
350     ac_prev=program_suffix ;;
351   -program-suffix=* | --program-suffix=* | --program-suffi=* \
352   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
353     program_suffix="$ac_optarg" ;;
354
355   -program-transform-name | --program-transform-name \
356   | --program-transform-nam | --program-transform-na \
357   | --program-transform-n | --program-transform- \
358   | --program-transform | --program-transfor \
359   | --program-transfo | --program-transf \
360   | --program-trans | --program-tran \
361   | --progr-tra | --program-tr | --program-t)
362     ac_prev=program_transform_name ;;
363   -program-transform-name=* | --program-transform-name=* \
364   | --program-transform-nam=* | --program-transform-na=* \
365   | --program-transform-n=* | --program-transform-=* \
366   | --program-transform=* | --program-transfor=* \
367   | --program-transfo=* | --program-transf=* \
368   | --program-trans=* | --program-tran=* \
369   | --progr-tra=* | --program-tr=* | --program-t=*)
370     program_transform_name="$ac_optarg" ;;
371
372   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
373   | -silent | --silent | --silen | --sile | --sil)
374     silent=yes ;;
375
376   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
377     ac_prev=sbindir ;;
378   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
379   | --sbi=* | --sb=*)
380     sbindir="$ac_optarg" ;;
381
382   -sharedstatedir | --sharedstatedir | --sharedstatedi \
383   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
384   | --sharedst | --shareds | --shared | --share | --shar \
385   | --sha | --sh)
386     ac_prev=sharedstatedir ;;
387   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
388   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
389   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
390   | --sha=* | --sh=*)
391     sharedstatedir="$ac_optarg" ;;
392
393   -site | --site | --sit)
394     ac_prev=site ;;
395   -site=* | --site=* | --sit=*)
396     site="$ac_optarg" ;;
397
398   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
399     ac_prev=srcdir ;;
400   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
401     srcdir="$ac_optarg" ;;
402
403   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
404   | --syscon | --sysco | --sysc | --sys | --sy)
405     ac_prev=sysconfdir ;;
406   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
407   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
408     sysconfdir="$ac_optarg" ;;
409
410   -target | --target | --targe | --targ | --tar | --ta | --t)
411     ac_prev=target ;;
412   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
413     target="$ac_optarg" ;;
414
415   -v | -verbose | --verbose | --verbos | --verbo | --verb)
416     verbose=yes ;;
417
418   -version | --version | --versio | --versi | --vers)
419     echo "configure generated by autoconf version 2.13"
420     exit 0 ;;
421
422   -with-* | --with-*)
423     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
424     # Reject names that are not valid shell variable names.
425     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
426       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
427     fi
428     ac_package=`echo $ac_package| sed 's/-/_/g'`
429     case "$ac_option" in
430       *=*) ;;
431       *) ac_optarg=yes ;;
432     esac
433     eval "with_${ac_package}='$ac_optarg'" ;;
434
435   -without-* | --without-*)
436     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
437     # Reject names that are not valid shell variable names.
438     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
439       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
440     fi
441     ac_package=`echo $ac_package| sed 's/-/_/g'`
442     eval "with_${ac_package}=no" ;;
443
444   --x)
445     # Obsolete; use --with-x.
446     with_x=yes ;;
447
448   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
449   | --x-incl | --x-inc | --x-in | --x-i)
450     ac_prev=x_includes ;;
451   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
452   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
453     x_includes="$ac_optarg" ;;
454
455   -x-libraries | --x-libraries | --x-librarie | --x-librari \
456   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
457     ac_prev=x_libraries ;;
458   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
459   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
460     x_libraries="$ac_optarg" ;;
461
462   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
463     ;;
464
465   *)
466     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
467       echo "configure: warning: $ac_option: invalid host type" 1>&2
468     fi
469     if test "x$nonopt" != xNONE; then
470       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
471     fi
472     nonopt="$ac_option"
473     ;;
474
475   esac
476 done
477
478 if test -n "$ac_prev"; then
479   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
480 fi
481
482 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
483
484 # File descriptor usage:
485 # 0 standard input
486 # 1 file creation
487 # 2 errors and warnings
488 # 3 some systems may open it to /dev/tty
489 # 4 used on the Kubota Titan
490 # 6 checking for... messages and results
491 # 5 compiler messages saved in config.log
492 if test "$silent" = yes; then
493   exec 6>/dev/null
494 else
495   exec 6>&1
496 fi
497 exec 5>./config.log
498
499 echo "\
500 This file contains any messages produced by compilers while
501 running configure, to aid debugging if configure makes a mistake.
502 " 1>&5
503
504 # Strip out --no-create and --no-recursion so they do not pile up.
505 # Also quote any args containing shell metacharacters.
506 ac_configure_args=
507 for ac_arg
508 do
509   case "$ac_arg" in
510   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
511   | --no-cr | --no-c) ;;
512   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
513   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
514   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
515   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
516   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
517   esac
518 done
519
520 # NLS nuisances.
521 # Only set these to C if already set.  These must not be set unconditionally
522 # because not all systems understand e.g. LANG=C (notably SCO).
523 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
524 # Non-C LC_CTYPE values break the ctype check.
525 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
526 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
527 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
528 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
529
530 # confdefs.h avoids OS command line length limits that DEFS can exceed.
531 rm -rf conftest* confdefs.h
532 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
533 echo > confdefs.h
534
535 # A filename unique to this package, relative to the directory that
536 # configure is in, which we can look for to find out if srcdir is correct.
537 ac_unique_file=include/includes.h
538
539 # Find the source files, if location was not specified.
540 if test -z "$srcdir"; then
541   ac_srcdir_defaulted=yes
542   # Try the directory containing this script, then its parent.
543   ac_prog=$0
544   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
545   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
546   srcdir=$ac_confdir
547   if test ! -r $srcdir/$ac_unique_file; then
548     srcdir=..
549   fi
550 else
551   ac_srcdir_defaulted=no
552 fi
553 if test ! -r $srcdir/$ac_unique_file; then
554   if test "$ac_srcdir_defaulted" = yes; then
555     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
556   else
557     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
558   fi
559 fi
560 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
561
562 # Prefer explicitly selected file to automatically selected ones.
563 if test -z "$CONFIG_SITE"; then
564   if test "x$prefix" != xNONE; then
565     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
566   else
567     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
568   fi
569 fi
570 for ac_site_file in $CONFIG_SITE; do
571   if test -r "$ac_site_file"; then
572     echo "loading site script $ac_site_file"
573     . "$ac_site_file"
574   fi
575 done
576
577 if test -r "$cache_file"; then
578   echo "loading cache $cache_file"
579   . $cache_file
580 else
581   echo "creating cache $cache_file"
582   > $cache_file
583 fi
584
585 ac_ext=c
586 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
587 ac_cpp='$CPP $CPPFLAGS'
588 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
589 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
590 cross_compiling=$ac_cv_prog_cc_cross
591
592 ac_exeext=
593 ac_objext=o
594 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
595   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
596   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
597     ac_n= ac_c='
598 ' ac_t='        '
599   else
600     ac_n=-n ac_c= ac_t=
601   fi
602 else
603   ac_n= ac_c='\c' ac_t=
604 fi
605
606
607
608 # we want to be compatibe with older versions of Samba
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626 # compile with optimisation and without debugging by default
627 CFLAGS="-O ${CFLAGS}"
628
629 # Check whether --enable-debug or --disable-debug was given.
630 if test "${enable_debug+set}" = set; then
631   enableval="$enable_debug"
632   if eval "test x$enable_debug = xyes"; then
633         CFLAGS="${CFLAGS} -g"
634     fi
635 fi
636
637
638
639 # Extract the first word of "gcc", so it can be a program name with args.
640 set dummy gcc; ac_word=$2
641 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
642 echo "configure:643: checking for $ac_word" >&5
643 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
644   echo $ac_n "(cached) $ac_c" 1>&6
645 else
646   if test -n "$CC"; then
647   ac_cv_prog_CC="$CC" # Let the user override the test.
648 else
649   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
650   ac_dummy="$PATH"
651   for ac_dir in $ac_dummy; do
652     test -z "$ac_dir" && ac_dir=.
653     if test -f $ac_dir/$ac_word; then
654       ac_cv_prog_CC="gcc"
655       break
656     fi
657   done
658   IFS="$ac_save_ifs"
659 fi
660 fi
661 CC="$ac_cv_prog_CC"
662 if test -n "$CC"; then
663   echo "$ac_t""$CC" 1>&6
664 else
665   echo "$ac_t""no" 1>&6
666 fi
667
668 if test -z "$CC"; then
669   # Extract the first word of "cc", so it can be a program name with args.
670 set dummy cc; ac_word=$2
671 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
672 echo "configure:673: checking for $ac_word" >&5
673 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
674   echo $ac_n "(cached) $ac_c" 1>&6
675 else
676   if test -n "$CC"; then
677   ac_cv_prog_CC="$CC" # Let the user override the test.
678 else
679   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
680   ac_prog_rejected=no
681   ac_dummy="$PATH"
682   for ac_dir in $ac_dummy; do
683     test -z "$ac_dir" && ac_dir=.
684     if test -f $ac_dir/$ac_word; then
685       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
686         ac_prog_rejected=yes
687         continue
688       fi
689       ac_cv_prog_CC="cc"
690       break
691     fi
692   done
693   IFS="$ac_save_ifs"
694 if test $ac_prog_rejected = yes; then
695   # We found a bogon in the path, so make sure we never use it.
696   set dummy $ac_cv_prog_CC
697   shift
698   if test $# -gt 0; then
699     # We chose a different compiler from the bogus one.
700     # However, it has the same basename, so the bogon will be chosen
701     # first if we set CC to just the basename; use the full file name.
702     shift
703     set dummy "$ac_dir/$ac_word" "$@"
704     shift
705     ac_cv_prog_CC="$@"
706   fi
707 fi
708 fi
709 fi
710 CC="$ac_cv_prog_CC"
711 if test -n "$CC"; then
712   echo "$ac_t""$CC" 1>&6
713 else
714   echo "$ac_t""no" 1>&6
715 fi
716
717   if test -z "$CC"; then
718     case "`uname -s`" in
719     *win32* | *WIN32*)
720       # Extract the first word of "cl", so it can be a program name with args.
721 set dummy cl; ac_word=$2
722 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
723 echo "configure:724: checking for $ac_word" >&5
724 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
725   echo $ac_n "(cached) $ac_c" 1>&6
726 else
727   if test -n "$CC"; then
728   ac_cv_prog_CC="$CC" # Let the user override the test.
729 else
730   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
731   ac_dummy="$PATH"
732   for ac_dir in $ac_dummy; do
733     test -z "$ac_dir" && ac_dir=.
734     if test -f $ac_dir/$ac_word; then
735       ac_cv_prog_CC="cl"
736       break
737     fi
738   done
739   IFS="$ac_save_ifs"
740 fi
741 fi
742 CC="$ac_cv_prog_CC"
743 if test -n "$CC"; then
744   echo "$ac_t""$CC" 1>&6
745 else
746   echo "$ac_t""no" 1>&6
747 fi
748  ;;
749     esac
750   fi
751   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
752 fi
753
754 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
755 echo "configure:756: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
756
757 ac_ext=c
758 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759 ac_cpp='$CPP $CPPFLAGS'
760 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762 cross_compiling=$ac_cv_prog_cc_cross
763
764 cat > conftest.$ac_ext << EOF
765
766 #line 767 "configure"
767 #include "confdefs.h"
768
769 main(){return(0);}
770 EOF
771 if { (eval echo configure:772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
772   ac_cv_prog_cc_works=yes
773   # If we can't run a trivial program, we are probably using a cross compiler.
774   if (./conftest; exit) 2>/dev/null; then
775     ac_cv_prog_cc_cross=no
776   else
777     ac_cv_prog_cc_cross=yes
778   fi
779 else
780   echo "configure: failed program was:" >&5
781   cat conftest.$ac_ext >&5
782   ac_cv_prog_cc_works=no
783 fi
784 rm -fr conftest*
785 ac_ext=c
786 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
787 ac_cpp='$CPP $CPPFLAGS'
788 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
789 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
790 cross_compiling=$ac_cv_prog_cc_cross
791
792 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
793 if test $ac_cv_prog_cc_works = no; then
794   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
795 fi
796 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
797 echo "configure:798: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
798 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
799 cross_compiling=$ac_cv_prog_cc_cross
800
801 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
802 echo "configure:803: checking whether we are using GNU C" >&5
803 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
804   echo $ac_n "(cached) $ac_c" 1>&6
805 else
806   cat > conftest.c <<EOF
807 #ifdef __GNUC__
808   yes;
809 #endif
810 EOF
811 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
812   ac_cv_prog_gcc=yes
813 else
814   ac_cv_prog_gcc=no
815 fi
816 fi
817
818 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
819
820 if test $ac_cv_prog_gcc = yes; then
821   GCC=yes
822 else
823   GCC=
824 fi
825
826 ac_test_CFLAGS="${CFLAGS+set}"
827 ac_save_CFLAGS="$CFLAGS"
828 CFLAGS=
829 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
830 echo "configure:831: checking whether ${CC-cc} accepts -g" >&5
831 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
832   echo $ac_n "(cached) $ac_c" 1>&6
833 else
834   echo 'void f(){}' > conftest.c
835 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
836   ac_cv_prog_cc_g=yes
837 else
838   ac_cv_prog_cc_g=no
839 fi
840 rm -f conftest*
841
842 fi
843
844 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
845 if test "$ac_test_CFLAGS" = set; then
846   CFLAGS="$ac_save_CFLAGS"
847 elif test $ac_cv_prog_cc_g = yes; then
848   if test "$GCC" = yes; then
849     CFLAGS="-g -O2"
850   else
851     CFLAGS="-g"
852   fi
853 else
854   if test "$GCC" = yes; then
855     CFLAGS="-O2"
856   else
857     CFLAGS=
858   fi
859 fi
860
861 ac_aux_dir=
862 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
863   if test -f $ac_dir/install-sh; then
864     ac_aux_dir=$ac_dir
865     ac_install_sh="$ac_aux_dir/install-sh -c"
866     break
867   elif test -f $ac_dir/install.sh; then
868     ac_aux_dir=$ac_dir
869     ac_install_sh="$ac_aux_dir/install.sh -c"
870     break
871   fi
872 done
873 if test -z "$ac_aux_dir"; then
874   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
875 fi
876 ac_config_guess=$ac_aux_dir/config.guess
877 ac_config_sub=$ac_aux_dir/config.sub
878 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
879
880 # Find a good install program.  We prefer a C program (faster),
881 # so one script is as good as another.  But avoid the broken or
882 # incompatible versions:
883 # SysV /etc/install, /usr/sbin/install
884 # SunOS /usr/etc/install
885 # IRIX /sbin/install
886 # AIX /bin/install
887 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
888 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
889 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
890 # ./install, which can be erroneously created by make from ./install.sh.
891 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
892 echo "configure:893: checking for a BSD compatible install" >&5
893 if test -z "$INSTALL"; then
894 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
895   echo $ac_n "(cached) $ac_c" 1>&6
896 else
897     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
898   for ac_dir in $PATH; do
899     # Account for people who put trailing slashes in PATH elements.
900     case "$ac_dir/" in
901     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
902     *)
903       # OSF1 and SCO ODT 3.0 have their own names for install.
904       # Don't use installbsd from OSF since it installs stuff as root
905       # by default.
906       for ac_prog in ginstall scoinst install; do
907         if test -f $ac_dir/$ac_prog; then
908           if test $ac_prog = install &&
909             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
910             # AIX install.  It has an incompatible calling convention.
911             :
912           else
913             ac_cv_path_install="$ac_dir/$ac_prog -c"
914             break 2
915           fi
916         fi
917       done
918       ;;
919     esac
920   done
921   IFS="$ac_save_IFS"
922
923 fi
924   if test "${ac_cv_path_install+set}" = set; then
925     INSTALL="$ac_cv_path_install"
926   else
927     # As a last resort, use the slow shell script.  We don't cache a
928     # path for INSTALL within a source directory, because that will
929     # break other packages using the cache if that directory is
930     # removed, or if the path is relative.
931     INSTALL="$ac_install_sh"
932   fi
933 fi
934 echo "$ac_t""$INSTALL" 1>&6
935
936 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
937 # It thinks the first close brace ends the variable substitution.
938 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
939
940 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
941
942 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
943
944 for ac_prog in gawk mawk nawk awk
945 do
946 # Extract the first word of "$ac_prog", so it can be a program name with args.
947 set dummy $ac_prog; ac_word=$2
948 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
949 echo "configure:950: checking for $ac_word" >&5
950 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
951   echo $ac_n "(cached) $ac_c" 1>&6
952 else
953   if test -n "$AWK"; then
954   ac_cv_prog_AWK="$AWK" # Let the user override the test.
955 else
956   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
957   ac_dummy="$PATH"
958   for ac_dir in $ac_dummy; do
959     test -z "$ac_dir" && ac_dir=.
960     if test -f $ac_dir/$ac_word; then
961       ac_cv_prog_AWK="$ac_prog"
962       break
963     fi
964   done
965   IFS="$ac_save_ifs"
966 fi
967 fi
968 AWK="$ac_cv_prog_AWK"
969 if test -n "$AWK"; then
970   echo "$ac_t""$AWK" 1>&6
971 else
972   echo "$ac_t""no" 1>&6
973 fi
974
975 test -n "$AWK" && break
976 done
977
978
979 if test "x$CC" != xcc; then
980   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
981 echo "configure:982: checking whether $CC and cc understand -c and -o together" >&5
982 else
983   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
984 echo "configure:985: checking whether cc understands -c and -o together" >&5
985 fi
986 set dummy $CC; ac_cc="`echo $2 |
987                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
988 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
989   echo $ac_n "(cached) $ac_c" 1>&6
990 else
991   echo 'foo(){}' > conftest.c
992 # Make sure it works both with $CC and with simple cc.
993 # We do the test twice because some compilers refuse to overwrite an
994 # existing .o file with -o, though they will create one.
995 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
996 if { (eval echo configure:997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
997    test -f conftest.o && { (eval echo configure:998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
998 then
999   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1000   if test "x$CC" != xcc; then
1001     # Test first that cc exists at all.
1002     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1003       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1004       if { (eval echo configure:1005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1005          test -f conftest.o && { (eval echo configure:1006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1006       then
1007         # cc works too.
1008         :
1009       else
1010         # cc exists but doesn't like -o.
1011         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1012       fi
1013     fi
1014   fi
1015 else
1016   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1017 fi
1018 rm -f conftest*
1019
1020 fi
1021 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1022   echo "$ac_t""yes" 1>&6
1023 else
1024   echo "$ac_t""no" 1>&6
1025   cat >> confdefs.h <<\EOF
1026 #define NO_MINUS_C_MINUS_O 1
1027 EOF
1028
1029 fi
1030
1031 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1032       BROKEN_CC=
1033 else
1034       BROKEN_CC=#
1035 fi
1036
1037
1038 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1039 echo "configure:1040: checking that the C compiler understands volatile" >&5
1040 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1041   echo $ac_n "(cached) $ac_c" 1>&6
1042 else
1043   
1044     cat > conftest.$ac_ext <<EOF
1045 #line 1046 "configure"
1046 #include "confdefs.h"
1047 #include <sys/types.h>
1048 int main() {
1049 volatile int i = 0
1050 ; return 0; }
1051 EOF
1052 if { (eval echo configure:1053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1053   rm -rf conftest*
1054   samba_cv_volatile=yes
1055 else
1056   echo "configure: failed program was:" >&5
1057   cat conftest.$ac_ext >&5
1058   rm -rf conftest*
1059   samba_cv_volatile=no
1060 fi
1061 rm -f conftest*
1062 fi
1063
1064 echo "$ac_t""$samba_cv_volatile" 1>&6
1065 if test x"$samba_cv_volatile" = x"yes"; then
1066    cat >> confdefs.h <<\EOF
1067 #define HAVE_VOLATILE 1
1068 EOF
1069
1070 fi
1071
1072
1073 #################################################
1074 # set codepage directory location
1075 # Check whether --with-codepagedir or --without-codepagedir was given.
1076 if test "${with_codepagedir+set}" = set; then
1077   withval="$with_codepagedir"
1078    case "$withval" in
1079   yes|no)
1080   #
1081   # Just in case anybody does it
1082   #
1083     echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2
1084   ;;
1085   * )
1086     codepagedir="$withval"
1087     ;;
1088   esac
1089 fi
1090
1091
1092
1093
1094 # Do some error checking and defaulting for the host and target type.
1095 # The inputs are:
1096 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1097 #
1098 # The rules are:
1099 # 1. You are not allowed to specify --host, --target, and nonopt at the
1100 #    same time.
1101 # 2. Host defaults to nonopt.
1102 # 3. If nonopt is not specified, then host defaults to the current host,
1103 #    as determined by config.guess.
1104 # 4. Target and build default to nonopt.
1105 # 5. If nonopt is not specified, then target and build default to host.
1106
1107 # The aliases save the names the user supplied, while $host etc.
1108 # will get canonicalized.
1109 case $host---$target---$nonopt in
1110 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1111 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1112 esac
1113
1114
1115 # Make sure we can run config.sub.
1116 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1117 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1118 fi
1119
1120 echo $ac_n "checking host system type""... $ac_c" 1>&6
1121 echo "configure:1122: checking host system type" >&5
1122
1123 host_alias=$host
1124 case "$host_alias" in
1125 NONE)
1126   case $nonopt in
1127   NONE)
1128     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1129     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1130     fi ;;
1131   *) host_alias=$nonopt ;;
1132   esac ;;
1133 esac
1134
1135 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1136 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1137 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1138 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1139 echo "$ac_t""$host" 1>&6
1140
1141 echo $ac_n "checking target system type""... $ac_c" 1>&6
1142 echo "configure:1143: checking target system type" >&5
1143
1144 target_alias=$target
1145 case "$target_alias" in
1146 NONE)
1147   case $nonopt in
1148   NONE) target_alias=$host_alias ;;
1149   *) target_alias=$nonopt ;;
1150   esac ;;
1151 esac
1152
1153 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1154 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1155 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1156 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1157 echo "$ac_t""$target" 1>&6
1158
1159 echo $ac_n "checking build system type""... $ac_c" 1>&6
1160 echo "configure:1161: checking build system type" >&5
1161
1162 build_alias=$build
1163 case "$build_alias" in
1164 NONE)
1165   case $nonopt in
1166   NONE) build_alias=$host_alias ;;
1167   *) build_alias=$nonopt ;;
1168   esac ;;
1169 esac
1170
1171 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1172 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1173 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1174 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1175 echo "$ac_t""$build" 1>&6
1176
1177 test "$host_alias" != "$target_alias" &&
1178   test "$program_prefix$program_suffix$program_transform_name" = \
1179     NONENONEs,x,x, &&
1180   program_prefix=${target_alias}-
1181
1182
1183   case "$host_os" in
1184         *irix6*) cat >> confdefs.h <<\EOF
1185 #include <standards.h>
1186 EOF
1187
1188         ;;
1189 esac
1190
1191
1192     
1193     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1194 echo "configure:1195: checking config.cache system type" >&5
1195     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1196          test x"$ac_cv_host_system_type" != x"$host"; } ||
1197        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1198          test x"$ac_cv_build_system_type" != x"$build"; } ||
1199        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1200          test x"$ac_cv_target_system_type" != x"$target"; }; then
1201         echo "$ac_t""different" 1>&6
1202         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1203     else
1204         echo "$ac_t""same" 1>&6
1205     fi
1206     ac_cv_host_system_type="$host"
1207     ac_cv_build_system_type="$build"
1208     ac_cv_target_system_type="$target"
1209
1210
1211 #
1212 # Config CPPFLAG settings for strange OS's that must be set
1213 # before other tests.
1214 #
1215 case "$host_os" in
1216 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1217     *hpux*)
1218       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1219 echo "configure:1220: checking whether ${CC-cc} accepts -Ae" >&5
1220 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1221   echo $ac_n "(cached) $ac_c" 1>&6
1222 else
1223   echo 'void f(){}' > conftest.c
1224 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1225   ac_cv_prog_cc_Ae=yes
1226 else
1227   ac_cv_prog_cc_Ae=no
1228 fi
1229 rm -f conftest*
1230
1231 fi
1232
1233 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1234       if test $ac_cv_prog_cc_Ae = yes; then
1235         CPPFLAGS="$CPPFLAGS -Ae"
1236       fi
1237 #
1238 # Defines needed for HPUX support.
1239 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1240 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1241 #
1242       case `uname -r` in
1243                         *9*|*10*)
1244                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1245                                 cat >> confdefs.h <<\EOF
1246 #define USE_BOTH_CRYPT_CALLS 1
1247 EOF
1248
1249                                 ;;
1250                         *11*)
1251                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1252                                 cat >> confdefs.h <<\EOF
1253 #define USE_BOTH_CRYPT_CALLS 1
1254 EOF
1255
1256                                 ;;
1257       esac
1258       ;;
1259 #
1260 # AIX4.x doesn't even admit to having large
1261 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1262 #
1263     *aix4*)
1264           echo "$ac_t""enabling large file support" 1>&6
1265       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1266       ;;    
1267 #
1268 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1269 # to the existance of large files..
1270 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1271 # recommendations on large file support, however it makes the
1272 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1273 # recommendation makes the compile fail on gcc2.7. JRA.
1274 #
1275         *solaris*)
1276                 case `uname -r` in
1277                         5.6*|5.7*)
1278                         echo "$ac_t""enabling large file support" 1>&6
1279                         if test "$ac_cv_prog_gcc" = yes; then
1280                                 ${CC-cc} -v >conftest.c 2>&1
1281                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1282                                 rm -fr conftest.c
1283                                 case "$ac_cv_gcc_compiler_version_number" in
1284                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1285                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1286                                                 ;;
1287                                         *)
1288                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1289                                                 ;;
1290                                 esac
1291                         else
1292                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1293                         fi
1294                         ;;
1295                 esac
1296                 ;;
1297 #
1298 # Tests needed for SINIX large file support.
1299 #
1300     *sysv4*)
1301       if test $host = mips-sni-sysv4 ; then
1302         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1303 echo "configure:1304: checking for LFS support" >&5
1304         old_CPPFLAGS="$CPPFLAGS"
1305         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1306         if test "$cross_compiling" = yes; then
1307   SINIX_LFS_SUPPORT=cross
1308 else
1309   cat > conftest.$ac_ext <<EOF
1310 #line 1311 "configure"
1311 #include "confdefs.h"
1312
1313 #include <unistd.h>
1314 main () {
1315 #if _LFS64_LARGEFILE == 1
1316 exit(0);
1317 #else
1318 exit(1);
1319 #endif
1320 }
1321 EOF
1322 if { (eval echo configure:1323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1323 then
1324   SINIX_LFS_SUPPORT=yes
1325 else
1326   echo "configure: failed program was:" >&5
1327   cat conftest.$ac_ext >&5
1328   rm -fr conftest*
1329   SINIX_LFS_SUPPORT=no
1330 fi
1331 rm -fr conftest*
1332 fi
1333
1334         CPPFLAGS="$old_CPPFLAGS"
1335         if test x$SINIX_LFS_SUPPORT = xyes ; then
1336           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1337           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1338           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1339           LIBS="`getconf LFS64_LIBS` $LIBS"
1340         fi
1341       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1342       fi
1343     ;;
1344
1345 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1346 #
1347     *linux*)
1348         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1349 echo "configure:1350: checking for LFS support" >&5
1350         old_CPPFLAGS="$CPPFLAGS"
1351         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1352        if test "$cross_compiling" = yes; then
1353   LINUX_LFS_SUPPORT=cross
1354 else
1355   cat > conftest.$ac_ext <<EOF
1356 #line 1357 "configure"
1357 #include "confdefs.h"
1358
1359 #include <unistd.h>
1360 #include <sys/utsname.h>
1361 main() {
1362 #if _LFS64_LARGEFILE == 1
1363        struct utsname uts;
1364        char *release;
1365        int major, minor;
1366
1367        /* Ensure this is glibc 2.2 or higher */
1368 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1369        int libc_major = __GLIBC__;
1370        int libc_minor = __GLIBC_MINOR__;
1371
1372        if (libc_major < 2)
1373               exit(1);
1374        if (libc_minor < 2)
1375               exit(1);
1376 #endif
1377
1378        /* Ensure this is kernel 2.4 or higher */
1379
1380        uname(&uts);
1381        release = uts.release;
1382        major = atoi(strsep(&release, "."));
1383        minor = atoi(strsep(&release, "."));
1384
1385        if (major > 2 || (major == 2 && minor > 3))
1386                exit(0);
1387        exit(1);
1388 #else
1389        exit(1);
1390 #endif
1391 }
1392
1393 EOF
1394 if { (eval echo configure:1395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1395 then
1396   LINUX_LFS_SUPPORT=yes
1397 else
1398   echo "configure: failed program was:" >&5
1399   cat conftest.$ac_ext >&5
1400   rm -fr conftest*
1401   LINUX_LFS_SUPPORT=no
1402 fi
1403 rm -fr conftest*
1404 fi
1405
1406         CPPFLAGS="$old_CPPFLAGS"
1407         if test x$LINUX_LFS_SUPPORT = xyes ; then
1408           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1409         fi
1410        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1411                 ;;
1412
1413     *hurd*)
1414         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1415 echo "configure:1416: checking for LFS support" >&5
1416         old_CPPFLAGS="$CPPFLAGS"
1417         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1418         if test "$cross_compiling" = yes; then
1419   GLIBC_LFS_SUPPORT=cross
1420 else
1421   cat > conftest.$ac_ext <<EOF
1422 #line 1423 "configure"
1423 #include "confdefs.h"
1424
1425 #include <unistd.h>
1426 main () {
1427 #if _LFS64_LARGEFILE == 1
1428 exit(0);
1429 #else
1430 exit(1);
1431 #endif
1432 }
1433 EOF
1434 if { (eval echo configure:1435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1435 then
1436   GLIBC_LFS_SUPPORT=yes
1437 else
1438   echo "configure: failed program was:" >&5
1439   cat conftest.$ac_ext >&5
1440   rm -fr conftest*
1441   GLIBC_LFS_SUPPORT=no
1442 fi
1443 rm -fr conftest*
1444 fi
1445
1446         CPPFLAGS="$old_CPPFLAGS"
1447         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1448           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1449         fi
1450       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1451     ;;
1452
1453 esac
1454
1455 echo $ac_n "checking for inline""... $ac_c" 1>&6
1456 echo "configure:1457: checking for inline" >&5
1457 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1458   echo $ac_n "(cached) $ac_c" 1>&6
1459 else
1460   ac_cv_c_inline=no
1461 for ac_kw in inline __inline__ __inline; do
1462   cat > conftest.$ac_ext <<EOF
1463 #line 1464 "configure"
1464 #include "confdefs.h"
1465
1466 int main() {
1467 } $ac_kw foo() {
1468 ; return 0; }
1469 EOF
1470 if { (eval echo configure:1471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1471   rm -rf conftest*
1472   ac_cv_c_inline=$ac_kw; break
1473 else
1474   echo "configure: failed program was:" >&5
1475   cat conftest.$ac_ext >&5
1476 fi
1477 rm -f conftest*
1478 done
1479
1480 fi
1481
1482 echo "$ac_t""$ac_cv_c_inline" 1>&6
1483 case "$ac_cv_c_inline" in
1484   inline | yes) ;;
1485   no) cat >> confdefs.h <<\EOF
1486 #define inline 
1487 EOF
1488  ;;
1489   *)  cat >> confdefs.h <<EOF
1490 #define inline $ac_cv_c_inline
1491 EOF
1492  ;;
1493 esac
1494
1495 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1496 echo "configure:1497: checking how to run the C preprocessor" >&5
1497 # On Suns, sometimes $CPP names a directory.
1498 if test -n "$CPP" && test -d "$CPP"; then
1499   CPP=
1500 fi
1501 if test -z "$CPP"; then
1502 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1503   echo $ac_n "(cached) $ac_c" 1>&6
1504 else
1505     # This must be in double quotes, not single quotes, because CPP may get
1506   # substituted into the Makefile and "${CC-cc}" will confuse make.
1507   CPP="${CC-cc} -E"
1508   # On the NeXT, cc -E runs the code through the compiler's parser,
1509   # not just through cpp.
1510   cat > conftest.$ac_ext <<EOF
1511 #line 1512 "configure"
1512 #include "confdefs.h"
1513 #include <assert.h>
1514 Syntax Error
1515 EOF
1516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1517 { (eval echo configure:1518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1519 if test -z "$ac_err"; then
1520   :
1521 else
1522   echo "$ac_err" >&5
1523   echo "configure: failed program was:" >&5
1524   cat conftest.$ac_ext >&5
1525   rm -rf conftest*
1526   CPP="${CC-cc} -E -traditional-cpp"
1527   cat > conftest.$ac_ext <<EOF
1528 #line 1529 "configure"
1529 #include "confdefs.h"
1530 #include <assert.h>
1531 Syntax Error
1532 EOF
1533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1534 { (eval echo configure:1535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1536 if test -z "$ac_err"; then
1537   :
1538 else
1539   echo "$ac_err" >&5
1540   echo "configure: failed program was:" >&5
1541   cat conftest.$ac_ext >&5
1542   rm -rf conftest*
1543   CPP="${CC-cc} -nologo -E"
1544   cat > conftest.$ac_ext <<EOF
1545 #line 1546 "configure"
1546 #include "confdefs.h"
1547 #include <assert.h>
1548 Syntax Error
1549 EOF
1550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1551 { (eval echo configure:1552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1553 if test -z "$ac_err"; then
1554   :
1555 else
1556   echo "$ac_err" >&5
1557   echo "configure: failed program was:" >&5
1558   cat conftest.$ac_ext >&5
1559   rm -rf conftest*
1560   CPP=/lib/cpp
1561 fi
1562 rm -f conftest*
1563 fi
1564 rm -f conftest*
1565 fi
1566 rm -f conftest*
1567   ac_cv_prog_CPP="$CPP"
1568 fi
1569   CPP="$ac_cv_prog_CPP"
1570 else
1571   ac_cv_prog_CPP="$CPP"
1572 fi
1573 echo "$ac_t""$CPP" 1>&6
1574
1575 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1576 echo "configure:1577: checking for ANSI C header files" >&5
1577 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1578   echo $ac_n "(cached) $ac_c" 1>&6
1579 else
1580   cat > conftest.$ac_ext <<EOF
1581 #line 1582 "configure"
1582 #include "confdefs.h"
1583 #include <stdlib.h>
1584 #include <stdarg.h>
1585 #include <string.h>
1586 #include <float.h>
1587 EOF
1588 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1589 { (eval echo configure:1590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1590 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1591 if test -z "$ac_err"; then
1592   rm -rf conftest*
1593   ac_cv_header_stdc=yes
1594 else
1595   echo "$ac_err" >&5
1596   echo "configure: failed program was:" >&5
1597   cat conftest.$ac_ext >&5
1598   rm -rf conftest*
1599   ac_cv_header_stdc=no
1600 fi
1601 rm -f conftest*
1602
1603 if test $ac_cv_header_stdc = yes; then
1604   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1605 cat > conftest.$ac_ext <<EOF
1606 #line 1607 "configure"
1607 #include "confdefs.h"
1608 #include <string.h>
1609 EOF
1610 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1611   egrep "memchr" >/dev/null 2>&1; then
1612   :
1613 else
1614   rm -rf conftest*
1615   ac_cv_header_stdc=no
1616 fi
1617 rm -f conftest*
1618
1619 fi
1620
1621 if test $ac_cv_header_stdc = yes; then
1622   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1623 cat > conftest.$ac_ext <<EOF
1624 #line 1625 "configure"
1625 #include "confdefs.h"
1626 #include <stdlib.h>
1627 EOF
1628 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1629   egrep "free" >/dev/null 2>&1; then
1630   :
1631 else
1632   rm -rf conftest*
1633   ac_cv_header_stdc=no
1634 fi
1635 rm -f conftest*
1636
1637 fi
1638
1639 if test $ac_cv_header_stdc = yes; then
1640   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1641 if test "$cross_compiling" = yes; then
1642   :
1643 else
1644   cat > conftest.$ac_ext <<EOF
1645 #line 1646 "configure"
1646 #include "confdefs.h"
1647 #include <ctype.h>
1648 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1649 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1650 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1651 int main () { int i; for (i = 0; i < 256; i++)
1652 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1653 exit (0); }
1654
1655 EOF
1656 if { (eval echo configure:1657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1657 then
1658   :
1659 else
1660   echo "configure: failed program was:" >&5
1661   cat conftest.$ac_ext >&5
1662   rm -fr conftest*
1663   ac_cv_header_stdc=no
1664 fi
1665 rm -fr conftest*
1666 fi
1667
1668 fi
1669 fi
1670
1671 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1672 if test $ac_cv_header_stdc = yes; then
1673   cat >> confdefs.h <<\EOF
1674 #define STDC_HEADERS 1
1675 EOF
1676
1677 fi
1678
1679 ac_header_dirent=no
1680 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1681 do
1682 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1683 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1684 echo "configure:1685: checking for $ac_hdr that defines DIR" >&5
1685 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1686   echo $ac_n "(cached) $ac_c" 1>&6
1687 else
1688   cat > conftest.$ac_ext <<EOF
1689 #line 1690 "configure"
1690 #include "confdefs.h"
1691 #include <sys/types.h>
1692 #include <$ac_hdr>
1693 int main() {
1694 DIR *dirp = 0;
1695 ; return 0; }
1696 EOF
1697 if { (eval echo configure:1698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1698   rm -rf conftest*
1699   eval "ac_cv_header_dirent_$ac_safe=yes"
1700 else
1701   echo "configure: failed program was:" >&5
1702   cat conftest.$ac_ext >&5
1703   rm -rf conftest*
1704   eval "ac_cv_header_dirent_$ac_safe=no"
1705 fi
1706 rm -f conftest*
1707 fi
1708 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1709   echo "$ac_t""yes" 1>&6
1710     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1711   cat >> confdefs.h <<EOF
1712 #define $ac_tr_hdr 1
1713 EOF
1714  ac_header_dirent=$ac_hdr; break
1715 else
1716   echo "$ac_t""no" 1>&6
1717 fi
1718 done
1719 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1720 if test $ac_header_dirent = dirent.h; then
1721 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1722 echo "configure:1723: checking for opendir in -ldir" >&5
1723 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1724 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1725   echo $ac_n "(cached) $ac_c" 1>&6
1726 else
1727   ac_save_LIBS="$LIBS"
1728 LIBS="-ldir  $LIBS"
1729 cat > conftest.$ac_ext <<EOF
1730 #line 1731 "configure"
1731 #include "confdefs.h"
1732 /* Override any gcc2 internal prototype to avoid an error.  */
1733 /* We use char because int might match the return type of a gcc2
1734     builtin and then its argument prototype would still apply.  */
1735 char opendir();
1736
1737 int main() {
1738 opendir()
1739 ; return 0; }
1740 EOF
1741 if { (eval echo configure:1742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1742   rm -rf conftest*
1743   eval "ac_cv_lib_$ac_lib_var=yes"
1744 else
1745   echo "configure: failed program was:" >&5
1746   cat conftest.$ac_ext >&5
1747   rm -rf conftest*
1748   eval "ac_cv_lib_$ac_lib_var=no"
1749 fi
1750 rm -f conftest*
1751 LIBS="$ac_save_LIBS"
1752
1753 fi
1754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1755   echo "$ac_t""yes" 1>&6
1756   LIBS="$LIBS -ldir"
1757 else
1758   echo "$ac_t""no" 1>&6
1759 fi
1760
1761 else
1762 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1763 echo "configure:1764: checking for opendir in -lx" >&5
1764 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1765 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1766   echo $ac_n "(cached) $ac_c" 1>&6
1767 else
1768   ac_save_LIBS="$LIBS"
1769 LIBS="-lx  $LIBS"
1770 cat > conftest.$ac_ext <<EOF
1771 #line 1772 "configure"
1772 #include "confdefs.h"
1773 /* Override any gcc2 internal prototype to avoid an error.  */
1774 /* We use char because int might match the return type of a gcc2
1775     builtin and then its argument prototype would still apply.  */
1776 char opendir();
1777
1778 int main() {
1779 opendir()
1780 ; return 0; }
1781 EOF
1782 if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1783   rm -rf conftest*
1784   eval "ac_cv_lib_$ac_lib_var=yes"
1785 else
1786   echo "configure: failed program was:" >&5
1787   cat conftest.$ac_ext >&5
1788   rm -rf conftest*
1789   eval "ac_cv_lib_$ac_lib_var=no"
1790 fi
1791 rm -f conftest*
1792 LIBS="$ac_save_LIBS"
1793
1794 fi
1795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1796   echo "$ac_t""yes" 1>&6
1797   LIBS="$LIBS -lx"
1798 else
1799   echo "$ac_t""no" 1>&6
1800 fi
1801
1802 fi
1803
1804 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1805 echo "configure:1806: checking whether time.h and sys/time.h may both be included" >&5
1806 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1807   echo $ac_n "(cached) $ac_c" 1>&6
1808 else
1809   cat > conftest.$ac_ext <<EOF
1810 #line 1811 "configure"
1811 #include "confdefs.h"
1812 #include <sys/types.h>
1813 #include <sys/time.h>
1814 #include <time.h>
1815 int main() {
1816 struct tm *tp;
1817 ; return 0; }
1818 EOF
1819 if { (eval echo configure:1820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1820   rm -rf conftest*
1821   ac_cv_header_time=yes
1822 else
1823   echo "configure: failed program was:" >&5
1824   cat conftest.$ac_ext >&5
1825   rm -rf conftest*
1826   ac_cv_header_time=no
1827 fi
1828 rm -f conftest*
1829 fi
1830
1831 echo "$ac_t""$ac_cv_header_time" 1>&6
1832 if test $ac_cv_header_time = yes; then
1833   cat >> confdefs.h <<\EOF
1834 #define TIME_WITH_SYS_TIME 1
1835 EOF
1836
1837 fi
1838
1839 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1840 echo "configure:1841: checking for sys/wait.h that is POSIX.1 compatible" >&5
1841 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1842   echo $ac_n "(cached) $ac_c" 1>&6
1843 else
1844   cat > conftest.$ac_ext <<EOF
1845 #line 1846 "configure"
1846 #include "confdefs.h"
1847 #include <sys/types.h>
1848 #include <sys/wait.h>
1849 #ifndef WEXITSTATUS
1850 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1851 #endif
1852 #ifndef WIFEXITED
1853 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1854 #endif
1855 int main() {
1856 int s;
1857 wait (&s);
1858 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1859 ; return 0; }
1860 EOF
1861 if { (eval echo configure:1862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1862   rm -rf conftest*
1863   ac_cv_header_sys_wait_h=yes
1864 else
1865   echo "configure: failed program was:" >&5
1866   cat conftest.$ac_ext >&5
1867   rm -rf conftest*
1868   ac_cv_header_sys_wait_h=no
1869 fi
1870 rm -f conftest*
1871 fi
1872
1873 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1874 if test $ac_cv_header_sys_wait_h = yes; then
1875   cat >> confdefs.h <<\EOF
1876 #define HAVE_SYS_WAIT_H 1
1877 EOF
1878
1879 fi
1880
1881 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1882 do
1883 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1884 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1885 echo "configure:1886: checking for $ac_hdr" >&5
1886 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1887   echo $ac_n "(cached) $ac_c" 1>&6
1888 else
1889   cat > conftest.$ac_ext <<EOF
1890 #line 1891 "configure"
1891 #include "confdefs.h"
1892 #include <$ac_hdr>
1893 EOF
1894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1895 { (eval echo configure:1896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1897 if test -z "$ac_err"; then
1898   rm -rf conftest*
1899   eval "ac_cv_header_$ac_safe=yes"
1900 else
1901   echo "$ac_err" >&5
1902   echo "configure: failed program was:" >&5
1903   cat conftest.$ac_ext >&5
1904   rm -rf conftest*
1905   eval "ac_cv_header_$ac_safe=no"
1906 fi
1907 rm -f conftest*
1908 fi
1909 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1910   echo "$ac_t""yes" 1>&6
1911     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1912   cat >> confdefs.h <<EOF
1913 #define $ac_tr_hdr 1
1914 EOF
1915  
1916 else
1917   echo "$ac_t""no" 1>&6
1918 fi
1919 done
1920
1921 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1922 do
1923 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1924 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1925 echo "configure:1926: checking for $ac_hdr" >&5
1926 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1927   echo $ac_n "(cached) $ac_c" 1>&6
1928 else
1929   cat > conftest.$ac_ext <<EOF
1930 #line 1931 "configure"
1931 #include "confdefs.h"
1932 #include <$ac_hdr>
1933 EOF
1934 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1935 { (eval echo configure:1936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1936 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1937 if test -z "$ac_err"; then
1938   rm -rf conftest*
1939   eval "ac_cv_header_$ac_safe=yes"
1940 else
1941   echo "$ac_err" >&5
1942   echo "configure: failed program was:" >&5
1943   cat conftest.$ac_ext >&5
1944   rm -rf conftest*
1945   eval "ac_cv_header_$ac_safe=no"
1946 fi
1947 rm -f conftest*
1948 fi
1949 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1950   echo "$ac_t""yes" 1>&6
1951     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1952   cat >> confdefs.h <<EOF
1953 #define $ac_tr_hdr 1
1954 EOF
1955  
1956 else
1957   echo "$ac_t""no" 1>&6
1958 fi
1959 done
1960
1961 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1962 do
1963 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1964 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1965 echo "configure:1966: checking for $ac_hdr" >&5
1966 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1967   echo $ac_n "(cached) $ac_c" 1>&6
1968 else
1969   cat > conftest.$ac_ext <<EOF
1970 #line 1971 "configure"
1971 #include "confdefs.h"
1972 #include <$ac_hdr>
1973 EOF
1974 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1975 { (eval echo configure:1976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1976 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1977 if test -z "$ac_err"; then
1978   rm -rf conftest*
1979   eval "ac_cv_header_$ac_safe=yes"
1980 else
1981   echo "$ac_err" >&5
1982   echo "configure: failed program was:" >&5
1983   cat conftest.$ac_ext >&5
1984   rm -rf conftest*
1985   eval "ac_cv_header_$ac_safe=no"
1986 fi
1987 rm -f conftest*
1988 fi
1989 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1990   echo "$ac_t""yes" 1>&6
1991     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1992   cat >> confdefs.h <<EOF
1993 #define $ac_tr_hdr 1
1994 EOF
1995  
1996 else
1997   echo "$ac_t""no" 1>&6
1998 fi
1999 done
2000
2001 for ac_hdr in sys/param.h ctype.h sys/un.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2002 do
2003 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2004 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2005 echo "configure:2006: checking for $ac_hdr" >&5
2006 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2007   echo $ac_n "(cached) $ac_c" 1>&6
2008 else
2009   cat > conftest.$ac_ext <<EOF
2010 #line 2011 "configure"
2011 #include "confdefs.h"
2012 #include <$ac_hdr>
2013 EOF
2014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2015 { (eval echo configure:2016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2017 if test -z "$ac_err"; then
2018   rm -rf conftest*
2019   eval "ac_cv_header_$ac_safe=yes"
2020 else
2021   echo "$ac_err" >&5
2022   echo "configure: failed program was:" >&5
2023   cat conftest.$ac_ext >&5
2024   rm -rf conftest*
2025   eval "ac_cv_header_$ac_safe=no"
2026 fi
2027 rm -f conftest*
2028 fi
2029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2030   echo "$ac_t""yes" 1>&6
2031     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2032   cat >> confdefs.h <<EOF
2033 #define $ac_tr_hdr 1
2034 EOF
2035  
2036 else
2037   echo "$ac_t""no" 1>&6
2038 fi
2039 done
2040
2041 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
2042 do
2043 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2044 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2045 echo "configure:2046: checking for $ac_hdr" >&5
2046 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2047   echo $ac_n "(cached) $ac_c" 1>&6
2048 else
2049   cat > conftest.$ac_ext <<EOF
2050 #line 2051 "configure"
2051 #include "confdefs.h"
2052 #include <$ac_hdr>
2053 EOF
2054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2055 { (eval echo configure:2056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2057 if test -z "$ac_err"; then
2058   rm -rf conftest*
2059   eval "ac_cv_header_$ac_safe=yes"
2060 else
2061   echo "$ac_err" >&5
2062   echo "configure: failed program was:" >&5
2063   cat conftest.$ac_ext >&5
2064   rm -rf conftest*
2065   eval "ac_cv_header_$ac_safe=no"
2066 fi
2067 rm -f conftest*
2068 fi
2069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2070   echo "$ac_t""yes" 1>&6
2071     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2072   cat >> confdefs.h <<EOF
2073 #define $ac_tr_hdr 1
2074 EOF
2075  
2076 else
2077   echo "$ac_t""no" 1>&6
2078 fi
2079 done
2080
2081 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2082 do
2083 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2084 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2085 echo "configure:2086: checking for $ac_hdr" >&5
2086 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2087   echo $ac_n "(cached) $ac_c" 1>&6
2088 else
2089   cat > conftest.$ac_ext <<EOF
2090 #line 2091 "configure"
2091 #include "confdefs.h"
2092 #include <$ac_hdr>
2093 EOF
2094 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2095 { (eval echo configure:2096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2096 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2097 if test -z "$ac_err"; then
2098   rm -rf conftest*
2099   eval "ac_cv_header_$ac_safe=yes"
2100 else
2101   echo "$ac_err" >&5
2102   echo "configure: failed program was:" >&5
2103   cat conftest.$ac_ext >&5
2104   rm -rf conftest*
2105   eval "ac_cv_header_$ac_safe=no"
2106 fi
2107 rm -f conftest*
2108 fi
2109 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2110   echo "$ac_t""yes" 1>&6
2111     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2112   cat >> confdefs.h <<EOF
2113 #define $ac_tr_hdr 1
2114 EOF
2115  
2116 else
2117   echo "$ac_t""no" 1>&6
2118 fi
2119 done
2120
2121 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2122 do
2123 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2124 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2125 echo "configure:2126: checking for $ac_hdr" >&5
2126 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2127   echo $ac_n "(cached) $ac_c" 1>&6
2128 else
2129   cat > conftest.$ac_ext <<EOF
2130 #line 2131 "configure"
2131 #include "confdefs.h"
2132 #include <$ac_hdr>
2133 EOF
2134 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2135 { (eval echo configure:2136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2136 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2137 if test -z "$ac_err"; then
2138   rm -rf conftest*
2139   eval "ac_cv_header_$ac_safe=yes"
2140 else
2141   echo "$ac_err" >&5
2142   echo "configure: failed program was:" >&5
2143   cat conftest.$ac_ext >&5
2144   rm -rf conftest*
2145   eval "ac_cv_header_$ac_safe=no"
2146 fi
2147 rm -f conftest*
2148 fi
2149 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2150   echo "$ac_t""yes" 1>&6
2151     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2152   cat >> confdefs.h <<EOF
2153 #define $ac_tr_hdr 1
2154 EOF
2155  
2156 else
2157   echo "$ac_t""no" 1>&6
2158 fi
2159 done
2160
2161 for ac_hdr in security/pam_modules.h security/_pam_macros.h
2162 do
2163 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2164 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2165 echo "configure:2166: checking for $ac_hdr" >&5
2166 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2167   echo $ac_n "(cached) $ac_c" 1>&6
2168 else
2169   cat > conftest.$ac_ext <<EOF
2170 #line 2171 "configure"
2171 #include "confdefs.h"
2172 #include <$ac_hdr>
2173 EOF
2174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2175 { (eval echo configure:2176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2177 if test -z "$ac_err"; then
2178   rm -rf conftest*
2179   eval "ac_cv_header_$ac_safe=yes"
2180 else
2181   echo "$ac_err" >&5
2182   echo "configure: failed program was:" >&5
2183   cat conftest.$ac_ext >&5
2184   rm -rf conftest*
2185   eval "ac_cv_header_$ac_safe=no"
2186 fi
2187 rm -f conftest*
2188 fi
2189 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2190   echo "$ac_t""yes" 1>&6
2191     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2192   cat >> confdefs.h <<EOF
2193 #define $ac_tr_hdr 1
2194 EOF
2195  
2196 else
2197   echo "$ac_t""no" 1>&6
2198 fi
2199 done
2200
2201
2202 #
2203 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2204 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2205 #
2206 case "$host_os" in
2207     *hpux*)
2208                 cat > conftest.$ac_ext <<EOF
2209 #line 2210 "configure"
2210 #include "confdefs.h"
2211 #include <shadow.h>
2212 int main() {
2213 struct spwd testme
2214 ; return 0; }
2215 EOF
2216 if { (eval echo configure:2217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2217   rm -rf conftest*
2218   ac_cv_header_shadow_h=yes
2219 else
2220   echo "configure: failed program was:" >&5
2221   cat conftest.$ac_ext >&5
2222   rm -rf conftest*
2223   ac_cv_header_shadow_h=no
2224 fi
2225 rm -f conftest*
2226                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2227                    cat >> confdefs.h <<\EOF
2228 #define HAVE_SHADOW_H 1
2229 EOF
2230
2231                 fi
2232         ;;
2233 esac
2234 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2235 do
2236 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2237 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2238 echo "configure:2239: checking for $ac_hdr" >&5
2239 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2240   echo $ac_n "(cached) $ac_c" 1>&6
2241 else
2242   cat > conftest.$ac_ext <<EOF
2243 #line 2244 "configure"
2244 #include "confdefs.h"
2245 #include <$ac_hdr>
2246 EOF
2247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2248 { (eval echo configure:2249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2250 if test -z "$ac_err"; then
2251   rm -rf conftest*
2252   eval "ac_cv_header_$ac_safe=yes"
2253 else
2254   echo "$ac_err" >&5
2255   echo "configure: failed program was:" >&5
2256   cat conftest.$ac_ext >&5
2257   rm -rf conftest*
2258   eval "ac_cv_header_$ac_safe=no"
2259 fi
2260 rm -f conftest*
2261 fi
2262 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2263   echo "$ac_t""yes" 1>&6
2264     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2265   cat >> confdefs.h <<EOF
2266 #define $ac_tr_hdr 1
2267 EOF
2268  
2269 else
2270   echo "$ac_t""no" 1>&6
2271 fi
2272 done
2273
2274 for ac_hdr in nss.h nss_common.h sys/security.h security/pam_appl.h security/pam_modules.h
2275 do
2276 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2277 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2278 echo "configure:2279: checking for $ac_hdr" >&5
2279 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2280   echo $ac_n "(cached) $ac_c" 1>&6
2281 else
2282   cat > conftest.$ac_ext <<EOF
2283 #line 2284 "configure"
2284 #include "confdefs.h"
2285 #include <$ac_hdr>
2286 EOF
2287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2288 { (eval echo configure:2289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2290 if test -z "$ac_err"; then
2291   rm -rf conftest*
2292   eval "ac_cv_header_$ac_safe=yes"
2293 else
2294   echo "$ac_err" >&5
2295   echo "configure: failed program was:" >&5
2296   cat conftest.$ac_ext >&5
2297   rm -rf conftest*
2298   eval "ac_cv_header_$ac_safe=no"
2299 fi
2300 rm -f conftest*
2301 fi
2302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2303   echo "$ac_t""yes" 1>&6
2304     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2305   cat >> confdefs.h <<EOF
2306 #define $ac_tr_hdr 1
2307 EOF
2308  
2309 else
2310   echo "$ac_t""no" 1>&6
2311 fi
2312 done
2313
2314 for ac_hdr in stropts.h poll.h
2315 do
2316 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2317 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2318 echo "configure:2319: checking for $ac_hdr" >&5
2319 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2320   echo $ac_n "(cached) $ac_c" 1>&6
2321 else
2322   cat > conftest.$ac_ext <<EOF
2323 #line 2324 "configure"
2324 #include "confdefs.h"
2325 #include <$ac_hdr>
2326 EOF
2327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2328 { (eval echo configure:2329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2330 if test -z "$ac_err"; then
2331   rm -rf conftest*
2332   eval "ac_cv_header_$ac_safe=yes"
2333 else
2334   echo "$ac_err" >&5
2335   echo "configure: failed program was:" >&5
2336   cat conftest.$ac_ext >&5
2337   rm -rf conftest*
2338   eval "ac_cv_header_$ac_safe=no"
2339 fi
2340 rm -f conftest*
2341 fi
2342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2343   echo "$ac_t""yes" 1>&6
2344     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2345   cat >> confdefs.h <<EOF
2346 #define $ac_tr_hdr 1
2347 EOF
2348  
2349 else
2350   echo "$ac_t""no" 1>&6
2351 fi
2352 done
2353
2354 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2355 do
2356 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2357 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2358 echo "configure:2359: checking for $ac_hdr" >&5
2359 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2360   echo $ac_n "(cached) $ac_c" 1>&6
2361 else
2362   cat > conftest.$ac_ext <<EOF
2363 #line 2364 "configure"
2364 #include "confdefs.h"
2365 #include <$ac_hdr>
2366 EOF
2367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2368 { (eval echo configure:2369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2370 if test -z "$ac_err"; then
2371   rm -rf conftest*
2372   eval "ac_cv_header_$ac_safe=yes"
2373 else
2374   echo "$ac_err" >&5
2375   echo "configure: failed program was:" >&5
2376   cat conftest.$ac_ext >&5
2377   rm -rf conftest*
2378   eval "ac_cv_header_$ac_safe=no"
2379 fi
2380 rm -f conftest*
2381 fi
2382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2383   echo "$ac_t""yes" 1>&6
2384     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2385   cat >> confdefs.h <<EOF
2386 #define $ac_tr_hdr 1
2387 EOF
2388  
2389 else
2390   echo "$ac_t""no" 1>&6
2391 fi
2392 done
2393
2394 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2395 do
2396 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2397 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2398 echo "configure:2399: checking for $ac_hdr" >&5
2399 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2400   echo $ac_n "(cached) $ac_c" 1>&6
2401 else
2402   cat > conftest.$ac_ext <<EOF
2403 #line 2404 "configure"
2404 #include "confdefs.h"
2405 #include <$ac_hdr>
2406 EOF
2407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2408 { (eval echo configure:2409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2410 if test -z "$ac_err"; then
2411   rm -rf conftest*
2412   eval "ac_cv_header_$ac_safe=yes"
2413 else
2414   echo "$ac_err" >&5
2415   echo "configure: failed program was:" >&5
2416   cat conftest.$ac_ext >&5
2417   rm -rf conftest*
2418   eval "ac_cv_header_$ac_safe=no"
2419 fi
2420 rm -f conftest*
2421 fi
2422 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2423   echo "$ac_t""yes" 1>&6
2424     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2425   cat >> confdefs.h <<EOF
2426 #define $ac_tr_hdr 1
2427 EOF
2428  
2429 else
2430   echo "$ac_t""no" 1>&6
2431 fi
2432 done
2433
2434
2435 # For experimental utmp support (lastlog on some BSD-like systems)
2436 for ac_hdr in utmp.h utmpx.h lastlog.h
2437 do
2438 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2439 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2440 echo "configure:2441: checking for $ac_hdr" >&5
2441 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2442   echo $ac_n "(cached) $ac_c" 1>&6
2443 else
2444   cat > conftest.$ac_ext <<EOF
2445 #line 2446 "configure"
2446 #include "confdefs.h"
2447 #include <$ac_hdr>
2448 EOF
2449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2450 { (eval echo configure:2451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2452 if test -z "$ac_err"; then
2453   rm -rf conftest*
2454   eval "ac_cv_header_$ac_safe=yes"
2455 else
2456   echo "$ac_err" >&5
2457   echo "configure: failed program was:" >&5
2458   cat conftest.$ac_ext >&5
2459   rm -rf conftest*
2460   eval "ac_cv_header_$ac_safe=no"
2461 fi
2462 rm -f conftest*
2463 fi
2464 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2465   echo "$ac_t""yes" 1>&6
2466     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2467   cat >> confdefs.h <<EOF
2468 #define $ac_tr_hdr 1
2469 EOF
2470  
2471 else
2472   echo "$ac_t""no" 1>&6
2473 fi
2474 done
2475
2476  
2477 # For quotas on Veritas VxFS filesystems
2478 for ac_hdr in sys/fs/vx_quota.h
2479 do
2480 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2481 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2482 echo "configure:2483: checking for $ac_hdr" >&5
2483 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2484   echo $ac_n "(cached) $ac_c" 1>&6
2485 else
2486   cat > conftest.$ac_ext <<EOF
2487 #line 2488 "configure"
2488 #include "confdefs.h"
2489 #include <$ac_hdr>
2490 EOF
2491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2492 { (eval echo configure:2493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2494 if test -z "$ac_err"; then
2495   rm -rf conftest*
2496   eval "ac_cv_header_$ac_safe=yes"
2497 else
2498   echo "$ac_err" >&5
2499   echo "configure: failed program was:" >&5
2500   cat conftest.$ac_ext >&5
2501   rm -rf conftest*
2502   eval "ac_cv_header_$ac_safe=no"
2503 fi
2504 rm -f conftest*
2505 fi
2506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2507   echo "$ac_t""yes" 1>&6
2508     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2509   cat >> confdefs.h <<EOF
2510 #define $ac_tr_hdr 1
2511 EOF
2512  
2513 else
2514   echo "$ac_t""no" 1>&6
2515 fi
2516 done
2517
2518
2519 echo $ac_n "checking size of int""... $ac_c" 1>&6
2520 echo "configure:2521: checking size of int" >&5
2521 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2522   echo $ac_n "(cached) $ac_c" 1>&6
2523 else
2524   if test "$cross_compiling" = yes; then
2525   ac_cv_sizeof_int=cross
2526 else
2527   cat > conftest.$ac_ext <<EOF
2528 #line 2529 "configure"
2529 #include "confdefs.h"
2530 #include <stdio.h>
2531 main()
2532 {
2533   FILE *f=fopen("conftestval", "w");
2534   if (!f) exit(1);
2535   fprintf(f, "%d\n", sizeof(int));
2536   exit(0);
2537 }
2538 EOF
2539 if { (eval echo configure:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2540 then
2541   ac_cv_sizeof_int=`cat conftestval`
2542 else
2543   echo "configure: failed program was:" >&5
2544   cat conftest.$ac_ext >&5
2545   rm -fr conftest*
2546   ac_cv_sizeof_int=0
2547 fi
2548 rm -fr conftest*
2549 fi
2550
2551 fi
2552 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2553 cat >> confdefs.h <<EOF
2554 #define SIZEOF_INT $ac_cv_sizeof_int
2555 EOF
2556
2557
2558 echo $ac_n "checking size of long""... $ac_c" 1>&6
2559 echo "configure:2560: checking size of long" >&5
2560 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2561   echo $ac_n "(cached) $ac_c" 1>&6
2562 else
2563   if test "$cross_compiling" = yes; then
2564   ac_cv_sizeof_long=cross
2565 else
2566   cat > conftest.$ac_ext <<EOF
2567 #line 2568 "configure"
2568 #include "confdefs.h"
2569 #include <stdio.h>
2570 main()
2571 {
2572   FILE *f=fopen("conftestval", "w");
2573   if (!f) exit(1);
2574   fprintf(f, "%d\n", sizeof(long));
2575   exit(0);
2576 }
2577 EOF
2578 if { (eval echo configure:2579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2579 then
2580   ac_cv_sizeof_long=`cat conftestval`
2581 else
2582   echo "configure: failed program was:" >&5
2583   cat conftest.$ac_ext >&5
2584   rm -fr conftest*
2585   ac_cv_sizeof_long=0
2586 fi
2587 rm -fr conftest*
2588 fi
2589
2590 fi
2591 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2592 cat >> confdefs.h <<EOF
2593 #define SIZEOF_LONG $ac_cv_sizeof_long
2594 EOF
2595
2596
2597 echo $ac_n "checking size of short""... $ac_c" 1>&6
2598 echo "configure:2599: checking size of short" >&5
2599 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2600   echo $ac_n "(cached) $ac_c" 1>&6
2601 else
2602   if test "$cross_compiling" = yes; then
2603   ac_cv_sizeof_short=cross
2604 else
2605   cat > conftest.$ac_ext <<EOF
2606 #line 2607 "configure"
2607 #include "confdefs.h"
2608 #include <stdio.h>
2609 main()
2610 {
2611   FILE *f=fopen("conftestval", "w");
2612   if (!f) exit(1);
2613   fprintf(f, "%d\n", sizeof(short));
2614   exit(0);
2615 }
2616 EOF
2617 if { (eval echo configure:2618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2618 then
2619   ac_cv_sizeof_short=`cat conftestval`
2620 else
2621   echo "configure: failed program was:" >&5
2622   cat conftest.$ac_ext >&5
2623   rm -fr conftest*
2624   ac_cv_sizeof_short=0
2625 fi
2626 rm -fr conftest*
2627 fi
2628
2629 fi
2630 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2631 cat >> confdefs.h <<EOF
2632 #define SIZEOF_SHORT $ac_cv_sizeof_short
2633 EOF
2634
2635
2636
2637 echo $ac_n "checking for working const""... $ac_c" 1>&6
2638 echo "configure:2639: checking for working const" >&5
2639 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2640   echo $ac_n "(cached) $ac_c" 1>&6
2641 else
2642   cat > conftest.$ac_ext <<EOF
2643 #line 2644 "configure"
2644 #include "confdefs.h"
2645
2646 int main() {
2647
2648 /* Ultrix mips cc rejects this.  */
2649 typedef int charset[2]; const charset x;
2650 /* SunOS 4.1.1 cc rejects this.  */
2651 char const *const *ccp;
2652 char **p;
2653 /* NEC SVR4.0.2 mips cc rejects this.  */
2654 struct point {int x, y;};
2655 static struct point const zero = {0,0};
2656 /* AIX XL C 1.02.0.0 rejects this.
2657    It does not let you subtract one const X* pointer from another in an arm
2658    of an if-expression whose if-part is not a constant expression */
2659 const char *g = "string";
2660 ccp = &g + (g ? g-g : 0);
2661 /* HPUX 7.0 cc rejects these. */
2662 ++ccp;
2663 p = (char**) ccp;
2664 ccp = (char const *const *) p;
2665 { /* SCO 3.2v4 cc rejects this.  */
2666   char *t;
2667   char const *s = 0 ? (char *) 0 : (char const *) 0;
2668
2669   *t++ = 0;
2670 }
2671 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2672   int x[] = {25, 17};
2673   const int *foo = &x[0];
2674   ++foo;
2675 }
2676 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2677   typedef const int *iptr;
2678   iptr p = 0;
2679   ++p;
2680 }
2681 { /* AIX XL C 1.02.0.0 rejects this saying
2682      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2683   struct s { int j; const int *ap[3]; };
2684   struct s *b; b->j = 5;
2685 }
2686 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2687   const int foo = 10;
2688 }
2689
2690 ; return 0; }
2691 EOF
2692 if { (eval echo configure:2693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2693   rm -rf conftest*
2694   ac_cv_c_const=yes
2695 else
2696   echo "configure: failed program was:" >&5
2697   cat conftest.$ac_ext >&5
2698   rm -rf conftest*
2699   ac_cv_c_const=no
2700 fi
2701 rm -f conftest*
2702 fi
2703
2704 echo "$ac_t""$ac_cv_c_const" 1>&6
2705 if test $ac_cv_c_const = no; then
2706   cat >> confdefs.h <<\EOF
2707 #define const 
2708 EOF
2709
2710 fi
2711
2712 echo $ac_n "checking for inline""... $ac_c" 1>&6
2713 echo "configure:2714: checking for inline" >&5
2714 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2715   echo $ac_n "(cached) $ac_c" 1>&6
2716 else
2717   ac_cv_c_inline=no
2718 for ac_kw in inline __inline__ __inline; do
2719   cat > conftest.$ac_ext <<EOF
2720 #line 2721 "configure"
2721 #include "confdefs.h"
2722
2723 int main() {
2724 } $ac_kw foo() {
2725 ; return 0; }
2726 EOF
2727 if { (eval echo configure:2728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2728   rm -rf conftest*
2729   ac_cv_c_inline=$ac_kw; break
2730 else
2731   echo "configure: failed program was:" >&5
2732   cat conftest.$ac_ext >&5
2733 fi
2734 rm -f conftest*
2735 done
2736
2737 fi
2738
2739 echo "$ac_t""$ac_cv_c_inline" 1>&6
2740 case "$ac_cv_c_inline" in
2741   inline | yes) ;;
2742   no) cat >> confdefs.h <<\EOF
2743 #define inline 
2744 EOF
2745  ;;
2746   *)  cat >> confdefs.h <<EOF
2747 #define inline $ac_cv_c_inline
2748 EOF
2749  ;;
2750 esac
2751
2752 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2753 echo "configure:2754: checking whether byte ordering is bigendian" >&5
2754 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2755   echo $ac_n "(cached) $ac_c" 1>&6
2756 else
2757   ac_cv_c_bigendian=unknown
2758 # See if sys/param.h defines the BYTE_ORDER macro.
2759 cat > conftest.$ac_ext <<EOF
2760 #line 2761 "configure"
2761 #include "confdefs.h"
2762 #include <sys/types.h>
2763 #include <sys/param.h>
2764 int main() {
2765
2766 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2767  bogus endian macros
2768 #endif
2769 ; return 0; }
2770 EOF
2771 if { (eval echo configure:2772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2772   rm -rf conftest*
2773   # It does; now see whether it defined to BIG_ENDIAN or not.
2774 cat > conftest.$ac_ext <<EOF
2775 #line 2776 "configure"
2776 #include "confdefs.h"
2777 #include <sys/types.h>
2778 #include <sys/param.h>
2779 int main() {
2780
2781 #if BYTE_ORDER != BIG_ENDIAN
2782  not big endian
2783 #endif
2784 ; return 0; }
2785 EOF
2786 if { (eval echo configure:2787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2787   rm -rf conftest*
2788   ac_cv_c_bigendian=yes
2789 else
2790   echo "configure: failed program was:" >&5
2791   cat conftest.$ac_ext >&5
2792   rm -rf conftest*
2793   ac_cv_c_bigendian=no
2794 fi
2795 rm -f conftest*
2796 else
2797   echo "configure: failed program was:" >&5
2798   cat conftest.$ac_ext >&5
2799 fi
2800 rm -f conftest*
2801 if test $ac_cv_c_bigendian = unknown; then
2802 if test "$cross_compiling" = yes; then
2803     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2804 else
2805   cat > conftest.$ac_ext <<EOF
2806 #line 2807 "configure"
2807 #include "confdefs.h"
2808 main () {
2809   /* Are we little or big endian?  From Harbison&Steele.  */
2810   union
2811   {
2812     long l;
2813     char c[sizeof (long)];
2814   } u;
2815   u.l = 1;
2816   exit (u.c[sizeof (long) - 1] == 1);
2817 }
2818 EOF
2819 if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2820 then
2821   ac_cv_c_bigendian=no
2822 else
2823   echo "configure: failed program was:" >&5
2824   cat conftest.$ac_ext >&5
2825   rm -fr conftest*
2826   ac_cv_c_bigendian=yes
2827 fi
2828 rm -fr conftest*
2829 fi
2830
2831 fi
2832 fi
2833
2834 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2835 if test $ac_cv_c_bigendian = yes; then
2836   cat >> confdefs.h <<\EOF
2837 #define WORDS_BIGENDIAN 1
2838 EOF
2839
2840 fi
2841
2842 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2843 echo "configure:2844: checking whether char is unsigned" >&5
2844 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2845   echo $ac_n "(cached) $ac_c" 1>&6
2846 else
2847   if test "$GCC" = yes; then
2848   # GCC predefines this symbol on systems where it applies.
2849 cat > conftest.$ac_ext <<EOF
2850 #line 2851 "configure"
2851 #include "confdefs.h"
2852 #ifdef __CHAR_UNSIGNED__
2853   yes
2854 #endif
2855
2856 EOF
2857 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2858   egrep "yes" >/dev/null 2>&1; then
2859   rm -rf conftest*
2860   ac_cv_c_char_unsigned=yes
2861 else
2862   rm -rf conftest*
2863   ac_cv_c_char_unsigned=no
2864 fi
2865 rm -f conftest*
2866
2867 else
2868 if test "$cross_compiling" = yes; then
2869     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2870 else
2871   cat > conftest.$ac_ext <<EOF
2872 #line 2873 "configure"
2873 #include "confdefs.h"
2874 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2875 #if !defined(__STDC__) || __STDC__ != 1
2876 #define volatile
2877 #endif
2878 main() {
2879   volatile char c = 255; exit(c < 0);
2880 }
2881 EOF
2882 if { (eval echo configure:2883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2883 then
2884   ac_cv_c_char_unsigned=yes
2885 else
2886   echo "configure: failed program was:" >&5
2887   cat conftest.$ac_ext >&5
2888   rm -fr conftest*
2889   ac_cv_c_char_unsigned=no
2890 fi
2891 rm -fr conftest*
2892 fi
2893
2894 fi
2895 fi
2896
2897 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2898 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2899   cat >> confdefs.h <<\EOF
2900 #define __CHAR_UNSIGNED__ 1
2901 EOF
2902
2903 fi
2904
2905
2906 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2907 echo "configure:2908: checking return type of signal handlers" >&5
2908 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2909   echo $ac_n "(cached) $ac_c" 1>&6
2910 else
2911   cat > conftest.$ac_ext <<EOF
2912 #line 2913 "configure"
2913 #include "confdefs.h"
2914 #include <sys/types.h>
2915 #include <signal.h>
2916 #ifdef signal
2917 #undef signal
2918 #endif
2919 #ifdef __cplusplus
2920 extern "C" void (*signal (int, void (*)(int)))(int);
2921 #else
2922 void (*signal ()) ();
2923 #endif
2924
2925 int main() {
2926 int i;
2927 ; return 0; }
2928 EOF
2929 if { (eval echo configure:2930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2930   rm -rf conftest*
2931   ac_cv_type_signal=void
2932 else
2933   echo "configure: failed program was:" >&5
2934   cat conftest.$ac_ext >&5
2935   rm -rf conftest*
2936   ac_cv_type_signal=int
2937 fi
2938 rm -f conftest*
2939 fi
2940
2941 echo "$ac_t""$ac_cv_type_signal" 1>&6
2942 cat >> confdefs.h <<EOF
2943 #define RETSIGTYPE $ac_cv_type_signal
2944 EOF
2945
2946
2947 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2948 echo "configure:2949: checking for uid_t in sys/types.h" >&5
2949 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2950   echo $ac_n "(cached) $ac_c" 1>&6
2951 else
2952   cat > conftest.$ac_ext <<EOF
2953 #line 2954 "configure"
2954 #include "confdefs.h"
2955 #include <sys/types.h>
2956 EOF
2957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2958   egrep "uid_t" >/dev/null 2>&1; then
2959   rm -rf conftest*
2960   ac_cv_type_uid_t=yes
2961 else
2962   rm -rf conftest*
2963   ac_cv_type_uid_t=no
2964 fi
2965 rm -f conftest*
2966
2967 fi
2968
2969 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2970 if test $ac_cv_type_uid_t = no; then
2971   cat >> confdefs.h <<\EOF
2972 #define uid_t int
2973 EOF
2974
2975   cat >> confdefs.h <<\EOF
2976 #define gid_t int
2977 EOF
2978
2979 fi
2980
2981 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2982 echo "configure:2983: checking for mode_t" >&5
2983 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2984   echo $ac_n "(cached) $ac_c" 1>&6
2985 else
2986   cat > conftest.$ac_ext <<EOF
2987 #line 2988 "configure"
2988 #include "confdefs.h"
2989 #include <sys/types.h>
2990 #if STDC_HEADERS
2991 #include <stdlib.h>
2992 #include <stddef.h>
2993 #endif
2994 EOF
2995 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2996   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2997   rm -rf conftest*
2998   ac_cv_type_mode_t=yes
2999 else
3000   rm -rf conftest*
3001   ac_cv_type_mode_t=no
3002 fi
3003 rm -f conftest*
3004
3005 fi
3006 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3007 if test $ac_cv_type_mode_t = no; then
3008   cat >> confdefs.h <<\EOF
3009 #define mode_t int
3010 EOF
3011
3012 fi
3013
3014 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3015 echo "configure:3016: checking for off_t" >&5
3016 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3017   echo $ac_n "(cached) $ac_c" 1>&6
3018 else
3019   cat > conftest.$ac_ext <<EOF
3020 #line 3021 "configure"
3021 #include "confdefs.h"
3022 #include <sys/types.h>
3023 #if STDC_HEADERS
3024 #include <stdlib.h>
3025 #include <stddef.h>
3026 #endif
3027 EOF
3028 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3029   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3030   rm -rf conftest*
3031   ac_cv_type_off_t=yes
3032 else
3033   rm -rf conftest*
3034   ac_cv_type_off_t=no
3035 fi
3036 rm -f conftest*
3037
3038 fi
3039 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3040 if test $ac_cv_type_off_t = no; then
3041   cat >> confdefs.h <<\EOF
3042 #define off_t long
3043 EOF
3044
3045 fi
3046
3047 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3048 echo "configure:3049: checking for size_t" >&5
3049 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3050   echo $ac_n "(cached) $ac_c" 1>&6
3051 else
3052   cat > conftest.$ac_ext <<EOF
3053 #line 3054 "configure"
3054 #include "confdefs.h"
3055 #include <sys/types.h>
3056 #if STDC_HEADERS
3057 #include <stdlib.h>
3058 #include <stddef.h>
3059 #endif
3060 EOF
3061 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3062   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3063   rm -rf conftest*
3064   ac_cv_type_size_t=yes
3065 else
3066   rm -rf conftest*
3067   ac_cv_type_size_t=no
3068 fi
3069 rm -f conftest*
3070
3071 fi
3072 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3073 if test $ac_cv_type_size_t = no; then
3074   cat >> confdefs.h <<\EOF
3075 #define size_t unsigned
3076 EOF
3077
3078 fi
3079
3080 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3081 echo "configure:3082: checking for pid_t" >&5
3082 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3083   echo $ac_n "(cached) $ac_c" 1>&6
3084 else
3085   cat > conftest.$ac_ext <<EOF
3086 #line 3087 "configure"
3087 #include "confdefs.h"
3088 #include <sys/types.h>
3089 #if STDC_HEADERS
3090 #include <stdlib.h>
3091 #include <stddef.h>
3092 #endif
3093 EOF
3094 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3095   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3096   rm -rf conftest*
3097   ac_cv_type_pid_t=yes
3098 else
3099   rm -rf conftest*
3100   ac_cv_type_pid_t=no
3101 fi
3102 rm -f conftest*
3103
3104 fi
3105 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3106 if test $ac_cv_type_pid_t = no; then
3107   cat >> confdefs.h <<\EOF
3108 #define pid_t int
3109 EOF
3110
3111 fi
3112
3113 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3114 echo "configure:3115: checking for st_rdev in struct stat" >&5
3115 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3116   echo $ac_n "(cached) $ac_c" 1>&6
3117 else
3118   cat > conftest.$ac_ext <<EOF
3119 #line 3120 "configure"
3120 #include "confdefs.h"
3121 #include <sys/types.h>
3122 #include <sys/stat.h>
3123 int main() {
3124 struct stat s; s.st_rdev;
3125 ; return 0; }
3126 EOF
3127 if { (eval echo configure:3128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3128   rm -rf conftest*
3129   ac_cv_struct_st_rdev=yes
3130 else
3131   echo "configure: failed program was:" >&5
3132   cat conftest.$ac_ext >&5
3133   rm -rf conftest*
3134   ac_cv_struct_st_rdev=no
3135 fi
3136 rm -f conftest*
3137 fi
3138
3139 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3140 if test $ac_cv_struct_st_rdev = yes; then
3141   cat >> confdefs.h <<\EOF
3142 #define HAVE_ST_RDEV 1
3143 EOF
3144
3145 fi
3146
3147 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3148 echo "configure:3149: checking for d_off in dirent" >&5
3149 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3150   echo $ac_n "(cached) $ac_c" 1>&6
3151 else
3152   cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155
3156 #include <unistd.h>
3157 #include <sys/types.h>
3158 #include <dirent.h>
3159 int main() {
3160 struct dirent d; d.d_off;
3161 ; return 0; }
3162 EOF
3163 if { (eval echo configure:3164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3164   rm -rf conftest*
3165   ac_cv_dirent_d_off=yes
3166 else
3167   echo "configure: failed program was:" >&5
3168   cat conftest.$ac_ext >&5
3169   rm -rf conftest*
3170   ac_cv_dirent_d_off=no
3171 fi
3172 rm -f conftest*
3173 fi
3174
3175 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3176 if test $ac_cv_dirent_d_off = yes; then
3177   cat >> confdefs.h <<\EOF
3178 #define HAVE_DIRENT_D_OFF 1
3179 EOF
3180
3181 fi
3182
3183 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3184 echo "configure:3185: checking for ino_t" >&5
3185 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3186   echo $ac_n "(cached) $ac_c" 1>&6
3187 else
3188   cat > conftest.$ac_ext <<EOF
3189 #line 3190 "configure"
3190 #include "confdefs.h"
3191 #include <sys/types.h>
3192 #if STDC_HEADERS
3193 #include <stdlib.h>
3194 #include <stddef.h>
3195 #endif
3196 EOF
3197 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3198   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3199   rm -rf conftest*
3200   ac_cv_type_ino_t=yes
3201 else
3202   rm -rf conftest*
3203   ac_cv_type_ino_t=no
3204 fi
3205 rm -f conftest*
3206
3207 fi
3208 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3209 if test $ac_cv_type_ino_t = no; then
3210   cat >> confdefs.h <<\EOF
3211 #define ino_t unsigned
3212 EOF
3213
3214 fi
3215
3216 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3217 echo "configure:3218: checking for loff_t" >&5
3218 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3219   echo $ac_n "(cached) $ac_c" 1>&6
3220 else
3221   cat > conftest.$ac_ext <<EOF
3222 #line 3223 "configure"
3223 #include "confdefs.h"
3224 #include <sys/types.h>
3225 #if STDC_HEADERS
3226 #include <stdlib.h>
3227 #include <stddef.h>
3228 #endif
3229 EOF
3230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3231   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3232   rm -rf conftest*
3233   ac_cv_type_loff_t=yes
3234 else
3235   rm -rf conftest*
3236   ac_cv_type_loff_t=no
3237 fi
3238 rm -f conftest*
3239
3240 fi
3241 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3242 if test $ac_cv_type_loff_t = no; then
3243   cat >> confdefs.h <<\EOF
3244 #define loff_t off_t
3245 EOF
3246
3247 fi
3248
3249 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3250 echo "configure:3251: checking for offset_t" >&5
3251 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3252   echo $ac_n "(cached) $ac_c" 1>&6
3253 else
3254   cat > conftest.$ac_ext <<EOF
3255 #line 3256 "configure"
3256 #include "confdefs.h"
3257 #include <sys/types.h>
3258 #if STDC_HEADERS
3259 #include <stdlib.h>
3260 #include <stddef.h>
3261 #endif
3262 EOF
3263 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3264   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3265   rm -rf conftest*
3266   ac_cv_type_offset_t=yes
3267 else
3268   rm -rf conftest*
3269   ac_cv_type_offset_t=no
3270 fi
3271 rm -f conftest*
3272
3273 fi
3274 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3275 if test $ac_cv_type_offset_t = no; then
3276   cat >> confdefs.h <<\EOF
3277 #define offset_t loff_t
3278 EOF
3279
3280 fi
3281
3282 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3283 echo "configure:3284: checking for ssize_t" >&5
3284 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3285   echo $ac_n "(cached) $ac_c" 1>&6
3286 else
3287   cat > conftest.$ac_ext <<EOF
3288 #line 3289 "configure"
3289 #include "confdefs.h"
3290 #include <sys/types.h>
3291 #if STDC_HEADERS
3292 #include <stdlib.h>
3293 #include <stddef.h>
3294 #endif
3295 EOF
3296 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3297   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3298   rm -rf conftest*
3299   ac_cv_type_ssize_t=yes
3300 else
3301   rm -rf conftest*
3302   ac_cv_type_ssize_t=no
3303 fi
3304 rm -f conftest*
3305
3306 fi
3307 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3308 if test $ac_cv_type_ssize_t = no; then
3309   cat >> confdefs.h <<\EOF
3310 #define ssize_t int
3311 EOF
3312
3313 fi
3314
3315 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3316 echo "configure:3317: checking for wchar_t" >&5
3317 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3318   echo $ac_n "(cached) $ac_c" 1>&6
3319 else
3320   cat > conftest.$ac_ext <<EOF
3321 #line 3322 "configure"
3322 #include "confdefs.h"
3323 #include <sys/types.h>
3324 #if STDC_HEADERS
3325 #include <stdlib.h>
3326 #include <stddef.h>
3327 #endif
3328 EOF
3329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3330   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3331   rm -rf conftest*
3332   ac_cv_type_wchar_t=yes
3333 else
3334   rm -rf conftest*
3335   ac_cv_type_wchar_t=no
3336 fi
3337 rm -f conftest*
3338
3339 fi
3340 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3341 if test $ac_cv_type_wchar_t = no; then
3342   cat >> confdefs.h <<\EOF
3343 #define wchar_t unsigned short
3344 EOF
3345
3346 fi
3347
3348
3349 # we need libcups for CUPS support...
3350 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3351 echo "configure:3352: checking for httpConnect in -lcups" >&5
3352 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3353 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3354   echo $ac_n "(cached) $ac_c" 1>&6
3355 else
3356   ac_save_LIBS="$LIBS"
3357 LIBS="-lcups  $LIBS"
3358 cat > conftest.$ac_ext <<EOF
3359 #line 3360 "configure"
3360 #include "confdefs.h"
3361 /* Override any gcc2 internal prototype to avoid an error.  */
3362 /* We use char because int might match the return type of a gcc2
3363     builtin and then its argument prototype would still apply.  */
3364 char httpConnect();
3365
3366 int main() {
3367 httpConnect()
3368 ; return 0; }
3369 EOF
3370 if { (eval echo configure:3371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3371   rm -rf conftest*
3372   eval "ac_cv_lib_$ac_lib_var=yes"
3373 else
3374   echo "configure: failed program was:" >&5
3375   cat conftest.$ac_ext >&5
3376   rm -rf conftest*
3377   eval "ac_cv_lib_$ac_lib_var=no"
3378 fi
3379 rm -f conftest*
3380 LIBS="$ac_save_LIBS"
3381
3382 fi
3383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3384   echo "$ac_t""yes" 1>&6
3385     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3386     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3387   cat >> confdefs.h <<EOF
3388 #define $ac_tr_lib 1
3389 EOF
3390
3391   LIBS="-lcups $LIBS"
3392
3393 else
3394   echo "$ac_t""no" 1>&6
3395 fi
3396
3397
3398 # we need libdl for PAM and the new VFS code
3399 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3400 echo "configure:3401: checking for dlopen in -ldl" >&5
3401 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3402 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3403   echo $ac_n "(cached) $ac_c" 1>&6
3404 else
3405   ac_save_LIBS="$LIBS"
3406 LIBS="-ldl  $LIBS"
3407 cat > conftest.$ac_ext <<EOF
3408 #line 3409 "configure"
3409 #include "confdefs.h"
3410 /* Override any gcc2 internal prototype to avoid an error.  */
3411 /* We use char because int might match the return type of a gcc2
3412     builtin and then its argument prototype would still apply.  */
3413 char dlopen();
3414
3415 int main() {
3416 dlopen()
3417 ; return 0; }
3418 EOF
3419 if { (eval echo configure:3420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3420   rm -rf conftest*
3421   eval "ac_cv_lib_$ac_lib_var=yes"
3422 else
3423   echo "configure: failed program was:" >&5
3424   cat conftest.$ac_ext >&5
3425   rm -rf conftest*
3426   eval "ac_cv_lib_$ac_lib_var=no"
3427 fi
3428 rm -f conftest*
3429 LIBS="$ac_save_LIBS"
3430
3431 fi
3432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3433   echo "$ac_t""yes" 1>&6
3434   LIBS="$LIBS -ldl";
3435         cat >> confdefs.h <<\EOF
3436 #define HAVE_LIBDL 1
3437 EOF
3438
3439 else
3440   echo "$ac_t""no" 1>&6
3441 fi
3442
3443
3444 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3445 echo "configure:3446: checking for socklen_t type" >&5
3446 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3447   echo $ac_n "(cached) $ac_c" 1>&6
3448 else
3449   
3450     cat > conftest.$ac_ext <<EOF
3451 #line 3452 "configure"
3452 #include "confdefs.h"
3453
3454 #include <sys/types.h>
3455 #if STDC_HEADERS
3456 #include <stdlib.h>
3457 #include <stddef.h>
3458 #endif
3459 #include <sys/socket.h>
3460 int main() {
3461 socklen_t i = 0
3462 ; return 0; }
3463 EOF
3464 if { (eval echo configure:3465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3465   rm -rf conftest*
3466   samba_cv_socklen_t=yes
3467 else
3468   echo "configure: failed program was:" >&5
3469   cat conftest.$ac_ext >&5
3470   rm -rf conftest*
3471   samba_cv_socklen_t=no
3472 fi
3473 rm -f conftest*
3474 fi
3475
3476 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3477 if test x"$samba_cv_socklen_t" = x"yes"; then
3478    cat >> confdefs.h <<\EOF
3479 #define HAVE_SOCKLEN_T_TYPE 1
3480 EOF
3481
3482 fi
3483
3484 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3485 echo "configure:3486: checking for sig_atomic_t type" >&5
3486 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3487   echo $ac_n "(cached) $ac_c" 1>&6
3488 else
3489   
3490     cat > conftest.$ac_ext <<EOF
3491 #line 3492 "configure"
3492 #include "confdefs.h"
3493
3494 #include <sys/types.h>
3495 #if STDC_HEADERS
3496 #include <stdlib.h>
3497 #include <stddef.h>
3498 #endif
3499 #include <signal.h>
3500 int main() {
3501 sig_atomic_t i = 0
3502 ; return 0; }
3503 EOF
3504 if { (eval echo configure:3505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3505   rm -rf conftest*
3506   samba_cv_sig_atomic_t=yes
3507 else
3508   echo "configure: failed program was:" >&5
3509   cat conftest.$ac_ext >&5
3510   rm -rf conftest*
3511   samba_cv_sig_atomic_t=no
3512 fi
3513 rm -f conftest*
3514 fi
3515
3516 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3517 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3518    cat >> confdefs.h <<\EOF
3519 #define HAVE_SIG_ATOMIC_T_TYPE 1
3520 EOF
3521
3522 fi
3523
3524 # stupid headers have the functions but no declaration. grrrr.
3525
3526  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3527 echo "configure:3528: checking for errno declaration" >&5
3528 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3529   echo $ac_n "(cached) $ac_c" 1>&6
3530 else
3531   
3532     cat > conftest.$ac_ext <<EOF
3533 #line 3534 "configure"
3534 #include "confdefs.h"
3535 #include <errno.h>
3536 int main() {
3537 int i = (int)errno
3538 ; return 0; }
3539 EOF
3540 if { (eval echo configure:3541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3541   rm -rf conftest*
3542   ac_cv_have_errno_decl=yes
3543 else
3544   echo "configure: failed program was:" >&5
3545   cat conftest.$ac_ext >&5
3546   rm -rf conftest*
3547   ac_cv_have_errno_decl=no
3548 fi
3549 rm -f conftest*
3550 fi
3551
3552 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3553  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3554     cat >> confdefs.h <<\EOF
3555 #define HAVE_ERRNO_DECL 1
3556 EOF
3557
3558  fi
3559
3560
3561  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3562 echo "configure:3563: checking for setresuid declaration" >&5
3563 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3564   echo $ac_n "(cached) $ac_c" 1>&6
3565 else
3566   
3567     cat > conftest.$ac_ext <<EOF
3568 #line 3569 "configure"
3569 #include "confdefs.h"
3570 #include <unistd.h>
3571 int main() {
3572 int i = (int)setresuid
3573 ; return 0; }
3574 EOF
3575 if { (eval echo configure:3576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3576   rm -rf conftest*
3577   ac_cv_have_setresuid_decl=yes
3578 else
3579   echo "configure: failed program was:" >&5
3580   cat conftest.$ac_ext >&5
3581   rm -rf conftest*
3582   ac_cv_have_setresuid_decl=no
3583 fi
3584 rm -f conftest*
3585 fi
3586
3587 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3588  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3589     cat >> confdefs.h <<\EOF
3590 #define HAVE_SETRESUID_DECL 1
3591 EOF
3592
3593  fi
3594
3595
3596  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3597 echo "configure:3598: checking for setresgid declaration" >&5
3598 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3599   echo $ac_n "(cached) $ac_c" 1>&6
3600 else
3601   
3602     cat > conftest.$ac_ext <<EOF
3603 #line 3604 "configure"
3604 #include "confdefs.h"
3605 #include <unistd.h>
3606 int main() {
3607 int i = (int)setresgid
3608 ; return 0; }
3609 EOF
3610 if { (eval echo configure:3611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3611   rm -rf conftest*
3612   ac_cv_have_setresgid_decl=yes
3613 else
3614   echo "configure: failed program was:" >&5
3615   cat conftest.$ac_ext >&5
3616   rm -rf conftest*
3617   ac_cv_have_setresgid_decl=no
3618 fi
3619 rm -f conftest*
3620 fi
3621
3622 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3623  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3624     cat >> confdefs.h <<\EOF
3625 #define HAVE_SETRESGID_DECL 1
3626 EOF
3627
3628  fi
3629
3630
3631  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3632 echo "configure:3633: checking for asprintf declaration" >&5
3633 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3634   echo $ac_n "(cached) $ac_c" 1>&6
3635 else
3636   
3637     cat > conftest.$ac_ext <<EOF
3638 #line 3639 "configure"
3639 #include "confdefs.h"
3640 #include <stdio.h>
3641 int main() {
3642 int i = (int)asprintf
3643 ; return 0; }
3644 EOF
3645 if { (eval echo configure:3646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3646   rm -rf conftest*
3647   ac_cv_have_asprintf_decl=yes
3648 else
3649   echo "configure: failed program was:" >&5
3650   cat conftest.$ac_ext >&5
3651   rm -rf conftest*
3652   ac_cv_have_asprintf_decl=no
3653 fi
3654 rm -f conftest*
3655 fi
3656
3657 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3658  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3659     cat >> confdefs.h <<\EOF
3660 #define HAVE_ASPRINTF_DECL 1
3661 EOF
3662
3663  fi
3664
3665
3666  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3667 echo "configure:3668: checking for vasprintf declaration" >&5
3668 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3669   echo $ac_n "(cached) $ac_c" 1>&6
3670 else
3671   
3672     cat > conftest.$ac_ext <<EOF
3673 #line 3674 "configure"
3674 #include "confdefs.h"
3675 #include <stdio.h>
3676 int main() {
3677 int i = (int)vasprintf
3678 ; return 0; }
3679 EOF
3680 if { (eval echo configure:3681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3681   rm -rf conftest*
3682   ac_cv_have_vasprintf_decl=yes
3683 else
3684   echo "configure: failed program was:" >&5
3685   cat conftest.$ac_ext >&5
3686   rm -rf conftest*
3687   ac_cv_have_vasprintf_decl=no
3688 fi
3689 rm -f conftest*
3690 fi
3691
3692 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3693  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3694     cat >> confdefs.h <<\EOF
3695 #define HAVE_VASPRINTF_DECL 1
3696 EOF
3697
3698  fi
3699
3700
3701  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3702 echo "configure:3703: checking for vsnprintf declaration" >&5
3703 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3704   echo $ac_n "(cached) $ac_c" 1>&6
3705 else
3706   
3707     cat > conftest.$ac_ext <<EOF
3708 #line 3709 "configure"
3709 #include "confdefs.h"
3710 #include <stdio.h>
3711 int main() {
3712 int i = (int)vsnprintf
3713 ; return 0; }
3714 EOF
3715 if { (eval echo configure:3716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3716   rm -rf conftest*
3717   ac_cv_have_vsnprintf_decl=yes
3718 else
3719   echo "configure: failed program was:" >&5
3720   cat conftest.$ac_ext >&5
3721   rm -rf conftest*
3722   ac_cv_have_vsnprintf_decl=no
3723 fi
3724 rm -f conftest*
3725 fi
3726
3727 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3728  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3729     cat >> confdefs.h <<\EOF
3730 #define HAVE_VSNPRINTF_DECL 1
3731 EOF
3732
3733  fi
3734
3735
3736  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3737 echo "configure:3738: checking for snprintf declaration" >&5
3738 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3739   echo $ac_n "(cached) $ac_c" 1>&6
3740 else
3741   
3742     cat > conftest.$ac_ext <<EOF
3743 #line 3744 "configure"
3744 #include "confdefs.h"
3745 #include <stdio.h>
3746 int main() {
3747 int i = (int)snprintf
3748 ; return 0; }
3749 EOF
3750 if { (eval echo configure:3751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3751   rm -rf conftest*
3752   ac_cv_have_snprintf_decl=yes
3753 else
3754   echo "configure: failed program was:" >&5
3755   cat conftest.$ac_ext >&5
3756   rm -rf conftest*
3757   ac_cv_have_snprintf_decl=no
3758 fi
3759 rm -f conftest*
3760 fi
3761
3762 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3763  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3764     cat >> confdefs.h <<\EOF
3765 #define HAVE_SNPRINTF_DECL 1
3766 EOF
3767
3768  fi
3769
3770
3771 # and glibc has setresuid under linux but the function does
3772 # nothing until kernel 2.1.44! very dumb.
3773 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3774 echo "configure:3775: checking for real setresuid" >&5
3775 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3776   echo $ac_n "(cached) $ac_c" 1>&6
3777 else
3778   
3779     if test "$cross_compiling" = yes; then
3780   samba_cv_have_setresuid=cross
3781 else
3782   cat > conftest.$ac_ext <<EOF
3783 #line 3784 "configure"
3784 #include "confdefs.h"
3785 #include <errno.h>
3786 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3787 EOF
3788 if { (eval echo configure:3789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3789 then
3790   samba_cv_have_setresuid=yes
3791 else
3792   echo "configure: failed program was:" >&5
3793   cat conftest.$ac_ext >&5
3794   rm -fr conftest*
3795   samba_cv_have_setresuid=no
3796 fi
3797 rm -fr conftest*
3798 fi
3799
3800 fi
3801
3802 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3803 if test x"$samba_cv_have_setresuid" = x"yes"; then
3804     cat >> confdefs.h <<\EOF
3805 #define HAVE_SETRESUID 1
3806 EOF
3807
3808 fi
3809
3810 # Do the same check for setresguid...
3811 #
3812 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3813 echo "configure:3814: checking for real setresgid" >&5
3814 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
3815   echo $ac_n "(cached) $ac_c" 1>&6
3816 else
3817   
3818     if test "$cross_compiling" = yes; then
3819   samba_cv_have_setresgid=cross
3820 else
3821   cat > conftest.$ac_ext <<EOF
3822 #line 3823 "configure"
3823 #include "confdefs.h"
3824 #include <unistd.h>
3825 #include <errno.h>
3826 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
3827 EOF
3828 if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3829 then
3830   samba_cv_have_setresgid=yes
3831 else
3832   echo "configure: failed program was:" >&5
3833   cat conftest.$ac_ext >&5
3834   rm -fr conftest*
3835   samba_cv_have_setresgid=no
3836 fi
3837 rm -fr conftest*
3838 fi
3839
3840 fi
3841
3842 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
3843 if test x"$samba_cv_have_setresgid" = x"yes"; then
3844     cat >> confdefs.h <<\EOF
3845 #define HAVE_SETRESGID 1
3846 EOF
3847
3848 fi
3849
3850 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3851 echo "configure:3852: checking for 8-bit clean memcmp" >&5
3852 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3853   echo $ac_n "(cached) $ac_c" 1>&6
3854 else
3855   if test "$cross_compiling" = yes; then
3856   ac_cv_func_memcmp_clean=no
3857 else
3858   cat > conftest.$ac_ext <<EOF
3859 #line 3860 "configure"
3860 #include "confdefs.h"
3861
3862 main()
3863 {
3864   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3865   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3866 }
3867
3868 EOF
3869 if { (eval echo configure:3870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3870 then
3871   ac_cv_func_memcmp_clean=yes
3872 else
3873   echo "configure: failed program was:" >&5
3874   cat conftest.$ac_ext >&5
3875   rm -fr conftest*
3876   ac_cv_func_memcmp_clean=no
3877 fi
3878 rm -fr conftest*
3879 fi
3880
3881 fi
3882
3883 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3884 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
3885
3886
3887 ###############################################
3888 # test for where we get crypt() from
3889 for ac_func in crypt
3890 do
3891 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3892 echo "configure:3893: checking for $ac_func" >&5
3893 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3894   echo $ac_n "(cached) $ac_c" 1>&6
3895 else
3896   cat > conftest.$ac_ext <<EOF
3897 #line 3898 "configure"
3898 #include "confdefs.h"
3899 /* System header to define __stub macros and hopefully few prototypes,
3900     which can conflict with char $ac_func(); below.  */
3901 #include <assert.h>
3902 /* Override any gcc2 internal prototype to avoid an error.  */
3903 /* We use char because int might match the return type of a gcc2
3904     builtin and then its argument prototype would still apply.  */
3905 char $ac_func();
3906
3907 int main() {
3908
3909 /* The GNU C library defines this for functions which it implements
3910     to always fail with ENOSYS.  Some functions are actually named
3911     something starting with __ and the normal name is an alias.  */
3912 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3913 choke me
3914 #else
3915 $ac_func();
3916 #endif
3917
3918 ; return 0; }
3919 EOF
3920 if { (eval echo configure:3921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3921   rm -rf conftest*
3922   eval "ac_cv_func_$ac_func=yes"
3923 else
3924   echo "configure: failed program was:" >&5
3925   cat conftest.$ac_ext >&5
3926   rm -rf conftest*
3927   eval "ac_cv_func_$ac_func=no"
3928 fi
3929 rm -f conftest*
3930 fi
3931
3932 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3933   echo "$ac_t""yes" 1>&6
3934     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3935   cat >> confdefs.h <<EOF
3936 #define $ac_tr_func 1
3937 EOF
3938  
3939 else
3940   echo "$ac_t""no" 1>&6
3941 fi
3942 done
3943
3944 if test x"$ac_cv_func_crypt" = x"no"; then
3945     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
3946 echo "configure:3947: checking for crypt in -lcrypt" >&5
3947 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3948 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3949   echo $ac_n "(cached) $ac_c" 1>&6
3950 else
3951   ac_save_LIBS="$LIBS"
3952 LIBS="-lcrypt  $LIBS"
3953 cat > conftest.$ac_ext <<EOF
3954 #line 3955 "configure"
3955 #include "confdefs.h"
3956 /* Override any gcc2 internal prototype to avoid an error.  */
3957 /* We use char because int might match the return type of a gcc2
3958     builtin and then its argument prototype would still apply.  */
3959 char crypt();
3960
3961 int main() {
3962 crypt()
3963 ; return 0; }
3964 EOF
3965 if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3966   rm -rf conftest*
3967   eval "ac_cv_lib_$ac_lib_var=yes"
3968 else
3969   echo "configure: failed program was:" >&5
3970   cat conftest.$ac_ext >&5
3971   rm -rf conftest*
3972   eval "ac_cv_lib_$ac_lib_var=no"
3973 fi
3974 rm -f conftest*
3975 LIBS="$ac_save_LIBS"
3976
3977 fi
3978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3979   echo "$ac_t""yes" 1>&6
3980   LIBS="$LIBS -lcrypt";
3981         cat >> confdefs.h <<\EOF
3982 #define HAVE_CRYPT 1
3983 EOF
3984
3985 else
3986   echo "$ac_t""no" 1>&6
3987 fi
3988
3989 fi
3990
3991
3992 ###############################################
3993 # Readline included by default unless explicitly asked not to
3994 test "${with_readline+set}" != "set" && with_readline=yes
3995
3996 # test for where we get readline() from
3997 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
3998 echo "configure:3999: checking whether to use readline" >&5
3999 # Check whether --with-readline or --without-readline was given.
4000 if test "${with_readline+set}" = set; then
4001   withval="$with_readline"
4002     case "$with_readline" in
4003   yes)
4004     echo "$ac_t""yes" 1>&6
4005
4006     for ac_hdr in readline.h history.h readline/readline.h
4007 do
4008 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4009 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4010 echo "configure:4011: checking for $ac_hdr" >&5
4011 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4012   echo $ac_n "(cached) $ac_c" 1>&6
4013 else
4014   cat > conftest.$ac_ext <<EOF
4015 #line 4016 "configure"
4016 #include "confdefs.h"
4017 #include <$ac_hdr>
4018 EOF
4019 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4020 { (eval echo configure:4021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4021 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4022 if test -z "$ac_err"; then
4023   rm -rf conftest*
4024   eval "ac_cv_header_$ac_safe=yes"
4025 else
4026   echo "$ac_err" >&5
4027   echo "configure: failed program was:" >&5
4028   cat conftest.$ac_ext >&5
4029   rm -rf conftest*
4030   eval "ac_cv_header_$ac_safe=no"
4031 fi
4032 rm -f conftest*
4033 fi
4034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4035   echo "$ac_t""yes" 1>&6
4036     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4037   cat >> confdefs.h <<EOF
4038 #define $ac_tr_hdr 1
4039 EOF
4040  
4041 else
4042   echo "$ac_t""no" 1>&6
4043 fi
4044 done
4045
4046     for ac_hdr in readline/history.h
4047 do
4048 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4049 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4050 echo "configure:4051: checking for $ac_hdr" >&5
4051 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4052   echo $ac_n "(cached) $ac_c" 1>&6
4053 else
4054   cat > conftest.$ac_ext <<EOF
4055 #line 4056 "configure"
4056 #include "confdefs.h"
4057 #include <$ac_hdr>
4058 EOF
4059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4060 { (eval echo configure:4061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4062 if test -z "$ac_err"; then
4063   rm -rf conftest*
4064   eval "ac_cv_header_$ac_safe=yes"
4065 else
4066   echo "$ac_err" >&5
4067   echo "configure: failed program was:" >&5
4068   cat conftest.$ac_ext >&5
4069   rm -rf conftest*
4070   eval "ac_cv_header_$ac_safe=no"
4071 fi
4072 rm -f conftest*
4073 fi
4074 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4075   echo "$ac_t""yes" 1>&6
4076     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4077   cat >> confdefs.h <<EOF
4078 #define $ac_tr_hdr 1
4079 EOF
4080  
4081 else
4082   echo "$ac_t""no" 1>&6
4083 fi
4084 done
4085
4086
4087     for ac_hdr in readline.h readline/readline.h
4088 do
4089 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4090 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4091 echo "configure:4092: checking for $ac_hdr" >&5
4092 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4093   echo $ac_n "(cached) $ac_c" 1>&6
4094 else
4095   cat > conftest.$ac_ext <<EOF
4096 #line 4097 "configure"
4097 #include "confdefs.h"
4098 #include <$ac_hdr>
4099 EOF
4100 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4101 { (eval echo configure:4102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4102 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4103 if test -z "$ac_err"; then
4104   rm -rf conftest*
4105   eval "ac_cv_header_$ac_safe=yes"
4106 else
4107   echo "$ac_err" >&5
4108   echo "configure: failed program was:" >&5
4109   cat conftest.$ac_ext >&5
4110   rm -rf conftest*
4111   eval "ac_cv_header_$ac_safe=no"
4112 fi
4113 rm -f conftest*
4114 fi
4115 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4116   echo "$ac_t""yes" 1>&6
4117     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4118   cat >> confdefs.h <<EOF
4119 #define $ac_tr_hdr 1
4120 EOF
4121  
4122       for termlib in ncurses curses termcap terminfo termlib; do
4123        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4124 echo "configure:4125: checking for tgetent in -l${termlib}" >&5
4125 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4126 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4127   echo $ac_n "(cached) $ac_c" 1>&6
4128 else
4129   ac_save_LIBS="$LIBS"
4130 LIBS="-l${termlib}  $LIBS"
4131 cat > conftest.$ac_ext <<EOF
4132 #line 4133 "configure"
4133 #include "confdefs.h"
4134 /* Override any gcc2 internal prototype to avoid an error.  */
4135 /* We use char because int might match the return type of a gcc2
4136     builtin and then its argument prototype would still apply.  */
4137 char tgetent();
4138
4139 int main() {
4140 tgetent()
4141 ; return 0; }
4142 EOF
4143 if { (eval echo configure:4144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4144   rm -rf conftest*
4145   eval "ac_cv_lib_$ac_lib_var=yes"
4146 else
4147   echo "configure: failed program was:" >&5
4148   cat conftest.$ac_ext >&5
4149   rm -rf conftest*
4150   eval "ac_cv_lib_$ac_lib_var=no"
4151 fi
4152 rm -f conftest*
4153 LIBS="$ac_save_LIBS"
4154
4155 fi
4156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4157   echo "$ac_t""yes" 1>&6
4158   TERMLIBS="-l${termlib}"; break
4159 else
4160   echo "$ac_t""no" 1>&6
4161 fi
4162
4163       done
4164       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4165 echo "configure:4166: checking for rl_callback_handler_install in -lreadline" >&5
4166 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4167 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4168   echo $ac_n "(cached) $ac_c" 1>&6
4169 else
4170   ac_save_LIBS="$LIBS"
4171 LIBS="-lreadline $TERMLIBS $LIBS"
4172 cat > conftest.$ac_ext <<EOF
4173 #line 4174 "configure"
4174 #include "confdefs.h"
4175 /* Override any gcc2 internal prototype to avoid an error.  */
4176 /* We use char because int might match the return type of a gcc2
4177     builtin and then its argument prototype would still apply.  */
4178 char rl_callback_handler_install();
4179
4180 int main() {
4181 rl_callback_handler_install()
4182 ; return 0; }
4183 EOF
4184 if { (eval echo configure:4185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4185   rm -rf conftest*
4186   eval "ac_cv_lib_$ac_lib_var=yes"
4187 else
4188   echo "configure: failed program was:" >&5
4189   cat conftest.$ac_ext >&5
4190   rm -rf conftest*
4191   eval "ac_cv_lib_$ac_lib_var=no"
4192 fi
4193 rm -f conftest*
4194 LIBS="$ac_save_LIBS"
4195
4196 fi
4197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4198   echo "$ac_t""yes" 1>&6
4199   TERMLIBS="-lreadline $TERMLIBS"
4200        cat >> confdefs.h <<\EOF
4201 #define HAVE_LIBREADLINE 1
4202 EOF
4203
4204        break
4205 else
4206   echo "$ac_t""no" 1>&6
4207 TERMLIBS=
4208 fi
4209
4210 else
4211   echo "$ac_t""no" 1>&6
4212 fi
4213 done
4214
4215     ;;
4216   no)
4217     echo "$ac_t""no" 1>&6
4218     ;;
4219   *)
4220     echo "$ac_t""yes" 1>&6
4221
4222     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4223     # alternate readline path
4224     _ldflags=${LDFLAGS}
4225     _cppflags=${CPPFLAGS}
4226
4227     # Add additional search path
4228     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4229     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4230
4231     for ac_hdr in readline.h history.h readline/readline.h
4232 do
4233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4235 echo "configure:4236: checking for $ac_hdr" >&5
4236 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4237   echo $ac_n "(cached) $ac_c" 1>&6
4238 else
4239   cat > conftest.$ac_ext <<EOF
4240 #line 4241 "configure"
4241 #include "confdefs.h"
4242 #include <$ac_hdr>
4243 EOF
4244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4245 { (eval echo configure:4246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4247 if test -z "$ac_err"; then
4248   rm -rf conftest*
4249   eval "ac_cv_header_$ac_safe=yes"
4250 else
4251   echo "$ac_err" >&5
4252   echo "configure: failed program was:" >&5
4253   cat conftest.$ac_ext >&5
4254   rm -rf conftest*
4255   eval "ac_cv_header_$ac_safe=no"
4256 fi
4257 rm -f conftest*
4258 fi
4259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4260   echo "$ac_t""yes" 1>&6
4261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4262   cat >> confdefs.h <<EOF
4263 #define $ac_tr_hdr 1
4264 EOF
4265  
4266 else
4267   echo "$ac_t""no" 1>&6
4268 fi
4269 done
4270
4271     for ac_hdr in readline/history.h
4272 do
4273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4275 echo "configure:4276: checking for $ac_hdr" >&5
4276 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4277   echo $ac_n "(cached) $ac_c" 1>&6
4278 else
4279   cat > conftest.$ac_ext <<EOF
4280 #line 4281 "configure"
4281 #include "confdefs.h"
4282 #include <$ac_hdr>
4283 EOF
4284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4285 { (eval echo configure:4286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4287 if test -z "$ac_err"; then
4288   rm -rf conftest*
4289   eval "ac_cv_header_$ac_safe=yes"
4290 else
4291   echo "$ac_err" >&5
4292   echo "configure: failed program was:" >&5
4293   cat conftest.$ac_ext >&5
4294   rm -rf conftest*
4295   eval "ac_cv_header_$ac_safe=no"
4296 fi
4297 rm -f conftest*
4298 fi
4299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4300   echo "$ac_t""yes" 1>&6
4301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4302   cat >> confdefs.h <<EOF
4303 #define $ac_tr_hdr 1
4304 EOF
4305  
4306 else
4307   echo "$ac_t""no" 1>&6
4308 fi
4309 done
4310
4311
4312     for ac_hdr in readline.h readline/readline.h
4313 do
4314 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4315 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4316 echo "configure:4317: checking for $ac_hdr" >&5
4317 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4318   echo $ac_n "(cached) $ac_c" 1>&6
4319 else
4320   cat > conftest.$ac_ext <<EOF
4321 #line 4322 "configure"
4322 #include "confdefs.h"
4323 #include <$ac_hdr>
4324 EOF
4325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4326 { (eval echo configure:4327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4328 if test -z "$ac_err"; then
4329   rm -rf conftest*
4330   eval "ac_cv_header_$ac_safe=yes"
4331 else
4332   echo "$ac_err" >&5
4333   echo "configure: failed program was:" >&5
4334   cat conftest.$ac_ext >&5
4335   rm -rf conftest*
4336   eval "ac_cv_header_$ac_safe=no"
4337 fi
4338 rm -f conftest*
4339 fi
4340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4341   echo "$ac_t""yes" 1>&6
4342     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4343   cat >> confdefs.h <<EOF
4344 #define $ac_tr_hdr 1
4345 EOF
4346  
4347       for termlib in ncurses curses termcap terminfo termlib; do
4348        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4349 echo "configure:4350: checking for tgetent in -l${termlib}" >&5
4350 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4351 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4352   echo $ac_n "(cached) $ac_c" 1>&6
4353 else
4354   ac_save_LIBS="$LIBS"
4355 LIBS="-l${termlib}  $LIBS"
4356 cat > conftest.$ac_ext <<EOF
4357 #line 4358 "configure"
4358 #include "confdefs.h"
4359 /* Override any gcc2 internal prototype to avoid an error.  */
4360 /* We use char because int might match the return type of a gcc2
4361     builtin and then its argument prototype would still apply.  */
4362 char tgetent();
4363
4364 int main() {
4365 tgetent()
4366 ; return 0; }
4367 EOF
4368 if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4369   rm -rf conftest*
4370   eval "ac_cv_lib_$ac_lib_var=yes"
4371 else
4372   echo "configure: failed program was:" >&5
4373   cat conftest.$ac_ext >&5
4374   rm -rf conftest*
4375   eval "ac_cv_lib_$ac_lib_var=no"
4376 fi
4377 rm -f conftest*
4378 LIBS="$ac_save_LIBS"
4379
4380 fi
4381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4382   echo "$ac_t""yes" 1>&6
4383   TERMLIBS="-l${termlib}"; break
4384 else
4385   echo "$ac_t""no" 1>&6
4386 fi
4387
4388       done
4389       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4390 echo "configure:4391: checking for rl_callback_handler_install in -lreadline" >&5
4391 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4392 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4393   echo $ac_n "(cached) $ac_c" 1>&6
4394 else
4395   ac_save_LIBS="$LIBS"
4396 LIBS="-lreadline $TERMLIBS $LIBS"
4397 cat > conftest.$ac_ext <<EOF
4398 #line 4399 "configure"
4399 #include "confdefs.h"
4400 /* Override any gcc2 internal prototype to avoid an error.  */
4401 /* We use char because int might match the return type of a gcc2
4402     builtin and then its argument prototype would still apply.  */
4403 char rl_callback_handler_install();
4404
4405 int main() {
4406 rl_callback_handler_install()
4407 ; return 0; }
4408 EOF
4409 if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4410   rm -rf conftest*
4411   eval "ac_cv_lib_$ac_lib_var=yes"
4412 else
4413   echo "configure: failed program was:" >&5
4414   cat conftest.$ac_ext >&5
4415   rm -rf conftest*
4416   eval "ac_cv_lib_$ac_lib_var=no"
4417 fi
4418 rm -f conftest*
4419 LIBS="$ac_save_LIBS"
4420
4421 fi
4422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4423   echo "$ac_t""yes" 1>&6
4424   TERMLDFLAGS="-L$with_readline/lib"
4425        TERMCPPFLAGS="-I$with_readline/include"
4426        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4427        TERMLIBS="-lreadline $TERMLIBS"
4428        cat >> confdefs.h <<\EOF
4429 #define HAVE_LIBREADLINE 1
4430 EOF
4431
4432        break
4433 else
4434   echo "$ac_t""no" 1>&6
4435 TERMLIBS= CPPFLAGS=$_cppflags
4436 fi
4437
4438 else
4439   echo "$ac_t""no" 1>&6
4440 fi
4441 done
4442
4443
4444     LDFLAGS=$_ldflags
4445     ;;
4446   esac
4447 else
4448   echo "$ac_t""no" 1>&6
4449
4450 fi
4451
4452
4453
4454
4455 # The following test taken from the cvs sources
4456 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4457 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4458 # libsocket.so which has a bad implementation of gethostbyname (it
4459 # only looks in /etc/hosts), so we only look for -lsocket if we need
4460 # it.
4461 for ac_func in connect
4462 do
4463 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4464 echo "configure:4465: checking for $ac_func" >&5
4465 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4466   echo $ac_n "(cached) $ac_c" 1>&6
4467 else
4468   cat > conftest.$ac_ext <<EOF
4469 #line 4470 "configure"
4470 #include "confdefs.h"
4471 /* System header to define __stub macros and hopefully few prototypes,
4472     which can conflict with char $ac_func(); below.  */
4473 #include <assert.h>
4474 /* Override any gcc2 internal prototype to avoid an error.  */
4475 /* We use char because int might match the return type of a gcc2
4476     builtin and then its argument prototype would still apply.  */
4477 char $ac_func();
4478
4479 int main() {
4480
4481 /* The GNU C library defines this for functions which it implements
4482     to always fail with ENOSYS.  Some functions are actually named
4483     something starting with __ and the normal name is an alias.  */
4484 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4485 choke me
4486 #else
4487 $ac_func();
4488 #endif
4489
4490 ; return 0; }
4491 EOF
4492 if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4493   rm -rf conftest*
4494   eval "ac_cv_func_$ac_func=yes"
4495 else
4496   echo "configure: failed program was:" >&5
4497   cat conftest.$ac_ext >&5
4498   rm -rf conftest*
4499   eval "ac_cv_func_$ac_func=no"
4500 fi
4501 rm -f conftest*
4502 fi
4503
4504 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4505   echo "$ac_t""yes" 1>&6
4506     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4507   cat >> confdefs.h <<EOF
4508 #define $ac_tr_func 1
4509 EOF
4510  
4511 else
4512   echo "$ac_t""no" 1>&6
4513 fi
4514 done
4515
4516 if test x"$ac_cv_func_connect" = x"no"; then
4517     case "$LIBS" in
4518     *-lnsl*) ;;
4519     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4520 echo "configure:4521: checking for printf in -lnsl_s" >&5
4521 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4522 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4523   echo $ac_n "(cached) $ac_c" 1>&6
4524 else
4525   ac_save_LIBS="$LIBS"
4526 LIBS="-lnsl_s  $LIBS"
4527 cat > conftest.$ac_ext <<EOF
4528 #line 4529 "configure"
4529 #include "confdefs.h"
4530 /* Override any gcc2 internal prototype to avoid an error.  */
4531 /* We use char because int might match the return type of a gcc2
4532     builtin and then its argument prototype would still apply.  */
4533 char printf();
4534
4535 int main() {
4536 printf()
4537 ; return 0; }
4538 EOF
4539 if { (eval echo configure:4540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4540   rm -rf conftest*
4541   eval "ac_cv_lib_$ac_lib_var=yes"
4542 else
4543   echo "configure: failed program was:" >&5
4544   cat conftest.$ac_ext >&5
4545   rm -rf conftest*
4546   eval "ac_cv_lib_$ac_lib_var=no"
4547 fi
4548 rm -f conftest*
4549 LIBS="$ac_save_LIBS"
4550
4551 fi
4552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4553   echo "$ac_t""yes" 1>&6
4554     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4555     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4556   cat >> confdefs.h <<EOF
4557 #define $ac_tr_lib 1
4558 EOF
4559
4560   LIBS="-lnsl_s $LIBS"
4561
4562 else
4563   echo "$ac_t""no" 1>&6
4564 fi
4565  ;;
4566     esac
4567     case "$LIBS" in
4568     *-lnsl*) ;;
4569     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4570 echo "configure:4571: checking for printf in -lnsl" >&5
4571 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4572 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4573   echo $ac_n "(cached) $ac_c" 1>&6
4574 else
4575   ac_save_LIBS="$LIBS"
4576 LIBS="-lnsl  $LIBS"
4577 cat > conftest.$ac_ext <<EOF
4578 #line 4579 "configure"
4579 #include "confdefs.h"
4580 /* Override any gcc2 internal prototype to avoid an error.  */
4581 /* We use char because int might match the return type of a gcc2
4582     builtin and then its argument prototype would still apply.  */
4583 char printf();
4584
4585 int main() {
4586 printf()
4587 ; return 0; }
4588 EOF
4589 if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4590   rm -rf conftest*
4591   eval "ac_cv_lib_$ac_lib_var=yes"
4592 else
4593   echo "configure: failed program was:" >&5
4594   cat conftest.$ac_ext >&5
4595   rm -rf conftest*
4596   eval "ac_cv_lib_$ac_lib_var=no"
4597 fi
4598 rm -f conftest*
4599 LIBS="$ac_save_LIBS"
4600
4601 fi
4602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4603   echo "$ac_t""yes" 1>&6
4604     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4605     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4606   cat >> confdefs.h <<EOF
4607 #define $ac_tr_lib 1
4608 EOF
4609
4610   LIBS="-lnsl $LIBS"
4611
4612 else
4613   echo "$ac_t""no" 1>&6
4614 fi
4615  ;;
4616     esac
4617     case "$LIBS" in
4618     *-lsocket*) ;;
4619     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4620 echo "configure:4621: checking for connect in -lsocket" >&5
4621 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4622 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4623   echo $ac_n "(cached) $ac_c" 1>&6
4624 else
4625   ac_save_LIBS="$LIBS"
4626 LIBS="-lsocket  $LIBS"
4627 cat > conftest.$ac_ext <<EOF
4628 #line 4629 "configure"
4629 #include "confdefs.h"
4630 /* Override any gcc2 internal prototype to avoid an error.  */
4631 /* We use char because int might match the return type of a gcc2
4632     builtin and then its argument prototype would still apply.  */
4633 char connect();
4634
4635 int main() {
4636 connect()
4637 ; return 0; }
4638 EOF
4639 if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4640   rm -rf conftest*
4641   eval "ac_cv_lib_$ac_lib_var=yes"
4642 else
4643   echo "configure: failed program was:" >&5
4644   cat conftest.$ac_ext >&5
4645   rm -rf conftest*
4646   eval "ac_cv_lib_$ac_lib_var=no"
4647 fi
4648 rm -f conftest*
4649 LIBS="$ac_save_LIBS"
4650
4651 fi
4652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4653   echo "$ac_t""yes" 1>&6
4654     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4655     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4656   cat >> confdefs.h <<EOF
4657 #define $ac_tr_lib 1
4658 EOF
4659
4660   LIBS="-lsocket $LIBS"
4661
4662 else
4663   echo "$ac_t""no" 1>&6
4664 fi
4665  ;;
4666     esac
4667     case "$LIBS" in
4668     *-linet*) ;;
4669     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4670 echo "configure:4671: checking for connect in -linet" >&5
4671 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4672 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4673   echo $ac_n "(cached) $ac_c" 1>&6
4674 else
4675   ac_save_LIBS="$LIBS"
4676 LIBS="-linet  $LIBS"
4677 cat > conftest.$ac_ext <<EOF
4678 #line 4679 "configure"
4679 #include "confdefs.h"
4680 /* Override any gcc2 internal prototype to avoid an error.  */
4681 /* We use char because int might match the return type of a gcc2
4682     builtin and then its argument prototype would still apply.  */
4683 char connect();
4684
4685 int main() {
4686 connect()
4687 ; return 0; }
4688 EOF
4689 if { (eval echo configure:4690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4690   rm -rf conftest*
4691   eval "ac_cv_lib_$ac_lib_var=yes"
4692 else
4693   echo "configure: failed program was:" >&5
4694   cat conftest.$ac_ext >&5
4695   rm -rf conftest*
4696   eval "ac_cv_lib_$ac_lib_var=no"
4697 fi
4698 rm -f conftest*
4699 LIBS="$ac_save_LIBS"
4700
4701 fi
4702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4703   echo "$ac_t""yes" 1>&6
4704     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4705     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4706   cat >> confdefs.h <<EOF
4707 #define $ac_tr_lib 1
4708 EOF
4709
4710   LIBS="-linet $LIBS"
4711
4712 else
4713   echo "$ac_t""no" 1>&6
4714 fi
4715  ;;
4716     esac
4717             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4718        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4719         # ac_cv_func_connect=yes
4720         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4721         cat >> confdefs.h <<\EOF
4722 #define HAVE_CONNECT 1
4723 EOF
4724
4725     fi
4726 fi
4727
4728 ###############################################
4729 # test for where we get get_yp_default_domain() from
4730 for ac_func in yp_get_default_domain
4731 do
4732 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4733 echo "configure:4734: checking for $ac_func" >&5
4734 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4735   echo $ac_n "(cached) $ac_c" 1>&6
4736 else
4737   cat > conftest.$ac_ext <<EOF
4738 #line 4739 "configure"
4739 #include "confdefs.h"
4740 /* System header to define __stub macros and hopefully few prototypes,
4741     which can conflict with char $ac_func(); below.  */
4742 #include <assert.h>
4743 /* Override any gcc2 internal prototype to avoid an error.  */
4744 /* We use char because int might match the return type of a gcc2
4745     builtin and then its argument prototype would still apply.  */
4746 char $ac_func();
4747
4748 int main() {
4749
4750 /* The GNU C library defines this for functions which it implements
4751     to always fail with ENOSYS.  Some functions are actually named
4752     something starting with __ and the normal name is an alias.  */
4753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4754 choke me
4755 #else
4756 $ac_func();
4757 #endif
4758
4759 ; return 0; }
4760 EOF
4761 if { (eval echo configure:4762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4762   rm -rf conftest*
4763   eval "ac_cv_func_$ac_func=yes"
4764 else
4765   echo "configure: failed program was:" >&5
4766   cat conftest.$ac_ext >&5
4767   rm -rf conftest*
4768   eval "ac_cv_func_$ac_func=no"
4769 fi
4770 rm -f conftest*
4771 fi
4772
4773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4774   echo "$ac_t""yes" 1>&6
4775     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4776   cat >> confdefs.h <<EOF
4777 #define $ac_tr_func 1
4778 EOF
4779  
4780 else
4781   echo "$ac_t""no" 1>&6
4782 fi
4783 done
4784
4785 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
4786         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
4787 echo "configure:4788: checking for yp_get_default_domain in -lnsl" >&5
4788 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
4789 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4790   echo $ac_n "(cached) $ac_c" 1>&6
4791 else
4792   ac_save_LIBS="$LIBS"
4793 LIBS="-lnsl  $LIBS"
4794 cat > conftest.$ac_ext <<EOF
4795 #line 4796 "configure"
4796 #include "confdefs.h"
4797 /* Override any gcc2 internal prototype to avoid an error.  */
4798 /* We use char because int might match the return type of a gcc2
4799     builtin and then its argument prototype would still apply.  */
4800 char yp_get_default_domain();
4801
4802 int main() {
4803 yp_get_default_domain()
4804 ; return 0; }
4805 EOF
4806 if { (eval echo configure:4807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4807   rm -rf conftest*
4808   eval "ac_cv_lib_$ac_lib_var=yes"
4809 else
4810   echo "configure: failed program was:" >&5
4811   cat conftest.$ac_ext >&5
4812   rm -rf conftest*
4813   eval "ac_cv_lib_$ac_lib_var=no"
4814 fi
4815 rm -f conftest*
4816 LIBS="$ac_save_LIBS"
4817
4818 fi
4819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4820   echo "$ac_t""yes" 1>&6
4821   LIBS="$LIBS -lnsl";
4822         cat >> confdefs.h <<\EOF
4823 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
4824 EOF
4825
4826 else
4827   echo "$ac_t""no" 1>&6
4828 fi
4829  
4830 fi
4831
4832 # Check if we have execl, if not we need to compile smbrun.
4833 for ac_func in execl
4834 do
4835 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4836 echo "configure:4837: checking for $ac_func" >&5
4837 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4838   echo $ac_n "(cached) $ac_c" 1>&6
4839 else
4840   cat > conftest.$ac_ext <<EOF
4841 #line 4842 "configure"
4842 #include "confdefs.h"
4843 /* System header to define __stub macros and hopefully few prototypes,
4844     which can conflict with char $ac_func(); below.  */
4845 #include <assert.h>
4846 /* Override any gcc2 internal prototype to avoid an error.  */
4847 /* We use char because int might match the return type of a gcc2
4848     builtin and then its argument prototype would still apply.  */
4849 char $ac_func();
4850
4851 int main() {
4852
4853 /* The GNU C library defines this for functions which it implements
4854     to always fail with ENOSYS.  Some functions are actually named
4855     something starting with __ and the normal name is an alias.  */
4856 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4857 choke me
4858 #else
4859 $ac_func();
4860 #endif
4861
4862 ; return 0; }
4863 EOF
4864 if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4865   rm -rf conftest*
4866   eval "ac_cv_func_$ac_func=yes"
4867 else
4868   echo "configure: failed program was:" >&5
4869   cat conftest.$ac_ext >&5
4870   rm -rf conftest*
4871   eval "ac_cv_func_$ac_func=no"
4872 fi
4873 rm -f conftest*
4874 fi
4875
4876 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4877   echo "$ac_t""yes" 1>&6
4878     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4879   cat >> confdefs.h <<EOF
4880 #define $ac_tr_func 1
4881 EOF
4882  
4883 else
4884   echo "$ac_t""no" 1>&6
4885 fi
4886 done
4887
4888 if test x"$ac_cv_func_execl" = x"no"; then
4889     RUNPROG="bin/smbrun"
4890 else
4891     RUNPROG=""
4892 fi
4893
4894 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
4895 do
4896 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4897 echo "configure:4898: checking for $ac_func" >&5
4898 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4899   echo $ac_n "(cached) $ac_c" 1>&6
4900 else
4901   cat > conftest.$ac_ext <<EOF
4902 #line 4903 "configure"
4903 #include "confdefs.h"
4904 /* System header to define __stub macros and hopefully few prototypes,
4905     which can conflict with char $ac_func(); below.  */
4906 #include <assert.h>
4907 /* Override any gcc2 internal prototype to avoid an error.  */
4908 /* We use char because int might match the return type of a gcc2
4909     builtin and then its argument prototype would still apply.  */
4910 char $ac_func();
4911
4912 int main() {
4913
4914 /* The GNU C library defines this for functions which it implements
4915     to always fail with ENOSYS.  Some functions are actually named
4916     something starting with __ and the normal name is an alias.  */
4917 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4918 choke me
4919 #else
4920 $ac_func();
4921 #endif
4922
4923 ; return 0; }
4924 EOF
4925 if { (eval echo configure:4926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4926   rm -rf conftest*
4927   eval "ac_cv_func_$ac_func=yes"
4928 else
4929   echo "configure: failed program was:" >&5
4930   cat conftest.$ac_ext >&5
4931   rm -rf conftest*
4932   eval "ac_cv_func_$ac_func=no"
4933 fi
4934 rm -f conftest*
4935 fi
4936
4937 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4938   echo "$ac_t""yes" 1>&6
4939     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4940   cat >> confdefs.h <<EOF
4941 #define $ac_tr_func 1
4942 EOF
4943  
4944 else
4945   echo "$ac_t""no" 1>&6
4946 fi
4947 done
4948
4949 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
4950 do
4951 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4952 echo "configure:4953: checking for $ac_func" >&5
4953 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4954   echo $ac_n "(cached) $ac_c" 1>&6
4955 else
4956   cat > conftest.$ac_ext <<EOF
4957 #line 4958 "configure"
4958 #include "confdefs.h"
4959 /* System header to define __stub macros and hopefully few prototypes,
4960     which can conflict with char $ac_func(); below.  */
4961 #include <assert.h>
4962 /* Override any gcc2 internal prototype to avoid an error.  */
4963 /* We use char because int might match the return type of a gcc2
4964     builtin and then its argument prototype would still apply.  */
4965 char $ac_func();
4966
4967 int main() {
4968
4969 /* The GNU C library defines this for functions which it implements
4970     to always fail with ENOSYS.  Some functions are actually named
4971     something starting with __ and the normal name is an alias.  */
4972 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4973 choke me
4974 #else
4975 $ac_func();
4976 #endif
4977
4978 ; return 0; }
4979 EOF
4980 if { (eval echo configure:4981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4981   rm -rf conftest*
4982   eval "ac_cv_func_$ac_func=yes"
4983 else
4984   echo "configure: failed program was:" >&5
4985   cat conftest.$ac_ext >&5
4986   rm -rf conftest*
4987   eval "ac_cv_func_$ac_func=no"
4988 fi
4989 rm -f conftest*
4990 fi
4991
4992 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4993   echo "$ac_t""yes" 1>&6
4994     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4995   cat >> confdefs.h <<EOF
4996 #define $ac_tr_func 1
4997 EOF
4998  
4999 else
5000   echo "$ac_t""no" 1>&6
5001 fi
5002 done
5003
5004 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5005 do
5006 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5007 echo "configure:5008: checking for $ac_func" >&5
5008 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5009   echo $ac_n "(cached) $ac_c" 1>&6
5010 else
5011   cat > conftest.$ac_ext <<EOF
5012 #line 5013 "configure"
5013 #include "confdefs.h"
5014 /* System header to define __stub macros and hopefully few prototypes,
5015     which can conflict with char $ac_func(); below.  */
5016 #include <assert.h>
5017 /* Override any gcc2 internal prototype to avoid an error.  */
5018 /* We use char because int might match the return type of a gcc2
5019     builtin and then its argument prototype would still apply.  */
5020 char $ac_func();
5021
5022 int main() {
5023
5024 /* The GNU C library defines this for functions which it implements
5025     to always fail with ENOSYS.  Some functions are actually named
5026     something starting with __ and the normal name is an alias.  */
5027 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5028 choke me
5029 #else
5030 $ac_func();
5031 #endif
5032
5033 ; return 0; }
5034 EOF
5035 if { (eval echo configure:5036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5036   rm -rf conftest*
5037   eval "ac_cv_func_$ac_func=yes"
5038 else
5039   echo "configure: failed program was:" >&5
5040   cat conftest.$ac_ext >&5
5041   rm -rf conftest*
5042   eval "ac_cv_func_$ac_func=no"
5043 fi
5044 rm -f conftest*
5045 fi
5046
5047 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5048   echo "$ac_t""yes" 1>&6
5049     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5050   cat >> confdefs.h <<EOF
5051 #define $ac_tr_func 1
5052 EOF
5053  
5054 else
5055   echo "$ac_t""no" 1>&6
5056 fi
5057 done
5058
5059 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
5060 do
5061 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5062 echo "configure:5063: checking for $ac_func" >&5
5063 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5064   echo $ac_n "(cached) $ac_c" 1>&6
5065 else
5066   cat > conftest.$ac_ext <<EOF
5067 #line 5068 "configure"
5068 #include "confdefs.h"
5069 /* System header to define __stub macros and hopefully few prototypes,
5070     which can conflict with char $ac_func(); below.  */
5071 #include <assert.h>
5072 /* Override any gcc2 internal prototype to avoid an error.  */
5073 /* We use char because int might match the return type of a gcc2
5074     builtin and then its argument prototype would still apply.  */
5075 char $ac_func();
5076
5077 int main() {
5078
5079 /* The GNU C library defines this for functions which it implements
5080     to always fail with ENOSYS.  Some functions are actually named
5081     something starting with __ and the normal name is an alias.  */
5082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5083 choke me
5084 #else
5085 $ac_func();
5086 #endif
5087
5088 ; return 0; }
5089 EOF
5090 if { (eval echo configure:5091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5091   rm -rf conftest*
5092   eval "ac_cv_func_$ac_func=yes"
5093 else
5094   echo "configure: failed program was:" >&5
5095   cat conftest.$ac_ext >&5
5096   rm -rf conftest*
5097   eval "ac_cv_func_$ac_func=no"
5098 fi
5099 rm -f conftest*
5100 fi
5101
5102 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5103   echo "$ac_t""yes" 1>&6
5104     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5105   cat >> confdefs.h <<EOF
5106 #define $ac_tr_func 1
5107 EOF
5108  
5109 else
5110   echo "$ac_t""no" 1>&6
5111 fi
5112 done
5113
5114 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5115 do
5116 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5117 echo "configure:5118: checking for $ac_func" >&5
5118 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5119   echo $ac_n "(cached) $ac_c" 1>&6
5120 else
5121   cat > conftest.$ac_ext <<EOF
5122 #line 5123 "configure"
5123 #include "confdefs.h"
5124 /* System header to define __stub macros and hopefully few prototypes,
5125     which can conflict with char $ac_func(); below.  */
5126 #include <assert.h>
5127 /* Override any gcc2 internal prototype to avoid an error.  */
5128 /* We use char because int might match the return type of a gcc2
5129     builtin and then its argument prototype would still apply.  */
5130 char $ac_func();
5131
5132 int main() {
5133
5134 /* The GNU C library defines this for functions which it implements
5135     to always fail with ENOSYS.  Some functions are actually named
5136     something starting with __ and the normal name is an alias.  */
5137 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5138 choke me
5139 #else
5140 $ac_func();
5141 #endif
5142
5143 ; return 0; }
5144 EOF
5145 if { (eval echo configure:5146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5146   rm -rf conftest*
5147   eval "ac_cv_func_$ac_func=yes"
5148 else
5149   echo "configure: failed program was:" >&5
5150   cat conftest.$ac_ext >&5
5151   rm -rf conftest*
5152   eval "ac_cv_func_$ac_func=no"
5153 fi
5154 rm -f conftest*
5155 fi
5156
5157 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5158   echo "$ac_t""yes" 1>&6
5159     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5160   cat >> confdefs.h <<EOF
5161 #define $ac_tr_func 1
5162 EOF
5163  
5164 else
5165   echo "$ac_t""no" 1>&6
5166 fi
5167 done
5168
5169 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5170 do
5171 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5172 echo "configure:5173: checking for $ac_func" >&5
5173 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5174   echo $ac_n "(cached) $ac_c" 1>&6
5175 else
5176   cat > conftest.$ac_ext <<EOF
5177 #line 5178 "configure"
5178 #include "confdefs.h"
5179 /* System header to define __stub macros and hopefully few prototypes,
5180     which can conflict with char $ac_func(); below.  */
5181 #include <assert.h>
5182 /* Override any gcc2 internal prototype to avoid an error.  */
5183 /* We use char because int might match the return type of a gcc2
5184     builtin and then its argument prototype would still apply.  */
5185 char $ac_func();
5186
5187 int main() {
5188
5189 /* The GNU C library defines this for functions which it implements
5190     to always fail with ENOSYS.  Some functions are actually named
5191     something starting with __ and the normal name is an alias.  */
5192 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5193 choke me
5194 #else
5195 $ac_func();
5196 #endif
5197
5198 ; return 0; }
5199 EOF
5200 if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5201   rm -rf conftest*
5202   eval "ac_cv_func_$ac_func=yes"
5203 else
5204   echo "configure: failed program was:" >&5
5205   cat conftest.$ac_ext >&5
5206   rm -rf conftest*
5207   eval "ac_cv_func_$ac_func=no"
5208 fi
5209 rm -f conftest*
5210 fi
5211
5212 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5213   echo "$ac_t""yes" 1>&6
5214     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5215   cat >> confdefs.h <<EOF
5216 #define $ac_tr_func 1
5217 EOF
5218  
5219 else
5220   echo "$ac_t""no" 1>&6
5221 fi
5222 done
5223
5224 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5225 do
5226 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5227 echo "configure:5228: checking for $ac_func" >&5
5228 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5229   echo $ac_n "(cached) $ac_c" 1>&6
5230 else
5231   cat > conftest.$ac_ext <<EOF
5232 #line 5233 "configure"
5233 #include "confdefs.h"
5234 /* System header to define __stub macros and hopefully few prototypes,
5235     which can conflict with char $ac_func(); below.  */
5236 #include <assert.h>
5237 /* Override any gcc2 internal prototype to avoid an error.  */
5238 /* We use char because int might match the return type of a gcc2
5239     builtin and then its argument prototype would still apply.  */
5240 char $ac_func();
5241
5242 int main() {
5243
5244 /* The GNU C library defines this for functions which it implements
5245     to always fail with ENOSYS.  Some functions are actually named
5246     something starting with __ and the normal name is an alias.  */
5247 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5248 choke me
5249 #else
5250 $ac_func();
5251 #endif
5252
5253 ; return 0; }
5254 EOF
5255 if { (eval echo configure:5256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5256   rm -rf conftest*
5257   eval "ac_cv_func_$ac_func=yes"
5258 else
5259   echo "configure: failed program was:" >&5
5260   cat conftest.$ac_ext >&5
5261   rm -rf conftest*
5262   eval "ac_cv_func_$ac_func=no"
5263 fi
5264 rm -f conftest*
5265 fi
5266
5267 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5268   echo "$ac_t""yes" 1>&6
5269     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5270   cat >> confdefs.h <<EOF
5271 #define $ac_tr_func 1
5272 EOF
5273  
5274 else
5275   echo "$ac_t""no" 1>&6
5276 fi
5277 done
5278
5279 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5280 do
5281 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5282 echo "configure:5283: checking for $ac_func" >&5
5283 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5284   echo $ac_n "(cached) $ac_c" 1>&6
5285 else
5286   cat > conftest.$ac_ext <<EOF
5287 #line 5288 "configure"
5288 #include "confdefs.h"
5289 /* System header to define __stub macros and hopefully few prototypes,
5290     which can conflict with char $ac_func(); below.  */
5291 #include <assert.h>
5292 /* Override any gcc2 internal prototype to avoid an error.  */
5293 /* We use char because int might match the return type of a gcc2
5294     builtin and then its argument prototype would still apply.  */
5295 char $ac_func();
5296
5297 int main() {
5298
5299 /* The GNU C library defines this for functions which it implements
5300     to always fail with ENOSYS.  Some functions are actually named
5301     something starting with __ and the normal name is an alias.  */
5302 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5303 choke me
5304 #else
5305 $ac_func();
5306 #endif
5307
5308 ; return 0; }
5309 EOF
5310 if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5311   rm -rf conftest*
5312   eval "ac_cv_func_$ac_func=yes"
5313 else
5314   echo "configure: failed program was:" >&5
5315   cat conftest.$ac_ext >&5
5316   rm -rf conftest*
5317   eval "ac_cv_func_$ac_func=no"
5318 fi
5319 rm -f conftest*
5320 fi
5321
5322 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5323   echo "$ac_t""yes" 1>&6
5324     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5325   cat >> confdefs.h <<EOF
5326 #define $ac_tr_func 1
5327 EOF
5328  
5329 else
5330   echo "$ac_t""no" 1>&6
5331 fi
5332 done
5333
5334 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5335 do
5336 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5337 echo "configure:5338: checking for $ac_func" >&5
5338 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5339   echo $ac_n "(cached) $ac_c" 1>&6
5340 else
5341   cat > conftest.$ac_ext <<EOF
5342 #line 5343 "configure"
5343 #include "confdefs.h"
5344 /* System header to define __stub macros and hopefully few prototypes,
5345     which can conflict with char $ac_func(); below.  */
5346 #include <assert.h>
5347 /* Override any gcc2 internal prototype to avoid an error.  */
5348 /* We use char because int might match the return type of a gcc2
5349     builtin and then its argument prototype would still apply.  */
5350 char $ac_func();
5351
5352 int main() {
5353
5354 /* The GNU C library defines this for functions which it implements
5355     to always fail with ENOSYS.  Some functions are actually named
5356     something starting with __ and the normal name is an alias.  */
5357 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5358 choke me
5359 #else
5360 $ac_func();
5361 #endif
5362
5363 ; return 0; }
5364 EOF
5365 if { (eval echo configure:5366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5366   rm -rf conftest*
5367   eval "ac_cv_func_$ac_func=yes"
5368 else
5369   echo "configure: failed program was:" >&5
5370   cat conftest.$ac_ext >&5
5371   rm -rf conftest*
5372   eval "ac_cv_func_$ac_func=no"
5373 fi
5374 rm -f conftest*
5375 fi
5376
5377 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5378   echo "$ac_t""yes" 1>&6
5379     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5380   cat >> confdefs.h <<EOF
5381 #define $ac_tr_func 1
5382 EOF
5383  
5384 else
5385   echo "$ac_t""no" 1>&6
5386 fi
5387 done
5388
5389 # setbuffer is needed for smbtorture
5390 for ac_func in setbuffer
5391 do
5392 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5393 echo "configure:5394: checking for $ac_func" >&5
5394 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5395   echo $ac_n "(cached) $ac_c" 1>&6
5396 else
5397   cat > conftest.$ac_ext <<EOF
5398 #line 5399 "configure"
5399 #include "confdefs.h"
5400 /* System header to define __stub macros and hopefully few prototypes,
5401     which can conflict with char $ac_func(); below.  */
5402 #include <assert.h>
5403 /* Override any gcc2 internal prototype to avoid an error.  */
5404 /* We use char because int might match the return type of a gcc2
5405     builtin and then its argument prototype would still apply.  */
5406 char $ac_func();
5407
5408 int main() {
5409
5410 /* The GNU C library defines this for functions which it implements
5411     to always fail with ENOSYS.  Some functions are actually named
5412     something starting with __ and the normal name is an alias.  */
5413 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5414 choke me
5415 #else
5416 $ac_func();
5417 #endif
5418
5419 ; return 0; }
5420 EOF
5421 if { (eval echo configure:5422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5422   rm -rf conftest*
5423   eval "ac_cv_func_$ac_func=yes"
5424 else
5425   echo "configure: failed program was:" >&5
5426   cat conftest.$ac_ext >&5
5427   rm -rf conftest*
5428   eval "ac_cv_func_$ac_func=no"
5429 fi
5430 rm -f conftest*
5431 fi
5432
5433 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5434   echo "$ac_t""yes" 1>&6
5435     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5436   cat >> confdefs.h <<EOF
5437 #define $ac_tr_func 1
5438 EOF
5439  
5440 else
5441   echo "$ac_t""no" 1>&6
5442 fi
5443 done
5444
5445
5446 # syscall() is needed for smbwrapper.
5447 for ac_func in syscall
5448 do
5449 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5450 echo "configure:5451: checking for $ac_func" >&5
5451 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5452   echo $ac_n "(cached) $ac_c" 1>&6
5453 else
5454   cat > conftest.$ac_ext <<EOF
5455 #line 5456 "configure"
5456 #include "confdefs.h"
5457 /* System header to define __stub macros and hopefully few prototypes,
5458     which can conflict with char $ac_func(); below.  */
5459 #include <assert.h>
5460 /* Override any gcc2 internal prototype to avoid an error.  */
5461 /* We use char because int might match the return type of a gcc2
5462     builtin and then its argument prototype would still apply.  */
5463 char $ac_func();
5464
5465 int main() {
5466
5467 /* The GNU C library defines this for functions which it implements
5468     to always fail with ENOSYS.  Some functions are actually named
5469     something starting with __ and the normal name is an alias.  */
5470 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5471 choke me
5472 #else
5473 $ac_func();
5474 #endif
5475
5476 ; return 0; }
5477 EOF
5478 if { (eval echo configure:5479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5479   rm -rf conftest*
5480   eval "ac_cv_func_$ac_func=yes"
5481 else
5482   echo "configure: failed program was:" >&5
5483   cat conftest.$ac_ext >&5
5484   rm -rf conftest*
5485   eval "ac_cv_func_$ac_func=no"
5486 fi
5487 rm -f conftest*
5488 fi
5489
5490 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5491   echo "$ac_t""yes" 1>&6
5492     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5493   cat >> confdefs.h <<EOF
5494 #define $ac_tr_func 1
5495 EOF
5496  
5497 else
5498   echo "$ac_t""no" 1>&6
5499 fi
5500 done
5501
5502
5503 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5504 do
5505 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5506 echo "configure:5507: checking for $ac_func" >&5
5507 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5508   echo $ac_n "(cached) $ac_c" 1>&6
5509 else
5510   cat > conftest.$ac_ext <<EOF
5511 #line 5512 "configure"
5512 #include "confdefs.h"
5513 /* System header to define __stub macros and hopefully few prototypes,
5514     which can conflict with char $ac_func(); below.  */
5515 #include <assert.h>
5516 /* Override any gcc2 internal prototype to avoid an error.  */
5517 /* We use char because int might match the return type of a gcc2
5518     builtin and then its argument prototype would still apply.  */
5519 char $ac_func();
5520
5521 int main() {
5522
5523 /* The GNU C library defines this for functions which it implements
5524     to always fail with ENOSYS.  Some functions are actually named
5525     something starting with __ and the normal name is an alias.  */
5526 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5527 choke me
5528 #else
5529 $ac_func();
5530 #endif
5531
5532 ; return 0; }
5533 EOF
5534 if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5535   rm -rf conftest*
5536   eval "ac_cv_func_$ac_func=yes"
5537 else
5538   echo "configure: failed program was:" >&5
5539   cat conftest.$ac_ext >&5
5540   rm -rf conftest*
5541   eval "ac_cv_func_$ac_func=no"
5542 fi
5543 rm -f conftest*
5544 fi
5545
5546 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5547   echo "$ac_t""yes" 1>&6
5548     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5549   cat >> confdefs.h <<EOF
5550 #define $ac_tr_func 1
5551 EOF
5552  
5553 else
5554   echo "$ac_t""no" 1>&6
5555 fi
5556 done
5557
5558 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5559 do
5560 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5561 echo "configure:5562: checking for $ac_func" >&5
5562 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5563   echo $ac_n "(cached) $ac_c" 1>&6
5564 else
5565   cat > conftest.$ac_ext <<EOF
5566 #line 5567 "configure"
5567 #include "confdefs.h"
5568 /* System header to define __stub macros and hopefully few prototypes,
5569     which can conflict with char $ac_func(); below.  */
5570 #include <assert.h>
5571 /* Override any gcc2 internal prototype to avoid an error.  */
5572 /* We use char because int might match the return type of a gcc2
5573     builtin and then its argument prototype would still apply.  */
5574 char $ac_func();
5575
5576 int main() {
5577
5578 /* The GNU C library defines this for functions which it implements
5579     to always fail with ENOSYS.  Some functions are actually named
5580     something starting with __ and the normal name is an alias.  */
5581 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5582 choke me
5583 #else
5584 $ac_func();
5585 #endif
5586
5587 ; return 0; }
5588 EOF
5589 if { (eval echo configure:5590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5590   rm -rf conftest*
5591   eval "ac_cv_func_$ac_func=yes"
5592 else
5593   echo "configure: failed program was:" >&5
5594   cat conftest.$ac_ext >&5
5595   rm -rf conftest*
5596   eval "ac_cv_func_$ac_func=no"
5597 fi
5598 rm -f conftest*
5599 fi
5600
5601 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5602   echo "$ac_t""yes" 1>&6
5603     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5604   cat >> confdefs.h <<EOF
5605 #define $ac_tr_func 1
5606 EOF
5607  
5608 else
5609   echo "$ac_t""no" 1>&6
5610 fi
5611 done
5612
5613 for ac_func in __getcwd _getcwd
5614 do
5615 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5616 echo "configure:5617: checking for $ac_func" >&5
5617 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5618   echo $ac_n "(cached) $ac_c" 1>&6
5619 else
5620   cat > conftest.$ac_ext <<EOF
5621 #line 5622 "configure"
5622 #include "confdefs.h"
5623 /* System header to define __stub macros and hopefully few prototypes,
5624     which can conflict with char $ac_func(); below.  */
5625 #include <assert.h>
5626 /* Override any gcc2 internal prototype to avoid an error.  */
5627 /* We use char because int might match the return type of a gcc2
5628     builtin and then its argument prototype would still apply.  */
5629 char $ac_func();
5630
5631 int main() {
5632
5633 /* The GNU C library defines this for functions which it implements
5634     to always fail with ENOSYS.  Some functions are actually named
5635     something starting with __ and the normal name is an alias.  */
5636 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5637 choke me
5638 #else
5639 $ac_func();
5640 #endif
5641
5642 ; return 0; }
5643 EOF
5644 if { (eval echo configure:5645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5645   rm -rf conftest*
5646   eval "ac_cv_func_$ac_func=yes"
5647 else
5648   echo "configure: failed program was:" >&5
5649   cat conftest.$ac_ext >&5
5650   rm -rf conftest*
5651   eval "ac_cv_func_$ac_func=no"
5652 fi
5653 rm -f conftest*
5654 fi
5655
5656 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5657   echo "$ac_t""yes" 1>&6
5658     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5659   cat >> confdefs.h <<EOF
5660 #define $ac_tr_func 1
5661 EOF
5662  
5663 else
5664   echo "$ac_t""no" 1>&6
5665 fi
5666 done
5667
5668 for ac_func in __xstat __fxstat __lxstat
5669 do
5670 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5671 echo "configure:5672: checking for $ac_func" >&5
5672 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5673   echo $ac_n "(cached) $ac_c" 1>&6
5674 else
5675   cat > conftest.$ac_ext <<EOF
5676 #line 5677 "configure"
5677 #include "confdefs.h"
5678 /* System header to define __stub macros and hopefully few prototypes,
5679     which can conflict with char $ac_func(); below.  */
5680 #include <assert.h>
5681 /* Override any gcc2 internal prototype to avoid an error.  */
5682 /* We use char because int might match the return type of a gcc2
5683     builtin and then its argument prototype would still apply.  */
5684 char $ac_func();
5685
5686 int main() {
5687
5688 /* The GNU C library defines this for functions which it implements
5689     to always fail with ENOSYS.  Some functions are actually named
5690     something starting with __ and the normal name is an alias.  */
5691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5692 choke me
5693 #else
5694 $ac_func();
5695 #endif
5696
5697 ; return 0; }
5698 EOF
5699 if { (eval echo configure:5700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5700   rm -rf conftest*
5701   eval "ac_cv_func_$ac_func=yes"
5702 else
5703   echo "configure: failed program was:" >&5
5704   cat conftest.$ac_ext >&5
5705   rm -rf conftest*
5706   eval "ac_cv_func_$ac_func=no"
5707 fi
5708 rm -f conftest*
5709 fi
5710
5711 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5712   echo "$ac_t""yes" 1>&6
5713     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5714   cat >> confdefs.h <<EOF
5715 #define $ac_tr_func 1
5716 EOF
5717  
5718 else
5719   echo "$ac_t""no" 1>&6
5720 fi
5721 done
5722
5723 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
5724 do
5725 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5726 echo "configure:5727: checking for $ac_func" >&5
5727 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5728   echo $ac_n "(cached) $ac_c" 1>&6
5729 else
5730   cat > conftest.$ac_ext <<EOF
5731 #line 5732 "configure"
5732 #include "confdefs.h"
5733 /* System header to define __stub macros and hopefully few prototypes,
5734     which can conflict with char $ac_func(); below.  */
5735 #include <assert.h>
5736 /* Override any gcc2 internal prototype to avoid an error.  */
5737 /* We use char because int might match the return type of a gcc2
5738     builtin and then its argument prototype would still apply.  */
5739 char $ac_func();
5740
5741 int main() {
5742
5743 /* The GNU C library defines this for functions which it implements
5744     to always fail with ENOSYS.  Some functions are actually named
5745     something starting with __ and the normal name is an alias.  */
5746 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5747 choke me
5748 #else
5749 $ac_func();
5750 #endif
5751
5752 ; return 0; }
5753 EOF
5754 if { (eval echo configure:5755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5755   rm -rf conftest*
5756   eval "ac_cv_func_$ac_func=yes"
5757 else
5758   echo "configure: failed program was:" >&5
5759   cat conftest.$ac_ext >&5
5760   rm -rf conftest*
5761   eval "ac_cv_func_$ac_func=no"
5762 fi
5763 rm -f conftest*
5764 fi
5765
5766 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5767   echo "$ac_t""yes" 1>&6
5768     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5769   cat >> confdefs.h <<EOF
5770 #define $ac_tr_func 1
5771 EOF
5772  
5773 else
5774   echo "$ac_t""no" 1>&6
5775 fi
5776 done
5777
5778 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
5779 do
5780 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5781 echo "configure:5782: checking for $ac_func" >&5
5782 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5783   echo $ac_n "(cached) $ac_c" 1>&6
5784 else
5785   cat > conftest.$ac_ext <<EOF
5786 #line 5787 "configure"
5787 #include "confdefs.h"
5788 /* System header to define __stub macros and hopefully few prototypes,
5789     which can conflict with char $ac_func(); below.  */
5790 #include <assert.h>
5791 /* Override any gcc2 internal prototype to avoid an error.  */
5792 /* We use char because int might match the return type of a gcc2
5793     builtin and then its argument prototype would still apply.  */
5794 char $ac_func();
5795
5796 int main() {
5797
5798 /* The GNU C library defines this for functions which it implements
5799     to always fail with ENOSYS.  Some functions are actually named
5800     something starting with __ and the normal name is an alias.  */
5801 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5802 choke me
5803 #else
5804 $ac_func();
5805 #endif
5806
5807 ; return 0; }
5808 EOF
5809 if { (eval echo configure:5810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5810   rm -rf conftest*
5811   eval "ac_cv_func_$ac_func=yes"
5812 else
5813   echo "configure: failed program was:" >&5
5814   cat conftest.$ac_ext >&5
5815   rm -rf conftest*
5816   eval "ac_cv_func_$ac_func=no"
5817 fi
5818 rm -f conftest*
5819 fi
5820
5821 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5822   echo "$ac_t""yes" 1>&6
5823     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5824   cat >> confdefs.h <<EOF
5825 #define $ac_tr_func 1
5826 EOF
5827  
5828 else
5829   echo "$ac_t""no" 1>&6
5830 fi
5831 done
5832
5833 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
5834 do
5835 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5836 echo "configure:5837: checking for $ac_func" >&5
5837 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5838   echo $ac_n "(cached) $ac_c" 1>&6
5839 else
5840   cat > conftest.$ac_ext <<EOF
5841 #line 5842 "configure"
5842 #include "confdefs.h"
5843 /* System header to define __stub macros and hopefully few prototypes,
5844     which can conflict with char $ac_func(); below.  */
5845 #include <assert.h>
5846 /* Override any gcc2 internal prototype to avoid an error.  */
5847 /* We use char because int might match the return type of a gcc2
5848     builtin and then its argument prototype would still apply.  */
5849 char $ac_func();
5850
5851 int main() {
5852
5853 /* The GNU C library defines this for functions which it implements
5854     to always fail with ENOSYS.  Some functions are actually named
5855     something starting with __ and the normal name is an alias.  */
5856 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5857 choke me
5858 #else
5859 $ac_func();
5860 #endif
5861
5862 ; return 0; }
5863 EOF
5864 if { (eval echo configure:5865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5865   rm -rf conftest*
5866   eval "ac_cv_func_$ac_func=yes"
5867 else
5868   echo "configure: failed program was:" >&5
5869   cat conftest.$ac_ext >&5
5870   rm -rf conftest*
5871   eval "ac_cv_func_$ac_func=no"
5872 fi
5873 rm -f conftest*
5874 fi
5875
5876 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5877   echo "$ac_t""yes" 1>&6
5878     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5879   cat >> confdefs.h <<EOF
5880 #define $ac_tr_func 1
5881 EOF
5882  
5883 else
5884   echo "$ac_t""no" 1>&6
5885 fi
5886 done
5887
5888 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
5889 do
5890 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5891 echo "configure:5892: checking for $ac_func" >&5
5892 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5893   echo $ac_n "(cached) $ac_c" 1>&6
5894 else
5895   cat > conftest.$ac_ext <<EOF
5896 #line 5897 "configure"
5897 #include "confdefs.h"
5898 /* System header to define __stub macros and hopefully few prototypes,
5899     which can conflict with char $ac_func(); below.  */
5900 #include <assert.h>
5901 /* Override any gcc2 internal prototype to avoid an error.  */
5902 /* We use char because int might match the return type of a gcc2
5903     builtin and then its argument prototype would still apply.  */
5904 char $ac_func();
5905
5906 int main() {
5907
5908 /* The GNU C library defines this for functions which it implements
5909     to always fail with ENOSYS.  Some functions are actually named
5910     something starting with __ and the normal name is an alias.  */
5911 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5912 choke me
5913 #else
5914 $ac_func();
5915 #endif
5916
5917 ; return 0; }
5918 EOF
5919 if { (eval echo configure:5920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5920   rm -rf conftest*
5921   eval "ac_cv_func_$ac_func=yes"
5922 else
5923   echo "configure: failed program was:" >&5
5924   cat conftest.$ac_ext >&5
5925   rm -rf conftest*
5926   eval "ac_cv_func_$ac_func=no"
5927 fi
5928 rm -f conftest*
5929 fi
5930
5931 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5932   echo "$ac_t""yes" 1>&6
5933     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5934   cat >> confdefs.h <<EOF
5935 #define $ac_tr_func 1
5936 EOF
5937  
5938 else
5939   echo "$ac_t""no" 1>&6
5940 fi
5941 done
5942
5943 for ac_func in _write __write _fork __fork
5944 do
5945 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5946 echo "configure:5947: checking for $ac_func" >&5
5947 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5948   echo $ac_n "(cached) $ac_c" 1>&6
5949 else
5950   cat > conftest.$ac_ext <<EOF
5951 #line 5952 "configure"
5952 #include "confdefs.h"
5953 /* System header to define __stub macros and hopefully few prototypes,
5954     which can conflict with char $ac_func(); below.  */
5955 #include <assert.h>
5956 /* Override any gcc2 internal prototype to avoid an error.  */
5957 /* We use char because int might match the return type of a gcc2
5958     builtin and then its argument prototype would still apply.  */
5959 char $ac_func();
5960
5961 int main() {
5962
5963 /* The GNU C library defines this for functions which it implements
5964     to always fail with ENOSYS.  Some functions are actually named
5965     something starting with __ and the normal name is an alias.  */
5966 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5967 choke me
5968 #else
5969 $ac_func();
5970 #endif
5971
5972 ; return 0; }
5973 EOF
5974 if { (eval echo configure:5975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5975   rm -rf conftest*
5976   eval "ac_cv_func_$ac_func=yes"
5977 else
5978   echo "configure: failed program was:" >&5
5979   cat conftest.$ac_ext >&5
5980   rm -rf conftest*
5981   eval "ac_cv_func_$ac_func=no"
5982 fi
5983 rm -f conftest*
5984 fi
5985
5986 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5987   echo "$ac_t""yes" 1>&6
5988     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5989   cat >> confdefs.h <<EOF
5990 #define $ac_tr_func 1
5991 EOF
5992  
5993 else
5994   echo "$ac_t""no" 1>&6
5995 fi
5996 done
5997
5998 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
5999 do
6000 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6001 echo "configure:6002: checking for $ac_func" >&5
6002 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6003   echo $ac_n "(cached) $ac_c" 1>&6
6004 else
6005   cat > conftest.$ac_ext <<EOF
6006 #line 6007 "configure"
6007 #include "confdefs.h"
6008 /* System header to define __stub macros and hopefully few prototypes,
6009     which can conflict with char $ac_func(); below.  */
6010 #include <assert.h>
6011 /* Override any gcc2 internal prototype to avoid an error.  */
6012 /* We use char because int might match the return type of a gcc2
6013     builtin and then its argument prototype would still apply.  */
6014 char $ac_func();
6015
6016 int main() {
6017
6018 /* The GNU C library defines this for functions which it implements
6019     to always fail with ENOSYS.  Some functions are actually named
6020     something starting with __ and the normal name is an alias.  */
6021 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6022 choke me
6023 #else
6024 $ac_func();
6025 #endif
6026
6027 ; return 0; }
6028 EOF
6029 if { (eval echo configure:6030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6030   rm -rf conftest*
6031   eval "ac_cv_func_$ac_func=yes"
6032 else
6033   echo "configure: failed program was:" >&5
6034   cat conftest.$ac_ext >&5
6035   rm -rf conftest*
6036   eval "ac_cv_func_$ac_func=no"
6037 fi
6038 rm -f conftest*
6039 fi
6040
6041 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6042   echo "$ac_t""yes" 1>&6
6043     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6044   cat >> confdefs.h <<EOF
6045 #define $ac_tr_func 1
6046 EOF
6047  
6048 else
6049   echo "$ac_t""no" 1>&6
6050 fi
6051 done
6052
6053 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6054 do
6055 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6056 echo "configure:6057: checking for $ac_func" >&5
6057 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6058   echo $ac_n "(cached) $ac_c" 1>&6
6059 else
6060   cat > conftest.$ac_ext <<EOF
6061 #line 6062 "configure"
6062 #include "confdefs.h"
6063 /* System header to define __stub macros and hopefully few prototypes,
6064     which can conflict with char $ac_func(); below.  */
6065 #include <assert.h>
6066 /* Override any gcc2 internal prototype to avoid an error.  */
6067 /* We use char because int might match the return type of a gcc2
6068     builtin and then its argument prototype would still apply.  */
6069 char $ac_func();
6070
6071 int main() {
6072
6073 /* The GNU C library defines this for functions which it implements
6074     to always fail with ENOSYS.  Some functions are actually named
6075     something starting with __ and the normal name is an alias.  */
6076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6077 choke me
6078 #else
6079 $ac_func();
6080 #endif
6081
6082 ; return 0; }
6083 EOF
6084 if { (eval echo configure:6085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6085   rm -rf conftest*
6086   eval "ac_cv_func_$ac_func=yes"
6087 else
6088   echo "configure: failed program was:" >&5
6089   cat conftest.$ac_ext >&5
6090   rm -rf conftest*
6091   eval "ac_cv_func_$ac_func=no"
6092 fi
6093 rm -f conftest*
6094 fi
6095
6096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6097   echo "$ac_t""yes" 1>&6
6098     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6099   cat >> confdefs.h <<EOF
6100 #define $ac_tr_func 1
6101 EOF
6102  
6103 else
6104   echo "$ac_t""no" 1>&6
6105 fi
6106 done
6107
6108 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6109 do
6110 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6111 echo "configure:6112: checking for $ac_func" >&5
6112 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6113   echo $ac_n "(cached) $ac_c" 1>&6
6114 else
6115   cat > conftest.$ac_ext <<EOF
6116 #line 6117 "configure"
6117 #include "confdefs.h"
6118 /* System header to define __stub macros and hopefully few prototypes,
6119     which can conflict with char $ac_func(); below.  */
6120 #include <assert.h>
6121 /* Override any gcc2 internal prototype to avoid an error.  */
6122 /* We use char because int might match the return type of a gcc2
6123     builtin and then its argument prototype would still apply.  */
6124 char $ac_func();
6125
6126 int main() {
6127
6128 /* The GNU C library defines this for functions which it implements
6129     to always fail with ENOSYS.  Some functions are actually named
6130     something starting with __ and the normal name is an alias.  */
6131 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6132 choke me
6133 #else
6134 $ac_func();
6135 #endif
6136
6137 ; return 0; }
6138 EOF
6139 if { (eval echo configure:6140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6140   rm -rf conftest*
6141   eval "ac_cv_func_$ac_func=yes"
6142 else
6143   echo "configure: failed program was:" >&5
6144   cat conftest.$ac_ext >&5
6145   rm -rf conftest*
6146   eval "ac_cv_func_$ac_func=no"
6147 fi
6148 rm -f conftest*
6149 fi
6150
6151 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6152   echo "$ac_t""yes" 1>&6
6153     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6154   cat >> confdefs.h <<EOF
6155 #define $ac_tr_func 1
6156 EOF
6157  
6158 else
6159   echo "$ac_t""no" 1>&6
6160 fi
6161 done
6162
6163 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6164 do
6165 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6166 echo "configure:6167: checking for $ac_func" >&5
6167 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6168   echo $ac_n "(cached) $ac_c" 1>&6
6169 else
6170   cat > conftest.$ac_ext <<EOF
6171 #line 6172 "configure"
6172 #include "confdefs.h"
6173 /* System header to define __stub macros and hopefully few prototypes,
6174     which can conflict with char $ac_func(); below.  */
6175 #include <assert.h>
6176 /* Override any gcc2 internal prototype to avoid an error.  */
6177 /* We use char because int might match the return type of a gcc2
6178     builtin and then its argument prototype would still apply.  */
6179 char $ac_func();
6180
6181 int main() {
6182
6183 /* The GNU C library defines this for functions which it implements
6184     to always fail with ENOSYS.  Some functions are actually named
6185     something starting with __ and the normal name is an alias.  */
6186 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6187 choke me
6188 #else
6189 $ac_func();
6190 #endif
6191
6192 ; return 0; }
6193 EOF
6194 if { (eval echo configure:6195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6195   rm -rf conftest*
6196   eval "ac_cv_func_$ac_func=yes"
6197 else
6198   echo "configure: failed program was:" >&5
6199   cat conftest.$ac_ext >&5
6200   rm -rf conftest*
6201   eval "ac_cv_func_$ac_func=no"
6202 fi
6203 rm -f conftest*
6204 fi
6205
6206 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6207   echo "$ac_t""yes" 1>&6
6208     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6209   cat >> confdefs.h <<EOF
6210 #define $ac_tr_func 1
6211 EOF
6212  
6213 else
6214   echo "$ac_t""no" 1>&6
6215 fi
6216 done
6217
6218 for ac_func in open64 _open64 __open64 creat64
6219 do
6220 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6221 echo "configure:6222: checking for $ac_func" >&5
6222 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6223   echo $ac_n "(cached) $ac_c" 1>&6
6224 else
6225   cat > conftest.$ac_ext <<EOF
6226 #line 6227 "configure"
6227 #include "confdefs.h"
6228 /* System header to define __stub macros and hopefully few prototypes,
6229     which can conflict with char $ac_func(); below.  */
6230 #include <assert.h>
6231 /* Override any gcc2 internal prototype to avoid an error.  */
6232 /* We use char because int might match the return type of a gcc2
6233     builtin and then its argument prototype would still apply.  */
6234 char $ac_func();
6235
6236 int main() {
6237
6238 /* The GNU C library defines this for functions which it implements
6239     to always fail with ENOSYS.  Some functions are actually named
6240     something starting with __ and the normal name is an alias.  */
6241 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6242 choke me
6243 #else
6244 $ac_func();
6245 #endif
6246
6247 ; return 0; }
6248 EOF
6249 if { (eval echo configure:6250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6250   rm -rf conftest*
6251   eval "ac_cv_func_$ac_func=yes"
6252 else
6253   echo "configure: failed program was:" >&5
6254   cat conftest.$ac_ext >&5
6255   rm -rf conftest*
6256   eval "ac_cv_func_$ac_func=no"
6257 fi
6258 rm -f conftest*
6259 fi
6260
6261 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6262   echo "$ac_t""yes" 1>&6
6263     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6264   cat >> confdefs.h <<EOF
6265 #define $ac_tr_func 1
6266 EOF
6267  
6268 else
6269   echo "$ac_t""no" 1>&6
6270 fi
6271 done
6272
6273
6274 #
6275 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6276 #
6277
6278 if test x$ac_cv_func_stat64 = xno ; then
6279   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6280 echo "configure:6281: checking for stat64 in <sys/stat.h>" >&5
6281   cat > conftest.$ac_ext <<EOF
6282 #line 6283 "configure"
6283 #include "confdefs.h"
6284
6285 #if defined(HAVE_UNISTD_H)
6286 #include <unistd.h>
6287 #endif
6288 #include <sys/stat.h>
6289
6290 int main() {
6291 struct stat64 st64; exit(stat64(".",&st64));
6292 ; return 0; }
6293 EOF
6294 if { (eval echo configure:6295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6295   rm -rf conftest*
6296   ac_cv_func_stat64=yes
6297 else
6298   echo "configure: failed program was:" >&5
6299   cat conftest.$ac_ext >&5
6300 fi
6301 rm -f conftest*
6302   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6303   if test x$ac_cv_func_stat64 = xyes ; then
6304     cat >> confdefs.h <<\EOF
6305 #define HAVE_STAT64 1
6306 EOF
6307
6308   fi
6309 fi
6310
6311 if test x$ac_cv_func_lstat64 = xno ; then
6312   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6313 echo "configure:6314: checking for lstat64 in <sys/stat.h>" >&5
6314   cat > conftest.$ac_ext <<EOF
6315 #line 6316 "configure"
6316 #include "confdefs.h"
6317
6318 #if defined(HAVE_UNISTD_H)
6319 #include <unistd.h>
6320 #endif
6321 #include <sys/stat.h>
6322
6323 int main() {
6324 struct stat64 st64; exit(lstat64(".",&st64));
6325 ; return 0; }
6326 EOF
6327 if { (eval echo configure:6328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6328   rm -rf conftest*
6329   ac_cv_func_lstat64=yes
6330 else
6331   echo "configure: failed program was:" >&5
6332   cat conftest.$ac_ext >&5
6333 fi
6334 rm -f conftest*
6335   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6336   if test x$ac_cv_func_lstat64 = xyes ; then
6337     cat >> confdefs.h <<\EOF
6338 #define HAVE_LSTAT64 1
6339 EOF
6340
6341   fi
6342 fi
6343
6344 if test x$ac_cv_func_fstat64 = xno ; then
6345   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6346 echo "configure:6347: checking for fstat64 in <sys/stat.h>" >&5
6347   cat > conftest.$ac_ext <<EOF
6348 #line 6349 "configure"
6349 #include "confdefs.h"
6350
6351 #if defined(HAVE_UNISTD_H)
6352 #include <unistd.h>
6353 #endif
6354 #include <sys/stat.h>
6355
6356 int main() {
6357 struct stat64 st64; exit(fstat64(0,&st64));
6358 ; return 0; }
6359 EOF
6360 if { (eval echo configure:6361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6361   rm -rf conftest*
6362   ac_cv_func_fstat64=yes
6363 else
6364   echo "configure: failed program was:" >&5
6365   cat conftest.$ac_ext >&5
6366 fi
6367 rm -f conftest*
6368   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6369   if test x$ac_cv_func_fstat64 = xyes ; then
6370     cat >> confdefs.h <<\EOF
6371 #define HAVE_FSTAT64 1
6372 EOF
6373
6374   fi
6375 fi
6376
6377 #
6378 # If no strcasecmp, check for it in some known places
6379 # It is in -lresolv on ReliantUNIX and UnixWare
6380 #   -lresolve *must* follow -lnsl for name resolution to work properly
6381 #
6382
6383 if test x$ac_cv_func_strcasecmp = xno ; then
6384         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6385 echo "configure:6386: checking for strcasecmp in -lresolv" >&5
6386 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6387 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6388   echo $ac_n "(cached) $ac_c" 1>&6
6389 else
6390   ac_save_LIBS="$LIBS"
6391 LIBS="-lresolv  $LIBS"
6392 cat > conftest.$ac_ext <<EOF
6393 #line 6394 "configure"
6394 #include "confdefs.h"
6395 /* Override any gcc2 internal prototype to avoid an error.  */
6396 /* We use char because int might match the return type of a gcc2
6397     builtin and then its argument prototype would still apply.  */
6398 char strcasecmp();
6399
6400 int main() {
6401 strcasecmp()
6402 ; return 0; }
6403 EOF
6404 if { (eval echo configure:6405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6405   rm -rf conftest*
6406   eval "ac_cv_lib_$ac_lib_var=yes"
6407 else
6408   echo "configure: failed program was:" >&5
6409   cat conftest.$ac_ext >&5
6410   rm -rf conftest*
6411   eval "ac_cv_lib_$ac_lib_var=no"
6412 fi
6413 rm -f conftest*
6414 LIBS="$ac_save_LIBS"
6415
6416 fi
6417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6418   echo "$ac_t""yes" 1>&6
6419   LIBS="$LIBS -lresolv"
6420                 cat >> confdefs.h <<\EOF
6421 #define HAVE_STRCASECMP 1
6422 EOF
6423
6424 else
6425   echo "$ac_t""no" 1>&6
6426 fi
6427
6428 fi
6429
6430 #
6431 # Check for the functions putprpwnam, set_auth_parameters,
6432 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6433 # Needed for OSF1 and HPUX.
6434 #
6435
6436 case "$LIBS" in
6437   *-lsecurity*) for ac_func in putprpwnam
6438 do
6439 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6440 echo "configure:6441: checking for $ac_func" >&5
6441 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6442   echo $ac_n "(cached) $ac_c" 1>&6
6443 else
6444   cat > conftest.$ac_ext <<EOF
6445 #line 6446 "configure"
6446 #include "confdefs.h"
6447 /* System header to define __stub macros and hopefully few prototypes,
6448     which can conflict with char $ac_func(); below.  */
6449 #include <assert.h>
6450 /* Override any gcc2 internal prototype to avoid an error.  */
6451 /* We use char because int might match the return type of a gcc2
6452     builtin and then its argument prototype would still apply.  */
6453 char $ac_func();
6454
6455 int main() {
6456
6457 /* The GNU C library defines this for functions which it implements
6458     to always fail with ENOSYS.  Some functions are actually named
6459     something starting with __ and the normal name is an alias.  */
6460 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6461 choke me
6462 #else
6463 $ac_func();
6464 #endif
6465
6466 ; return 0; }
6467 EOF
6468 if { (eval echo configure:6469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6469   rm -rf conftest*
6470   eval "ac_cv_func_$ac_func=yes"
6471 else
6472   echo "configure: failed program was:" >&5
6473   cat conftest.$ac_ext >&5
6474   rm -rf conftest*
6475   eval "ac_cv_func_$ac_func=no"
6476 fi
6477 rm -f conftest*
6478 fi
6479
6480 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6481   echo "$ac_t""yes" 1>&6
6482     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6483   cat >> confdefs.h <<EOF
6484 #define $ac_tr_func 1
6485 EOF
6486  
6487 else
6488   echo "$ac_t""no" 1>&6
6489 fi
6490 done
6491  ;;
6492   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6493 echo "configure:6494: checking for putprpwnam in -lsecurity" >&5
6494 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6495 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6496   echo $ac_n "(cached) $ac_c" 1>&6
6497 else
6498   ac_save_LIBS="$LIBS"
6499 LIBS="-lsecurity  $LIBS"
6500 cat > conftest.$ac_ext <<EOF
6501 #line 6502 "configure"
6502 #include "confdefs.h"
6503 /* Override any gcc2 internal prototype to avoid an error.  */
6504 /* We use char because int might match the return type of a gcc2
6505     builtin and then its argument prototype would still apply.  */
6506 char putprpwnam();
6507
6508 int main() {
6509 putprpwnam()
6510 ; return 0; }
6511 EOF
6512 if { (eval echo configure:6513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6513   rm -rf conftest*
6514   eval "ac_cv_lib_$ac_lib_var=yes"
6515 else
6516   echo "configure: failed program was:" >&5
6517   cat conftest.$ac_ext >&5
6518   rm -rf conftest*
6519   eval "ac_cv_lib_$ac_lib_var=no"
6520 fi
6521 rm -f conftest*
6522 LIBS="$ac_save_LIBS"
6523
6524 fi
6525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6526   echo "$ac_t""yes" 1>&6
6527     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6528     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6529   cat >> confdefs.h <<EOF
6530 #define $ac_tr_lib 1
6531 EOF
6532
6533   LIBS="-lsecurity $LIBS"
6534
6535 else
6536   echo "$ac_t""no" 1>&6
6537 fi
6538  
6539      for ac_func in putprpwnam
6540 do
6541 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6542 echo "configure:6543: checking for $ac_func" >&5
6543 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6544   echo $ac_n "(cached) $ac_c" 1>&6
6545 else
6546   cat > conftest.$ac_ext <<EOF
6547 #line 6548 "configure"
6548 #include "confdefs.h"
6549 /* System header to define __stub macros and hopefully few prototypes,
6550     which can conflict with char $ac_func(); below.  */
6551 #include <assert.h>
6552 /* Override any gcc2 internal prototype to avoid an error.  */
6553 /* We use char because int might match the return type of a gcc2
6554     builtin and then its argument prototype would still apply.  */
6555 char $ac_func();
6556
6557 int main() {
6558
6559 /* The GNU C library defines this for functions which it implements
6560     to always fail with ENOSYS.  Some functions are actually named
6561     something starting with __ and the normal name is an alias.  */
6562 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6563 choke me
6564 #else
6565 $ac_func();
6566 #endif
6567
6568 ; return 0; }
6569 EOF
6570 if { (eval echo configure:6571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6571   rm -rf conftest*
6572   eval "ac_cv_func_$ac_func=yes"
6573 else
6574   echo "configure: failed program was:" >&5
6575   cat conftest.$ac_ext >&5
6576   rm -rf conftest*
6577   eval "ac_cv_func_$ac_func=no"
6578 fi
6579 rm -f conftest*
6580 fi
6581
6582 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6583   echo "$ac_t""yes" 1>&6
6584     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6585   cat >> confdefs.h <<EOF
6586 #define $ac_tr_func 1
6587 EOF
6588  
6589 else
6590   echo "$ac_t""no" 1>&6
6591 fi
6592 done
6593
6594   ;;
6595   esac
6596
6597 case "$LIBS" in
6598   *-lsec*) for ac_func in putprpwnam
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   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6654 echo "configure:6655: checking for putprpwnam in -lsec" >&5
6655 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6656 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6657   echo $ac_n "(cached) $ac_c" 1>&6
6658 else
6659   ac_save_LIBS="$LIBS"
6660 LIBS="-lsec  $LIBS"
6661 cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 /* Override any gcc2 internal prototype to avoid an error.  */
6665 /* We use char because int might match the return type of a gcc2
6666     builtin and then its argument prototype would still apply.  */
6667 char putprpwnam();
6668
6669 int main() {
6670 putprpwnam()
6671 ; return 0; }
6672 EOF
6673 if { (eval echo configure:6674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6674   rm -rf conftest*
6675   eval "ac_cv_lib_$ac_lib_var=yes"
6676 else
6677   echo "configure: failed program was:" >&5
6678   cat conftest.$ac_ext >&5
6679   rm -rf conftest*
6680   eval "ac_cv_lib_$ac_lib_var=no"
6681 fi
6682 rm -f conftest*
6683 LIBS="$ac_save_LIBS"
6684
6685 fi
6686 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6687   echo "$ac_t""yes" 1>&6
6688     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6689     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6690   cat >> confdefs.h <<EOF
6691 #define $ac_tr_lib 1
6692 EOF
6693
6694   LIBS="-lsec $LIBS"
6695
6696 else
6697   echo "$ac_t""no" 1>&6
6698 fi
6699  
6700      for ac_func in putprpwnam
6701 do
6702 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6703 echo "configure:6704: checking for $ac_func" >&5
6704 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6705   echo $ac_n "(cached) $ac_c" 1>&6
6706 else
6707   cat > conftest.$ac_ext <<EOF
6708 #line 6709 "configure"
6709 #include "confdefs.h"
6710 /* System header to define __stub macros and hopefully few prototypes,
6711     which can conflict with char $ac_func(); below.  */
6712 #include <assert.h>
6713 /* Override any gcc2 internal prototype to avoid an error.  */
6714 /* We use char because int might match the return type of a gcc2
6715     builtin and then its argument prototype would still apply.  */
6716 char $ac_func();
6717
6718 int main() {
6719
6720 /* The GNU C library defines this for functions which it implements
6721     to always fail with ENOSYS.  Some functions are actually named
6722     something starting with __ and the normal name is an alias.  */
6723 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6724 choke me
6725 #else
6726 $ac_func();
6727 #endif
6728
6729 ; return 0; }
6730 EOF
6731 if { (eval echo configure:6732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6732   rm -rf conftest*
6733   eval "ac_cv_func_$ac_func=yes"
6734 else
6735   echo "configure: failed program was:" >&5
6736   cat conftest.$ac_ext >&5
6737   rm -rf conftest*
6738   eval "ac_cv_func_$ac_func=no"
6739 fi
6740 rm -f conftest*
6741 fi
6742
6743 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6744   echo "$ac_t""yes" 1>&6
6745     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6746   cat >> confdefs.h <<EOF
6747 #define $ac_tr_func 1
6748 EOF
6749  
6750 else
6751   echo "$ac_t""no" 1>&6
6752 fi
6753 done
6754
6755   ;;
6756   esac
6757
6758
6759 case "$LIBS" in
6760   *-lsecurity*) for ac_func in set_auth_parameters
6761 do
6762 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6763 echo "configure:6764: checking for $ac_func" >&5
6764 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6765   echo $ac_n "(cached) $ac_c" 1>&6
6766 else
6767   cat > conftest.$ac_ext <<EOF
6768 #line 6769 "configure"
6769 #include "confdefs.h"
6770 /* System header to define __stub macros and hopefully few prototypes,
6771     which can conflict with char $ac_func(); below.  */
6772 #include <assert.h>
6773 /* Override any gcc2 internal prototype to avoid an error.  */
6774 /* We use char because int might match the return type of a gcc2
6775     builtin and then its argument prototype would still apply.  */
6776 char $ac_func();
6777
6778 int main() {
6779
6780 /* The GNU C library defines this for functions which it implements
6781     to always fail with ENOSYS.  Some functions are actually named
6782     something starting with __ and the normal name is an alias.  */
6783 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6784 choke me
6785 #else
6786 $ac_func();
6787 #endif
6788
6789 ; return 0; }
6790 EOF
6791 if { (eval echo configure:6792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6792   rm -rf conftest*
6793   eval "ac_cv_func_$ac_func=yes"
6794 else
6795   echo "configure: failed program was:" >&5
6796   cat conftest.$ac_ext >&5
6797   rm -rf conftest*
6798   eval "ac_cv_func_$ac_func=no"
6799 fi
6800 rm -f conftest*
6801 fi
6802
6803 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6804   echo "$ac_t""yes" 1>&6
6805     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6806   cat >> confdefs.h <<EOF
6807 #define $ac_tr_func 1
6808 EOF
6809  
6810 else
6811   echo "$ac_t""no" 1>&6
6812 fi
6813 done
6814  ;;
6815   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
6816 echo "configure:6817: checking for set_auth_parameters in -lsecurity" >&5
6817 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6818 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6819   echo $ac_n "(cached) $ac_c" 1>&6
6820 else
6821   ac_save_LIBS="$LIBS"
6822 LIBS="-lsecurity  $LIBS"
6823 cat > conftest.$ac_ext <<EOF
6824 #line 6825 "configure"
6825 #include "confdefs.h"
6826 /* Override any gcc2 internal prototype to avoid an error.  */
6827 /* We use char because int might match the return type of a gcc2
6828     builtin and then its argument prototype would still apply.  */
6829 char set_auth_parameters();
6830
6831 int main() {
6832 set_auth_parameters()
6833 ; return 0; }
6834 EOF
6835 if { (eval echo configure:6836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6836   rm -rf conftest*
6837   eval "ac_cv_lib_$ac_lib_var=yes"
6838 else
6839   echo "configure: failed program was:" >&5
6840   cat conftest.$ac_ext >&5
6841   rm -rf conftest*
6842   eval "ac_cv_lib_$ac_lib_var=no"
6843 fi
6844 rm -f conftest*
6845 LIBS="$ac_save_LIBS"
6846
6847 fi
6848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6849   echo "$ac_t""yes" 1>&6
6850     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6851     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6852   cat >> confdefs.h <<EOF
6853 #define $ac_tr_lib 1
6854 EOF
6855
6856   LIBS="-lsecurity $LIBS"
6857
6858 else
6859   echo "$ac_t""no" 1>&6
6860 fi
6861  
6862      for ac_func in set_auth_parameters
6863 do
6864 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6865 echo "configure:6866: checking for $ac_func" >&5
6866 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6867   echo $ac_n "(cached) $ac_c" 1>&6
6868 else
6869   cat > conftest.$ac_ext <<EOF
6870 #line 6871 "configure"
6871 #include "confdefs.h"
6872 /* System header to define __stub macros and hopefully few prototypes,
6873     which can conflict with char $ac_func(); below.  */
6874 #include <assert.h>
6875 /* Override any gcc2 internal prototype to avoid an error.  */
6876 /* We use char because int might match the return type of a gcc2
6877     builtin and then its argument prototype would still apply.  */
6878 char $ac_func();
6879
6880 int main() {
6881
6882 /* The GNU C library defines this for functions which it implements
6883     to always fail with ENOSYS.  Some functions are actually named
6884     something starting with __ and the normal name is an alias.  */
6885 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6886 choke me
6887 #else
6888 $ac_func();
6889 #endif
6890
6891 ; return 0; }
6892 EOF
6893 if { (eval echo configure:6894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6894   rm -rf conftest*
6895   eval "ac_cv_func_$ac_func=yes"
6896 else
6897   echo "configure: failed program was:" >&5
6898   cat conftest.$ac_ext >&5
6899   rm -rf conftest*
6900   eval "ac_cv_func_$ac_func=no"
6901 fi
6902 rm -f conftest*
6903 fi
6904
6905 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6906   echo "$ac_t""yes" 1>&6
6907     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6908   cat >> confdefs.h <<EOF
6909 #define $ac_tr_func 1
6910 EOF
6911  
6912 else
6913   echo "$ac_t""no" 1>&6
6914 fi
6915 done
6916
6917   ;;
6918   esac
6919
6920 case "$LIBS" in
6921   *-lsec*) for ac_func in set_auth_parameters
6922 do
6923 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6924 echo "configure:6925: checking for $ac_func" >&5
6925 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6926   echo $ac_n "(cached) $ac_c" 1>&6
6927 else
6928   cat > conftest.$ac_ext <<EOF
6929 #line 6930 "configure"
6930 #include "confdefs.h"
6931 /* System header to define __stub macros and hopefully few prototypes,
6932     which can conflict with char $ac_func(); below.  */
6933 #include <assert.h>
6934 /* Override any gcc2 internal prototype to avoid an error.  */
6935 /* We use char because int might match the return type of a gcc2
6936     builtin and then its argument prototype would still apply.  */
6937 char $ac_func();
6938
6939 int main() {
6940
6941 /* The GNU C library defines this for functions which it implements
6942     to always fail with ENOSYS.  Some functions are actually named
6943     something starting with __ and the normal name is an alias.  */
6944 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6945 choke me
6946 #else
6947 $ac_func();
6948 #endif
6949
6950 ; return 0; }
6951 EOF
6952 if { (eval echo configure:6953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6953   rm -rf conftest*
6954   eval "ac_cv_func_$ac_func=yes"
6955 else
6956   echo "configure: failed program was:" >&5
6957   cat conftest.$ac_ext >&5
6958   rm -rf conftest*
6959   eval "ac_cv_func_$ac_func=no"
6960 fi
6961 rm -f conftest*
6962 fi
6963
6964 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6965   echo "$ac_t""yes" 1>&6
6966     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6967   cat >> confdefs.h <<EOF
6968 #define $ac_tr_func 1
6969 EOF
6970  
6971 else
6972   echo "$ac_t""no" 1>&6
6973 fi
6974 done
6975  ;;
6976   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
6977 echo "configure:6978: checking for set_auth_parameters in -lsec" >&5
6978 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6979 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6980   echo $ac_n "(cached) $ac_c" 1>&6
6981 else
6982   ac_save_LIBS="$LIBS"
6983 LIBS="-lsec  $LIBS"
6984 cat > conftest.$ac_ext <<EOF
6985 #line 6986 "configure"
6986 #include "confdefs.h"
6987 /* Override any gcc2 internal prototype to avoid an error.  */
6988 /* We use char because int might match the return type of a gcc2
6989     builtin and then its argument prototype would still apply.  */
6990 char set_auth_parameters();
6991
6992 int main() {
6993 set_auth_parameters()
6994 ; return 0; }
6995 EOF
6996 if { (eval echo configure:6997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6997   rm -rf conftest*
6998   eval "ac_cv_lib_$ac_lib_var=yes"
6999 else
7000   echo "configure: failed program was:" >&5
7001   cat conftest.$ac_ext >&5
7002   rm -rf conftest*
7003   eval "ac_cv_lib_$ac_lib_var=no"
7004 fi
7005 rm -f conftest*
7006 LIBS="$ac_save_LIBS"
7007
7008 fi
7009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7010   echo "$ac_t""yes" 1>&6
7011     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7012     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7013   cat >> confdefs.h <<EOF
7014 #define $ac_tr_lib 1
7015 EOF
7016
7017   LIBS="-lsec $LIBS"
7018
7019 else
7020   echo "$ac_t""no" 1>&6
7021 fi
7022  
7023      for ac_func in set_auth_parameters
7024 do
7025 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7026 echo "configure:7027: checking for $ac_func" >&5
7027 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7028   echo $ac_n "(cached) $ac_c" 1>&6
7029 else
7030   cat > conftest.$ac_ext <<EOF
7031 #line 7032 "configure"
7032 #include "confdefs.h"
7033 /* System header to define __stub macros and hopefully few prototypes,
7034     which can conflict with char $ac_func(); below.  */
7035 #include <assert.h>
7036 /* Override any gcc2 internal prototype to avoid an error.  */
7037 /* We use char because int might match the return type of a gcc2
7038     builtin and then its argument prototype would still apply.  */
7039 char $ac_func();
7040
7041 int main() {
7042
7043 /* The GNU C library defines this for functions which it implements
7044     to always fail with ENOSYS.  Some functions are actually named
7045     something starting with __ and the normal name is an alias.  */
7046 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7047 choke me
7048 #else
7049 $ac_func();
7050 #endif
7051
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_func_$ac_func=yes"
7057 else
7058   echo "configure: failed program was:" >&5
7059   cat conftest.$ac_ext >&5
7060   rm -rf conftest*
7061   eval "ac_cv_func_$ac_func=no"
7062 fi
7063 rm -f conftest*
7064 fi
7065
7066 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7067   echo "$ac_t""yes" 1>&6
7068     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7069   cat >> confdefs.h <<EOF
7070 #define $ac_tr_func 1
7071 EOF
7072  
7073 else
7074   echo "$ac_t""no" 1>&6
7075 fi
7076 done
7077
7078   ;;
7079   esac
7080
7081
7082 # UnixWare 7.x has its getspnam in -lgen
7083 case "$LIBS" in
7084   *-lgen*) for ac_func in getspnam
7085 do
7086 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7087 echo "configure:7088: checking for $ac_func" >&5
7088 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7089   echo $ac_n "(cached) $ac_c" 1>&6
7090 else
7091   cat > conftest.$ac_ext <<EOF
7092 #line 7093 "configure"
7093 #include "confdefs.h"
7094 /* System header to define __stub macros and hopefully few prototypes,
7095     which can conflict with char $ac_func(); below.  */
7096 #include <assert.h>
7097 /* Override any gcc2 internal prototype to avoid an error.  */
7098 /* We use char because int might match the return type of a gcc2
7099     builtin and then its argument prototype would still apply.  */
7100 char $ac_func();
7101
7102 int main() {
7103
7104 /* The GNU C library defines this for functions which it implements
7105     to always fail with ENOSYS.  Some functions are actually named
7106     something starting with __ and the normal name is an alias.  */
7107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7108 choke me
7109 #else
7110 $ac_func();
7111 #endif
7112
7113 ; return 0; }
7114 EOF
7115 if { (eval echo configure:7116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7116   rm -rf conftest*
7117   eval "ac_cv_func_$ac_func=yes"
7118 else
7119   echo "configure: failed program was:" >&5
7120   cat conftest.$ac_ext >&5
7121   rm -rf conftest*
7122   eval "ac_cv_func_$ac_func=no"
7123 fi
7124 rm -f conftest*
7125 fi
7126
7127 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7128   echo "$ac_t""yes" 1>&6
7129     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7130   cat >> confdefs.h <<EOF
7131 #define $ac_tr_func 1
7132 EOF
7133  
7134 else
7135   echo "$ac_t""no" 1>&6
7136 fi
7137 done
7138  ;;
7139   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7140 echo "configure:7141: checking for getspnam in -lgen" >&5
7141 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7142 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7143   echo $ac_n "(cached) $ac_c" 1>&6
7144 else
7145   ac_save_LIBS="$LIBS"
7146 LIBS="-lgen  $LIBS"
7147 cat > conftest.$ac_ext <<EOF
7148 #line 7149 "configure"
7149 #include "confdefs.h"
7150 /* Override any gcc2 internal prototype to avoid an error.  */
7151 /* We use char because int might match the return type of a gcc2
7152     builtin and then its argument prototype would still apply.  */
7153 char getspnam();
7154
7155 int main() {
7156 getspnam()
7157 ; return 0; }
7158 EOF
7159 if { (eval echo configure:7160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7160   rm -rf conftest*
7161   eval "ac_cv_lib_$ac_lib_var=yes"
7162 else
7163   echo "configure: failed program was:" >&5
7164   cat conftest.$ac_ext >&5
7165   rm -rf conftest*
7166   eval "ac_cv_lib_$ac_lib_var=no"
7167 fi
7168 rm -f conftest*
7169 LIBS="$ac_save_LIBS"
7170
7171 fi
7172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7173   echo "$ac_t""yes" 1>&6
7174     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7175     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7176   cat >> confdefs.h <<EOF
7177 #define $ac_tr_lib 1
7178 EOF
7179
7180   LIBS="-lgen $LIBS"
7181
7182 else
7183   echo "$ac_t""no" 1>&6
7184 fi
7185  
7186      for ac_func in getspnam
7187 do
7188 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7189 echo "configure:7190: checking for $ac_func" >&5
7190 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7191   echo $ac_n "(cached) $ac_c" 1>&6
7192 else
7193   cat > conftest.$ac_ext <<EOF
7194 #line 7195 "configure"
7195 #include "confdefs.h"
7196 /* System header to define __stub macros and hopefully few prototypes,
7197     which can conflict with char $ac_func(); below.  */
7198 #include <assert.h>
7199 /* Override any gcc2 internal prototype to avoid an error.  */
7200 /* We use char because int might match the return type of a gcc2
7201     builtin and then its argument prototype would still apply.  */
7202 char $ac_func();
7203
7204 int main() {
7205
7206 /* The GNU C library defines this for functions which it implements
7207     to always fail with ENOSYS.  Some functions are actually named
7208     something starting with __ and the normal name is an alias.  */
7209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7210 choke me
7211 #else
7212 $ac_func();
7213 #endif
7214
7215 ; return 0; }
7216 EOF
7217 if { (eval echo configure:7218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7218   rm -rf conftest*
7219   eval "ac_cv_func_$ac_func=yes"
7220 else
7221   echo "configure: failed program was:" >&5
7222   cat conftest.$ac_ext >&5
7223   rm -rf conftest*
7224   eval "ac_cv_func_$ac_func=no"
7225 fi
7226 rm -f conftest*
7227 fi
7228
7229 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7230   echo "$ac_t""yes" 1>&6
7231     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7232   cat >> confdefs.h <<EOF
7233 #define $ac_tr_func 1
7234 EOF
7235  
7236 else
7237   echo "$ac_t""no" 1>&6
7238 fi
7239 done
7240
7241   ;;
7242   esac
7243
7244
7245 case "$LIBS" in
7246   *-lsecurity*) for ac_func in getspnam
7247 do
7248 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7249 echo "configure:7250: checking for $ac_func" >&5
7250 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7251   echo $ac_n "(cached) $ac_c" 1>&6
7252 else
7253   cat > conftest.$ac_ext <<EOF
7254 #line 7255 "configure"
7255 #include "confdefs.h"
7256 /* System header to define __stub macros and hopefully few prototypes,
7257     which can conflict with char $ac_func(); below.  */
7258 #include <assert.h>
7259 /* Override any gcc2 internal prototype to avoid an error.  */
7260 /* We use char because int might match the return type of a gcc2
7261     builtin and then its argument prototype would still apply.  */
7262 char $ac_func();
7263
7264 int main() {
7265
7266 /* The GNU C library defines this for functions which it implements
7267     to always fail with ENOSYS.  Some functions are actually named
7268     something starting with __ and the normal name is an alias.  */
7269 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7270 choke me
7271 #else
7272 $ac_func();
7273 #endif
7274
7275 ; return 0; }
7276 EOF
7277 if { (eval echo configure:7278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7278   rm -rf conftest*
7279   eval "ac_cv_func_$ac_func=yes"
7280 else
7281   echo "configure: failed program was:" >&5
7282   cat conftest.$ac_ext >&5
7283   rm -rf conftest*
7284   eval "ac_cv_func_$ac_func=no"
7285 fi
7286 rm -f conftest*
7287 fi
7288
7289 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7290   echo "$ac_t""yes" 1>&6
7291     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7292   cat >> confdefs.h <<EOF
7293 #define $ac_tr_func 1
7294 EOF
7295  
7296 else
7297   echo "$ac_t""no" 1>&6
7298 fi
7299 done
7300  ;;
7301   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7302 echo "configure:7303: checking for getspnam in -lsecurity" >&5
7303 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7304 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7305   echo $ac_n "(cached) $ac_c" 1>&6
7306 else
7307   ac_save_LIBS="$LIBS"
7308 LIBS="-lsecurity  $LIBS"
7309 cat > conftest.$ac_ext <<EOF
7310 #line 7311 "configure"
7311 #include "confdefs.h"
7312 /* Override any gcc2 internal prototype to avoid an error.  */
7313 /* We use char because int might match the return type of a gcc2
7314     builtin and then its argument prototype would still apply.  */
7315 char getspnam();
7316
7317 int main() {
7318 getspnam()
7319 ; return 0; }
7320 EOF
7321 if { (eval echo configure:7322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7322   rm -rf conftest*
7323   eval "ac_cv_lib_$ac_lib_var=yes"
7324 else
7325   echo "configure: failed program was:" >&5
7326   cat conftest.$ac_ext >&5
7327   rm -rf conftest*
7328   eval "ac_cv_lib_$ac_lib_var=no"
7329 fi
7330 rm -f conftest*
7331 LIBS="$ac_save_LIBS"
7332
7333 fi
7334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7335   echo "$ac_t""yes" 1>&6
7336     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7337     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7338   cat >> confdefs.h <<EOF
7339 #define $ac_tr_lib 1
7340 EOF
7341
7342   LIBS="-lsecurity $LIBS"
7343
7344 else
7345   echo "$ac_t""no" 1>&6
7346 fi
7347  
7348      for ac_func in getspnam
7349 do
7350 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7351 echo "configure:7352: checking for $ac_func" >&5
7352 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7353   echo $ac_n "(cached) $ac_c" 1>&6
7354 else
7355   cat > conftest.$ac_ext <<EOF
7356 #line 7357 "configure"
7357 #include "confdefs.h"
7358 /* System header to define __stub macros and hopefully few prototypes,
7359     which can conflict with char $ac_func(); below.  */
7360 #include <assert.h>
7361 /* Override any gcc2 internal prototype to avoid an error.  */
7362 /* We use char because int might match the return type of a gcc2
7363     builtin and then its argument prototype would still apply.  */
7364 char $ac_func();
7365
7366 int main() {
7367
7368 /* The GNU C library defines this for functions which it implements
7369     to always fail with ENOSYS.  Some functions are actually named
7370     something starting with __ and the normal name is an alias.  */
7371 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7372 choke me
7373 #else
7374 $ac_func();
7375 #endif
7376
7377 ; return 0; }
7378 EOF
7379 if { (eval echo configure:7380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7380   rm -rf conftest*
7381   eval "ac_cv_func_$ac_func=yes"
7382 else
7383   echo "configure: failed program was:" >&5
7384   cat conftest.$ac_ext >&5
7385   rm -rf conftest*
7386   eval "ac_cv_func_$ac_func=no"
7387 fi
7388 rm -f conftest*
7389 fi
7390
7391 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7392   echo "$ac_t""yes" 1>&6
7393     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7394   cat >> confdefs.h <<EOF
7395 #define $ac_tr_func 1
7396 EOF
7397  
7398 else
7399   echo "$ac_t""no" 1>&6
7400 fi
7401 done
7402
7403   ;;
7404   esac
7405
7406 case "$LIBS" in
7407   *-lsec*) for ac_func in getspnam
7408 do
7409 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7410 echo "configure:7411: checking for $ac_func" >&5
7411 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7412   echo $ac_n "(cached) $ac_c" 1>&6
7413 else
7414   cat > conftest.$ac_ext <<EOF
7415 #line 7416 "configure"
7416 #include "confdefs.h"
7417 /* System header to define __stub macros and hopefully few prototypes,
7418     which can conflict with char $ac_func(); below.  */
7419 #include <assert.h>
7420 /* Override any gcc2 internal prototype to avoid an error.  */
7421 /* We use char because int might match the return type of a gcc2
7422     builtin and then its argument prototype would still apply.  */
7423 char $ac_func();
7424
7425 int main() {
7426
7427 /* The GNU C library defines this for functions which it implements
7428     to always fail with ENOSYS.  Some functions are actually named
7429     something starting with __ and the normal name is an alias.  */
7430 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7431 choke me
7432 #else
7433 $ac_func();
7434 #endif
7435
7436 ; return 0; }
7437 EOF
7438 if { (eval echo configure:7439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7439   rm -rf conftest*
7440   eval "ac_cv_func_$ac_func=yes"
7441 else
7442   echo "configure: failed program was:" >&5
7443   cat conftest.$ac_ext >&5
7444   rm -rf conftest*
7445   eval "ac_cv_func_$ac_func=no"
7446 fi
7447 rm -f conftest*
7448 fi
7449
7450 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7451   echo "$ac_t""yes" 1>&6
7452     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7453   cat >> confdefs.h <<EOF
7454 #define $ac_tr_func 1
7455 EOF
7456  
7457 else
7458   echo "$ac_t""no" 1>&6
7459 fi
7460 done
7461  ;;
7462   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7463 echo "configure:7464: checking for getspnam in -lsec" >&5
7464 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7465 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7466   echo $ac_n "(cached) $ac_c" 1>&6
7467 else
7468   ac_save_LIBS="$LIBS"
7469 LIBS="-lsec  $LIBS"
7470 cat > conftest.$ac_ext <<EOF
7471 #line 7472 "configure"
7472 #include "confdefs.h"
7473 /* Override any gcc2 internal prototype to avoid an error.  */
7474 /* We use char because int might match the return type of a gcc2
7475     builtin and then its argument prototype would still apply.  */
7476 char getspnam();
7477
7478 int main() {
7479 getspnam()
7480 ; return 0; }
7481 EOF
7482 if { (eval echo configure:7483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7483   rm -rf conftest*
7484   eval "ac_cv_lib_$ac_lib_var=yes"
7485 else
7486   echo "configure: failed program was:" >&5
7487   cat conftest.$ac_ext >&5
7488   rm -rf conftest*
7489   eval "ac_cv_lib_$ac_lib_var=no"
7490 fi
7491 rm -f conftest*
7492 LIBS="$ac_save_LIBS"
7493
7494 fi
7495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7496   echo "$ac_t""yes" 1>&6
7497     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7498     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7499   cat >> confdefs.h <<EOF
7500 #define $ac_tr_lib 1
7501 EOF
7502
7503   LIBS="-lsec $LIBS"
7504
7505 else
7506   echo "$ac_t""no" 1>&6
7507 fi
7508  
7509      for ac_func in getspnam
7510 do
7511 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7512 echo "configure:7513: checking for $ac_func" >&5
7513 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7514   echo $ac_n "(cached) $ac_c" 1>&6
7515 else
7516   cat > conftest.$ac_ext <<EOF
7517 #line 7518 "configure"
7518 #include "confdefs.h"
7519 /* System header to define __stub macros and hopefully few prototypes,
7520     which can conflict with char $ac_func(); below.  */
7521 #include <assert.h>
7522 /* Override any gcc2 internal prototype to avoid an error.  */
7523 /* We use char because int might match the return type of a gcc2
7524     builtin and then its argument prototype would still apply.  */
7525 char $ac_func();
7526
7527 int main() {
7528
7529 /* The GNU C library defines this for functions which it implements
7530     to always fail with ENOSYS.  Some functions are actually named
7531     something starting with __ and the normal name is an alias.  */
7532 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7533 choke me
7534 #else
7535 $ac_func();
7536 #endif
7537
7538 ; return 0; }
7539 EOF
7540 if { (eval echo configure:7541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7541   rm -rf conftest*
7542   eval "ac_cv_func_$ac_func=yes"
7543 else
7544   echo "configure: failed program was:" >&5
7545   cat conftest.$ac_ext >&5
7546   rm -rf conftest*
7547   eval "ac_cv_func_$ac_func=no"
7548 fi
7549 rm -f conftest*
7550 fi
7551
7552 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7553   echo "$ac_t""yes" 1>&6
7554     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7555   cat >> confdefs.h <<EOF
7556 #define $ac_tr_func 1
7557 EOF
7558  
7559 else
7560   echo "$ac_t""no" 1>&6
7561 fi
7562 done
7563
7564   ;;
7565   esac
7566
7567
7568 case "$LIBS" in
7569   *-lsecurity*) for ac_func in bigcrypt
7570 do
7571 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7572 echo "configure:7573: checking for $ac_func" >&5
7573 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7574   echo $ac_n "(cached) $ac_c" 1>&6
7575 else
7576   cat > conftest.$ac_ext <<EOF
7577 #line 7578 "configure"
7578 #include "confdefs.h"
7579 /* System header to define __stub macros and hopefully few prototypes,
7580     which can conflict with char $ac_func(); below.  */
7581 #include <assert.h>
7582 /* Override any gcc2 internal prototype to avoid an error.  */
7583 /* We use char because int might match the return type of a gcc2
7584     builtin and then its argument prototype would still apply.  */
7585 char $ac_func();
7586
7587 int main() {
7588
7589 /* The GNU C library defines this for functions which it implements
7590     to always fail with ENOSYS.  Some functions are actually named
7591     something starting with __ and the normal name is an alias.  */
7592 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7593 choke me
7594 #else
7595 $ac_func();
7596 #endif
7597
7598 ; return 0; }
7599 EOF
7600 if { (eval echo configure:7601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7601   rm -rf conftest*
7602   eval "ac_cv_func_$ac_func=yes"
7603 else
7604   echo "configure: failed program was:" >&5
7605   cat conftest.$ac_ext >&5
7606   rm -rf conftest*
7607   eval "ac_cv_func_$ac_func=no"
7608 fi
7609 rm -f conftest*
7610 fi
7611
7612 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7613   echo "$ac_t""yes" 1>&6
7614     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7615   cat >> confdefs.h <<EOF
7616 #define $ac_tr_func 1
7617 EOF
7618  
7619 else
7620   echo "$ac_t""no" 1>&6
7621 fi
7622 done
7623  ;;
7624   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7625 echo "configure:7626: checking for bigcrypt in -lsecurity" >&5
7626 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7627 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7628   echo $ac_n "(cached) $ac_c" 1>&6
7629 else
7630   ac_save_LIBS="$LIBS"
7631 LIBS="-lsecurity  $LIBS"
7632 cat > conftest.$ac_ext <<EOF
7633 #line 7634 "configure"
7634 #include "confdefs.h"
7635 /* Override any gcc2 internal prototype to avoid an error.  */
7636 /* We use char because int might match the return type of a gcc2
7637     builtin and then its argument prototype would still apply.  */
7638 char bigcrypt();
7639
7640 int main() {
7641 bigcrypt()
7642 ; return 0; }
7643 EOF
7644 if { (eval echo configure:7645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7645   rm -rf conftest*
7646   eval "ac_cv_lib_$ac_lib_var=yes"
7647 else
7648   echo "configure: failed program was:" >&5
7649   cat conftest.$ac_ext >&5
7650   rm -rf conftest*
7651   eval "ac_cv_lib_$ac_lib_var=no"
7652 fi
7653 rm -f conftest*
7654 LIBS="$ac_save_LIBS"
7655
7656 fi
7657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7658   echo "$ac_t""yes" 1>&6
7659     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7660     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7661   cat >> confdefs.h <<EOF
7662 #define $ac_tr_lib 1
7663 EOF
7664
7665   LIBS="-lsecurity $LIBS"
7666
7667 else
7668   echo "$ac_t""no" 1>&6
7669 fi
7670  
7671      for ac_func in bigcrypt
7672 do
7673 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7674 echo "configure:7675: checking for $ac_func" >&5
7675 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7676   echo $ac_n "(cached) $ac_c" 1>&6
7677 else
7678   cat > conftest.$ac_ext <<EOF
7679 #line 7680 "configure"
7680 #include "confdefs.h"
7681 /* System header to define __stub macros and hopefully few prototypes,
7682     which can conflict with char $ac_func(); below.  */
7683 #include <assert.h>
7684 /* Override any gcc2 internal prototype to avoid an error.  */
7685 /* We use char because int might match the return type of a gcc2
7686     builtin and then its argument prototype would still apply.  */
7687 char $ac_func();
7688
7689 int main() {
7690
7691 /* The GNU C library defines this for functions which it implements
7692     to always fail with ENOSYS.  Some functions are actually named
7693     something starting with __ and the normal name is an alias.  */
7694 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7695 choke me
7696 #else
7697 $ac_func();
7698 #endif
7699
7700 ; return 0; }
7701 EOF
7702 if { (eval echo configure:7703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7703   rm -rf conftest*
7704   eval "ac_cv_func_$ac_func=yes"
7705 else
7706   echo "configure: failed program was:" >&5
7707   cat conftest.$ac_ext >&5
7708   rm -rf conftest*
7709   eval "ac_cv_func_$ac_func=no"
7710 fi
7711 rm -f conftest*
7712 fi
7713
7714 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7715   echo "$ac_t""yes" 1>&6
7716     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7717   cat >> confdefs.h <<EOF
7718 #define $ac_tr_func 1
7719 EOF
7720  
7721 else
7722   echo "$ac_t""no" 1>&6
7723 fi
7724 done
7725
7726   ;;
7727   esac
7728
7729 case "$LIBS" in
7730   *-lsec*) for ac_func in bigcrypt
7731 do
7732 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7733 echo "configure:7734: checking for $ac_func" >&5
7734 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7735   echo $ac_n "(cached) $ac_c" 1>&6
7736 else
7737   cat > conftest.$ac_ext <<EOF
7738 #line 7739 "configure"
7739 #include "confdefs.h"
7740 /* System header to define __stub macros and hopefully few prototypes,
7741     which can conflict with char $ac_func(); below.  */
7742 #include <assert.h>
7743 /* Override any gcc2 internal prototype to avoid an error.  */
7744 /* We use char because int might match the return type of a gcc2
7745     builtin and then its argument prototype would still apply.  */
7746 char $ac_func();
7747
7748 int main() {
7749
7750 /* The GNU C library defines this for functions which it implements
7751     to always fail with ENOSYS.  Some functions are actually named
7752     something starting with __ and the normal name is an alias.  */
7753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7754 choke me
7755 #else
7756 $ac_func();
7757 #endif
7758
7759 ; return 0; }
7760 EOF
7761 if { (eval echo configure:7762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7762   rm -rf conftest*
7763   eval "ac_cv_func_$ac_func=yes"
7764 else
7765   echo "configure: failed program was:" >&5
7766   cat conftest.$ac_ext >&5
7767   rm -rf conftest*
7768   eval "ac_cv_func_$ac_func=no"
7769 fi
7770 rm -f conftest*
7771 fi
7772
7773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7774   echo "$ac_t""yes" 1>&6
7775     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7776   cat >> confdefs.h <<EOF
7777 #define $ac_tr_func 1
7778 EOF
7779  
7780 else
7781   echo "$ac_t""no" 1>&6
7782 fi
7783 done
7784  ;;
7785   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7786 echo "configure:7787: checking for bigcrypt in -lsec" >&5
7787 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7788 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7789   echo $ac_n "(cached) $ac_c" 1>&6
7790 else
7791   ac_save_LIBS="$LIBS"
7792 LIBS="-lsec  $LIBS"
7793 cat > conftest.$ac_ext <<EOF
7794 #line 7795 "configure"
7795 #include "confdefs.h"
7796 /* Override any gcc2 internal prototype to avoid an error.  */
7797 /* We use char because int might match the return type of a gcc2
7798     builtin and then its argument prototype would still apply.  */
7799 char bigcrypt();
7800
7801 int main() {
7802 bigcrypt()
7803 ; return 0; }
7804 EOF
7805 if { (eval echo configure:7806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7806   rm -rf conftest*
7807   eval "ac_cv_lib_$ac_lib_var=yes"
7808 else
7809   echo "configure: failed program was:" >&5
7810   cat conftest.$ac_ext >&5
7811   rm -rf conftest*
7812   eval "ac_cv_lib_$ac_lib_var=no"
7813 fi
7814 rm -f conftest*
7815 LIBS="$ac_save_LIBS"
7816
7817 fi
7818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7819   echo "$ac_t""yes" 1>&6
7820     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7821     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7822   cat >> confdefs.h <<EOF
7823 #define $ac_tr_lib 1
7824 EOF
7825
7826   LIBS="-lsec $LIBS"
7827
7828 else
7829   echo "$ac_t""no" 1>&6
7830 fi
7831  
7832      for ac_func in bigcrypt
7833 do
7834 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7835 echo "configure:7836: checking for $ac_func" >&5
7836 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7837   echo $ac_n "(cached) $ac_c" 1>&6
7838 else
7839   cat > conftest.$ac_ext <<EOF
7840 #line 7841 "configure"
7841 #include "confdefs.h"
7842 /* System header to define __stub macros and hopefully few prototypes,
7843     which can conflict with char $ac_func(); below.  */
7844 #include <assert.h>
7845 /* Override any gcc2 internal prototype to avoid an error.  */
7846 /* We use char because int might match the return type of a gcc2
7847     builtin and then its argument prototype would still apply.  */
7848 char $ac_func();
7849
7850 int main() {
7851
7852 /* The GNU C library defines this for functions which it implements
7853     to always fail with ENOSYS.  Some functions are actually named
7854     something starting with __ and the normal name is an alias.  */
7855 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7856 choke me
7857 #else
7858 $ac_func();
7859 #endif
7860
7861 ; return 0; }
7862 EOF
7863 if { (eval echo configure:7864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7864   rm -rf conftest*
7865   eval "ac_cv_func_$ac_func=yes"
7866 else
7867   echo "configure: failed program was:" >&5
7868   cat conftest.$ac_ext >&5
7869   rm -rf conftest*
7870   eval "ac_cv_func_$ac_func=no"
7871 fi
7872 rm -f conftest*
7873 fi
7874
7875 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7876   echo "$ac_t""yes" 1>&6
7877     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7878   cat >> confdefs.h <<EOF
7879 #define $ac_tr_func 1
7880 EOF
7881  
7882 else
7883   echo "$ac_t""no" 1>&6
7884 fi
7885 done
7886
7887   ;;
7888   esac
7889
7890
7891 case "$LIBS" in
7892   *-lsecurity*) for ac_func in getprpwnam
7893 do
7894 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7895 echo "configure:7896: checking for $ac_func" >&5
7896 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7897   echo $ac_n "(cached) $ac_c" 1>&6
7898 else
7899   cat > conftest.$ac_ext <<EOF
7900 #line 7901 "configure"
7901 #include "confdefs.h"
7902 /* System header to define __stub macros and hopefully few prototypes,
7903     which can conflict with char $ac_func(); below.  */
7904 #include <assert.h>
7905 /* Override any gcc2 internal prototype to avoid an error.  */
7906 /* We use char because int might match the return type of a gcc2
7907     builtin and then its argument prototype would still apply.  */
7908 char $ac_func();
7909
7910 int main() {
7911
7912 /* The GNU C library defines this for functions which it implements
7913     to always fail with ENOSYS.  Some functions are actually named
7914     something starting with __ and the normal name is an alias.  */
7915 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7916 choke me
7917 #else
7918 $ac_func();
7919 #endif
7920
7921 ; return 0; }
7922 EOF
7923 if { (eval echo configure:7924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7924   rm -rf conftest*
7925   eval "ac_cv_func_$ac_func=yes"
7926 else
7927   echo "configure: failed program was:" >&5
7928   cat conftest.$ac_ext >&5
7929   rm -rf conftest*
7930   eval "ac_cv_func_$ac_func=no"
7931 fi
7932 rm -f conftest*
7933 fi
7934
7935 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7936   echo "$ac_t""yes" 1>&6
7937     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7938   cat >> confdefs.h <<EOF
7939 #define $ac_tr_func 1
7940 EOF
7941  
7942 else
7943   echo "$ac_t""no" 1>&6
7944 fi
7945 done
7946  ;;
7947   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
7948 echo "configure:7949: checking for getprpwnam in -lsecurity" >&5
7949 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
7950 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7951   echo $ac_n "(cached) $ac_c" 1>&6
7952 else
7953   ac_save_LIBS="$LIBS"
7954 LIBS="-lsecurity  $LIBS"
7955 cat > conftest.$ac_ext <<EOF
7956 #line 7957 "configure"
7957 #include "confdefs.h"
7958 /* Override any gcc2 internal prototype to avoid an error.  */
7959 /* We use char because int might match the return type of a gcc2
7960     builtin and then its argument prototype would still apply.  */
7961 char getprpwnam();
7962
7963 int main() {
7964 getprpwnam()
7965 ; return 0; }
7966 EOF
7967 if { (eval echo configure:7968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7968   rm -rf conftest*
7969   eval "ac_cv_lib_$ac_lib_var=yes"
7970 else
7971   echo "configure: failed program was:" >&5
7972   cat conftest.$ac_ext >&5
7973   rm -rf conftest*
7974   eval "ac_cv_lib_$ac_lib_var=no"
7975 fi
7976 rm -f conftest*
7977 LIBS="$ac_save_LIBS"
7978
7979 fi
7980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7981   echo "$ac_t""yes" 1>&6
7982     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7983     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7984   cat >> confdefs.h <<EOF
7985 #define $ac_tr_lib 1
7986 EOF
7987
7988   LIBS="-lsecurity $LIBS"
7989
7990 else
7991   echo "$ac_t""no" 1>&6
7992 fi
7993  
7994      for ac_func in getprpwnam
7995 do
7996 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7997 echo "configure:7998: checking for $ac_func" >&5
7998 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7999   echo $ac_n "(cached) $ac_c" 1>&6
8000 else
8001   cat > conftest.$ac_ext <<EOF
8002 #line 8003 "configure"
8003 #include "confdefs.h"
8004 /* System header to define __stub macros and hopefully few prototypes,
8005     which can conflict with char $ac_func(); below.  */
8006 #include <assert.h>
8007 /* Override any gcc2 internal prototype to avoid an error.  */
8008 /* We use char because int might match the return type of a gcc2
8009     builtin and then its argument prototype would still apply.  */
8010 char $ac_func();
8011
8012 int main() {
8013
8014 /* The GNU C library defines this for functions which it implements
8015     to always fail with ENOSYS.  Some functions are actually named
8016     something starting with __ and the normal name is an alias.  */
8017 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8018 choke me
8019 #else
8020 $ac_func();
8021 #endif
8022
8023 ; return 0; }
8024 EOF
8025 if { (eval echo configure:8026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8026   rm -rf conftest*
8027   eval "ac_cv_func_$ac_func=yes"
8028 else
8029   echo "configure: failed program was:" >&5
8030   cat conftest.$ac_ext >&5
8031   rm -rf conftest*
8032   eval "ac_cv_func_$ac_func=no"
8033 fi
8034 rm -f conftest*
8035 fi
8036
8037 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8038   echo "$ac_t""yes" 1>&6
8039     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8040   cat >> confdefs.h <<EOF
8041 #define $ac_tr_func 1
8042 EOF
8043  
8044 else
8045   echo "$ac_t""no" 1>&6
8046 fi
8047 done
8048
8049   ;;
8050   esac
8051
8052 case "$LIBS" in
8053   *-lsec*) for ac_func in getprpwnam
8054 do
8055 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8056 echo "configure:8057: checking for $ac_func" >&5
8057 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8058   echo $ac_n "(cached) $ac_c" 1>&6
8059 else
8060   cat > conftest.$ac_ext <<EOF
8061 #line 8062 "configure"
8062 #include "confdefs.h"
8063 /* System header to define __stub macros and hopefully few prototypes,
8064     which can conflict with char $ac_func(); below.  */
8065 #include <assert.h>
8066 /* Override any gcc2 internal prototype to avoid an error.  */
8067 /* We use char because int might match the return type of a gcc2
8068     builtin and then its argument prototype would still apply.  */
8069 char $ac_func();
8070
8071 int main() {
8072
8073 /* The GNU C library defines this for functions which it implements
8074     to always fail with ENOSYS.  Some functions are actually named
8075     something starting with __ and the normal name is an alias.  */
8076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8077 choke me
8078 #else
8079 $ac_func();
8080 #endif
8081
8082 ; return 0; }
8083 EOF
8084 if { (eval echo configure:8085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8085   rm -rf conftest*
8086   eval "ac_cv_func_$ac_func=yes"
8087 else
8088   echo "configure: failed program was:" >&5
8089   cat conftest.$ac_ext >&5
8090   rm -rf conftest*
8091   eval "ac_cv_func_$ac_func=no"
8092 fi
8093 rm -f conftest*
8094 fi
8095
8096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8097   echo "$ac_t""yes" 1>&6
8098     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8099   cat >> confdefs.h <<EOF
8100 #define $ac_tr_func 1
8101 EOF
8102  
8103 else
8104   echo "$ac_t""no" 1>&6
8105 fi
8106 done
8107  ;;
8108   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8109 echo "configure:8110: checking for getprpwnam in -lsec" >&5
8110 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8111 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8112   echo $ac_n "(cached) $ac_c" 1>&6
8113 else
8114   ac_save_LIBS="$LIBS"
8115 LIBS="-lsec  $LIBS"
8116 cat > conftest.$ac_ext <<EOF
8117 #line 8118 "configure"
8118 #include "confdefs.h"
8119 /* Override any gcc2 internal prototype to avoid an error.  */
8120 /* We use char because int might match the return type of a gcc2
8121     builtin and then its argument prototype would still apply.  */
8122 char getprpwnam();
8123
8124 int main() {
8125 getprpwnam()
8126 ; return 0; }
8127 EOF
8128 if { (eval echo configure:8129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8129   rm -rf conftest*
8130   eval "ac_cv_lib_$ac_lib_var=yes"
8131 else
8132   echo "configure: failed program was:" >&5
8133   cat conftest.$ac_ext >&5
8134   rm -rf conftest*
8135   eval "ac_cv_lib_$ac_lib_var=no"
8136 fi
8137 rm -f conftest*
8138 LIBS="$ac_save_LIBS"
8139
8140 fi
8141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8142   echo "$ac_t""yes" 1>&6
8143     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8144     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8145   cat >> confdefs.h <<EOF
8146 #define $ac_tr_lib 1
8147 EOF
8148
8149   LIBS="-lsec $LIBS"
8150
8151 else
8152   echo "$ac_t""no" 1>&6
8153 fi
8154  
8155      for ac_func in getprpwnam
8156 do
8157 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8158 echo "configure:8159: checking for $ac_func" >&5
8159 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8160   echo $ac_n "(cached) $ac_c" 1>&6
8161 else
8162   cat > conftest.$ac_ext <<EOF
8163 #line 8164 "configure"
8164 #include "confdefs.h"
8165 /* System header to define __stub macros and hopefully few prototypes,
8166     which can conflict with char $ac_func(); below.  */
8167 #include <assert.h>
8168 /* Override any gcc2 internal prototype to avoid an error.  */
8169 /* We use char because int might match the return type of a gcc2
8170     builtin and then its argument prototype would still apply.  */
8171 char $ac_func();
8172
8173 int main() {
8174
8175 /* The GNU C library defines this for functions which it implements
8176     to always fail with ENOSYS.  Some functions are actually named
8177     something starting with __ and the normal name is an alias.  */
8178 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8179 choke me
8180 #else
8181 $ac_func();
8182 #endif
8183
8184 ; return 0; }
8185 EOF
8186 if { (eval echo configure:8187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8187   rm -rf conftest*
8188   eval "ac_cv_func_$ac_func=yes"
8189 else
8190   echo "configure: failed program was:" >&5
8191   cat conftest.$ac_ext >&5
8192   rm -rf conftest*
8193   eval "ac_cv_func_$ac_func=no"
8194 fi
8195 rm -f conftest*
8196 fi
8197
8198 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8199   echo "$ac_t""yes" 1>&6
8200     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8201   cat >> confdefs.h <<EOF
8202 #define $ac_tr_func 1
8203 EOF
8204  
8205 else
8206   echo "$ac_t""no" 1>&6
8207 fi
8208 done
8209
8210   ;;
8211   esac
8212
8213
8214 # this bit needs to be modified for each OS that is suported by
8215 # smbwrapper. You need to specify how to created a shared library and
8216 # how to compile C code to produce PIC object files
8217
8218 # these are the defaults, good for lots of systems
8219 HOST_OS="$host_os"
8220 LDSHFLAGS="-shared"
8221 SHLD="\${CC}"
8222 PICFLAG=""
8223 PICSUFFIX="po"
8224 POBAD_CC="#"
8225 SHLIBEXT="so"
8226 BLDSHARED="false"
8227
8228 # and these are for particular systems
8229 case "$host_os" in
8230                 *linux*)   cat >> confdefs.h <<\EOF
8231 #define LINUX 1
8232 EOF
8233
8234                         BLDSHARED="true"
8235                         LDSHFLAGS="-shared" 
8236                         PICFLAG="-fPIC"
8237                 ;;
8238                 *solaris*) cat >> confdefs.h <<\EOF
8239 #define SUNOS5 1
8240 EOF
8241
8242                         BLDSHARED="true"
8243                         LDSHFLAGS="-Wl,-h,\$@.so -G"
8244                         if test "${ac_cv_prog_CC}" = "gcc"; then
8245                                 PICFLAG="-fPIC"
8246                         else
8247                                 PICFLAG="-KPIC -xO4"
8248                                 POBAD_CC=""
8249                                 PICSUFFIX="po.o"
8250                         fi
8251                 ;;
8252                 *sunos*) cat >> confdefs.h <<\EOF
8253 #define SUNOS4 1
8254 EOF
8255
8256                         BLDSHARED="true"
8257                         LDSHFLAGS="-Wl,-h,\$@ -G"
8258                         PICFLAG="-KPIC -O2"   # Is this correct for SunOS
8259                 ;;
8260                 *bsd*)  BLDSHARED="true"
8261                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8262                         PICFLAG="-fPIC -O2"
8263                 ;;
8264                 *irix*) cat >> confdefs.h <<\EOF
8265 #define IRIX 1
8266 EOF
8267
8268                         case "$host_os" in
8269                         *irix6*) cat >> confdefs.h <<\EOF
8270 #define IRIX6 1
8271 EOF
8272
8273                         ;;
8274                         esac
8275                         ATTEMPT_WRAP32_BUILD=yes
8276                         BLDSHARED="true"
8277                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8278                         if test "${ac_cv_prog_CC}" = "gcc"; then
8279                                 PICFLAG="-fPIC"
8280                         else 
8281                                 PICFLAG="-KPIC"
8282                         fi
8283                 ;;
8284                 *aix*) cat >> confdefs.h <<\EOF
8285 #define AIX 1
8286 EOF
8287
8288                         BLDSHARED="true"
8289                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8290                         PICFLAG="-O2 -qmaxmem=6000"
8291                 ;;
8292                 *hpux*) cat >> confdefs.h <<\EOF
8293 #define HPUX 1
8294 EOF
8295
8296                         SHLIBEXT="sl"
8297                         # Use special PIC flags for the native HP-UX compiler.
8298                         if test $ac_cv_prog_cc_Ae = yes; then
8299                                 BLDSHARED="true"
8300                                 LDSHFLAGS="-b -z +h \$@"
8301                                 PICFLAG="+z"
8302                         fi
8303                 ;;
8304                 *qnx*) cat >> confdefs.h <<\EOF
8305 #define QNX 1
8306 EOF
8307 ;;
8308                 *osf*) cat >> confdefs.h <<\EOF
8309 #define OSF1 1
8310 EOF
8311
8312                         BLDSHARED="true"
8313                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8314                         PICFLAG="-fPIC"
8315                 ;;
8316                 *sco*) cat >> confdefs.h <<\EOF
8317 #define SCO 1
8318 EOF
8319 ;;
8320                 *unixware*) cat >> confdefs.h <<\EOF
8321 #define UNIXWARE 1
8322 EOF
8323
8324                         BLDSHARED="true"
8325                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8326                         PICFLAG="-KPIC"
8327                 ;;
8328                 *next2*) cat >> confdefs.h <<\EOF
8329 #define NEXT2 1
8330 EOF
8331 ;;
8332                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8333 set dummy groff; ac_word=$2
8334 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8335 echo "configure:8336: checking for $ac_word" >&5
8336 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8337   echo $ac_n "(cached) $ac_c" 1>&6
8338 else
8339   if test -n "$ROFF"; then
8340   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8341 else
8342   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8343   ac_dummy="$PATH"
8344   for ac_dir in $ac_dummy; do
8345     test -z "$ac_dir" && ac_dir=.
8346     if test -f $ac_dir/$ac_word; then
8347       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8348       break
8349     fi
8350   done
8351   IFS="$ac_save_ifs"
8352 fi
8353 fi
8354 ROFF="$ac_cv_prog_ROFF"
8355 if test -n "$ROFF"; then
8356   echo "$ac_t""$ROFF" 1>&6
8357 else
8358   echo "$ac_t""no" 1>&6
8359 fi
8360 ;;
8361                 *sysv4*)
8362                         case "$host" in
8363                                 *-univel-*)     if  test "$GCC" != yes ; then
8364                                                                         cat >> confdefs.h <<\EOF
8365 #define HAVE_MEMSET 1
8366 EOF
8367
8368                                                                 fi
8369                                                                 LDSHFLAGS="-G"
8370                                 ;;
8371                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8372 #define RELIANTUNIX 1
8373 EOF
8374 ;;
8375                         esac
8376                         ;;
8377                 *sysv5*)
8378                         if  test "$GCC" != yes ; then
8379                                 cat >> confdefs.h <<\EOF
8380 #define HAVE_MEMSET 1
8381 EOF
8382
8383                         fi
8384                         LDSHFLAGS="-G"
8385                         ;;
8386 esac
8387
8388 ################
8389
8390 echo $ac_n "checking for long long""... $ac_c" 1>&6
8391 echo "configure:8392: checking for long long" >&5
8392 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8393   echo $ac_n "(cached) $ac_c" 1>&6
8394 else
8395   
8396 if test "$cross_compiling" = yes; then
8397   samba_cv_have_longlong=cross
8398 else
8399   cat > conftest.$ac_ext <<EOF
8400 #line 8401 "configure"
8401 #include "confdefs.h"
8402 #include <stdio.h>
8403 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8404 EOF
8405 if { (eval echo configure:8406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8406 then
8407   samba_cv_have_longlong=yes
8408 else
8409   echo "configure: failed program was:" >&5
8410   cat conftest.$ac_ext >&5
8411   rm -fr conftest*
8412   samba_cv_have_longlong=no
8413 fi
8414 rm -fr conftest*
8415 fi
8416
8417 fi
8418
8419 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8420 if test x"$samba_cv_have_longlong" = x"yes"; then
8421     cat >> confdefs.h <<\EOF
8422 #define HAVE_LONGLONG 1
8423 EOF
8424
8425 fi
8426
8427 #
8428 # Check if the compiler supports the LL prefix on long long integers.
8429 # AIX needs this.
8430
8431 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8432 echo "configure:8433: checking for LL suffix on long long integers" >&5
8433 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8434   echo $ac_n "(cached) $ac_c" 1>&6
8435 else
8436   
8437     cat > conftest.$ac_ext <<EOF
8438 #line 8439 "configure"
8439 #include "confdefs.h"
8440 #include <stdio.h>
8441 int main() {
8442 long long i = 0x8000000000LL
8443 ; return 0; }
8444 EOF
8445 if { (eval echo configure:8446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8446   rm -rf conftest*
8447   samba_cv_compiler_supports_ll=yes
8448 else
8449   echo "configure: failed program was:" >&5
8450   cat conftest.$ac_ext >&5
8451   rm -rf conftest*
8452   samba_cv_compiler_supports_ll=no
8453 fi
8454 rm -f conftest*
8455 fi
8456
8457 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8458 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8459    cat >> confdefs.h <<\EOF
8460 #define COMPILER_SUPPORTS_LL 1
8461 EOF
8462
8463 fi
8464
8465   
8466 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8467 echo "configure:8468: checking for 64 bit off_t" >&5
8468 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8469   echo $ac_n "(cached) $ac_c" 1>&6
8470 else
8471   
8472 if test "$cross_compiling" = yes; then
8473   samba_cv_SIZEOF_OFF_T=cross
8474 else
8475   cat > conftest.$ac_ext <<EOF
8476 #line 8477 "configure"
8477 #include "confdefs.h"
8478 #include <stdio.h>
8479 #include <sys/stat.h>
8480 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8481 EOF
8482 if { (eval echo configure:8483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8483 then
8484   samba_cv_SIZEOF_OFF_T=yes
8485 else
8486   echo "configure: failed program was:" >&5
8487   cat conftest.$ac_ext >&5
8488   rm -fr conftest*
8489   samba_cv_SIZEOF_OFF_T=no
8490 fi
8491 rm -fr conftest*
8492 fi
8493
8494 fi
8495
8496 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8497 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8498     cat >> confdefs.h <<\EOF
8499 #define SIZEOF_OFF_T 8
8500 EOF
8501
8502 fi
8503
8504 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8505 echo "configure:8506: checking for off64_t" >&5
8506 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8507   echo $ac_n "(cached) $ac_c" 1>&6
8508 else
8509   
8510 if test "$cross_compiling" = yes; then
8511   samba_cv_HAVE_OFF64_T=cross
8512 else
8513   cat > conftest.$ac_ext <<EOF
8514 #line 8515 "configure"
8515 #include "confdefs.h"
8516
8517 #if defined(HAVE_UNISTD_H)
8518 #include <unistd.h>
8519 #endif
8520 #include <stdio.h>
8521 #include <sys/stat.h>
8522 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8523 EOF
8524 if { (eval echo configure:8525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8525 then
8526   samba_cv_HAVE_OFF64_T=yes
8527 else
8528   echo "configure: failed program was:" >&5
8529   cat conftest.$ac_ext >&5
8530   rm -fr conftest*
8531   samba_cv_HAVE_OFF64_T=no
8532 fi
8533 rm -fr conftest*
8534 fi
8535
8536 fi
8537
8538 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8539 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8540     cat >> confdefs.h <<\EOF
8541 #define HAVE_OFF64_T 1
8542 EOF
8543
8544 fi
8545
8546 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8547 echo "configure:8548: checking for 64 bit ino_t" >&5
8548 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8549   echo $ac_n "(cached) $ac_c" 1>&6
8550 else
8551   
8552 if test "$cross_compiling" = yes; then
8553   samba_cv_SIZEOF_INO_T=cross
8554 else
8555   cat > conftest.$ac_ext <<EOF
8556 #line 8557 "configure"
8557 #include "confdefs.h"
8558 #include <stdio.h>
8559 #include <sys/stat.h>
8560 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8561 EOF
8562 if { (eval echo configure:8563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8563 then
8564   samba_cv_SIZEOF_INO_T=yes
8565 else
8566   echo "configure: failed program was:" >&5
8567   cat conftest.$ac_ext >&5
8568   rm -fr conftest*
8569   samba_cv_SIZEOF_INO_T=no
8570 fi
8571 rm -fr conftest*
8572 fi
8573
8574 fi
8575
8576 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8577 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8578     cat >> confdefs.h <<\EOF
8579 #define SIZEOF_INO_T 8
8580 EOF
8581
8582 fi
8583
8584 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8585 echo "configure:8586: checking for ino64_t" >&5
8586 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8587   echo $ac_n "(cached) $ac_c" 1>&6
8588 else
8589   
8590 if test "$cross_compiling" = yes; then
8591   samba_cv_HAVE_INO64_T=cross
8592 else
8593   cat > conftest.$ac_ext <<EOF
8594 #line 8595 "configure"
8595 #include "confdefs.h"
8596
8597 #if defined(HAVE_UNISTD_H)
8598 #include <unistd.h>
8599 #endif
8600 #include <stdio.h>
8601 #include <sys/stat.h>
8602 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8603 EOF
8604 if { (eval echo configure:8605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8605 then
8606   samba_cv_HAVE_INO64_T=yes
8607 else
8608   echo "configure: failed program was:" >&5
8609   cat conftest.$ac_ext >&5
8610   rm -fr conftest*
8611   samba_cv_HAVE_INO64_T=no
8612 fi
8613 rm -fr conftest*
8614 fi
8615
8616 fi
8617
8618 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8619 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8620     cat >> confdefs.h <<\EOF
8621 #define HAVE_INO64_T 1
8622 EOF
8623
8624 fi
8625
8626 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8627 echo "configure:8628: checking for struct dirent64" >&5
8628 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8629   echo $ac_n "(cached) $ac_c" 1>&6
8630 else
8631   
8632 cat > conftest.$ac_ext <<EOF
8633 #line 8634 "configure"
8634 #include "confdefs.h"
8635
8636 #if defined(HAVE_UNISTD_H)
8637 #include <unistd.h>
8638 #endif
8639 #include <sys/types.h>
8640 #include <dirent.h>
8641 int main() {
8642 struct dirent64 de;
8643 ; return 0; }
8644 EOF
8645 if { (eval echo configure:8646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8646   rm -rf conftest*
8647   samba_cv_HAVE_STRUCT_DIRENT64=yes
8648 else
8649   echo "configure: failed program was:" >&5
8650   cat conftest.$ac_ext >&5
8651   rm -rf conftest*
8652   samba_cv_HAVE_STRUCT_DIRENT64=no
8653 fi
8654 rm -f conftest*
8655 fi
8656
8657 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8658 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8659     cat >> confdefs.h <<\EOF
8660 #define HAVE_STRUCT_DIRENT64 1
8661 EOF
8662
8663 fi
8664
8665 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8666 echo "configure:8667: checking for unsigned char" >&5
8667 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8668   echo $ac_n "(cached) $ac_c" 1>&6
8669 else
8670   
8671 if test "$cross_compiling" = yes; then
8672   samba_cv_HAVE_UNSIGNED_CHAR=cross
8673 else
8674   cat > conftest.$ac_ext <<EOF
8675 #line 8676 "configure"
8676 #include "confdefs.h"
8677 #include <stdio.h>
8678 main() { char c; c=250; exit((c > 0)?0:1); }
8679 EOF
8680 if { (eval echo configure:8681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8681 then
8682   samba_cv_HAVE_UNSIGNED_CHAR=yes
8683 else
8684   echo "configure: failed program was:" >&5
8685   cat conftest.$ac_ext >&5
8686   rm -fr conftest*
8687   samba_cv_HAVE_UNSIGNED_CHAR=no
8688 fi
8689 rm -fr conftest*
8690 fi
8691
8692 fi
8693
8694 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8695 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8696     cat >> confdefs.h <<\EOF
8697 #define HAVE_UNSIGNED_CHAR 1
8698 EOF
8699
8700 fi
8701
8702 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8703 echo "configure:8704: checking for sin_len in sock" >&5
8704 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8705   echo $ac_n "(cached) $ac_c" 1>&6
8706 else
8707   
8708 cat > conftest.$ac_ext <<EOF
8709 #line 8710 "configure"
8710 #include "confdefs.h"
8711 #include <sys/types.h>
8712 #include <sys/socket.h>
8713 #include <netinet/in.h>
8714 int main() {
8715 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8716 ; return 0; }
8717 EOF
8718 if { (eval echo configure:8719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8719   rm -rf conftest*
8720   samba_cv_HAVE_SOCK_SIN_LEN=yes
8721 else
8722   echo "configure: failed program was:" >&5
8723   cat conftest.$ac_ext >&5
8724   rm -rf conftest*
8725   samba_cv_HAVE_SOCK_SIN_LEN=no
8726 fi
8727 rm -f conftest*
8728 fi
8729
8730 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8731 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8732     cat >> confdefs.h <<\EOF
8733 #define HAVE_SOCK_SIN_LEN 1
8734 EOF
8735
8736 fi
8737
8738 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8739 echo "configure:8740: checking whether seekdir returns void" >&5
8740 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8741   echo $ac_n "(cached) $ac_c" 1>&6
8742 else
8743   
8744 cat > conftest.$ac_ext <<EOF
8745 #line 8746 "configure"
8746 #include "confdefs.h"
8747 #include <sys/types.h>
8748 #include <dirent.h>
8749 void seekdir(DIR *d, long loc) { return; }
8750 int main() {
8751 return 0;
8752 ; return 0; }
8753 EOF
8754 if { (eval echo configure:8755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8755   rm -rf conftest*
8756   samba_cv_SEEKDIR_RETURNS_VOID=yes
8757 else
8758   echo "configure: failed program was:" >&5
8759   cat conftest.$ac_ext >&5
8760   rm -rf conftest*
8761   samba_cv_SEEKDIR_RETURNS_VOID=no
8762 fi
8763 rm -f conftest*
8764 fi
8765
8766 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
8767 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
8768     cat >> confdefs.h <<\EOF
8769 #define SEEKDIR_RETURNS_VOID 1
8770 EOF
8771
8772 fi
8773
8774 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
8775 echo "configure:8776: checking for __FILE__ macro" >&5
8776 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
8777   echo $ac_n "(cached) $ac_c" 1>&6
8778 else
8779   
8780 cat > conftest.$ac_ext <<EOF
8781 #line 8782 "configure"
8782 #include "confdefs.h"
8783 #include <stdio.h>
8784 int main() {
8785 printf("%s\n", __FILE__);
8786 ; return 0; }
8787 EOF
8788 if { (eval echo configure:8789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8789   rm -rf conftest*
8790   samba_cv_HAVE_FILE_MACRO=yes
8791 else
8792   echo "configure: failed program was:" >&5
8793   cat conftest.$ac_ext >&5
8794   rm -rf conftest*
8795   samba_cv_HAVE_FILE_MACRO=no
8796 fi
8797 rm -f conftest*
8798 fi
8799
8800 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
8801 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
8802     cat >> confdefs.h <<\EOF
8803 #define HAVE_FILE_MACRO 1
8804 EOF
8805
8806 fi
8807
8808 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
8809 echo "configure:8810: checking for __FUNCTION__ macro" >&5
8810 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
8811   echo $ac_n "(cached) $ac_c" 1>&6
8812 else
8813   
8814 cat > conftest.$ac_ext <<EOF
8815 #line 8816 "configure"
8816 #include "confdefs.h"
8817 #include <stdio.h>
8818 int main() {
8819 printf("%s\n", __FUNCTION__);
8820 ; return 0; }
8821 EOF
8822 if { (eval echo configure:8823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8823   rm -rf conftest*
8824   samba_cv_HAVE_FUNCTION_MACRO=yes
8825 else
8826   echo "configure: failed program was:" >&5
8827   cat conftest.$ac_ext >&5
8828   rm -rf conftest*
8829   samba_cv_HAVE_FUNCTION_MACRO=no
8830 fi
8831 rm -f conftest*
8832 fi
8833
8834 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
8835 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
8836     cat >> confdefs.h <<\EOF
8837 #define HAVE_FUNCTION_MACRO 1
8838 EOF
8839
8840 fi
8841
8842 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
8843 echo "configure:8844: checking if gettimeofday takes tz argument" >&5
8844 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
8845   echo $ac_n "(cached) $ac_c" 1>&6
8846 else
8847   
8848 if test "$cross_compiling" = yes; then
8849   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
8850 else
8851   cat > conftest.$ac_ext <<EOF
8852 #line 8853 "configure"
8853 #include "confdefs.h"
8854
8855 #include <sys/time.h>
8856 #include <unistd.h>
8857 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
8858 EOF
8859 if { (eval echo configure:8860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8860 then
8861   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
8862 else
8863   echo "configure: failed program was:" >&5
8864   cat conftest.$ac_ext >&5
8865   rm -fr conftest*
8866   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
8867 fi
8868 rm -fr conftest*
8869 fi
8870
8871 fi
8872
8873 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
8874 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
8875     cat >> confdefs.h <<\EOF
8876 #define HAVE_GETTIMEOFDAY_TZ 1
8877 EOF
8878
8879 fi
8880
8881 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
8882 echo "configure:8883: checking for C99 vsnprintf" >&5
8883 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
8884   echo $ac_n "(cached) $ac_c" 1>&6
8885 else
8886   
8887 if test "$cross_compiling" = yes; then
8888   samba_cv_HAVE_C99_VSNPRINTF=cross
8889 else
8890   cat > conftest.$ac_ext <<EOF
8891 #line 8892 "configure"
8892 #include "confdefs.h"
8893
8894 #include <sys/types.h>
8895 #include <stdarg.h>
8896 void foo(const char *format, ...) { 
8897        va_list ap;
8898        int len;
8899        char buf[5];
8900
8901        va_start(ap, format);
8902        len = vsnprintf(0, 0, format, ap);
8903        va_end(ap);
8904        if (len != 5) exit(1);
8905
8906        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
8907
8908        exit(0);
8909 }
8910 main() { foo("hello"); }
8911
8912 EOF
8913 if { (eval echo configure:8914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8914 then
8915   samba_cv_HAVE_C99_VSNPRINTF=yes
8916 else
8917   echo "configure: failed program was:" >&5
8918   cat conftest.$ac_ext >&5
8919   rm -fr conftest*
8920   samba_cv_HAVE_C99_VSNPRINTF=no
8921 fi
8922 rm -fr conftest*
8923 fi
8924
8925 fi
8926
8927 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
8928 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
8929     cat >> confdefs.h <<\EOF
8930 #define HAVE_C99_VSNPRINTF 1
8931 EOF
8932
8933 fi
8934
8935 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
8936 echo "configure:8937: checking for broken readdir" >&5
8937 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
8938   echo $ac_n "(cached) $ac_c" 1>&6
8939 else
8940   
8941 if test "$cross_compiling" = yes; then
8942   samba_cv_HAVE_BROKEN_READDIR=cross
8943 else
8944   cat > conftest.$ac_ext <<EOF
8945 #line 8946 "configure"
8946 #include "confdefs.h"
8947 #include <sys/types.h>
8948 #include <dirent.h>
8949 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
8950 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
8951 di->d_name[0] == 0) exit(0); exit(1);} 
8952 EOF
8953 if { (eval echo configure:8954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8954 then
8955   samba_cv_HAVE_BROKEN_READDIR=yes
8956 else
8957   echo "configure: failed program was:" >&5
8958   cat conftest.$ac_ext >&5
8959   rm -fr conftest*
8960   samba_cv_HAVE_BROKEN_READDIR=no
8961 fi
8962 rm -fr conftest*
8963 fi
8964
8965 fi
8966
8967 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
8968 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
8969     cat >> confdefs.h <<\EOF
8970 #define HAVE_BROKEN_READDIR 1
8971 EOF
8972
8973 fi
8974
8975 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
8976 echo "configure:8977: checking for utimbuf" >&5
8977 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
8978   echo $ac_n "(cached) $ac_c" 1>&6
8979 else
8980   
8981 cat > conftest.$ac_ext <<EOF
8982 #line 8983 "configure"
8983 #include "confdefs.h"
8984 #include <sys/types.h>
8985 #include <utime.h>
8986 int main() {
8987 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
8988 ; return 0; }
8989 EOF
8990 if { (eval echo configure:8991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8991   rm -rf conftest*
8992   samba_cv_HAVE_UTIMBUF=yes
8993 else
8994   echo "configure: failed program was:" >&5
8995   cat conftest.$ac_ext >&5
8996   rm -rf conftest*
8997   samba_cv_HAVE_UTIMBUF=no
8998 fi
8999 rm -f conftest*
9000 fi
9001
9002 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9003 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9004     cat >> confdefs.h <<\EOF
9005 #define HAVE_UTIMBUF 1
9006 EOF
9007
9008 fi
9009
9010
9011 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9012 do
9013 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9014 echo "configure:9015: checking for $ac_func" >&5
9015 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9016   echo $ac_n "(cached) $ac_c" 1>&6
9017 else
9018   cat > conftest.$ac_ext <<EOF
9019 #line 9020 "configure"
9020 #include "confdefs.h"
9021 /* System header to define __stub macros and hopefully few prototypes,
9022     which can conflict with char $ac_func(); below.  */
9023 #include <assert.h>
9024 /* Override any gcc2 internal prototype to avoid an error.  */
9025 /* We use char because int might match the return type of a gcc2
9026     builtin and then its argument prototype would still apply.  */
9027 char $ac_func();
9028
9029 int main() {
9030
9031 /* The GNU C library defines this for functions which it implements
9032     to always fail with ENOSYS.  Some functions are actually named
9033     something starting with __ and the normal name is an alias.  */
9034 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9035 choke me
9036 #else
9037 $ac_func();
9038 #endif
9039
9040 ; return 0; }
9041 EOF
9042 if { (eval echo configure:9043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9043   rm -rf conftest*
9044   eval "ac_cv_func_$ac_func=yes"
9045 else
9046   echo "configure: failed program was:" >&5
9047   cat conftest.$ac_ext >&5
9048   rm -rf conftest*
9049   eval "ac_cv_func_$ac_func=no"
9050 fi
9051 rm -f conftest*
9052 fi
9053
9054 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9055   echo "$ac_t""yes" 1>&6
9056     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9057   cat >> confdefs.h <<EOF
9058 #define $ac_tr_func 1
9059 EOF
9060  
9061 else
9062   echo "$ac_t""no" 1>&6
9063 fi
9064 done
9065
9066
9067 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9068 echo "configure:9069: checking for ut_name in utmp" >&5
9069 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9070   echo $ac_n "(cached) $ac_c" 1>&6
9071 else
9072   
9073 cat > conftest.$ac_ext <<EOF
9074 #line 9075 "configure"
9075 #include "confdefs.h"
9076 #include <sys/types.h>
9077 #include <utmp.h>
9078 int main() {
9079 struct utmp ut;  ut.ut_name[0] = 'a';
9080 ; return 0; }
9081 EOF
9082 if { (eval echo configure:9083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9083   rm -rf conftest*
9084   samba_cv_HAVE_UT_UT_NAME=yes
9085 else
9086   echo "configure: failed program was:" >&5
9087   cat conftest.$ac_ext >&5
9088   rm -rf conftest*
9089   samba_cv_HAVE_UT_UT_NAME=no
9090 fi
9091 rm -f conftest*
9092 fi
9093
9094 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9095 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9096     cat >> confdefs.h <<\EOF
9097 #define HAVE_UT_UT_NAME 1
9098 EOF
9099
9100 fi 
9101
9102 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9103 echo "configure:9104: checking for ut_user in utmp" >&5
9104 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9105   echo $ac_n "(cached) $ac_c" 1>&6
9106 else
9107   
9108 cat > conftest.$ac_ext <<EOF
9109 #line 9110 "configure"
9110 #include "confdefs.h"
9111 #include <sys/types.h>
9112 #include <utmp.h>
9113 int main() {
9114 struct utmp ut;  ut.ut_user[0] = 'a';
9115 ; return 0; }
9116 EOF
9117 if { (eval echo configure:9118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9118   rm -rf conftest*
9119   samba_cv_HAVE_UT_UT_USER=yes
9120 else
9121   echo "configure: failed program was:" >&5
9122   cat conftest.$ac_ext >&5
9123   rm -rf conftest*
9124   samba_cv_HAVE_UT_UT_USER=no
9125 fi
9126 rm -f conftest*
9127 fi
9128
9129 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9130 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9131     cat >> confdefs.h <<\EOF
9132 #define HAVE_UT_UT_USER 1
9133 EOF
9134
9135 fi 
9136
9137 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9138 echo "configure:9139: checking for ut_id in utmp" >&5
9139 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9140   echo $ac_n "(cached) $ac_c" 1>&6
9141 else
9142   
9143 cat > conftest.$ac_ext <<EOF
9144 #line 9145 "configure"
9145 #include "confdefs.h"
9146 #include <sys/types.h>
9147 #include <utmp.h>
9148 int main() {
9149 struct utmp ut;  ut.ut_id[0] = 'a';
9150 ; return 0; }
9151 EOF
9152 if { (eval echo configure:9153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9153   rm -rf conftest*
9154   samba_cv_HAVE_UT_UT_ID=yes
9155 else
9156   echo "configure: failed program was:" >&5
9157   cat conftest.$ac_ext >&5
9158   rm -rf conftest*
9159   samba_cv_HAVE_UT_UT_ID=no
9160 fi
9161 rm -f conftest*
9162 fi
9163
9164 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9165 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9166     cat >> confdefs.h <<\EOF
9167 #define HAVE_UT_UT_ID 1
9168 EOF
9169
9170 fi 
9171
9172 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9173 echo "configure:9174: checking for ut_host in utmp" >&5
9174 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9175   echo $ac_n "(cached) $ac_c" 1>&6
9176 else
9177   
9178 cat > conftest.$ac_ext <<EOF
9179 #line 9180 "configure"
9180 #include "confdefs.h"
9181 #include <sys/types.h>
9182 #include <utmp.h>
9183 int main() {
9184 struct utmp ut;  ut.ut_host[0] = 'a';
9185 ; return 0; }
9186 EOF
9187 if { (eval echo configure:9188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9188   rm -rf conftest*
9189   samba_cv_HAVE_UT_UT_HOST=yes
9190 else
9191   echo "configure: failed program was:" >&5
9192   cat conftest.$ac_ext >&5
9193   rm -rf conftest*
9194   samba_cv_HAVE_UT_UT_HOST=no
9195 fi
9196 rm -f conftest*
9197 fi
9198
9199 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9200 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9201     cat >> confdefs.h <<\EOF
9202 #define HAVE_UT_UT_HOST 1
9203 EOF
9204
9205 fi 
9206
9207 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9208 echo "configure:9209: checking for ut_time in utmp" >&5
9209 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9210   echo $ac_n "(cached) $ac_c" 1>&6
9211 else
9212   
9213 cat > conftest.$ac_ext <<EOF
9214 #line 9215 "configure"
9215 #include "confdefs.h"
9216 #include <sys/types.h>
9217 #include <utmp.h>
9218 int main() {
9219 struct utmp ut;  time_t t; ut.ut_time = t;
9220 ; return 0; }
9221 EOF
9222 if { (eval echo configure:9223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9223   rm -rf conftest*
9224   samba_cv_HAVE_UT_UT_TIME=yes
9225 else
9226   echo "configure: failed program was:" >&5
9227   cat conftest.$ac_ext >&5
9228   rm -rf conftest*
9229   samba_cv_HAVE_UT_UT_TIME=no
9230 fi
9231 rm -f conftest*
9232 fi
9233
9234 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9235 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9236     cat >> confdefs.h <<\EOF
9237 #define HAVE_UT_UT_TIME 1
9238 EOF
9239
9240 fi 
9241
9242 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9243 echo "configure:9244: checking for ut_tv in utmp" >&5
9244 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9245   echo $ac_n "(cached) $ac_c" 1>&6
9246 else
9247   
9248 cat > conftest.$ac_ext <<EOF
9249 #line 9250 "configure"
9250 #include "confdefs.h"
9251 #include <sys/types.h>
9252 #include <utmp.h>
9253 int main() {
9254 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9255 ; return 0; }
9256 EOF
9257 if { (eval echo configure:9258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9258   rm -rf conftest*
9259   samba_cv_HAVE_UT_UT_TV=yes
9260 else
9261   echo "configure: failed program was:" >&5
9262   cat conftest.$ac_ext >&5
9263   rm -rf conftest*
9264   samba_cv_HAVE_UT_UT_TV=no
9265 fi
9266 rm -f conftest*
9267 fi
9268
9269 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9270 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9271     cat >> confdefs.h <<\EOF
9272 #define HAVE_UT_UT_TV 1
9273 EOF
9274
9275 fi 
9276
9277 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9278 echo "configure:9279: checking for ut_type in utmp" >&5
9279 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9280   echo $ac_n "(cached) $ac_c" 1>&6
9281 else
9282   
9283 cat > conftest.$ac_ext <<EOF
9284 #line 9285 "configure"
9285 #include "confdefs.h"
9286 #include <sys/types.h>
9287 #include <utmp.h>
9288 int main() {
9289 struct utmp ut;  ut.ut_type = 0;
9290 ; return 0; }
9291 EOF
9292 if { (eval echo configure:9293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9293   rm -rf conftest*
9294   samba_cv_HAVE_UT_UT_TYPE=yes
9295 else
9296   echo "configure: failed program was:" >&5
9297   cat conftest.$ac_ext >&5
9298   rm -rf conftest*
9299   samba_cv_HAVE_UT_UT_TYPE=no
9300 fi
9301 rm -f conftest*
9302 fi
9303
9304 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9305 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9306     cat >> confdefs.h <<\EOF
9307 #define HAVE_UT_UT_TYPE 1
9308 EOF
9309
9310 fi 
9311
9312 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9313 echo "configure:9314: checking for ut_pid in utmp" >&5
9314 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9315   echo $ac_n "(cached) $ac_c" 1>&6
9316 else
9317   
9318 cat > conftest.$ac_ext <<EOF
9319 #line 9320 "configure"
9320 #include "confdefs.h"
9321 #include <sys/types.h>
9322 #include <utmp.h>
9323 int main() {
9324 struct utmp ut;  ut.ut_pid = 0;
9325 ; return 0; }
9326 EOF
9327 if { (eval echo configure:9328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9328   rm -rf conftest*
9329   samba_cv_HAVE_UT_UT_PID=yes
9330 else
9331   echo "configure: failed program was:" >&5
9332   cat conftest.$ac_ext >&5
9333   rm -rf conftest*
9334   samba_cv_HAVE_UT_UT_PID=no
9335 fi
9336 rm -f conftest*
9337 fi
9338
9339 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9340 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9341     cat >> confdefs.h <<\EOF
9342 #define HAVE_UT_UT_PID 1
9343 EOF
9344
9345 fi 
9346
9347 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9348 echo "configure:9349: checking for ut_exit in utmp" >&5
9349 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9350   echo $ac_n "(cached) $ac_c" 1>&6
9351 else
9352   
9353 cat > conftest.$ac_ext <<EOF
9354 #line 9355 "configure"
9355 #include "confdefs.h"
9356 #include <sys/types.h>
9357 #include <utmp.h>
9358 int main() {
9359 struct utmp ut;  ut.ut_exit.e_exit = 0;
9360 ; return 0; }
9361 EOF
9362 if { (eval echo configure:9363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9363   rm -rf conftest*
9364   samba_cv_HAVE_UT_UT_EXIT=yes
9365 else
9366   echo "configure: failed program was:" >&5
9367   cat conftest.$ac_ext >&5
9368   rm -rf conftest*
9369   samba_cv_HAVE_UT_UT_EXIT=no
9370 fi
9371 rm -f conftest*
9372 fi
9373
9374 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9375 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9376     cat >> confdefs.h <<\EOF
9377 #define HAVE_UT_UT_EXIT 1
9378 EOF
9379
9380 fi 
9381
9382 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9383 echo "configure:9384: checking for ut_addr in utmp" >&5
9384 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9385   echo $ac_n "(cached) $ac_c" 1>&6
9386 else
9387   
9388 cat > conftest.$ac_ext <<EOF
9389 #line 9390 "configure"
9390 #include "confdefs.h"
9391 #include <sys/types.h>
9392 #include <utmp.h>
9393 int main() {
9394 struct utmp ut;  ut.ut_addr = 0;
9395 ; return 0; }
9396 EOF
9397 if { (eval echo configure:9398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9398   rm -rf conftest*
9399   samba_cv_HAVE_UT_UT_ADDR=yes
9400 else
9401   echo "configure: failed program was:" >&5
9402   cat conftest.$ac_ext >&5
9403   rm -rf conftest*
9404   samba_cv_HAVE_UT_UT_ADDR=no
9405 fi
9406 rm -f conftest*
9407 fi
9408
9409 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9410 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9411     cat >> confdefs.h <<\EOF
9412 #define HAVE_UT_UT_ADDR 1
9413 EOF
9414
9415 fi 
9416
9417 if test x$ac_cv_func_pututline = xyes ; then
9418   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9419 echo "configure:9420: checking whether pututline returns pointer" >&5
9420 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9421   echo $ac_n "(cached) $ac_c" 1>&6
9422 else
9423   
9424   cat > conftest.$ac_ext <<EOF
9425 #line 9426 "configure"
9426 #include "confdefs.h"
9427 #include <sys/types.h>
9428 #include <utmp.h>
9429 int main() {
9430 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9431 ; return 0; }
9432 EOF
9433 if { (eval echo configure:9434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9434   rm -rf conftest*
9435   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9436 else
9437   echo "configure: failed program was:" >&5
9438   cat conftest.$ac_ext >&5
9439   rm -rf conftest*
9440   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9441 fi
9442 rm -f conftest*
9443 fi
9444
9445 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9446   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9447       cat >> confdefs.h <<\EOF
9448 #define PUTUTLINE_RETURNS_UTMP 1
9449 EOF
9450
9451   fi
9452 fi
9453
9454 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9455 echo "configure:9456: checking for ut_syslen in utmpx" >&5
9456 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9457   echo $ac_n "(cached) $ac_c" 1>&6
9458 else
9459   
9460 cat > conftest.$ac_ext <<EOF
9461 #line 9462 "configure"
9462 #include "confdefs.h"
9463 #include <sys/types.h>
9464 #include <utmpx.h>
9465 int main() {
9466 struct utmpx ux;  ux.ut_syslen = 0;
9467 ; return 0; }
9468 EOF
9469 if { (eval echo configure:9470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9470   rm -rf conftest*
9471   samba_cv_HAVE_UX_UT_SYSLEN=yes
9472 else
9473   echo "configure: failed program was:" >&5
9474   cat conftest.$ac_ext >&5
9475   rm -rf conftest*
9476   samba_cv_HAVE_UX_UT_SYSLEN=no
9477 fi
9478 rm -f conftest*
9479 fi
9480
9481 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9482 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9483     cat >> confdefs.h <<\EOF
9484 #define HAVE_UX_UT_SYSLEN 1
9485 EOF
9486
9487 fi 
9488
9489 ############
9490 # check for iconv in libc, and if not then we build our own
9491 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9492 echo "configure:9493: checking for working iconv" >&5
9493 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9494   echo $ac_n "(cached) $ac_c" 1>&6
9495 else
9496   
9497 if test "$cross_compiling" = yes; then
9498   samba_cv_HAVE_NATIVE_ICONV=cross
9499 else
9500   cat > conftest.$ac_ext <<EOF
9501 #line 9502 "configure"
9502 #include "confdefs.h"
9503
9504 #include <iconv.h>
9505 main() {
9506        iconv_t cd = iconv_open("ASCII", "UCS2");
9507        if (cd == 0 || cd == (iconv_t)-1) return -1;
9508        return 0;
9509 }
9510
9511 EOF
9512 if { (eval echo configure:9513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9513 then
9514   samba_cv_HAVE_NATIVE_ICONV=yes
9515 else
9516   echo "configure: failed program was:" >&5
9517   cat conftest.$ac_ext >&5
9518   rm -fr conftest*
9519   samba_cv_HAVE_NATIVE_ICONV=no
9520 fi
9521 rm -fr conftest*
9522 fi
9523
9524 fi
9525
9526 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9527 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9528     cat >> confdefs.h <<\EOF
9529 #define HAVE_NATIVE_ICONV 1
9530 EOF
9531
9532 fi
9533
9534
9535 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9536 echo "configure:9537: checking for Linux kernel oplocks" >&5
9537 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9538   echo $ac_n "(cached) $ac_c" 1>&6
9539 else
9540   
9541 if test "$cross_compiling" = yes; then
9542   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9543 else
9544   cat > conftest.$ac_ext <<EOF
9545 #line 9546 "configure"
9546 #include "confdefs.h"
9547
9548 #include <sys/types.h>
9549 #include <fcntl.h>
9550 #ifndef F_GETLEASE
9551 #define F_GETLEASE      1025
9552 #endif
9553 main() {
9554        int fd = open("/dev/null", O_RDONLY);
9555        return fcntl(fd, F_GETLEASE, 0) == -1;
9556 }
9557
9558 EOF
9559 if { (eval echo configure:9560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9560 then
9561   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9562 else
9563   echo "configure: failed program was:" >&5
9564   cat conftest.$ac_ext >&5
9565   rm -fr conftest*
9566   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9567 fi
9568 rm -fr conftest*
9569 fi
9570
9571 fi
9572
9573 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9574 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9575     cat >> confdefs.h <<\EOF
9576 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9577 EOF
9578
9579 fi
9580
9581 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9582 echo "configure:9583: checking for kernel change notify support" >&5
9583 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9584   echo $ac_n "(cached) $ac_c" 1>&6
9585 else
9586   
9587 if test "$cross_compiling" = yes; then
9588   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9589 else
9590   cat > conftest.$ac_ext <<EOF
9591 #line 9592 "configure"
9592 #include "confdefs.h"
9593
9594 #include <sys/types.h>
9595 #include <fcntl.h>
9596 #include <signal.h>
9597 #ifndef F_NOTIFY
9598 #define F_NOTIFY 1026
9599 #endif
9600 main() {
9601         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9602 }
9603
9604 EOF
9605 if { (eval echo configure:9606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9606 then
9607   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9608 else
9609   echo "configure: failed program was:" >&5
9610   cat conftest.$ac_ext >&5
9611   rm -fr conftest*
9612   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9613 fi
9614 rm -fr conftest*
9615 fi
9616
9617 fi
9618
9619 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9620 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9621     cat >> confdefs.h <<\EOF
9622 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9623 EOF
9624
9625 fi
9626
9627 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9628 echo "configure:9629: checking for kernel share modes" >&5
9629 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9630   echo $ac_n "(cached) $ac_c" 1>&6
9631 else
9632   
9633 if test "$cross_compiling" = yes; then
9634   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9635 else
9636   cat > conftest.$ac_ext <<EOF
9637 #line 9638 "configure"
9638 #include "confdefs.h"
9639
9640 #include <sys/types.h>
9641 #include <fcntl.h>
9642 #include <signal.h>
9643 #include <sys/file.h>
9644 #ifndef LOCK_MAND
9645 #define LOCK_MAND       32
9646 #define LOCK_READ       64
9647 #endif
9648 main() {
9649         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9650 }
9651
9652 EOF
9653 if { (eval echo configure:9654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9654 then
9655   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9656 else
9657   echo "configure: failed program was:" >&5
9658   cat conftest.$ac_ext >&5
9659   rm -fr conftest*
9660   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9661 fi
9662 rm -fr conftest*
9663 fi
9664
9665 fi
9666
9667 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
9668 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
9669     cat >> confdefs.h <<\EOF
9670 #define HAVE_KERNEL_SHARE_MODES 1
9671 EOF
9672
9673 fi
9674
9675
9676
9677
9678 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
9679 echo "configure:9680: checking for IRIX kernel oplock type definitions" >&5
9680 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
9681   echo $ac_n "(cached) $ac_c" 1>&6
9682 else
9683   
9684 cat > conftest.$ac_ext <<EOF
9685 #line 9686 "configure"
9686 #include "confdefs.h"
9687 #include <sys/types.h>
9688 #include <fcntl.h>
9689 int main() {
9690 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
9691 ; return 0; }
9692 EOF
9693 if { (eval echo configure:9694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9694   rm -rf conftest*
9695   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
9696 else
9697   echo "configure: failed program was:" >&5
9698   cat conftest.$ac_ext >&5
9699   rm -rf conftest*
9700   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
9701 fi
9702 rm -f conftest*
9703 fi
9704
9705 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
9706 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
9707     cat >> confdefs.h <<\EOF
9708 #define HAVE_KERNEL_OPLOCKS_IRIX 1
9709 EOF
9710
9711 fi
9712
9713 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
9714 echo "configure:9715: checking for irix specific capabilities" >&5
9715 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
9716   echo $ac_n "(cached) $ac_c" 1>&6
9717 else
9718   
9719 if test "$cross_compiling" = yes; then
9720   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
9721 else
9722   cat > conftest.$ac_ext <<EOF
9723 #line 9724 "configure"
9724 #include "confdefs.h"
9725 #include <sys/types.h>
9726 #include <sys/capability.h>
9727 main() {
9728  cap_t cap;
9729  if ((cap = cap_get_proc()) == NULL)
9730    exit(1);
9731  cap->cap_effective |= CAP_NETWORK_MGT;
9732  cap->cap_inheritable |= CAP_NETWORK_MGT;
9733  cap_set_proc(cap);
9734  exit(0);
9735 }
9736
9737 EOF
9738 if { (eval echo configure:9739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9739 then
9740   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
9741 else
9742   echo "configure: failed program was:" >&5
9743   cat conftest.$ac_ext >&5
9744   rm -fr conftest*
9745   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
9746 fi
9747 rm -fr conftest*
9748 fi
9749
9750 fi
9751
9752 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
9753 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
9754     cat >> confdefs.h <<\EOF
9755 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
9756 EOF
9757
9758 fi
9759
9760 #
9761 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
9762 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
9763 #
9764
9765 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9766 echo "configure:9767: checking for int16 typedef included by rpc/rpc.h" >&5
9767 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9768   echo $ac_n "(cached) $ac_c" 1>&6
9769 else
9770   
9771 cat > conftest.$ac_ext <<EOF
9772 #line 9773 "configure"
9773 #include "confdefs.h"
9774 #include <sys/types.h>
9775 #if defined(HAVE_RPC_RPC_H)
9776 #include <rpc/rpc.h>
9777 #endif
9778 int main() {
9779 int16 testvar;
9780 ; return 0; }
9781 EOF
9782 if { (eval echo configure:9783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9783   rm -rf conftest*
9784   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
9785 else
9786   echo "configure: failed program was:" >&5
9787   cat conftest.$ac_ext >&5
9788   rm -rf conftest*
9789   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
9790 fi
9791 rm -f conftest*
9792 fi
9793
9794 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
9795 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
9796     cat >> confdefs.h <<\EOF
9797 #define HAVE_INT16_FROM_RPC_RPC_H 1
9798 EOF
9799
9800 fi
9801
9802 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9803 echo "configure:9804: checking for uint16 typedef included by rpc/rpc.h" >&5
9804 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9805   echo $ac_n "(cached) $ac_c" 1>&6
9806 else
9807   
9808 cat > conftest.$ac_ext <<EOF
9809 #line 9810 "configure"
9810 #include "confdefs.h"
9811 #include <sys/types.h>
9812 #if defined(HAVE_RPC_RPC_H)
9813 #include <rpc/rpc.h>
9814 #endif
9815 int main() {
9816 uint16 testvar;
9817 ; return 0; }
9818 EOF
9819 if { (eval echo configure:9820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9820   rm -rf conftest*
9821   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
9822 else
9823   echo "configure: failed program was:" >&5
9824   cat conftest.$ac_ext >&5
9825   rm -rf conftest*
9826   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
9827 fi
9828 rm -f conftest*
9829 fi
9830
9831 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
9832 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
9833     cat >> confdefs.h <<\EOF
9834 #define HAVE_UINT16_FROM_RPC_RPC_H 1
9835 EOF
9836
9837 fi
9838
9839 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9840 echo "configure:9841: checking for int32 typedef included by rpc/rpc.h" >&5
9841 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
9842   echo $ac_n "(cached) $ac_c" 1>&6
9843 else
9844   
9845 cat > conftest.$ac_ext <<EOF
9846 #line 9847 "configure"
9847 #include "confdefs.h"
9848 #include <sys/types.h>
9849 #if defined(HAVE_RPC_RPC_H)
9850 #include <rpc/rpc.h>
9851 #endif
9852 int main() {
9853 int32 testvar;
9854 ; return 0; }
9855 EOF
9856 if { (eval echo configure:9857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9857   rm -rf conftest*
9858   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
9859 else
9860   echo "configure: failed program was:" >&5
9861   cat conftest.$ac_ext >&5
9862   rm -rf conftest*
9863   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
9864 fi
9865 rm -f conftest*
9866 fi
9867
9868 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
9869 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
9870     cat >> confdefs.h <<\EOF
9871 #define HAVE_INT32_FROM_RPC_RPC_H 1
9872 EOF
9873
9874 fi
9875
9876 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9877 echo "configure:9878: checking for uint32 typedef included by rpc/rpc.h" >&5
9878 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
9879   echo $ac_n "(cached) $ac_c" 1>&6
9880 else
9881   
9882 cat > conftest.$ac_ext <<EOF
9883 #line 9884 "configure"
9884 #include "confdefs.h"
9885 #include <sys/types.h>
9886 #if defined(HAVE_RPC_RPC_H)
9887 #include <rpc/rpc.h>
9888 #endif
9889 int main() {
9890 uint32 testvar;
9891 ; return 0; }
9892 EOF
9893 if { (eval echo configure:9894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9894   rm -rf conftest*
9895   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
9896 else
9897   echo "configure: failed program was:" >&5
9898   cat conftest.$ac_ext >&5
9899   rm -rf conftest*
9900   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
9901 fi
9902 rm -f conftest*
9903 fi
9904
9905 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
9906 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
9907     cat >> confdefs.h <<\EOF
9908 #define HAVE_UINT32_FROM_RPC_RPC_H 1
9909 EOF
9910
9911 fi
9912
9913
9914 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
9915 echo "configure:9916: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
9916 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
9917   echo $ac_n "(cached) $ac_c" 1>&6
9918 else
9919   
9920 cat > conftest.$ac_ext <<EOF
9921 #line 9922 "configure"
9922 #include "confdefs.h"
9923 #include <sys/types.h>
9924 #ifdef HAVE_SYS_SECURITY_H
9925 #include <sys/security.h>
9926 #include <prot.h>
9927 #endif  /* HAVE_SYS_SECURITY_H */
9928 #if defined(HAVE_RPC_RPC_H)
9929 #include <rpc/rpc.h>
9930 #endif
9931 int main() {
9932 int testvar;
9933 ; return 0; }
9934 EOF
9935 if { (eval echo configure:9936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9936   rm -rf conftest*
9937   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
9938 else
9939   echo "configure: failed program was:" >&5
9940   cat conftest.$ac_ext >&5
9941   rm -rf conftest*
9942   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
9943 fi
9944 rm -f conftest*
9945 fi
9946
9947 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
9948 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
9949     cat >> confdefs.h <<\EOF
9950 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
9951 EOF
9952
9953 fi
9954
9955 echo $ac_n "checking for test routines""... $ac_c" 1>&6
9956 echo "configure:9957: checking for test routines" >&5
9957 if test "$cross_compiling" = yes; then
9958   echo "configure: warning: cannot run when cross-compiling" 1>&2
9959 else
9960   cat > conftest.$ac_ext <<EOF
9961 #line 9962 "configure"
9962 #include "confdefs.h"
9963 #include "${srcdir-.}/tests/trivial.c"
9964 EOF
9965 if { (eval echo configure:9966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9966 then
9967   echo "$ac_t""yes" 1>&6
9968 else
9969   echo "configure: failed program was:" >&5
9970   cat conftest.$ac_ext >&5
9971   rm -fr conftest*
9972   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
9973 fi
9974 rm -fr conftest*
9975 fi
9976
9977
9978 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
9979 echo "configure:9980: checking for ftruncate extend" >&5
9980 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
9981   echo $ac_n "(cached) $ac_c" 1>&6
9982 else
9983   
9984 if test "$cross_compiling" = yes; then
9985   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
9986 else
9987   cat > conftest.$ac_ext <<EOF
9988 #line 9989 "configure"
9989 #include "confdefs.h"
9990 #include "${srcdir-.}/tests/ftruncate.c"
9991 EOF
9992 if { (eval echo configure:9993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9993 then
9994   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
9995 else
9996   echo "configure: failed program was:" >&5
9997   cat conftest.$ac_ext >&5
9998   rm -fr conftest*
9999   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10000 fi
10001 rm -fr conftest*
10002 fi
10003
10004 fi
10005
10006 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10007 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10008     cat >> confdefs.h <<\EOF
10009 #define HAVE_FTRUNCATE_EXTEND 1
10010 EOF
10011
10012 fi
10013
10014 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10015 echo "configure:10016: checking for AF_LOCAL socket support" >&5
10016 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10017   echo $ac_n "(cached) $ac_c" 1>&6
10018 else
10019   
10020 if test "$cross_compiling" = yes; then
10021   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10022 else
10023   cat > conftest.$ac_ext <<EOF
10024 #line 10025 "configure"
10025 #include "confdefs.h"
10026 #include "${srcdir-.}/tests/unixsock.c"
10027 EOF
10028 if { (eval echo configure:10029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10029 then
10030   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10031 else
10032   echo "configure: failed program was:" >&5
10033   cat conftest.$ac_ext >&5
10034   rm -fr conftest*
10035   samba_cv_HAVE_WORKING_AF_LOCAL=no
10036 fi
10037 rm -fr conftest*
10038 fi
10039
10040 fi
10041
10042 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10043 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10044 then
10045     cat >> confdefs.h <<\EOF
10046 #define HAVE_WORKING_AF_LOCAL 1
10047 EOF
10048
10049 fi
10050
10051 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10052 echo "configure:10053: checking for broken getgroups" >&5
10053 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10054   echo $ac_n "(cached) $ac_c" 1>&6
10055 else
10056   
10057 if test "$cross_compiling" = yes; then
10058   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10059 else
10060   cat > conftest.$ac_ext <<EOF
10061 #line 10062 "configure"
10062 #include "confdefs.h"
10063 #include "${srcdir-.}/tests/getgroups.c"
10064 EOF
10065 if { (eval echo configure:10066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10066 then
10067   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10068 else
10069   echo "configure: failed program was:" >&5
10070   cat conftest.$ac_ext >&5
10071   rm -fr conftest*
10072   samba_cv_HAVE_BROKEN_GETGROUPS=no
10073 fi
10074 rm -fr conftest*
10075 fi
10076
10077 fi
10078
10079 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10080 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10081     cat >> confdefs.h <<\EOF
10082 #define HAVE_BROKEN_GETGROUPS 1
10083 EOF
10084
10085 fi
10086
10087 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10088 echo "configure:10089: checking whether getpass should be replaced" >&5
10089 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10090   echo $ac_n "(cached) $ac_c" 1>&6
10091 else
10092   
10093 SAVE_CPPFLAGS="$CPPFLAGS"
10094 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10095 cat > conftest.$ac_ext <<EOF
10096 #line 10097 "configure"
10097 #include "confdefs.h"
10098
10099 #define REPLACE_GETPASS 1
10100 #define NO_CONFIG_H 1
10101 #define main dont_declare_main
10102 #include "${srcdir-.}/lib/getsmbpass.c"
10103 #undef main
10104
10105 int main() {
10106
10107 ; return 0; }
10108 EOF
10109 if { (eval echo configure:10110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10110   rm -rf conftest*
10111   samba_cv_REPLACE_GETPASS=yes
10112 else
10113   echo "configure: failed program was:" >&5
10114   cat conftest.$ac_ext >&5
10115   rm -rf conftest*
10116   samba_cv_REPLACE_GETPASS=no
10117 fi
10118 rm -f conftest*
10119 CPPFLAGS="$SAVE_CPPFLAGS"
10120
10121 fi
10122
10123 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10124 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10125         cat >> confdefs.h <<\EOF
10126 #define REPLACE_GETPASS 1
10127 EOF
10128
10129 fi
10130
10131 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10132 echo "configure:10133: checking for broken inet_ntoa" >&5
10133 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10134   echo $ac_n "(cached) $ac_c" 1>&6
10135 else
10136   
10137 if test "$cross_compiling" = yes; then
10138   samba_cv_REPLACE_INET_NTOA=cross
10139 else
10140   cat > conftest.$ac_ext <<EOF
10141 #line 10142 "configure"
10142 #include "confdefs.h"
10143
10144 #include <stdio.h>
10145 #include <sys/types.h>
10146 #include <netinet/in.h>
10147 #ifdef HAVE_ARPA_INET_H
10148 #include <arpa/inet.h>
10149 #endif
10150 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10151 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10152     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10153 exit(1);}
10154 EOF
10155 if { (eval echo configure:10156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10156 then
10157   samba_cv_REPLACE_INET_NTOA=yes
10158 else
10159   echo "configure: failed program was:" >&5
10160   cat conftest.$ac_ext >&5
10161   rm -fr conftest*
10162   samba_cv_REPLACE_INET_NTOA=no
10163 fi
10164 rm -fr conftest*
10165 fi
10166
10167 fi
10168
10169 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10170 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10171     cat >> confdefs.h <<\EOF
10172 #define REPLACE_INET_NTOA 1
10173 EOF
10174
10175 fi
10176
10177 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10178 echo "configure:10179: checking for secure mkstemp" >&5
10179 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10180   echo $ac_n "(cached) $ac_c" 1>&6
10181 else
10182   
10183 if test "$cross_compiling" = yes; then
10184   samba_cv_HAVE_SECURE_MKSTEMP=cross
10185 else
10186   cat > conftest.$ac_ext <<EOF
10187 #line 10188 "configure"
10188 #include "confdefs.h"
10189 #include <stdlib.h>
10190 #include <sys/types.h>
10191 #include <sys/stat.h>
10192 #include <unistd.h>
10193 main() { 
10194   struct stat st;
10195   char tpl[20]="/tmp/test.XXXXXX"; 
10196   int fd = mkstemp(tpl); 
10197   if (fd == -1) exit(1);
10198   unlink(tpl);
10199   if (fstat(fd, &st) != 0) exit(1);
10200   if ((st.st_mode & 0777) != 0600) exit(1);
10201   exit(0);
10202 }
10203 EOF
10204 if { (eval echo configure:10205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10205 then
10206   samba_cv_HAVE_SECURE_MKSTEMP=yes
10207 else
10208   echo "configure: failed program was:" >&5
10209   cat conftest.$ac_ext >&5
10210   rm -fr conftest*
10211   samba_cv_HAVE_SECURE_MKSTEMP=no
10212 fi
10213 rm -fr conftest*
10214 fi
10215
10216 fi
10217
10218 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10219 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10220     cat >> confdefs.h <<\EOF
10221 #define HAVE_SECURE_MKSTEMP 1
10222 EOF
10223
10224 fi
10225
10226 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10227 echo "configure:10228: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10228 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10229   echo $ac_n "(cached) $ac_c" 1>&6
10230 else
10231   
10232 if test "$cross_compiling" = yes; then
10233   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10234 else
10235   cat > conftest.$ac_ext <<EOF
10236 #line 10237 "configure"
10237 #include "confdefs.h"
10238 #include <unistd.h>
10239 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10240 EOF
10241 if { (eval echo configure:10242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10242 then
10243   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10244 else
10245   echo "configure: failed program was:" >&5
10246   cat conftest.$ac_ext >&5
10247   rm -fr conftest*
10248   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10249 fi
10250 rm -fr conftest*
10251 fi
10252
10253 fi
10254
10255 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10256 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10257     cat >> confdefs.h <<\EOF
10258 #define SYSCONF_SC_NGROUPS_MAX 1
10259 EOF
10260
10261 fi
10262
10263 echo $ac_n "checking for root""... $ac_c" 1>&6
10264 echo "configure:10265: checking for root" >&5
10265 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10266   echo $ac_n "(cached) $ac_c" 1>&6
10267 else
10268   
10269 if test "$cross_compiling" = yes; then
10270   samba_cv_HAVE_ROOT=cross
10271 else
10272   cat > conftest.$ac_ext <<EOF
10273 #line 10274 "configure"
10274 #include "confdefs.h"
10275 main() { exit(getuid() != 0); }
10276 EOF
10277 if { (eval echo configure:10278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10278 then
10279   samba_cv_HAVE_ROOT=yes
10280 else
10281   echo "configure: failed program was:" >&5
10282   cat conftest.$ac_ext >&5
10283   rm -fr conftest*
10284   samba_cv_HAVE_ROOT=no
10285 fi
10286 rm -fr conftest*
10287 fi
10288
10289 fi
10290
10291 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10292 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10293     cat >> confdefs.h <<\EOF
10294 #define HAVE_ROOT 1
10295 EOF
10296
10297 else
10298     echo "configure: warning: running as non-root will disable some tests" 1>&2
10299 fi
10300
10301 ##################
10302 # look for a method of finding the list of network interfaces
10303 iface=no;
10304 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10305 echo "configure:10306: checking for iface AIX" >&5
10306 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10307   echo $ac_n "(cached) $ac_c" 1>&6
10308 else
10309   
10310 if test "$cross_compiling" = yes; then
10311   samba_cv_HAVE_IFACE_AIX=cross
10312 else
10313   cat > conftest.$ac_ext <<EOF
10314 #line 10315 "configure"
10315 #include "confdefs.h"
10316
10317 #define HAVE_IFACE_AIX 1
10318 #define AUTOCONF_TEST 1
10319 #include "confdefs.h"
10320 #include "${srcdir-.}/lib/interfaces.c"
10321 EOF
10322 if { (eval echo configure:10323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10323 then
10324   samba_cv_HAVE_IFACE_AIX=yes
10325 else
10326   echo "configure: failed program was:" >&5
10327   cat conftest.$ac_ext >&5
10328   rm -fr conftest*
10329   samba_cv_HAVE_IFACE_AIX=no
10330 fi
10331 rm -fr conftest*
10332 fi
10333
10334 fi
10335
10336 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10337 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10338     iface=yes;cat >> confdefs.h <<\EOF
10339 #define HAVE_IFACE_AIX 1
10340 EOF
10341
10342 fi
10343
10344 if test $iface = no; then
10345 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10346 echo "configure:10347: checking for iface ifconf" >&5
10347 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10348   echo $ac_n "(cached) $ac_c" 1>&6
10349 else
10350   
10351 if test "$cross_compiling" = yes; then
10352   samba_cv_HAVE_IFACE_IFCONF=cross
10353 else
10354   cat > conftest.$ac_ext <<EOF
10355 #line 10356 "configure"
10356 #include "confdefs.h"
10357
10358 #define HAVE_IFACE_IFCONF 1
10359 #define AUTOCONF_TEST 1
10360 #include "confdefs.h"
10361 #include "${srcdir-.}/lib/interfaces.c"
10362 EOF
10363 if { (eval echo configure:10364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10364 then
10365   samba_cv_HAVE_IFACE_IFCONF=yes
10366 else
10367   echo "configure: failed program was:" >&5
10368   cat conftest.$ac_ext >&5
10369   rm -fr conftest*
10370   samba_cv_HAVE_IFACE_IFCONF=no
10371 fi
10372 rm -fr conftest*
10373 fi
10374
10375 fi
10376
10377 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10378 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10379     iface=yes;cat >> confdefs.h <<\EOF
10380 #define HAVE_IFACE_IFCONF 1
10381 EOF
10382
10383 fi
10384 fi
10385
10386 if test $iface = no; then
10387 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10388 echo "configure:10389: checking for iface ifreq" >&5
10389 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10390   echo $ac_n "(cached) $ac_c" 1>&6
10391 else
10392   
10393 if test "$cross_compiling" = yes; then
10394   samba_cv_HAVE_IFACE_IFREQ=cross
10395 else
10396   cat > conftest.$ac_ext <<EOF
10397 #line 10398 "configure"
10398 #include "confdefs.h"
10399
10400 #define HAVE_IFACE_IFREQ 1
10401 #define AUTOCONF_TEST 1
10402 #include "confdefs.h"
10403 #include "${srcdir-.}/lib/interfaces.c"
10404 EOF
10405 if { (eval echo configure:10406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10406 then
10407   samba_cv_HAVE_IFACE_IFREQ=yes
10408 else
10409   echo "configure: failed program was:" >&5
10410   cat conftest.$ac_ext >&5
10411   rm -fr conftest*
10412   samba_cv_HAVE_IFACE_IFREQ=no
10413 fi
10414 rm -fr conftest*
10415 fi
10416
10417 fi
10418
10419 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10420 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10421     iface=yes;cat >> confdefs.h <<\EOF
10422 #define HAVE_IFACE_IFREQ 1
10423 EOF
10424
10425 fi
10426 fi
10427
10428
10429 ################################################
10430 # look for a method of setting the effective uid
10431 seteuid=no;
10432 if test $seteuid = no; then
10433 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10434 echo "configure:10435: checking for setresuid" >&5
10435 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10436   echo $ac_n "(cached) $ac_c" 1>&6
10437 else
10438   
10439 if test "$cross_compiling" = yes; then
10440   samba_cv_USE_SETRESUID=cross
10441 else
10442   cat > conftest.$ac_ext <<EOF
10443 #line 10444 "configure"
10444 #include "confdefs.h"
10445
10446 #define AUTOCONF_TEST 1
10447 #define USE_SETRESUID 1
10448 #include "confdefs.h"
10449 #include "${srcdir-.}/lib/util_sec.c"
10450 EOF
10451 if { (eval echo configure:10452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10452 then
10453   samba_cv_USE_SETRESUID=yes
10454 else
10455   echo "configure: failed program was:" >&5
10456   cat conftest.$ac_ext >&5
10457   rm -fr conftest*
10458   samba_cv_USE_SETRESUID=no
10459 fi
10460 rm -fr conftest*
10461 fi
10462
10463 fi
10464
10465 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10466 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10467     seteuid=yes;cat >> confdefs.h <<\EOF
10468 #define USE_SETRESUID 1
10469 EOF
10470
10471 fi
10472 fi
10473
10474
10475 if test $seteuid = no; then
10476 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10477 echo "configure:10478: checking for setreuid" >&5
10478 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10479   echo $ac_n "(cached) $ac_c" 1>&6
10480 else
10481   
10482 if test "$cross_compiling" = yes; then
10483   samba_cv_USE_SETREUID=cross
10484 else
10485   cat > conftest.$ac_ext <<EOF
10486 #line 10487 "configure"
10487 #include "confdefs.h"
10488
10489 #define AUTOCONF_TEST 1
10490 #define USE_SETREUID 1
10491 #include "confdefs.h"
10492 #include "${srcdir-.}/lib/util_sec.c"
10493 EOF
10494 if { (eval echo configure:10495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10495 then
10496   samba_cv_USE_SETREUID=yes
10497 else
10498   echo "configure: failed program was:" >&5
10499   cat conftest.$ac_ext >&5
10500   rm -fr conftest*
10501   samba_cv_USE_SETREUID=no
10502 fi
10503 rm -fr conftest*
10504 fi
10505
10506 fi
10507
10508 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10509 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10510     seteuid=yes;cat >> confdefs.h <<\EOF
10511 #define USE_SETREUID 1
10512 EOF
10513
10514 fi
10515 fi
10516
10517 if test $seteuid = no; then
10518 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10519 echo "configure:10520: checking for seteuid" >&5
10520 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10521   echo $ac_n "(cached) $ac_c" 1>&6
10522 else
10523   
10524 if test "$cross_compiling" = yes; then
10525   samba_cv_USE_SETEUID=cross
10526 else
10527   cat > conftest.$ac_ext <<EOF
10528 #line 10529 "configure"
10529 #include "confdefs.h"
10530
10531 #define AUTOCONF_TEST 1
10532 #define USE_SETEUID 1
10533 #include "confdefs.h"
10534 #include "${srcdir-.}/lib/util_sec.c"
10535 EOF
10536 if { (eval echo configure:10537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10537 then
10538   samba_cv_USE_SETEUID=yes
10539 else
10540   echo "configure: failed program was:" >&5
10541   cat conftest.$ac_ext >&5
10542   rm -fr conftest*
10543   samba_cv_USE_SETEUID=no
10544 fi
10545 rm -fr conftest*
10546 fi
10547
10548 fi
10549
10550 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10551 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10552     seteuid=yes;cat >> confdefs.h <<\EOF
10553 #define USE_SETEUID 1
10554 EOF
10555
10556 fi
10557 fi
10558
10559 if test $seteuid = no; then
10560 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10561 echo "configure:10562: checking for setuidx" >&5
10562 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10563   echo $ac_n "(cached) $ac_c" 1>&6
10564 else
10565   
10566 if test "$cross_compiling" = yes; then
10567   samba_cv_USE_SETUIDX=cross
10568 else
10569   cat > conftest.$ac_ext <<EOF
10570 #line 10571 "configure"
10571 #include "confdefs.h"
10572
10573 #define AUTOCONF_TEST 1
10574 #define USE_SETUIDX 1
10575 #include "confdefs.h"
10576 #include "${srcdir-.}/lib/util_sec.c"
10577 EOF
10578 if { (eval echo configure:10579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10579 then
10580   samba_cv_USE_SETUIDX=yes
10581 else
10582   echo "configure: failed program was:" >&5
10583   cat conftest.$ac_ext >&5
10584   rm -fr conftest*
10585   samba_cv_USE_SETUIDX=no
10586 fi
10587 rm -fr conftest*
10588 fi
10589
10590 fi
10591
10592 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10593 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10594     seteuid=yes;cat >> confdefs.h <<\EOF
10595 #define USE_SETUIDX 1
10596 EOF
10597
10598 fi
10599 fi
10600
10601
10602 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10603 echo "configure:10604: checking for working mmap" >&5
10604 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10605   echo $ac_n "(cached) $ac_c" 1>&6
10606 else
10607   
10608 if test "$cross_compiling" = yes; then
10609   samba_cv_HAVE_MMAP=cross
10610 else
10611   cat > conftest.$ac_ext <<EOF
10612 #line 10613 "configure"
10613 #include "confdefs.h"
10614 #include "${srcdir-.}/tests/shared_mmap.c"
10615 EOF
10616 if { (eval echo configure:10617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10617 then
10618   samba_cv_HAVE_MMAP=yes
10619 else
10620   echo "configure: failed program was:" >&5
10621   cat conftest.$ac_ext >&5
10622   rm -fr conftest*
10623   samba_cv_HAVE_MMAP=no
10624 fi
10625 rm -fr conftest*
10626 fi
10627
10628 fi
10629
10630 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10631 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10632     cat >> confdefs.h <<\EOF
10633 #define HAVE_MMAP 1
10634 EOF
10635
10636 fi
10637
10638 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10639 echo "configure:10640: checking for ftruncate needs root" >&5
10640 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10641   echo $ac_n "(cached) $ac_c" 1>&6
10642 else
10643   
10644 if test "$cross_compiling" = yes; then
10645   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10646 else
10647   cat > conftest.$ac_ext <<EOF
10648 #line 10649 "configure"
10649 #include "confdefs.h"
10650 #include "${srcdir-.}/tests/ftruncroot.c"
10651 EOF
10652 if { (eval echo configure:10653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10653 then
10654   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10655 else
10656   echo "configure: failed program was:" >&5
10657   cat conftest.$ac_ext >&5
10658   rm -fr conftest*
10659   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10660 fi
10661 rm -fr conftest*
10662 fi
10663
10664 fi
10665
10666 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10667 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10668     cat >> confdefs.h <<\EOF
10669 #define FTRUNCATE_NEEDS_ROOT 1
10670 EOF
10671
10672 fi
10673
10674 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10675 echo "configure:10676: checking for fcntl locking" >&5
10676 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10677   echo $ac_n "(cached) $ac_c" 1>&6
10678 else
10679   
10680 if test "$cross_compiling" = yes; then
10681   samba_cv_HAVE_FCNTL_LOCK=cross
10682 else
10683   cat > conftest.$ac_ext <<EOF
10684 #line 10685 "configure"
10685 #include "confdefs.h"
10686 #include "${srcdir-.}/tests/fcntl_lock.c"
10687 EOF
10688 if { (eval echo configure:10689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10689 then
10690   samba_cv_HAVE_FCNTL_LOCK=yes
10691 else
10692   echo "configure: failed program was:" >&5
10693   cat conftest.$ac_ext >&5
10694   rm -fr conftest*
10695   samba_cv_HAVE_FCNTL_LOCK=no
10696 fi
10697 rm -fr conftest*
10698 fi
10699
10700 fi
10701
10702 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
10703 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
10704     cat >> confdefs.h <<\EOF
10705 #define HAVE_FCNTL_LOCK 1
10706 EOF
10707
10708 fi
10709
10710 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
10711 echo "configure:10712: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
10712 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
10713   echo $ac_n "(cached) $ac_c" 1>&6
10714 else
10715   
10716 if test "$cross_compiling" = yes; then
10717   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
10718 else
10719   cat > conftest.$ac_ext <<EOF
10720 #line 10721 "configure"
10721 #include "confdefs.h"
10722 #include "${srcdir-.}/tests/fcntl_lock64.c"
10723 EOF
10724 if { (eval echo configure:10725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10725 then
10726   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
10727 else
10728   echo "configure: failed program was:" >&5
10729   cat conftest.$ac_ext >&5
10730   rm -fr conftest*
10731   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
10732 fi
10733 rm -fr conftest*
10734 fi
10735
10736 fi
10737
10738 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
10739 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
10740     cat >> confdefs.h <<\EOF
10741 #define HAVE_BROKEN_FCNTL64_LOCKS 1
10742 EOF
10743
10744
10745 else
10746
10747
10748   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
10749 echo "configure:10750: checking for 64 bit fcntl locking" >&5
10750 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
10751   echo $ac_n "(cached) $ac_c" 1>&6
10752 else
10753   
10754   if test "$cross_compiling" = yes; then
10755   samba_cv_HAVE_STRUCT_FLOCK64=cross
10756 else
10757   cat > conftest.$ac_ext <<EOF
10758 #line 10759 "configure"
10759 #include "confdefs.h"
10760
10761 #if defined(HAVE_UNISTD_H)
10762 #include <unistd.h>
10763 #endif
10764 #include <stdio.h>
10765 #include <stdlib.h>
10766
10767 #ifdef HAVE_FCNTL_H
10768 #include <fcntl.h>
10769 #endif
10770
10771 #ifdef HAVE_SYS_FCNTL_H
10772 #include <sys/fcntl.h>
10773 #endif
10774 main() { struct flock64 fl64;
10775 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
10776 exit(0);
10777 #else
10778 exit(1);
10779 #endif
10780 }
10781 EOF
10782 if { (eval echo configure:10783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10783 then
10784   samba_cv_HAVE_STRUCT_FLOCK64=yes
10785 else
10786   echo "configure: failed program was:" >&5
10787   cat conftest.$ac_ext >&5
10788   rm -fr conftest*
10789   samba_cv_HAVE_STRUCT_FLOCK64=no
10790 fi
10791 rm -fr conftest*
10792 fi
10793
10794 fi
10795
10796 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
10797
10798   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
10799       cat >> confdefs.h <<\EOF
10800 #define HAVE_STRUCT_FLOCK64 1
10801 EOF
10802
10803   fi
10804 fi
10805
10806 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
10807 echo "configure:10808: checking for a crypt that needs truncated salt" >&5
10808 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
10809   echo $ac_n "(cached) $ac_c" 1>&6
10810 else
10811   
10812 if test "$cross_compiling" = yes; then
10813   samba_cv_HAVE_TRUNCATED_SALT=cross
10814 else
10815   cat > conftest.$ac_ext <<EOF
10816 #line 10817 "configure"
10817 #include "confdefs.h"
10818 #include "${srcdir-.}/tests/crypttest.c"
10819 EOF
10820 if { (eval echo configure:10821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10821 then
10822   samba_cv_HAVE_TRUNCATED_SALT=no
10823 else
10824   echo "configure: failed program was:" >&5
10825   cat conftest.$ac_ext >&5
10826   rm -fr conftest*
10827   samba_cv_HAVE_TRUNCATED_SALT=yes
10828 fi
10829 rm -fr conftest*
10830 fi
10831
10832 fi
10833
10834 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
10835 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
10836     cat >> confdefs.h <<\EOF
10837 #define HAVE_TRUNCATED_SALT 1
10838 EOF
10839
10840 fi
10841
10842 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
10843 echo "configure:10844: checking for broken nisplus include files" >&5
10844 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
10845   echo $ac_n "(cached) $ac_c" 1>&6
10846 else
10847   
10848 cat > conftest.$ac_ext <<EOF
10849 #line 10850 "configure"
10850 #include "confdefs.h"
10851 #include <sys/acl.h>
10852 #if defined(HAVE_RPCSVC_NIS_H)
10853 #include <rpcsvc/nis.h>
10854 #endif
10855 int main() {
10856 return 0;
10857 ; return 0; }
10858 EOF
10859 if { (eval echo configure:10860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10860   rm -rf conftest*
10861   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
10862 else
10863   echo "configure: failed program was:" >&5
10864   cat conftest.$ac_ext >&5
10865   rm -rf conftest*
10866   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
10867 fi
10868 rm -f conftest*
10869 fi
10870
10871 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
10872 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
10873     cat >> confdefs.h <<\EOF
10874 #define BROKEN_NISPLUS_INCLUDE_FILES 1
10875 EOF
10876
10877 fi
10878
10879
10880 #################################################
10881 # check for smbwrapper support
10882 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
10883 echo "configure:10884: checking whether to use smbwrapper" >&5
10884 # Check whether --with-smbwrapper or --without-smbwrapper was given.
10885 if test "${with_smbwrapper+set}" = set; then
10886   withval="$with_smbwrapper"
10887    case "$withval" in
10888   yes)
10889     echo "$ac_t""yes" 1>&6
10890     cat >> confdefs.h <<\EOF
10891 #define WITH_SMBWRAPPER 1
10892 EOF
10893
10894         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
10895
10896         if test x$ATTEMPT_WRAP32_BUILD = x; then
10897                 WRAP32=""
10898         else
10899                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
10900         fi
10901
10902 # Conditions under which smbwrapper should not be built.
10903
10904         if test x$PICFLAG = x; then
10905            echo No support for PIC code - disabling smbwrapper and smbsh
10906            WRAP=""
10907            WRAP32=""
10908         elif test x$ac_cv_func_syscall = xno; then
10909            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
10910            WRAP=""
10911            WRAP32=""
10912         fi
10913     ;;
10914   *)
10915     echo "$ac_t""no" 1>&6
10916     ;;
10917   esac 
10918 else
10919   echo "$ac_t""no" 1>&6
10920
10921 fi
10922
10923
10924 #################################################
10925 # check for the AFS filesystem
10926 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
10927 echo "configure:10928: checking whether to use AFS" >&5
10928 # Check whether --with-afs or --without-afs was given.
10929 if test "${with_afs+set}" = set; then
10930   withval="$with_afs"
10931    case "$withval" in
10932   yes)
10933     echo "$ac_t""yes" 1>&6
10934     cat >> confdefs.h <<\EOF
10935 #define WITH_AFS 1
10936 EOF
10937
10938     ;;
10939   *)
10940     echo "$ac_t""no" 1>&6
10941     ;;
10942   esac 
10943 else
10944   echo "$ac_t""no" 1>&6
10945
10946 fi
10947
10948
10949
10950 #################################################
10951 # check for the DFS auth system
10952 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
10953 echo "configure:10954: checking whether to use DFS auth" >&5
10954 # Check whether --with-dfs or --without-dfs was given.
10955 if test "${with_dfs+set}" = set; then
10956   withval="$with_dfs"
10957    case "$withval" in
10958   yes)
10959     echo "$ac_t""yes" 1>&6
10960     cat >> confdefs.h <<\EOF
10961 #define WITH_DFS 1
10962 EOF
10963
10964     ;;
10965   *)
10966     echo "$ac_t""no" 1>&6
10967     ;;
10968   esac 
10969 else
10970   echo "$ac_t""no" 1>&6
10971
10972 fi
10973
10974
10975 #################################################
10976 # check for Kerberos IV auth system
10977 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
10978 echo "configure:10979: checking whether to use Kerberos IV" >&5
10979 # Check whether --with-krb4 or --without-krb4 was given.
10980 if test "${with_krb4+set}" = set; then
10981   withval="$with_krb4"
10982    case "$withval" in
10983   yes)
10984     echo "$ac_t""yes" 1>&6
10985     cat >> confdefs.h <<\EOF
10986 #define KRB4_AUTH 1
10987 EOF
10988
10989     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
10990 echo "configure:10991: checking for dn_expand in -lresolv" >&5
10991 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
10992 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10993   echo $ac_n "(cached) $ac_c" 1>&6
10994 else
10995   ac_save_LIBS="$LIBS"
10996 LIBS="-lresolv  $LIBS"
10997 cat > conftest.$ac_ext <<EOF
10998 #line 10999 "configure"
10999 #include "confdefs.h"
11000 /* Override any gcc2 internal prototype to avoid an error.  */
11001 /* We use char because int might match the return type of a gcc2
11002     builtin and then its argument prototype would still apply.  */
11003 char dn_expand();
11004
11005 int main() {
11006 dn_expand()
11007 ; return 0; }
11008 EOF
11009 if { (eval echo configure:11010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11010   rm -rf conftest*
11011   eval "ac_cv_lib_$ac_lib_var=yes"
11012 else
11013   echo "configure: failed program was:" >&5
11014   cat conftest.$ac_ext >&5
11015   rm -rf conftest*
11016   eval "ac_cv_lib_$ac_lib_var=no"
11017 fi
11018 rm -f conftest*
11019 LIBS="$ac_save_LIBS"
11020
11021 fi
11022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11023   echo "$ac_t""yes" 1>&6
11024     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11025     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11026   cat >> confdefs.h <<EOF
11027 #define $ac_tr_lib 1
11028 EOF
11029
11030   LIBS="-lresolv $LIBS"
11031
11032 else
11033   echo "$ac_t""no" 1>&6
11034 fi
11035
11036     LIBS="$LIBS -lkrb -ldes"
11037     CFLAGS="$CFLAGS -I$withval/include"
11038     LDFLAGS="$LDFLAGS -L$withval/lib"
11039     ;;
11040   *)
11041     echo "$ac_t""no" 1>&6
11042     ;;
11043   esac 
11044 else
11045   echo "$ac_t""no" 1>&6
11046
11047 fi
11048
11049
11050 #################################################
11051 # check for Kerberos 5 auth system
11052 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
11053 echo "configure:11054: checking whether to use Kerberos 5" >&5
11054 # Check whether --with-krb5 or --without-krb5 was given.
11055 if test "${with_krb5+set}" = set; then
11056   withval="$with_krb5"
11057    case "$withval" in
11058   yes)
11059     echo "$ac_t""yes" 1>&6
11060     cat >> confdefs.h <<\EOF
11061 #define KRB5_AUTH 1
11062 EOF
11063
11064     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
11065     CFLAGS="$CFLAGS -I$withval/include"
11066     LDFLAGS="$LDFLAGS -L$withval/lib"
11067     ;;
11068   *)
11069     echo "$ac_t""no" 1>&6
11070     ;;
11071   esac 
11072 else
11073   echo "$ac_t""no" 1>&6
11074
11075 fi
11076
11077
11078 #################################################
11079 # check for automount support
11080 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11081 echo "configure:11082: checking whether to use AUTOMOUNT" >&5
11082 # Check whether --with-automount or --without-automount was given.
11083 if test "${with_automount+set}" = set; then
11084   withval="$with_automount"
11085    case "$withval" in
11086   yes)
11087     echo "$ac_t""yes" 1>&6
11088     cat >> confdefs.h <<\EOF
11089 #define WITH_AUTOMOUNT 1
11090 EOF
11091
11092     ;;
11093   *)
11094     echo "$ac_t""no" 1>&6
11095     ;;
11096   esac 
11097 else
11098   echo "$ac_t""no" 1>&6
11099
11100 fi
11101
11102
11103 #################################################
11104 # check for smbmount support
11105 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11106 echo "configure:11107: checking whether to use SMBMOUNT" >&5
11107 # Check whether --with-smbmount or --without-smbmount was given.
11108 if test "${with_smbmount+set}" = set; then
11109   withval="$with_smbmount"
11110    case "$withval" in
11111   yes)
11112     echo "$ac_t""yes" 1>&6
11113     cat >> confdefs.h <<\EOF
11114 #define WITH_SMBMOUNT 1
11115 EOF
11116
11117     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11118     ;;
11119   *)
11120     echo "$ac_t""no" 1>&6
11121     MPROGS=
11122     ;;
11123   esac 
11124 else
11125   echo "$ac_t""no" 1>&6
11126   MPROGS=
11127
11128 fi
11129
11130
11131
11132 #################################################
11133 # check for a PAM password database
11134
11135 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
11136 echo "configure:11137: checking whether to use PAM password database" >&5
11137 # Check whether --with-pam or --without-pam was given.
11138 if test "${with_pam+set}" = set; then
11139   withval="$with_pam"
11140    case "$withval" in
11141   yes)
11142     echo "$ac_t""yes" 1>&6
11143     cat >> confdefs.h <<\EOF
11144 #define WITH_PAM 1
11145 EOF
11146
11147     LIBS="$LIBS -lpam"
11148     ;;
11149   *)
11150     echo "$ac_t""no" 1>&6
11151     ;;
11152   esac 
11153 else
11154   echo "$ac_t""no" 1>&6
11155
11156 fi
11157
11158
11159 # we can't build a pam module if we don't have pam.
11160 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11161 echo "configure:11162: checking for pam_get_data in -lpam" >&5
11162 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11163 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11164   echo $ac_n "(cached) $ac_c" 1>&6
11165 else
11166   ac_save_LIBS="$LIBS"
11167 LIBS="-lpam  $LIBS"
11168 cat > conftest.$ac_ext <<EOF
11169 #line 11170 "configure"
11170 #include "confdefs.h"
11171 /* Override any gcc2 internal prototype to avoid an error.  */
11172 /* We use char because int might match the return type of a gcc2
11173     builtin and then its argument prototype would still apply.  */
11174 char pam_get_data();
11175
11176 int main() {
11177 pam_get_data()
11178 ; return 0; }
11179 EOF
11180 if { (eval echo configure:11181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11181   rm -rf conftest*
11182   eval "ac_cv_lib_$ac_lib_var=yes"
11183 else
11184   echo "configure: failed program was:" >&5
11185   cat conftest.$ac_ext >&5
11186   rm -rf conftest*
11187   eval "ac_cv_lib_$ac_lib_var=no"
11188 fi
11189 rm -f conftest*
11190 LIBS="$ac_save_LIBS"
11191
11192 fi
11193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11194   echo "$ac_t""yes" 1>&6
11195   cat >> confdefs.h <<\EOF
11196 #define HAVE_LIBPAM 1
11197 EOF
11198
11199 else
11200   echo "$ac_t""no" 1>&6
11201 fi
11202
11203
11204 #################################################
11205 # check for pam_smbpass support
11206 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11207 echo "configure:11208: checking whether to use pam_smbpass" >&5
11208 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11209 if test "${with_pam_smbpass+set}" = set; then
11210   withval="$with_pam_smbpass"
11211    case "$withval" in
11212   yes)
11213     echo "$ac_t""yes" 1>&6
11214
11215 # Conditions under which pam_smbpass should not be built.
11216
11217        if test x$PICFLAG = x; then
11218           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11219           PAM_MOD=""
11220        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11221           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11222           PAM_MOD=""
11223        else
11224           cat >> confdefs.h <<\EOF
11225 #define WITH_PAM_SMBPASS 1
11226 EOF
11227
11228           PAM_MOD="bin/pam_smbpass.so"
11229        fi
11230     ;;
11231   *)
11232     echo "$ac_t""no" 1>&6
11233     ;;
11234   esac 
11235 else
11236   echo "$ac_t""no" 1>&6
11237
11238 fi
11239
11240
11241
11242 ###############################################
11243 # test for where we get crypt() from, but only
11244 # if not using PAM
11245 if test "$with_pam" != yes; then
11246 for ac_func in crypt
11247 do
11248 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11249 echo "configure:11250: checking for $ac_func" >&5
11250 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11251   echo $ac_n "(cached) $ac_c" 1>&6
11252 else
11253   cat > conftest.$ac_ext <<EOF
11254 #line 11255 "configure"
11255 #include "confdefs.h"
11256 /* System header to define __stub macros and hopefully few prototypes,
11257     which can conflict with char $ac_func(); below.  */
11258 #include <assert.h>
11259 /* Override any gcc2 internal prototype to avoid an error.  */
11260 /* We use char because int might match the return type of a gcc2
11261     builtin and then its argument prototype would still apply.  */
11262 char $ac_func();
11263
11264 int main() {
11265
11266 /* The GNU C library defines this for functions which it implements
11267     to always fail with ENOSYS.  Some functions are actually named
11268     something starting with __ and the normal name is an alias.  */
11269 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11270 choke me
11271 #else
11272 $ac_func();
11273 #endif
11274
11275 ; return 0; }
11276 EOF
11277 if { (eval echo configure:11278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11278   rm -rf conftest*
11279   eval "ac_cv_func_$ac_func=yes"
11280 else
11281   echo "configure: failed program was:" >&5
11282   cat conftest.$ac_ext >&5
11283   rm -rf conftest*
11284   eval "ac_cv_func_$ac_func=no"
11285 fi
11286 rm -f conftest*
11287 fi
11288
11289 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11290   echo "$ac_t""yes" 1>&6
11291     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11292   cat >> confdefs.h <<EOF
11293 #define $ac_tr_func 1
11294 EOF
11295  
11296 else
11297   echo "$ac_t""no" 1>&6
11298 fi
11299 done
11300
11301 if test x"$ac_cv_func_crypt" = x"no"; then
11302     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11303 echo "configure:11304: checking for crypt in -lcrypt" >&5
11304 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11305 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11306   echo $ac_n "(cached) $ac_c" 1>&6
11307 else
11308   ac_save_LIBS="$LIBS"
11309 LIBS="-lcrypt  $LIBS"
11310 cat > conftest.$ac_ext <<EOF
11311 #line 11312 "configure"
11312 #include "confdefs.h"
11313 /* Override any gcc2 internal prototype to avoid an error.  */
11314 /* We use char because int might match the return type of a gcc2
11315     builtin and then its argument prototype would still apply.  */
11316 char crypt();
11317
11318 int main() {
11319 crypt()
11320 ; return 0; }
11321 EOF
11322 if { (eval echo configure:11323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11323   rm -rf conftest*
11324   eval "ac_cv_lib_$ac_lib_var=yes"
11325 else
11326   echo "configure: failed program was:" >&5
11327   cat conftest.$ac_ext >&5
11328   rm -rf conftest*
11329   eval "ac_cv_lib_$ac_lib_var=no"
11330 fi
11331 rm -f conftest*
11332 LIBS="$ac_save_LIBS"
11333
11334 fi
11335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11336   echo "$ac_t""yes" 1>&6
11337   LIBS="$LIBS -lcrypt";
11338         cat >> confdefs.h <<\EOF
11339 #define HAVE_CRYPT 1
11340 EOF
11341
11342 else
11343   echo "$ac_t""no" 1>&6
11344 fi
11345
11346 fi
11347 fi
11348
11349
11350 #################################################
11351 # check for a TDB password database
11352 echo $ac_n "checking whether to use TDB password database""... $ac_c" 1>&6
11353 echo "configure:11354: checking whether to use TDB password database" >&5
11354 # Check whether --with-tdbsam or --without-tdbsam was given.
11355 if test "${with_tdbsam+set}" = set; then
11356   withval="$with_tdbsam"
11357    case "$withval" in
11358   yes)
11359     echo "$ac_t""yes" 1>&6
11360     cat >> confdefs.h <<\EOF
11361 #define WITH_TDBPWD 1
11362 EOF
11363
11364 #    AC_MSG_ERROR([TDB password database not supported in this version.])
11365     ;;
11366   *)
11367     echo "$ac_t""no" 1>&6
11368     ;;
11369   esac 
11370 else
11371   echo "$ac_t""no" 1>&6
11372
11373 fi
11374
11375
11376 #################################################
11377 # check for a LDAP password database
11378 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
11379 echo "configure:11380: checking whether to use LDAP password database" >&5
11380 # Check whether --with-ldap or --without-ldap was given.
11381 if test "${with_ldap+set}" = set; then
11382   withval="$with_ldap"
11383    case "$withval" in
11384   yes)
11385     echo "$ac_t""yes" 1>&6
11386     cat >> confdefs.h <<\EOF
11387 #define WITH_LDAP 1
11388 EOF
11389
11390     { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
11391     ;;
11392   *)
11393     echo "$ac_t""no" 1>&6
11394     ;;
11395   esac 
11396 else
11397   echo "$ac_t""no" 1>&6
11398
11399 fi
11400
11401
11402 #################################################
11403 # check for a NISPLUS password database
11404 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
11405 echo "configure:11406: checking whether to use NISPLUS password database" >&5
11406 # Check whether --with-nisplus or --without-nisplus was given.
11407 if test "${with_nisplus+set}" = set; then
11408   withval="$with_nisplus"
11409    case "$withval" in
11410   yes)
11411     echo "$ac_t""yes" 1>&6
11412     cat >> confdefs.h <<\EOF
11413 #define WITH_NISPLUS 1
11414 EOF
11415
11416     ;;
11417   *)
11418     echo "$ac_t""no" 1>&6
11419     ;;
11420   esac 
11421 else
11422   echo "$ac_t""no" 1>&6
11423
11424 fi
11425
11426
11427 #################################################
11428 # check for a NISPLUS_HOME support 
11429 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11430 echo "configure:11431: checking whether to use NISPLUS_HOME" >&5
11431 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11432 if test "${with_nisplus_home+set}" = set; then
11433   withval="$with_nisplus_home"
11434    case "$withval" in
11435   yes)
11436     echo "$ac_t""yes" 1>&6
11437     cat >> confdefs.h <<\EOF
11438 #define WITH_NISPLUS_HOME 1
11439 EOF
11440
11441     ;;
11442   *)
11443     echo "$ac_t""no" 1>&6
11444     ;;
11445   esac 
11446 else
11447   echo "$ac_t""no" 1>&6
11448
11449 fi
11450
11451
11452 #################################################
11453 # check for the secure socket layer
11454 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11455 echo "configure:11456: checking whether to use SSL" >&5
11456 # Check whether --with-ssl or --without-ssl was given.
11457 if test "${with_ssl+set}" = set; then
11458   withval="$with_ssl"
11459    case "$withval" in
11460   yes)
11461     echo "$ac_t""yes" 1>&6
11462     cat >> confdefs.h <<\EOF
11463 #define WITH_SSL 1
11464 EOF
11465
11466     withval="/usr/local/ssl"     # default
11467
11468     if test "${with_sslinc+set}" = set; then
11469
11470         withval="$with_sslinc"
11471         case "$withval" in
11472         yes|no)
11473           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11474           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11475           LIBS="-lssl -lcrypto $LIBS"
11476           LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
11477         ;;
11478         * )
11479           CFLAGS="-I${withval} $CFLAGS"
11480           LIBS="-lssl -lcrypto $LIBS"
11481           LDFLAGS="-L${withval}/lib $LDFLAGS"
11482         ;;
11483         esac
11484
11485     else
11486
11487         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11488         LIBS="-lssl -lcrypto $LIBS"
11489         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11490
11491     fi
11492
11493     if test ! -d ${withval}; then
11494       echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
11495       exit 1
11496     fi 
11497
11498     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
11499
11500     ;;
11501   *)
11502     echo "$ac_t""no" 1>&6
11503     ;;
11504   esac 
11505 else
11506   echo "$ac_t""no" 1>&6
11507
11508 fi
11509
11510
11511 #################################################
11512 # check for syslog logging
11513 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
11514 echo "configure:11515: checking whether to use syslog logging" >&5
11515 # Check whether --with-syslog or --without-syslog was given.
11516 if test "${with_syslog+set}" = set; then
11517   withval="$with_syslog"
11518    case "$withval" in
11519   yes)
11520     echo "$ac_t""yes" 1>&6
11521     cat >> confdefs.h <<\EOF
11522 #define WITH_SYSLOG 1
11523 EOF
11524
11525     ;;
11526   *)
11527     echo "$ac_t""no" 1>&6
11528     ;;
11529   esac 
11530 else
11531   echo "$ac_t""no" 1>&6
11532
11533 fi
11534
11535
11536 #################################################
11537 # check for a shared memory profiling support
11538 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
11539 echo "configure:11540: checking whether to use profiling" >&5
11540 # Check whether --with-profile or --without-profile was given.
11541 if test "${with_profile+set}" = set; then
11542   withval="$with_profile"
11543    case "$withval" in
11544   yes)
11545     echo "$ac_t""yes" 1>&6
11546     cat >> confdefs.h <<\EOF
11547 #define WITH_PROFILE 1
11548 EOF
11549
11550     ;;
11551   *)
11552     echo "$ac_t""no" 1>&6
11553     ;;
11554   esac 
11555 else
11556   echo "$ac_t""no" 1>&6
11557
11558 fi
11559
11560
11561
11562 #################################################
11563 # check for experimental netatalk resource fork support
11564 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
11565 echo "configure:11566: checking whether to support netatalk" >&5
11566 # Check whether --with-netatalk or --without-netatalk was given.
11567 if test "${with_netatalk+set}" = set; then
11568   withval="$with_netatalk"
11569    case "$withval" in
11570   yes)
11571     echo "$ac_t""yes" 1>&6
11572     cat >> confdefs.h <<\EOF
11573 #define WITH_NETATALK 1
11574 EOF
11575
11576     ;;
11577   *)
11578     echo "$ac_t""no" 1>&6
11579     ;;
11580   esac 
11581 else
11582   echo "$ac_t""no" 1>&6
11583
11584 fi
11585
11586
11587 #################################################
11588 # check for experimental disk-quotas support
11589 QUOTAOBJS=smbd/noquotas.o
11590
11591 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
11592 echo "configure:11593: checking whether to support disk-quotas" >&5
11593 # Check whether --with-quotas or --without-quotas was given.
11594 if test "${with_quotas+set}" = set; then
11595   withval="$with_quotas"
11596    case "$withval" in
11597   yes)
11598     echo "$ac_t""yes" 1>&6
11599     QUOTAOBJS=smbd/quotas.o
11600     ;;
11601   *)
11602     echo "$ac_t""no" 1>&6
11603     ;;
11604   esac 
11605 else
11606   echo "$ac_t""no" 1>&6
11607
11608 fi
11609
11610
11611
11612 #################################################
11613 # check for experimental utmp accounting
11614
11615 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
11616 echo "configure:11617: checking whether to support utmp accounting" >&5
11617 # Check whether --with-utmp or --without-utmp was given.
11618 if test "${with_utmp+set}" = set; then
11619   withval="$with_utmp"
11620    case "$withval" in
11621   yes)
11622     echo "$ac_t""yes" 1>&6
11623     cat >> confdefs.h <<\EOF
11624 #define WITH_UTMP 1
11625 EOF
11626
11627     ;;
11628   *)
11629     echo "$ac_t""no" 1>&6
11630     ;;
11631   esac 
11632 else
11633   echo "$ac_t""no" 1>&6
11634
11635 fi
11636
11637
11638 #################################################
11639 # check for MS Dfs support
11640
11641 echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
11642 echo "configure:11643: checking whether to support Microsoft Dfs" >&5
11643 # Check whether --with-msdfs or --without-msdfs was given.
11644 if test "${with_msdfs+set}" = set; then
11645   withval="$with_msdfs"
11646    case "$withval" in
11647   yes)
11648      echo "$ac_t""yes" 1>&6
11649      cat >> confdefs.h <<\EOF
11650 #define WITH_MSDFS 1
11651 EOF
11652
11653      ;;
11654   *)
11655     echo "$ac_t""no" 1>&6
11656     ;;
11657   esac 
11658 else
11659   echo "$ac_t""no" 1>&6
11660
11661 fi
11662
11663
11664 #################################################
11665 # set private directory location
11666 # Check whether --with-privatedir or --without-privatedir was given.
11667 if test "${with_privatedir+set}" = set; then
11668   withval="$with_privatedir"
11669    case "$withval" in
11670   yes|no)
11671   #
11672   # Just in case anybody calls it without argument
11673   #
11674     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
11675     privatedir='${prefix}/private'
11676   ;;
11677   * )
11678     privatedir="$withval"
11679     ;;
11680   esac
11681   
11682 else
11683   privatedir='${prefix}/private'
11684    
11685
11686 fi
11687
11688
11689 #################################################
11690 # set lock directory location
11691 # Check whether --with-lockdir or --without-lockdir was given.
11692 if test "${with_lockdir+set}" = set; then
11693   withval="$with_lockdir"
11694    case "$withval" in
11695   yes|no)
11696   #
11697   # Just in case anybody calls it without argument
11698   #
11699     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
11700     lockdir='$(VARDIR)/locks'
11701   ;;
11702   * )
11703     lockdir="$withval"
11704     ;;
11705   esac
11706   
11707 else
11708   lockdir='$(VARDIR)/locks'
11709    
11710
11711 fi
11712
11713
11714 #################################################
11715 # set SWAT directory location
11716 # Check whether --with-swatdir or --without-swatdir was given.
11717 if test "${with_swatdir+set}" = set; then
11718   withval="$with_swatdir"
11719    case "$withval" in
11720   yes|no)
11721   #
11722   # Just in case anybody does it
11723   #
11724     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
11725     swatdir='${prefix}/swat'
11726   ;;
11727   * )
11728     swatdir="$withval"
11729     ;;
11730   esac
11731   
11732 else
11733   swatdir='${prefix}/swat'
11734    
11735
11736 fi
11737
11738
11739 #################################################
11740 # these tests are taken from the GNU fileutils package
11741 echo "checking how to get filesystem space usage" 1>&6
11742 echo "configure:11743: checking how to get filesystem space usage" >&5
11743 space=no
11744
11745 # Test for statvfs64.
11746 if test $space = no; then
11747   # SVR4
11748   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
11749 echo "configure:11750: checking statvfs64 function (SVR4)" >&5
11750 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
11751   echo $ac_n "(cached) $ac_c" 1>&6
11752 else
11753   if test "$cross_compiling" = yes; then
11754   fu_cv_sys_stat_statvfs64=cross
11755 else
11756   cat > conftest.$ac_ext <<EOF
11757 #line 11758 "configure"
11758 #include "confdefs.h"
11759
11760 #if defined(HAVE_UNISTD_H)
11761 #include <unistd.h>
11762 #endif
11763 #include <sys/types.h>
11764 #include <sys/statvfs.h>
11765   main ()
11766   {
11767     struct statvfs64 fsd;
11768     exit (statvfs64 (".", &fsd));
11769   }
11770 EOF
11771 if { (eval echo configure:11772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11772 then
11773   fu_cv_sys_stat_statvfs64=yes
11774 else
11775   echo "configure: failed program was:" >&5
11776   cat conftest.$ac_ext >&5
11777   rm -fr conftest*
11778   fu_cv_sys_stat_statvfs64=no
11779 fi
11780 rm -fr conftest*
11781 fi
11782
11783 fi
11784
11785 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
11786   if test $fu_cv_sys_stat_statvfs64 = yes; then
11787     space=yes
11788     cat >> confdefs.h <<\EOF
11789 #define STAT_STATVFS64 1
11790 EOF
11791
11792   fi
11793 fi
11794
11795 # Perform only the link test since it seems there are no variants of the
11796 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
11797 # because that got a false positive on SCO OSR5.  Adding the declaration
11798 # of a `struct statvfs' causes this test to fail (as it should) on such
11799 # systems.  That system is reported to work fine with STAT_STATFS4 which
11800 # is what it gets when this test fails.
11801 if test $space = no; then
11802   # SVR4
11803   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
11804 echo "configure:11805: checking statvfs function (SVR4)" >&5
11805 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
11806   echo $ac_n "(cached) $ac_c" 1>&6
11807 else
11808   cat > conftest.$ac_ext <<EOF
11809 #line 11810 "configure"
11810 #include "confdefs.h"
11811 #include <sys/types.h>
11812 #include <sys/statvfs.h>
11813 int main() {
11814 struct statvfs fsd; statvfs (0, &fsd);
11815 ; return 0; }
11816 EOF
11817 if { (eval echo configure:11818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11818   rm -rf conftest*
11819   fu_cv_sys_stat_statvfs=yes
11820 else
11821   echo "configure: failed program was:" >&5
11822   cat conftest.$ac_ext >&5
11823   rm -rf conftest*
11824   fu_cv_sys_stat_statvfs=no
11825 fi
11826 rm -f conftest*
11827 fi
11828
11829 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
11830   if test $fu_cv_sys_stat_statvfs = yes; then
11831     space=yes
11832     cat >> confdefs.h <<\EOF
11833 #define STAT_STATVFS 1
11834 EOF
11835
11836   fi
11837 fi
11838
11839 if test $space = no; then
11840   # DEC Alpha running OSF/1
11841   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
11842 echo "configure:11843: checking for 3-argument statfs function (DEC OSF/1)" >&5
11843   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
11844   echo $ac_n "(cached) $ac_c" 1>&6
11845 else
11846   if test "$cross_compiling" = yes; then
11847   fu_cv_sys_stat_statfs3_osf1=no
11848 else
11849   cat > conftest.$ac_ext <<EOF
11850 #line 11851 "configure"
11851 #include "confdefs.h"
11852
11853 #include <sys/param.h>
11854 #include <sys/types.h>
11855 #include <sys/mount.h>
11856   main ()
11857   {
11858     struct statfs fsd;
11859     fsd.f_fsize = 0;
11860     exit (statfs (".", &fsd, sizeof (struct statfs)));
11861   }
11862 EOF
11863 if { (eval echo configure:11864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11864 then
11865   fu_cv_sys_stat_statfs3_osf1=yes
11866 else
11867   echo "configure: failed program was:" >&5
11868   cat conftest.$ac_ext >&5
11869   rm -fr conftest*
11870   fu_cv_sys_stat_statfs3_osf1=no
11871 fi
11872 rm -fr conftest*
11873 fi
11874
11875 fi
11876
11877   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
11878   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
11879     space=yes
11880     cat >> confdefs.h <<\EOF
11881 #define STAT_STATFS3_OSF1 1
11882 EOF
11883
11884   fi
11885 fi
11886
11887 if test $space = no; then
11888 # AIX
11889   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
11890 echo "configure:11891: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
11891   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
11892   echo $ac_n "(cached) $ac_c" 1>&6
11893 else
11894   if test "$cross_compiling" = yes; then
11895   fu_cv_sys_stat_statfs2_bsize=no
11896 else
11897   cat > conftest.$ac_ext <<EOF
11898 #line 11899 "configure"
11899 #include "confdefs.h"
11900
11901 #ifdef HAVE_SYS_PARAM_H
11902 #include <sys/param.h>
11903 #endif
11904 #ifdef HAVE_SYS_MOUNT_H
11905 #include <sys/mount.h>
11906 #endif
11907 #ifdef HAVE_SYS_VFS_H
11908 #include <sys/vfs.h>
11909 #endif
11910   main ()
11911   {
11912   struct statfs fsd;
11913   fsd.f_bsize = 0;
11914   exit (statfs (".", &fsd));
11915   }
11916 EOF
11917 if { (eval echo configure:11918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11918 then
11919   fu_cv_sys_stat_statfs2_bsize=yes
11920 else
11921   echo "configure: failed program was:" >&5
11922   cat conftest.$ac_ext >&5
11923   rm -fr conftest*
11924   fu_cv_sys_stat_statfs2_bsize=no
11925 fi
11926 rm -fr conftest*
11927 fi
11928
11929 fi
11930
11931   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
11932   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
11933     space=yes
11934     cat >> confdefs.h <<\EOF
11935 #define STAT_STATFS2_BSIZE 1
11936 EOF
11937
11938   fi
11939 fi
11940
11941 if test $space = no; then
11942 # SVR3
11943   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
11944 echo "configure:11945: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
11945   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
11946   echo $ac_n "(cached) $ac_c" 1>&6
11947 else
11948   if test "$cross_compiling" = yes; then
11949   fu_cv_sys_stat_statfs4=no
11950 else
11951   cat > conftest.$ac_ext <<EOF
11952 #line 11953 "configure"
11953 #include "confdefs.h"
11954 #include <sys/types.h>
11955 #include <sys/statfs.h>
11956   main ()
11957   {
11958   struct statfs fsd;
11959   exit (statfs (".", &fsd, sizeof fsd, 0));
11960   }
11961 EOF
11962 if { (eval echo configure:11963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11963 then
11964   fu_cv_sys_stat_statfs4=yes
11965 else
11966   echo "configure: failed program was:" >&5
11967   cat conftest.$ac_ext >&5
11968   rm -fr conftest*
11969   fu_cv_sys_stat_statfs4=no
11970 fi
11971 rm -fr conftest*
11972 fi
11973
11974 fi
11975
11976   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
11977   if test $fu_cv_sys_stat_statfs4 = yes; then
11978     space=yes
11979     cat >> confdefs.h <<\EOF
11980 #define STAT_STATFS4 1
11981 EOF
11982
11983   fi
11984 fi
11985
11986 if test $space = no; then
11987 # 4.4BSD and NetBSD
11988   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
11989 echo "configure:11990: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
11990   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
11991   echo $ac_n "(cached) $ac_c" 1>&6
11992 else
11993   if test "$cross_compiling" = yes; then
11994   fu_cv_sys_stat_statfs2_fsize=no
11995 else
11996   cat > conftest.$ac_ext <<EOF
11997 #line 11998 "configure"
11998 #include "confdefs.h"
11999 #include <sys/types.h>
12000 #ifdef HAVE_SYS_PARAM_H
12001 #include <sys/param.h>
12002 #endif
12003 #ifdef HAVE_SYS_MOUNT_H
12004 #include <sys/mount.h>
12005 #endif
12006   main ()
12007   {
12008   struct statfs fsd;
12009   fsd.f_fsize = 0;
12010   exit (statfs (".", &fsd));
12011   }
12012 EOF
12013 if { (eval echo configure:12014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12014 then
12015   fu_cv_sys_stat_statfs2_fsize=yes
12016 else
12017   echo "configure: failed program was:" >&5
12018   cat conftest.$ac_ext >&5
12019   rm -fr conftest*
12020   fu_cv_sys_stat_statfs2_fsize=no
12021 fi
12022 rm -fr conftest*
12023 fi
12024
12025 fi
12026
12027   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12028   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12029     space=yes
12030     cat >> confdefs.h <<\EOF
12031 #define STAT_STATFS2_FSIZE 1
12032 EOF
12033
12034   fi
12035 fi
12036
12037 if test $space = no; then
12038   # Ultrix
12039   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12040 echo "configure:12041: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12041   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12042   echo $ac_n "(cached) $ac_c" 1>&6
12043 else
12044   if test "$cross_compiling" = yes; then
12045   fu_cv_sys_stat_fs_data=no
12046 else
12047   cat > conftest.$ac_ext <<EOF
12048 #line 12049 "configure"
12049 #include "confdefs.h"
12050 #include <sys/types.h>
12051 #ifdef HAVE_SYS_PARAM_H
12052 #include <sys/param.h>
12053 #endif
12054 #ifdef HAVE_SYS_MOUNT_H
12055 #include <sys/mount.h>
12056 #endif
12057 #ifdef HAVE_SYS_FS_TYPES_H
12058 #include <sys/fs_types.h>
12059 #endif
12060   main ()
12061   {
12062   struct fs_data fsd;
12063   /* Ultrix's statfs returns 1 for success,
12064      0 for not mounted, -1 for failure.  */
12065   exit (statfs (".", &fsd) != 1);
12066   }
12067 EOF
12068 if { (eval echo configure:12069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12069 then
12070   fu_cv_sys_stat_fs_data=yes
12071 else
12072   echo "configure: failed program was:" >&5
12073   cat conftest.$ac_ext >&5
12074   rm -fr conftest*
12075   fu_cv_sys_stat_fs_data=no
12076 fi
12077 rm -fr conftest*
12078 fi
12079
12080 fi
12081
12082   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12083   if test $fu_cv_sys_stat_fs_data = yes; then
12084     space=yes
12085     cat >> confdefs.h <<\EOF
12086 #define STAT_STATFS2_FS_DATA 1
12087 EOF
12088
12089   fi
12090 fi
12091
12092 #
12093 # As a gating factor for large file support, in order to
12094 # use <4GB files we must have the following minimal support
12095 # available.
12096 # long long, and a 64 bit off_t or off64_t.
12097 # If we don't have all of these then disable large
12098 # file support.
12099 #
12100 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12101 echo "configure:12102: checking if large file support can be enabled" >&5
12102 cat > conftest.$ac_ext <<EOF
12103 #line 12104 "configure"
12104 #include "confdefs.h"
12105
12106 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12107 #include <sys/types.h>
12108 #else
12109 __COMPILE_ERROR_
12110 #endif
12111
12112 int main() {
12113 int i
12114 ; return 0; }
12115 EOF
12116 if { (eval echo configure:12117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12117   rm -rf conftest*
12118   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12119 else
12120   echo "configure: failed program was:" >&5
12121   cat conftest.$ac_ext >&5
12122   rm -rf conftest*
12123   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12124 fi
12125 rm -f conftest*
12126 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12127     cat >> confdefs.h <<\EOF
12128 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12129 EOF
12130
12131 fi
12132 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12133
12134 # Check whether --with-spinlocks or --without-spinlocks was given.
12135 if test "${with_spinlocks+set}" = set; then
12136   withval="$with_spinlocks"
12137   :
12138 fi
12139
12140 if test "x$with_spinlocks" = "xyes"; then
12141     cat >> confdefs.h <<\EOF
12142 #define USE_SPINLOCKS 1
12143 EOF
12144
12145
12146     case "$host_cpu" in
12147         sparc)
12148             cat >> confdefs.h <<\EOF
12149 #define SPARC_SPINLOCKS 1
12150 EOF
12151
12152             ;;
12153
12154         i386|i486|i586|i686)
12155             cat >> confdefs.h <<\EOF
12156 #define INTEL_SPINLOCKS 1
12157 EOF
12158
12159             ;;
12160
12161         mips)
12162             cat >> confdefs.h <<\EOF
12163 #define MIPS_SPINLOCKS 1
12164 EOF
12165
12166             ;;
12167
12168         powerpc)
12169             cat >> confdefs.h <<\EOF
12170 #define POWERPC_SPINLOCKS 1
12171 EOF
12172
12173             ;;
12174     esac
12175 fi
12176
12177 #################################################
12178 # check for ACL support
12179
12180 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12181 echo "configure:12182: checking whether to support ACLs" >&5
12182 # Check whether --with-acl-support or --without-acl-support was given.
12183 if test "${with_acl_support+set}" = set; then
12184   withval="$with_acl_support"
12185    case "$withval" in
12186   yes)
12187
12188         case "$host_os" in
12189         *sysv5*)
12190             echo "$ac_t""Using UnixWare ACLs" 1>&6
12191             cat >> confdefs.h <<\EOF
12192 #define HAVE_UNIXWARE_ACLS 1
12193 EOF
12194
12195             ;;
12196         *solaris*)
12197             echo "$ac_t""Using solaris ACLs" 1>&6
12198             cat >> confdefs.h <<\EOF
12199 #define HAVE_SOLARIS_ACLS 1
12200 EOF
12201
12202             ;;
12203                 *irix*)
12204                         echo "$ac_t""Using IRIX ACLs" 1>&6
12205                         cat >> confdefs.h <<\EOF
12206 #define HAVE_IRIX_ACLS 1
12207 EOF
12208
12209                         ;;
12210                 *aix*)
12211                         echo "$ac_t""Using AIX ACLs" 1>&6
12212                         cat >> confdefs.h <<\EOF
12213 #define HAVE_AIX_ACLS 1
12214 EOF
12215
12216                         ;;
12217         *)
12218                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12219 echo "configure:12220: checking for acl_get_file in -lacl" >&5
12220 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12221 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12222   echo $ac_n "(cached) $ac_c" 1>&6
12223 else
12224   ac_save_LIBS="$LIBS"
12225 LIBS="-lacl  $LIBS"
12226 cat > conftest.$ac_ext <<EOF
12227 #line 12228 "configure"
12228 #include "confdefs.h"
12229 /* Override any gcc2 internal prototype to avoid an error.  */
12230 /* We use char because int might match the return type of a gcc2
12231     builtin and then its argument prototype would still apply.  */
12232 char acl_get_file();
12233
12234 int main() {
12235 acl_get_file()
12236 ; return 0; }
12237 EOF
12238 if { (eval echo configure:12239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12239   rm -rf conftest*
12240   eval "ac_cv_lib_$ac_lib_var=yes"
12241 else
12242   echo "configure: failed program was:" >&5
12243   cat conftest.$ac_ext >&5
12244   rm -rf conftest*
12245   eval "ac_cv_lib_$ac_lib_var=no"
12246 fi
12247 rm -f conftest*
12248 LIBS="$ac_save_LIBS"
12249
12250 fi
12251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12252   echo "$ac_t""yes" 1>&6
12253     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12254     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12255   cat >> confdefs.h <<EOF
12256 #define $ac_tr_lib 1
12257 EOF
12258
12259   LIBS="-lacl $LIBS"
12260
12261 else
12262   echo "$ac_t""no" 1>&6
12263 fi
12264
12265                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12266 echo "configure:12267: checking for ACL support" >&5
12267 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12268   echo $ac_n "(cached) $ac_c" 1>&6
12269 else
12270   
12271                         cat > conftest.$ac_ext <<EOF
12272 #line 12273 "configure"
12273 #include "confdefs.h"
12274 #include <sys/types.h>
12275 #include <sys/acl.h>
12276 int main() {
12277  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12278 ; return 0; }
12279 EOF
12280 if { (eval echo configure:12281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12281   rm -rf conftest*
12282   samba_cv_HAVE_POSIX_ACLS=yes
12283 else
12284   echo "configure: failed program was:" >&5
12285   cat conftest.$ac_ext >&5
12286   rm -rf conftest*
12287   samba_cv_HAVE_POSIX_ACLS=no
12288 fi
12289 rm -f conftest*
12290 fi
12291
12292 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12293                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12294                                 echo "$ac_t""Using posix ACLs" 1>&6
12295                                 cat >> confdefs.h <<\EOF
12296 #define HAVE_POSIX_ACLS 1
12297 EOF
12298
12299                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12300 echo "configure:12301: checking for acl_get_perm_np" >&5
12301 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12302   echo $ac_n "(cached) $ac_c" 1>&6
12303 else
12304   
12305                                 cat > conftest.$ac_ext <<EOF
12306 #line 12307 "configure"
12307 #include "confdefs.h"
12308 #include <sys/types.h>
12309 #include <sys/acl.h>
12310 int main() {
12311  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12312 ; return 0; }
12313 EOF
12314 if { (eval echo configure:12315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12315   rm -rf conftest*
12316   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12317 else
12318   echo "configure: failed program was:" >&5
12319   cat conftest.$ac_ext >&5
12320   rm -rf conftest*
12321   samba_cv_HAVE_ACL_GET_PERM_NP=no
12322 fi
12323 rm -f conftest*
12324 fi
12325
12326 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12327                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12328                                         cat >> confdefs.h <<\EOF
12329 #define HAVE_ACL_GET_PERM_NP 1
12330 EOF
12331
12332                                 fi
12333                         fi
12334             ;;
12335         esac
12336         ;;
12337   *)
12338     echo "$ac_t""no" 1>&6
12339     cat >> confdefs.h <<\EOF
12340 #define HAVE_NO_ACLS 1
12341 EOF
12342
12343     ;;
12344   esac 
12345 else
12346   cat >> confdefs.h <<\EOF
12347 #define HAVE_NO_ACLS 1
12348 EOF
12349
12350   echo "$ac_t""no" 1>&6
12351
12352 fi
12353
12354
12355 #################################################
12356 # check whether winbind is supported on this platform
12357
12358 echo $ac_n "checking whether to compile winbind""... $ac_c" 1>&6
12359 echo "configure:12360: checking whether to compile winbind" >&5
12360
12361 case "$host_os" in 
12362         *linux*|*solaris*)
12363                 WINBIND_TARGETS="$WINBIND_TARGETS \$(WINBIND_PROGS)"
12364                 case "$with_pam" in
12365                         yes)
12366                                 WINBIND_TARGETS="$WINBIND_TARGETS \$(WINBIND_PAM_PROGS)"
12367                         ;;
12368                         *)
12369                 esac
12370                 ;;
12371         *)
12372                 winbind_no_reason=", unsupported on $host_os"
12373                 ;;
12374 esac
12375
12376 # Check whether --with-winbind or --without-winbind was given.
12377 if test "${with_winbind+set}" = set; then
12378   withval="$with_winbind"
12379    
12380   case "$withval" in
12381         no)
12382                 WINBIND_TARGETS=""
12383                 winbind_reason=""
12384                 ;;
12385   esac 
12386 fi
12387
12388
12389 if test x"$WINBIND_TARGETS" = x; then
12390         echo "$ac_t""no$winbind_no_reason" 1>&6
12391 else
12392         echo "$ac_t""yes" 1>&6
12393 fi
12394
12395
12396
12397 #################################################
12398 # final configure stuff
12399
12400 echo "checking configure summary"
12401 if test "$cross_compiling" = yes; then
12402   :
12403 else
12404   cat > conftest.$ac_ext <<EOF
12405 #line 12406 "configure"
12406 #include "confdefs.h"
12407 #include "${srcdir-.}/tests/summary.c"
12408 EOF
12409 if { (eval echo configure:12410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12410 then
12411   echo "configure OK";
12412 else
12413   echo "configure: failed program was:" >&5
12414   cat conftest.$ac_ext >&5
12415   rm -fr conftest*
12416   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
12417 fi
12418 rm -fr conftest*
12419 fi
12420
12421
12422 builddir=`pwd`
12423
12424
12425 trap '' 1 2 15
12426 cat > confcache <<\EOF
12427 # This file is a shell script that caches the results of configure
12428 # tests run on this system so they can be shared between configure
12429 # scripts and configure runs.  It is not useful on other systems.
12430 # If it contains results you don't want to keep, you may remove or edit it.
12431 #
12432 # By default, configure uses ./config.cache as the cache file,
12433 # creating it if it does not exist already.  You can give configure
12434 # the --cache-file=FILE option to use a different cache file; that is
12435 # what configure does when it calls configure scripts in
12436 # subdirectories, so they share the cache.
12437 # Giving --cache-file=/dev/null disables caching, for debugging configure.
12438 # config.status only pays attention to the cache file if you give it the
12439 # --recheck option to rerun configure.
12440 #
12441 EOF
12442 # The following way of writing the cache mishandles newlines in values,
12443 # but we know of no workaround that is simple, portable, and efficient.
12444 # So, don't put newlines in cache variables' values.
12445 # Ultrix sh set writes to stderr and can't be redirected directly,
12446 # and sets the high bit in the cache file unless we assign to the vars.
12447 (set) 2>&1 |
12448   case `(ac_space=' '; set | grep ac_space) 2>&1` in
12449   *ac_space=\ *)
12450     # `set' does not quote correctly, so add quotes (double-quote substitution
12451     # turns \\\\ into \\, and sed turns \\ into \).
12452     sed -n \
12453       -e "s/'/'\\\\''/g" \
12454       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
12455     ;;
12456   *)
12457     # `set' quotes correctly as required by POSIX, so do not add quotes.
12458     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
12459     ;;
12460   esac >> confcache
12461 if cmp -s $cache_file confcache; then
12462   :
12463 else
12464   if test -w $cache_file; then
12465     echo "updating cache $cache_file"
12466     cat confcache > $cache_file
12467   else
12468     echo "not updating unwritable cache $cache_file"
12469   fi
12470 fi
12471 rm -f confcache
12472
12473 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12474
12475 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12476 # Let make expand exec_prefix.
12477 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12478
12479 # Any assignment to VPATH causes Sun make to only execute
12480 # the first set of double-colon rules, so remove it if not needed.
12481 # If there is a colon in the path, we need to keep it.
12482 if test "x$srcdir" = x.; then
12483   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12484 fi
12485
12486 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12487
12488 DEFS=-DHAVE_CONFIG_H
12489
12490 # Without the "./", some shells look in PATH for config.status.
12491 : ${CONFIG_STATUS=./config.status}
12492
12493 echo creating $CONFIG_STATUS
12494 rm -f $CONFIG_STATUS
12495 cat > $CONFIG_STATUS <<EOF
12496 #! /bin/sh
12497 # Generated automatically by configure.
12498 # Run this file to recreate the current configuration.
12499 # This directory was configured as follows,
12500 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12501 #
12502 # $0 $ac_configure_args
12503 #
12504 # Compiler output produced by configure, useful for debugging
12505 # configure, is in ./config.log if it exists.
12506
12507 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12508 for ac_option
12509 do
12510   case "\$ac_option" in
12511   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12512     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12513     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12514   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12515     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12516     exit 0 ;;
12517   -help | --help | --hel | --he | --h)
12518     echo "\$ac_cs_usage"; exit 0 ;;
12519   *) echo "\$ac_cs_usage"; exit 1 ;;
12520   esac
12521 done
12522
12523 ac_given_srcdir=$srcdir
12524 ac_given_INSTALL="$INSTALL"
12525
12526 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12527 EOF
12528 cat >> $CONFIG_STATUS <<EOF
12529
12530 # Protect against being on the right side of a sed subst in config.status.
12531 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12532  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12533 $ac_vpsub
12534 $extrasub
12535 s%@SHELL@%$SHELL%g
12536 s%@CFLAGS@%$CFLAGS%g
12537 s%@CPPFLAGS@%$CPPFLAGS%g
12538 s%@CXXFLAGS@%$CXXFLAGS%g
12539 s%@FFLAGS@%$FFLAGS%g
12540 s%@DEFS@%$DEFS%g
12541 s%@LDFLAGS@%$LDFLAGS%g
12542 s%@LIBS@%$LIBS%g
12543 s%@exec_prefix@%$exec_prefix%g
12544 s%@prefix@%$prefix%g
12545 s%@program_transform_name@%$program_transform_name%g
12546 s%@bindir@%$bindir%g
12547 s%@sbindir@%$sbindir%g
12548 s%@libexecdir@%$libexecdir%g
12549 s%@datadir@%$datadir%g
12550 s%@sysconfdir@%$sysconfdir%g
12551 s%@sharedstatedir@%$sharedstatedir%g
12552 s%@localstatedir@%$localstatedir%g
12553 s%@libdir@%$libdir%g
12554 s%@includedir@%$includedir%g
12555 s%@oldincludedir@%$oldincludedir%g
12556 s%@infodir@%$infodir%g
12557 s%@mandir@%$mandir%g
12558 s%@RUNPROG@%$RUNPROG%g
12559 s%@MPROGS@%$MPROGS%g
12560 s%@LDSHFLAGS@%$LDSHFLAGS%g
12561 s%@SHLD@%$SHLD%g
12562 s%@HOST_OS@%$HOST_OS%g
12563 s%@PAM_MOD@%$PAM_MOD%g
12564 s%@WRAP@%$WRAP%g
12565 s%@WRAP32@%$WRAP32%g
12566 s%@PICFLAG@%$PICFLAG%g
12567 s%@PICSUFFIX@%$PICSUFFIX%g
12568 s%@POBAD_CC@%$POBAD_CC%g
12569 s%@SHLIBEXT@%$SHLIBEXT%g
12570 s%@BLDSHARED@%$BLDSHARED%g
12571 s%@CC@%$CC%g
12572 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12573 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12574 s%@INSTALL_DATA@%$INSTALL_DATA%g
12575 s%@AWK@%$AWK%g
12576 s%@BROKEN_CC@%$BROKEN_CC%g
12577 s%@host@%$host%g
12578 s%@host_alias@%$host_alias%g
12579 s%@host_cpu@%$host_cpu%g
12580 s%@host_vendor@%$host_vendor%g
12581 s%@host_os@%$host_os%g
12582 s%@target@%$target%g
12583 s%@target_alias@%$target_alias%g
12584 s%@target_cpu@%$target_cpu%g
12585 s%@target_vendor@%$target_vendor%g
12586 s%@target_os@%$target_os%g
12587 s%@build@%$build%g
12588 s%@build_alias@%$build_alias%g
12589 s%@build_cpu@%$build_cpu%g
12590 s%@build_vendor@%$build_vendor%g
12591 s%@build_os@%$build_os%g
12592 s%@CPP@%$CPP%g
12593 s%@LIBOBJS@%$LIBOBJS%g
12594 s%@TERMLIBS@%$TERMLIBS%g
12595 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
12596 s%@ROFF@%$ROFF%g
12597 s%@QUOTAOBJS@%$QUOTAOBJS%g
12598 s%@privatedir@%$privatedir%g
12599 s%@lockdir@%$lockdir%g
12600 s%@swatdir@%$swatdir%g
12601 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
12602 s%@builddir@%$builddir%g
12603
12604 CEOF
12605 EOF
12606
12607 cat >> $CONFIG_STATUS <<\EOF
12608
12609 # Split the substitutions into bite-sized pieces for seds with
12610 # small command number limits, like on Digital OSF/1 and HP-UX.
12611 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12612 ac_file=1 # Number of current file.
12613 ac_beg=1 # First line for current file.
12614 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12615 ac_more_lines=:
12616 ac_sed_cmds=""
12617 while $ac_more_lines; do
12618   if test $ac_beg -gt 1; then
12619     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12620   else
12621     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12622   fi
12623   if test ! -s conftest.s$ac_file; then
12624     ac_more_lines=false
12625     rm -f conftest.s$ac_file
12626   else
12627     if test -z "$ac_sed_cmds"; then
12628       ac_sed_cmds="sed -f conftest.s$ac_file"
12629     else
12630       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12631     fi
12632     ac_file=`expr $ac_file + 1`
12633     ac_beg=$ac_end
12634     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12635   fi
12636 done
12637 if test -z "$ac_sed_cmds"; then
12638   ac_sed_cmds=cat
12639 fi
12640 EOF
12641
12642 cat >> $CONFIG_STATUS <<EOF
12643
12644 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
12645 EOF
12646 cat >> $CONFIG_STATUS <<\EOF
12647 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12648   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12649   case "$ac_file" in
12650   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12651        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12652   *) ac_file_in="${ac_file}.in" ;;
12653   esac
12654
12655   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12656
12657   # Remove last slash and all that follows it.  Not all systems have dirname.
12658   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12659   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12660     # The file is in a subdirectory.
12661     test ! -d "$ac_dir" && mkdir "$ac_dir"
12662     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12663     # A "../" for each directory in $ac_dir_suffix.
12664     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12665   else
12666     ac_dir_suffix= ac_dots=
12667   fi
12668
12669   case "$ac_given_srcdir" in
12670   .)  srcdir=.
12671       if test -z "$ac_dots"; then top_srcdir=.
12672       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12673   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12674   *) # Relative path.
12675     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12676     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12677   esac
12678
12679   case "$ac_given_INSTALL" in
12680   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12681   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12682   esac
12683
12684   echo creating "$ac_file"
12685   rm -f "$ac_file"
12686   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12687   case "$ac_file" in
12688   *Makefile*) ac_comsub="1i\\
12689 # $configure_input" ;;
12690   *) ac_comsub= ;;
12691   esac
12692
12693   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12694   sed -e "$ac_comsub
12695 s%@configure_input@%$configure_input%g
12696 s%@srcdir@%$srcdir%g
12697 s%@top_srcdir@%$top_srcdir%g
12698 s%@INSTALL@%$INSTALL%g
12699 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12700 fi; done
12701 rm -f conftest.s*
12702
12703 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12704 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12705 #
12706 # ac_d sets the value in "#define NAME VALUE" lines.
12707 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12708 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12709 ac_dC='\3'
12710 ac_dD='%g'
12711 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12712 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12713 ac_uB='\([      ]\)%\1#\2define\3'
12714 ac_uC=' '
12715 ac_uD='\4%g'
12716 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12717 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12718 ac_eB='$%\1#\2define\3'
12719 ac_eC=' '
12720 ac_eD='%g'
12721
12722 if test "${CONFIG_HEADERS+set}" != set; then
12723 EOF
12724 cat >> $CONFIG_STATUS <<EOF
12725   CONFIG_HEADERS="include/config.h"
12726 EOF
12727 cat >> $CONFIG_STATUS <<\EOF
12728 fi
12729 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12730   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12731   case "$ac_file" in
12732   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12733        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12734   *) ac_file_in="${ac_file}.in" ;;
12735   esac
12736
12737   echo creating $ac_file
12738
12739   rm -f conftest.frag conftest.in conftest.out
12740   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12741   cat $ac_file_inputs > conftest.in
12742
12743 EOF
12744
12745 # Transform confdefs.h into a sed script conftest.vals that substitutes
12746 # the proper values into config.h.in to produce config.h.  And first:
12747 # Protect against being on the right side of a sed subst in config.status.
12748 # Protect against being in an unquoted here document in config.status.
12749 rm -f conftest.vals
12750 cat > conftest.hdr <<\EOF
12751 s/[\\&%]/\\&/g
12752 s%[\\$`]%\\&%g
12753 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12754 s%ac_d%ac_u%gp
12755 s%ac_u%ac_e%gp
12756 EOF
12757 sed -n -f conftest.hdr confdefs.h > conftest.vals
12758 rm -f conftest.hdr
12759
12760 # This sed command replaces #undef with comments.  This is necessary, for
12761 # example, in the case of _POSIX_SOURCE, which is predefined and required
12762 # on some systems where configure will not decide to define it.
12763 cat >> conftest.vals <<\EOF
12764 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12765 EOF
12766
12767 # Break up conftest.vals because some shells have a limit on
12768 # the size of here documents, and old seds have small limits too.
12769
12770 rm -f conftest.tail
12771 while :
12772 do
12773   ac_lines=`grep -c . conftest.vals`
12774   # grep -c gives empty output for an empty file on some AIX systems.
12775   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12776   # Write a limited-size here document to conftest.frag.
12777   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12778   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12779   echo 'CEOF
12780   sed -f conftest.frag conftest.in > conftest.out
12781   rm -f conftest.in
12782   mv conftest.out conftest.in
12783 ' >> $CONFIG_STATUS
12784   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12785   rm -f conftest.vals
12786   mv conftest.tail conftest.vals
12787 done
12788 rm -f conftest.vals
12789
12790 cat >> $CONFIG_STATUS <<\EOF
12791   rm -f conftest.frag conftest.h
12792   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12793   cat conftest.in >> conftest.h
12794   rm -f conftest.in
12795   if cmp -s $ac_file conftest.h 2>/dev/null; then
12796     echo "$ac_file is unchanged"
12797     rm -f conftest.h
12798   else
12799     # Remove last slash and all that follows it.  Not all systems have dirname.
12800       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12801       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12802       # The file is in a subdirectory.
12803       test ! -d "$ac_dir" && mkdir "$ac_dir"
12804     fi
12805     rm -f $ac_file
12806     mv conftest.h $ac_file
12807   fi
12808 fi; done
12809
12810 EOF
12811 cat >> $CONFIG_STATUS <<EOF
12812
12813 EOF
12814 cat >> $CONFIG_STATUS <<\EOF
12815
12816 exit 0
12817 EOF
12818 chmod +x $CONFIG_STATUS
12819 rm -fr confdefs* $ac_clean_files
12820 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
12821