Reran autoconf.
[jra/samba/.git] / source / 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 # compile with optimisation and without debugging by default
625 CFLAGS="-O ${CFLAGS}"
626
627 # Check whether --enable-debug or --disable-debug was given.
628 if test "${enable_debug+set}" = set; then
629   enableval="$enable_debug"
630   if eval "test x$enable_debug = xyes"; then
631         CFLAGS="${CFLAGS} -g"
632     fi
633 fi
634
635
636
637 # Extract the first word of "gcc", so it can be a program name with args.
638 set dummy gcc; ac_word=$2
639 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
640 echo "configure:641: checking for $ac_word" >&5
641 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
642   echo $ac_n "(cached) $ac_c" 1>&6
643 else
644   if test -n "$CC"; then
645   ac_cv_prog_CC="$CC" # Let the user override the test.
646 else
647   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
648   ac_dummy="$PATH"
649   for ac_dir in $ac_dummy; do
650     test -z "$ac_dir" && ac_dir=.
651     if test -f $ac_dir/$ac_word; then
652       ac_cv_prog_CC="gcc"
653       break
654     fi
655   done
656   IFS="$ac_save_ifs"
657 fi
658 fi
659 CC="$ac_cv_prog_CC"
660 if test -n "$CC"; then
661   echo "$ac_t""$CC" 1>&6
662 else
663   echo "$ac_t""no" 1>&6
664 fi
665
666 if test -z "$CC"; then
667   # Extract the first word of "cc", so it can be a program name with args.
668 set dummy cc; ac_word=$2
669 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
670 echo "configure:671: checking for $ac_word" >&5
671 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
672   echo $ac_n "(cached) $ac_c" 1>&6
673 else
674   if test -n "$CC"; then
675   ac_cv_prog_CC="$CC" # Let the user override the test.
676 else
677   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
678   ac_prog_rejected=no
679   ac_dummy="$PATH"
680   for ac_dir in $ac_dummy; do
681     test -z "$ac_dir" && ac_dir=.
682     if test -f $ac_dir/$ac_word; then
683       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
684         ac_prog_rejected=yes
685         continue
686       fi
687       ac_cv_prog_CC="cc"
688       break
689     fi
690   done
691   IFS="$ac_save_ifs"
692 if test $ac_prog_rejected = yes; then
693   # We found a bogon in the path, so make sure we never use it.
694   set dummy $ac_cv_prog_CC
695   shift
696   if test $# -gt 0; then
697     # We chose a different compiler from the bogus one.
698     # However, it has the same basename, so the bogon will be chosen
699     # first if we set CC to just the basename; use the full file name.
700     shift
701     set dummy "$ac_dir/$ac_word" "$@"
702     shift
703     ac_cv_prog_CC="$@"
704   fi
705 fi
706 fi
707 fi
708 CC="$ac_cv_prog_CC"
709 if test -n "$CC"; then
710   echo "$ac_t""$CC" 1>&6
711 else
712   echo "$ac_t""no" 1>&6
713 fi
714
715   if test -z "$CC"; then
716     case "`uname -s`" in
717     *win32* | *WIN32*)
718       # Extract the first word of "cl", so it can be a program name with args.
719 set dummy cl; ac_word=$2
720 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
721 echo "configure:722: checking for $ac_word" >&5
722 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
723   echo $ac_n "(cached) $ac_c" 1>&6
724 else
725   if test -n "$CC"; then
726   ac_cv_prog_CC="$CC" # Let the user override the test.
727 else
728   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
729   ac_dummy="$PATH"
730   for ac_dir in $ac_dummy; do
731     test -z "$ac_dir" && ac_dir=.
732     if test -f $ac_dir/$ac_word; then
733       ac_cv_prog_CC="cl"
734       break
735     fi
736   done
737   IFS="$ac_save_ifs"
738 fi
739 fi
740 CC="$ac_cv_prog_CC"
741 if test -n "$CC"; then
742   echo "$ac_t""$CC" 1>&6
743 else
744   echo "$ac_t""no" 1>&6
745 fi
746  ;;
747     esac
748   fi
749   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
750 fi
751
752 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
753 echo "configure:754: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
754
755 ac_ext=c
756 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
757 ac_cpp='$CPP $CPPFLAGS'
758 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
759 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
760 cross_compiling=$ac_cv_prog_cc_cross
761
762 cat > conftest.$ac_ext << EOF
763
764 #line 765 "configure"
765 #include "confdefs.h"
766
767 main(){return(0);}
768 EOF
769 if { (eval echo configure:770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
770   ac_cv_prog_cc_works=yes
771   # If we can't run a trivial program, we are probably using a cross compiler.
772   if (./conftest; exit) 2>/dev/null; then
773     ac_cv_prog_cc_cross=no
774   else
775     ac_cv_prog_cc_cross=yes
776   fi
777 else
778   echo "configure: failed program was:" >&5
779   cat conftest.$ac_ext >&5
780   ac_cv_prog_cc_works=no
781 fi
782 rm -fr conftest*
783 ac_ext=c
784 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
785 ac_cpp='$CPP $CPPFLAGS'
786 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
787 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
788 cross_compiling=$ac_cv_prog_cc_cross
789
790 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
791 if test $ac_cv_prog_cc_works = no; then
792   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
793 fi
794 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
795 echo "configure:796: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
796 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
797 cross_compiling=$ac_cv_prog_cc_cross
798
799 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
800 echo "configure:801: checking whether we are using GNU C" >&5
801 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
802   echo $ac_n "(cached) $ac_c" 1>&6
803 else
804   cat > conftest.c <<EOF
805 #ifdef __GNUC__
806   yes;
807 #endif
808 EOF
809 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
810   ac_cv_prog_gcc=yes
811 else
812   ac_cv_prog_gcc=no
813 fi
814 fi
815
816 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
817
818 if test $ac_cv_prog_gcc = yes; then
819   GCC=yes
820 else
821   GCC=
822 fi
823
824 ac_test_CFLAGS="${CFLAGS+set}"
825 ac_save_CFLAGS="$CFLAGS"
826 CFLAGS=
827 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
828 echo "configure:829: checking whether ${CC-cc} accepts -g" >&5
829 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
830   echo $ac_n "(cached) $ac_c" 1>&6
831 else
832   echo 'void f(){}' > conftest.c
833 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
834   ac_cv_prog_cc_g=yes
835 else
836   ac_cv_prog_cc_g=no
837 fi
838 rm -f conftest*
839
840 fi
841
842 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
843 if test "$ac_test_CFLAGS" = set; then
844   CFLAGS="$ac_save_CFLAGS"
845 elif test $ac_cv_prog_cc_g = yes; then
846   if test "$GCC" = yes; then
847     CFLAGS="-g -O2"
848   else
849     CFLAGS="-g"
850   fi
851 else
852   if test "$GCC" = yes; then
853     CFLAGS="-O2"
854   else
855     CFLAGS=
856   fi
857 fi
858
859 ac_aux_dir=
860 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
861   if test -f $ac_dir/install-sh; then
862     ac_aux_dir=$ac_dir
863     ac_install_sh="$ac_aux_dir/install-sh -c"
864     break
865   elif test -f $ac_dir/install.sh; then
866     ac_aux_dir=$ac_dir
867     ac_install_sh="$ac_aux_dir/install.sh -c"
868     break
869   fi
870 done
871 if test -z "$ac_aux_dir"; then
872   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
873 fi
874 ac_config_guess=$ac_aux_dir/config.guess
875 ac_config_sub=$ac_aux_dir/config.sub
876 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
877
878 # Find a good install program.  We prefer a C program (faster),
879 # so one script is as good as another.  But avoid the broken or
880 # incompatible versions:
881 # SysV /etc/install, /usr/sbin/install
882 # SunOS /usr/etc/install
883 # IRIX /sbin/install
884 # AIX /bin/install
885 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
886 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
887 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
888 # ./install, which can be erroneously created by make from ./install.sh.
889 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
890 echo "configure:891: checking for a BSD compatible install" >&5
891 if test -z "$INSTALL"; then
892 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
893   echo $ac_n "(cached) $ac_c" 1>&6
894 else
895     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
896   for ac_dir in $PATH; do
897     # Account for people who put trailing slashes in PATH elements.
898     case "$ac_dir/" in
899     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
900     *)
901       # OSF1 and SCO ODT 3.0 have their own names for install.
902       # Don't use installbsd from OSF since it installs stuff as root
903       # by default.
904       for ac_prog in ginstall scoinst install; do
905         if test -f $ac_dir/$ac_prog; then
906           if test $ac_prog = install &&
907             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
908             # AIX install.  It has an incompatible calling convention.
909             :
910           else
911             ac_cv_path_install="$ac_dir/$ac_prog -c"
912             break 2
913           fi
914         fi
915       done
916       ;;
917     esac
918   done
919   IFS="$ac_save_IFS"
920
921 fi
922   if test "${ac_cv_path_install+set}" = set; then
923     INSTALL="$ac_cv_path_install"
924   else
925     # As a last resort, use the slow shell script.  We don't cache a
926     # path for INSTALL within a source directory, because that will
927     # break other packages using the cache if that directory is
928     # removed, or if the path is relative.
929     INSTALL="$ac_install_sh"
930   fi
931 fi
932 echo "$ac_t""$INSTALL" 1>&6
933
934 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
935 # It thinks the first close brace ends the variable substitution.
936 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
937
938 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
939
940 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
941
942 for ac_prog in mawk gawk nawk awk
943 do
944 # Extract the first word of "$ac_prog", so it can be a program name with args.
945 set dummy $ac_prog; ac_word=$2
946 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
947 echo "configure:948: checking for $ac_word" >&5
948 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
949   echo $ac_n "(cached) $ac_c" 1>&6
950 else
951   if test -n "$AWK"; then
952   ac_cv_prog_AWK="$AWK" # Let the user override the test.
953 else
954   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
955   ac_dummy="$PATH"
956   for ac_dir in $ac_dummy; do
957     test -z "$ac_dir" && ac_dir=.
958     if test -f $ac_dir/$ac_word; then
959       ac_cv_prog_AWK="$ac_prog"
960       break
961     fi
962   done
963   IFS="$ac_save_ifs"
964 fi
965 fi
966 AWK="$ac_cv_prog_AWK"
967 if test -n "$AWK"; then
968   echo "$ac_t""$AWK" 1>&6
969 else
970   echo "$ac_t""no" 1>&6
971 fi
972
973 test -n "$AWK" && break
974 done
975
976
977 if test "x$CC" != xcc; then
978   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
979 echo "configure:980: checking whether $CC and cc understand -c and -o together" >&5
980 else
981   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
982 echo "configure:983: checking whether cc understands -c and -o together" >&5
983 fi
984 set dummy $CC; ac_cc="`echo $2 |
985                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
986 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
987   echo $ac_n "(cached) $ac_c" 1>&6
988 else
989   echo 'foo(){}' > conftest.c
990 # Make sure it works both with $CC and with simple cc.
991 # We do the test twice because some compilers refuse to overwrite an
992 # existing .o file with -o, though they will create one.
993 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
994 if { (eval echo configure:995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
995    test -f conftest.o && { (eval echo configure:996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
996 then
997   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
998   if test "x$CC" != xcc; then
999     # Test first that cc exists at all.
1000     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1001       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1002       if { (eval echo configure:1003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1003          test -f conftest.o && { (eval echo configure:1004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1004       then
1005         # cc works too.
1006         :
1007       else
1008         # cc exists but doesn't like -o.
1009         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1010       fi
1011     fi
1012   fi
1013 else
1014   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1015 fi
1016 rm -f conftest*
1017
1018 fi
1019 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1020   echo "$ac_t""yes" 1>&6
1021 else
1022   echo "$ac_t""no" 1>&6
1023   cat >> confdefs.h <<\EOF
1024 #define NO_MINUS_C_MINUS_O 1
1025 EOF
1026
1027 fi
1028
1029 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1030       BROKEN_CC=
1031 else
1032       BROKEN_CC=#
1033 fi
1034
1035
1036 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1037 echo "configure:1038: checking that the C compiler understands volatile" >&5
1038 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1039   echo $ac_n "(cached) $ac_c" 1>&6
1040 else
1041   
1042     cat > conftest.$ac_ext <<EOF
1043 #line 1044 "configure"
1044 #include "confdefs.h"
1045 #include <sys/types.h>
1046 int main() {
1047 volatile int i = 0
1048 ; return 0; }
1049 EOF
1050 if { (eval echo configure:1051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1051   rm -rf conftest*
1052   samba_cv_volatile=yes
1053 else
1054   echo "configure: failed program was:" >&5
1055   cat conftest.$ac_ext >&5
1056   rm -rf conftest*
1057   samba_cv_volatile=no
1058 fi
1059 rm -f conftest*
1060 fi
1061
1062 echo "$ac_t""$samba_cv_volatile" 1>&6
1063 if test x"$samba_cv_volatile" = x"yes"; then
1064    cat >> confdefs.h <<\EOF
1065 #define HAVE_VOLATILE 1
1066 EOF
1067
1068 fi
1069
1070
1071 #################################################
1072 # set codepage directory location
1073 # Check whether --with-codepagedir or --without-codepagedir was given.
1074 if test "${with_codepagedir+set}" = set; then
1075   withval="$with_codepagedir"
1076    case "$withval" in
1077   yes|no)
1078   #
1079   # Just in case anybody does it
1080   #
1081     echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2
1082   ;;
1083   * )
1084     codepagedir="$withval"
1085     ;;
1086   esac
1087 fi
1088
1089
1090
1091
1092 # Do some error checking and defaulting for the host and target type.
1093 # The inputs are:
1094 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1095 #
1096 # The rules are:
1097 # 1. You are not allowed to specify --host, --target, and nonopt at the
1098 #    same time.
1099 # 2. Host defaults to nonopt.
1100 # 3. If nonopt is not specified, then host defaults to the current host,
1101 #    as determined by config.guess.
1102 # 4. Target and build default to nonopt.
1103 # 5. If nonopt is not specified, then target and build default to host.
1104
1105 # The aliases save the names the user supplied, while $host etc.
1106 # will get canonicalized.
1107 case $host---$target---$nonopt in
1108 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1109 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1110 esac
1111
1112
1113 # Make sure we can run config.sub.
1114 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1115 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1116 fi
1117
1118 echo $ac_n "checking host system type""... $ac_c" 1>&6
1119 echo "configure:1120: checking host system type" >&5
1120
1121 host_alias=$host
1122 case "$host_alias" in
1123 NONE)
1124   case $nonopt in
1125   NONE)
1126     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1127     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1128     fi ;;
1129   *) host_alias=$nonopt ;;
1130   esac ;;
1131 esac
1132
1133 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1134 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1135 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1136 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1137 echo "$ac_t""$host" 1>&6
1138
1139 echo $ac_n "checking target system type""... $ac_c" 1>&6
1140 echo "configure:1141: checking target system type" >&5
1141
1142 target_alias=$target
1143 case "$target_alias" in
1144 NONE)
1145   case $nonopt in
1146   NONE) target_alias=$host_alias ;;
1147   *) target_alias=$nonopt ;;
1148   esac ;;
1149 esac
1150
1151 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1152 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1153 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1154 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1155 echo "$ac_t""$target" 1>&6
1156
1157 echo $ac_n "checking build system type""... $ac_c" 1>&6
1158 echo "configure:1159: checking build system type" >&5
1159
1160 build_alias=$build
1161 case "$build_alias" in
1162 NONE)
1163   case $nonopt in
1164   NONE) build_alias=$host_alias ;;
1165   *) build_alias=$nonopt ;;
1166   esac ;;
1167 esac
1168
1169 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1170 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1171 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1172 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1173 echo "$ac_t""$build" 1>&6
1174
1175 test "$host_alias" != "$target_alias" &&
1176   test "$program_prefix$program_suffix$program_transform_name" = \
1177     NONENONEs,x,x, &&
1178   program_prefix=${target_alias}-
1179
1180
1181   case "$host_os" in
1182         *irix6*) cat >> confdefs.h <<\EOF
1183 #include <standards.h>
1184 EOF
1185
1186         ;;
1187 esac
1188
1189
1190     
1191     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1192 echo "configure:1193: checking config.cache system type" >&5
1193     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1194          test x"$ac_cv_host_system_type" != x"$host"; } ||
1195        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1196          test x"$ac_cv_build_system_type" != x"$build"; } ||
1197        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1198          test x"$ac_cv_target_system_type" != x"$target"; }; then
1199         echo "$ac_t""different" 1>&6
1200         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1201     else
1202         echo "$ac_t""same" 1>&6
1203     fi
1204     ac_cv_host_system_type="$host"
1205     ac_cv_build_system_type="$build"
1206     ac_cv_target_system_type="$target"
1207
1208
1209 #
1210 # Config CPPFLAG settings for strange OS's that must be set
1211 # before other tests.
1212 #
1213 case "$host_os" in
1214 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1215     *hpux*)
1216       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1217 echo "configure:1218: checking whether ${CC-cc} accepts -Ae" >&5
1218 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1219   echo $ac_n "(cached) $ac_c" 1>&6
1220 else
1221   echo 'void f(){}' > conftest.c
1222 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1223   ac_cv_prog_cc_Ae=yes
1224 else
1225   ac_cv_prog_cc_Ae=no
1226 fi
1227 rm -f conftest*
1228
1229 fi
1230
1231 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1232       if test $ac_cv_prog_cc_Ae = yes; then
1233         CPPFLAGS="$CPPFLAGS -Ae"
1234       fi
1235 #
1236 # Defines needed for HPUX support.
1237 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1238 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1239 #
1240       case `uname -r` in
1241                         *9*|*10*)
1242                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1243                                 cat >> confdefs.h <<\EOF
1244 #define USE_BOTH_CRYPT_CALLS 1
1245 EOF
1246
1247                                 ;;
1248                         *11*)
1249                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1250                                 cat >> confdefs.h <<\EOF
1251 #define USE_BOTH_CRYPT_CALLS 1
1252 EOF
1253
1254                                 ;;
1255       esac
1256       ;;
1257 #
1258 # AIX4.x doesn't even admit to having large
1259 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1260 #
1261     *aix4*)
1262           echo "$ac_t""enabling large file support" 1>&6
1263       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1264       ;;    
1265 #
1266 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1267 # to the existance of large files..
1268 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1269 # recommendations on large file support, however it makes the
1270 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1271 # recommendation makes the compile fail on gcc2.7. JRA.
1272 #
1273         *solaris*)
1274                 case `uname -r` in
1275                         5.6*|5.7*)
1276                         echo "$ac_t""enabling large file support" 1>&6
1277                         if test "$ac_cv_prog_gcc" = yes; then
1278                                 ${CC-cc} -v >conftest.c 2>&1
1279                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1280                                 rm -fr conftest.c
1281                                 case "$ac_cv_gcc_compiler_version_number" in
1282                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1283                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1284                                                 ;;
1285                                         *)
1286                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1287                                                 ;;
1288                                 esac
1289                         else
1290                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1291                         fi
1292                         ;;
1293                 esac
1294                 ;;
1295 #
1296 # Tests needed for SINIX large file support.
1297 #
1298     *sysv4*)
1299       if test $host = mips-sni-sysv4 ; then
1300         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1301 echo "configure:1302: checking for LFS support" >&5
1302         old_CPPFLAGS="$CPPFLAGS"
1303         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1304         if test "$cross_compiling" = yes; then
1305   SINIX_LFS_SUPPORT=cross
1306 else
1307   cat > conftest.$ac_ext <<EOF
1308 #line 1309 "configure"
1309 #include "confdefs.h"
1310
1311 #include <unistd.h>
1312 main () {
1313 #if _LFS64_LARGEFILE == 1
1314 exit(0);
1315 #else
1316 exit(1);
1317 #endif
1318 }
1319 EOF
1320 if { (eval echo configure:1321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1321 then
1322   SINIX_LFS_SUPPORT=yes
1323 else
1324   echo "configure: failed program was:" >&5
1325   cat conftest.$ac_ext >&5
1326   rm -fr conftest*
1327   SINIX_LFS_SUPPORT=no
1328 fi
1329 rm -fr conftest*
1330 fi
1331
1332         CPPFLAGS="$old_CPPFLAGS"
1333         if test x$SINIX_LFS_SUPPORT = xyes ; then
1334           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1335           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1336           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1337           LIBS="`getconf LFS64_LIBS` $LIBS"
1338         fi
1339       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1340       fi
1341     ;;
1342
1343 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1344 #
1345     *linux*)
1346         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1347 echo "configure:1348: checking for LFS support" >&5
1348         old_CPPFLAGS="$CPPFLAGS"
1349         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1350        if test "$cross_compiling" = yes; then
1351   LINUX_LFS_SUPPORT=cross
1352 else
1353   cat > conftest.$ac_ext <<EOF
1354 #line 1355 "configure"
1355 #include "confdefs.h"
1356
1357 #include <unistd.h>
1358 #include <sys/utsname.h>
1359 main() {
1360 #if _LFS64_LARGEFILE == 1
1361        struct utsname uts;
1362        char *release;
1363        int major, minor;
1364
1365        /* Ensure this is glibc 2.2 or higher */
1366 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1367        int libc_major = __GLIBC__;
1368        int libc_minor = __GLIBC_MINOR__;
1369
1370        if (libc_major < 2)
1371               exit(1);
1372        if (libc_minor < 2)
1373               exit(1);
1374 #endif
1375
1376        /* Ensure this is kernel 2.4 or higher */
1377
1378        uname(&uts);
1379        release = uts.release;
1380        major = atoi(strsep(&release, "."));
1381        minor = atoi(strsep(&release, "."));
1382
1383        if (major > 2 || (major == 2 && minor > 3))
1384                exit(0);
1385        exit(1);
1386 #else
1387        exit(1);
1388 #endif
1389 }
1390
1391 EOF
1392 if { (eval echo configure:1393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1393 then
1394   LINUX_LFS_SUPPORT=yes
1395 else
1396   echo "configure: failed program was:" >&5
1397   cat conftest.$ac_ext >&5
1398   rm -fr conftest*
1399   LINUX_LFS_SUPPORT=no
1400 fi
1401 rm -fr conftest*
1402 fi
1403
1404         CPPFLAGS="$old_CPPFLAGS"
1405         if test x$LINUX_LFS_SUPPORT = xyes ; then
1406           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1407         fi
1408        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1409                 ;;
1410
1411     *hurd*)
1412         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1413 echo "configure:1414: checking for LFS support" >&5
1414         old_CPPFLAGS="$CPPFLAGS"
1415         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1416         if test "$cross_compiling" = yes; then
1417   GLIBC_LFS_SUPPORT=cross
1418 else
1419   cat > conftest.$ac_ext <<EOF
1420 #line 1421 "configure"
1421 #include "confdefs.h"
1422
1423 #include <unistd.h>
1424 main () {
1425 #if _LFS64_LARGEFILE == 1
1426 exit(0);
1427 #else
1428 exit(1);
1429 #endif
1430 }
1431 EOF
1432 if { (eval echo configure:1433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1433 then
1434   GLIBC_LFS_SUPPORT=yes
1435 else
1436   echo "configure: failed program was:" >&5
1437   cat conftest.$ac_ext >&5
1438   rm -fr conftest*
1439   GLIBC_LFS_SUPPORT=no
1440 fi
1441 rm -fr conftest*
1442 fi
1443
1444         CPPFLAGS="$old_CPPFLAGS"
1445         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1446           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1447         fi
1448       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1449     ;;
1450
1451 esac
1452
1453 echo $ac_n "checking for inline""... $ac_c" 1>&6
1454 echo "configure:1455: checking for inline" >&5
1455 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1456   echo $ac_n "(cached) $ac_c" 1>&6
1457 else
1458   ac_cv_c_inline=no
1459 for ac_kw in inline __inline__ __inline; do
1460   cat > conftest.$ac_ext <<EOF
1461 #line 1462 "configure"
1462 #include "confdefs.h"
1463
1464 int main() {
1465 } $ac_kw foo() {
1466 ; return 0; }
1467 EOF
1468 if { (eval echo configure:1469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1469   rm -rf conftest*
1470   ac_cv_c_inline=$ac_kw; break
1471 else
1472   echo "configure: failed program was:" >&5
1473   cat conftest.$ac_ext >&5
1474 fi
1475 rm -f conftest*
1476 done
1477
1478 fi
1479
1480 echo "$ac_t""$ac_cv_c_inline" 1>&6
1481 case "$ac_cv_c_inline" in
1482   inline | yes) ;;
1483   no) cat >> confdefs.h <<\EOF
1484 #define inline 
1485 EOF
1486  ;;
1487   *)  cat >> confdefs.h <<EOF
1488 #define inline $ac_cv_c_inline
1489 EOF
1490  ;;
1491 esac
1492
1493 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1494 echo "configure:1495: checking how to run the C preprocessor" >&5
1495 # On Suns, sometimes $CPP names a directory.
1496 if test -n "$CPP" && test -d "$CPP"; then
1497   CPP=
1498 fi
1499 if test -z "$CPP"; then
1500 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1501   echo $ac_n "(cached) $ac_c" 1>&6
1502 else
1503     # This must be in double quotes, not single quotes, because CPP may get
1504   # substituted into the Makefile and "${CC-cc}" will confuse make.
1505   CPP="${CC-cc} -E"
1506   # On the NeXT, cc -E runs the code through the compiler's parser,
1507   # not just through cpp.
1508   cat > conftest.$ac_ext <<EOF
1509 #line 1510 "configure"
1510 #include "confdefs.h"
1511 #include <assert.h>
1512 Syntax Error
1513 EOF
1514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1515 { (eval echo configure:1516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1517 if test -z "$ac_err"; then
1518   :
1519 else
1520   echo "$ac_err" >&5
1521   echo "configure: failed program was:" >&5
1522   cat conftest.$ac_ext >&5
1523   rm -rf conftest*
1524   CPP="${CC-cc} -E -traditional-cpp"
1525   cat > conftest.$ac_ext <<EOF
1526 #line 1527 "configure"
1527 #include "confdefs.h"
1528 #include <assert.h>
1529 Syntax Error
1530 EOF
1531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1532 { (eval echo configure:1533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1534 if test -z "$ac_err"; then
1535   :
1536 else
1537   echo "$ac_err" >&5
1538   echo "configure: failed program was:" >&5
1539   cat conftest.$ac_ext >&5
1540   rm -rf conftest*
1541   CPP="${CC-cc} -nologo -E"
1542   cat > conftest.$ac_ext <<EOF
1543 #line 1544 "configure"
1544 #include "confdefs.h"
1545 #include <assert.h>
1546 Syntax Error
1547 EOF
1548 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1549 { (eval echo configure:1550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1550 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1551 if test -z "$ac_err"; then
1552   :
1553 else
1554   echo "$ac_err" >&5
1555   echo "configure: failed program was:" >&5
1556   cat conftest.$ac_ext >&5
1557   rm -rf conftest*
1558   CPP=/lib/cpp
1559 fi
1560 rm -f conftest*
1561 fi
1562 rm -f conftest*
1563 fi
1564 rm -f conftest*
1565   ac_cv_prog_CPP="$CPP"
1566 fi
1567   CPP="$ac_cv_prog_CPP"
1568 else
1569   ac_cv_prog_CPP="$CPP"
1570 fi
1571 echo "$ac_t""$CPP" 1>&6
1572
1573 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1574 echo "configure:1575: checking for ANSI C header files" >&5
1575 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1576   echo $ac_n "(cached) $ac_c" 1>&6
1577 else
1578   cat > conftest.$ac_ext <<EOF
1579 #line 1580 "configure"
1580 #include "confdefs.h"
1581 #include <stdlib.h>
1582 #include <stdarg.h>
1583 #include <string.h>
1584 #include <float.h>
1585 EOF
1586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1587 { (eval echo configure:1588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1589 if test -z "$ac_err"; then
1590   rm -rf conftest*
1591   ac_cv_header_stdc=yes
1592 else
1593   echo "$ac_err" >&5
1594   echo "configure: failed program was:" >&5
1595   cat conftest.$ac_ext >&5
1596   rm -rf conftest*
1597   ac_cv_header_stdc=no
1598 fi
1599 rm -f conftest*
1600
1601 if test $ac_cv_header_stdc = yes; then
1602   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1603 cat > conftest.$ac_ext <<EOF
1604 #line 1605 "configure"
1605 #include "confdefs.h"
1606 #include <string.h>
1607 EOF
1608 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1609   egrep "memchr" >/dev/null 2>&1; then
1610   :
1611 else
1612   rm -rf conftest*
1613   ac_cv_header_stdc=no
1614 fi
1615 rm -f conftest*
1616
1617 fi
1618
1619 if test $ac_cv_header_stdc = yes; then
1620   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1621 cat > conftest.$ac_ext <<EOF
1622 #line 1623 "configure"
1623 #include "confdefs.h"
1624 #include <stdlib.h>
1625 EOF
1626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1627   egrep "free" >/dev/null 2>&1; then
1628   :
1629 else
1630   rm -rf conftest*
1631   ac_cv_header_stdc=no
1632 fi
1633 rm -f conftest*
1634
1635 fi
1636
1637 if test $ac_cv_header_stdc = yes; then
1638   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1639 if test "$cross_compiling" = yes; then
1640   :
1641 else
1642   cat > conftest.$ac_ext <<EOF
1643 #line 1644 "configure"
1644 #include "confdefs.h"
1645 #include <ctype.h>
1646 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1647 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1648 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1649 int main () { int i; for (i = 0; i < 256; i++)
1650 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1651 exit (0); }
1652
1653 EOF
1654 if { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1655 then
1656   :
1657 else
1658   echo "configure: failed program was:" >&5
1659   cat conftest.$ac_ext >&5
1660   rm -fr conftest*
1661   ac_cv_header_stdc=no
1662 fi
1663 rm -fr conftest*
1664 fi
1665
1666 fi
1667 fi
1668
1669 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1670 if test $ac_cv_header_stdc = yes; then
1671   cat >> confdefs.h <<\EOF
1672 #define STDC_HEADERS 1
1673 EOF
1674
1675 fi
1676
1677 ac_header_dirent=no
1678 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1679 do
1680 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1681 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1682 echo "configure:1683: checking for $ac_hdr that defines DIR" >&5
1683 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1684   echo $ac_n "(cached) $ac_c" 1>&6
1685 else
1686   cat > conftest.$ac_ext <<EOF
1687 #line 1688 "configure"
1688 #include "confdefs.h"
1689 #include <sys/types.h>
1690 #include <$ac_hdr>
1691 int main() {
1692 DIR *dirp = 0;
1693 ; return 0; }
1694 EOF
1695 if { (eval echo configure:1696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1696   rm -rf conftest*
1697   eval "ac_cv_header_dirent_$ac_safe=yes"
1698 else
1699   echo "configure: failed program was:" >&5
1700   cat conftest.$ac_ext >&5
1701   rm -rf conftest*
1702   eval "ac_cv_header_dirent_$ac_safe=no"
1703 fi
1704 rm -f conftest*
1705 fi
1706 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1707   echo "$ac_t""yes" 1>&6
1708     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1709   cat >> confdefs.h <<EOF
1710 #define $ac_tr_hdr 1
1711 EOF
1712  ac_header_dirent=$ac_hdr; break
1713 else
1714   echo "$ac_t""no" 1>&6
1715 fi
1716 done
1717 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1718 if test $ac_header_dirent = dirent.h; then
1719 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1720 echo "configure:1721: checking for opendir in -ldir" >&5
1721 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1722 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1723   echo $ac_n "(cached) $ac_c" 1>&6
1724 else
1725   ac_save_LIBS="$LIBS"
1726 LIBS="-ldir  $LIBS"
1727 cat > conftest.$ac_ext <<EOF
1728 #line 1729 "configure"
1729 #include "confdefs.h"
1730 /* Override any gcc2 internal prototype to avoid an error.  */
1731 /* We use char because int might match the return type of a gcc2
1732     builtin and then its argument prototype would still apply.  */
1733 char opendir();
1734
1735 int main() {
1736 opendir()
1737 ; return 0; }
1738 EOF
1739 if { (eval echo configure:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1740   rm -rf conftest*
1741   eval "ac_cv_lib_$ac_lib_var=yes"
1742 else
1743   echo "configure: failed program was:" >&5
1744   cat conftest.$ac_ext >&5
1745   rm -rf conftest*
1746   eval "ac_cv_lib_$ac_lib_var=no"
1747 fi
1748 rm -f conftest*
1749 LIBS="$ac_save_LIBS"
1750
1751 fi
1752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1753   echo "$ac_t""yes" 1>&6
1754   LIBS="$LIBS -ldir"
1755 else
1756   echo "$ac_t""no" 1>&6
1757 fi
1758
1759 else
1760 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1761 echo "configure:1762: checking for opendir in -lx" >&5
1762 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1763 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1764   echo $ac_n "(cached) $ac_c" 1>&6
1765 else
1766   ac_save_LIBS="$LIBS"
1767 LIBS="-lx  $LIBS"
1768 cat > conftest.$ac_ext <<EOF
1769 #line 1770 "configure"
1770 #include "confdefs.h"
1771 /* Override any gcc2 internal prototype to avoid an error.  */
1772 /* We use char because int might match the return type of a gcc2
1773     builtin and then its argument prototype would still apply.  */
1774 char opendir();
1775
1776 int main() {
1777 opendir()
1778 ; return 0; }
1779 EOF
1780 if { (eval echo configure:1781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1781   rm -rf conftest*
1782   eval "ac_cv_lib_$ac_lib_var=yes"
1783 else
1784   echo "configure: failed program was:" >&5
1785   cat conftest.$ac_ext >&5
1786   rm -rf conftest*
1787   eval "ac_cv_lib_$ac_lib_var=no"
1788 fi
1789 rm -f conftest*
1790 LIBS="$ac_save_LIBS"
1791
1792 fi
1793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1794   echo "$ac_t""yes" 1>&6
1795   LIBS="$LIBS -lx"
1796 else
1797   echo "$ac_t""no" 1>&6
1798 fi
1799
1800 fi
1801
1802 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1803 echo "configure:1804: checking whether time.h and sys/time.h may both be included" >&5
1804 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1805   echo $ac_n "(cached) $ac_c" 1>&6
1806 else
1807   cat > conftest.$ac_ext <<EOF
1808 #line 1809 "configure"
1809 #include "confdefs.h"
1810 #include <sys/types.h>
1811 #include <sys/time.h>
1812 #include <time.h>
1813 int main() {
1814 struct tm *tp;
1815 ; return 0; }
1816 EOF
1817 if { (eval echo configure:1818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1818   rm -rf conftest*
1819   ac_cv_header_time=yes
1820 else
1821   echo "configure: failed program was:" >&5
1822   cat conftest.$ac_ext >&5
1823   rm -rf conftest*
1824   ac_cv_header_time=no
1825 fi
1826 rm -f conftest*
1827 fi
1828
1829 echo "$ac_t""$ac_cv_header_time" 1>&6
1830 if test $ac_cv_header_time = yes; then
1831   cat >> confdefs.h <<\EOF
1832 #define TIME_WITH_SYS_TIME 1
1833 EOF
1834
1835 fi
1836
1837 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1838 echo "configure:1839: checking for sys/wait.h that is POSIX.1 compatible" >&5
1839 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1840   echo $ac_n "(cached) $ac_c" 1>&6
1841 else
1842   cat > conftest.$ac_ext <<EOF
1843 #line 1844 "configure"
1844 #include "confdefs.h"
1845 #include <sys/types.h>
1846 #include <sys/wait.h>
1847 #ifndef WEXITSTATUS
1848 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1849 #endif
1850 #ifndef WIFEXITED
1851 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1852 #endif
1853 int main() {
1854 int s;
1855 wait (&s);
1856 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1857 ; return 0; }
1858 EOF
1859 if { (eval echo configure:1860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1860   rm -rf conftest*
1861   ac_cv_header_sys_wait_h=yes
1862 else
1863   echo "configure: failed program was:" >&5
1864   cat conftest.$ac_ext >&5
1865   rm -rf conftest*
1866   ac_cv_header_sys_wait_h=no
1867 fi
1868 rm -f conftest*
1869 fi
1870
1871 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1872 if test $ac_cv_header_sys_wait_h = yes; then
1873   cat >> confdefs.h <<\EOF
1874 #define HAVE_SYS_WAIT_H 1
1875 EOF
1876
1877 fi
1878
1879 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1880 do
1881 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1882 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1883 echo "configure:1884: checking for $ac_hdr" >&5
1884 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1885   echo $ac_n "(cached) $ac_c" 1>&6
1886 else
1887   cat > conftest.$ac_ext <<EOF
1888 #line 1889 "configure"
1889 #include "confdefs.h"
1890 #include <$ac_hdr>
1891 EOF
1892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1893 { (eval echo configure:1894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1895 if test -z "$ac_err"; then
1896   rm -rf conftest*
1897   eval "ac_cv_header_$ac_safe=yes"
1898 else
1899   echo "$ac_err" >&5
1900   echo "configure: failed program was:" >&5
1901   cat conftest.$ac_ext >&5
1902   rm -rf conftest*
1903   eval "ac_cv_header_$ac_safe=no"
1904 fi
1905 rm -f conftest*
1906 fi
1907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1908   echo "$ac_t""yes" 1>&6
1909     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1910   cat >> confdefs.h <<EOF
1911 #define $ac_tr_hdr 1
1912 EOF
1913  
1914 else
1915   echo "$ac_t""no" 1>&6
1916 fi
1917 done
1918
1919 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1920 do
1921 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1922 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1923 echo "configure:1924: checking for $ac_hdr" >&5
1924 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1925   echo $ac_n "(cached) $ac_c" 1>&6
1926 else
1927   cat > conftest.$ac_ext <<EOF
1928 #line 1929 "configure"
1929 #include "confdefs.h"
1930 #include <$ac_hdr>
1931 EOF
1932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1933 { (eval echo configure:1934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1935 if test -z "$ac_err"; then
1936   rm -rf conftest*
1937   eval "ac_cv_header_$ac_safe=yes"
1938 else
1939   echo "$ac_err" >&5
1940   echo "configure: failed program was:" >&5
1941   cat conftest.$ac_ext >&5
1942   rm -rf conftest*
1943   eval "ac_cv_header_$ac_safe=no"
1944 fi
1945 rm -f conftest*
1946 fi
1947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1948   echo "$ac_t""yes" 1>&6
1949     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1950   cat >> confdefs.h <<EOF
1951 #define $ac_tr_hdr 1
1952 EOF
1953  
1954 else
1955   echo "$ac_t""no" 1>&6
1956 fi
1957 done
1958
1959 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1960 do
1961 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1962 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1963 echo "configure:1964: checking for $ac_hdr" >&5
1964 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1965   echo $ac_n "(cached) $ac_c" 1>&6
1966 else
1967   cat > conftest.$ac_ext <<EOF
1968 #line 1969 "configure"
1969 #include "confdefs.h"
1970 #include <$ac_hdr>
1971 EOF
1972 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1973 { (eval echo configure:1974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1974 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1975 if test -z "$ac_err"; then
1976   rm -rf conftest*
1977   eval "ac_cv_header_$ac_safe=yes"
1978 else
1979   echo "$ac_err" >&5
1980   echo "configure: failed program was:" >&5
1981   cat conftest.$ac_ext >&5
1982   rm -rf conftest*
1983   eval "ac_cv_header_$ac_safe=no"
1984 fi
1985 rm -f conftest*
1986 fi
1987 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1988   echo "$ac_t""yes" 1>&6
1989     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1990   cat >> confdefs.h <<EOF
1991 #define $ac_tr_hdr 1
1992 EOF
1993  
1994 else
1995   echo "$ac_t""no" 1>&6
1996 fi
1997 done
1998
1999 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
2000 do
2001 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2002 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2003 echo "configure:2004: checking for $ac_hdr" >&5
2004 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2005   echo $ac_n "(cached) $ac_c" 1>&6
2006 else
2007   cat > conftest.$ac_ext <<EOF
2008 #line 2009 "configure"
2009 #include "confdefs.h"
2010 #include <$ac_hdr>
2011 EOF
2012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2013 { (eval echo configure:2014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2015 if test -z "$ac_err"; then
2016   rm -rf conftest*
2017   eval "ac_cv_header_$ac_safe=yes"
2018 else
2019   echo "$ac_err" >&5
2020   echo "configure: failed program was:" >&5
2021   cat conftest.$ac_ext >&5
2022   rm -rf conftest*
2023   eval "ac_cv_header_$ac_safe=no"
2024 fi
2025 rm -f conftest*
2026 fi
2027 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2028   echo "$ac_t""yes" 1>&6
2029     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2030   cat >> confdefs.h <<EOF
2031 #define $ac_tr_hdr 1
2032 EOF
2033  
2034 else
2035   echo "$ac_t""no" 1>&6
2036 fi
2037 done
2038
2039 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
2040 do
2041 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2042 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2043 echo "configure:2044: checking for $ac_hdr" >&5
2044 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2045   echo $ac_n "(cached) $ac_c" 1>&6
2046 else
2047   cat > conftest.$ac_ext <<EOF
2048 #line 2049 "configure"
2049 #include "confdefs.h"
2050 #include <$ac_hdr>
2051 EOF
2052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2053 { (eval echo configure:2054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2054 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2055 if test -z "$ac_err"; then
2056   rm -rf conftest*
2057   eval "ac_cv_header_$ac_safe=yes"
2058 else
2059   echo "$ac_err" >&5
2060   echo "configure: failed program was:" >&5
2061   cat conftest.$ac_ext >&5
2062   rm -rf conftest*
2063   eval "ac_cv_header_$ac_safe=no"
2064 fi
2065 rm -f conftest*
2066 fi
2067 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2068   echo "$ac_t""yes" 1>&6
2069     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2070   cat >> confdefs.h <<EOF
2071 #define $ac_tr_hdr 1
2072 EOF
2073  
2074 else
2075   echo "$ac_t""no" 1>&6
2076 fi
2077 done
2078
2079 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2080 do
2081 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2082 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2083 echo "configure:2084: checking for $ac_hdr" >&5
2084 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2085   echo $ac_n "(cached) $ac_c" 1>&6
2086 else
2087   cat > conftest.$ac_ext <<EOF
2088 #line 2089 "configure"
2089 #include "confdefs.h"
2090 #include <$ac_hdr>
2091 EOF
2092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2093 { (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2095 if test -z "$ac_err"; then
2096   rm -rf conftest*
2097   eval "ac_cv_header_$ac_safe=yes"
2098 else
2099   echo "$ac_err" >&5
2100   echo "configure: failed program was:" >&5
2101   cat conftest.$ac_ext >&5
2102   rm -rf conftest*
2103   eval "ac_cv_header_$ac_safe=no"
2104 fi
2105 rm -f conftest*
2106 fi
2107 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2108   echo "$ac_t""yes" 1>&6
2109     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2110   cat >> confdefs.h <<EOF
2111 #define $ac_tr_hdr 1
2112 EOF
2113  
2114 else
2115   echo "$ac_t""no" 1>&6
2116 fi
2117 done
2118
2119 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2120 do
2121 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2122 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2123 echo "configure:2124: checking for $ac_hdr" >&5
2124 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2125   echo $ac_n "(cached) $ac_c" 1>&6
2126 else
2127   cat > conftest.$ac_ext <<EOF
2128 #line 2129 "configure"
2129 #include "confdefs.h"
2130 #include <$ac_hdr>
2131 EOF
2132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2133 { (eval echo configure:2134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2135 if test -z "$ac_err"; then
2136   rm -rf conftest*
2137   eval "ac_cv_header_$ac_safe=yes"
2138 else
2139   echo "$ac_err" >&5
2140   echo "configure: failed program was:" >&5
2141   cat conftest.$ac_ext >&5
2142   rm -rf conftest*
2143   eval "ac_cv_header_$ac_safe=no"
2144 fi
2145 rm -f conftest*
2146 fi
2147 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2148   echo "$ac_t""yes" 1>&6
2149     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2150   cat >> confdefs.h <<EOF
2151 #define $ac_tr_hdr 1
2152 EOF
2153  
2154 else
2155   echo "$ac_t""no" 1>&6
2156 fi
2157 done
2158
2159 for ac_hdr in security/pam_modules.h security/_pam_macros.h
2160 do
2161 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2162 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2163 echo "configure:2164: checking for $ac_hdr" >&5
2164 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2165   echo $ac_n "(cached) $ac_c" 1>&6
2166 else
2167   cat > conftest.$ac_ext <<EOF
2168 #line 2169 "configure"
2169 #include "confdefs.h"
2170 #include <$ac_hdr>
2171 EOF
2172 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2173 { (eval echo configure:2174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2174 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2175 if test -z "$ac_err"; then
2176   rm -rf conftest*
2177   eval "ac_cv_header_$ac_safe=yes"
2178 else
2179   echo "$ac_err" >&5
2180   echo "configure: failed program was:" >&5
2181   cat conftest.$ac_ext >&5
2182   rm -rf conftest*
2183   eval "ac_cv_header_$ac_safe=no"
2184 fi
2185 rm -f conftest*
2186 fi
2187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2188   echo "$ac_t""yes" 1>&6
2189     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2190   cat >> confdefs.h <<EOF
2191 #define $ac_tr_hdr 1
2192 EOF
2193  
2194 else
2195   echo "$ac_t""no" 1>&6
2196 fi
2197 done
2198
2199
2200 #
2201 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2202 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2203 #
2204 case "$host_os" in
2205     *hpux*)
2206                 cat > conftest.$ac_ext <<EOF
2207 #line 2208 "configure"
2208 #include "confdefs.h"
2209 #include <shadow.h>
2210 int main() {
2211 struct spwd testme
2212 ; return 0; }
2213 EOF
2214 if { (eval echo configure:2215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2215   rm -rf conftest*
2216   ac_cv_header_shadow_h=yes
2217 else
2218   echo "configure: failed program was:" >&5
2219   cat conftest.$ac_ext >&5
2220   rm -rf conftest*
2221   ac_cv_header_shadow_h=no
2222 fi
2223 rm -f conftest*
2224                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2225                    cat >> confdefs.h <<\EOF
2226 #define HAVE_SHADOW_H 1
2227 EOF
2228
2229                 fi
2230         ;;
2231 esac
2232 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2233 do
2234 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2235 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2236 echo "configure:2237: checking for $ac_hdr" >&5
2237 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2238   echo $ac_n "(cached) $ac_c" 1>&6
2239 else
2240   cat > conftest.$ac_ext <<EOF
2241 #line 2242 "configure"
2242 #include "confdefs.h"
2243 #include <$ac_hdr>
2244 EOF
2245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2246 { (eval echo configure:2247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2248 if test -z "$ac_err"; then
2249   rm -rf conftest*
2250   eval "ac_cv_header_$ac_safe=yes"
2251 else
2252   echo "$ac_err" >&5
2253   echo "configure: failed program was:" >&5
2254   cat conftest.$ac_ext >&5
2255   rm -rf conftest*
2256   eval "ac_cv_header_$ac_safe=no"
2257 fi
2258 rm -f conftest*
2259 fi
2260 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2261   echo "$ac_t""yes" 1>&6
2262     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2263   cat >> confdefs.h <<EOF
2264 #define $ac_tr_hdr 1
2265 EOF
2266  
2267 else
2268   echo "$ac_t""no" 1>&6
2269 fi
2270 done
2271
2272 for ac_hdr in nss.h nss_common.h sys/security.h security/pam_appl.h security/pam_modules.h
2273 do
2274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2276 echo "configure:2277: checking for $ac_hdr" >&5
2277 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2278   echo $ac_n "(cached) $ac_c" 1>&6
2279 else
2280   cat > conftest.$ac_ext <<EOF
2281 #line 2282 "configure"
2282 #include "confdefs.h"
2283 #include <$ac_hdr>
2284 EOF
2285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2286 { (eval echo configure:2287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2288 if test -z "$ac_err"; then
2289   rm -rf conftest*
2290   eval "ac_cv_header_$ac_safe=yes"
2291 else
2292   echo "$ac_err" >&5
2293   echo "configure: failed program was:" >&5
2294   cat conftest.$ac_ext >&5
2295   rm -rf conftest*
2296   eval "ac_cv_header_$ac_safe=no"
2297 fi
2298 rm -f conftest*
2299 fi
2300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2301   echo "$ac_t""yes" 1>&6
2302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2303   cat >> confdefs.h <<EOF
2304 #define $ac_tr_hdr 1
2305 EOF
2306  
2307 else
2308   echo "$ac_t""no" 1>&6
2309 fi
2310 done
2311
2312 for ac_hdr in stropts.h poll.h
2313 do
2314 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2315 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2316 echo "configure:2317: checking for $ac_hdr" >&5
2317 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2318   echo $ac_n "(cached) $ac_c" 1>&6
2319 else
2320   cat > conftest.$ac_ext <<EOF
2321 #line 2322 "configure"
2322 #include "confdefs.h"
2323 #include <$ac_hdr>
2324 EOF
2325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2326 { (eval echo configure:2327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2328 if test -z "$ac_err"; then
2329   rm -rf conftest*
2330   eval "ac_cv_header_$ac_safe=yes"
2331 else
2332   echo "$ac_err" >&5
2333   echo "configure: failed program was:" >&5
2334   cat conftest.$ac_ext >&5
2335   rm -rf conftest*
2336   eval "ac_cv_header_$ac_safe=no"
2337 fi
2338 rm -f conftest*
2339 fi
2340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2341   echo "$ac_t""yes" 1>&6
2342     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2343   cat >> confdefs.h <<EOF
2344 #define $ac_tr_hdr 1
2345 EOF
2346  
2347 else
2348   echo "$ac_t""no" 1>&6
2349 fi
2350 done
2351
2352 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2353 do
2354 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2355 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2356 echo "configure:2357: checking for $ac_hdr" >&5
2357 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2358   echo $ac_n "(cached) $ac_c" 1>&6
2359 else
2360   cat > conftest.$ac_ext <<EOF
2361 #line 2362 "configure"
2362 #include "confdefs.h"
2363 #include <$ac_hdr>
2364 EOF
2365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2366 { (eval echo configure:2367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2368 if test -z "$ac_err"; then
2369   rm -rf conftest*
2370   eval "ac_cv_header_$ac_safe=yes"
2371 else
2372   echo "$ac_err" >&5
2373   echo "configure: failed program was:" >&5
2374   cat conftest.$ac_ext >&5
2375   rm -rf conftest*
2376   eval "ac_cv_header_$ac_safe=no"
2377 fi
2378 rm -f conftest*
2379 fi
2380 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2381   echo "$ac_t""yes" 1>&6
2382     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2383   cat >> confdefs.h <<EOF
2384 #define $ac_tr_hdr 1
2385 EOF
2386  
2387 else
2388   echo "$ac_t""no" 1>&6
2389 fi
2390 done
2391
2392 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2393 do
2394 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2395 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2396 echo "configure:2397: checking for $ac_hdr" >&5
2397 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2398   echo $ac_n "(cached) $ac_c" 1>&6
2399 else
2400   cat > conftest.$ac_ext <<EOF
2401 #line 2402 "configure"
2402 #include "confdefs.h"
2403 #include <$ac_hdr>
2404 EOF
2405 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2406 { (eval echo configure:2407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2407 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2408 if test -z "$ac_err"; then
2409   rm -rf conftest*
2410   eval "ac_cv_header_$ac_safe=yes"
2411 else
2412   echo "$ac_err" >&5
2413   echo "configure: failed program was:" >&5
2414   cat conftest.$ac_ext >&5
2415   rm -rf conftest*
2416   eval "ac_cv_header_$ac_safe=no"
2417 fi
2418 rm -f conftest*
2419 fi
2420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2421   echo "$ac_t""yes" 1>&6
2422     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2423   cat >> confdefs.h <<EOF
2424 #define $ac_tr_hdr 1
2425 EOF
2426  
2427 else
2428   echo "$ac_t""no" 1>&6
2429 fi
2430 done
2431
2432
2433 # For experimental utmp support (lastlog on some BSD-like systems)
2434 for ac_hdr in utmp.h utmpx.h lastlog.h
2435 do
2436 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2437 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2438 echo "configure:2439: checking for $ac_hdr" >&5
2439 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2440   echo $ac_n "(cached) $ac_c" 1>&6
2441 else
2442   cat > conftest.$ac_ext <<EOF
2443 #line 2444 "configure"
2444 #include "confdefs.h"
2445 #include <$ac_hdr>
2446 EOF
2447 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2448 { (eval echo configure:2449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2449 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2450 if test -z "$ac_err"; then
2451   rm -rf conftest*
2452   eval "ac_cv_header_$ac_safe=yes"
2453 else
2454   echo "$ac_err" >&5
2455   echo "configure: failed program was:" >&5
2456   cat conftest.$ac_ext >&5
2457   rm -rf conftest*
2458   eval "ac_cv_header_$ac_safe=no"
2459 fi
2460 rm -f conftest*
2461 fi
2462 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2463   echo "$ac_t""yes" 1>&6
2464     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2465   cat >> confdefs.h <<EOF
2466 #define $ac_tr_hdr 1
2467 EOF
2468  
2469 else
2470   echo "$ac_t""no" 1>&6
2471 fi
2472 done
2473
2474  
2475 # For quotas on Veritas VxFS filesystems
2476 for ac_hdr in sys/fs/vx_quota.h
2477 do
2478 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2479 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2480 echo "configure:2481: checking for $ac_hdr" >&5
2481 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2482   echo $ac_n "(cached) $ac_c" 1>&6
2483 else
2484   cat > conftest.$ac_ext <<EOF
2485 #line 2486 "configure"
2486 #include "confdefs.h"
2487 #include <$ac_hdr>
2488 EOF
2489 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2490 { (eval echo configure:2491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2491 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2492 if test -z "$ac_err"; then
2493   rm -rf conftest*
2494   eval "ac_cv_header_$ac_safe=yes"
2495 else
2496   echo "$ac_err" >&5
2497   echo "configure: failed program was:" >&5
2498   cat conftest.$ac_ext >&5
2499   rm -rf conftest*
2500   eval "ac_cv_header_$ac_safe=no"
2501 fi
2502 rm -f conftest*
2503 fi
2504 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2505   echo "$ac_t""yes" 1>&6
2506     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2507   cat >> confdefs.h <<EOF
2508 #define $ac_tr_hdr 1
2509 EOF
2510  
2511 else
2512   echo "$ac_t""no" 1>&6
2513 fi
2514 done
2515
2516
2517 echo $ac_n "checking size of int""... $ac_c" 1>&6
2518 echo "configure:2519: checking size of int" >&5
2519 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2520   echo $ac_n "(cached) $ac_c" 1>&6
2521 else
2522   if test "$cross_compiling" = yes; then
2523   ac_cv_sizeof_int=cross
2524 else
2525   cat > conftest.$ac_ext <<EOF
2526 #line 2527 "configure"
2527 #include "confdefs.h"
2528 #include <stdio.h>
2529 #include <sys/types.h>
2530 main()
2531 {
2532   FILE *f=fopen("conftestval", "w");
2533   if (!f) exit(1);
2534   fprintf(f, "%d\n", sizeof(int));
2535   exit(0);
2536 }
2537 EOF
2538 if { (eval echo configure:2539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2539 then
2540   ac_cv_sizeof_int=`cat conftestval`
2541 else
2542   echo "configure: failed program was:" >&5
2543   cat conftest.$ac_ext >&5
2544   rm -fr conftest*
2545   ac_cv_sizeof_int=0
2546 fi
2547 rm -fr conftest*
2548 fi
2549
2550 fi
2551 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2552 cat >> confdefs.h <<EOF
2553 #define SIZEOF_INT $ac_cv_sizeof_int
2554 EOF
2555
2556
2557 echo $ac_n "checking size of long""... $ac_c" 1>&6
2558 echo "configure:2559: checking size of long" >&5
2559 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2560   echo $ac_n "(cached) $ac_c" 1>&6
2561 else
2562   if test "$cross_compiling" = yes; then
2563   ac_cv_sizeof_long=cross
2564 else
2565   cat > conftest.$ac_ext <<EOF
2566 #line 2567 "configure"
2567 #include "confdefs.h"
2568 #include <stdio.h>
2569 #include <sys/types.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 #include <sys/types.h>
2610 main()
2611 {
2612   FILE *f=fopen("conftestval", "w");
2613   if (!f) exit(1);
2614   fprintf(f, "%d\n", sizeof(short));
2615   exit(0);
2616 }
2617 EOF
2618 if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2619 then
2620   ac_cv_sizeof_short=`cat conftestval`
2621 else
2622   echo "configure: failed program was:" >&5
2623   cat conftest.$ac_ext >&5
2624   rm -fr conftest*
2625   ac_cv_sizeof_short=0
2626 fi
2627 rm -fr conftest*
2628 fi
2629
2630 fi
2631 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2632 cat >> confdefs.h <<EOF
2633 #define SIZEOF_SHORT $ac_cv_sizeof_short
2634 EOF
2635
2636
2637
2638 echo $ac_n "checking for working const""... $ac_c" 1>&6
2639 echo "configure:2640: checking for working const" >&5
2640 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2641   echo $ac_n "(cached) $ac_c" 1>&6
2642 else
2643   cat > conftest.$ac_ext <<EOF
2644 #line 2645 "configure"
2645 #include "confdefs.h"
2646
2647 int main() {
2648
2649 /* Ultrix mips cc rejects this.  */
2650 typedef int charset[2]; const charset x;
2651 /* SunOS 4.1.1 cc rejects this.  */
2652 char const *const *ccp;
2653 char **p;
2654 /* NEC SVR4.0.2 mips cc rejects this.  */
2655 struct point {int x, y;};
2656 static struct point const zero = {0,0};
2657 /* AIX XL C 1.02.0.0 rejects this.
2658    It does not let you subtract one const X* pointer from another in an arm
2659    of an if-expression whose if-part is not a constant expression */
2660 const char *g = "string";
2661 ccp = &g + (g ? g-g : 0);
2662 /* HPUX 7.0 cc rejects these. */
2663 ++ccp;
2664 p = (char**) ccp;
2665 ccp = (char const *const *) p;
2666 { /* SCO 3.2v4 cc rejects this.  */
2667   char *t;
2668   char const *s = 0 ? (char *) 0 : (char const *) 0;
2669
2670   *t++ = 0;
2671 }
2672 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2673   int x[] = {25, 17};
2674   const int *foo = &x[0];
2675   ++foo;
2676 }
2677 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2678   typedef const int *iptr;
2679   iptr p = 0;
2680   ++p;
2681 }
2682 { /* AIX XL C 1.02.0.0 rejects this saying
2683      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2684   struct s { int j; const int *ap[3]; };
2685   struct s *b; b->j = 5;
2686 }
2687 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2688   const int foo = 10;
2689 }
2690
2691 ; return 0; }
2692 EOF
2693 if { (eval echo configure:2694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2694   rm -rf conftest*
2695   ac_cv_c_const=yes
2696 else
2697   echo "configure: failed program was:" >&5
2698   cat conftest.$ac_ext >&5
2699   rm -rf conftest*
2700   ac_cv_c_const=no
2701 fi
2702 rm -f conftest*
2703 fi
2704
2705 echo "$ac_t""$ac_cv_c_const" 1>&6
2706 if test $ac_cv_c_const = no; then
2707   cat >> confdefs.h <<\EOF
2708 #define const 
2709 EOF
2710
2711 fi
2712
2713 echo $ac_n "checking for inline""... $ac_c" 1>&6
2714 echo "configure:2715: checking for inline" >&5
2715 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2716   echo $ac_n "(cached) $ac_c" 1>&6
2717 else
2718   ac_cv_c_inline=no
2719 for ac_kw in inline __inline__ __inline; do
2720   cat > conftest.$ac_ext <<EOF
2721 #line 2722 "configure"
2722 #include "confdefs.h"
2723
2724 int main() {
2725 } $ac_kw foo() {
2726 ; return 0; }
2727 EOF
2728 if { (eval echo configure:2729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2729   rm -rf conftest*
2730   ac_cv_c_inline=$ac_kw; break
2731 else
2732   echo "configure: failed program was:" >&5
2733   cat conftest.$ac_ext >&5
2734 fi
2735 rm -f conftest*
2736 done
2737
2738 fi
2739
2740 echo "$ac_t""$ac_cv_c_inline" 1>&6
2741 case "$ac_cv_c_inline" in
2742   inline | yes) ;;
2743   no) cat >> confdefs.h <<\EOF
2744 #define inline 
2745 EOF
2746  ;;
2747   *)  cat >> confdefs.h <<EOF
2748 #define inline $ac_cv_c_inline
2749 EOF
2750  ;;
2751 esac
2752
2753 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2754 echo "configure:2755: checking whether byte ordering is bigendian" >&5
2755 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2756   echo $ac_n "(cached) $ac_c" 1>&6
2757 else
2758   ac_cv_c_bigendian=unknown
2759 # See if sys/param.h defines the BYTE_ORDER macro.
2760 cat > conftest.$ac_ext <<EOF
2761 #line 2762 "configure"
2762 #include "confdefs.h"
2763 #include <sys/types.h>
2764 #include <sys/param.h>
2765 int main() {
2766
2767 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2768  bogus endian macros
2769 #endif
2770 ; return 0; }
2771 EOF
2772 if { (eval echo configure:2773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2773   rm -rf conftest*
2774   # It does; now see whether it defined to BIG_ENDIAN or not.
2775 cat > conftest.$ac_ext <<EOF
2776 #line 2777 "configure"
2777 #include "confdefs.h"
2778 #include <sys/types.h>
2779 #include <sys/param.h>
2780 int main() {
2781
2782 #if BYTE_ORDER != BIG_ENDIAN
2783  not big endian
2784 #endif
2785 ; return 0; }
2786 EOF
2787 if { (eval echo configure:2788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2788   rm -rf conftest*
2789   ac_cv_c_bigendian=yes
2790 else
2791   echo "configure: failed program was:" >&5
2792   cat conftest.$ac_ext >&5
2793   rm -rf conftest*
2794   ac_cv_c_bigendian=no
2795 fi
2796 rm -f conftest*
2797 else
2798   echo "configure: failed program was:" >&5
2799   cat conftest.$ac_ext >&5
2800 fi
2801 rm -f conftest*
2802 if test $ac_cv_c_bigendian = unknown; then
2803 if test "$cross_compiling" = yes; then
2804     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2805 else
2806   cat > conftest.$ac_ext <<EOF
2807 #line 2808 "configure"
2808 #include "confdefs.h"
2809 main () {
2810   /* Are we little or big endian?  From Harbison&Steele.  */
2811   union
2812   {
2813     long l;
2814     char c[sizeof (long)];
2815   } u;
2816   u.l = 1;
2817   exit (u.c[sizeof (long) - 1] == 1);
2818 }
2819 EOF
2820 if { (eval echo configure:2821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2821 then
2822   ac_cv_c_bigendian=no
2823 else
2824   echo "configure: failed program was:" >&5
2825   cat conftest.$ac_ext >&5
2826   rm -fr conftest*
2827   ac_cv_c_bigendian=yes
2828 fi
2829 rm -fr conftest*
2830 fi
2831
2832 fi
2833 fi
2834
2835 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2836 if test $ac_cv_c_bigendian = yes; then
2837   cat >> confdefs.h <<\EOF
2838 #define WORDS_BIGENDIAN 1
2839 EOF
2840
2841 fi
2842
2843 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2844 echo "configure:2845: checking whether char is unsigned" >&5
2845 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2846   echo $ac_n "(cached) $ac_c" 1>&6
2847 else
2848   if test "$GCC" = yes; then
2849   # GCC predefines this symbol on systems where it applies.
2850 cat > conftest.$ac_ext <<EOF
2851 #line 2852 "configure"
2852 #include "confdefs.h"
2853 #ifdef __CHAR_UNSIGNED__
2854   yes
2855 #endif
2856
2857 EOF
2858 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2859   egrep "yes" >/dev/null 2>&1; then
2860   rm -rf conftest*
2861   ac_cv_c_char_unsigned=yes
2862 else
2863   rm -rf conftest*
2864   ac_cv_c_char_unsigned=no
2865 fi
2866 rm -f conftest*
2867
2868 else
2869 if test "$cross_compiling" = yes; then
2870     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2871 else
2872   cat > conftest.$ac_ext <<EOF
2873 #line 2874 "configure"
2874 #include "confdefs.h"
2875 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2876 #if !defined(__STDC__) || __STDC__ != 1
2877 #define volatile
2878 #endif
2879 main() {
2880   volatile char c = 255; exit(c < 0);
2881 }
2882 EOF
2883 if { (eval echo configure:2884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2884 then
2885   ac_cv_c_char_unsigned=yes
2886 else
2887   echo "configure: failed program was:" >&5
2888   cat conftest.$ac_ext >&5
2889   rm -fr conftest*
2890   ac_cv_c_char_unsigned=no
2891 fi
2892 rm -fr conftest*
2893 fi
2894
2895 fi
2896 fi
2897
2898 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2899 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2900   cat >> confdefs.h <<\EOF
2901 #define __CHAR_UNSIGNED__ 1
2902 EOF
2903
2904 fi
2905
2906
2907 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2908 echo "configure:2909: checking return type of signal handlers" >&5
2909 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2910   echo $ac_n "(cached) $ac_c" 1>&6
2911 else
2912   cat > conftest.$ac_ext <<EOF
2913 #line 2914 "configure"
2914 #include "confdefs.h"
2915 #include <sys/types.h>
2916 #include <signal.h>
2917 #ifdef signal
2918 #undef signal
2919 #endif
2920 #ifdef __cplusplus
2921 extern "C" void (*signal (int, void (*)(int)))(int);
2922 #else
2923 void (*signal ()) ();
2924 #endif
2925
2926 int main() {
2927 int i;
2928 ; return 0; }
2929 EOF
2930 if { (eval echo configure:2931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2931   rm -rf conftest*
2932   ac_cv_type_signal=void
2933 else
2934   echo "configure: failed program was:" >&5
2935   cat conftest.$ac_ext >&5
2936   rm -rf conftest*
2937   ac_cv_type_signal=int
2938 fi
2939 rm -f conftest*
2940 fi
2941
2942 echo "$ac_t""$ac_cv_type_signal" 1>&6
2943 cat >> confdefs.h <<EOF
2944 #define RETSIGTYPE $ac_cv_type_signal
2945 EOF
2946
2947
2948 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2949 echo "configure:2950: checking for uid_t in sys/types.h" >&5
2950 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2951   echo $ac_n "(cached) $ac_c" 1>&6
2952 else
2953   cat > conftest.$ac_ext <<EOF
2954 #line 2955 "configure"
2955 #include "confdefs.h"
2956 #include <sys/types.h>
2957 EOF
2958 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2959   egrep "uid_t" >/dev/null 2>&1; then
2960   rm -rf conftest*
2961   ac_cv_type_uid_t=yes
2962 else
2963   rm -rf conftest*
2964   ac_cv_type_uid_t=no
2965 fi
2966 rm -f conftest*
2967
2968 fi
2969
2970 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2971 if test $ac_cv_type_uid_t = no; then
2972   cat >> confdefs.h <<\EOF
2973 #define uid_t int
2974 EOF
2975
2976   cat >> confdefs.h <<\EOF
2977 #define gid_t int
2978 EOF
2979
2980 fi
2981
2982 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2983 echo "configure:2984: checking for mode_t" >&5
2984 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   cat > conftest.$ac_ext <<EOF
2988 #line 2989 "configure"
2989 #include "confdefs.h"
2990 #include <sys/types.h>
2991 #if STDC_HEADERS
2992 #include <stdlib.h>
2993 #include <stddef.h>
2994 #endif
2995 EOF
2996 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2997   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2998   rm -rf conftest*
2999   ac_cv_type_mode_t=yes
3000 else
3001   rm -rf conftest*
3002   ac_cv_type_mode_t=no
3003 fi
3004 rm -f conftest*
3005
3006 fi
3007 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3008 if test $ac_cv_type_mode_t = no; then
3009   cat >> confdefs.h <<\EOF
3010 #define mode_t int
3011 EOF
3012
3013 fi
3014
3015 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3016 echo "configure:3017: checking for off_t" >&5
3017 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3018   echo $ac_n "(cached) $ac_c" 1>&6
3019 else
3020   cat > conftest.$ac_ext <<EOF
3021 #line 3022 "configure"
3022 #include "confdefs.h"
3023 #include <sys/types.h>
3024 #if STDC_HEADERS
3025 #include <stdlib.h>
3026 #include <stddef.h>
3027 #endif
3028 EOF
3029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3030   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3031   rm -rf conftest*
3032   ac_cv_type_off_t=yes
3033 else
3034   rm -rf conftest*
3035   ac_cv_type_off_t=no
3036 fi
3037 rm -f conftest*
3038
3039 fi
3040 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3041 if test $ac_cv_type_off_t = no; then
3042   cat >> confdefs.h <<\EOF
3043 #define off_t long
3044 EOF
3045
3046 fi
3047
3048 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3049 echo "configure:3050: checking for size_t" >&5
3050 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3051   echo $ac_n "(cached) $ac_c" 1>&6
3052 else
3053   cat > conftest.$ac_ext <<EOF
3054 #line 3055 "configure"
3055 #include "confdefs.h"
3056 #include <sys/types.h>
3057 #if STDC_HEADERS
3058 #include <stdlib.h>
3059 #include <stddef.h>
3060 #endif
3061 EOF
3062 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3063   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3064   rm -rf conftest*
3065   ac_cv_type_size_t=yes
3066 else
3067   rm -rf conftest*
3068   ac_cv_type_size_t=no
3069 fi
3070 rm -f conftest*
3071
3072 fi
3073 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3074 if test $ac_cv_type_size_t = no; then
3075   cat >> confdefs.h <<\EOF
3076 #define size_t unsigned
3077 EOF
3078
3079 fi
3080
3081 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3082 echo "configure:3083: checking for pid_t" >&5
3083 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3084   echo $ac_n "(cached) $ac_c" 1>&6
3085 else
3086   cat > conftest.$ac_ext <<EOF
3087 #line 3088 "configure"
3088 #include "confdefs.h"
3089 #include <sys/types.h>
3090 #if STDC_HEADERS
3091 #include <stdlib.h>
3092 #include <stddef.h>
3093 #endif
3094 EOF
3095 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3096   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3097   rm -rf conftest*
3098   ac_cv_type_pid_t=yes
3099 else
3100   rm -rf conftest*
3101   ac_cv_type_pid_t=no
3102 fi
3103 rm -f conftest*
3104
3105 fi
3106 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3107 if test $ac_cv_type_pid_t = no; then
3108   cat >> confdefs.h <<\EOF
3109 #define pid_t int
3110 EOF
3111
3112 fi
3113
3114 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3115 echo "configure:3116: checking for st_rdev in struct stat" >&5
3116 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3117   echo $ac_n "(cached) $ac_c" 1>&6
3118 else
3119   cat > conftest.$ac_ext <<EOF
3120 #line 3121 "configure"
3121 #include "confdefs.h"
3122 #include <sys/types.h>
3123 #include <sys/stat.h>
3124 int main() {
3125 struct stat s; s.st_rdev;
3126 ; return 0; }
3127 EOF
3128 if { (eval echo configure:3129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3129   rm -rf conftest*
3130   ac_cv_struct_st_rdev=yes
3131 else
3132   echo "configure: failed program was:" >&5
3133   cat conftest.$ac_ext >&5
3134   rm -rf conftest*
3135   ac_cv_struct_st_rdev=no
3136 fi
3137 rm -f conftest*
3138 fi
3139
3140 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3141 if test $ac_cv_struct_st_rdev = yes; then
3142   cat >> confdefs.h <<\EOF
3143 #define HAVE_ST_RDEV 1
3144 EOF
3145
3146 fi
3147
3148 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3149 echo "configure:3150: checking for d_off in dirent" >&5
3150 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3151   echo $ac_n "(cached) $ac_c" 1>&6
3152 else
3153   cat > conftest.$ac_ext <<EOF
3154 #line 3155 "configure"
3155 #include "confdefs.h"
3156
3157 #include <unistd.h>
3158 #include <sys/types.h>
3159 #include <dirent.h>
3160 int main() {
3161 struct dirent d; d.d_off;
3162 ; return 0; }
3163 EOF
3164 if { (eval echo configure:3165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3165   rm -rf conftest*
3166   ac_cv_dirent_d_off=yes
3167 else
3168   echo "configure: failed program was:" >&5
3169   cat conftest.$ac_ext >&5
3170   rm -rf conftest*
3171   ac_cv_dirent_d_off=no
3172 fi
3173 rm -f conftest*
3174 fi
3175
3176 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3177 if test $ac_cv_dirent_d_off = yes; then
3178   cat >> confdefs.h <<\EOF
3179 #define HAVE_DIRENT_D_OFF 1
3180 EOF
3181
3182 fi
3183
3184 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3185 echo "configure:3186: checking for ino_t" >&5
3186 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3187   echo $ac_n "(cached) $ac_c" 1>&6
3188 else
3189   cat > conftest.$ac_ext <<EOF
3190 #line 3191 "configure"
3191 #include "confdefs.h"
3192 #include <sys/types.h>
3193 #if STDC_HEADERS
3194 #include <stdlib.h>
3195 #include <stddef.h>
3196 #endif
3197 EOF
3198 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3199   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3200   rm -rf conftest*
3201   ac_cv_type_ino_t=yes
3202 else
3203   rm -rf conftest*
3204   ac_cv_type_ino_t=no
3205 fi
3206 rm -f conftest*
3207
3208 fi
3209 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3210 if test $ac_cv_type_ino_t = no; then
3211   cat >> confdefs.h <<\EOF
3212 #define ino_t unsigned
3213 EOF
3214
3215 fi
3216
3217 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3218 echo "configure:3219: checking for loff_t" >&5
3219 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3220   echo $ac_n "(cached) $ac_c" 1>&6
3221 else
3222   cat > conftest.$ac_ext <<EOF
3223 #line 3224 "configure"
3224 #include "confdefs.h"
3225 #include <sys/types.h>
3226 #if STDC_HEADERS
3227 #include <stdlib.h>
3228 #include <stddef.h>
3229 #endif
3230 EOF
3231 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3232   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3233   rm -rf conftest*
3234   ac_cv_type_loff_t=yes
3235 else
3236   rm -rf conftest*
3237   ac_cv_type_loff_t=no
3238 fi
3239 rm -f conftest*
3240
3241 fi
3242 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3243 if test $ac_cv_type_loff_t = no; then
3244   cat >> confdefs.h <<\EOF
3245 #define loff_t off_t
3246 EOF
3247
3248 fi
3249
3250 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3251 echo "configure:3252: checking for offset_t" >&5
3252 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3253   echo $ac_n "(cached) $ac_c" 1>&6
3254 else
3255   cat > conftest.$ac_ext <<EOF
3256 #line 3257 "configure"
3257 #include "confdefs.h"
3258 #include <sys/types.h>
3259 #if STDC_HEADERS
3260 #include <stdlib.h>
3261 #include <stddef.h>
3262 #endif
3263 EOF
3264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3265   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3266   rm -rf conftest*
3267   ac_cv_type_offset_t=yes
3268 else
3269   rm -rf conftest*
3270   ac_cv_type_offset_t=no
3271 fi
3272 rm -f conftest*
3273
3274 fi
3275 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3276 if test $ac_cv_type_offset_t = no; then
3277   cat >> confdefs.h <<\EOF
3278 #define offset_t loff_t
3279 EOF
3280
3281 fi
3282
3283 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3284 echo "configure:3285: checking for ssize_t" >&5
3285 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3286   echo $ac_n "(cached) $ac_c" 1>&6
3287 else
3288   cat > conftest.$ac_ext <<EOF
3289 #line 3290 "configure"
3290 #include "confdefs.h"
3291 #include <sys/types.h>
3292 #if STDC_HEADERS
3293 #include <stdlib.h>
3294 #include <stddef.h>
3295 #endif
3296 EOF
3297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3298   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3299   rm -rf conftest*
3300   ac_cv_type_ssize_t=yes
3301 else
3302   rm -rf conftest*
3303   ac_cv_type_ssize_t=no
3304 fi
3305 rm -f conftest*
3306
3307 fi
3308 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3309 if test $ac_cv_type_ssize_t = no; then
3310   cat >> confdefs.h <<\EOF
3311 #define ssize_t int
3312 EOF
3313
3314 fi
3315
3316 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3317 echo "configure:3318: checking for wchar_t" >&5
3318 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3319   echo $ac_n "(cached) $ac_c" 1>&6
3320 else
3321   cat > conftest.$ac_ext <<EOF
3322 #line 3323 "configure"
3323 #include "confdefs.h"
3324 #include <sys/types.h>
3325 #if STDC_HEADERS
3326 #include <stdlib.h>
3327 #include <stddef.h>
3328 #endif
3329 EOF
3330 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3331   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3332   rm -rf conftest*
3333   ac_cv_type_wchar_t=yes
3334 else
3335   rm -rf conftest*
3336   ac_cv_type_wchar_t=no
3337 fi
3338 rm -f conftest*
3339
3340 fi
3341 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3342 if test $ac_cv_type_wchar_t = no; then
3343   cat >> confdefs.h <<\EOF
3344 #define wchar_t unsigned short
3345 EOF
3346
3347 fi
3348
3349
3350 # we need libcups for CUPS support...
3351 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3352 echo "configure:3353: checking for httpConnect in -lcups" >&5
3353 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3354 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3355   echo $ac_n "(cached) $ac_c" 1>&6
3356 else
3357   ac_save_LIBS="$LIBS"
3358 LIBS="-lcups  $LIBS"
3359 cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3362 /* Override any gcc2 internal prototype to avoid an error.  */
3363 /* We use char because int might match the return type of a gcc2
3364     builtin and then its argument prototype would still apply.  */
3365 char httpConnect();
3366
3367 int main() {
3368 httpConnect()
3369 ; return 0; }
3370 EOF
3371 if { (eval echo configure:3372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3372   rm -rf conftest*
3373   eval "ac_cv_lib_$ac_lib_var=yes"
3374 else
3375   echo "configure: failed program was:" >&5
3376   cat conftest.$ac_ext >&5
3377   rm -rf conftest*
3378   eval "ac_cv_lib_$ac_lib_var=no"
3379 fi
3380 rm -f conftest*
3381 LIBS="$ac_save_LIBS"
3382
3383 fi
3384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3385   echo "$ac_t""yes" 1>&6
3386     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3387     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3388   cat >> confdefs.h <<EOF
3389 #define $ac_tr_lib 1
3390 EOF
3391
3392   LIBS="-lcups $LIBS"
3393
3394 else
3395   echo "$ac_t""no" 1>&6
3396 fi
3397
3398
3399 # we need libdl for PAM and the new VFS code
3400 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3401 echo "configure:3402: checking for dlopen in -ldl" >&5
3402 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3403 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3404   echo $ac_n "(cached) $ac_c" 1>&6
3405 else
3406   ac_save_LIBS="$LIBS"
3407 LIBS="-ldl  $LIBS"
3408 cat > conftest.$ac_ext <<EOF
3409 #line 3410 "configure"
3410 #include "confdefs.h"
3411 /* Override any gcc2 internal prototype to avoid an error.  */
3412 /* We use char because int might match the return type of a gcc2
3413     builtin and then its argument prototype would still apply.  */
3414 char dlopen();
3415
3416 int main() {
3417 dlopen()
3418 ; return 0; }
3419 EOF
3420 if { (eval echo configure:3421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3421   rm -rf conftest*
3422   eval "ac_cv_lib_$ac_lib_var=yes"
3423 else
3424   echo "configure: failed program was:" >&5
3425   cat conftest.$ac_ext >&5
3426   rm -rf conftest*
3427   eval "ac_cv_lib_$ac_lib_var=no"
3428 fi
3429 rm -f conftest*
3430 LIBS="$ac_save_LIBS"
3431
3432 fi
3433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3434   echo "$ac_t""yes" 1>&6
3435   LIBS="$LIBS -ldl";
3436         cat >> confdefs.h <<\EOF
3437 #define HAVE_LIBDL 1
3438 EOF
3439
3440 else
3441   echo "$ac_t""no" 1>&6
3442 fi
3443
3444
3445 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3446 echo "configure:3447: checking for socklen_t type" >&5
3447 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3448   echo $ac_n "(cached) $ac_c" 1>&6
3449 else
3450   
3451     cat > conftest.$ac_ext <<EOF
3452 #line 3453 "configure"
3453 #include "confdefs.h"
3454
3455 #include <sys/types.h>
3456 #if STDC_HEADERS
3457 #include <stdlib.h>
3458 #include <stddef.h>
3459 #endif
3460 #include <sys/socket.h>
3461 int main() {
3462 socklen_t i = 0
3463 ; return 0; }
3464 EOF
3465 if { (eval echo configure:3466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3466   rm -rf conftest*
3467   samba_cv_socklen_t=yes
3468 else
3469   echo "configure: failed program was:" >&5
3470   cat conftest.$ac_ext >&5
3471   rm -rf conftest*
3472   samba_cv_socklen_t=no
3473 fi
3474 rm -f conftest*
3475 fi
3476
3477 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3478 if test x"$samba_cv_socklen_t" = x"yes"; then
3479    cat >> confdefs.h <<\EOF
3480 #define HAVE_SOCKLEN_T_TYPE 1
3481 EOF
3482
3483 fi
3484
3485 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3486 echo "configure:3487: checking for sig_atomic_t type" >&5
3487 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3488   echo $ac_n "(cached) $ac_c" 1>&6
3489 else
3490   
3491     cat > conftest.$ac_ext <<EOF
3492 #line 3493 "configure"
3493 #include "confdefs.h"
3494
3495 #include <sys/types.h>
3496 #if STDC_HEADERS
3497 #include <stdlib.h>
3498 #include <stddef.h>
3499 #endif
3500 #include <signal.h>
3501 int main() {
3502 sig_atomic_t i = 0
3503 ; return 0; }
3504 EOF
3505 if { (eval echo configure:3506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3506   rm -rf conftest*
3507   samba_cv_sig_atomic_t=yes
3508 else
3509   echo "configure: failed program was:" >&5
3510   cat conftest.$ac_ext >&5
3511   rm -rf conftest*
3512   samba_cv_sig_atomic_t=no
3513 fi
3514 rm -f conftest*
3515 fi
3516
3517 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3518 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3519    cat >> confdefs.h <<\EOF
3520 #define HAVE_SIG_ATOMIC_T_TYPE 1
3521 EOF
3522
3523 fi
3524
3525 # stupid headers have the functions but no declaration. grrrr.
3526
3527  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3528 echo "configure:3529: checking for errno declaration" >&5
3529 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3530   echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532   
3533     cat > conftest.$ac_ext <<EOF
3534 #line 3535 "configure"
3535 #include "confdefs.h"
3536 #include <errno.h>
3537 int main() {
3538 int i = (int)errno
3539 ; return 0; }
3540 EOF
3541 if { (eval echo configure:3542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3542   rm -rf conftest*
3543   ac_cv_have_errno_decl=yes
3544 else
3545   echo "configure: failed program was:" >&5
3546   cat conftest.$ac_ext >&5
3547   rm -rf conftest*
3548   ac_cv_have_errno_decl=no
3549 fi
3550 rm -f conftest*
3551 fi
3552
3553 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3554  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3555     cat >> confdefs.h <<\EOF
3556 #define HAVE_ERRNO_DECL 1
3557 EOF
3558
3559  fi
3560
3561
3562  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3563 echo "configure:3564: checking for setresuid declaration" >&5
3564 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3565   echo $ac_n "(cached) $ac_c" 1>&6
3566 else
3567   
3568     cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 #include <unistd.h>
3572 int main() {
3573 int i = (int)setresuid
3574 ; return 0; }
3575 EOF
3576 if { (eval echo configure:3577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3577   rm -rf conftest*
3578   ac_cv_have_setresuid_decl=yes
3579 else
3580   echo "configure: failed program was:" >&5
3581   cat conftest.$ac_ext >&5
3582   rm -rf conftest*
3583   ac_cv_have_setresuid_decl=no
3584 fi
3585 rm -f conftest*
3586 fi
3587
3588 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3589  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3590     cat >> confdefs.h <<\EOF
3591 #define HAVE_SETRESUID_DECL 1
3592 EOF
3593
3594  fi
3595
3596
3597  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3598 echo "configure:3599: checking for setresgid declaration" >&5
3599 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3600   echo $ac_n "(cached) $ac_c" 1>&6
3601 else
3602   
3603     cat > conftest.$ac_ext <<EOF
3604 #line 3605 "configure"
3605 #include "confdefs.h"
3606 #include <unistd.h>
3607 int main() {
3608 int i = (int)setresgid
3609 ; return 0; }
3610 EOF
3611 if { (eval echo configure:3612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3612   rm -rf conftest*
3613   ac_cv_have_setresgid_decl=yes
3614 else
3615   echo "configure: failed program was:" >&5
3616   cat conftest.$ac_ext >&5
3617   rm -rf conftest*
3618   ac_cv_have_setresgid_decl=no
3619 fi
3620 rm -f conftest*
3621 fi
3622
3623 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3624  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3625     cat >> confdefs.h <<\EOF
3626 #define HAVE_SETRESGID_DECL 1
3627 EOF
3628
3629  fi
3630
3631
3632  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3633 echo "configure:3634: checking for asprintf declaration" >&5
3634 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3635   echo $ac_n "(cached) $ac_c" 1>&6
3636 else
3637   
3638     cat > conftest.$ac_ext <<EOF
3639 #line 3640 "configure"
3640 #include "confdefs.h"
3641 #include <stdio.h>
3642 int main() {
3643 int i = (int)asprintf
3644 ; return 0; }
3645 EOF
3646 if { (eval echo configure:3647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3647   rm -rf conftest*
3648   ac_cv_have_asprintf_decl=yes
3649 else
3650   echo "configure: failed program was:" >&5
3651   cat conftest.$ac_ext >&5
3652   rm -rf conftest*
3653   ac_cv_have_asprintf_decl=no
3654 fi
3655 rm -f conftest*
3656 fi
3657
3658 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3659  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3660     cat >> confdefs.h <<\EOF
3661 #define HAVE_ASPRINTF_DECL 1
3662 EOF
3663
3664  fi
3665
3666
3667  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3668 echo "configure:3669: checking for vasprintf declaration" >&5
3669 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3670   echo $ac_n "(cached) $ac_c" 1>&6
3671 else
3672   
3673     cat > conftest.$ac_ext <<EOF
3674 #line 3675 "configure"
3675 #include "confdefs.h"
3676 #include <stdio.h>
3677 int main() {
3678 int i = (int)vasprintf
3679 ; return 0; }
3680 EOF
3681 if { (eval echo configure:3682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3682   rm -rf conftest*
3683   ac_cv_have_vasprintf_decl=yes
3684 else
3685   echo "configure: failed program was:" >&5
3686   cat conftest.$ac_ext >&5
3687   rm -rf conftest*
3688   ac_cv_have_vasprintf_decl=no
3689 fi
3690 rm -f conftest*
3691 fi
3692
3693 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3694  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3695     cat >> confdefs.h <<\EOF
3696 #define HAVE_VASPRINTF_DECL 1
3697 EOF
3698
3699  fi
3700
3701
3702  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3703 echo "configure:3704: checking for vsnprintf declaration" >&5
3704 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3705   echo $ac_n "(cached) $ac_c" 1>&6
3706 else
3707   
3708     cat > conftest.$ac_ext <<EOF
3709 #line 3710 "configure"
3710 #include "confdefs.h"
3711 #include <stdio.h>
3712 int main() {
3713 int i = (int)vsnprintf
3714 ; return 0; }
3715 EOF
3716 if { (eval echo configure:3717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3717   rm -rf conftest*
3718   ac_cv_have_vsnprintf_decl=yes
3719 else
3720   echo "configure: failed program was:" >&5
3721   cat conftest.$ac_ext >&5
3722   rm -rf conftest*
3723   ac_cv_have_vsnprintf_decl=no
3724 fi
3725 rm -f conftest*
3726 fi
3727
3728 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3729  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3730     cat >> confdefs.h <<\EOF
3731 #define HAVE_VSNPRINTF_DECL 1
3732 EOF
3733
3734  fi
3735
3736
3737  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3738 echo "configure:3739: checking for snprintf declaration" >&5
3739 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3740   echo $ac_n "(cached) $ac_c" 1>&6
3741 else
3742   
3743     cat > conftest.$ac_ext <<EOF
3744 #line 3745 "configure"
3745 #include "confdefs.h"
3746 #include <stdio.h>
3747 int main() {
3748 int i = (int)snprintf
3749 ; return 0; }
3750 EOF
3751 if { (eval echo configure:3752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3752   rm -rf conftest*
3753   ac_cv_have_snprintf_decl=yes
3754 else
3755   echo "configure: failed program was:" >&5
3756   cat conftest.$ac_ext >&5
3757   rm -rf conftest*
3758   ac_cv_have_snprintf_decl=no
3759 fi
3760 rm -f conftest*
3761 fi
3762
3763 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3764  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3765     cat >> confdefs.h <<\EOF
3766 #define HAVE_SNPRINTF_DECL 1
3767 EOF
3768
3769  fi
3770
3771
3772 # and glibc has setresuid under linux but the function does
3773 # nothing until kernel 2.1.44! very dumb.
3774 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3775 echo "configure:3776: checking for real setresuid" >&5
3776 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3777   echo $ac_n "(cached) $ac_c" 1>&6
3778 else
3779   
3780     if test "$cross_compiling" = yes; then
3781   samba_cv_have_setresuid=cross
3782 else
3783   cat > conftest.$ac_ext <<EOF
3784 #line 3785 "configure"
3785 #include "confdefs.h"
3786 #include <errno.h>
3787 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3788 EOF
3789 if { (eval echo configure:3790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3790 then
3791   samba_cv_have_setresuid=yes
3792 else
3793   echo "configure: failed program was:" >&5
3794   cat conftest.$ac_ext >&5
3795   rm -fr conftest*
3796   samba_cv_have_setresuid=no
3797 fi
3798 rm -fr conftest*
3799 fi
3800
3801 fi
3802
3803 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3804 if test x"$samba_cv_have_setresuid" = x"yes"; then
3805     cat >> confdefs.h <<\EOF
3806 #define HAVE_SETRESUID 1
3807 EOF
3808
3809 fi
3810
3811 # Do the same check for setresguid...
3812 #
3813 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3814 echo "configure:3815: checking for real setresgid" >&5
3815 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
3816   echo $ac_n "(cached) $ac_c" 1>&6
3817 else
3818   
3819     if test "$cross_compiling" = yes; then
3820   samba_cv_have_setresgid=cross
3821 else
3822   cat > conftest.$ac_ext <<EOF
3823 #line 3824 "configure"
3824 #include "confdefs.h"
3825 #include <unistd.h>
3826 #include <errno.h>
3827 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
3828 EOF
3829 if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3830 then
3831   samba_cv_have_setresgid=yes
3832 else
3833   echo "configure: failed program was:" >&5
3834   cat conftest.$ac_ext >&5
3835   rm -fr conftest*
3836   samba_cv_have_setresgid=no
3837 fi
3838 rm -fr conftest*
3839 fi
3840
3841 fi
3842
3843 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
3844 if test x"$samba_cv_have_setresgid" = x"yes"; then
3845     cat >> confdefs.h <<\EOF
3846 #define HAVE_SETRESGID 1
3847 EOF
3848
3849 fi
3850
3851 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3852 echo "configure:3853: checking for 8-bit clean memcmp" >&5
3853 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3854   echo $ac_n "(cached) $ac_c" 1>&6
3855 else
3856   if test "$cross_compiling" = yes; then
3857   ac_cv_func_memcmp_clean=no
3858 else
3859   cat > conftest.$ac_ext <<EOF
3860 #line 3861 "configure"
3861 #include "confdefs.h"
3862
3863 main()
3864 {
3865   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3866   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3867 }
3868
3869 EOF
3870 if { (eval echo configure:3871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3871 then
3872   ac_cv_func_memcmp_clean=yes
3873 else
3874   echo "configure: failed program was:" >&5
3875   cat conftest.$ac_ext >&5
3876   rm -fr conftest*
3877   ac_cv_func_memcmp_clean=no
3878 fi
3879 rm -fr conftest*
3880 fi
3881
3882 fi
3883
3884 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3885 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
3886
3887
3888 ###############################################
3889 # test for where we get crypt() from
3890 for ac_func in crypt
3891 do
3892 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3893 echo "configure:3894: checking for $ac_func" >&5
3894 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3895   echo $ac_n "(cached) $ac_c" 1>&6
3896 else
3897   cat > conftest.$ac_ext <<EOF
3898 #line 3899 "configure"
3899 #include "confdefs.h"
3900 /* System header to define __stub macros and hopefully few prototypes,
3901     which can conflict with char $ac_func(); below.  */
3902 #include <assert.h>
3903 /* Override any gcc2 internal prototype to avoid an error.  */
3904 /* We use char because int might match the return type of a gcc2
3905     builtin and then its argument prototype would still apply.  */
3906 char $ac_func();
3907
3908 int main() {
3909
3910 /* The GNU C library defines this for functions which it implements
3911     to always fail with ENOSYS.  Some functions are actually named
3912     something starting with __ and the normal name is an alias.  */
3913 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3914 choke me
3915 #else
3916 $ac_func();
3917 #endif
3918
3919 ; return 0; }
3920 EOF
3921 if { (eval echo configure:3922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3922   rm -rf conftest*
3923   eval "ac_cv_func_$ac_func=yes"
3924 else
3925   echo "configure: failed program was:" >&5
3926   cat conftest.$ac_ext >&5
3927   rm -rf conftest*
3928   eval "ac_cv_func_$ac_func=no"
3929 fi
3930 rm -f conftest*
3931 fi
3932
3933 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3934   echo "$ac_t""yes" 1>&6
3935     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3936   cat >> confdefs.h <<EOF
3937 #define $ac_tr_func 1
3938 EOF
3939  
3940 else
3941   echo "$ac_t""no" 1>&6
3942 fi
3943 done
3944
3945 if test x"$ac_cv_func_crypt" = x"no"; then
3946     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
3947 echo "configure:3948: checking for crypt in -lcrypt" >&5
3948 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3949 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3950   echo $ac_n "(cached) $ac_c" 1>&6
3951 else
3952   ac_save_LIBS="$LIBS"
3953 LIBS="-lcrypt  $LIBS"
3954 cat > conftest.$ac_ext <<EOF
3955 #line 3956 "configure"
3956 #include "confdefs.h"
3957 /* Override any gcc2 internal prototype to avoid an error.  */
3958 /* We use char because int might match the return type of a gcc2
3959     builtin and then its argument prototype would still apply.  */
3960 char crypt();
3961
3962 int main() {
3963 crypt()
3964 ; return 0; }
3965 EOF
3966 if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3967   rm -rf conftest*
3968   eval "ac_cv_lib_$ac_lib_var=yes"
3969 else
3970   echo "configure: failed program was:" >&5
3971   cat conftest.$ac_ext >&5
3972   rm -rf conftest*
3973   eval "ac_cv_lib_$ac_lib_var=no"
3974 fi
3975 rm -f conftest*
3976 LIBS="$ac_save_LIBS"
3977
3978 fi
3979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3980   echo "$ac_t""yes" 1>&6
3981   LIBS="$LIBS -lcrypt";
3982         cat >> confdefs.h <<\EOF
3983 #define HAVE_CRYPT 1
3984 EOF
3985
3986 else
3987   echo "$ac_t""no" 1>&6
3988 fi
3989
3990 fi
3991
3992
3993 ###############################################
3994 # Readline included by default unless explicitly asked not to
3995 test "${with_readline+set}" != "set" && with_readline=yes
3996
3997 # test for where we get readline() from
3998 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
3999 echo "configure:4000: checking whether to use readline" >&5
4000 # Check whether --with-readline or --without-readline was given.
4001 if test "${with_readline+set}" = set; then
4002   withval="$with_readline"
4003     case "$with_readline" in
4004   yes)
4005     echo "$ac_t""yes" 1>&6
4006
4007     for ac_hdr in readline.h history.h readline/readline.h
4008 do
4009 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4010 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4011 echo "configure:4012: checking for $ac_hdr" >&5
4012 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4013   echo $ac_n "(cached) $ac_c" 1>&6
4014 else
4015   cat > conftest.$ac_ext <<EOF
4016 #line 4017 "configure"
4017 #include "confdefs.h"
4018 #include <$ac_hdr>
4019 EOF
4020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4021 { (eval echo configure:4022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4023 if test -z "$ac_err"; then
4024   rm -rf conftest*
4025   eval "ac_cv_header_$ac_safe=yes"
4026 else
4027   echo "$ac_err" >&5
4028   echo "configure: failed program was:" >&5
4029   cat conftest.$ac_ext >&5
4030   rm -rf conftest*
4031   eval "ac_cv_header_$ac_safe=no"
4032 fi
4033 rm -f conftest*
4034 fi
4035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4036   echo "$ac_t""yes" 1>&6
4037     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4038   cat >> confdefs.h <<EOF
4039 #define $ac_tr_hdr 1
4040 EOF
4041  
4042 else
4043   echo "$ac_t""no" 1>&6
4044 fi
4045 done
4046
4047     for ac_hdr in readline/history.h
4048 do
4049 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4050 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4051 echo "configure:4052: checking for $ac_hdr" >&5
4052 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4053   echo $ac_n "(cached) $ac_c" 1>&6
4054 else
4055   cat > conftest.$ac_ext <<EOF
4056 #line 4057 "configure"
4057 #include "confdefs.h"
4058 #include <$ac_hdr>
4059 EOF
4060 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4061 { (eval echo configure:4062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4062 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4063 if test -z "$ac_err"; then
4064   rm -rf conftest*
4065   eval "ac_cv_header_$ac_safe=yes"
4066 else
4067   echo "$ac_err" >&5
4068   echo "configure: failed program was:" >&5
4069   cat conftest.$ac_ext >&5
4070   rm -rf conftest*
4071   eval "ac_cv_header_$ac_safe=no"
4072 fi
4073 rm -f conftest*
4074 fi
4075 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4076   echo "$ac_t""yes" 1>&6
4077     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4078   cat >> confdefs.h <<EOF
4079 #define $ac_tr_hdr 1
4080 EOF
4081  
4082 else
4083   echo "$ac_t""no" 1>&6
4084 fi
4085 done
4086
4087
4088     for ac_hdr in readline.h readline/readline.h
4089 do
4090 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4091 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4092 echo "configure:4093: checking for $ac_hdr" >&5
4093 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4094   echo $ac_n "(cached) $ac_c" 1>&6
4095 else
4096   cat > conftest.$ac_ext <<EOF
4097 #line 4098 "configure"
4098 #include "confdefs.h"
4099 #include <$ac_hdr>
4100 EOF
4101 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4102 { (eval echo configure:4103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4103 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4104 if test -z "$ac_err"; then
4105   rm -rf conftest*
4106   eval "ac_cv_header_$ac_safe=yes"
4107 else
4108   echo "$ac_err" >&5
4109   echo "configure: failed program was:" >&5
4110   cat conftest.$ac_ext >&5
4111   rm -rf conftest*
4112   eval "ac_cv_header_$ac_safe=no"
4113 fi
4114 rm -f conftest*
4115 fi
4116 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4117   echo "$ac_t""yes" 1>&6
4118     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4119   cat >> confdefs.h <<EOF
4120 #define $ac_tr_hdr 1
4121 EOF
4122  
4123       for termlib in ncurses curses termcap terminfo termlib; do
4124        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4125 echo "configure:4126: checking for tgetent in -l${termlib}" >&5
4126 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4127 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4128   echo $ac_n "(cached) $ac_c" 1>&6
4129 else
4130   ac_save_LIBS="$LIBS"
4131 LIBS="-l${termlib}  $LIBS"
4132 cat > conftest.$ac_ext <<EOF
4133 #line 4134 "configure"
4134 #include "confdefs.h"
4135 /* Override any gcc2 internal prototype to avoid an error.  */
4136 /* We use char because int might match the return type of a gcc2
4137     builtin and then its argument prototype would still apply.  */
4138 char tgetent();
4139
4140 int main() {
4141 tgetent()
4142 ; return 0; }
4143 EOF
4144 if { (eval echo configure:4145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4145   rm -rf conftest*
4146   eval "ac_cv_lib_$ac_lib_var=yes"
4147 else
4148   echo "configure: failed program was:" >&5
4149   cat conftest.$ac_ext >&5
4150   rm -rf conftest*
4151   eval "ac_cv_lib_$ac_lib_var=no"
4152 fi
4153 rm -f conftest*
4154 LIBS="$ac_save_LIBS"
4155
4156 fi
4157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4158   echo "$ac_t""yes" 1>&6
4159   TERMLIBS="-l${termlib}"; break
4160 else
4161   echo "$ac_t""no" 1>&6
4162 fi
4163
4164       done
4165       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4166 echo "configure:4167: checking for rl_callback_handler_install in -lreadline" >&5
4167 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4168 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4169   echo $ac_n "(cached) $ac_c" 1>&6
4170 else
4171   ac_save_LIBS="$LIBS"
4172 LIBS="-lreadline $TERMLIBS $LIBS"
4173 cat > conftest.$ac_ext <<EOF
4174 #line 4175 "configure"
4175 #include "confdefs.h"
4176 /* Override any gcc2 internal prototype to avoid an error.  */
4177 /* We use char because int might match the return type of a gcc2
4178     builtin and then its argument prototype would still apply.  */
4179 char rl_callback_handler_install();
4180
4181 int main() {
4182 rl_callback_handler_install()
4183 ; return 0; }
4184 EOF
4185 if { (eval echo configure:4186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4186   rm -rf conftest*
4187   eval "ac_cv_lib_$ac_lib_var=yes"
4188 else
4189   echo "configure: failed program was:" >&5
4190   cat conftest.$ac_ext >&5
4191   rm -rf conftest*
4192   eval "ac_cv_lib_$ac_lib_var=no"
4193 fi
4194 rm -f conftest*
4195 LIBS="$ac_save_LIBS"
4196
4197 fi
4198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4199   echo "$ac_t""yes" 1>&6
4200   TERMLIBS="-lreadline $TERMLIBS"
4201        cat >> confdefs.h <<\EOF
4202 #define HAVE_LIBREADLINE 1
4203 EOF
4204
4205        break
4206 else
4207   echo "$ac_t""no" 1>&6
4208 TERMLIBS=
4209 fi
4210
4211 else
4212   echo "$ac_t""no" 1>&6
4213 fi
4214 done
4215
4216     ;;
4217   no)
4218     echo "$ac_t""no" 1>&6
4219     ;;
4220   *)
4221     echo "$ac_t""yes" 1>&6
4222
4223     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4224     # alternate readline path
4225     _ldflags=${LDFLAGS}
4226     _cppflags=${CPPFLAGS}
4227
4228     # Add additional search path
4229     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4230     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4231
4232     for ac_hdr in readline.h history.h readline/readline.h
4233 do
4234 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4235 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4236 echo "configure:4237: checking for $ac_hdr" >&5
4237 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4238   echo $ac_n "(cached) $ac_c" 1>&6
4239 else
4240   cat > conftest.$ac_ext <<EOF
4241 #line 4242 "configure"
4242 #include "confdefs.h"
4243 #include <$ac_hdr>
4244 EOF
4245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4246 { (eval echo configure:4247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4248 if test -z "$ac_err"; then
4249   rm -rf conftest*
4250   eval "ac_cv_header_$ac_safe=yes"
4251 else
4252   echo "$ac_err" >&5
4253   echo "configure: failed program was:" >&5
4254   cat conftest.$ac_ext >&5
4255   rm -rf conftest*
4256   eval "ac_cv_header_$ac_safe=no"
4257 fi
4258 rm -f conftest*
4259 fi
4260 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4261   echo "$ac_t""yes" 1>&6
4262     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4263   cat >> confdefs.h <<EOF
4264 #define $ac_tr_hdr 1
4265 EOF
4266  
4267 else
4268   echo "$ac_t""no" 1>&6
4269 fi
4270 done
4271
4272     for ac_hdr in readline/history.h
4273 do
4274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4276 echo "configure:4277: checking for $ac_hdr" >&5
4277 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4278   echo $ac_n "(cached) $ac_c" 1>&6
4279 else
4280   cat > conftest.$ac_ext <<EOF
4281 #line 4282 "configure"
4282 #include "confdefs.h"
4283 #include <$ac_hdr>
4284 EOF
4285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4286 { (eval echo configure:4287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4288 if test -z "$ac_err"; then
4289   rm -rf conftest*
4290   eval "ac_cv_header_$ac_safe=yes"
4291 else
4292   echo "$ac_err" >&5
4293   echo "configure: failed program was:" >&5
4294   cat conftest.$ac_ext >&5
4295   rm -rf conftest*
4296   eval "ac_cv_header_$ac_safe=no"
4297 fi
4298 rm -f conftest*
4299 fi
4300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4301   echo "$ac_t""yes" 1>&6
4302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4303   cat >> confdefs.h <<EOF
4304 #define $ac_tr_hdr 1
4305 EOF
4306  
4307 else
4308   echo "$ac_t""no" 1>&6
4309 fi
4310 done
4311
4312
4313     for ac_hdr in readline.h readline/readline.h
4314 do
4315 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4316 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4317 echo "configure:4318: checking for $ac_hdr" >&5
4318 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4319   echo $ac_n "(cached) $ac_c" 1>&6
4320 else
4321   cat > conftest.$ac_ext <<EOF
4322 #line 4323 "configure"
4323 #include "confdefs.h"
4324 #include <$ac_hdr>
4325 EOF
4326 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4327 { (eval echo configure:4328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4328 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4329 if test -z "$ac_err"; then
4330   rm -rf conftest*
4331   eval "ac_cv_header_$ac_safe=yes"
4332 else
4333   echo "$ac_err" >&5
4334   echo "configure: failed program was:" >&5
4335   cat conftest.$ac_ext >&5
4336   rm -rf conftest*
4337   eval "ac_cv_header_$ac_safe=no"
4338 fi
4339 rm -f conftest*
4340 fi
4341 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4342   echo "$ac_t""yes" 1>&6
4343     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4344   cat >> confdefs.h <<EOF
4345 #define $ac_tr_hdr 1
4346 EOF
4347  
4348       for termlib in ncurses curses termcap terminfo termlib; do
4349        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4350 echo "configure:4351: checking for tgetent in -l${termlib}" >&5
4351 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4352 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4353   echo $ac_n "(cached) $ac_c" 1>&6
4354 else
4355   ac_save_LIBS="$LIBS"
4356 LIBS="-l${termlib}  $LIBS"
4357 cat > conftest.$ac_ext <<EOF
4358 #line 4359 "configure"
4359 #include "confdefs.h"
4360 /* Override any gcc2 internal prototype to avoid an error.  */
4361 /* We use char because int might match the return type of a gcc2
4362     builtin and then its argument prototype would still apply.  */
4363 char tgetent();
4364
4365 int main() {
4366 tgetent()
4367 ; return 0; }
4368 EOF
4369 if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4370   rm -rf conftest*
4371   eval "ac_cv_lib_$ac_lib_var=yes"
4372 else
4373   echo "configure: failed program was:" >&5
4374   cat conftest.$ac_ext >&5
4375   rm -rf conftest*
4376   eval "ac_cv_lib_$ac_lib_var=no"
4377 fi
4378 rm -f conftest*
4379 LIBS="$ac_save_LIBS"
4380
4381 fi
4382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4383   echo "$ac_t""yes" 1>&6
4384   TERMLIBS="-l${termlib}"; break
4385 else
4386   echo "$ac_t""no" 1>&6
4387 fi
4388
4389       done
4390       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4391 echo "configure:4392: checking for rl_callback_handler_install in -lreadline" >&5
4392 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4393 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4394   echo $ac_n "(cached) $ac_c" 1>&6
4395 else
4396   ac_save_LIBS="$LIBS"
4397 LIBS="-lreadline $TERMLIBS $LIBS"
4398 cat > conftest.$ac_ext <<EOF
4399 #line 4400 "configure"
4400 #include "confdefs.h"
4401 /* Override any gcc2 internal prototype to avoid an error.  */
4402 /* We use char because int might match the return type of a gcc2
4403     builtin and then its argument prototype would still apply.  */
4404 char rl_callback_handler_install();
4405
4406 int main() {
4407 rl_callback_handler_install()
4408 ; return 0; }
4409 EOF
4410 if { (eval echo configure:4411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4411   rm -rf conftest*
4412   eval "ac_cv_lib_$ac_lib_var=yes"
4413 else
4414   echo "configure: failed program was:" >&5
4415   cat conftest.$ac_ext >&5
4416   rm -rf conftest*
4417   eval "ac_cv_lib_$ac_lib_var=no"
4418 fi
4419 rm -f conftest*
4420 LIBS="$ac_save_LIBS"
4421
4422 fi
4423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4424   echo "$ac_t""yes" 1>&6
4425   TERMLDFLAGS="-L$with_readline/lib"
4426        TERMCPPFLAGS="-I$with_readline/include"
4427        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4428        TERMLIBS="-lreadline $TERMLIBS"
4429        cat >> confdefs.h <<\EOF
4430 #define HAVE_LIBREADLINE 1
4431 EOF
4432
4433        break
4434 else
4435   echo "$ac_t""no" 1>&6
4436 TERMLIBS= CPPFLAGS=$_cppflags
4437 fi
4438
4439 else
4440   echo "$ac_t""no" 1>&6
4441 fi
4442 done
4443
4444
4445     LDFLAGS=$_ldflags
4446     ;;
4447   esac
4448 else
4449   echo "$ac_t""no" 1>&6
4450
4451 fi
4452
4453
4454
4455
4456 # The following test taken from the cvs sources
4457 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4458 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4459 # libsocket.so which has a bad implementation of gethostbyname (it
4460 # only looks in /etc/hosts), so we only look for -lsocket if we need
4461 # it.
4462 for ac_func in connect
4463 do
4464 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4465 echo "configure:4466: checking for $ac_func" >&5
4466 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4467   echo $ac_n "(cached) $ac_c" 1>&6
4468 else
4469   cat > conftest.$ac_ext <<EOF
4470 #line 4471 "configure"
4471 #include "confdefs.h"
4472 /* System header to define __stub macros and hopefully few prototypes,
4473     which can conflict with char $ac_func(); below.  */
4474 #include <assert.h>
4475 /* Override any gcc2 internal prototype to avoid an error.  */
4476 /* We use char because int might match the return type of a gcc2
4477     builtin and then its argument prototype would still apply.  */
4478 char $ac_func();
4479
4480 int main() {
4481
4482 /* The GNU C library defines this for functions which it implements
4483     to always fail with ENOSYS.  Some functions are actually named
4484     something starting with __ and the normal name is an alias.  */
4485 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4486 choke me
4487 #else
4488 $ac_func();
4489 #endif
4490
4491 ; return 0; }
4492 EOF
4493 if { (eval echo configure:4494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4494   rm -rf conftest*
4495   eval "ac_cv_func_$ac_func=yes"
4496 else
4497   echo "configure: failed program was:" >&5
4498   cat conftest.$ac_ext >&5
4499   rm -rf conftest*
4500   eval "ac_cv_func_$ac_func=no"
4501 fi
4502 rm -f conftest*
4503 fi
4504
4505 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4506   echo "$ac_t""yes" 1>&6
4507     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4508   cat >> confdefs.h <<EOF
4509 #define $ac_tr_func 1
4510 EOF
4511  
4512 else
4513   echo "$ac_t""no" 1>&6
4514 fi
4515 done
4516
4517 if test x"$ac_cv_func_connect" = x"no"; then
4518     case "$LIBS" in
4519     *-lnsl*) ;;
4520     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4521 echo "configure:4522: checking for printf in -lnsl_s" >&5
4522 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4523 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4524   echo $ac_n "(cached) $ac_c" 1>&6
4525 else
4526   ac_save_LIBS="$LIBS"
4527 LIBS="-lnsl_s  $LIBS"
4528 cat > conftest.$ac_ext <<EOF
4529 #line 4530 "configure"
4530 #include "confdefs.h"
4531 /* Override any gcc2 internal prototype to avoid an error.  */
4532 /* We use char because int might match the return type of a gcc2
4533     builtin and then its argument prototype would still apply.  */
4534 char printf();
4535
4536 int main() {
4537 printf()
4538 ; return 0; }
4539 EOF
4540 if { (eval echo configure:4541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4541   rm -rf conftest*
4542   eval "ac_cv_lib_$ac_lib_var=yes"
4543 else
4544   echo "configure: failed program was:" >&5
4545   cat conftest.$ac_ext >&5
4546   rm -rf conftest*
4547   eval "ac_cv_lib_$ac_lib_var=no"
4548 fi
4549 rm -f conftest*
4550 LIBS="$ac_save_LIBS"
4551
4552 fi
4553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4554   echo "$ac_t""yes" 1>&6
4555     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4556     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4557   cat >> confdefs.h <<EOF
4558 #define $ac_tr_lib 1
4559 EOF
4560
4561   LIBS="-lnsl_s $LIBS"
4562
4563 else
4564   echo "$ac_t""no" 1>&6
4565 fi
4566  ;;
4567     esac
4568     case "$LIBS" in
4569     *-lnsl*) ;;
4570     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4571 echo "configure:4572: checking for printf in -lnsl" >&5
4572 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4573 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4574   echo $ac_n "(cached) $ac_c" 1>&6
4575 else
4576   ac_save_LIBS="$LIBS"
4577 LIBS="-lnsl  $LIBS"
4578 cat > conftest.$ac_ext <<EOF
4579 #line 4580 "configure"
4580 #include "confdefs.h"
4581 /* Override any gcc2 internal prototype to avoid an error.  */
4582 /* We use char because int might match the return type of a gcc2
4583     builtin and then its argument prototype would still apply.  */
4584 char printf();
4585
4586 int main() {
4587 printf()
4588 ; return 0; }
4589 EOF
4590 if { (eval echo configure:4591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4591   rm -rf conftest*
4592   eval "ac_cv_lib_$ac_lib_var=yes"
4593 else
4594   echo "configure: failed program was:" >&5
4595   cat conftest.$ac_ext >&5
4596   rm -rf conftest*
4597   eval "ac_cv_lib_$ac_lib_var=no"
4598 fi
4599 rm -f conftest*
4600 LIBS="$ac_save_LIBS"
4601
4602 fi
4603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4604   echo "$ac_t""yes" 1>&6
4605     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4606     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4607   cat >> confdefs.h <<EOF
4608 #define $ac_tr_lib 1
4609 EOF
4610
4611   LIBS="-lnsl $LIBS"
4612
4613 else
4614   echo "$ac_t""no" 1>&6
4615 fi
4616  ;;
4617     esac
4618     case "$LIBS" in
4619     *-lsocket*) ;;
4620     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4621 echo "configure:4622: checking for connect in -lsocket" >&5
4622 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4623 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4624   echo $ac_n "(cached) $ac_c" 1>&6
4625 else
4626   ac_save_LIBS="$LIBS"
4627 LIBS="-lsocket  $LIBS"
4628 cat > conftest.$ac_ext <<EOF
4629 #line 4630 "configure"
4630 #include "confdefs.h"
4631 /* Override any gcc2 internal prototype to avoid an error.  */
4632 /* We use char because int might match the return type of a gcc2
4633     builtin and then its argument prototype would still apply.  */
4634 char connect();
4635
4636 int main() {
4637 connect()
4638 ; return 0; }
4639 EOF
4640 if { (eval echo configure:4641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4641   rm -rf conftest*
4642   eval "ac_cv_lib_$ac_lib_var=yes"
4643 else
4644   echo "configure: failed program was:" >&5
4645   cat conftest.$ac_ext >&5
4646   rm -rf conftest*
4647   eval "ac_cv_lib_$ac_lib_var=no"
4648 fi
4649 rm -f conftest*
4650 LIBS="$ac_save_LIBS"
4651
4652 fi
4653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4654   echo "$ac_t""yes" 1>&6
4655     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4656     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4657   cat >> confdefs.h <<EOF
4658 #define $ac_tr_lib 1
4659 EOF
4660
4661   LIBS="-lsocket $LIBS"
4662
4663 else
4664   echo "$ac_t""no" 1>&6
4665 fi
4666  ;;
4667     esac
4668     case "$LIBS" in
4669     *-linet*) ;;
4670     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4671 echo "configure:4672: checking for connect in -linet" >&5
4672 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4673 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4674   echo $ac_n "(cached) $ac_c" 1>&6
4675 else
4676   ac_save_LIBS="$LIBS"
4677 LIBS="-linet  $LIBS"
4678 cat > conftest.$ac_ext <<EOF
4679 #line 4680 "configure"
4680 #include "confdefs.h"
4681 /* Override any gcc2 internal prototype to avoid an error.  */
4682 /* We use char because int might match the return type of a gcc2
4683     builtin and then its argument prototype would still apply.  */
4684 char connect();
4685
4686 int main() {
4687 connect()
4688 ; return 0; }
4689 EOF
4690 if { (eval echo configure:4691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4691   rm -rf conftest*
4692   eval "ac_cv_lib_$ac_lib_var=yes"
4693 else
4694   echo "configure: failed program was:" >&5
4695   cat conftest.$ac_ext >&5
4696   rm -rf conftest*
4697   eval "ac_cv_lib_$ac_lib_var=no"
4698 fi
4699 rm -f conftest*
4700 LIBS="$ac_save_LIBS"
4701
4702 fi
4703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4704   echo "$ac_t""yes" 1>&6
4705     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4706     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4707   cat >> confdefs.h <<EOF
4708 #define $ac_tr_lib 1
4709 EOF
4710
4711   LIBS="-linet $LIBS"
4712
4713 else
4714   echo "$ac_t""no" 1>&6
4715 fi
4716  ;;
4717     esac
4718             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4719        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4720         # ac_cv_func_connect=yes
4721         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4722         cat >> confdefs.h <<\EOF
4723 #define HAVE_CONNECT 1
4724 EOF
4725
4726     fi
4727 fi
4728
4729 ###############################################
4730 # test for where we get get_yp_default_domain() from
4731 for ac_func in yp_get_default_domain
4732 do
4733 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4734 echo "configure:4735: checking for $ac_func" >&5
4735 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4736   echo $ac_n "(cached) $ac_c" 1>&6
4737 else
4738   cat > conftest.$ac_ext <<EOF
4739 #line 4740 "configure"
4740 #include "confdefs.h"
4741 /* System header to define __stub macros and hopefully few prototypes,
4742     which can conflict with char $ac_func(); below.  */
4743 #include <assert.h>
4744 /* Override any gcc2 internal prototype to avoid an error.  */
4745 /* We use char because int might match the return type of a gcc2
4746     builtin and then its argument prototype would still apply.  */
4747 char $ac_func();
4748
4749 int main() {
4750
4751 /* The GNU C library defines this for functions which it implements
4752     to always fail with ENOSYS.  Some functions are actually named
4753     something starting with __ and the normal name is an alias.  */
4754 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4755 choke me
4756 #else
4757 $ac_func();
4758 #endif
4759
4760 ; return 0; }
4761 EOF
4762 if { (eval echo configure:4763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4763   rm -rf conftest*
4764   eval "ac_cv_func_$ac_func=yes"
4765 else
4766   echo "configure: failed program was:" >&5
4767   cat conftest.$ac_ext >&5
4768   rm -rf conftest*
4769   eval "ac_cv_func_$ac_func=no"
4770 fi
4771 rm -f conftest*
4772 fi
4773
4774 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4775   echo "$ac_t""yes" 1>&6
4776     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4777   cat >> confdefs.h <<EOF
4778 #define $ac_tr_func 1
4779 EOF
4780  
4781 else
4782   echo "$ac_t""no" 1>&6
4783 fi
4784 done
4785
4786 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
4787         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
4788 echo "configure:4789: checking for yp_get_default_domain in -lnsl" >&5
4789 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
4790 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4791   echo $ac_n "(cached) $ac_c" 1>&6
4792 else
4793   ac_save_LIBS="$LIBS"
4794 LIBS="-lnsl  $LIBS"
4795 cat > conftest.$ac_ext <<EOF
4796 #line 4797 "configure"
4797 #include "confdefs.h"
4798 /* Override any gcc2 internal prototype to avoid an error.  */
4799 /* We use char because int might match the return type of a gcc2
4800     builtin and then its argument prototype would still apply.  */
4801 char yp_get_default_domain();
4802
4803 int main() {
4804 yp_get_default_domain()
4805 ; return 0; }
4806 EOF
4807 if { (eval echo configure:4808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4808   rm -rf conftest*
4809   eval "ac_cv_lib_$ac_lib_var=yes"
4810 else
4811   echo "configure: failed program was:" >&5
4812   cat conftest.$ac_ext >&5
4813   rm -rf conftest*
4814   eval "ac_cv_lib_$ac_lib_var=no"
4815 fi
4816 rm -f conftest*
4817 LIBS="$ac_save_LIBS"
4818
4819 fi
4820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4821   echo "$ac_t""yes" 1>&6
4822   LIBS="$LIBS -lnsl";
4823         cat >> confdefs.h <<\EOF
4824 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
4825 EOF
4826
4827 else
4828   echo "$ac_t""no" 1>&6
4829 fi
4830  
4831 fi
4832
4833 # Check if we have execl, if not we need to compile smbrun.
4834 for ac_func in execl
4835 do
4836 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4837 echo "configure:4838: checking for $ac_func" >&5
4838 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4839   echo $ac_n "(cached) $ac_c" 1>&6
4840 else
4841   cat > conftest.$ac_ext <<EOF
4842 #line 4843 "configure"
4843 #include "confdefs.h"
4844 /* System header to define __stub macros and hopefully few prototypes,
4845     which can conflict with char $ac_func(); below.  */
4846 #include <assert.h>
4847 /* Override any gcc2 internal prototype to avoid an error.  */
4848 /* We use char because int might match the return type of a gcc2
4849     builtin and then its argument prototype would still apply.  */
4850 char $ac_func();
4851
4852 int main() {
4853
4854 /* The GNU C library defines this for functions which it implements
4855     to always fail with ENOSYS.  Some functions are actually named
4856     something starting with __ and the normal name is an alias.  */
4857 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4858 choke me
4859 #else
4860 $ac_func();
4861 #endif
4862
4863 ; return 0; }
4864 EOF
4865 if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4866   rm -rf conftest*
4867   eval "ac_cv_func_$ac_func=yes"
4868 else
4869   echo "configure: failed program was:" >&5
4870   cat conftest.$ac_ext >&5
4871   rm -rf conftest*
4872   eval "ac_cv_func_$ac_func=no"
4873 fi
4874 rm -f conftest*
4875 fi
4876
4877 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4878   echo "$ac_t""yes" 1>&6
4879     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4880   cat >> confdefs.h <<EOF
4881 #define $ac_tr_func 1
4882 EOF
4883  
4884 else
4885   echo "$ac_t""no" 1>&6
4886 fi
4887 done
4888
4889 if test x"$ac_cv_func_execl" = x"no"; then
4890     RUNPROG="bin/smbrun"
4891 else
4892     RUNPROG=""
4893 fi
4894
4895 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
4896 do
4897 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4898 echo "configure:4899: checking for $ac_func" >&5
4899 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4900   echo $ac_n "(cached) $ac_c" 1>&6
4901 else
4902   cat > conftest.$ac_ext <<EOF
4903 #line 4904 "configure"
4904 #include "confdefs.h"
4905 /* System header to define __stub macros and hopefully few prototypes,
4906     which can conflict with char $ac_func(); below.  */
4907 #include <assert.h>
4908 /* Override any gcc2 internal prototype to avoid an error.  */
4909 /* We use char because int might match the return type of a gcc2
4910     builtin and then its argument prototype would still apply.  */
4911 char $ac_func();
4912
4913 int main() {
4914
4915 /* The GNU C library defines this for functions which it implements
4916     to always fail with ENOSYS.  Some functions are actually named
4917     something starting with __ and the normal name is an alias.  */
4918 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4919 choke me
4920 #else
4921 $ac_func();
4922 #endif
4923
4924 ; return 0; }
4925 EOF
4926 if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4927   rm -rf conftest*
4928   eval "ac_cv_func_$ac_func=yes"
4929 else
4930   echo "configure: failed program was:" >&5
4931   cat conftest.$ac_ext >&5
4932   rm -rf conftest*
4933   eval "ac_cv_func_$ac_func=no"
4934 fi
4935 rm -f conftest*
4936 fi
4937
4938 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4939   echo "$ac_t""yes" 1>&6
4940     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4941   cat >> confdefs.h <<EOF
4942 #define $ac_tr_func 1
4943 EOF
4944  
4945 else
4946   echo "$ac_t""no" 1>&6
4947 fi
4948 done
4949
4950 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
4951 do
4952 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4953 echo "configure:4954: checking for $ac_func" >&5
4954 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4955   echo $ac_n "(cached) $ac_c" 1>&6
4956 else
4957   cat > conftest.$ac_ext <<EOF
4958 #line 4959 "configure"
4959 #include "confdefs.h"
4960 /* System header to define __stub macros and hopefully few prototypes,
4961     which can conflict with char $ac_func(); below.  */
4962 #include <assert.h>
4963 /* Override any gcc2 internal prototype to avoid an error.  */
4964 /* We use char because int might match the return type of a gcc2
4965     builtin and then its argument prototype would still apply.  */
4966 char $ac_func();
4967
4968 int main() {
4969
4970 /* The GNU C library defines this for functions which it implements
4971     to always fail with ENOSYS.  Some functions are actually named
4972     something starting with __ and the normal name is an alias.  */
4973 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4974 choke me
4975 #else
4976 $ac_func();
4977 #endif
4978
4979 ; return 0; }
4980 EOF
4981 if { (eval echo configure:4982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4982   rm -rf conftest*
4983   eval "ac_cv_func_$ac_func=yes"
4984 else
4985   echo "configure: failed program was:" >&5
4986   cat conftest.$ac_ext >&5
4987   rm -rf conftest*
4988   eval "ac_cv_func_$ac_func=no"
4989 fi
4990 rm -f conftest*
4991 fi
4992
4993 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4994   echo "$ac_t""yes" 1>&6
4995     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4996   cat >> confdefs.h <<EOF
4997 #define $ac_tr_func 1
4998 EOF
4999  
5000 else
5001   echo "$ac_t""no" 1>&6
5002 fi
5003 done
5004
5005 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5006 do
5007 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5008 echo "configure:5009: checking for $ac_func" >&5
5009 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5010   echo $ac_n "(cached) $ac_c" 1>&6
5011 else
5012   cat > conftest.$ac_ext <<EOF
5013 #line 5014 "configure"
5014 #include "confdefs.h"
5015 /* System header to define __stub macros and hopefully few prototypes,
5016     which can conflict with char $ac_func(); below.  */
5017 #include <assert.h>
5018 /* Override any gcc2 internal prototype to avoid an error.  */
5019 /* We use char because int might match the return type of a gcc2
5020     builtin and then its argument prototype would still apply.  */
5021 char $ac_func();
5022
5023 int main() {
5024
5025 /* The GNU C library defines this for functions which it implements
5026     to always fail with ENOSYS.  Some functions are actually named
5027     something starting with __ and the normal name is an alias.  */
5028 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5029 choke me
5030 #else
5031 $ac_func();
5032 #endif
5033
5034 ; return 0; }
5035 EOF
5036 if { (eval echo configure:5037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5037   rm -rf conftest*
5038   eval "ac_cv_func_$ac_func=yes"
5039 else
5040   echo "configure: failed program was:" >&5
5041   cat conftest.$ac_ext >&5
5042   rm -rf conftest*
5043   eval "ac_cv_func_$ac_func=no"
5044 fi
5045 rm -f conftest*
5046 fi
5047
5048 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5049   echo "$ac_t""yes" 1>&6
5050     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5051   cat >> confdefs.h <<EOF
5052 #define $ac_tr_func 1
5053 EOF
5054  
5055 else
5056   echo "$ac_t""no" 1>&6
5057 fi
5058 done
5059
5060 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
5061 do
5062 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5063 echo "configure:5064: checking for $ac_func" >&5
5064 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5065   echo $ac_n "(cached) $ac_c" 1>&6
5066 else
5067   cat > conftest.$ac_ext <<EOF
5068 #line 5069 "configure"
5069 #include "confdefs.h"
5070 /* System header to define __stub macros and hopefully few prototypes,
5071     which can conflict with char $ac_func(); below.  */
5072 #include <assert.h>
5073 /* Override any gcc2 internal prototype to avoid an error.  */
5074 /* We use char because int might match the return type of a gcc2
5075     builtin and then its argument prototype would still apply.  */
5076 char $ac_func();
5077
5078 int main() {
5079
5080 /* The GNU C library defines this for functions which it implements
5081     to always fail with ENOSYS.  Some functions are actually named
5082     something starting with __ and the normal name is an alias.  */
5083 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5084 choke me
5085 #else
5086 $ac_func();
5087 #endif
5088
5089 ; return 0; }
5090 EOF
5091 if { (eval echo configure:5092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5092   rm -rf conftest*
5093   eval "ac_cv_func_$ac_func=yes"
5094 else
5095   echo "configure: failed program was:" >&5
5096   cat conftest.$ac_ext >&5
5097   rm -rf conftest*
5098   eval "ac_cv_func_$ac_func=no"
5099 fi
5100 rm -f conftest*
5101 fi
5102
5103 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5104   echo "$ac_t""yes" 1>&6
5105     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5106   cat >> confdefs.h <<EOF
5107 #define $ac_tr_func 1
5108 EOF
5109  
5110 else
5111   echo "$ac_t""no" 1>&6
5112 fi
5113 done
5114
5115 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5116 do
5117 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5118 echo "configure:5119: checking for $ac_func" >&5
5119 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5120   echo $ac_n "(cached) $ac_c" 1>&6
5121 else
5122   cat > conftest.$ac_ext <<EOF
5123 #line 5124 "configure"
5124 #include "confdefs.h"
5125 /* System header to define __stub macros and hopefully few prototypes,
5126     which can conflict with char $ac_func(); below.  */
5127 #include <assert.h>
5128 /* Override any gcc2 internal prototype to avoid an error.  */
5129 /* We use char because int might match the return type of a gcc2
5130     builtin and then its argument prototype would still apply.  */
5131 char $ac_func();
5132
5133 int main() {
5134
5135 /* The GNU C library defines this for functions which it implements
5136     to always fail with ENOSYS.  Some functions are actually named
5137     something starting with __ and the normal name is an alias.  */
5138 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5139 choke me
5140 #else
5141 $ac_func();
5142 #endif
5143
5144 ; return 0; }
5145 EOF
5146 if { (eval echo configure:5147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5147   rm -rf conftest*
5148   eval "ac_cv_func_$ac_func=yes"
5149 else
5150   echo "configure: failed program was:" >&5
5151   cat conftest.$ac_ext >&5
5152   rm -rf conftest*
5153   eval "ac_cv_func_$ac_func=no"
5154 fi
5155 rm -f conftest*
5156 fi
5157
5158 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5159   echo "$ac_t""yes" 1>&6
5160     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5161   cat >> confdefs.h <<EOF
5162 #define $ac_tr_func 1
5163 EOF
5164  
5165 else
5166   echo "$ac_t""no" 1>&6
5167 fi
5168 done
5169
5170 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5171 do
5172 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5173 echo "configure:5174: checking for $ac_func" >&5
5174 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5175   echo $ac_n "(cached) $ac_c" 1>&6
5176 else
5177   cat > conftest.$ac_ext <<EOF
5178 #line 5179 "configure"
5179 #include "confdefs.h"
5180 /* System header to define __stub macros and hopefully few prototypes,
5181     which can conflict with char $ac_func(); below.  */
5182 #include <assert.h>
5183 /* Override any gcc2 internal prototype to avoid an error.  */
5184 /* We use char because int might match the return type of a gcc2
5185     builtin and then its argument prototype would still apply.  */
5186 char $ac_func();
5187
5188 int main() {
5189
5190 /* The GNU C library defines this for functions which it implements
5191     to always fail with ENOSYS.  Some functions are actually named
5192     something starting with __ and the normal name is an alias.  */
5193 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5194 choke me
5195 #else
5196 $ac_func();
5197 #endif
5198
5199 ; return 0; }
5200 EOF
5201 if { (eval echo configure:5202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5202   rm -rf conftest*
5203   eval "ac_cv_func_$ac_func=yes"
5204 else
5205   echo "configure: failed program was:" >&5
5206   cat conftest.$ac_ext >&5
5207   rm -rf conftest*
5208   eval "ac_cv_func_$ac_func=no"
5209 fi
5210 rm -f conftest*
5211 fi
5212
5213 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5214   echo "$ac_t""yes" 1>&6
5215     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5216   cat >> confdefs.h <<EOF
5217 #define $ac_tr_func 1
5218 EOF
5219  
5220 else
5221   echo "$ac_t""no" 1>&6
5222 fi
5223 done
5224
5225 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5226 do
5227 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5228 echo "configure:5229: checking for $ac_func" >&5
5229 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5230   echo $ac_n "(cached) $ac_c" 1>&6
5231 else
5232   cat > conftest.$ac_ext <<EOF
5233 #line 5234 "configure"
5234 #include "confdefs.h"
5235 /* System header to define __stub macros and hopefully few prototypes,
5236     which can conflict with char $ac_func(); below.  */
5237 #include <assert.h>
5238 /* Override any gcc2 internal prototype to avoid an error.  */
5239 /* We use char because int might match the return type of a gcc2
5240     builtin and then its argument prototype would still apply.  */
5241 char $ac_func();
5242
5243 int main() {
5244
5245 /* The GNU C library defines this for functions which it implements
5246     to always fail with ENOSYS.  Some functions are actually named
5247     something starting with __ and the normal name is an alias.  */
5248 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5249 choke me
5250 #else
5251 $ac_func();
5252 #endif
5253
5254 ; return 0; }
5255 EOF
5256 if { (eval echo configure:5257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5257   rm -rf conftest*
5258   eval "ac_cv_func_$ac_func=yes"
5259 else
5260   echo "configure: failed program was:" >&5
5261   cat conftest.$ac_ext >&5
5262   rm -rf conftest*
5263   eval "ac_cv_func_$ac_func=no"
5264 fi
5265 rm -f conftest*
5266 fi
5267
5268 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5269   echo "$ac_t""yes" 1>&6
5270     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5271   cat >> confdefs.h <<EOF
5272 #define $ac_tr_func 1
5273 EOF
5274  
5275 else
5276   echo "$ac_t""no" 1>&6
5277 fi
5278 done
5279
5280 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5281 do
5282 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5283 echo "configure:5284: checking for $ac_func" >&5
5284 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5285   echo $ac_n "(cached) $ac_c" 1>&6
5286 else
5287   cat > conftest.$ac_ext <<EOF
5288 #line 5289 "configure"
5289 #include "confdefs.h"
5290 /* System header to define __stub macros and hopefully few prototypes,
5291     which can conflict with char $ac_func(); below.  */
5292 #include <assert.h>
5293 /* Override any gcc2 internal prototype to avoid an error.  */
5294 /* We use char because int might match the return type of a gcc2
5295     builtin and then its argument prototype would still apply.  */
5296 char $ac_func();
5297
5298 int main() {
5299
5300 /* The GNU C library defines this for functions which it implements
5301     to always fail with ENOSYS.  Some functions are actually named
5302     something starting with __ and the normal name is an alias.  */
5303 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5304 choke me
5305 #else
5306 $ac_func();
5307 #endif
5308
5309 ; return 0; }
5310 EOF
5311 if { (eval echo configure:5312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5312   rm -rf conftest*
5313   eval "ac_cv_func_$ac_func=yes"
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317   rm -rf conftest*
5318   eval "ac_cv_func_$ac_func=no"
5319 fi
5320 rm -f conftest*
5321 fi
5322
5323 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5324   echo "$ac_t""yes" 1>&6
5325     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5326   cat >> confdefs.h <<EOF
5327 #define $ac_tr_func 1
5328 EOF
5329  
5330 else
5331   echo "$ac_t""no" 1>&6
5332 fi
5333 done
5334
5335 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5336 do
5337 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5338 echo "configure:5339: checking for $ac_func" >&5
5339 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5340   echo $ac_n "(cached) $ac_c" 1>&6
5341 else
5342   cat > conftest.$ac_ext <<EOF
5343 #line 5344 "configure"
5344 #include "confdefs.h"
5345 /* System header to define __stub macros and hopefully few prototypes,
5346     which can conflict with char $ac_func(); below.  */
5347 #include <assert.h>
5348 /* Override any gcc2 internal prototype to avoid an error.  */
5349 /* We use char because int might match the return type of a gcc2
5350     builtin and then its argument prototype would still apply.  */
5351 char $ac_func();
5352
5353 int main() {
5354
5355 /* The GNU C library defines this for functions which it implements
5356     to always fail with ENOSYS.  Some functions are actually named
5357     something starting with __ and the normal name is an alias.  */
5358 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5359 choke me
5360 #else
5361 $ac_func();
5362 #endif
5363
5364 ; return 0; }
5365 EOF
5366 if { (eval echo configure:5367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5367   rm -rf conftest*
5368   eval "ac_cv_func_$ac_func=yes"
5369 else
5370   echo "configure: failed program was:" >&5
5371   cat conftest.$ac_ext >&5
5372   rm -rf conftest*
5373   eval "ac_cv_func_$ac_func=no"
5374 fi
5375 rm -f conftest*
5376 fi
5377
5378 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5379   echo "$ac_t""yes" 1>&6
5380     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5381   cat >> confdefs.h <<EOF
5382 #define $ac_tr_func 1
5383 EOF
5384  
5385 else
5386   echo "$ac_t""no" 1>&6
5387 fi
5388 done
5389
5390 # setbuffer is needed for smbtorture
5391 for ac_func in setbuffer
5392 do
5393 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5394 echo "configure:5395: checking for $ac_func" >&5
5395 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5396   echo $ac_n "(cached) $ac_c" 1>&6
5397 else
5398   cat > conftest.$ac_ext <<EOF
5399 #line 5400 "configure"
5400 #include "confdefs.h"
5401 /* System header to define __stub macros and hopefully few prototypes,
5402     which can conflict with char $ac_func(); below.  */
5403 #include <assert.h>
5404 /* Override any gcc2 internal prototype to avoid an error.  */
5405 /* We use char because int might match the return type of a gcc2
5406     builtin and then its argument prototype would still apply.  */
5407 char $ac_func();
5408
5409 int main() {
5410
5411 /* The GNU C library defines this for functions which it implements
5412     to always fail with ENOSYS.  Some functions are actually named
5413     something starting with __ and the normal name is an alias.  */
5414 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5415 choke me
5416 #else
5417 $ac_func();
5418 #endif
5419
5420 ; return 0; }
5421 EOF
5422 if { (eval echo configure:5423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5423   rm -rf conftest*
5424   eval "ac_cv_func_$ac_func=yes"
5425 else
5426   echo "configure: failed program was:" >&5
5427   cat conftest.$ac_ext >&5
5428   rm -rf conftest*
5429   eval "ac_cv_func_$ac_func=no"
5430 fi
5431 rm -f conftest*
5432 fi
5433
5434 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5435   echo "$ac_t""yes" 1>&6
5436     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5437   cat >> confdefs.h <<EOF
5438 #define $ac_tr_func 1
5439 EOF
5440  
5441 else
5442   echo "$ac_t""no" 1>&6
5443 fi
5444 done
5445
5446
5447 # syscall() is needed for smbwrapper.
5448 for ac_func in syscall
5449 do
5450 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5451 echo "configure:5452: checking for $ac_func" >&5
5452 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5453   echo $ac_n "(cached) $ac_c" 1>&6
5454 else
5455   cat > conftest.$ac_ext <<EOF
5456 #line 5457 "configure"
5457 #include "confdefs.h"
5458 /* System header to define __stub macros and hopefully few prototypes,
5459     which can conflict with char $ac_func(); below.  */
5460 #include <assert.h>
5461 /* Override any gcc2 internal prototype to avoid an error.  */
5462 /* We use char because int might match the return type of a gcc2
5463     builtin and then its argument prototype would still apply.  */
5464 char $ac_func();
5465
5466 int main() {
5467
5468 /* The GNU C library defines this for functions which it implements
5469     to always fail with ENOSYS.  Some functions are actually named
5470     something starting with __ and the normal name is an alias.  */
5471 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5472 choke me
5473 #else
5474 $ac_func();
5475 #endif
5476
5477 ; return 0; }
5478 EOF
5479 if { (eval echo configure:5480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5480   rm -rf conftest*
5481   eval "ac_cv_func_$ac_func=yes"
5482 else
5483   echo "configure: failed program was:" >&5
5484   cat conftest.$ac_ext >&5
5485   rm -rf conftest*
5486   eval "ac_cv_func_$ac_func=no"
5487 fi
5488 rm -f conftest*
5489 fi
5490
5491 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5492   echo "$ac_t""yes" 1>&6
5493     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5494   cat >> confdefs.h <<EOF
5495 #define $ac_tr_func 1
5496 EOF
5497  
5498 else
5499   echo "$ac_t""no" 1>&6
5500 fi
5501 done
5502
5503
5504 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5505 do
5506 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5507 echo "configure:5508: checking for $ac_func" >&5
5508 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5509   echo $ac_n "(cached) $ac_c" 1>&6
5510 else
5511   cat > conftest.$ac_ext <<EOF
5512 #line 5513 "configure"
5513 #include "confdefs.h"
5514 /* System header to define __stub macros and hopefully few prototypes,
5515     which can conflict with char $ac_func(); below.  */
5516 #include <assert.h>
5517 /* Override any gcc2 internal prototype to avoid an error.  */
5518 /* We use char because int might match the return type of a gcc2
5519     builtin and then its argument prototype would still apply.  */
5520 char $ac_func();
5521
5522 int main() {
5523
5524 /* The GNU C library defines this for functions which it implements
5525     to always fail with ENOSYS.  Some functions are actually named
5526     something starting with __ and the normal name is an alias.  */
5527 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5528 choke me
5529 #else
5530 $ac_func();
5531 #endif
5532
5533 ; return 0; }
5534 EOF
5535 if { (eval echo configure:5536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5536   rm -rf conftest*
5537   eval "ac_cv_func_$ac_func=yes"
5538 else
5539   echo "configure: failed program was:" >&5
5540   cat conftest.$ac_ext >&5
5541   rm -rf conftest*
5542   eval "ac_cv_func_$ac_func=no"
5543 fi
5544 rm -f conftest*
5545 fi
5546
5547 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5548   echo "$ac_t""yes" 1>&6
5549     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5550   cat >> confdefs.h <<EOF
5551 #define $ac_tr_func 1
5552 EOF
5553  
5554 else
5555   echo "$ac_t""no" 1>&6
5556 fi
5557 done
5558
5559 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5560 do
5561 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5562 echo "configure:5563: checking for $ac_func" >&5
5563 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5564   echo $ac_n "(cached) $ac_c" 1>&6
5565 else
5566   cat > conftest.$ac_ext <<EOF
5567 #line 5568 "configure"
5568 #include "confdefs.h"
5569 /* System header to define __stub macros and hopefully few prototypes,
5570     which can conflict with char $ac_func(); below.  */
5571 #include <assert.h>
5572 /* Override any gcc2 internal prototype to avoid an error.  */
5573 /* We use char because int might match the return type of a gcc2
5574     builtin and then its argument prototype would still apply.  */
5575 char $ac_func();
5576
5577 int main() {
5578
5579 /* The GNU C library defines this for functions which it implements
5580     to always fail with ENOSYS.  Some functions are actually named
5581     something starting with __ and the normal name is an alias.  */
5582 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5583 choke me
5584 #else
5585 $ac_func();
5586 #endif
5587
5588 ; return 0; }
5589 EOF
5590 if { (eval echo configure:5591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5591   rm -rf conftest*
5592   eval "ac_cv_func_$ac_func=yes"
5593 else
5594   echo "configure: failed program was:" >&5
5595   cat conftest.$ac_ext >&5
5596   rm -rf conftest*
5597   eval "ac_cv_func_$ac_func=no"
5598 fi
5599 rm -f conftest*
5600 fi
5601
5602 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5603   echo "$ac_t""yes" 1>&6
5604     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5605   cat >> confdefs.h <<EOF
5606 #define $ac_tr_func 1
5607 EOF
5608  
5609 else
5610   echo "$ac_t""no" 1>&6
5611 fi
5612 done
5613
5614 for ac_func in __getcwd _getcwd
5615 do
5616 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5617 echo "configure:5618: checking for $ac_func" >&5
5618 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5619   echo $ac_n "(cached) $ac_c" 1>&6
5620 else
5621   cat > conftest.$ac_ext <<EOF
5622 #line 5623 "configure"
5623 #include "confdefs.h"
5624 /* System header to define __stub macros and hopefully few prototypes,
5625     which can conflict with char $ac_func(); below.  */
5626 #include <assert.h>
5627 /* Override any gcc2 internal prototype to avoid an error.  */
5628 /* We use char because int might match the return type of a gcc2
5629     builtin and then its argument prototype would still apply.  */
5630 char $ac_func();
5631
5632 int main() {
5633
5634 /* The GNU C library defines this for functions which it implements
5635     to always fail with ENOSYS.  Some functions are actually named
5636     something starting with __ and the normal name is an alias.  */
5637 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5638 choke me
5639 #else
5640 $ac_func();
5641 #endif
5642
5643 ; return 0; }
5644 EOF
5645 if { (eval echo configure:5646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5646   rm -rf conftest*
5647   eval "ac_cv_func_$ac_func=yes"
5648 else
5649   echo "configure: failed program was:" >&5
5650   cat conftest.$ac_ext >&5
5651   rm -rf conftest*
5652   eval "ac_cv_func_$ac_func=no"
5653 fi
5654 rm -f conftest*
5655 fi
5656
5657 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5658   echo "$ac_t""yes" 1>&6
5659     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5660   cat >> confdefs.h <<EOF
5661 #define $ac_tr_func 1
5662 EOF
5663  
5664 else
5665   echo "$ac_t""no" 1>&6
5666 fi
5667 done
5668
5669 for ac_func in __xstat __fxstat __lxstat
5670 do
5671 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5672 echo "configure:5673: checking for $ac_func" >&5
5673 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5674   echo $ac_n "(cached) $ac_c" 1>&6
5675 else
5676   cat > conftest.$ac_ext <<EOF
5677 #line 5678 "configure"
5678 #include "confdefs.h"
5679 /* System header to define __stub macros and hopefully few prototypes,
5680     which can conflict with char $ac_func(); below.  */
5681 #include <assert.h>
5682 /* Override any gcc2 internal prototype to avoid an error.  */
5683 /* We use char because int might match the return type of a gcc2
5684     builtin and then its argument prototype would still apply.  */
5685 char $ac_func();
5686
5687 int main() {
5688
5689 /* The GNU C library defines this for functions which it implements
5690     to always fail with ENOSYS.  Some functions are actually named
5691     something starting with __ and the normal name is an alias.  */
5692 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5693 choke me
5694 #else
5695 $ac_func();
5696 #endif
5697
5698 ; return 0; }
5699 EOF
5700 if { (eval echo configure:5701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5701   rm -rf conftest*
5702   eval "ac_cv_func_$ac_func=yes"
5703 else
5704   echo "configure: failed program was:" >&5
5705   cat conftest.$ac_ext >&5
5706   rm -rf conftest*
5707   eval "ac_cv_func_$ac_func=no"
5708 fi
5709 rm -f conftest*
5710 fi
5711
5712 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5713   echo "$ac_t""yes" 1>&6
5714     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5715   cat >> confdefs.h <<EOF
5716 #define $ac_tr_func 1
5717 EOF
5718  
5719 else
5720   echo "$ac_t""no" 1>&6
5721 fi
5722 done
5723
5724 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
5725 do
5726 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5727 echo "configure:5728: checking for $ac_func" >&5
5728 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5729   echo $ac_n "(cached) $ac_c" 1>&6
5730 else
5731   cat > conftest.$ac_ext <<EOF
5732 #line 5733 "configure"
5733 #include "confdefs.h"
5734 /* System header to define __stub macros and hopefully few prototypes,
5735     which can conflict with char $ac_func(); below.  */
5736 #include <assert.h>
5737 /* Override any gcc2 internal prototype to avoid an error.  */
5738 /* We use char because int might match the return type of a gcc2
5739     builtin and then its argument prototype would still apply.  */
5740 char $ac_func();
5741
5742 int main() {
5743
5744 /* The GNU C library defines this for functions which it implements
5745     to always fail with ENOSYS.  Some functions are actually named
5746     something starting with __ and the normal name is an alias.  */
5747 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5748 choke me
5749 #else
5750 $ac_func();
5751 #endif
5752
5753 ; return 0; }
5754 EOF
5755 if { (eval echo configure:5756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5756   rm -rf conftest*
5757   eval "ac_cv_func_$ac_func=yes"
5758 else
5759   echo "configure: failed program was:" >&5
5760   cat conftest.$ac_ext >&5
5761   rm -rf conftest*
5762   eval "ac_cv_func_$ac_func=no"
5763 fi
5764 rm -f conftest*
5765 fi
5766
5767 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5768   echo "$ac_t""yes" 1>&6
5769     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5770   cat >> confdefs.h <<EOF
5771 #define $ac_tr_func 1
5772 EOF
5773  
5774 else
5775   echo "$ac_t""no" 1>&6
5776 fi
5777 done
5778
5779 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
5780 do
5781 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5782 echo "configure:5783: checking for $ac_func" >&5
5783 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5784   echo $ac_n "(cached) $ac_c" 1>&6
5785 else
5786   cat > conftest.$ac_ext <<EOF
5787 #line 5788 "configure"
5788 #include "confdefs.h"
5789 /* System header to define __stub macros and hopefully few prototypes,
5790     which can conflict with char $ac_func(); below.  */
5791 #include <assert.h>
5792 /* Override any gcc2 internal prototype to avoid an error.  */
5793 /* We use char because int might match the return type of a gcc2
5794     builtin and then its argument prototype would still apply.  */
5795 char $ac_func();
5796
5797 int main() {
5798
5799 /* The GNU C library defines this for functions which it implements
5800     to always fail with ENOSYS.  Some functions are actually named
5801     something starting with __ and the normal name is an alias.  */
5802 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5803 choke me
5804 #else
5805 $ac_func();
5806 #endif
5807
5808 ; return 0; }
5809 EOF
5810 if { (eval echo configure:5811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5811   rm -rf conftest*
5812   eval "ac_cv_func_$ac_func=yes"
5813 else
5814   echo "configure: failed program was:" >&5
5815   cat conftest.$ac_ext >&5
5816   rm -rf conftest*
5817   eval "ac_cv_func_$ac_func=no"
5818 fi
5819 rm -f conftest*
5820 fi
5821
5822 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5823   echo "$ac_t""yes" 1>&6
5824     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5825   cat >> confdefs.h <<EOF
5826 #define $ac_tr_func 1
5827 EOF
5828  
5829 else
5830   echo "$ac_t""no" 1>&6
5831 fi
5832 done
5833
5834 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
5835 do
5836 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5837 echo "configure:5838: checking for $ac_func" >&5
5838 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5839   echo $ac_n "(cached) $ac_c" 1>&6
5840 else
5841   cat > conftest.$ac_ext <<EOF
5842 #line 5843 "configure"
5843 #include "confdefs.h"
5844 /* System header to define __stub macros and hopefully few prototypes,
5845     which can conflict with char $ac_func(); below.  */
5846 #include <assert.h>
5847 /* Override any gcc2 internal prototype to avoid an error.  */
5848 /* We use char because int might match the return type of a gcc2
5849     builtin and then its argument prototype would still apply.  */
5850 char $ac_func();
5851
5852 int main() {
5853
5854 /* The GNU C library defines this for functions which it implements
5855     to always fail with ENOSYS.  Some functions are actually named
5856     something starting with __ and the normal name is an alias.  */
5857 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5858 choke me
5859 #else
5860 $ac_func();
5861 #endif
5862
5863 ; return 0; }
5864 EOF
5865 if { (eval echo configure:5866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5866   rm -rf conftest*
5867   eval "ac_cv_func_$ac_func=yes"
5868 else
5869   echo "configure: failed program was:" >&5
5870   cat conftest.$ac_ext >&5
5871   rm -rf conftest*
5872   eval "ac_cv_func_$ac_func=no"
5873 fi
5874 rm -f conftest*
5875 fi
5876
5877 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5878   echo "$ac_t""yes" 1>&6
5879     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5880   cat >> confdefs.h <<EOF
5881 #define $ac_tr_func 1
5882 EOF
5883  
5884 else
5885   echo "$ac_t""no" 1>&6
5886 fi
5887 done
5888
5889 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
5890 do
5891 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5892 echo "configure:5893: checking for $ac_func" >&5
5893 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5894   echo $ac_n "(cached) $ac_c" 1>&6
5895 else
5896   cat > conftest.$ac_ext <<EOF
5897 #line 5898 "configure"
5898 #include "confdefs.h"
5899 /* System header to define __stub macros and hopefully few prototypes,
5900     which can conflict with char $ac_func(); below.  */
5901 #include <assert.h>
5902 /* Override any gcc2 internal prototype to avoid an error.  */
5903 /* We use char because int might match the return type of a gcc2
5904     builtin and then its argument prototype would still apply.  */
5905 char $ac_func();
5906
5907 int main() {
5908
5909 /* The GNU C library defines this for functions which it implements
5910     to always fail with ENOSYS.  Some functions are actually named
5911     something starting with __ and the normal name is an alias.  */
5912 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5913 choke me
5914 #else
5915 $ac_func();
5916 #endif
5917
5918 ; return 0; }
5919 EOF
5920 if { (eval echo configure:5921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5921   rm -rf conftest*
5922   eval "ac_cv_func_$ac_func=yes"
5923 else
5924   echo "configure: failed program was:" >&5
5925   cat conftest.$ac_ext >&5
5926   rm -rf conftest*
5927   eval "ac_cv_func_$ac_func=no"
5928 fi
5929 rm -f conftest*
5930 fi
5931
5932 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5933   echo "$ac_t""yes" 1>&6
5934     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5935   cat >> confdefs.h <<EOF
5936 #define $ac_tr_func 1
5937 EOF
5938  
5939 else
5940   echo "$ac_t""no" 1>&6
5941 fi
5942 done
5943
5944 for ac_func in _write __write _fork __fork
5945 do
5946 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5947 echo "configure:5948: checking for $ac_func" >&5
5948 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5949   echo $ac_n "(cached) $ac_c" 1>&6
5950 else
5951   cat > conftest.$ac_ext <<EOF
5952 #line 5953 "configure"
5953 #include "confdefs.h"
5954 /* System header to define __stub macros and hopefully few prototypes,
5955     which can conflict with char $ac_func(); below.  */
5956 #include <assert.h>
5957 /* Override any gcc2 internal prototype to avoid an error.  */
5958 /* We use char because int might match the return type of a gcc2
5959     builtin and then its argument prototype would still apply.  */
5960 char $ac_func();
5961
5962 int main() {
5963
5964 /* The GNU C library defines this for functions which it implements
5965     to always fail with ENOSYS.  Some functions are actually named
5966     something starting with __ and the normal name is an alias.  */
5967 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5968 choke me
5969 #else
5970 $ac_func();
5971 #endif
5972
5973 ; return 0; }
5974 EOF
5975 if { (eval echo configure:5976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5976   rm -rf conftest*
5977   eval "ac_cv_func_$ac_func=yes"
5978 else
5979   echo "configure: failed program was:" >&5
5980   cat conftest.$ac_ext >&5
5981   rm -rf conftest*
5982   eval "ac_cv_func_$ac_func=no"
5983 fi
5984 rm -f conftest*
5985 fi
5986
5987 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5988   echo "$ac_t""yes" 1>&6
5989     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5990   cat >> confdefs.h <<EOF
5991 #define $ac_tr_func 1
5992 EOF
5993  
5994 else
5995   echo "$ac_t""no" 1>&6
5996 fi
5997 done
5998
5999 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6000 do
6001 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6002 echo "configure:6003: checking for $ac_func" >&5
6003 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6004   echo $ac_n "(cached) $ac_c" 1>&6
6005 else
6006   cat > conftest.$ac_ext <<EOF
6007 #line 6008 "configure"
6008 #include "confdefs.h"
6009 /* System header to define __stub macros and hopefully few prototypes,
6010     which can conflict with char $ac_func(); below.  */
6011 #include <assert.h>
6012 /* Override any gcc2 internal prototype to avoid an error.  */
6013 /* We use char because int might match the return type of a gcc2
6014     builtin and then its argument prototype would still apply.  */
6015 char $ac_func();
6016
6017 int main() {
6018
6019 /* The GNU C library defines this for functions which it implements
6020     to always fail with ENOSYS.  Some functions are actually named
6021     something starting with __ and the normal name is an alias.  */
6022 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6023 choke me
6024 #else
6025 $ac_func();
6026 #endif
6027
6028 ; return 0; }
6029 EOF
6030 if { (eval echo configure:6031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6031   rm -rf conftest*
6032   eval "ac_cv_func_$ac_func=yes"
6033 else
6034   echo "configure: failed program was:" >&5
6035   cat conftest.$ac_ext >&5
6036   rm -rf conftest*
6037   eval "ac_cv_func_$ac_func=no"
6038 fi
6039 rm -f conftest*
6040 fi
6041
6042 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6043   echo "$ac_t""yes" 1>&6
6044     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6045   cat >> confdefs.h <<EOF
6046 #define $ac_tr_func 1
6047 EOF
6048  
6049 else
6050   echo "$ac_t""no" 1>&6
6051 fi
6052 done
6053
6054 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6055 do
6056 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6057 echo "configure:6058: checking for $ac_func" >&5
6058 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6059   echo $ac_n "(cached) $ac_c" 1>&6
6060 else
6061   cat > conftest.$ac_ext <<EOF
6062 #line 6063 "configure"
6063 #include "confdefs.h"
6064 /* System header to define __stub macros and hopefully few prototypes,
6065     which can conflict with char $ac_func(); below.  */
6066 #include <assert.h>
6067 /* Override any gcc2 internal prototype to avoid an error.  */
6068 /* We use char because int might match the return type of a gcc2
6069     builtin and then its argument prototype would still apply.  */
6070 char $ac_func();
6071
6072 int main() {
6073
6074 /* The GNU C library defines this for functions which it implements
6075     to always fail with ENOSYS.  Some functions are actually named
6076     something starting with __ and the normal name is an alias.  */
6077 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6078 choke me
6079 #else
6080 $ac_func();
6081 #endif
6082
6083 ; return 0; }
6084 EOF
6085 if { (eval echo configure:6086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6086   rm -rf conftest*
6087   eval "ac_cv_func_$ac_func=yes"
6088 else
6089   echo "configure: failed program was:" >&5
6090   cat conftest.$ac_ext >&5
6091   rm -rf conftest*
6092   eval "ac_cv_func_$ac_func=no"
6093 fi
6094 rm -f conftest*
6095 fi
6096
6097 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6098   echo "$ac_t""yes" 1>&6
6099     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6100   cat >> confdefs.h <<EOF
6101 #define $ac_tr_func 1
6102 EOF
6103  
6104 else
6105   echo "$ac_t""no" 1>&6
6106 fi
6107 done
6108
6109 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6110 do
6111 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6112 echo "configure:6113: checking for $ac_func" >&5
6113 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6114   echo $ac_n "(cached) $ac_c" 1>&6
6115 else
6116   cat > conftest.$ac_ext <<EOF
6117 #line 6118 "configure"
6118 #include "confdefs.h"
6119 /* System header to define __stub macros and hopefully few prototypes,
6120     which can conflict with char $ac_func(); below.  */
6121 #include <assert.h>
6122 /* Override any gcc2 internal prototype to avoid an error.  */
6123 /* We use char because int might match the return type of a gcc2
6124     builtin and then its argument prototype would still apply.  */
6125 char $ac_func();
6126
6127 int main() {
6128
6129 /* The GNU C library defines this for functions which it implements
6130     to always fail with ENOSYS.  Some functions are actually named
6131     something starting with __ and the normal name is an alias.  */
6132 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6133 choke me
6134 #else
6135 $ac_func();
6136 #endif
6137
6138 ; return 0; }
6139 EOF
6140 if { (eval echo configure:6141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6141   rm -rf conftest*
6142   eval "ac_cv_func_$ac_func=yes"
6143 else
6144   echo "configure: failed program was:" >&5
6145   cat conftest.$ac_ext >&5
6146   rm -rf conftest*
6147   eval "ac_cv_func_$ac_func=no"
6148 fi
6149 rm -f conftest*
6150 fi
6151
6152 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6153   echo "$ac_t""yes" 1>&6
6154     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6155   cat >> confdefs.h <<EOF
6156 #define $ac_tr_func 1
6157 EOF
6158  
6159 else
6160   echo "$ac_t""no" 1>&6
6161 fi
6162 done
6163
6164 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6165 do
6166 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6167 echo "configure:6168: checking for $ac_func" >&5
6168 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6169   echo $ac_n "(cached) $ac_c" 1>&6
6170 else
6171   cat > conftest.$ac_ext <<EOF
6172 #line 6173 "configure"
6173 #include "confdefs.h"
6174 /* System header to define __stub macros and hopefully few prototypes,
6175     which can conflict with char $ac_func(); below.  */
6176 #include <assert.h>
6177 /* Override any gcc2 internal prototype to avoid an error.  */
6178 /* We use char because int might match the return type of a gcc2
6179     builtin and then its argument prototype would still apply.  */
6180 char $ac_func();
6181
6182 int main() {
6183
6184 /* The GNU C library defines this for functions which it implements
6185     to always fail with ENOSYS.  Some functions are actually named
6186     something starting with __ and the normal name is an alias.  */
6187 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6188 choke me
6189 #else
6190 $ac_func();
6191 #endif
6192
6193 ; return 0; }
6194 EOF
6195 if { (eval echo configure:6196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6196   rm -rf conftest*
6197   eval "ac_cv_func_$ac_func=yes"
6198 else
6199   echo "configure: failed program was:" >&5
6200   cat conftest.$ac_ext >&5
6201   rm -rf conftest*
6202   eval "ac_cv_func_$ac_func=no"
6203 fi
6204 rm -f conftest*
6205 fi
6206
6207 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6208   echo "$ac_t""yes" 1>&6
6209     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6210   cat >> confdefs.h <<EOF
6211 #define $ac_tr_func 1
6212 EOF
6213  
6214 else
6215   echo "$ac_t""no" 1>&6
6216 fi
6217 done
6218
6219 for ac_func in open64 _open64 __open64 creat64
6220 do
6221 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6222 echo "configure:6223: checking for $ac_func" >&5
6223 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6224   echo $ac_n "(cached) $ac_c" 1>&6
6225 else
6226   cat > conftest.$ac_ext <<EOF
6227 #line 6228 "configure"
6228 #include "confdefs.h"
6229 /* System header to define __stub macros and hopefully few prototypes,
6230     which can conflict with char $ac_func(); below.  */
6231 #include <assert.h>
6232 /* Override any gcc2 internal prototype to avoid an error.  */
6233 /* We use char because int might match the return type of a gcc2
6234     builtin and then its argument prototype would still apply.  */
6235 char $ac_func();
6236
6237 int main() {
6238
6239 /* The GNU C library defines this for functions which it implements
6240     to always fail with ENOSYS.  Some functions are actually named
6241     something starting with __ and the normal name is an alias.  */
6242 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6243 choke me
6244 #else
6245 $ac_func();
6246 #endif
6247
6248 ; return 0; }
6249 EOF
6250 if { (eval echo configure:6251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6251   rm -rf conftest*
6252   eval "ac_cv_func_$ac_func=yes"
6253 else
6254   echo "configure: failed program was:" >&5
6255   cat conftest.$ac_ext >&5
6256   rm -rf conftest*
6257   eval "ac_cv_func_$ac_func=no"
6258 fi
6259 rm -f conftest*
6260 fi
6261
6262 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6263   echo "$ac_t""yes" 1>&6
6264     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6265   cat >> confdefs.h <<EOF
6266 #define $ac_tr_func 1
6267 EOF
6268  
6269 else
6270   echo "$ac_t""no" 1>&6
6271 fi
6272 done
6273
6274
6275 #
6276 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6277 #
6278
6279 if test x$ac_cv_func_stat64 = xno ; then
6280   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6281 echo "configure:6282: checking for stat64 in <sys/stat.h>" >&5
6282   cat > conftest.$ac_ext <<EOF
6283 #line 6284 "configure"
6284 #include "confdefs.h"
6285
6286 #if defined(HAVE_UNISTD_H)
6287 #include <unistd.h>
6288 #endif
6289 #include <sys/stat.h>
6290
6291 int main() {
6292 struct stat64 st64; exit(stat64(".",&st64));
6293 ; return 0; }
6294 EOF
6295 if { (eval echo configure:6296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6296   rm -rf conftest*
6297   ac_cv_func_stat64=yes
6298 else
6299   echo "configure: failed program was:" >&5
6300   cat conftest.$ac_ext >&5
6301 fi
6302 rm -f conftest*
6303   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6304   if test x$ac_cv_func_stat64 = xyes ; then
6305     cat >> confdefs.h <<\EOF
6306 #define HAVE_STAT64 1
6307 EOF
6308
6309   fi
6310 fi
6311
6312 if test x$ac_cv_func_lstat64 = xno ; then
6313   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6314 echo "configure:6315: checking for lstat64 in <sys/stat.h>" >&5
6315   cat > conftest.$ac_ext <<EOF
6316 #line 6317 "configure"
6317 #include "confdefs.h"
6318
6319 #if defined(HAVE_UNISTD_H)
6320 #include <unistd.h>
6321 #endif
6322 #include <sys/stat.h>
6323
6324 int main() {
6325 struct stat64 st64; exit(lstat64(".",&st64));
6326 ; return 0; }
6327 EOF
6328 if { (eval echo configure:6329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6329   rm -rf conftest*
6330   ac_cv_func_lstat64=yes
6331 else
6332   echo "configure: failed program was:" >&5
6333   cat conftest.$ac_ext >&5
6334 fi
6335 rm -f conftest*
6336   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6337   if test x$ac_cv_func_lstat64 = xyes ; then
6338     cat >> confdefs.h <<\EOF
6339 #define HAVE_LSTAT64 1
6340 EOF
6341
6342   fi
6343 fi
6344
6345 if test x$ac_cv_func_fstat64 = xno ; then
6346   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6347 echo "configure:6348: checking for fstat64 in <sys/stat.h>" >&5
6348   cat > conftest.$ac_ext <<EOF
6349 #line 6350 "configure"
6350 #include "confdefs.h"
6351
6352 #if defined(HAVE_UNISTD_H)
6353 #include <unistd.h>
6354 #endif
6355 #include <sys/stat.h>
6356
6357 int main() {
6358 struct stat64 st64; exit(fstat64(0,&st64));
6359 ; return 0; }
6360 EOF
6361 if { (eval echo configure:6362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6362   rm -rf conftest*
6363   ac_cv_func_fstat64=yes
6364 else
6365   echo "configure: failed program was:" >&5
6366   cat conftest.$ac_ext >&5
6367 fi
6368 rm -f conftest*
6369   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6370   if test x$ac_cv_func_fstat64 = xyes ; then
6371     cat >> confdefs.h <<\EOF
6372 #define HAVE_FSTAT64 1
6373 EOF
6374
6375   fi
6376 fi
6377
6378 #
6379 # If no strcasecmp, check for it in some known places
6380 # It is in -lresolv on ReliantUNIX and UnixWare
6381 #   -lresolve *must* follow -lnsl for name resolution to work properly
6382 #
6383
6384 if test x$ac_cv_func_strcasecmp = xno ; then
6385         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6386 echo "configure:6387: checking for strcasecmp in -lresolv" >&5
6387 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6388 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6389   echo $ac_n "(cached) $ac_c" 1>&6
6390 else
6391   ac_save_LIBS="$LIBS"
6392 LIBS="-lresolv  $LIBS"
6393 cat > conftest.$ac_ext <<EOF
6394 #line 6395 "configure"
6395 #include "confdefs.h"
6396 /* Override any gcc2 internal prototype to avoid an error.  */
6397 /* We use char because int might match the return type of a gcc2
6398     builtin and then its argument prototype would still apply.  */
6399 char strcasecmp();
6400
6401 int main() {
6402 strcasecmp()
6403 ; return 0; }
6404 EOF
6405 if { (eval echo configure:6406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6406   rm -rf conftest*
6407   eval "ac_cv_lib_$ac_lib_var=yes"
6408 else
6409   echo "configure: failed program was:" >&5
6410   cat conftest.$ac_ext >&5
6411   rm -rf conftest*
6412   eval "ac_cv_lib_$ac_lib_var=no"
6413 fi
6414 rm -f conftest*
6415 LIBS="$ac_save_LIBS"
6416
6417 fi
6418 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6419   echo "$ac_t""yes" 1>&6
6420   LIBS="$LIBS -lresolv"
6421                 cat >> confdefs.h <<\EOF
6422 #define HAVE_STRCASECMP 1
6423 EOF
6424
6425 else
6426   echo "$ac_t""no" 1>&6
6427 fi
6428
6429 fi
6430
6431 #
6432 # Check for the functions putprpwnam, set_auth_parameters,
6433 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6434 # Needed for OSF1 and HPUX.
6435 #
6436
6437 case "$LIBS" in
6438   *-lsecurity*) for ac_func in putprpwnam
6439 do
6440 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6441 echo "configure:6442: checking for $ac_func" >&5
6442 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6443   echo $ac_n "(cached) $ac_c" 1>&6
6444 else
6445   cat > conftest.$ac_ext <<EOF
6446 #line 6447 "configure"
6447 #include "confdefs.h"
6448 /* System header to define __stub macros and hopefully few prototypes,
6449     which can conflict with char $ac_func(); below.  */
6450 #include <assert.h>
6451 /* Override any gcc2 internal prototype to avoid an error.  */
6452 /* We use char because int might match the return type of a gcc2
6453     builtin and then its argument prototype would still apply.  */
6454 char $ac_func();
6455
6456 int main() {
6457
6458 /* The GNU C library defines this for functions which it implements
6459     to always fail with ENOSYS.  Some functions are actually named
6460     something starting with __ and the normal name is an alias.  */
6461 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6462 choke me
6463 #else
6464 $ac_func();
6465 #endif
6466
6467 ; return 0; }
6468 EOF
6469 if { (eval echo configure:6470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6470   rm -rf conftest*
6471   eval "ac_cv_func_$ac_func=yes"
6472 else
6473   echo "configure: failed program was:" >&5
6474   cat conftest.$ac_ext >&5
6475   rm -rf conftest*
6476   eval "ac_cv_func_$ac_func=no"
6477 fi
6478 rm -f conftest*
6479 fi
6480
6481 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6482   echo "$ac_t""yes" 1>&6
6483     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6484   cat >> confdefs.h <<EOF
6485 #define $ac_tr_func 1
6486 EOF
6487  
6488 else
6489   echo "$ac_t""no" 1>&6
6490 fi
6491 done
6492  ;;
6493   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6494 echo "configure:6495: checking for putprpwnam in -lsecurity" >&5
6495 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6496 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6497   echo $ac_n "(cached) $ac_c" 1>&6
6498 else
6499   ac_save_LIBS="$LIBS"
6500 LIBS="-lsecurity  $LIBS"
6501 cat > conftest.$ac_ext <<EOF
6502 #line 6503 "configure"
6503 #include "confdefs.h"
6504 /* Override any gcc2 internal prototype to avoid an error.  */
6505 /* We use char because int might match the return type of a gcc2
6506     builtin and then its argument prototype would still apply.  */
6507 char putprpwnam();
6508
6509 int main() {
6510 putprpwnam()
6511 ; return 0; }
6512 EOF
6513 if { (eval echo configure:6514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6514   rm -rf conftest*
6515   eval "ac_cv_lib_$ac_lib_var=yes"
6516 else
6517   echo "configure: failed program was:" >&5
6518   cat conftest.$ac_ext >&5
6519   rm -rf conftest*
6520   eval "ac_cv_lib_$ac_lib_var=no"
6521 fi
6522 rm -f conftest*
6523 LIBS="$ac_save_LIBS"
6524
6525 fi
6526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6527   echo "$ac_t""yes" 1>&6
6528     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6529     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6530   cat >> confdefs.h <<EOF
6531 #define $ac_tr_lib 1
6532 EOF
6533
6534   LIBS="-lsecurity $LIBS"
6535
6536 else
6537   echo "$ac_t""no" 1>&6
6538 fi
6539  
6540      for ac_func in putprpwnam
6541 do
6542 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6543 echo "configure:6544: checking for $ac_func" >&5
6544 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6545   echo $ac_n "(cached) $ac_c" 1>&6
6546 else
6547   cat > conftest.$ac_ext <<EOF
6548 #line 6549 "configure"
6549 #include "confdefs.h"
6550 /* System header to define __stub macros and hopefully few prototypes,
6551     which can conflict with char $ac_func(); below.  */
6552 #include <assert.h>
6553 /* Override any gcc2 internal prototype to avoid an error.  */
6554 /* We use char because int might match the return type of a gcc2
6555     builtin and then its argument prototype would still apply.  */
6556 char $ac_func();
6557
6558 int main() {
6559
6560 /* The GNU C library defines this for functions which it implements
6561     to always fail with ENOSYS.  Some functions are actually named
6562     something starting with __ and the normal name is an alias.  */
6563 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6564 choke me
6565 #else
6566 $ac_func();
6567 #endif
6568
6569 ; return 0; }
6570 EOF
6571 if { (eval echo configure:6572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6572   rm -rf conftest*
6573   eval "ac_cv_func_$ac_func=yes"
6574 else
6575   echo "configure: failed program was:" >&5
6576   cat conftest.$ac_ext >&5
6577   rm -rf conftest*
6578   eval "ac_cv_func_$ac_func=no"
6579 fi
6580 rm -f conftest*
6581 fi
6582
6583 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6584   echo "$ac_t""yes" 1>&6
6585     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6586   cat >> confdefs.h <<EOF
6587 #define $ac_tr_func 1
6588 EOF
6589  
6590 else
6591   echo "$ac_t""no" 1>&6
6592 fi
6593 done
6594
6595   ;;
6596   esac
6597
6598 case "$LIBS" in
6599   *-lsec*) for ac_func in putprpwnam
6600 do
6601 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6602 echo "configure:6603: checking for $ac_func" >&5
6603 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6604   echo $ac_n "(cached) $ac_c" 1>&6
6605 else
6606   cat > conftest.$ac_ext <<EOF
6607 #line 6608 "configure"
6608 #include "confdefs.h"
6609 /* System header to define __stub macros and hopefully few prototypes,
6610     which can conflict with char $ac_func(); below.  */
6611 #include <assert.h>
6612 /* Override any gcc2 internal prototype to avoid an error.  */
6613 /* We use char because int might match the return type of a gcc2
6614     builtin and then its argument prototype would still apply.  */
6615 char $ac_func();
6616
6617 int main() {
6618
6619 /* The GNU C library defines this for functions which it implements
6620     to always fail with ENOSYS.  Some functions are actually named
6621     something starting with __ and the normal name is an alias.  */
6622 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6623 choke me
6624 #else
6625 $ac_func();
6626 #endif
6627
6628 ; return 0; }
6629 EOF
6630 if { (eval echo configure:6631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6631   rm -rf conftest*
6632   eval "ac_cv_func_$ac_func=yes"
6633 else
6634   echo "configure: failed program was:" >&5
6635   cat conftest.$ac_ext >&5
6636   rm -rf conftest*
6637   eval "ac_cv_func_$ac_func=no"
6638 fi
6639 rm -f conftest*
6640 fi
6641
6642 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6643   echo "$ac_t""yes" 1>&6
6644     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6645   cat >> confdefs.h <<EOF
6646 #define $ac_tr_func 1
6647 EOF
6648  
6649 else
6650   echo "$ac_t""no" 1>&6
6651 fi
6652 done
6653  ;;
6654   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6655 echo "configure:6656: checking for putprpwnam in -lsec" >&5
6656 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6657 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6658   echo $ac_n "(cached) $ac_c" 1>&6
6659 else
6660   ac_save_LIBS="$LIBS"
6661 LIBS="-lsec  $LIBS"
6662 cat > conftest.$ac_ext <<EOF
6663 #line 6664 "configure"
6664 #include "confdefs.h"
6665 /* Override any gcc2 internal prototype to avoid an error.  */
6666 /* We use char because int might match the return type of a gcc2
6667     builtin and then its argument prototype would still apply.  */
6668 char putprpwnam();
6669
6670 int main() {
6671 putprpwnam()
6672 ; return 0; }
6673 EOF
6674 if { (eval echo configure:6675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6675   rm -rf conftest*
6676   eval "ac_cv_lib_$ac_lib_var=yes"
6677 else
6678   echo "configure: failed program was:" >&5
6679   cat conftest.$ac_ext >&5
6680   rm -rf conftest*
6681   eval "ac_cv_lib_$ac_lib_var=no"
6682 fi
6683 rm -f conftest*
6684 LIBS="$ac_save_LIBS"
6685
6686 fi
6687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6688   echo "$ac_t""yes" 1>&6
6689     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6690     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6691   cat >> confdefs.h <<EOF
6692 #define $ac_tr_lib 1
6693 EOF
6694
6695   LIBS="-lsec $LIBS"
6696
6697 else
6698   echo "$ac_t""no" 1>&6
6699 fi
6700  
6701      for ac_func in putprpwnam
6702 do
6703 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6704 echo "configure:6705: checking for $ac_func" >&5
6705 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6706   echo $ac_n "(cached) $ac_c" 1>&6
6707 else
6708   cat > conftest.$ac_ext <<EOF
6709 #line 6710 "configure"
6710 #include "confdefs.h"
6711 /* System header to define __stub macros and hopefully few prototypes,
6712     which can conflict with char $ac_func(); below.  */
6713 #include <assert.h>
6714 /* Override any gcc2 internal prototype to avoid an error.  */
6715 /* We use char because int might match the return type of a gcc2
6716     builtin and then its argument prototype would still apply.  */
6717 char $ac_func();
6718
6719 int main() {
6720
6721 /* The GNU C library defines this for functions which it implements
6722     to always fail with ENOSYS.  Some functions are actually named
6723     something starting with __ and the normal name is an alias.  */
6724 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6725 choke me
6726 #else
6727 $ac_func();
6728 #endif
6729
6730 ; return 0; }
6731 EOF
6732 if { (eval echo configure:6733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6733   rm -rf conftest*
6734   eval "ac_cv_func_$ac_func=yes"
6735 else
6736   echo "configure: failed program was:" >&5
6737   cat conftest.$ac_ext >&5
6738   rm -rf conftest*
6739   eval "ac_cv_func_$ac_func=no"
6740 fi
6741 rm -f conftest*
6742 fi
6743
6744 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6745   echo "$ac_t""yes" 1>&6
6746     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6747   cat >> confdefs.h <<EOF
6748 #define $ac_tr_func 1
6749 EOF
6750  
6751 else
6752   echo "$ac_t""no" 1>&6
6753 fi
6754 done
6755
6756   ;;
6757   esac
6758
6759
6760 case "$LIBS" in
6761   *-lsecurity*) for ac_func in set_auth_parameters
6762 do
6763 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6764 echo "configure:6765: checking for $ac_func" >&5
6765 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6766   echo $ac_n "(cached) $ac_c" 1>&6
6767 else
6768   cat > conftest.$ac_ext <<EOF
6769 #line 6770 "configure"
6770 #include "confdefs.h"
6771 /* System header to define __stub macros and hopefully few prototypes,
6772     which can conflict with char $ac_func(); below.  */
6773 #include <assert.h>
6774 /* Override any gcc2 internal prototype to avoid an error.  */
6775 /* We use char because int might match the return type of a gcc2
6776     builtin and then its argument prototype would still apply.  */
6777 char $ac_func();
6778
6779 int main() {
6780
6781 /* The GNU C library defines this for functions which it implements
6782     to always fail with ENOSYS.  Some functions are actually named
6783     something starting with __ and the normal name is an alias.  */
6784 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6785 choke me
6786 #else
6787 $ac_func();
6788 #endif
6789
6790 ; return 0; }
6791 EOF
6792 if { (eval echo configure:6793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6793   rm -rf conftest*
6794   eval "ac_cv_func_$ac_func=yes"
6795 else
6796   echo "configure: failed program was:" >&5
6797   cat conftest.$ac_ext >&5
6798   rm -rf conftest*
6799   eval "ac_cv_func_$ac_func=no"
6800 fi
6801 rm -f conftest*
6802 fi
6803
6804 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6805   echo "$ac_t""yes" 1>&6
6806     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6807   cat >> confdefs.h <<EOF
6808 #define $ac_tr_func 1
6809 EOF
6810  
6811 else
6812   echo "$ac_t""no" 1>&6
6813 fi
6814 done
6815  ;;
6816   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
6817 echo "configure:6818: checking for set_auth_parameters in -lsecurity" >&5
6818 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6819 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6820   echo $ac_n "(cached) $ac_c" 1>&6
6821 else
6822   ac_save_LIBS="$LIBS"
6823 LIBS="-lsecurity  $LIBS"
6824 cat > conftest.$ac_ext <<EOF
6825 #line 6826 "configure"
6826 #include "confdefs.h"
6827 /* Override any gcc2 internal prototype to avoid an error.  */
6828 /* We use char because int might match the return type of a gcc2
6829     builtin and then its argument prototype would still apply.  */
6830 char set_auth_parameters();
6831
6832 int main() {
6833 set_auth_parameters()
6834 ; return 0; }
6835 EOF
6836 if { (eval echo configure:6837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6837   rm -rf conftest*
6838   eval "ac_cv_lib_$ac_lib_var=yes"
6839 else
6840   echo "configure: failed program was:" >&5
6841   cat conftest.$ac_ext >&5
6842   rm -rf conftest*
6843   eval "ac_cv_lib_$ac_lib_var=no"
6844 fi
6845 rm -f conftest*
6846 LIBS="$ac_save_LIBS"
6847
6848 fi
6849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6850   echo "$ac_t""yes" 1>&6
6851     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6852     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6853   cat >> confdefs.h <<EOF
6854 #define $ac_tr_lib 1
6855 EOF
6856
6857   LIBS="-lsecurity $LIBS"
6858
6859 else
6860   echo "$ac_t""no" 1>&6
6861 fi
6862  
6863      for ac_func in set_auth_parameters
6864 do
6865 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6866 echo "configure:6867: checking for $ac_func" >&5
6867 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6868   echo $ac_n "(cached) $ac_c" 1>&6
6869 else
6870   cat > conftest.$ac_ext <<EOF
6871 #line 6872 "configure"
6872 #include "confdefs.h"
6873 /* System header to define __stub macros and hopefully few prototypes,
6874     which can conflict with char $ac_func(); below.  */
6875 #include <assert.h>
6876 /* Override any gcc2 internal prototype to avoid an error.  */
6877 /* We use char because int might match the return type of a gcc2
6878     builtin and then its argument prototype would still apply.  */
6879 char $ac_func();
6880
6881 int main() {
6882
6883 /* The GNU C library defines this for functions which it implements
6884     to always fail with ENOSYS.  Some functions are actually named
6885     something starting with __ and the normal name is an alias.  */
6886 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6887 choke me
6888 #else
6889 $ac_func();
6890 #endif
6891
6892 ; return 0; }
6893 EOF
6894 if { (eval echo configure:6895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6895   rm -rf conftest*
6896   eval "ac_cv_func_$ac_func=yes"
6897 else
6898   echo "configure: failed program was:" >&5
6899   cat conftest.$ac_ext >&5
6900   rm -rf conftest*
6901   eval "ac_cv_func_$ac_func=no"
6902 fi
6903 rm -f conftest*
6904 fi
6905
6906 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6907   echo "$ac_t""yes" 1>&6
6908     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6909   cat >> confdefs.h <<EOF
6910 #define $ac_tr_func 1
6911 EOF
6912  
6913 else
6914   echo "$ac_t""no" 1>&6
6915 fi
6916 done
6917
6918   ;;
6919   esac
6920
6921 case "$LIBS" in
6922   *-lsec*) for ac_func in set_auth_parameters
6923 do
6924 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6925 echo "configure:6926: checking for $ac_func" >&5
6926 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6927   echo $ac_n "(cached) $ac_c" 1>&6
6928 else
6929   cat > conftest.$ac_ext <<EOF
6930 #line 6931 "configure"
6931 #include "confdefs.h"
6932 /* System header to define __stub macros and hopefully few prototypes,
6933     which can conflict with char $ac_func(); below.  */
6934 #include <assert.h>
6935 /* Override any gcc2 internal prototype to avoid an error.  */
6936 /* We use char because int might match the return type of a gcc2
6937     builtin and then its argument prototype would still apply.  */
6938 char $ac_func();
6939
6940 int main() {
6941
6942 /* The GNU C library defines this for functions which it implements
6943     to always fail with ENOSYS.  Some functions are actually named
6944     something starting with __ and the normal name is an alias.  */
6945 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6946 choke me
6947 #else
6948 $ac_func();
6949 #endif
6950
6951 ; return 0; }
6952 EOF
6953 if { (eval echo configure:6954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6954   rm -rf conftest*
6955   eval "ac_cv_func_$ac_func=yes"
6956 else
6957   echo "configure: failed program was:" >&5
6958   cat conftest.$ac_ext >&5
6959   rm -rf conftest*
6960   eval "ac_cv_func_$ac_func=no"
6961 fi
6962 rm -f conftest*
6963 fi
6964
6965 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6966   echo "$ac_t""yes" 1>&6
6967     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6968   cat >> confdefs.h <<EOF
6969 #define $ac_tr_func 1
6970 EOF
6971  
6972 else
6973   echo "$ac_t""no" 1>&6
6974 fi
6975 done
6976  ;;
6977   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
6978 echo "configure:6979: checking for set_auth_parameters in -lsec" >&5
6979 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6980 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6981   echo $ac_n "(cached) $ac_c" 1>&6
6982 else
6983   ac_save_LIBS="$LIBS"
6984 LIBS="-lsec  $LIBS"
6985 cat > conftest.$ac_ext <<EOF
6986 #line 6987 "configure"
6987 #include "confdefs.h"
6988 /* Override any gcc2 internal prototype to avoid an error.  */
6989 /* We use char because int might match the return type of a gcc2
6990     builtin and then its argument prototype would still apply.  */
6991 char set_auth_parameters();
6992
6993 int main() {
6994 set_auth_parameters()
6995 ; return 0; }
6996 EOF
6997 if { (eval echo configure:6998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6998   rm -rf conftest*
6999   eval "ac_cv_lib_$ac_lib_var=yes"
7000 else
7001   echo "configure: failed program was:" >&5
7002   cat conftest.$ac_ext >&5
7003   rm -rf conftest*
7004   eval "ac_cv_lib_$ac_lib_var=no"
7005 fi
7006 rm -f conftest*
7007 LIBS="$ac_save_LIBS"
7008
7009 fi
7010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7011   echo "$ac_t""yes" 1>&6
7012     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7013     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7014   cat >> confdefs.h <<EOF
7015 #define $ac_tr_lib 1
7016 EOF
7017
7018   LIBS="-lsec $LIBS"
7019
7020 else
7021   echo "$ac_t""no" 1>&6
7022 fi
7023  
7024      for ac_func in set_auth_parameters
7025 do
7026 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7027 echo "configure:7028: checking for $ac_func" >&5
7028 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7029   echo $ac_n "(cached) $ac_c" 1>&6
7030 else
7031   cat > conftest.$ac_ext <<EOF
7032 #line 7033 "configure"
7033 #include "confdefs.h"
7034 /* System header to define __stub macros and hopefully few prototypes,
7035     which can conflict with char $ac_func(); below.  */
7036 #include <assert.h>
7037 /* Override any gcc2 internal prototype to avoid an error.  */
7038 /* We use char because int might match the return type of a gcc2
7039     builtin and then its argument prototype would still apply.  */
7040 char $ac_func();
7041
7042 int main() {
7043
7044 /* The GNU C library defines this for functions which it implements
7045     to always fail with ENOSYS.  Some functions are actually named
7046     something starting with __ and the normal name is an alias.  */
7047 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7048 choke me
7049 #else
7050 $ac_func();
7051 #endif
7052
7053 ; return 0; }
7054 EOF
7055 if { (eval echo configure:7056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7056   rm -rf conftest*
7057   eval "ac_cv_func_$ac_func=yes"
7058 else
7059   echo "configure: failed program was:" >&5
7060   cat conftest.$ac_ext >&5
7061   rm -rf conftest*
7062   eval "ac_cv_func_$ac_func=no"
7063 fi
7064 rm -f conftest*
7065 fi
7066
7067 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7068   echo "$ac_t""yes" 1>&6
7069     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7070   cat >> confdefs.h <<EOF
7071 #define $ac_tr_func 1
7072 EOF
7073  
7074 else
7075   echo "$ac_t""no" 1>&6
7076 fi
7077 done
7078
7079   ;;
7080   esac
7081
7082
7083 # UnixWare 7.x has its getspnam in -lgen
7084 case "$LIBS" in
7085   *-lgen*) for ac_func in getspnam
7086 do
7087 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7088 echo "configure:7089: checking for $ac_func" >&5
7089 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7090   echo $ac_n "(cached) $ac_c" 1>&6
7091 else
7092   cat > conftest.$ac_ext <<EOF
7093 #line 7094 "configure"
7094 #include "confdefs.h"
7095 /* System header to define __stub macros and hopefully few prototypes,
7096     which can conflict with char $ac_func(); below.  */
7097 #include <assert.h>
7098 /* Override any gcc2 internal prototype to avoid an error.  */
7099 /* We use char because int might match the return type of a gcc2
7100     builtin and then its argument prototype would still apply.  */
7101 char $ac_func();
7102
7103 int main() {
7104
7105 /* The GNU C library defines this for functions which it implements
7106     to always fail with ENOSYS.  Some functions are actually named
7107     something starting with __ and the normal name is an alias.  */
7108 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7109 choke me
7110 #else
7111 $ac_func();
7112 #endif
7113
7114 ; return 0; }
7115 EOF
7116 if { (eval echo configure:7117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7117   rm -rf conftest*
7118   eval "ac_cv_func_$ac_func=yes"
7119 else
7120   echo "configure: failed program was:" >&5
7121   cat conftest.$ac_ext >&5
7122   rm -rf conftest*
7123   eval "ac_cv_func_$ac_func=no"
7124 fi
7125 rm -f conftest*
7126 fi
7127
7128 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7129   echo "$ac_t""yes" 1>&6
7130     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7131   cat >> confdefs.h <<EOF
7132 #define $ac_tr_func 1
7133 EOF
7134  
7135 else
7136   echo "$ac_t""no" 1>&6
7137 fi
7138 done
7139  ;;
7140   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7141 echo "configure:7142: checking for getspnam in -lgen" >&5
7142 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7143 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7144   echo $ac_n "(cached) $ac_c" 1>&6
7145 else
7146   ac_save_LIBS="$LIBS"
7147 LIBS="-lgen  $LIBS"
7148 cat > conftest.$ac_ext <<EOF
7149 #line 7150 "configure"
7150 #include "confdefs.h"
7151 /* Override any gcc2 internal prototype to avoid an error.  */
7152 /* We use char because int might match the return type of a gcc2
7153     builtin and then its argument prototype would still apply.  */
7154 char getspnam();
7155
7156 int main() {
7157 getspnam()
7158 ; return 0; }
7159 EOF
7160 if { (eval echo configure:7161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7161   rm -rf conftest*
7162   eval "ac_cv_lib_$ac_lib_var=yes"
7163 else
7164   echo "configure: failed program was:" >&5
7165   cat conftest.$ac_ext >&5
7166   rm -rf conftest*
7167   eval "ac_cv_lib_$ac_lib_var=no"
7168 fi
7169 rm -f conftest*
7170 LIBS="$ac_save_LIBS"
7171
7172 fi
7173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7174   echo "$ac_t""yes" 1>&6
7175     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7176     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7177   cat >> confdefs.h <<EOF
7178 #define $ac_tr_lib 1
7179 EOF
7180
7181   LIBS="-lgen $LIBS"
7182
7183 else
7184   echo "$ac_t""no" 1>&6
7185 fi
7186  
7187      for ac_func in getspnam
7188 do
7189 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7190 echo "configure:7191: checking for $ac_func" >&5
7191 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7192   echo $ac_n "(cached) $ac_c" 1>&6
7193 else
7194   cat > conftest.$ac_ext <<EOF
7195 #line 7196 "configure"
7196 #include "confdefs.h"
7197 /* System header to define __stub macros and hopefully few prototypes,
7198     which can conflict with char $ac_func(); below.  */
7199 #include <assert.h>
7200 /* Override any gcc2 internal prototype to avoid an error.  */
7201 /* We use char because int might match the return type of a gcc2
7202     builtin and then its argument prototype would still apply.  */
7203 char $ac_func();
7204
7205 int main() {
7206
7207 /* The GNU C library defines this for functions which it implements
7208     to always fail with ENOSYS.  Some functions are actually named
7209     something starting with __ and the normal name is an alias.  */
7210 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7211 choke me
7212 #else
7213 $ac_func();
7214 #endif
7215
7216 ; return 0; }
7217 EOF
7218 if { (eval echo configure:7219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7219   rm -rf conftest*
7220   eval "ac_cv_func_$ac_func=yes"
7221 else
7222   echo "configure: failed program was:" >&5
7223   cat conftest.$ac_ext >&5
7224   rm -rf conftest*
7225   eval "ac_cv_func_$ac_func=no"
7226 fi
7227 rm -f conftest*
7228 fi
7229
7230 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7231   echo "$ac_t""yes" 1>&6
7232     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7233   cat >> confdefs.h <<EOF
7234 #define $ac_tr_func 1
7235 EOF
7236  
7237 else
7238   echo "$ac_t""no" 1>&6
7239 fi
7240 done
7241
7242   ;;
7243   esac
7244
7245
7246 case "$LIBS" in
7247   *-lsecurity*) for ac_func in getspnam
7248 do
7249 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7250 echo "configure:7251: checking for $ac_func" >&5
7251 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7252   echo $ac_n "(cached) $ac_c" 1>&6
7253 else
7254   cat > conftest.$ac_ext <<EOF
7255 #line 7256 "configure"
7256 #include "confdefs.h"
7257 /* System header to define __stub macros and hopefully few prototypes,
7258     which can conflict with char $ac_func(); below.  */
7259 #include <assert.h>
7260 /* Override any gcc2 internal prototype to avoid an error.  */
7261 /* We use char because int might match the return type of a gcc2
7262     builtin and then its argument prototype would still apply.  */
7263 char $ac_func();
7264
7265 int main() {
7266
7267 /* The GNU C library defines this for functions which it implements
7268     to always fail with ENOSYS.  Some functions are actually named
7269     something starting with __ and the normal name is an alias.  */
7270 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7271 choke me
7272 #else
7273 $ac_func();
7274 #endif
7275
7276 ; return 0; }
7277 EOF
7278 if { (eval echo configure:7279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7279   rm -rf conftest*
7280   eval "ac_cv_func_$ac_func=yes"
7281 else
7282   echo "configure: failed program was:" >&5
7283   cat conftest.$ac_ext >&5
7284   rm -rf conftest*
7285   eval "ac_cv_func_$ac_func=no"
7286 fi
7287 rm -f conftest*
7288 fi
7289
7290 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7291   echo "$ac_t""yes" 1>&6
7292     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7293   cat >> confdefs.h <<EOF
7294 #define $ac_tr_func 1
7295 EOF
7296  
7297 else
7298   echo "$ac_t""no" 1>&6
7299 fi
7300 done
7301  ;;
7302   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7303 echo "configure:7304: checking for getspnam in -lsecurity" >&5
7304 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7305 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7306   echo $ac_n "(cached) $ac_c" 1>&6
7307 else
7308   ac_save_LIBS="$LIBS"
7309 LIBS="-lsecurity  $LIBS"
7310 cat > conftest.$ac_ext <<EOF
7311 #line 7312 "configure"
7312 #include "confdefs.h"
7313 /* Override any gcc2 internal prototype to avoid an error.  */
7314 /* We use char because int might match the return type of a gcc2
7315     builtin and then its argument prototype would still apply.  */
7316 char getspnam();
7317
7318 int main() {
7319 getspnam()
7320 ; return 0; }
7321 EOF
7322 if { (eval echo configure:7323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7323   rm -rf conftest*
7324   eval "ac_cv_lib_$ac_lib_var=yes"
7325 else
7326   echo "configure: failed program was:" >&5
7327   cat conftest.$ac_ext >&5
7328   rm -rf conftest*
7329   eval "ac_cv_lib_$ac_lib_var=no"
7330 fi
7331 rm -f conftest*
7332 LIBS="$ac_save_LIBS"
7333
7334 fi
7335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7336   echo "$ac_t""yes" 1>&6
7337     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7338     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7339   cat >> confdefs.h <<EOF
7340 #define $ac_tr_lib 1
7341 EOF
7342
7343   LIBS="-lsecurity $LIBS"
7344
7345 else
7346   echo "$ac_t""no" 1>&6
7347 fi
7348  
7349      for ac_func in getspnam
7350 do
7351 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7352 echo "configure:7353: checking for $ac_func" >&5
7353 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7354   echo $ac_n "(cached) $ac_c" 1>&6
7355 else
7356   cat > conftest.$ac_ext <<EOF
7357 #line 7358 "configure"
7358 #include "confdefs.h"
7359 /* System header to define __stub macros and hopefully few prototypes,
7360     which can conflict with char $ac_func(); below.  */
7361 #include <assert.h>
7362 /* Override any gcc2 internal prototype to avoid an error.  */
7363 /* We use char because int might match the return type of a gcc2
7364     builtin and then its argument prototype would still apply.  */
7365 char $ac_func();
7366
7367 int main() {
7368
7369 /* The GNU C library defines this for functions which it implements
7370     to always fail with ENOSYS.  Some functions are actually named
7371     something starting with __ and the normal name is an alias.  */
7372 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7373 choke me
7374 #else
7375 $ac_func();
7376 #endif
7377
7378 ; return 0; }
7379 EOF
7380 if { (eval echo configure:7381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7381   rm -rf conftest*
7382   eval "ac_cv_func_$ac_func=yes"
7383 else
7384   echo "configure: failed program was:" >&5
7385   cat conftest.$ac_ext >&5
7386   rm -rf conftest*
7387   eval "ac_cv_func_$ac_func=no"
7388 fi
7389 rm -f conftest*
7390 fi
7391
7392 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7393   echo "$ac_t""yes" 1>&6
7394     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7395   cat >> confdefs.h <<EOF
7396 #define $ac_tr_func 1
7397 EOF
7398  
7399 else
7400   echo "$ac_t""no" 1>&6
7401 fi
7402 done
7403
7404   ;;
7405   esac
7406
7407 case "$LIBS" in
7408   *-lsec*) for ac_func in getspnam
7409 do
7410 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7411 echo "configure:7412: checking for $ac_func" >&5
7412 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7413   echo $ac_n "(cached) $ac_c" 1>&6
7414 else
7415   cat > conftest.$ac_ext <<EOF
7416 #line 7417 "configure"
7417 #include "confdefs.h"
7418 /* System header to define __stub macros and hopefully few prototypes,
7419     which can conflict with char $ac_func(); below.  */
7420 #include <assert.h>
7421 /* Override any gcc2 internal prototype to avoid an error.  */
7422 /* We use char because int might match the return type of a gcc2
7423     builtin and then its argument prototype would still apply.  */
7424 char $ac_func();
7425
7426 int main() {
7427
7428 /* The GNU C library defines this for functions which it implements
7429     to always fail with ENOSYS.  Some functions are actually named
7430     something starting with __ and the normal name is an alias.  */
7431 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7432 choke me
7433 #else
7434 $ac_func();
7435 #endif
7436
7437 ; return 0; }
7438 EOF
7439 if { (eval echo configure:7440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7440   rm -rf conftest*
7441   eval "ac_cv_func_$ac_func=yes"
7442 else
7443   echo "configure: failed program was:" >&5
7444   cat conftest.$ac_ext >&5
7445   rm -rf conftest*
7446   eval "ac_cv_func_$ac_func=no"
7447 fi
7448 rm -f conftest*
7449 fi
7450
7451 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7452   echo "$ac_t""yes" 1>&6
7453     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7454   cat >> confdefs.h <<EOF
7455 #define $ac_tr_func 1
7456 EOF
7457  
7458 else
7459   echo "$ac_t""no" 1>&6
7460 fi
7461 done
7462  ;;
7463   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7464 echo "configure:7465: checking for getspnam in -lsec" >&5
7465 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7466 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7467   echo $ac_n "(cached) $ac_c" 1>&6
7468 else
7469   ac_save_LIBS="$LIBS"
7470 LIBS="-lsec  $LIBS"
7471 cat > conftest.$ac_ext <<EOF
7472 #line 7473 "configure"
7473 #include "confdefs.h"
7474 /* Override any gcc2 internal prototype to avoid an error.  */
7475 /* We use char because int might match the return type of a gcc2
7476     builtin and then its argument prototype would still apply.  */
7477 char getspnam();
7478
7479 int main() {
7480 getspnam()
7481 ; return 0; }
7482 EOF
7483 if { (eval echo configure:7484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7484   rm -rf conftest*
7485   eval "ac_cv_lib_$ac_lib_var=yes"
7486 else
7487   echo "configure: failed program was:" >&5
7488   cat conftest.$ac_ext >&5
7489   rm -rf conftest*
7490   eval "ac_cv_lib_$ac_lib_var=no"
7491 fi
7492 rm -f conftest*
7493 LIBS="$ac_save_LIBS"
7494
7495 fi
7496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7497   echo "$ac_t""yes" 1>&6
7498     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7499     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7500   cat >> confdefs.h <<EOF
7501 #define $ac_tr_lib 1
7502 EOF
7503
7504   LIBS="-lsec $LIBS"
7505
7506 else
7507   echo "$ac_t""no" 1>&6
7508 fi
7509  
7510      for ac_func in getspnam
7511 do
7512 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7513 echo "configure:7514: checking for $ac_func" >&5
7514 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7515   echo $ac_n "(cached) $ac_c" 1>&6
7516 else
7517   cat > conftest.$ac_ext <<EOF
7518 #line 7519 "configure"
7519 #include "confdefs.h"
7520 /* System header to define __stub macros and hopefully few prototypes,
7521     which can conflict with char $ac_func(); below.  */
7522 #include <assert.h>
7523 /* Override any gcc2 internal prototype to avoid an error.  */
7524 /* We use char because int might match the return type of a gcc2
7525     builtin and then its argument prototype would still apply.  */
7526 char $ac_func();
7527
7528 int main() {
7529
7530 /* The GNU C library defines this for functions which it implements
7531     to always fail with ENOSYS.  Some functions are actually named
7532     something starting with __ and the normal name is an alias.  */
7533 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7534 choke me
7535 #else
7536 $ac_func();
7537 #endif
7538
7539 ; return 0; }
7540 EOF
7541 if { (eval echo configure:7542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7542   rm -rf conftest*
7543   eval "ac_cv_func_$ac_func=yes"
7544 else
7545   echo "configure: failed program was:" >&5
7546   cat conftest.$ac_ext >&5
7547   rm -rf conftest*
7548   eval "ac_cv_func_$ac_func=no"
7549 fi
7550 rm -f conftest*
7551 fi
7552
7553 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7554   echo "$ac_t""yes" 1>&6
7555     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7556   cat >> confdefs.h <<EOF
7557 #define $ac_tr_func 1
7558 EOF
7559  
7560 else
7561   echo "$ac_t""no" 1>&6
7562 fi
7563 done
7564
7565   ;;
7566   esac
7567
7568
7569 case "$LIBS" in
7570   *-lsecurity*) for ac_func in bigcrypt
7571 do
7572 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7573 echo "configure:7574: checking for $ac_func" >&5
7574 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7575   echo $ac_n "(cached) $ac_c" 1>&6
7576 else
7577   cat > conftest.$ac_ext <<EOF
7578 #line 7579 "configure"
7579 #include "confdefs.h"
7580 /* System header to define __stub macros and hopefully few prototypes,
7581     which can conflict with char $ac_func(); below.  */
7582 #include <assert.h>
7583 /* Override any gcc2 internal prototype to avoid an error.  */
7584 /* We use char because int might match the return type of a gcc2
7585     builtin and then its argument prototype would still apply.  */
7586 char $ac_func();
7587
7588 int main() {
7589
7590 /* The GNU C library defines this for functions which it implements
7591     to always fail with ENOSYS.  Some functions are actually named
7592     something starting with __ and the normal name is an alias.  */
7593 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7594 choke me
7595 #else
7596 $ac_func();
7597 #endif
7598
7599 ; return 0; }
7600 EOF
7601 if { (eval echo configure:7602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7602   rm -rf conftest*
7603   eval "ac_cv_func_$ac_func=yes"
7604 else
7605   echo "configure: failed program was:" >&5
7606   cat conftest.$ac_ext >&5
7607   rm -rf conftest*
7608   eval "ac_cv_func_$ac_func=no"
7609 fi
7610 rm -f conftest*
7611 fi
7612
7613 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7614   echo "$ac_t""yes" 1>&6
7615     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7616   cat >> confdefs.h <<EOF
7617 #define $ac_tr_func 1
7618 EOF
7619  
7620 else
7621   echo "$ac_t""no" 1>&6
7622 fi
7623 done
7624  ;;
7625   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7626 echo "configure:7627: checking for bigcrypt in -lsecurity" >&5
7627 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7628 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7629   echo $ac_n "(cached) $ac_c" 1>&6
7630 else
7631   ac_save_LIBS="$LIBS"
7632 LIBS="-lsecurity  $LIBS"
7633 cat > conftest.$ac_ext <<EOF
7634 #line 7635 "configure"
7635 #include "confdefs.h"
7636 /* Override any gcc2 internal prototype to avoid an error.  */
7637 /* We use char because int might match the return type of a gcc2
7638     builtin and then its argument prototype would still apply.  */
7639 char bigcrypt();
7640
7641 int main() {
7642 bigcrypt()
7643 ; return 0; }
7644 EOF
7645 if { (eval echo configure:7646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7646   rm -rf conftest*
7647   eval "ac_cv_lib_$ac_lib_var=yes"
7648 else
7649   echo "configure: failed program was:" >&5
7650   cat conftest.$ac_ext >&5
7651   rm -rf conftest*
7652   eval "ac_cv_lib_$ac_lib_var=no"
7653 fi
7654 rm -f conftest*
7655 LIBS="$ac_save_LIBS"
7656
7657 fi
7658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7659   echo "$ac_t""yes" 1>&6
7660     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7661     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7662   cat >> confdefs.h <<EOF
7663 #define $ac_tr_lib 1
7664 EOF
7665
7666   LIBS="-lsecurity $LIBS"
7667
7668 else
7669   echo "$ac_t""no" 1>&6
7670 fi
7671  
7672      for ac_func in bigcrypt
7673 do
7674 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7675 echo "configure:7676: checking for $ac_func" >&5
7676 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7677   echo $ac_n "(cached) $ac_c" 1>&6
7678 else
7679   cat > conftest.$ac_ext <<EOF
7680 #line 7681 "configure"
7681 #include "confdefs.h"
7682 /* System header to define __stub macros and hopefully few prototypes,
7683     which can conflict with char $ac_func(); below.  */
7684 #include <assert.h>
7685 /* Override any gcc2 internal prototype to avoid an error.  */
7686 /* We use char because int might match the return type of a gcc2
7687     builtin and then its argument prototype would still apply.  */
7688 char $ac_func();
7689
7690 int main() {
7691
7692 /* The GNU C library defines this for functions which it implements
7693     to always fail with ENOSYS.  Some functions are actually named
7694     something starting with __ and the normal name is an alias.  */
7695 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7696 choke me
7697 #else
7698 $ac_func();
7699 #endif
7700
7701 ; return 0; }
7702 EOF
7703 if { (eval echo configure:7704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7704   rm -rf conftest*
7705   eval "ac_cv_func_$ac_func=yes"
7706 else
7707   echo "configure: failed program was:" >&5
7708   cat conftest.$ac_ext >&5
7709   rm -rf conftest*
7710   eval "ac_cv_func_$ac_func=no"
7711 fi
7712 rm -f conftest*
7713 fi
7714
7715 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7716   echo "$ac_t""yes" 1>&6
7717     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7718   cat >> confdefs.h <<EOF
7719 #define $ac_tr_func 1
7720 EOF
7721  
7722 else
7723   echo "$ac_t""no" 1>&6
7724 fi
7725 done
7726
7727   ;;
7728   esac
7729
7730 case "$LIBS" in
7731   *-lsec*) for ac_func in bigcrypt
7732 do
7733 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7734 echo "configure:7735: checking for $ac_func" >&5
7735 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7736   echo $ac_n "(cached) $ac_c" 1>&6
7737 else
7738   cat > conftest.$ac_ext <<EOF
7739 #line 7740 "configure"
7740 #include "confdefs.h"
7741 /* System header to define __stub macros and hopefully few prototypes,
7742     which can conflict with char $ac_func(); below.  */
7743 #include <assert.h>
7744 /* Override any gcc2 internal prototype to avoid an error.  */
7745 /* We use char because int might match the return type of a gcc2
7746     builtin and then its argument prototype would still apply.  */
7747 char $ac_func();
7748
7749 int main() {
7750
7751 /* The GNU C library defines this for functions which it implements
7752     to always fail with ENOSYS.  Some functions are actually named
7753     something starting with __ and the normal name is an alias.  */
7754 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7755 choke me
7756 #else
7757 $ac_func();
7758 #endif
7759
7760 ; return 0; }
7761 EOF
7762 if { (eval echo configure:7763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7763   rm -rf conftest*
7764   eval "ac_cv_func_$ac_func=yes"
7765 else
7766   echo "configure: failed program was:" >&5
7767   cat conftest.$ac_ext >&5
7768   rm -rf conftest*
7769   eval "ac_cv_func_$ac_func=no"
7770 fi
7771 rm -f conftest*
7772 fi
7773
7774 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7775   echo "$ac_t""yes" 1>&6
7776     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7777   cat >> confdefs.h <<EOF
7778 #define $ac_tr_func 1
7779 EOF
7780  
7781 else
7782   echo "$ac_t""no" 1>&6
7783 fi
7784 done
7785  ;;
7786   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7787 echo "configure:7788: checking for bigcrypt in -lsec" >&5
7788 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7789 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7790   echo $ac_n "(cached) $ac_c" 1>&6
7791 else
7792   ac_save_LIBS="$LIBS"
7793 LIBS="-lsec  $LIBS"
7794 cat > conftest.$ac_ext <<EOF
7795 #line 7796 "configure"
7796 #include "confdefs.h"
7797 /* Override any gcc2 internal prototype to avoid an error.  */
7798 /* We use char because int might match the return type of a gcc2
7799     builtin and then its argument prototype would still apply.  */
7800 char bigcrypt();
7801
7802 int main() {
7803 bigcrypt()
7804 ; return 0; }
7805 EOF
7806 if { (eval echo configure:7807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7807   rm -rf conftest*
7808   eval "ac_cv_lib_$ac_lib_var=yes"
7809 else
7810   echo "configure: failed program was:" >&5
7811   cat conftest.$ac_ext >&5
7812   rm -rf conftest*
7813   eval "ac_cv_lib_$ac_lib_var=no"
7814 fi
7815 rm -f conftest*
7816 LIBS="$ac_save_LIBS"
7817
7818 fi
7819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7820   echo "$ac_t""yes" 1>&6
7821     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7822     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7823   cat >> confdefs.h <<EOF
7824 #define $ac_tr_lib 1
7825 EOF
7826
7827   LIBS="-lsec $LIBS"
7828
7829 else
7830   echo "$ac_t""no" 1>&6
7831 fi
7832  
7833      for ac_func in bigcrypt
7834 do
7835 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7836 echo "configure:7837: checking for $ac_func" >&5
7837 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7838   echo $ac_n "(cached) $ac_c" 1>&6
7839 else
7840   cat > conftest.$ac_ext <<EOF
7841 #line 7842 "configure"
7842 #include "confdefs.h"
7843 /* System header to define __stub macros and hopefully few prototypes,
7844     which can conflict with char $ac_func(); below.  */
7845 #include <assert.h>
7846 /* Override any gcc2 internal prototype to avoid an error.  */
7847 /* We use char because int might match the return type of a gcc2
7848     builtin and then its argument prototype would still apply.  */
7849 char $ac_func();
7850
7851 int main() {
7852
7853 /* The GNU C library defines this for functions which it implements
7854     to always fail with ENOSYS.  Some functions are actually named
7855     something starting with __ and the normal name is an alias.  */
7856 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7857 choke me
7858 #else
7859 $ac_func();
7860 #endif
7861
7862 ; return 0; }
7863 EOF
7864 if { (eval echo configure:7865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7865   rm -rf conftest*
7866   eval "ac_cv_func_$ac_func=yes"
7867 else
7868   echo "configure: failed program was:" >&5
7869   cat conftest.$ac_ext >&5
7870   rm -rf conftest*
7871   eval "ac_cv_func_$ac_func=no"
7872 fi
7873 rm -f conftest*
7874 fi
7875
7876 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7877   echo "$ac_t""yes" 1>&6
7878     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7879   cat >> confdefs.h <<EOF
7880 #define $ac_tr_func 1
7881 EOF
7882  
7883 else
7884   echo "$ac_t""no" 1>&6
7885 fi
7886 done
7887
7888   ;;
7889   esac
7890
7891
7892 case "$LIBS" in
7893   *-lsecurity*) for ac_func in getprpwnam
7894 do
7895 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7896 echo "configure:7897: checking for $ac_func" >&5
7897 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7898   echo $ac_n "(cached) $ac_c" 1>&6
7899 else
7900   cat > conftest.$ac_ext <<EOF
7901 #line 7902 "configure"
7902 #include "confdefs.h"
7903 /* System header to define __stub macros and hopefully few prototypes,
7904     which can conflict with char $ac_func(); below.  */
7905 #include <assert.h>
7906 /* Override any gcc2 internal prototype to avoid an error.  */
7907 /* We use char because int might match the return type of a gcc2
7908     builtin and then its argument prototype would still apply.  */
7909 char $ac_func();
7910
7911 int main() {
7912
7913 /* The GNU C library defines this for functions which it implements
7914     to always fail with ENOSYS.  Some functions are actually named
7915     something starting with __ and the normal name is an alias.  */
7916 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7917 choke me
7918 #else
7919 $ac_func();
7920 #endif
7921
7922 ; return 0; }
7923 EOF
7924 if { (eval echo configure:7925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7925   rm -rf conftest*
7926   eval "ac_cv_func_$ac_func=yes"
7927 else
7928   echo "configure: failed program was:" >&5
7929   cat conftest.$ac_ext >&5
7930   rm -rf conftest*
7931   eval "ac_cv_func_$ac_func=no"
7932 fi
7933 rm -f conftest*
7934 fi
7935
7936 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7937   echo "$ac_t""yes" 1>&6
7938     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7939   cat >> confdefs.h <<EOF
7940 #define $ac_tr_func 1
7941 EOF
7942  
7943 else
7944   echo "$ac_t""no" 1>&6
7945 fi
7946 done
7947  ;;
7948   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
7949 echo "configure:7950: checking for getprpwnam in -lsecurity" >&5
7950 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
7951 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7952   echo $ac_n "(cached) $ac_c" 1>&6
7953 else
7954   ac_save_LIBS="$LIBS"
7955 LIBS="-lsecurity  $LIBS"
7956 cat > conftest.$ac_ext <<EOF
7957 #line 7958 "configure"
7958 #include "confdefs.h"
7959 /* Override any gcc2 internal prototype to avoid an error.  */
7960 /* We use char because int might match the return type of a gcc2
7961     builtin and then its argument prototype would still apply.  */
7962 char getprpwnam();
7963
7964 int main() {
7965 getprpwnam()
7966 ; return 0; }
7967 EOF
7968 if { (eval echo configure:7969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7969   rm -rf conftest*
7970   eval "ac_cv_lib_$ac_lib_var=yes"
7971 else
7972   echo "configure: failed program was:" >&5
7973   cat conftest.$ac_ext >&5
7974   rm -rf conftest*
7975   eval "ac_cv_lib_$ac_lib_var=no"
7976 fi
7977 rm -f conftest*
7978 LIBS="$ac_save_LIBS"
7979
7980 fi
7981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7982   echo "$ac_t""yes" 1>&6
7983     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7984     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7985   cat >> confdefs.h <<EOF
7986 #define $ac_tr_lib 1
7987 EOF
7988
7989   LIBS="-lsecurity $LIBS"
7990
7991 else
7992   echo "$ac_t""no" 1>&6
7993 fi
7994  
7995      for ac_func in getprpwnam
7996 do
7997 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7998 echo "configure:7999: checking for $ac_func" >&5
7999 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8000   echo $ac_n "(cached) $ac_c" 1>&6
8001 else
8002   cat > conftest.$ac_ext <<EOF
8003 #line 8004 "configure"
8004 #include "confdefs.h"
8005 /* System header to define __stub macros and hopefully few prototypes,
8006     which can conflict with char $ac_func(); below.  */
8007 #include <assert.h>
8008 /* Override any gcc2 internal prototype to avoid an error.  */
8009 /* We use char because int might match the return type of a gcc2
8010     builtin and then its argument prototype would still apply.  */
8011 char $ac_func();
8012
8013 int main() {
8014
8015 /* The GNU C library defines this for functions which it implements
8016     to always fail with ENOSYS.  Some functions are actually named
8017     something starting with __ and the normal name is an alias.  */
8018 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8019 choke me
8020 #else
8021 $ac_func();
8022 #endif
8023
8024 ; return 0; }
8025 EOF
8026 if { (eval echo configure:8027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8027   rm -rf conftest*
8028   eval "ac_cv_func_$ac_func=yes"
8029 else
8030   echo "configure: failed program was:" >&5
8031   cat conftest.$ac_ext >&5
8032   rm -rf conftest*
8033   eval "ac_cv_func_$ac_func=no"
8034 fi
8035 rm -f conftest*
8036 fi
8037
8038 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8039   echo "$ac_t""yes" 1>&6
8040     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8041   cat >> confdefs.h <<EOF
8042 #define $ac_tr_func 1
8043 EOF
8044  
8045 else
8046   echo "$ac_t""no" 1>&6
8047 fi
8048 done
8049
8050   ;;
8051   esac
8052
8053 case "$LIBS" in
8054   *-lsec*) for ac_func in getprpwnam
8055 do
8056 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8057 echo "configure:8058: checking for $ac_func" >&5
8058 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8059   echo $ac_n "(cached) $ac_c" 1>&6
8060 else
8061   cat > conftest.$ac_ext <<EOF
8062 #line 8063 "configure"
8063 #include "confdefs.h"
8064 /* System header to define __stub macros and hopefully few prototypes,
8065     which can conflict with char $ac_func(); below.  */
8066 #include <assert.h>
8067 /* Override any gcc2 internal prototype to avoid an error.  */
8068 /* We use char because int might match the return type of a gcc2
8069     builtin and then its argument prototype would still apply.  */
8070 char $ac_func();
8071
8072 int main() {
8073
8074 /* The GNU C library defines this for functions which it implements
8075     to always fail with ENOSYS.  Some functions are actually named
8076     something starting with __ and the normal name is an alias.  */
8077 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8078 choke me
8079 #else
8080 $ac_func();
8081 #endif
8082
8083 ; return 0; }
8084 EOF
8085 if { (eval echo configure:8086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8086   rm -rf conftest*
8087   eval "ac_cv_func_$ac_func=yes"
8088 else
8089   echo "configure: failed program was:" >&5
8090   cat conftest.$ac_ext >&5
8091   rm -rf conftest*
8092   eval "ac_cv_func_$ac_func=no"
8093 fi
8094 rm -f conftest*
8095 fi
8096
8097 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8098   echo "$ac_t""yes" 1>&6
8099     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8100   cat >> confdefs.h <<EOF
8101 #define $ac_tr_func 1
8102 EOF
8103  
8104 else
8105   echo "$ac_t""no" 1>&6
8106 fi
8107 done
8108  ;;
8109   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8110 echo "configure:8111: checking for getprpwnam in -lsec" >&5
8111 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8112 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8113   echo $ac_n "(cached) $ac_c" 1>&6
8114 else
8115   ac_save_LIBS="$LIBS"
8116 LIBS="-lsec  $LIBS"
8117 cat > conftest.$ac_ext <<EOF
8118 #line 8119 "configure"
8119 #include "confdefs.h"
8120 /* Override any gcc2 internal prototype to avoid an error.  */
8121 /* We use char because int might match the return type of a gcc2
8122     builtin and then its argument prototype would still apply.  */
8123 char getprpwnam();
8124
8125 int main() {
8126 getprpwnam()
8127 ; return 0; }
8128 EOF
8129 if { (eval echo configure:8130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8130   rm -rf conftest*
8131   eval "ac_cv_lib_$ac_lib_var=yes"
8132 else
8133   echo "configure: failed program was:" >&5
8134   cat conftest.$ac_ext >&5
8135   rm -rf conftest*
8136   eval "ac_cv_lib_$ac_lib_var=no"
8137 fi
8138 rm -f conftest*
8139 LIBS="$ac_save_LIBS"
8140
8141 fi
8142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8143   echo "$ac_t""yes" 1>&6
8144     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8145     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8146   cat >> confdefs.h <<EOF
8147 #define $ac_tr_lib 1
8148 EOF
8149
8150   LIBS="-lsec $LIBS"
8151
8152 else
8153   echo "$ac_t""no" 1>&6
8154 fi
8155  
8156      for ac_func in getprpwnam
8157 do
8158 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8159 echo "configure:8160: checking for $ac_func" >&5
8160 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8161   echo $ac_n "(cached) $ac_c" 1>&6
8162 else
8163   cat > conftest.$ac_ext <<EOF
8164 #line 8165 "configure"
8165 #include "confdefs.h"
8166 /* System header to define __stub macros and hopefully few prototypes,
8167     which can conflict with char $ac_func(); below.  */
8168 #include <assert.h>
8169 /* Override any gcc2 internal prototype to avoid an error.  */
8170 /* We use char because int might match the return type of a gcc2
8171     builtin and then its argument prototype would still apply.  */
8172 char $ac_func();
8173
8174 int main() {
8175
8176 /* The GNU C library defines this for functions which it implements
8177     to always fail with ENOSYS.  Some functions are actually named
8178     something starting with __ and the normal name is an alias.  */
8179 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8180 choke me
8181 #else
8182 $ac_func();
8183 #endif
8184
8185 ; return 0; }
8186 EOF
8187 if { (eval echo configure:8188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8188   rm -rf conftest*
8189   eval "ac_cv_func_$ac_func=yes"
8190 else
8191   echo "configure: failed program was:" >&5
8192   cat conftest.$ac_ext >&5
8193   rm -rf conftest*
8194   eval "ac_cv_func_$ac_func=no"
8195 fi
8196 rm -f conftest*
8197 fi
8198
8199 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8200   echo "$ac_t""yes" 1>&6
8201     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8202   cat >> confdefs.h <<EOF
8203 #define $ac_tr_func 1
8204 EOF
8205  
8206 else
8207   echo "$ac_t""no" 1>&6
8208 fi
8209 done
8210
8211   ;;
8212   esac
8213
8214
8215 # this bit needs to be modified for each OS that is suported by
8216 # smbwrapper. You need to specify how to created a shared library and
8217 # how to compile C code to produce PIC object files
8218
8219 # these are the defaults, good for lots of systems
8220 HOST_OS="$host_os"
8221 LDSHFLAGS="-shared"
8222 SHLD="\${CC}"
8223 PICFLAG=""
8224 SHLIBEXT="so"
8225 BLDSHARED="false"
8226
8227 # and these are for particular systems
8228 case "$host_os" in
8229                 *linux*)   cat >> confdefs.h <<\EOF
8230 #define LINUX 1
8231 EOF
8232
8233                         BLDSHARED="true"
8234                         LDSHFLAGS="-shared" 
8235                         PICFLAG="-fPIC"
8236                 ;;
8237                 *solaris*) cat >> confdefs.h <<\EOF
8238 #define SUNOS5 1
8239 EOF
8240
8241                         BLDSHARED="true"
8242                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8243                         PICFLAG="-KPIC -xO4"
8244                 ;;
8245                 *sunos*) cat >> confdefs.h <<\EOF
8246 #define SUNOS4 1
8247 EOF
8248
8249                         BLDSHARED="true"
8250                         LDSHFLAGS="-Wl,-h,\$@ -G"
8251                         PICFLAG="-KPIC -O2"   # Is this correct for SunOS
8252                 ;;
8253                 *bsd*)  BLDSHARED="true"
8254                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8255                         PICFLAG="-fPIC -O2"
8256                 ;;
8257                 *irix*) cat >> confdefs.h <<\EOF
8258 #define IRIX 1
8259 EOF
8260
8261                         case "$host_os" in
8262                         *irix6*) cat >> confdefs.h <<\EOF
8263 #define IRIX6 1
8264 EOF
8265
8266                         ;;
8267                         esac
8268                         ATTEMPT_WRAP32_BUILD=yes
8269                         BLDSHARED="true"
8270                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8271                         PICFLAG="-KPIC"
8272                 ;;
8273                 *aix*) cat >> confdefs.h <<\EOF
8274 #define AIX 1
8275 EOF
8276
8277                         BLDSHARED="true"
8278                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8279                         PICFLAG="-O2 -qmaxmem=6000"
8280                 ;;
8281                 *hpux*) cat >> confdefs.h <<\EOF
8282 #define HPUX 1
8283 EOF
8284
8285                         SHLIBEXT="sl"
8286                         # Use special PIC flags for the native HP-UX compiler.
8287                         if test $ac_cv_prog_cc_Ae = yes; then
8288                                 BLDSHARED="true"
8289                                 LDSHFLAGS="-b -z +h \$@"
8290                                 PICFLAG="+z"
8291                         fi
8292                 ;;
8293                 *qnx*) cat >> confdefs.h <<\EOF
8294 #define QNX 1
8295 EOF
8296 ;;
8297                 *osf*) cat >> confdefs.h <<\EOF
8298 #define OSF1 1
8299 EOF
8300
8301                         BLDSHARED="true"
8302                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8303                         PICFLAG="-fPIC"
8304                 ;;
8305                 *sco*) cat >> confdefs.h <<\EOF
8306 #define SCO 1
8307 EOF
8308 ;;
8309                 *unixware*) cat >> confdefs.h <<\EOF
8310 #define UNIXWARE 1
8311 EOF
8312
8313                         BLDSHARED="true"
8314                 ;;
8315                 *next2*) cat >> confdefs.h <<\EOF
8316 #define NEXT2 1
8317 EOF
8318 ;;
8319                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8320 set dummy groff; ac_word=$2
8321 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8322 echo "configure:8323: checking for $ac_word" >&5
8323 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8324   echo $ac_n "(cached) $ac_c" 1>&6
8325 else
8326   if test -n "$ROFF"; then
8327   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8328 else
8329   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8330   ac_dummy="$PATH"
8331   for ac_dir in $ac_dummy; do
8332     test -z "$ac_dir" && ac_dir=.
8333     if test -f $ac_dir/$ac_word; then
8334       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8335       break
8336     fi
8337   done
8338   IFS="$ac_save_ifs"
8339 fi
8340 fi
8341 ROFF="$ac_cv_prog_ROFF"
8342 if test -n "$ROFF"; then
8343   echo "$ac_t""$ROFF" 1>&6
8344 else
8345   echo "$ac_t""no" 1>&6
8346 fi
8347 ;;
8348                 *sysv4*)
8349                         case "$host" in
8350                                 *-univel-*)     if  test "$GCC" != yes ; then
8351                                                                         cat >> confdefs.h <<\EOF
8352 #define HAVE_MEMSET 1
8353 EOF
8354
8355                                                                 fi
8356                                                                 LDSHFLAGS="-G"
8357                                 ;;
8358                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8359 #define RELIANTUNIX 1
8360 EOF
8361 ;;
8362                         esac
8363                         ;;
8364                 *sysv5*)
8365                         if  test "$GCC" != yes ; then
8366                                 cat >> confdefs.h <<\EOF
8367 #define HAVE_MEMSET 1
8368 EOF
8369
8370                         fi
8371                         LDSHFLAGS="-G"
8372                         ;;
8373 esac
8374
8375 ################
8376
8377 echo $ac_n "checking for long long""... $ac_c" 1>&6
8378 echo "configure:8379: checking for long long" >&5
8379 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8380   echo $ac_n "(cached) $ac_c" 1>&6
8381 else
8382   
8383 if test "$cross_compiling" = yes; then
8384   samba_cv_have_longlong=cross
8385 else
8386   cat > conftest.$ac_ext <<EOF
8387 #line 8388 "configure"
8388 #include "confdefs.h"
8389 #include <stdio.h>
8390 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8391 EOF
8392 if { (eval echo configure:8393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8393 then
8394   samba_cv_have_longlong=yes
8395 else
8396   echo "configure: failed program was:" >&5
8397   cat conftest.$ac_ext >&5
8398   rm -fr conftest*
8399   samba_cv_have_longlong=no
8400 fi
8401 rm -fr conftest*
8402 fi
8403
8404 fi
8405
8406 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8407 if test x"$samba_cv_have_longlong" = x"yes"; then
8408     cat >> confdefs.h <<\EOF
8409 #define HAVE_LONGLONG 1
8410 EOF
8411
8412 fi
8413
8414 #
8415 # Check if the compiler supports the LL prefix on long long integers.
8416 # AIX needs this.
8417
8418 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8419 echo "configure:8420: checking for LL suffix on long long integers" >&5
8420 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8421   echo $ac_n "(cached) $ac_c" 1>&6
8422 else
8423   
8424     cat > conftest.$ac_ext <<EOF
8425 #line 8426 "configure"
8426 #include "confdefs.h"
8427 #include <stdio.h>
8428 int main() {
8429 long long i = 0x8000000000LL
8430 ; return 0; }
8431 EOF
8432 if { (eval echo configure:8433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8433   rm -rf conftest*
8434   samba_cv_compiler_supports_ll=yes
8435 else
8436   echo "configure: failed program was:" >&5
8437   cat conftest.$ac_ext >&5
8438   rm -rf conftest*
8439   samba_cv_compiler_supports_ll=no
8440 fi
8441 rm -f conftest*
8442 fi
8443
8444 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8445 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8446    cat >> confdefs.h <<\EOF
8447 #define COMPILER_SUPPORTS_LL 1
8448 EOF
8449
8450 fi
8451
8452   
8453 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8454 echo "configure:8455: checking for 64 bit off_t" >&5
8455 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8456   echo $ac_n "(cached) $ac_c" 1>&6
8457 else
8458   
8459 if test "$cross_compiling" = yes; then
8460   samba_cv_SIZEOF_OFF_T=cross
8461 else
8462   cat > conftest.$ac_ext <<EOF
8463 #line 8464 "configure"
8464 #include "confdefs.h"
8465 #include <stdio.h>
8466 #include <sys/stat.h>
8467 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8468 EOF
8469 if { (eval echo configure:8470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8470 then
8471   samba_cv_SIZEOF_OFF_T=yes
8472 else
8473   echo "configure: failed program was:" >&5
8474   cat conftest.$ac_ext >&5
8475   rm -fr conftest*
8476   samba_cv_SIZEOF_OFF_T=no
8477 fi
8478 rm -fr conftest*
8479 fi
8480
8481 fi
8482
8483 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8484 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8485     cat >> confdefs.h <<\EOF
8486 #define SIZEOF_OFF_T 8
8487 EOF
8488
8489 fi
8490
8491 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8492 echo "configure:8493: checking for off64_t" >&5
8493 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8494   echo $ac_n "(cached) $ac_c" 1>&6
8495 else
8496   
8497 if test "$cross_compiling" = yes; then
8498   samba_cv_HAVE_OFF64_T=cross
8499 else
8500   cat > conftest.$ac_ext <<EOF
8501 #line 8502 "configure"
8502 #include "confdefs.h"
8503
8504 #if defined(HAVE_UNISTD_H)
8505 #include <unistd.h>
8506 #endif
8507 #include <stdio.h>
8508 #include <sys/stat.h>
8509 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8510 EOF
8511 if { (eval echo configure:8512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8512 then
8513   samba_cv_HAVE_OFF64_T=yes
8514 else
8515   echo "configure: failed program was:" >&5
8516   cat conftest.$ac_ext >&5
8517   rm -fr conftest*
8518   samba_cv_HAVE_OFF64_T=no
8519 fi
8520 rm -fr conftest*
8521 fi
8522
8523 fi
8524
8525 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8526 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8527     cat >> confdefs.h <<\EOF
8528 #define HAVE_OFF64_T 1
8529 EOF
8530
8531 fi
8532
8533 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8534 echo "configure:8535: checking for 64 bit ino_t" >&5
8535 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8536   echo $ac_n "(cached) $ac_c" 1>&6
8537 else
8538   
8539 if test "$cross_compiling" = yes; then
8540   samba_cv_SIZEOF_INO_T=cross
8541 else
8542   cat > conftest.$ac_ext <<EOF
8543 #line 8544 "configure"
8544 #include "confdefs.h"
8545 #include <stdio.h>
8546 #include <sys/stat.h>
8547 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8548 EOF
8549 if { (eval echo configure:8550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8550 then
8551   samba_cv_SIZEOF_INO_T=yes
8552 else
8553   echo "configure: failed program was:" >&5
8554   cat conftest.$ac_ext >&5
8555   rm -fr conftest*
8556   samba_cv_SIZEOF_INO_T=no
8557 fi
8558 rm -fr conftest*
8559 fi
8560
8561 fi
8562
8563 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8564 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8565     cat >> confdefs.h <<\EOF
8566 #define SIZEOF_INO_T 8
8567 EOF
8568
8569 fi
8570
8571 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8572 echo "configure:8573: checking for ino64_t" >&5
8573 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8574   echo $ac_n "(cached) $ac_c" 1>&6
8575 else
8576   
8577 if test "$cross_compiling" = yes; then
8578   samba_cv_HAVE_INO64_T=cross
8579 else
8580   cat > conftest.$ac_ext <<EOF
8581 #line 8582 "configure"
8582 #include "confdefs.h"
8583
8584 #if defined(HAVE_UNISTD_H)
8585 #include <unistd.h>
8586 #endif
8587 #include <stdio.h>
8588 #include <sys/stat.h>
8589 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8590 EOF
8591 if { (eval echo configure:8592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8592 then
8593   samba_cv_HAVE_INO64_T=yes
8594 else
8595   echo "configure: failed program was:" >&5
8596   cat conftest.$ac_ext >&5
8597   rm -fr conftest*
8598   samba_cv_HAVE_INO64_T=no
8599 fi
8600 rm -fr conftest*
8601 fi
8602
8603 fi
8604
8605 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8606 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8607     cat >> confdefs.h <<\EOF
8608 #define HAVE_INO64_T 1
8609 EOF
8610
8611 fi
8612
8613 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8614 echo "configure:8615: checking for struct dirent64" >&5
8615 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8616   echo $ac_n "(cached) $ac_c" 1>&6
8617 else
8618   
8619 cat > conftest.$ac_ext <<EOF
8620 #line 8621 "configure"
8621 #include "confdefs.h"
8622
8623 #if defined(HAVE_UNISTD_H)
8624 #include <unistd.h>
8625 #endif
8626 #include <sys/types.h>
8627 #include <dirent.h>
8628 int main() {
8629 struct dirent64 de;
8630 ; return 0; }
8631 EOF
8632 if { (eval echo configure:8633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8633   rm -rf conftest*
8634   samba_cv_HAVE_STRUCT_DIRENT64=yes
8635 else
8636   echo "configure: failed program was:" >&5
8637   cat conftest.$ac_ext >&5
8638   rm -rf conftest*
8639   samba_cv_HAVE_STRUCT_DIRENT64=no
8640 fi
8641 rm -f conftest*
8642 fi
8643
8644 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8645 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8646     cat >> confdefs.h <<\EOF
8647 #define HAVE_STRUCT_DIRENT64 1
8648 EOF
8649
8650 fi
8651
8652 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8653 echo "configure:8654: checking for unsigned char" >&5
8654 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8655   echo $ac_n "(cached) $ac_c" 1>&6
8656 else
8657   
8658 if test "$cross_compiling" = yes; then
8659   samba_cv_HAVE_UNSIGNED_CHAR=cross
8660 else
8661   cat > conftest.$ac_ext <<EOF
8662 #line 8663 "configure"
8663 #include "confdefs.h"
8664 #include <stdio.h>
8665 main() { char c; c=250; exit((c > 0)?0:1); }
8666 EOF
8667 if { (eval echo configure:8668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8668 then
8669   samba_cv_HAVE_UNSIGNED_CHAR=yes
8670 else
8671   echo "configure: failed program was:" >&5
8672   cat conftest.$ac_ext >&5
8673   rm -fr conftest*
8674   samba_cv_HAVE_UNSIGNED_CHAR=no
8675 fi
8676 rm -fr conftest*
8677 fi
8678
8679 fi
8680
8681 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8682 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8683     cat >> confdefs.h <<\EOF
8684 #define HAVE_UNSIGNED_CHAR 1
8685 EOF
8686
8687 fi
8688
8689 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8690 echo "configure:8691: checking for sin_len in sock" >&5
8691 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8692   echo $ac_n "(cached) $ac_c" 1>&6
8693 else
8694   
8695 cat > conftest.$ac_ext <<EOF
8696 #line 8697 "configure"
8697 #include "confdefs.h"
8698 #include <sys/types.h>
8699 #include <sys/socket.h>
8700 #include <netinet/in.h>
8701 int main() {
8702 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8703 ; return 0; }
8704 EOF
8705 if { (eval echo configure:8706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8706   rm -rf conftest*
8707   samba_cv_HAVE_SOCK_SIN_LEN=yes
8708 else
8709   echo "configure: failed program was:" >&5
8710   cat conftest.$ac_ext >&5
8711   rm -rf conftest*
8712   samba_cv_HAVE_SOCK_SIN_LEN=no
8713 fi
8714 rm -f conftest*
8715 fi
8716
8717 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8718 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8719     cat >> confdefs.h <<\EOF
8720 #define HAVE_SOCK_SIN_LEN 1
8721 EOF
8722
8723 fi
8724
8725 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8726 echo "configure:8727: checking whether seekdir returns void" >&5
8727 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8728   echo $ac_n "(cached) $ac_c" 1>&6
8729 else
8730   
8731 cat > conftest.$ac_ext <<EOF
8732 #line 8733 "configure"
8733 #include "confdefs.h"
8734 #include <sys/types.h>
8735 #include <dirent.h>
8736 void seekdir(DIR *d, long loc) { return; }
8737 int main() {
8738 return 0;
8739 ; return 0; }
8740 EOF
8741 if { (eval echo configure:8742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8742   rm -rf conftest*
8743   samba_cv_SEEKDIR_RETURNS_VOID=yes
8744 else
8745   echo "configure: failed program was:" >&5
8746   cat conftest.$ac_ext >&5
8747   rm -rf conftest*
8748   samba_cv_SEEKDIR_RETURNS_VOID=no
8749 fi
8750 rm -f conftest*
8751 fi
8752
8753 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
8754 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
8755     cat >> confdefs.h <<\EOF
8756 #define SEEKDIR_RETURNS_VOID 1
8757 EOF
8758
8759 fi
8760
8761 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
8762 echo "configure:8763: checking for __FILE__ macro" >&5
8763 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
8764   echo $ac_n "(cached) $ac_c" 1>&6
8765 else
8766   
8767 cat > conftest.$ac_ext <<EOF
8768 #line 8769 "configure"
8769 #include "confdefs.h"
8770 #include <stdio.h>
8771 int main() {
8772 printf("%s\n", __FILE__);
8773 ; return 0; }
8774 EOF
8775 if { (eval echo configure:8776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8776   rm -rf conftest*
8777   samba_cv_HAVE_FILE_MACRO=yes
8778 else
8779   echo "configure: failed program was:" >&5
8780   cat conftest.$ac_ext >&5
8781   rm -rf conftest*
8782   samba_cv_HAVE_FILE_MACRO=no
8783 fi
8784 rm -f conftest*
8785 fi
8786
8787 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
8788 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
8789     cat >> confdefs.h <<\EOF
8790 #define HAVE_FILE_MACRO 1
8791 EOF
8792
8793 fi
8794
8795 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
8796 echo "configure:8797: checking for __FUNCTION__ macro" >&5
8797 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
8798   echo $ac_n "(cached) $ac_c" 1>&6
8799 else
8800   
8801 cat > conftest.$ac_ext <<EOF
8802 #line 8803 "configure"
8803 #include "confdefs.h"
8804 #include <stdio.h>
8805 int main() {
8806 printf("%s\n", __FUNCTION__);
8807 ; return 0; }
8808 EOF
8809 if { (eval echo configure:8810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8810   rm -rf conftest*
8811   samba_cv_HAVE_FUNCTION_MACRO=yes
8812 else
8813   echo "configure: failed program was:" >&5
8814   cat conftest.$ac_ext >&5
8815   rm -rf conftest*
8816   samba_cv_HAVE_FUNCTION_MACRO=no
8817 fi
8818 rm -f conftest*
8819 fi
8820
8821 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
8822 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
8823     cat >> confdefs.h <<\EOF
8824 #define HAVE_FUNCTION_MACRO 1
8825 EOF
8826
8827 fi
8828
8829 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
8830 echo "configure:8831: checking if gettimeofday takes tz argument" >&5
8831 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
8832   echo $ac_n "(cached) $ac_c" 1>&6
8833 else
8834   
8835 if test "$cross_compiling" = yes; then
8836   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
8837 else
8838   cat > conftest.$ac_ext <<EOF
8839 #line 8840 "configure"
8840 #include "confdefs.h"
8841
8842 #include <sys/time.h>
8843 #include <unistd.h>
8844 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
8845 EOF
8846 if { (eval echo configure:8847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8847 then
8848   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
8849 else
8850   echo "configure: failed program was:" >&5
8851   cat conftest.$ac_ext >&5
8852   rm -fr conftest*
8853   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
8854 fi
8855 rm -fr conftest*
8856 fi
8857
8858 fi
8859
8860 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
8861 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
8862     cat >> confdefs.h <<\EOF
8863 #define HAVE_GETTIMEOFDAY_TZ 1
8864 EOF
8865
8866 fi
8867
8868 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
8869 echo "configure:8870: checking for C99 vsnprintf" >&5
8870 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
8871   echo $ac_n "(cached) $ac_c" 1>&6
8872 else
8873   
8874 if test "$cross_compiling" = yes; then
8875   samba_cv_HAVE_C99_VSNPRINTF=cross
8876 else
8877   cat > conftest.$ac_ext <<EOF
8878 #line 8879 "configure"
8879 #include "confdefs.h"
8880
8881 #include <sys/types.h>
8882 #include <stdarg.h>
8883 void foo(const char *format, ...) { 
8884        va_list ap;
8885        int len;
8886        char buf[5];
8887
8888        va_start(ap, format);
8889        len = vsnprintf(0, 0, format, ap);
8890        va_end(ap);
8891        if (len != 5) exit(1);
8892
8893        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
8894
8895        exit(0);
8896 }
8897 main() { foo("hello"); }
8898
8899 EOF
8900 if { (eval echo configure:8901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8901 then
8902   samba_cv_HAVE_C99_VSNPRINTF=yes
8903 else
8904   echo "configure: failed program was:" >&5
8905   cat conftest.$ac_ext >&5
8906   rm -fr conftest*
8907   samba_cv_HAVE_C99_VSNPRINTF=no
8908 fi
8909 rm -fr conftest*
8910 fi
8911
8912 fi
8913
8914 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
8915 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
8916     cat >> confdefs.h <<\EOF
8917 #define HAVE_C99_VSNPRINTF 1
8918 EOF
8919
8920 fi
8921
8922 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
8923 echo "configure:8924: checking for broken readdir" >&5
8924 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
8925   echo $ac_n "(cached) $ac_c" 1>&6
8926 else
8927   
8928 if test "$cross_compiling" = yes; then
8929   samba_cv_HAVE_BROKEN_READDIR=cross
8930 else
8931   cat > conftest.$ac_ext <<EOF
8932 #line 8933 "configure"
8933 #include "confdefs.h"
8934 #include <sys/types.h>
8935 #include <dirent.h>
8936 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
8937 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
8938 di->d_name[0] == 0) exit(0); exit(1);} 
8939 EOF
8940 if { (eval echo configure:8941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8941 then
8942   samba_cv_HAVE_BROKEN_READDIR=yes
8943 else
8944   echo "configure: failed program was:" >&5
8945   cat conftest.$ac_ext >&5
8946   rm -fr conftest*
8947   samba_cv_HAVE_BROKEN_READDIR=no
8948 fi
8949 rm -fr conftest*
8950 fi
8951
8952 fi
8953
8954 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
8955 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
8956     cat >> confdefs.h <<\EOF
8957 #define HAVE_BROKEN_READDIR 1
8958 EOF
8959
8960 fi
8961
8962 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
8963 echo "configure:8964: checking for utimbuf" >&5
8964 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
8965   echo $ac_n "(cached) $ac_c" 1>&6
8966 else
8967   
8968 cat > conftest.$ac_ext <<EOF
8969 #line 8970 "configure"
8970 #include "confdefs.h"
8971 #include <sys/types.h>
8972 #include <utime.h>
8973 int main() {
8974 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
8975 ; return 0; }
8976 EOF
8977 if { (eval echo configure:8978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8978   rm -rf conftest*
8979   samba_cv_HAVE_UTIMBUF=yes
8980 else
8981   echo "configure: failed program was:" >&5
8982   cat conftest.$ac_ext >&5
8983   rm -rf conftest*
8984   samba_cv_HAVE_UTIMBUF=no
8985 fi
8986 rm -f conftest*
8987 fi
8988
8989 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
8990 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
8991     cat >> confdefs.h <<\EOF
8992 #define HAVE_UTIMBUF 1
8993 EOF
8994
8995 fi
8996
8997
8998 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
8999 do
9000 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9001 echo "configure:9002: checking for $ac_func" >&5
9002 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9003   echo $ac_n "(cached) $ac_c" 1>&6
9004 else
9005   cat > conftest.$ac_ext <<EOF
9006 #line 9007 "configure"
9007 #include "confdefs.h"
9008 /* System header to define __stub macros and hopefully few prototypes,
9009     which can conflict with char $ac_func(); below.  */
9010 #include <assert.h>
9011 /* Override any gcc2 internal prototype to avoid an error.  */
9012 /* We use char because int might match the return type of a gcc2
9013     builtin and then its argument prototype would still apply.  */
9014 char $ac_func();
9015
9016 int main() {
9017
9018 /* The GNU C library defines this for functions which it implements
9019     to always fail with ENOSYS.  Some functions are actually named
9020     something starting with __ and the normal name is an alias.  */
9021 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9022 choke me
9023 #else
9024 $ac_func();
9025 #endif
9026
9027 ; return 0; }
9028 EOF
9029 if { (eval echo configure:9030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9030   rm -rf conftest*
9031   eval "ac_cv_func_$ac_func=yes"
9032 else
9033   echo "configure: failed program was:" >&5
9034   cat conftest.$ac_ext >&5
9035   rm -rf conftest*
9036   eval "ac_cv_func_$ac_func=no"
9037 fi
9038 rm -f conftest*
9039 fi
9040
9041 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9042   echo "$ac_t""yes" 1>&6
9043     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9044   cat >> confdefs.h <<EOF
9045 #define $ac_tr_func 1
9046 EOF
9047  
9048 else
9049   echo "$ac_t""no" 1>&6
9050 fi
9051 done
9052
9053
9054 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9055 echo "configure:9056: checking for ut_name in utmp" >&5
9056 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9057   echo $ac_n "(cached) $ac_c" 1>&6
9058 else
9059   
9060 cat > conftest.$ac_ext <<EOF
9061 #line 9062 "configure"
9062 #include "confdefs.h"
9063 #include <sys/types.h>
9064 #include <utmp.h>
9065 int main() {
9066 struct utmp ut;  ut.ut_name[0] = 'a';
9067 ; return 0; }
9068 EOF
9069 if { (eval echo configure:9070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9070   rm -rf conftest*
9071   samba_cv_HAVE_UT_UT_NAME=yes
9072 else
9073   echo "configure: failed program was:" >&5
9074   cat conftest.$ac_ext >&5
9075   rm -rf conftest*
9076   samba_cv_HAVE_UT_UT_NAME=no
9077 fi
9078 rm -f conftest*
9079 fi
9080
9081 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9082 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9083     cat >> confdefs.h <<\EOF
9084 #define HAVE_UT_UT_NAME 1
9085 EOF
9086
9087 fi 
9088
9089 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9090 echo "configure:9091: checking for ut_user in utmp" >&5
9091 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9092   echo $ac_n "(cached) $ac_c" 1>&6
9093 else
9094   
9095 cat > conftest.$ac_ext <<EOF
9096 #line 9097 "configure"
9097 #include "confdefs.h"
9098 #include <sys/types.h>
9099 #include <utmp.h>
9100 int main() {
9101 struct utmp ut;  ut.ut_user[0] = 'a';
9102 ; return 0; }
9103 EOF
9104 if { (eval echo configure:9105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9105   rm -rf conftest*
9106   samba_cv_HAVE_UT_UT_USER=yes
9107 else
9108   echo "configure: failed program was:" >&5
9109   cat conftest.$ac_ext >&5
9110   rm -rf conftest*
9111   samba_cv_HAVE_UT_UT_USER=no
9112 fi
9113 rm -f conftest*
9114 fi
9115
9116 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9117 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9118     cat >> confdefs.h <<\EOF
9119 #define HAVE_UT_UT_USER 1
9120 EOF
9121
9122 fi 
9123
9124 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9125 echo "configure:9126: checking for ut_id in utmp" >&5
9126 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9127   echo $ac_n "(cached) $ac_c" 1>&6
9128 else
9129   
9130 cat > conftest.$ac_ext <<EOF
9131 #line 9132 "configure"
9132 #include "confdefs.h"
9133 #include <sys/types.h>
9134 #include <utmp.h>
9135 int main() {
9136 struct utmp ut;  ut.ut_id[0] = 'a';
9137 ; return 0; }
9138 EOF
9139 if { (eval echo configure:9140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9140   rm -rf conftest*
9141   samba_cv_HAVE_UT_UT_ID=yes
9142 else
9143   echo "configure: failed program was:" >&5
9144   cat conftest.$ac_ext >&5
9145   rm -rf conftest*
9146   samba_cv_HAVE_UT_UT_ID=no
9147 fi
9148 rm -f conftest*
9149 fi
9150
9151 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9152 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9153     cat >> confdefs.h <<\EOF
9154 #define HAVE_UT_UT_ID 1
9155 EOF
9156
9157 fi 
9158
9159 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9160 echo "configure:9161: checking for ut_host in utmp" >&5
9161 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9162   echo $ac_n "(cached) $ac_c" 1>&6
9163 else
9164   
9165 cat > conftest.$ac_ext <<EOF
9166 #line 9167 "configure"
9167 #include "confdefs.h"
9168 #include <sys/types.h>
9169 #include <utmp.h>
9170 int main() {
9171 struct utmp ut;  ut.ut_host[0] = 'a';
9172 ; return 0; }
9173 EOF
9174 if { (eval echo configure:9175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9175   rm -rf conftest*
9176   samba_cv_HAVE_UT_UT_HOST=yes
9177 else
9178   echo "configure: failed program was:" >&5
9179   cat conftest.$ac_ext >&5
9180   rm -rf conftest*
9181   samba_cv_HAVE_UT_UT_HOST=no
9182 fi
9183 rm -f conftest*
9184 fi
9185
9186 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9187 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9188     cat >> confdefs.h <<\EOF
9189 #define HAVE_UT_UT_HOST 1
9190 EOF
9191
9192 fi 
9193
9194 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9195 echo "configure:9196: checking for ut_time in utmp" >&5
9196 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9197   echo $ac_n "(cached) $ac_c" 1>&6
9198 else
9199   
9200 cat > conftest.$ac_ext <<EOF
9201 #line 9202 "configure"
9202 #include "confdefs.h"
9203 #include <sys/types.h>
9204 #include <utmp.h>
9205 int main() {
9206 struct utmp ut;  time_t t; ut.ut_time = t;
9207 ; return 0; }
9208 EOF
9209 if { (eval echo configure:9210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9210   rm -rf conftest*
9211   samba_cv_HAVE_UT_UT_TIME=yes
9212 else
9213   echo "configure: failed program was:" >&5
9214   cat conftest.$ac_ext >&5
9215   rm -rf conftest*
9216   samba_cv_HAVE_UT_UT_TIME=no
9217 fi
9218 rm -f conftest*
9219 fi
9220
9221 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9222 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9223     cat >> confdefs.h <<\EOF
9224 #define HAVE_UT_UT_TIME 1
9225 EOF
9226
9227 fi 
9228
9229 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9230 echo "configure:9231: checking for ut_tv in utmp" >&5
9231 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9232   echo $ac_n "(cached) $ac_c" 1>&6
9233 else
9234   
9235 cat > conftest.$ac_ext <<EOF
9236 #line 9237 "configure"
9237 #include "confdefs.h"
9238 #include <sys/types.h>
9239 #include <utmp.h>
9240 int main() {
9241 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9242 ; return 0; }
9243 EOF
9244 if { (eval echo configure:9245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9245   rm -rf conftest*
9246   samba_cv_HAVE_UT_UT_TV=yes
9247 else
9248   echo "configure: failed program was:" >&5
9249   cat conftest.$ac_ext >&5
9250   rm -rf conftest*
9251   samba_cv_HAVE_UT_UT_TV=no
9252 fi
9253 rm -f conftest*
9254 fi
9255
9256 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9257 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9258     cat >> confdefs.h <<\EOF
9259 #define HAVE_UT_UT_TV 1
9260 EOF
9261
9262 fi 
9263
9264 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9265 echo "configure:9266: checking for ut_type in utmp" >&5
9266 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9267   echo $ac_n "(cached) $ac_c" 1>&6
9268 else
9269   
9270 cat > conftest.$ac_ext <<EOF
9271 #line 9272 "configure"
9272 #include "confdefs.h"
9273 #include <sys/types.h>
9274 #include <utmp.h>
9275 int main() {
9276 struct utmp ut;  ut.ut_type = 0;
9277 ; return 0; }
9278 EOF
9279 if { (eval echo configure:9280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9280   rm -rf conftest*
9281   samba_cv_HAVE_UT_UT_TYPE=yes
9282 else
9283   echo "configure: failed program was:" >&5
9284   cat conftest.$ac_ext >&5
9285   rm -rf conftest*
9286   samba_cv_HAVE_UT_UT_TYPE=no
9287 fi
9288 rm -f conftest*
9289 fi
9290
9291 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9292 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9293     cat >> confdefs.h <<\EOF
9294 #define HAVE_UT_UT_TYPE 1
9295 EOF
9296
9297 fi 
9298
9299 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9300 echo "configure:9301: checking for ut_pid in utmp" >&5
9301 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9302   echo $ac_n "(cached) $ac_c" 1>&6
9303 else
9304   
9305 cat > conftest.$ac_ext <<EOF
9306 #line 9307 "configure"
9307 #include "confdefs.h"
9308 #include <sys/types.h>
9309 #include <utmp.h>
9310 int main() {
9311 struct utmp ut;  ut.ut_pid = 0;
9312 ; return 0; }
9313 EOF
9314 if { (eval echo configure:9315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9315   rm -rf conftest*
9316   samba_cv_HAVE_UT_UT_PID=yes
9317 else
9318   echo "configure: failed program was:" >&5
9319   cat conftest.$ac_ext >&5
9320   rm -rf conftest*
9321   samba_cv_HAVE_UT_UT_PID=no
9322 fi
9323 rm -f conftest*
9324 fi
9325
9326 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9327 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9328     cat >> confdefs.h <<\EOF
9329 #define HAVE_UT_UT_PID 1
9330 EOF
9331
9332 fi 
9333
9334 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9335 echo "configure:9336: checking for ut_exit in utmp" >&5
9336 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9337   echo $ac_n "(cached) $ac_c" 1>&6
9338 else
9339   
9340 cat > conftest.$ac_ext <<EOF
9341 #line 9342 "configure"
9342 #include "confdefs.h"
9343 #include <sys/types.h>
9344 #include <utmp.h>
9345 int main() {
9346 struct utmp ut;  ut.ut_exit.e_exit = 0;
9347 ; return 0; }
9348 EOF
9349 if { (eval echo configure:9350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9350   rm -rf conftest*
9351   samba_cv_HAVE_UT_UT_EXIT=yes
9352 else
9353   echo "configure: failed program was:" >&5
9354   cat conftest.$ac_ext >&5
9355   rm -rf conftest*
9356   samba_cv_HAVE_UT_UT_EXIT=no
9357 fi
9358 rm -f conftest*
9359 fi
9360
9361 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9362 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9363     cat >> confdefs.h <<\EOF
9364 #define HAVE_UT_UT_EXIT 1
9365 EOF
9366
9367 fi 
9368
9369 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9370 echo "configure:9371: checking for ut_addr in utmp" >&5
9371 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9372   echo $ac_n "(cached) $ac_c" 1>&6
9373 else
9374   
9375 cat > conftest.$ac_ext <<EOF
9376 #line 9377 "configure"
9377 #include "confdefs.h"
9378 #include <sys/types.h>
9379 #include <utmp.h>
9380 int main() {
9381 struct utmp ut;  ut.ut_addr = 0;
9382 ; return 0; }
9383 EOF
9384 if { (eval echo configure:9385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9385   rm -rf conftest*
9386   samba_cv_HAVE_UT_UT_ADDR=yes
9387 else
9388   echo "configure: failed program was:" >&5
9389   cat conftest.$ac_ext >&5
9390   rm -rf conftest*
9391   samba_cv_HAVE_UT_UT_ADDR=no
9392 fi
9393 rm -f conftest*
9394 fi
9395
9396 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9397 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9398     cat >> confdefs.h <<\EOF
9399 #define HAVE_UT_UT_ADDR 1
9400 EOF
9401
9402 fi 
9403
9404 if test x$ac_cv_func_pututline = xyes ; then
9405   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9406 echo "configure:9407: checking whether pututline returns pointer" >&5
9407 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9408   echo $ac_n "(cached) $ac_c" 1>&6
9409 else
9410   
9411   cat > conftest.$ac_ext <<EOF
9412 #line 9413 "configure"
9413 #include "confdefs.h"
9414 #include <sys/types.h>
9415 #include <utmp.h>
9416 int main() {
9417 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9418 ; return 0; }
9419 EOF
9420 if { (eval echo configure:9421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9421   rm -rf conftest*
9422   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9423 else
9424   echo "configure: failed program was:" >&5
9425   cat conftest.$ac_ext >&5
9426   rm -rf conftest*
9427   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9428 fi
9429 rm -f conftest*
9430 fi
9431
9432 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9433   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9434       cat >> confdefs.h <<\EOF
9435 #define PUTUTLINE_RETURNS_UTMP 1
9436 EOF
9437
9438   fi
9439 fi
9440
9441 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9442 echo "configure:9443: checking for ut_syslen in utmpx" >&5
9443 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9444   echo $ac_n "(cached) $ac_c" 1>&6
9445 else
9446   
9447 cat > conftest.$ac_ext <<EOF
9448 #line 9449 "configure"
9449 #include "confdefs.h"
9450 #include <sys/types.h>
9451 #include <utmpx.h>
9452 int main() {
9453 struct utmpx ux;  ux.ut_syslen = 0;
9454 ; return 0; }
9455 EOF
9456 if { (eval echo configure:9457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9457   rm -rf conftest*
9458   samba_cv_HAVE_UX_UT_SYSLEN=yes
9459 else
9460   echo "configure: failed program was:" >&5
9461   cat conftest.$ac_ext >&5
9462   rm -rf conftest*
9463   samba_cv_HAVE_UX_UT_SYSLEN=no
9464 fi
9465 rm -f conftest*
9466 fi
9467
9468 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9469 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9470     cat >> confdefs.h <<\EOF
9471 #define HAVE_UX_UT_SYSLEN 1
9472 EOF
9473
9474 fi 
9475
9476 ############
9477 # check for iconv in libc, and if not then we build our own
9478 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9479 echo "configure:9480: checking for working iconv" >&5
9480 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9481   echo $ac_n "(cached) $ac_c" 1>&6
9482 else
9483   
9484 if test "$cross_compiling" = yes; then
9485   samba_cv_HAVE_NATIVE_ICONV=cross
9486 else
9487   cat > conftest.$ac_ext <<EOF
9488 #line 9489 "configure"
9489 #include "confdefs.h"
9490
9491 #include <iconv.h>
9492 main() {
9493        iconv_t cd = iconv_open("ASCII", "UCS2");
9494        if (cd == 0 || cd == (iconv_t)-1) return -1;
9495        return 0;
9496 }
9497
9498 EOF
9499 if { (eval echo configure:9500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9500 then
9501   samba_cv_HAVE_NATIVE_ICONV=yes
9502 else
9503   echo "configure: failed program was:" >&5
9504   cat conftest.$ac_ext >&5
9505   rm -fr conftest*
9506   samba_cv_HAVE_NATIVE_ICONV=no
9507 fi
9508 rm -fr conftest*
9509 fi
9510
9511 fi
9512
9513 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9514 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9515     cat >> confdefs.h <<\EOF
9516 #define HAVE_NATIVE_ICONV 1
9517 EOF
9518
9519 fi
9520
9521
9522 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9523 echo "configure:9524: checking for Linux kernel oplocks" >&5
9524 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9525   echo $ac_n "(cached) $ac_c" 1>&6
9526 else
9527   
9528 if test "$cross_compiling" = yes; then
9529   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9530 else
9531   cat > conftest.$ac_ext <<EOF
9532 #line 9533 "configure"
9533 #include "confdefs.h"
9534
9535 #include <sys/types.h>
9536 #include <fcntl.h>
9537 #ifndef F_GETLEASE
9538 #define F_GETLEASE      1025
9539 #endif
9540 main() {
9541        int fd = open("/dev/null", O_RDONLY);
9542        return fcntl(fd, F_GETLEASE, 0) == -1;
9543 }
9544
9545 EOF
9546 if { (eval echo configure:9547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9547 then
9548   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9549 else
9550   echo "configure: failed program was:" >&5
9551   cat conftest.$ac_ext >&5
9552   rm -fr conftest*
9553   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9554 fi
9555 rm -fr conftest*
9556 fi
9557
9558 fi
9559
9560 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9561 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9562     cat >> confdefs.h <<\EOF
9563 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9564 EOF
9565
9566 fi
9567
9568 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9569 echo "configure:9570: checking for kernel change notify support" >&5
9570 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9571   echo $ac_n "(cached) $ac_c" 1>&6
9572 else
9573   
9574 if test "$cross_compiling" = yes; then
9575   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9576 else
9577   cat > conftest.$ac_ext <<EOF
9578 #line 9579 "configure"
9579 #include "confdefs.h"
9580
9581 #include <sys/types.h>
9582 #include <fcntl.h>
9583 #include <signal.h>
9584 #ifndef F_NOTIFY
9585 #define F_NOTIFY 1026
9586 #endif
9587 main() {
9588         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9589 }
9590
9591 EOF
9592 if { (eval echo configure:9593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9593 then
9594   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9595 else
9596   echo "configure: failed program was:" >&5
9597   cat conftest.$ac_ext >&5
9598   rm -fr conftest*
9599   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9600 fi
9601 rm -fr conftest*
9602 fi
9603
9604 fi
9605
9606 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9607 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9608     cat >> confdefs.h <<\EOF
9609 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9610 EOF
9611
9612 fi
9613
9614 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9615 echo "configure:9616: checking for kernel share modes" >&5
9616 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9617   echo $ac_n "(cached) $ac_c" 1>&6
9618 else
9619   
9620 if test "$cross_compiling" = yes; then
9621   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9622 else
9623   cat > conftest.$ac_ext <<EOF
9624 #line 9625 "configure"
9625 #include "confdefs.h"
9626
9627 #include <sys/types.h>
9628 #include <fcntl.h>
9629 #include <signal.h>
9630 #include <sys/file.h>
9631 #ifndef LOCK_MAND
9632 #define LOCK_MAND       32
9633 #define LOCK_READ       64
9634 #endif
9635 main() {
9636         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9637 }
9638
9639 EOF
9640 if { (eval echo configure:9641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9641 then
9642   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9643 else
9644   echo "configure: failed program was:" >&5
9645   cat conftest.$ac_ext >&5
9646   rm -fr conftest*
9647   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9648 fi
9649 rm -fr conftest*
9650 fi
9651
9652 fi
9653
9654 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
9655 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
9656     cat >> confdefs.h <<\EOF
9657 #define HAVE_KERNEL_SHARE_MODES 1
9658 EOF
9659
9660 fi
9661
9662
9663
9664
9665 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
9666 echo "configure:9667: checking for IRIX kernel oplock type definitions" >&5
9667 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
9668   echo $ac_n "(cached) $ac_c" 1>&6
9669 else
9670   
9671 cat > conftest.$ac_ext <<EOF
9672 #line 9673 "configure"
9673 #include "confdefs.h"
9674 #include <sys/types.h>
9675 #include <fcntl.h>
9676 int main() {
9677 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
9678 ; return 0; }
9679 EOF
9680 if { (eval echo configure:9681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9681   rm -rf conftest*
9682   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
9683 else
9684   echo "configure: failed program was:" >&5
9685   cat conftest.$ac_ext >&5
9686   rm -rf conftest*
9687   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
9688 fi
9689 rm -f conftest*
9690 fi
9691
9692 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
9693 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
9694     cat >> confdefs.h <<\EOF
9695 #define HAVE_KERNEL_OPLOCKS_IRIX 1
9696 EOF
9697
9698 fi
9699
9700 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
9701 echo "configure:9702: checking for irix specific capabilities" >&5
9702 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
9703   echo $ac_n "(cached) $ac_c" 1>&6
9704 else
9705   
9706 if test "$cross_compiling" = yes; then
9707   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
9708 else
9709   cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712 #include <sys/types.h>
9713 #include <sys/capability.h>
9714 main() {
9715  cap_t cap;
9716  if ((cap = cap_get_proc()) == NULL)
9717    exit(1);
9718  cap->cap_effective |= CAP_NETWORK_MGT;
9719  cap->cap_inheritable |= CAP_NETWORK_MGT;
9720  cap_set_proc(cap);
9721  exit(0);
9722 }
9723
9724 EOF
9725 if { (eval echo configure:9726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9726 then
9727   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
9728 else
9729   echo "configure: failed program was:" >&5
9730   cat conftest.$ac_ext >&5
9731   rm -fr conftest*
9732   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
9733 fi
9734 rm -fr conftest*
9735 fi
9736
9737 fi
9738
9739 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
9740 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
9741     cat >> confdefs.h <<\EOF
9742 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
9743 EOF
9744
9745 fi
9746
9747 #
9748 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
9749 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
9750 #
9751
9752 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9753 echo "configure:9754: checking for int16 typedef included by rpc/rpc.h" >&5
9754 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9755   echo $ac_n "(cached) $ac_c" 1>&6
9756 else
9757   
9758 cat > conftest.$ac_ext <<EOF
9759 #line 9760 "configure"
9760 #include "confdefs.h"
9761 #include <sys/types.h>
9762 #if defined(HAVE_RPC_RPC_H)
9763 #include <rpc/rpc.h>
9764 #endif
9765 int main() {
9766 int16 testvar;
9767 ; return 0; }
9768 EOF
9769 if { (eval echo configure:9770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9770   rm -rf conftest*
9771   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
9772 else
9773   echo "configure: failed program was:" >&5
9774   cat conftest.$ac_ext >&5
9775   rm -rf conftest*
9776   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
9777 fi
9778 rm -f conftest*
9779 fi
9780
9781 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
9782 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
9783     cat >> confdefs.h <<\EOF
9784 #define HAVE_INT16_FROM_RPC_RPC_H 1
9785 EOF
9786
9787 fi
9788
9789 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9790 echo "configure:9791: checking for uint16 typedef included by rpc/rpc.h" >&5
9791 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9792   echo $ac_n "(cached) $ac_c" 1>&6
9793 else
9794   
9795 cat > conftest.$ac_ext <<EOF
9796 #line 9797 "configure"
9797 #include "confdefs.h"
9798 #include <sys/types.h>
9799 #if defined(HAVE_RPC_RPC_H)
9800 #include <rpc/rpc.h>
9801 #endif
9802 int main() {
9803 uint16 testvar;
9804 ; return 0; }
9805 EOF
9806 if { (eval echo configure:9807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9807   rm -rf conftest*
9808   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
9809 else
9810   echo "configure: failed program was:" >&5
9811   cat conftest.$ac_ext >&5
9812   rm -rf conftest*
9813   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
9814 fi
9815 rm -f conftest*
9816 fi
9817
9818 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
9819 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
9820     cat >> confdefs.h <<\EOF
9821 #define HAVE_UINT16_FROM_RPC_RPC_H 1
9822 EOF
9823
9824 fi
9825
9826 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9827 echo "configure:9828: checking for int32 typedef included by rpc/rpc.h" >&5
9828 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
9829   echo $ac_n "(cached) $ac_c" 1>&6
9830 else
9831   
9832 cat > conftest.$ac_ext <<EOF
9833 #line 9834 "configure"
9834 #include "confdefs.h"
9835 #include <sys/types.h>
9836 #if defined(HAVE_RPC_RPC_H)
9837 #include <rpc/rpc.h>
9838 #endif
9839 int main() {
9840 int32 testvar;
9841 ; return 0; }
9842 EOF
9843 if { (eval echo configure:9844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9844   rm -rf conftest*
9845   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
9846 else
9847   echo "configure: failed program was:" >&5
9848   cat conftest.$ac_ext >&5
9849   rm -rf conftest*
9850   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
9851 fi
9852 rm -f conftest*
9853 fi
9854
9855 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
9856 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
9857     cat >> confdefs.h <<\EOF
9858 #define HAVE_INT32_FROM_RPC_RPC_H 1
9859 EOF
9860
9861 fi
9862
9863 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9864 echo "configure:9865: checking for uint32 typedef included by rpc/rpc.h" >&5
9865 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
9866   echo $ac_n "(cached) $ac_c" 1>&6
9867 else
9868   
9869 cat > conftest.$ac_ext <<EOF
9870 #line 9871 "configure"
9871 #include "confdefs.h"
9872 #include <sys/types.h>
9873 #if defined(HAVE_RPC_RPC_H)
9874 #include <rpc/rpc.h>
9875 #endif
9876 int main() {
9877 uint32 testvar;
9878 ; return 0; }
9879 EOF
9880 if { (eval echo configure:9881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9881   rm -rf conftest*
9882   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
9883 else
9884   echo "configure: failed program was:" >&5
9885   cat conftest.$ac_ext >&5
9886   rm -rf conftest*
9887   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
9888 fi
9889 rm -f conftest*
9890 fi
9891
9892 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
9893 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
9894     cat >> confdefs.h <<\EOF
9895 #define HAVE_UINT32_FROM_RPC_RPC_H 1
9896 EOF
9897
9898 fi
9899
9900
9901 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
9902 echo "configure:9903: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
9903 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
9904   echo $ac_n "(cached) $ac_c" 1>&6
9905 else
9906   
9907 cat > conftest.$ac_ext <<EOF
9908 #line 9909 "configure"
9909 #include "confdefs.h"
9910 #include <sys/types.h>
9911 #ifdef HAVE_SYS_SECURITY_H
9912 #include <sys/security.h>
9913 #include <prot.h>
9914 #endif  /* HAVE_SYS_SECURITY_H */
9915 #if defined(HAVE_RPC_RPC_H)
9916 #include <rpc/rpc.h>
9917 #endif
9918 int main() {
9919 int testvar;
9920 ; return 0; }
9921 EOF
9922 if { (eval echo configure:9923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9923   rm -rf conftest*
9924   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
9925 else
9926   echo "configure: failed program was:" >&5
9927   cat conftest.$ac_ext >&5
9928   rm -rf conftest*
9929   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
9930 fi
9931 rm -f conftest*
9932 fi
9933
9934 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
9935 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
9936     cat >> confdefs.h <<\EOF
9937 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
9938 EOF
9939
9940 fi
9941
9942 echo $ac_n "checking for test routines""... $ac_c" 1>&6
9943 echo "configure:9944: checking for test routines" >&5
9944 if test "$cross_compiling" = yes; then
9945   echo "configure: warning: cannot run when cross-compiling" 1>&2
9946 else
9947   cat > conftest.$ac_ext <<EOF
9948 #line 9949 "configure"
9949 #include "confdefs.h"
9950 #include "${srcdir-.}/tests/trivial.c"
9951 EOF
9952 if { (eval echo configure:9953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9953 then
9954   echo "$ac_t""yes" 1>&6
9955 else
9956   echo "configure: failed program was:" >&5
9957   cat conftest.$ac_ext >&5
9958   rm -fr conftest*
9959   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
9960 fi
9961 rm -fr conftest*
9962 fi
9963
9964
9965 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
9966 echo "configure:9967: checking for ftruncate extend" >&5
9967 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
9968   echo $ac_n "(cached) $ac_c" 1>&6
9969 else
9970   
9971 if test "$cross_compiling" = yes; then
9972   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
9973 else
9974   cat > conftest.$ac_ext <<EOF
9975 #line 9976 "configure"
9976 #include "confdefs.h"
9977 #include "${srcdir-.}/tests/ftruncate.c"
9978 EOF
9979 if { (eval echo configure:9980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9980 then
9981   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
9982 else
9983   echo "configure: failed program was:" >&5
9984   cat conftest.$ac_ext >&5
9985   rm -fr conftest*
9986   samba_cv_HAVE_FTRUNCATE_EXTEND=no
9987 fi
9988 rm -fr conftest*
9989 fi
9990
9991 fi
9992
9993 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
9994 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
9995     cat >> confdefs.h <<\EOF
9996 #define HAVE_FTRUNCATE_EXTEND 1
9997 EOF
9998
9999 fi
10000
10001 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10002 echo "configure:10003: checking for AF_LOCAL socket support" >&5
10003 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10004   echo $ac_n "(cached) $ac_c" 1>&6
10005 else
10006   
10007 if test "$cross_compiling" = yes; then
10008   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10009 else
10010   cat > conftest.$ac_ext <<EOF
10011 #line 10012 "configure"
10012 #include "confdefs.h"
10013 #include "${srcdir-.}/tests/unixsock.c"
10014 EOF
10015 if { (eval echo configure:10016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10016 then
10017   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10018 else
10019   echo "configure: failed program was:" >&5
10020   cat conftest.$ac_ext >&5
10021   rm -fr conftest*
10022   samba_cv_HAVE_WORKING_AF_LOCAL=no
10023 fi
10024 rm -fr conftest*
10025 fi
10026
10027 fi
10028
10029 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10030 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10031 then
10032     cat >> confdefs.h <<\EOF
10033 #define HAVE_WORKING_AF_LOCAL 1
10034 EOF
10035
10036 fi
10037
10038 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10039 echo "configure:10040: checking for broken getgroups" >&5
10040 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10041   echo $ac_n "(cached) $ac_c" 1>&6
10042 else
10043   
10044 if test "$cross_compiling" = yes; then
10045   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10046 else
10047   cat > conftest.$ac_ext <<EOF
10048 #line 10049 "configure"
10049 #include "confdefs.h"
10050 #include "${srcdir-.}/tests/getgroups.c"
10051 EOF
10052 if { (eval echo configure:10053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10053 then
10054   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10055 else
10056   echo "configure: failed program was:" >&5
10057   cat conftest.$ac_ext >&5
10058   rm -fr conftest*
10059   samba_cv_HAVE_BROKEN_GETGROUPS=no
10060 fi
10061 rm -fr conftest*
10062 fi
10063
10064 fi
10065
10066 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10067 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10068     cat >> confdefs.h <<\EOF
10069 #define HAVE_BROKEN_GETGROUPS 1
10070 EOF
10071
10072 fi
10073
10074 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10075 echo "configure:10076: checking whether getpass should be replaced" >&5
10076 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10077   echo $ac_n "(cached) $ac_c" 1>&6
10078 else
10079   
10080 SAVE_CPPFLAGS="$CPPFLAGS"
10081 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10082 cat > conftest.$ac_ext <<EOF
10083 #line 10084 "configure"
10084 #include "confdefs.h"
10085
10086 #define REPLACE_GETPASS 1
10087 #define NO_CONFIG_H 1
10088 #define main dont_declare_main
10089 #include "${srcdir-.}/lib/getsmbpass.c"
10090 #undef main
10091
10092 int main() {
10093
10094 ; return 0; }
10095 EOF
10096 if { (eval echo configure:10097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10097   rm -rf conftest*
10098   samba_cv_REPLACE_GETPASS=yes
10099 else
10100   echo "configure: failed program was:" >&5
10101   cat conftest.$ac_ext >&5
10102   rm -rf conftest*
10103   samba_cv_REPLACE_GETPASS=no
10104 fi
10105 rm -f conftest*
10106 CPPFLAGS="$SAVE_CPPFLAGS"
10107
10108 fi
10109
10110 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10111 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10112         cat >> confdefs.h <<\EOF
10113 #define REPLACE_GETPASS 1
10114 EOF
10115
10116 fi
10117
10118 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10119 echo "configure:10120: checking for broken inet_ntoa" >&5
10120 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10121   echo $ac_n "(cached) $ac_c" 1>&6
10122 else
10123   
10124 if test "$cross_compiling" = yes; then
10125   samba_cv_REPLACE_INET_NTOA=cross
10126 else
10127   cat > conftest.$ac_ext <<EOF
10128 #line 10129 "configure"
10129 #include "confdefs.h"
10130
10131 #include <stdio.h>
10132 #include <sys/types.h>
10133 #include <netinet/in.h>
10134 #ifdef HAVE_ARPA_INET_H
10135 #include <arpa/inet.h>
10136 #endif
10137 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10138 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10139     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10140 exit(1);}
10141 EOF
10142 if { (eval echo configure:10143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10143 then
10144   samba_cv_REPLACE_INET_NTOA=yes
10145 else
10146   echo "configure: failed program was:" >&5
10147   cat conftest.$ac_ext >&5
10148   rm -fr conftest*
10149   samba_cv_REPLACE_INET_NTOA=no
10150 fi
10151 rm -fr conftest*
10152 fi
10153
10154 fi
10155
10156 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10157 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10158     cat >> confdefs.h <<\EOF
10159 #define REPLACE_INET_NTOA 1
10160 EOF
10161
10162 fi
10163
10164 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10165 echo "configure:10166: checking for secure mkstemp" >&5
10166 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10167   echo $ac_n "(cached) $ac_c" 1>&6
10168 else
10169   
10170 if test "$cross_compiling" = yes; then
10171   samba_cv_HAVE_SECURE_MKSTEMP=cross
10172 else
10173   cat > conftest.$ac_ext <<EOF
10174 #line 10175 "configure"
10175 #include "confdefs.h"
10176 #include <stdlib.h>
10177 #include <sys/types.h>
10178 #include <sys/stat.h>
10179 #include <unistd.h>
10180 main() { 
10181   struct stat st;
10182   char tpl[20]="/tmp/test.XXXXXX"; 
10183   int fd = mkstemp(tpl); 
10184   if (fd == -1) exit(1);
10185   unlink(tpl);
10186   if (fstat(fd, &st) != 0) exit(1);
10187   if ((st.st_mode & 0777) != 0600) exit(1);
10188   exit(0);
10189 }
10190 EOF
10191 if { (eval echo configure:10192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10192 then
10193   samba_cv_HAVE_SECURE_MKSTEMP=yes
10194 else
10195   echo "configure: failed program was:" >&5
10196   cat conftest.$ac_ext >&5
10197   rm -fr conftest*
10198   samba_cv_HAVE_SECURE_MKSTEMP=no
10199 fi
10200 rm -fr conftest*
10201 fi
10202
10203 fi
10204
10205 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10206 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10207     cat >> confdefs.h <<\EOF
10208 #define HAVE_SECURE_MKSTEMP 1
10209 EOF
10210
10211 fi
10212
10213 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10214 echo "configure:10215: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10215 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10216   echo $ac_n "(cached) $ac_c" 1>&6
10217 else
10218   
10219 if test "$cross_compiling" = yes; then
10220   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10221 else
10222   cat > conftest.$ac_ext <<EOF
10223 #line 10224 "configure"
10224 #include "confdefs.h"
10225 #include <unistd.h>
10226 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10227 EOF
10228 if { (eval echo configure:10229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10229 then
10230   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10231 else
10232   echo "configure: failed program was:" >&5
10233   cat conftest.$ac_ext >&5
10234   rm -fr conftest*
10235   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10236 fi
10237 rm -fr conftest*
10238 fi
10239
10240 fi
10241
10242 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10243 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10244     cat >> confdefs.h <<\EOF
10245 #define SYSCONF_SC_NGROUPS_MAX 1
10246 EOF
10247
10248 fi
10249
10250 echo $ac_n "checking for root""... $ac_c" 1>&6
10251 echo "configure:10252: checking for root" >&5
10252 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10253   echo $ac_n "(cached) $ac_c" 1>&6
10254 else
10255   
10256 if test "$cross_compiling" = yes; then
10257   samba_cv_HAVE_ROOT=cross
10258 else
10259   cat > conftest.$ac_ext <<EOF
10260 #line 10261 "configure"
10261 #include "confdefs.h"
10262 main() { exit(getuid() != 0); }
10263 EOF
10264 if { (eval echo configure:10265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10265 then
10266   samba_cv_HAVE_ROOT=yes
10267 else
10268   echo "configure: failed program was:" >&5
10269   cat conftest.$ac_ext >&5
10270   rm -fr conftest*
10271   samba_cv_HAVE_ROOT=no
10272 fi
10273 rm -fr conftest*
10274 fi
10275
10276 fi
10277
10278 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10279 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10280     cat >> confdefs.h <<\EOF
10281 #define HAVE_ROOT 1
10282 EOF
10283
10284 else
10285     echo "configure: warning: running as non-root will disable some tests" 1>&2
10286 fi
10287
10288 ##################
10289 # look for a method of finding the list of network interfaces
10290 iface=no;
10291 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10292 echo "configure:10293: checking for iface AIX" >&5
10293 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10294   echo $ac_n "(cached) $ac_c" 1>&6
10295 else
10296   
10297 if test "$cross_compiling" = yes; then
10298   samba_cv_HAVE_IFACE_AIX=cross
10299 else
10300   cat > conftest.$ac_ext <<EOF
10301 #line 10302 "configure"
10302 #include "confdefs.h"
10303
10304 #define HAVE_IFACE_AIX 1
10305 #define AUTOCONF_TEST 1
10306 #include "confdefs.h"
10307 #include "${srcdir-.}/lib/interfaces.c"
10308 EOF
10309 if { (eval echo configure:10310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10310 then
10311   samba_cv_HAVE_IFACE_AIX=yes
10312 else
10313   echo "configure: failed program was:" >&5
10314   cat conftest.$ac_ext >&5
10315   rm -fr conftest*
10316   samba_cv_HAVE_IFACE_AIX=no
10317 fi
10318 rm -fr conftest*
10319 fi
10320
10321 fi
10322
10323 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10324 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10325     iface=yes;cat >> confdefs.h <<\EOF
10326 #define HAVE_IFACE_AIX 1
10327 EOF
10328
10329 fi
10330
10331 if test $iface = no; then
10332 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10333 echo "configure:10334: checking for iface ifconf" >&5
10334 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10335   echo $ac_n "(cached) $ac_c" 1>&6
10336 else
10337   
10338 if test "$cross_compiling" = yes; then
10339   samba_cv_HAVE_IFACE_IFCONF=cross
10340 else
10341   cat > conftest.$ac_ext <<EOF
10342 #line 10343 "configure"
10343 #include "confdefs.h"
10344
10345 #define HAVE_IFACE_IFCONF 1
10346 #define AUTOCONF_TEST 1
10347 #include "confdefs.h"
10348 #include "${srcdir-.}/lib/interfaces.c"
10349 EOF
10350 if { (eval echo configure:10351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10351 then
10352   samba_cv_HAVE_IFACE_IFCONF=yes
10353 else
10354   echo "configure: failed program was:" >&5
10355   cat conftest.$ac_ext >&5
10356   rm -fr conftest*
10357   samba_cv_HAVE_IFACE_IFCONF=no
10358 fi
10359 rm -fr conftest*
10360 fi
10361
10362 fi
10363
10364 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10365 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10366     iface=yes;cat >> confdefs.h <<\EOF
10367 #define HAVE_IFACE_IFCONF 1
10368 EOF
10369
10370 fi
10371 fi
10372
10373 if test $iface = no; then
10374 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10375 echo "configure:10376: checking for iface ifreq" >&5
10376 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10377   echo $ac_n "(cached) $ac_c" 1>&6
10378 else
10379   
10380 if test "$cross_compiling" = yes; then
10381   samba_cv_HAVE_IFACE_IFREQ=cross
10382 else
10383   cat > conftest.$ac_ext <<EOF
10384 #line 10385 "configure"
10385 #include "confdefs.h"
10386
10387 #define HAVE_IFACE_IFREQ 1
10388 #define AUTOCONF_TEST 1
10389 #include "confdefs.h"
10390 #include "${srcdir-.}/lib/interfaces.c"
10391 EOF
10392 if { (eval echo configure:10393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10393 then
10394   samba_cv_HAVE_IFACE_IFREQ=yes
10395 else
10396   echo "configure: failed program was:" >&5
10397   cat conftest.$ac_ext >&5
10398   rm -fr conftest*
10399   samba_cv_HAVE_IFACE_IFREQ=no
10400 fi
10401 rm -fr conftest*
10402 fi
10403
10404 fi
10405
10406 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10407 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10408     iface=yes;cat >> confdefs.h <<\EOF
10409 #define HAVE_IFACE_IFREQ 1
10410 EOF
10411
10412 fi
10413 fi
10414
10415
10416 ################################################
10417 # look for a method of setting the effective uid
10418 seteuid=no;
10419 if test $seteuid = no; then
10420 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10421 echo "configure:10422: checking for setresuid" >&5
10422 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10423   echo $ac_n "(cached) $ac_c" 1>&6
10424 else
10425   
10426 if test "$cross_compiling" = yes; then
10427   samba_cv_USE_SETRESUID=cross
10428 else
10429   cat > conftest.$ac_ext <<EOF
10430 #line 10431 "configure"
10431 #include "confdefs.h"
10432
10433 #define AUTOCONF_TEST 1
10434 #define USE_SETRESUID 1
10435 #include "confdefs.h"
10436 #include "${srcdir-.}/lib/util_sec.c"
10437 EOF
10438 if { (eval echo configure:10439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10439 then
10440   samba_cv_USE_SETRESUID=yes
10441 else
10442   echo "configure: failed program was:" >&5
10443   cat conftest.$ac_ext >&5
10444   rm -fr conftest*
10445   samba_cv_USE_SETRESUID=no
10446 fi
10447 rm -fr conftest*
10448 fi
10449
10450 fi
10451
10452 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10453 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10454     seteuid=yes;cat >> confdefs.h <<\EOF
10455 #define USE_SETRESUID 1
10456 EOF
10457
10458 fi
10459 fi
10460
10461
10462 if test $seteuid = no; then
10463 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10464 echo "configure:10465: checking for setreuid" >&5
10465 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10466   echo $ac_n "(cached) $ac_c" 1>&6
10467 else
10468   
10469 if test "$cross_compiling" = yes; then
10470   samba_cv_USE_SETREUID=cross
10471 else
10472   cat > conftest.$ac_ext <<EOF
10473 #line 10474 "configure"
10474 #include "confdefs.h"
10475
10476 #define AUTOCONF_TEST 1
10477 #define USE_SETREUID 1
10478 #include "confdefs.h"
10479 #include "${srcdir-.}/lib/util_sec.c"
10480 EOF
10481 if { (eval echo configure:10482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10482 then
10483   samba_cv_USE_SETREUID=yes
10484 else
10485   echo "configure: failed program was:" >&5
10486   cat conftest.$ac_ext >&5
10487   rm -fr conftest*
10488   samba_cv_USE_SETREUID=no
10489 fi
10490 rm -fr conftest*
10491 fi
10492
10493 fi
10494
10495 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10496 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10497     seteuid=yes;cat >> confdefs.h <<\EOF
10498 #define USE_SETREUID 1
10499 EOF
10500
10501 fi
10502 fi
10503
10504 if test $seteuid = no; then
10505 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10506 echo "configure:10507: checking for seteuid" >&5
10507 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10508   echo $ac_n "(cached) $ac_c" 1>&6
10509 else
10510   
10511 if test "$cross_compiling" = yes; then
10512   samba_cv_USE_SETEUID=cross
10513 else
10514   cat > conftest.$ac_ext <<EOF
10515 #line 10516 "configure"
10516 #include "confdefs.h"
10517
10518 #define AUTOCONF_TEST 1
10519 #define USE_SETEUID 1
10520 #include "confdefs.h"
10521 #include "${srcdir-.}/lib/util_sec.c"
10522 EOF
10523 if { (eval echo configure:10524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10524 then
10525   samba_cv_USE_SETEUID=yes
10526 else
10527   echo "configure: failed program was:" >&5
10528   cat conftest.$ac_ext >&5
10529   rm -fr conftest*
10530   samba_cv_USE_SETEUID=no
10531 fi
10532 rm -fr conftest*
10533 fi
10534
10535 fi
10536
10537 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10538 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10539     seteuid=yes;cat >> confdefs.h <<\EOF
10540 #define USE_SETEUID 1
10541 EOF
10542
10543 fi
10544 fi
10545
10546 if test $seteuid = no; then
10547 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10548 echo "configure:10549: checking for setuidx" >&5
10549 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10550   echo $ac_n "(cached) $ac_c" 1>&6
10551 else
10552   
10553 if test "$cross_compiling" = yes; then
10554   samba_cv_USE_SETUIDX=cross
10555 else
10556   cat > conftest.$ac_ext <<EOF
10557 #line 10558 "configure"
10558 #include "confdefs.h"
10559
10560 #define AUTOCONF_TEST 1
10561 #define USE_SETUIDX 1
10562 #include "confdefs.h"
10563 #include "${srcdir-.}/lib/util_sec.c"
10564 EOF
10565 if { (eval echo configure:10566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10566 then
10567   samba_cv_USE_SETUIDX=yes
10568 else
10569   echo "configure: failed program was:" >&5
10570   cat conftest.$ac_ext >&5
10571   rm -fr conftest*
10572   samba_cv_USE_SETUIDX=no
10573 fi
10574 rm -fr conftest*
10575 fi
10576
10577 fi
10578
10579 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10580 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10581     seteuid=yes;cat >> confdefs.h <<\EOF
10582 #define USE_SETUIDX 1
10583 EOF
10584
10585 fi
10586 fi
10587
10588
10589 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10590 echo "configure:10591: checking for working mmap" >&5
10591 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10592   echo $ac_n "(cached) $ac_c" 1>&6
10593 else
10594   
10595 if test "$cross_compiling" = yes; then
10596   samba_cv_HAVE_MMAP=cross
10597 else
10598   cat > conftest.$ac_ext <<EOF
10599 #line 10600 "configure"
10600 #include "confdefs.h"
10601 #include "${srcdir-.}/tests/shared_mmap.c"
10602 EOF
10603 if { (eval echo configure:10604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10604 then
10605   samba_cv_HAVE_MMAP=yes
10606 else
10607   echo "configure: failed program was:" >&5
10608   cat conftest.$ac_ext >&5
10609   rm -fr conftest*
10610   samba_cv_HAVE_MMAP=no
10611 fi
10612 rm -fr conftest*
10613 fi
10614
10615 fi
10616
10617 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10618 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10619     cat >> confdefs.h <<\EOF
10620 #define HAVE_MMAP 1
10621 EOF
10622
10623 fi
10624
10625 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10626 echo "configure:10627: checking for ftruncate needs root" >&5
10627 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10628   echo $ac_n "(cached) $ac_c" 1>&6
10629 else
10630   
10631 if test "$cross_compiling" = yes; then
10632   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10633 else
10634   cat > conftest.$ac_ext <<EOF
10635 #line 10636 "configure"
10636 #include "confdefs.h"
10637 #include "${srcdir-.}/tests/ftruncroot.c"
10638 EOF
10639 if { (eval echo configure:10640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10640 then
10641   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10642 else
10643   echo "configure: failed program was:" >&5
10644   cat conftest.$ac_ext >&5
10645   rm -fr conftest*
10646   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10647 fi
10648 rm -fr conftest*
10649 fi
10650
10651 fi
10652
10653 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10654 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10655     cat >> confdefs.h <<\EOF
10656 #define FTRUNCATE_NEEDS_ROOT 1
10657 EOF
10658
10659 fi
10660
10661 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10662 echo "configure:10663: checking for fcntl locking" >&5
10663 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10664   echo $ac_n "(cached) $ac_c" 1>&6
10665 else
10666   
10667 if test "$cross_compiling" = yes; then
10668   samba_cv_HAVE_FCNTL_LOCK=cross
10669 else
10670   cat > conftest.$ac_ext <<EOF
10671 #line 10672 "configure"
10672 #include "confdefs.h"
10673 #include "${srcdir-.}/tests/fcntl_lock.c"
10674 EOF
10675 if { (eval echo configure:10676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10676 then
10677   samba_cv_HAVE_FCNTL_LOCK=yes
10678 else
10679   echo "configure: failed program was:" >&5
10680   cat conftest.$ac_ext >&5
10681   rm -fr conftest*
10682   samba_cv_HAVE_FCNTL_LOCK=no
10683 fi
10684 rm -fr conftest*
10685 fi
10686
10687 fi
10688
10689 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
10690 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
10691     cat >> confdefs.h <<\EOF
10692 #define HAVE_FCNTL_LOCK 1
10693 EOF
10694
10695 fi
10696
10697 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
10698 echo "configure:10699: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
10699 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
10700   echo $ac_n "(cached) $ac_c" 1>&6
10701 else
10702   
10703 if test "$cross_compiling" = yes; then
10704   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
10705 else
10706   cat > conftest.$ac_ext <<EOF
10707 #line 10708 "configure"
10708 #include "confdefs.h"
10709 #include "${srcdir-.}/tests/fcntl_lock64.c"
10710 EOF
10711 if { (eval echo configure:10712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10712 then
10713   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
10714 else
10715   echo "configure: failed program was:" >&5
10716   cat conftest.$ac_ext >&5
10717   rm -fr conftest*
10718   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
10719 fi
10720 rm -fr conftest*
10721 fi
10722
10723 fi
10724
10725 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
10726 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
10727     cat >> confdefs.h <<\EOF
10728 #define HAVE_BROKEN_FCNTL64_LOCKS 1
10729 EOF
10730
10731
10732 else
10733
10734
10735   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
10736 echo "configure:10737: checking for 64 bit fcntl locking" >&5
10737 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
10738   echo $ac_n "(cached) $ac_c" 1>&6
10739 else
10740   
10741   if test "$cross_compiling" = yes; then
10742   samba_cv_HAVE_STRUCT_FLOCK64=cross
10743 else
10744   cat > conftest.$ac_ext <<EOF
10745 #line 10746 "configure"
10746 #include "confdefs.h"
10747
10748 #if defined(HAVE_UNISTD_H)
10749 #include <unistd.h>
10750 #endif
10751 #include <stdio.h>
10752 #include <stdlib.h>
10753
10754 #ifdef HAVE_FCNTL_H
10755 #include <fcntl.h>
10756 #endif
10757
10758 #ifdef HAVE_SYS_FCNTL_H
10759 #include <sys/fcntl.h>
10760 #endif
10761 main() { struct flock64 fl64;
10762 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
10763 exit(0);
10764 #else
10765 exit(1);
10766 #endif
10767 }
10768 EOF
10769 if { (eval echo configure:10770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10770 then
10771   samba_cv_HAVE_STRUCT_FLOCK64=yes
10772 else
10773   echo "configure: failed program was:" >&5
10774   cat conftest.$ac_ext >&5
10775   rm -fr conftest*
10776   samba_cv_HAVE_STRUCT_FLOCK64=no
10777 fi
10778 rm -fr conftest*
10779 fi
10780
10781 fi
10782
10783 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
10784
10785   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
10786       cat >> confdefs.h <<\EOF
10787 #define HAVE_STRUCT_FLOCK64 1
10788 EOF
10789
10790   fi
10791 fi
10792
10793 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
10794 echo "configure:10795: checking for a crypt that needs truncated salt" >&5
10795 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
10796   echo $ac_n "(cached) $ac_c" 1>&6
10797 else
10798   
10799 if test "$cross_compiling" = yes; then
10800   samba_cv_HAVE_TRUNCATED_SALT=cross
10801 else
10802   cat > conftest.$ac_ext <<EOF
10803 #line 10804 "configure"
10804 #include "confdefs.h"
10805 #include "${srcdir-.}/tests/crypttest.c"
10806 EOF
10807 if { (eval echo configure:10808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10808 then
10809   samba_cv_HAVE_TRUNCATED_SALT=no
10810 else
10811   echo "configure: failed program was:" >&5
10812   cat conftest.$ac_ext >&5
10813   rm -fr conftest*
10814   samba_cv_HAVE_TRUNCATED_SALT=yes
10815 fi
10816 rm -fr conftest*
10817 fi
10818
10819 fi
10820
10821 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
10822 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
10823     cat >> confdefs.h <<\EOF
10824 #define HAVE_TRUNCATED_SALT 1
10825 EOF
10826
10827 fi
10828
10829 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
10830 echo "configure:10831: checking for broken nisplus include files" >&5
10831 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
10832   echo $ac_n "(cached) $ac_c" 1>&6
10833 else
10834   
10835 cat > conftest.$ac_ext <<EOF
10836 #line 10837 "configure"
10837 #include "confdefs.h"
10838 #include <sys/acl.h>
10839 #if defined(HAVE_RPCSVC_NIS_H)
10840 #include <rpcsvc/nis.h>
10841 #endif
10842 int main() {
10843 return 0;
10844 ; return 0; }
10845 EOF
10846 if { (eval echo configure:10847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10847   rm -rf conftest*
10848   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
10849 else
10850   echo "configure: failed program was:" >&5
10851   cat conftest.$ac_ext >&5
10852   rm -rf conftest*
10853   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
10854 fi
10855 rm -f conftest*
10856 fi
10857
10858 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
10859 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
10860     cat >> confdefs.h <<\EOF
10861 #define BROKEN_NISPLUS_INCLUDE_FILES 1
10862 EOF
10863
10864 fi
10865
10866
10867 #################################################
10868 # check for smbwrapper support
10869 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
10870 echo "configure:10871: checking whether to use smbwrapper" >&5
10871 # Check whether --with-smbwrapper or --without-smbwrapper was given.
10872 if test "${with_smbwrapper+set}" = set; then
10873   withval="$with_smbwrapper"
10874    case "$withval" in
10875   yes)
10876     echo "$ac_t""yes" 1>&6
10877     cat >> confdefs.h <<\EOF
10878 #define WITH_SMBWRAPPER 1
10879 EOF
10880
10881         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
10882
10883         if test x$ATTEMPT_WRAP32_BUILD = x; then
10884                 WRAP32=""
10885         else
10886                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
10887         fi
10888
10889 # Conditions under which smbwrapper should not be built.
10890
10891         if test x$PICFLAG = x; then
10892            echo No support for PIC code - disabling smbwrapper and smbsh
10893            WRAP=""
10894            WRAP32=""
10895         elif test x$ac_cv_func_syscall = xno; then
10896            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
10897            WRAP=""
10898            WRAP32=""
10899         fi
10900     ;;
10901   *)
10902     echo "$ac_t""no" 1>&6
10903     ;;
10904   esac 
10905 else
10906   echo "$ac_t""no" 1>&6
10907
10908 fi
10909
10910
10911 #################################################
10912 # check for the AFS filesystem
10913 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
10914 echo "configure:10915: checking whether to use AFS" >&5
10915 # Check whether --with-afs or --without-afs was given.
10916 if test "${with_afs+set}" = set; then
10917   withval="$with_afs"
10918    case "$withval" in
10919   yes)
10920     echo "$ac_t""yes" 1>&6
10921     cat >> confdefs.h <<\EOF
10922 #define WITH_AFS 1
10923 EOF
10924
10925     ;;
10926   *)
10927     echo "$ac_t""no" 1>&6
10928     ;;
10929   esac 
10930 else
10931   echo "$ac_t""no" 1>&6
10932
10933 fi
10934
10935
10936
10937 #################################################
10938 # check for the DFS auth system
10939 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
10940 echo "configure:10941: checking whether to use DFS auth" >&5
10941 # Check whether --with-dfs or --without-dfs was given.
10942 if test "${with_dfs+set}" = set; then
10943   withval="$with_dfs"
10944    case "$withval" in
10945   yes)
10946     echo "$ac_t""yes" 1>&6
10947     cat >> confdefs.h <<\EOF
10948 #define WITH_DFS 1
10949 EOF
10950
10951     ;;
10952   *)
10953     echo "$ac_t""no" 1>&6
10954     ;;
10955   esac 
10956 else
10957   echo "$ac_t""no" 1>&6
10958
10959 fi
10960
10961
10962 #################################################
10963 # check for Kerberos IV auth system
10964 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
10965 echo "configure:10966: checking whether to use Kerberos IV" >&5
10966 # Check whether --with-krb4 or --without-krb4 was given.
10967 if test "${with_krb4+set}" = set; then
10968   withval="$with_krb4"
10969    case "$withval" in
10970   yes)
10971     echo "$ac_t""yes" 1>&6
10972     cat >> confdefs.h <<\EOF
10973 #define KRB4_AUTH 1
10974 EOF
10975
10976     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
10977 echo "configure:10978: checking for dn_expand in -lresolv" >&5
10978 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
10979 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10980   echo $ac_n "(cached) $ac_c" 1>&6
10981 else
10982   ac_save_LIBS="$LIBS"
10983 LIBS="-lresolv  $LIBS"
10984 cat > conftest.$ac_ext <<EOF
10985 #line 10986 "configure"
10986 #include "confdefs.h"
10987 /* Override any gcc2 internal prototype to avoid an error.  */
10988 /* We use char because int might match the return type of a gcc2
10989     builtin and then its argument prototype would still apply.  */
10990 char dn_expand();
10991
10992 int main() {
10993 dn_expand()
10994 ; return 0; }
10995 EOF
10996 if { (eval echo configure:10997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10997   rm -rf conftest*
10998   eval "ac_cv_lib_$ac_lib_var=yes"
10999 else
11000   echo "configure: failed program was:" >&5
11001   cat conftest.$ac_ext >&5
11002   rm -rf conftest*
11003   eval "ac_cv_lib_$ac_lib_var=no"
11004 fi
11005 rm -f conftest*
11006 LIBS="$ac_save_LIBS"
11007
11008 fi
11009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11010   echo "$ac_t""yes" 1>&6
11011     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11012     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11013   cat >> confdefs.h <<EOF
11014 #define $ac_tr_lib 1
11015 EOF
11016
11017   LIBS="-lresolv $LIBS"
11018
11019 else
11020   echo "$ac_t""no" 1>&6
11021 fi
11022
11023     LIBS="$LIBS -lkrb -ldes"
11024     CFLAGS="$CFLAGS -I$withval/include"
11025     LDFLAGS="$LDFLAGS -L$withval/lib"
11026     ;;
11027   *)
11028     echo "$ac_t""no" 1>&6
11029     ;;
11030   esac 
11031 else
11032   echo "$ac_t""no" 1>&6
11033
11034 fi
11035
11036
11037 #################################################
11038 # check for Kerberos 5 auth system
11039 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
11040 echo "configure:11041: checking whether to use Kerberos 5" >&5
11041 # Check whether --with-krb5 or --without-krb5 was given.
11042 if test "${with_krb5+set}" = set; then
11043   withval="$with_krb5"
11044    case "$withval" in
11045   yes)
11046     echo "$ac_t""yes" 1>&6
11047     cat >> confdefs.h <<\EOF
11048 #define KRB5_AUTH 1
11049 EOF
11050
11051     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
11052     CFLAGS="$CFLAGS -I$withval/include"
11053     LDFLAGS="$LDFLAGS -L$withval/lib"
11054     ;;
11055   *)
11056     echo "$ac_t""no" 1>&6
11057     ;;
11058   esac 
11059 else
11060   echo "$ac_t""no" 1>&6
11061
11062 fi
11063
11064
11065 #################################################
11066 # check for automount support
11067 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11068 echo "configure:11069: checking whether to use AUTOMOUNT" >&5
11069 # Check whether --with-automount or --without-automount was given.
11070 if test "${with_automount+set}" = set; then
11071   withval="$with_automount"
11072    case "$withval" in
11073   yes)
11074     echo "$ac_t""yes" 1>&6
11075     cat >> confdefs.h <<\EOF
11076 #define WITH_AUTOMOUNT 1
11077 EOF
11078
11079     ;;
11080   *)
11081     echo "$ac_t""no" 1>&6
11082     ;;
11083   esac 
11084 else
11085   echo "$ac_t""no" 1>&6
11086
11087 fi
11088
11089
11090 #################################################
11091 # check for smbmount support
11092 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11093 echo "configure:11094: checking whether to use SMBMOUNT" >&5
11094 # Check whether --with-smbmount or --without-smbmount was given.
11095 if test "${with_smbmount+set}" = set; then
11096   withval="$with_smbmount"
11097    case "$withval" in
11098   yes)
11099     echo "$ac_t""yes" 1>&6
11100     cat >> confdefs.h <<\EOF
11101 #define WITH_SMBMOUNT 1
11102 EOF
11103
11104     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11105     ;;
11106   *)
11107     echo "$ac_t""no" 1>&6
11108     MPROGS=
11109     ;;
11110   esac 
11111 else
11112   echo "$ac_t""no" 1>&6
11113   MPROGS=
11114
11115 fi
11116
11117
11118
11119 #################################################
11120 # check for a PAM password database
11121
11122 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
11123 echo "configure:11124: checking whether to use PAM password database" >&5
11124 # Check whether --with-pam or --without-pam was given.
11125 if test "${with_pam+set}" = set; then
11126   withval="$with_pam"
11127    case "$withval" in
11128   yes)
11129     echo "$ac_t""yes" 1>&6
11130     cat >> confdefs.h <<\EOF
11131 #define WITH_PAM 1
11132 EOF
11133
11134     LIBS="$LIBS -lpam"
11135     ;;
11136   *)
11137     echo "$ac_t""no" 1>&6
11138     ;;
11139   esac 
11140 else
11141   echo "$ac_t""no" 1>&6
11142
11143 fi
11144
11145
11146 # we can't build a pam module if we don't have pam.
11147 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11148 echo "configure:11149: checking for pam_get_data in -lpam" >&5
11149 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11150 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11151   echo $ac_n "(cached) $ac_c" 1>&6
11152 else
11153   ac_save_LIBS="$LIBS"
11154 LIBS="-lpam  $LIBS"
11155 cat > conftest.$ac_ext <<EOF
11156 #line 11157 "configure"
11157 #include "confdefs.h"
11158 /* Override any gcc2 internal prototype to avoid an error.  */
11159 /* We use char because int might match the return type of a gcc2
11160     builtin and then its argument prototype would still apply.  */
11161 char pam_get_data();
11162
11163 int main() {
11164 pam_get_data()
11165 ; return 0; }
11166 EOF
11167 if { (eval echo configure:11168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11168   rm -rf conftest*
11169   eval "ac_cv_lib_$ac_lib_var=yes"
11170 else
11171   echo "configure: failed program was:" >&5
11172   cat conftest.$ac_ext >&5
11173   rm -rf conftest*
11174   eval "ac_cv_lib_$ac_lib_var=no"
11175 fi
11176 rm -f conftest*
11177 LIBS="$ac_save_LIBS"
11178
11179 fi
11180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11181   echo "$ac_t""yes" 1>&6
11182   cat >> confdefs.h <<\EOF
11183 #define HAVE_LIBPAM 1
11184 EOF
11185
11186 else
11187   echo "$ac_t""no" 1>&6
11188 fi
11189
11190
11191 #################################################
11192 # check for pam_smbpass support
11193 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11194 echo "configure:11195: checking whether to use pam_smbpass" >&5
11195 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11196 if test "${with_pam_smbpass+set}" = set; then
11197   withval="$with_pam_smbpass"
11198    case "$withval" in
11199   yes)
11200     echo "$ac_t""yes" 1>&6
11201
11202 # Conditions under which pam_smbpass should not be built.
11203
11204        if test x$PICFLAG = x; then
11205           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11206           PAM_MOD=""
11207        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11208           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11209           PAM_MOD=""
11210        else
11211           cat >> confdefs.h <<\EOF
11212 #define WITH_PAM_SMBPASS 1
11213 EOF
11214
11215           PAM_MOD="bin/pam_smbpass.so"
11216        fi
11217     ;;
11218   *)
11219     echo "$ac_t""no" 1>&6
11220     ;;
11221   esac 
11222 else
11223   echo "$ac_t""no" 1>&6
11224
11225 fi
11226
11227
11228
11229 ###############################################
11230 # test for where we get crypt() from, but only
11231 # if not using PAM
11232 if test "$with_pam" != yes; then
11233 for ac_func in crypt
11234 do
11235 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11236 echo "configure:11237: checking for $ac_func" >&5
11237 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11238   echo $ac_n "(cached) $ac_c" 1>&6
11239 else
11240   cat > conftest.$ac_ext <<EOF
11241 #line 11242 "configure"
11242 #include "confdefs.h"
11243 /* System header to define __stub macros and hopefully few prototypes,
11244     which can conflict with char $ac_func(); below.  */
11245 #include <assert.h>
11246 /* Override any gcc2 internal prototype to avoid an error.  */
11247 /* We use char because int might match the return type of a gcc2
11248     builtin and then its argument prototype would still apply.  */
11249 char $ac_func();
11250
11251 int main() {
11252
11253 /* The GNU C library defines this for functions which it implements
11254     to always fail with ENOSYS.  Some functions are actually named
11255     something starting with __ and the normal name is an alias.  */
11256 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11257 choke me
11258 #else
11259 $ac_func();
11260 #endif
11261
11262 ; return 0; }
11263 EOF
11264 if { (eval echo configure:11265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11265   rm -rf conftest*
11266   eval "ac_cv_func_$ac_func=yes"
11267 else
11268   echo "configure: failed program was:" >&5
11269   cat conftest.$ac_ext >&5
11270   rm -rf conftest*
11271   eval "ac_cv_func_$ac_func=no"
11272 fi
11273 rm -f conftest*
11274 fi
11275
11276 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11277   echo "$ac_t""yes" 1>&6
11278     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11279   cat >> confdefs.h <<EOF
11280 #define $ac_tr_func 1
11281 EOF
11282  
11283 else
11284   echo "$ac_t""no" 1>&6
11285 fi
11286 done
11287
11288 if test x"$ac_cv_func_crypt" = x"no"; then
11289     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11290 echo "configure:11291: checking for crypt in -lcrypt" >&5
11291 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11292 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11293   echo $ac_n "(cached) $ac_c" 1>&6
11294 else
11295   ac_save_LIBS="$LIBS"
11296 LIBS="-lcrypt  $LIBS"
11297 cat > conftest.$ac_ext <<EOF
11298 #line 11299 "configure"
11299 #include "confdefs.h"
11300 /* Override any gcc2 internal prototype to avoid an error.  */
11301 /* We use char because int might match the return type of a gcc2
11302     builtin and then its argument prototype would still apply.  */
11303 char crypt();
11304
11305 int main() {
11306 crypt()
11307 ; return 0; }
11308 EOF
11309 if { (eval echo configure:11310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11310   rm -rf conftest*
11311   eval "ac_cv_lib_$ac_lib_var=yes"
11312 else
11313   echo "configure: failed program was:" >&5
11314   cat conftest.$ac_ext >&5
11315   rm -rf conftest*
11316   eval "ac_cv_lib_$ac_lib_var=no"
11317 fi
11318 rm -f conftest*
11319 LIBS="$ac_save_LIBS"
11320
11321 fi
11322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11323   echo "$ac_t""yes" 1>&6
11324   LIBS="$LIBS -lcrypt";
11325         cat >> confdefs.h <<\EOF
11326 #define HAVE_CRYPT 1
11327 EOF
11328
11329 else
11330   echo "$ac_t""no" 1>&6
11331 fi
11332
11333 fi
11334 fi
11335
11336
11337 #################################################
11338 # check for a TDB password database
11339 echo $ac_n "checking whether to use TDB password database""... $ac_c" 1>&6
11340 echo "configure:11341: checking whether to use TDB password database" >&5
11341 # Check whether --with-tdbsam or --without-tdbsam was given.
11342 if test "${with_tdbsam+set}" = set; then
11343   withval="$with_tdbsam"
11344    case "$withval" in
11345   yes)
11346     echo "$ac_t""yes" 1>&6
11347     cat >> confdefs.h <<\EOF
11348 #define WITH_TDBPWD 1
11349 EOF
11350
11351 #    AC_MSG_ERROR([TDB password database not supported in this version.])
11352     ;;
11353   *)
11354     echo "$ac_t""no" 1>&6
11355     ;;
11356   esac 
11357 else
11358   echo "$ac_t""no" 1>&6
11359
11360 fi
11361
11362
11363 #################################################
11364 # check for a LDAP password database
11365 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
11366 echo "configure:11367: checking whether to use LDAP password database" >&5
11367 # Check whether --with-ldap or --without-ldap was given.
11368 if test "${with_ldap+set}" = set; then
11369   withval="$with_ldap"
11370    case "$withval" in
11371   yes)
11372     echo "$ac_t""yes" 1>&6
11373     cat >> confdefs.h <<\EOF
11374 #define WITH_LDAP 1
11375 EOF
11376
11377     { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
11378     ;;
11379   *)
11380     echo "$ac_t""no" 1>&6
11381     ;;
11382   esac 
11383 else
11384   echo "$ac_t""no" 1>&6
11385
11386 fi
11387
11388
11389 #################################################
11390 # check for a NISPLUS password database
11391 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
11392 echo "configure:11393: checking whether to use NISPLUS password database" >&5
11393 # Check whether --with-nisplus or --without-nisplus was given.
11394 if test "${with_nisplus+set}" = set; then
11395   withval="$with_nisplus"
11396    case "$withval" in
11397   yes)
11398     echo "$ac_t""yes" 1>&6
11399     cat >> confdefs.h <<\EOF
11400 #define WITH_NISPLUS 1
11401 EOF
11402
11403     ;;
11404   *)
11405     echo "$ac_t""no" 1>&6
11406     ;;
11407   esac 
11408 else
11409   echo "$ac_t""no" 1>&6
11410
11411 fi
11412
11413
11414 #################################################
11415 # check for a NISPLUS_HOME support 
11416 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11417 echo "configure:11418: checking whether to use NISPLUS_HOME" >&5
11418 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11419 if test "${with_nisplus_home+set}" = set; then
11420   withval="$with_nisplus_home"
11421    case "$withval" in
11422   yes)
11423     echo "$ac_t""yes" 1>&6
11424     cat >> confdefs.h <<\EOF
11425 #define WITH_NISPLUS_HOME 1
11426 EOF
11427
11428     ;;
11429   *)
11430     echo "$ac_t""no" 1>&6
11431     ;;
11432   esac 
11433 else
11434   echo "$ac_t""no" 1>&6
11435
11436 fi
11437
11438
11439 #################################################
11440 # check for the secure socket layer
11441 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11442 echo "configure:11443: checking whether to use SSL" >&5
11443 # Check whether --with-ssl or --without-ssl was given.
11444 if test "${with_ssl+set}" = set; then
11445   withval="$with_ssl"
11446    case "$withval" in
11447   yes)
11448     echo "$ac_t""yes" 1>&6
11449     cat >> confdefs.h <<\EOF
11450 #define WITH_SSL 1
11451 EOF
11452
11453     withval="/usr/local/ssl"     # default
11454
11455     if test "${with_sslinc+set}" = set; then
11456
11457         withval="$with_sslinc"
11458         case "$withval" in
11459         yes|no)
11460           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11461           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11462           LIBS="-lssl -lcrypto $LIBS"
11463           LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
11464         ;;
11465         * )
11466           CFLAGS="-I${withval} $CFLAGS"
11467           LIBS="-lssl -lcrypto $LIBS"
11468           LDFLAGS="-L${withval}/lib $LDFLAGS"
11469         ;;
11470         esac
11471
11472     else
11473
11474         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11475         LIBS="-lssl -lcrypto $LIBS"
11476         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11477
11478     fi
11479
11480     if test ! -d ${withval}; then
11481       echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
11482       exit 1
11483     fi 
11484
11485     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
11486
11487     ;;
11488   *)
11489     echo "$ac_t""no" 1>&6
11490     ;;
11491   esac 
11492 else
11493   echo "$ac_t""no" 1>&6
11494
11495 fi
11496
11497
11498 #################################################
11499 # check for syslog logging
11500 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
11501 echo "configure:11502: checking whether to use syslog logging" >&5
11502 # Check whether --with-syslog or --without-syslog was given.
11503 if test "${with_syslog+set}" = set; then
11504   withval="$with_syslog"
11505    case "$withval" in
11506   yes)
11507     echo "$ac_t""yes" 1>&6
11508     cat >> confdefs.h <<\EOF
11509 #define WITH_SYSLOG 1
11510 EOF
11511
11512     ;;
11513   *)
11514     echo "$ac_t""no" 1>&6
11515     ;;
11516   esac 
11517 else
11518   echo "$ac_t""no" 1>&6
11519
11520 fi
11521
11522
11523 #################################################
11524 # check for a shared memory profiling support
11525 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
11526 echo "configure:11527: checking whether to use profiling" >&5
11527 # Check whether --with-profile or --without-profile was given.
11528 if test "${with_profile+set}" = set; then
11529   withval="$with_profile"
11530    case "$withval" in
11531   yes)
11532     echo "$ac_t""yes" 1>&6
11533     cat >> confdefs.h <<\EOF
11534 #define WITH_PROFILE 1
11535 EOF
11536
11537     ;;
11538   *)
11539     echo "$ac_t""no" 1>&6
11540     ;;
11541   esac 
11542 else
11543   echo "$ac_t""no" 1>&6
11544
11545 fi
11546
11547
11548
11549 #################################################
11550 # check for experimental netatalk resource fork support
11551 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
11552 echo "configure:11553: checking whether to support netatalk" >&5
11553 # Check whether --with-netatalk or --without-netatalk was given.
11554 if test "${with_netatalk+set}" = set; then
11555   withval="$with_netatalk"
11556    case "$withval" in
11557   yes)
11558     echo "$ac_t""yes" 1>&6
11559     cat >> confdefs.h <<\EOF
11560 #define WITH_NETATALK 1
11561 EOF
11562
11563     ;;
11564   *)
11565     echo "$ac_t""no" 1>&6
11566     ;;
11567   esac 
11568 else
11569   echo "$ac_t""no" 1>&6
11570
11571 fi
11572
11573
11574 #################################################
11575 # check for experimental disk-quotas support
11576 QUOTAOBJS=smbd/noquotas.o
11577
11578 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
11579 echo "configure:11580: checking whether to support disk-quotas" >&5
11580 # Check whether --with-quotas or --without-quotas was given.
11581 if test "${with_quotas+set}" = set; then
11582   withval="$with_quotas"
11583    case "$withval" in
11584   yes)
11585     echo "$ac_t""yes" 1>&6
11586     QUOTAOBJS=smbd/quotas.o
11587     ;;
11588   *)
11589     echo "$ac_t""no" 1>&6
11590     ;;
11591   esac 
11592 else
11593   echo "$ac_t""no" 1>&6
11594
11595 fi
11596
11597
11598
11599 #################################################
11600 # check for experimental utmp accounting
11601
11602 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
11603 echo "configure:11604: checking whether to support utmp accounting" >&5
11604 # Check whether --with-utmp or --without-utmp was given.
11605 if test "${with_utmp+set}" = set; then
11606   withval="$with_utmp"
11607    case "$withval" in
11608   yes)
11609     echo "$ac_t""yes" 1>&6
11610     cat >> confdefs.h <<\EOF
11611 #define WITH_UTMP 1
11612 EOF
11613
11614     ;;
11615   *)
11616     echo "$ac_t""no" 1>&6
11617     ;;
11618   esac 
11619 else
11620   echo "$ac_t""no" 1>&6
11621
11622 fi
11623
11624
11625 #################################################
11626 # check for MS Dfs support
11627
11628 echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
11629 echo "configure:11630: checking whether to support Microsoft Dfs" >&5
11630 # Check whether --with-msdfs or --without-msdfs was given.
11631 if test "${with_msdfs+set}" = set; then
11632   withval="$with_msdfs"
11633    case "$withval" in
11634   yes)
11635      echo "$ac_t""yes" 1>&6
11636      cat >> confdefs.h <<\EOF
11637 #define WITH_MSDFS 1
11638 EOF
11639
11640      ;;
11641   *)
11642     echo "$ac_t""no" 1>&6
11643     ;;
11644   esac 
11645 else
11646   echo "$ac_t""no" 1>&6
11647
11648 fi
11649
11650
11651 #################################################
11652 # set private directory location
11653 # Check whether --with-privatedir or --without-privatedir was given.
11654 if test "${with_privatedir+set}" = set; then
11655   withval="$with_privatedir"
11656    case "$withval" in
11657   yes|no)
11658   #
11659   # Just in case anybody calls it without argument
11660   #
11661     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
11662     privatedir='${prefix}/private'
11663   ;;
11664   * )
11665     privatedir="$withval"
11666     ;;
11667   esac
11668   
11669 else
11670   privatedir='${prefix}/private'
11671    
11672
11673 fi
11674
11675
11676 #################################################
11677 # set lock directory location
11678 # Check whether --with-lockdir or --without-lockdir was given.
11679 if test "${with_lockdir+set}" = set; then
11680   withval="$with_lockdir"
11681    case "$withval" in
11682   yes|no)
11683   #
11684   # Just in case anybody calls it without argument
11685   #
11686     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
11687     lockdir='$(VARDIR)/locks'
11688   ;;
11689   * )
11690     lockdir="$withval"
11691     ;;
11692   esac
11693   
11694 else
11695   lockdir='$(VARDIR)/locks'
11696    
11697
11698 fi
11699
11700
11701 #################################################
11702 # set SWAT directory location
11703 # Check whether --with-swatdir or --without-swatdir was given.
11704 if test "${with_swatdir+set}" = set; then
11705   withval="$with_swatdir"
11706    case "$withval" in
11707   yes|no)
11708   #
11709   # Just in case anybody does it
11710   #
11711     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
11712     swatdir='${prefix}/swat'
11713   ;;
11714   * )
11715     swatdir="$withval"
11716     ;;
11717   esac
11718   
11719 else
11720   swatdir='${prefix}/swat'
11721    
11722
11723 fi
11724
11725
11726 #################################################
11727 # these tests are taken from the GNU fileutils package
11728 echo "checking how to get filesystem space usage" 1>&6
11729 echo "configure:11730: checking how to get filesystem space usage" >&5
11730 space=no
11731
11732 # Test for statvfs64.
11733 if test $space = no; then
11734   # SVR4
11735   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
11736 echo "configure:11737: checking statvfs64 function (SVR4)" >&5
11737 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
11738   echo $ac_n "(cached) $ac_c" 1>&6
11739 else
11740   if test "$cross_compiling" = yes; then
11741   fu_cv_sys_stat_statvfs64=cross
11742 else
11743   cat > conftest.$ac_ext <<EOF
11744 #line 11745 "configure"
11745 #include "confdefs.h"
11746
11747 #if defined(HAVE_UNISTD_H)
11748 #include <unistd.h>
11749 #endif
11750 #include <sys/types.h>
11751 #include <sys/statvfs.h>
11752   main ()
11753   {
11754     struct statvfs64 fsd;
11755     exit (statvfs64 (".", &fsd));
11756   }
11757 EOF
11758 if { (eval echo configure:11759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11759 then
11760   fu_cv_sys_stat_statvfs64=yes
11761 else
11762   echo "configure: failed program was:" >&5
11763   cat conftest.$ac_ext >&5
11764   rm -fr conftest*
11765   fu_cv_sys_stat_statvfs64=no
11766 fi
11767 rm -fr conftest*
11768 fi
11769
11770 fi
11771
11772 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
11773   if test $fu_cv_sys_stat_statvfs64 = yes; then
11774     space=yes
11775     cat >> confdefs.h <<\EOF
11776 #define STAT_STATVFS64 1
11777 EOF
11778
11779   fi
11780 fi
11781
11782 # Perform only the link test since it seems there are no variants of the
11783 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
11784 # because that got a false positive on SCO OSR5.  Adding the declaration
11785 # of a `struct statvfs' causes this test to fail (as it should) on such
11786 # systems.  That system is reported to work fine with STAT_STATFS4 which
11787 # is what it gets when this test fails.
11788 if test $space = no; then
11789   # SVR4
11790   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
11791 echo "configure:11792: checking statvfs function (SVR4)" >&5
11792 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
11793   echo $ac_n "(cached) $ac_c" 1>&6
11794 else
11795   cat > conftest.$ac_ext <<EOF
11796 #line 11797 "configure"
11797 #include "confdefs.h"
11798 #include <sys/types.h>
11799 #include <sys/statvfs.h>
11800 int main() {
11801 struct statvfs fsd; statvfs (0, &fsd);
11802 ; return 0; }
11803 EOF
11804 if { (eval echo configure:11805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11805   rm -rf conftest*
11806   fu_cv_sys_stat_statvfs=yes
11807 else
11808   echo "configure: failed program was:" >&5
11809   cat conftest.$ac_ext >&5
11810   rm -rf conftest*
11811   fu_cv_sys_stat_statvfs=no
11812 fi
11813 rm -f conftest*
11814 fi
11815
11816 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
11817   if test $fu_cv_sys_stat_statvfs = yes; then
11818     space=yes
11819     cat >> confdefs.h <<\EOF
11820 #define STAT_STATVFS 1
11821 EOF
11822
11823   fi
11824 fi
11825
11826 if test $space = no; then
11827   # DEC Alpha running OSF/1
11828   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
11829 echo "configure:11830: checking for 3-argument statfs function (DEC OSF/1)" >&5
11830   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
11831   echo $ac_n "(cached) $ac_c" 1>&6
11832 else
11833   if test "$cross_compiling" = yes; then
11834   fu_cv_sys_stat_statfs3_osf1=no
11835 else
11836   cat > conftest.$ac_ext <<EOF
11837 #line 11838 "configure"
11838 #include "confdefs.h"
11839
11840 #include <sys/param.h>
11841 #include <sys/types.h>
11842 #include <sys/mount.h>
11843   main ()
11844   {
11845     struct statfs fsd;
11846     fsd.f_fsize = 0;
11847     exit (statfs (".", &fsd, sizeof (struct statfs)));
11848   }
11849 EOF
11850 if { (eval echo configure:11851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11851 then
11852   fu_cv_sys_stat_statfs3_osf1=yes
11853 else
11854   echo "configure: failed program was:" >&5
11855   cat conftest.$ac_ext >&5
11856   rm -fr conftest*
11857   fu_cv_sys_stat_statfs3_osf1=no
11858 fi
11859 rm -fr conftest*
11860 fi
11861
11862 fi
11863
11864   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
11865   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
11866     space=yes
11867     cat >> confdefs.h <<\EOF
11868 #define STAT_STATFS3_OSF1 1
11869 EOF
11870
11871   fi
11872 fi
11873
11874 if test $space = no; then
11875 # AIX
11876   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
11877 echo "configure:11878: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
11878   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
11879   echo $ac_n "(cached) $ac_c" 1>&6
11880 else
11881   if test "$cross_compiling" = yes; then
11882   fu_cv_sys_stat_statfs2_bsize=no
11883 else
11884   cat > conftest.$ac_ext <<EOF
11885 #line 11886 "configure"
11886 #include "confdefs.h"
11887
11888 #ifdef HAVE_SYS_PARAM_H
11889 #include <sys/param.h>
11890 #endif
11891 #ifdef HAVE_SYS_MOUNT_H
11892 #include <sys/mount.h>
11893 #endif
11894 #ifdef HAVE_SYS_VFS_H
11895 #include <sys/vfs.h>
11896 #endif
11897   main ()
11898   {
11899   struct statfs fsd;
11900   fsd.f_bsize = 0;
11901   exit (statfs (".", &fsd));
11902   }
11903 EOF
11904 if { (eval echo configure:11905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11905 then
11906   fu_cv_sys_stat_statfs2_bsize=yes
11907 else
11908   echo "configure: failed program was:" >&5
11909   cat conftest.$ac_ext >&5
11910   rm -fr conftest*
11911   fu_cv_sys_stat_statfs2_bsize=no
11912 fi
11913 rm -fr conftest*
11914 fi
11915
11916 fi
11917
11918   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
11919   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
11920     space=yes
11921     cat >> confdefs.h <<\EOF
11922 #define STAT_STATFS2_BSIZE 1
11923 EOF
11924
11925   fi
11926 fi
11927
11928 if test $space = no; then
11929 # SVR3
11930   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
11931 echo "configure:11932: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
11932   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
11933   echo $ac_n "(cached) $ac_c" 1>&6
11934 else
11935   if test "$cross_compiling" = yes; then
11936   fu_cv_sys_stat_statfs4=no
11937 else
11938   cat > conftest.$ac_ext <<EOF
11939 #line 11940 "configure"
11940 #include "confdefs.h"
11941 #include <sys/types.h>
11942 #include <sys/statfs.h>
11943   main ()
11944   {
11945   struct statfs fsd;
11946   exit (statfs (".", &fsd, sizeof fsd, 0));
11947   }
11948 EOF
11949 if { (eval echo configure:11950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11950 then
11951   fu_cv_sys_stat_statfs4=yes
11952 else
11953   echo "configure: failed program was:" >&5
11954   cat conftest.$ac_ext >&5
11955   rm -fr conftest*
11956   fu_cv_sys_stat_statfs4=no
11957 fi
11958 rm -fr conftest*
11959 fi
11960
11961 fi
11962
11963   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
11964   if test $fu_cv_sys_stat_statfs4 = yes; then
11965     space=yes
11966     cat >> confdefs.h <<\EOF
11967 #define STAT_STATFS4 1
11968 EOF
11969
11970   fi
11971 fi
11972
11973 if test $space = no; then
11974 # 4.4BSD and NetBSD
11975   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
11976 echo "configure:11977: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
11977   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
11978   echo $ac_n "(cached) $ac_c" 1>&6
11979 else
11980   if test "$cross_compiling" = yes; then
11981   fu_cv_sys_stat_statfs2_fsize=no
11982 else
11983   cat > conftest.$ac_ext <<EOF
11984 #line 11985 "configure"
11985 #include "confdefs.h"
11986 #include <sys/types.h>
11987 #ifdef HAVE_SYS_PARAM_H
11988 #include <sys/param.h>
11989 #endif
11990 #ifdef HAVE_SYS_MOUNT_H
11991 #include <sys/mount.h>
11992 #endif
11993   main ()
11994   {
11995   struct statfs fsd;
11996   fsd.f_fsize = 0;
11997   exit (statfs (".", &fsd));
11998   }
11999 EOF
12000 if { (eval echo configure:12001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12001 then
12002   fu_cv_sys_stat_statfs2_fsize=yes
12003 else
12004   echo "configure: failed program was:" >&5
12005   cat conftest.$ac_ext >&5
12006   rm -fr conftest*
12007   fu_cv_sys_stat_statfs2_fsize=no
12008 fi
12009 rm -fr conftest*
12010 fi
12011
12012 fi
12013
12014   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12015   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12016     space=yes
12017     cat >> confdefs.h <<\EOF
12018 #define STAT_STATFS2_FSIZE 1
12019 EOF
12020
12021   fi
12022 fi
12023
12024 if test $space = no; then
12025   # Ultrix
12026   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12027 echo "configure:12028: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12028   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12029   echo $ac_n "(cached) $ac_c" 1>&6
12030 else
12031   if test "$cross_compiling" = yes; then
12032   fu_cv_sys_stat_fs_data=no
12033 else
12034   cat > conftest.$ac_ext <<EOF
12035 #line 12036 "configure"
12036 #include "confdefs.h"
12037 #include <sys/types.h>
12038 #ifdef HAVE_SYS_PARAM_H
12039 #include <sys/param.h>
12040 #endif
12041 #ifdef HAVE_SYS_MOUNT_H
12042 #include <sys/mount.h>
12043 #endif
12044 #ifdef HAVE_SYS_FS_TYPES_H
12045 #include <sys/fs_types.h>
12046 #endif
12047   main ()
12048   {
12049   struct fs_data fsd;
12050   /* Ultrix's statfs returns 1 for success,
12051      0 for not mounted, -1 for failure.  */
12052   exit (statfs (".", &fsd) != 1);
12053   }
12054 EOF
12055 if { (eval echo configure:12056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12056 then
12057   fu_cv_sys_stat_fs_data=yes
12058 else
12059   echo "configure: failed program was:" >&5
12060   cat conftest.$ac_ext >&5
12061   rm -fr conftest*
12062   fu_cv_sys_stat_fs_data=no
12063 fi
12064 rm -fr conftest*
12065 fi
12066
12067 fi
12068
12069   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12070   if test $fu_cv_sys_stat_fs_data = yes; then
12071     space=yes
12072     cat >> confdefs.h <<\EOF
12073 #define STAT_STATFS2_FS_DATA 1
12074 EOF
12075
12076   fi
12077 fi
12078
12079 #
12080 # As a gating factor for large file support, in order to
12081 # use <4GB files we must have the following minimal support
12082 # available.
12083 # long long, and a 64 bit off_t or off64_t.
12084 # If we don't have all of these then disable large
12085 # file support.
12086 #
12087 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12088 echo "configure:12089: checking if large file support can be enabled" >&5
12089 cat > conftest.$ac_ext <<EOF
12090 #line 12091 "configure"
12091 #include "confdefs.h"
12092
12093 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12094 #include <sys/types.h>
12095 #else
12096 __COMPILE_ERROR_
12097 #endif
12098
12099 int main() {
12100 int i
12101 ; return 0; }
12102 EOF
12103 if { (eval echo configure:12104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12104   rm -rf conftest*
12105   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12106 else
12107   echo "configure: failed program was:" >&5
12108   cat conftest.$ac_ext >&5
12109   rm -rf conftest*
12110   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12111 fi
12112 rm -f conftest*
12113 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12114     cat >> confdefs.h <<\EOF
12115 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12116 EOF
12117
12118 fi
12119 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12120
12121 # Check whether --with-spinlocks or --without-spinlocks was given.
12122 if test "${with_spinlocks+set}" = set; then
12123   withval="$with_spinlocks"
12124   :
12125 fi
12126
12127 if test "x$with_spinlocks" = "xyes"; then
12128     cat >> confdefs.h <<\EOF
12129 #define USE_SPINLOCKS 1
12130 EOF
12131
12132
12133     case "$host_cpu" in
12134         sparc)
12135             cat >> confdefs.h <<\EOF
12136 #define SPARC_SPINLOCKS 1
12137 EOF
12138
12139             ;;
12140
12141         i386|i486|i586|i686)
12142             cat >> confdefs.h <<\EOF
12143 #define INTEL_SPINLOCKS 1
12144 EOF
12145
12146             ;;
12147
12148         mips)
12149             cat >> confdefs.h <<\EOF
12150 #define MIPS_SPINLOCKS 1
12151 EOF
12152
12153             ;;
12154
12155         powerpc)
12156             cat >> confdefs.h <<\EOF
12157 #define POWERPC_SPINLOCKS 1
12158 EOF
12159
12160             ;;
12161     esac
12162 fi
12163
12164 #################################################
12165 # check for ACL support
12166
12167 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12168 echo "configure:12169: checking whether to support ACLs" >&5
12169 # Check whether --with-acl-support or --without-acl-support was given.
12170 if test "${with_acl_support+set}" = set; then
12171   withval="$with_acl_support"
12172    case "$withval" in
12173   yes)
12174
12175         case "$host_os" in
12176         *sysv5*)
12177             echo "$ac_t""Using UnixWare ACLs" 1>&6
12178             cat >> confdefs.h <<\EOF
12179 #define HAVE_UNIXWARE_ACLS 1
12180 EOF
12181
12182             ;;
12183         *solaris*)
12184             echo "$ac_t""Using solaris ACLs" 1>&6
12185             cat >> confdefs.h <<\EOF
12186 #define HAVE_SOLARIS_ACLS 1
12187 EOF
12188
12189             ;;
12190                 *irix*)
12191                         echo "$ac_t""Using IRIX ACLs" 1>&6
12192                         cat >> confdefs.h <<\EOF
12193 #define HAVE_IRIX_ACLS 1
12194 EOF
12195
12196                         ;;
12197                 *aix*)
12198                         echo "$ac_t""Using AIX ACLs" 1>&6
12199                         cat >> confdefs.h <<\EOF
12200 #define HAVE_AIX_ACLS 1
12201 EOF
12202
12203                         ;;
12204         *)
12205                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12206 echo "configure:12207: checking for acl_get_file in -lacl" >&5
12207 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12208 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12209   echo $ac_n "(cached) $ac_c" 1>&6
12210 else
12211   ac_save_LIBS="$LIBS"
12212 LIBS="-lacl  $LIBS"
12213 cat > conftest.$ac_ext <<EOF
12214 #line 12215 "configure"
12215 #include "confdefs.h"
12216 /* Override any gcc2 internal prototype to avoid an error.  */
12217 /* We use char because int might match the return type of a gcc2
12218     builtin and then its argument prototype would still apply.  */
12219 char acl_get_file();
12220
12221 int main() {
12222 acl_get_file()
12223 ; return 0; }
12224 EOF
12225 if { (eval echo configure:12226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12226   rm -rf conftest*
12227   eval "ac_cv_lib_$ac_lib_var=yes"
12228 else
12229   echo "configure: failed program was:" >&5
12230   cat conftest.$ac_ext >&5
12231   rm -rf conftest*
12232   eval "ac_cv_lib_$ac_lib_var=no"
12233 fi
12234 rm -f conftest*
12235 LIBS="$ac_save_LIBS"
12236
12237 fi
12238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12239   echo "$ac_t""yes" 1>&6
12240     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12241     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12242   cat >> confdefs.h <<EOF
12243 #define $ac_tr_lib 1
12244 EOF
12245
12246   LIBS="-lacl $LIBS"
12247
12248 else
12249   echo "$ac_t""no" 1>&6
12250 fi
12251
12252                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12253 echo "configure:12254: checking for ACL support" >&5
12254 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12255   echo $ac_n "(cached) $ac_c" 1>&6
12256 else
12257   
12258                         cat > conftest.$ac_ext <<EOF
12259 #line 12260 "configure"
12260 #include "confdefs.h"
12261 #include <sys/types.h>
12262 #include <sys/acl.h>
12263 int main() {
12264  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12265 ; return 0; }
12266 EOF
12267 if { (eval echo configure:12268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12268   rm -rf conftest*
12269   samba_cv_HAVE_POSIX_ACLS=yes
12270 else
12271   echo "configure: failed program was:" >&5
12272   cat conftest.$ac_ext >&5
12273   rm -rf conftest*
12274   samba_cv_HAVE_POSIX_ACLS=no
12275 fi
12276 rm -f conftest*
12277 fi
12278
12279 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12280                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12281                                 echo "$ac_t""Using posix ACLs" 1>&6
12282                                 cat >> confdefs.h <<\EOF
12283 #define HAVE_POSIX_ACLS 1
12284 EOF
12285
12286                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12287 echo "configure:12288: checking for acl_get_perm_np" >&5
12288 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12289   echo $ac_n "(cached) $ac_c" 1>&6
12290 else
12291   
12292                                 cat > conftest.$ac_ext <<EOF
12293 #line 12294 "configure"
12294 #include "confdefs.h"
12295 #include <sys/types.h>
12296 #include <sys/acl.h>
12297 int main() {
12298  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12299 ; return 0; }
12300 EOF
12301 if { (eval echo configure:12302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12302   rm -rf conftest*
12303   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12304 else
12305   echo "configure: failed program was:" >&5
12306   cat conftest.$ac_ext >&5
12307   rm -rf conftest*
12308   samba_cv_HAVE_ACL_GET_PERM_NP=no
12309 fi
12310 rm -f conftest*
12311 fi
12312
12313 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12314                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12315                                         cat >> confdefs.h <<\EOF
12316 #define HAVE_ACL_GET_PERM_NP 1
12317 EOF
12318
12319                                 fi
12320                         fi
12321             ;;
12322         esac
12323         ;;
12324   *)
12325     echo "$ac_t""no" 1>&6
12326     cat >> confdefs.h <<\EOF
12327 #define HAVE_NO_ACLS 1
12328 EOF
12329
12330     ;;
12331   esac 
12332 else
12333   cat >> confdefs.h <<\EOF
12334 #define HAVE_NO_ACLS 1
12335 EOF
12336
12337   echo "$ac_t""no" 1>&6
12338
12339 fi
12340
12341
12342 #################################################
12343 # check whether winbind is supported on this platform
12344
12345 echo $ac_n "checking whether to compile winbind""... $ac_c" 1>&6
12346 echo "configure:12347: checking whether to compile winbind" >&5
12347
12348 case "$host_os" in 
12349         *linux*|*solaris*)
12350                 WINBIND_TARGETS="$WINBIND_TARGETS \$(WINBIND_PROGS)"
12351                 case "$with_pam" in
12352                         yes)
12353                                 WINBIND_TARGETS="$WINBIND_TARGETS \$(WINBIND_PAM_PROGS)"
12354                         ;;
12355                         *)
12356                 esac
12357                 ;;
12358         *)
12359                 winbind_no_reason=", unsupported on $host_os"
12360                 ;;
12361 esac
12362
12363 # Check whether --with-winbind or --without-winbind was given.
12364 if test "${with_winbind+set}" = set; then
12365   withval="$with_winbind"
12366    
12367   case "$withval" in
12368         no)
12369                 WINBIND_TARGETS=""
12370                 winbind_reason=""
12371                 ;;
12372   esac 
12373 fi
12374
12375
12376 if test x"$WINBIND_TARGETS" = x; then
12377         echo "$ac_t""no$winbind_no_reason" 1>&6
12378 else
12379         echo "$ac_t""yes" 1>&6
12380 fi
12381
12382
12383
12384 #################################################
12385 # final configure stuff
12386
12387 echo "checking configure summary"
12388 if test "$cross_compiling" = yes; then
12389   :
12390 else
12391   cat > conftest.$ac_ext <<EOF
12392 #line 12393 "configure"
12393 #include "confdefs.h"
12394 #include "${srcdir-.}/tests/summary.c"
12395 EOF
12396 if { (eval echo configure:12397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12397 then
12398   echo "configure OK";
12399 else
12400   echo "configure: failed program was:" >&5
12401   cat conftest.$ac_ext >&5
12402   rm -fr conftest*
12403   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
12404 fi
12405 rm -fr conftest*
12406 fi
12407
12408
12409 builddir=`pwd`
12410
12411
12412 trap '' 1 2 15
12413 cat > confcache <<\EOF
12414 # This file is a shell script that caches the results of configure
12415 # tests run on this system so they can be shared between configure
12416 # scripts and configure runs.  It is not useful on other systems.
12417 # If it contains results you don't want to keep, you may remove or edit it.
12418 #
12419 # By default, configure uses ./config.cache as the cache file,
12420 # creating it if it does not exist already.  You can give configure
12421 # the --cache-file=FILE option to use a different cache file; that is
12422 # what configure does when it calls configure scripts in
12423 # subdirectories, so they share the cache.
12424 # Giving --cache-file=/dev/null disables caching, for debugging configure.
12425 # config.status only pays attention to the cache file if you give it the
12426 # --recheck option to rerun configure.
12427 #
12428 EOF
12429 # The following way of writing the cache mishandles newlines in values,
12430 # but we know of no workaround that is simple, portable, and efficient.
12431 # So, don't put newlines in cache variables' values.
12432 # Ultrix sh set writes to stderr and can't be redirected directly,
12433 # and sets the high bit in the cache file unless we assign to the vars.
12434 (set) 2>&1 |
12435   case `(ac_space=' '; set | grep ac_space) 2>&1` in
12436   *ac_space=\ *)
12437     # `set' does not quote correctly, so add quotes (double-quote substitution
12438     # turns \\\\ into \\, and sed turns \\ into \).
12439     sed -n \
12440       -e "s/'/'\\\\''/g" \
12441       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
12442     ;;
12443   *)
12444     # `set' quotes correctly as required by POSIX, so do not add quotes.
12445     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
12446     ;;
12447   esac >> confcache
12448 if cmp -s $cache_file confcache; then
12449   :
12450 else
12451   if test -w $cache_file; then
12452     echo "updating cache $cache_file"
12453     cat confcache > $cache_file
12454   else
12455     echo "not updating unwritable cache $cache_file"
12456   fi
12457 fi
12458 rm -f confcache
12459
12460 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12461
12462 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12463 # Let make expand exec_prefix.
12464 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12465
12466 # Any assignment to VPATH causes Sun make to only execute
12467 # the first set of double-colon rules, so remove it if not needed.
12468 # If there is a colon in the path, we need to keep it.
12469 if test "x$srcdir" = x.; then
12470   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12471 fi
12472
12473 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12474
12475 DEFS=-DHAVE_CONFIG_H
12476
12477 # Without the "./", some shells look in PATH for config.status.
12478 : ${CONFIG_STATUS=./config.status}
12479
12480 echo creating $CONFIG_STATUS
12481 rm -f $CONFIG_STATUS
12482 cat > $CONFIG_STATUS <<EOF
12483 #! /bin/sh
12484 # Generated automatically by configure.
12485 # Run this file to recreate the current configuration.
12486 # This directory was configured as follows,
12487 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12488 #
12489 # $0 $ac_configure_args
12490 #
12491 # Compiler output produced by configure, useful for debugging
12492 # configure, is in ./config.log if it exists.
12493
12494 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12495 for ac_option
12496 do
12497   case "\$ac_option" in
12498   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12499     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12500     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12501   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12502     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12503     exit 0 ;;
12504   -help | --help | --hel | --he | --h)
12505     echo "\$ac_cs_usage"; exit 0 ;;
12506   *) echo "\$ac_cs_usage"; exit 1 ;;
12507   esac
12508 done
12509
12510 ac_given_srcdir=$srcdir
12511 ac_given_INSTALL="$INSTALL"
12512
12513 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12514 EOF
12515 cat >> $CONFIG_STATUS <<EOF
12516
12517 # Protect against being on the right side of a sed subst in config.status.
12518 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12519  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12520 $ac_vpsub
12521 $extrasub
12522 s%@SHELL@%$SHELL%g
12523 s%@CFLAGS@%$CFLAGS%g
12524 s%@CPPFLAGS@%$CPPFLAGS%g
12525 s%@CXXFLAGS@%$CXXFLAGS%g
12526 s%@FFLAGS@%$FFLAGS%g
12527 s%@DEFS@%$DEFS%g
12528 s%@LDFLAGS@%$LDFLAGS%g
12529 s%@LIBS@%$LIBS%g
12530 s%@exec_prefix@%$exec_prefix%g
12531 s%@prefix@%$prefix%g
12532 s%@program_transform_name@%$program_transform_name%g
12533 s%@bindir@%$bindir%g
12534 s%@sbindir@%$sbindir%g
12535 s%@libexecdir@%$libexecdir%g
12536 s%@datadir@%$datadir%g
12537 s%@sysconfdir@%$sysconfdir%g
12538 s%@sharedstatedir@%$sharedstatedir%g
12539 s%@localstatedir@%$localstatedir%g
12540 s%@libdir@%$libdir%g
12541 s%@includedir@%$includedir%g
12542 s%@oldincludedir@%$oldincludedir%g
12543 s%@infodir@%$infodir%g
12544 s%@mandir@%$mandir%g
12545 s%@RUNPROG@%$RUNPROG%g
12546 s%@MPROGS@%$MPROGS%g
12547 s%@LDSHFLAGS@%$LDSHFLAGS%g
12548 s%@SHLD@%$SHLD%g
12549 s%@HOST_OS@%$HOST_OS%g
12550 s%@PAM_MOD@%$PAM_MOD%g
12551 s%@WRAP@%$WRAP%g
12552 s%@WRAP32@%$WRAP32%g
12553 s%@PICFLAG@%$PICFLAG%g
12554 s%@SHLIBEXT@%$SHLIBEXT%g
12555 s%@BLDSHARED@%$BLDSHARED%g
12556 s%@CC@%$CC%g
12557 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12558 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12559 s%@INSTALL_DATA@%$INSTALL_DATA%g
12560 s%@AWK@%$AWK%g
12561 s%@BROKEN_CC@%$BROKEN_CC%g
12562 s%@host@%$host%g
12563 s%@host_alias@%$host_alias%g
12564 s%@host_cpu@%$host_cpu%g
12565 s%@host_vendor@%$host_vendor%g
12566 s%@host_os@%$host_os%g
12567 s%@target@%$target%g
12568 s%@target_alias@%$target_alias%g
12569 s%@target_cpu@%$target_cpu%g
12570 s%@target_vendor@%$target_vendor%g
12571 s%@target_os@%$target_os%g
12572 s%@build@%$build%g
12573 s%@build_alias@%$build_alias%g
12574 s%@build_cpu@%$build_cpu%g
12575 s%@build_vendor@%$build_vendor%g
12576 s%@build_os@%$build_os%g
12577 s%@CPP@%$CPP%g
12578 s%@LIBOBJS@%$LIBOBJS%g
12579 s%@TERMLIBS@%$TERMLIBS%g
12580 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
12581 s%@ROFF@%$ROFF%g
12582 s%@QUOTAOBJS@%$QUOTAOBJS%g
12583 s%@privatedir@%$privatedir%g
12584 s%@lockdir@%$lockdir%g
12585 s%@swatdir@%$swatdir%g
12586 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
12587 s%@builddir@%$builddir%g
12588
12589 CEOF
12590 EOF
12591
12592 cat >> $CONFIG_STATUS <<\EOF
12593
12594 # Split the substitutions into bite-sized pieces for seds with
12595 # small command number limits, like on Digital OSF/1 and HP-UX.
12596 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12597 ac_file=1 # Number of current file.
12598 ac_beg=1 # First line for current file.
12599 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12600 ac_more_lines=:
12601 ac_sed_cmds=""
12602 while $ac_more_lines; do
12603   if test $ac_beg -gt 1; then
12604     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12605   else
12606     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12607   fi
12608   if test ! -s conftest.s$ac_file; then
12609     ac_more_lines=false
12610     rm -f conftest.s$ac_file
12611   else
12612     if test -z "$ac_sed_cmds"; then
12613       ac_sed_cmds="sed -f conftest.s$ac_file"
12614     else
12615       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12616     fi
12617     ac_file=`expr $ac_file + 1`
12618     ac_beg=$ac_end
12619     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12620   fi
12621 done
12622 if test -z "$ac_sed_cmds"; then
12623   ac_sed_cmds=cat
12624 fi
12625 EOF
12626
12627 cat >> $CONFIG_STATUS <<EOF
12628
12629 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
12630 EOF
12631 cat >> $CONFIG_STATUS <<\EOF
12632 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12633   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12634   case "$ac_file" in
12635   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12636        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12637   *) ac_file_in="${ac_file}.in" ;;
12638   esac
12639
12640   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12641
12642   # Remove last slash and all that follows it.  Not all systems have dirname.
12643   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12644   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12645     # The file is in a subdirectory.
12646     test ! -d "$ac_dir" && mkdir "$ac_dir"
12647     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12648     # A "../" for each directory in $ac_dir_suffix.
12649     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12650   else
12651     ac_dir_suffix= ac_dots=
12652   fi
12653
12654   case "$ac_given_srcdir" in
12655   .)  srcdir=.
12656       if test -z "$ac_dots"; then top_srcdir=.
12657       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12658   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12659   *) # Relative path.
12660     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12661     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12662   esac
12663
12664   case "$ac_given_INSTALL" in
12665   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12666   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12667   esac
12668
12669   echo creating "$ac_file"
12670   rm -f "$ac_file"
12671   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12672   case "$ac_file" in
12673   *Makefile*) ac_comsub="1i\\
12674 # $configure_input" ;;
12675   *) ac_comsub= ;;
12676   esac
12677
12678   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12679   sed -e "$ac_comsub
12680 s%@configure_input@%$configure_input%g
12681 s%@srcdir@%$srcdir%g
12682 s%@top_srcdir@%$top_srcdir%g
12683 s%@INSTALL@%$INSTALL%g
12684 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12685 fi; done
12686 rm -f conftest.s*
12687
12688 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12689 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12690 #
12691 # ac_d sets the value in "#define NAME VALUE" lines.
12692 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12693 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12694 ac_dC='\3'
12695 ac_dD='%g'
12696 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12697 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12698 ac_uB='\([      ]\)%\1#\2define\3'
12699 ac_uC=' '
12700 ac_uD='\4%g'
12701 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12702 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12703 ac_eB='$%\1#\2define\3'
12704 ac_eC=' '
12705 ac_eD='%g'
12706
12707 if test "${CONFIG_HEADERS+set}" != set; then
12708 EOF
12709 cat >> $CONFIG_STATUS <<EOF
12710   CONFIG_HEADERS="include/config.h"
12711 EOF
12712 cat >> $CONFIG_STATUS <<\EOF
12713 fi
12714 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12715   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12716   case "$ac_file" in
12717   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12718        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12719   *) ac_file_in="${ac_file}.in" ;;
12720   esac
12721
12722   echo creating $ac_file
12723
12724   rm -f conftest.frag conftest.in conftest.out
12725   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12726   cat $ac_file_inputs > conftest.in
12727
12728 EOF
12729
12730 # Transform confdefs.h into a sed script conftest.vals that substitutes
12731 # the proper values into config.h.in to produce config.h.  And first:
12732 # Protect against being on the right side of a sed subst in config.status.
12733 # Protect against being in an unquoted here document in config.status.
12734 rm -f conftest.vals
12735 cat > conftest.hdr <<\EOF
12736 s/[\\&%]/\\&/g
12737 s%[\\$`]%\\&%g
12738 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12739 s%ac_d%ac_u%gp
12740 s%ac_u%ac_e%gp
12741 EOF
12742 sed -n -f conftest.hdr confdefs.h > conftest.vals
12743 rm -f conftest.hdr
12744
12745 # This sed command replaces #undef with comments.  This is necessary, for
12746 # example, in the case of _POSIX_SOURCE, which is predefined and required
12747 # on some systems where configure will not decide to define it.
12748 cat >> conftest.vals <<\EOF
12749 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12750 EOF
12751
12752 # Break up conftest.vals because some shells have a limit on
12753 # the size of here documents, and old seds have small limits too.
12754
12755 rm -f conftest.tail
12756 while :
12757 do
12758   ac_lines=`grep -c . conftest.vals`
12759   # grep -c gives empty output for an empty file on some AIX systems.
12760   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12761   # Write a limited-size here document to conftest.frag.
12762   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12763   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12764   echo 'CEOF
12765   sed -f conftest.frag conftest.in > conftest.out
12766   rm -f conftest.in
12767   mv conftest.out conftest.in
12768 ' >> $CONFIG_STATUS
12769   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12770   rm -f conftest.vals
12771   mv conftest.tail conftest.vals
12772 done
12773 rm -f conftest.vals
12774
12775 cat >> $CONFIG_STATUS <<\EOF
12776   rm -f conftest.frag conftest.h
12777   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12778   cat conftest.in >> conftest.h
12779   rm -f conftest.in
12780   if cmp -s $ac_file conftest.h 2>/dev/null; then
12781     echo "$ac_file is unchanged"
12782     rm -f conftest.h
12783   else
12784     # Remove last slash and all that follows it.  Not all systems have dirname.
12785       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12786       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12787       # The file is in a subdirectory.
12788       test ! -d "$ac_dir" && mkdir "$ac_dir"
12789     fi
12790     rm -f $ac_file
12791     mv conftest.h $ac_file
12792   fi
12793 fi; done
12794
12795 EOF
12796 cat >> $CONFIG_STATUS <<EOF
12797
12798 EOF
12799 cat >> $CONFIG_STATUS <<\EOF
12800
12801 exit 0
12802 EOF
12803 chmod +x $CONFIG_STATUS
12804 rm -fr confdefs* $ac_clean_files
12805 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
12806