removed remnants of libtool
[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 # compile with optimisation and without debugging by default
624 CFLAGS="-O ${CFLAGS}"
625
626 # Check whether --enable-debug or --disable-debug was given.
627 if test "${enable_debug+set}" = set; then
628   enableval="$enable_debug"
629   if eval "test x$enable_debug = xyes"; then
630         CFLAGS="${CFLAGS} -g"
631     fi
632 fi
633
634
635
636 # Extract the first word of "gcc", so it can be a program name with args.
637 set dummy gcc; ac_word=$2
638 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
639 echo "configure:640: checking for $ac_word" >&5
640 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
641   echo $ac_n "(cached) $ac_c" 1>&6
642 else
643   if test -n "$CC"; then
644   ac_cv_prog_CC="$CC" # Let the user override the test.
645 else
646   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
647   ac_dummy="$PATH"
648   for ac_dir in $ac_dummy; do
649     test -z "$ac_dir" && ac_dir=.
650     if test -f $ac_dir/$ac_word; then
651       ac_cv_prog_CC="gcc"
652       break
653     fi
654   done
655   IFS="$ac_save_ifs"
656 fi
657 fi
658 CC="$ac_cv_prog_CC"
659 if test -n "$CC"; then
660   echo "$ac_t""$CC" 1>&6
661 else
662   echo "$ac_t""no" 1>&6
663 fi
664
665 if test -z "$CC"; then
666   # Extract the first word of "cc", so it can be a program name with args.
667 set dummy cc; ac_word=$2
668 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
669 echo "configure:670: checking for $ac_word" >&5
670 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
671   echo $ac_n "(cached) $ac_c" 1>&6
672 else
673   if test -n "$CC"; then
674   ac_cv_prog_CC="$CC" # Let the user override the test.
675 else
676   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
677   ac_prog_rejected=no
678   ac_dummy="$PATH"
679   for ac_dir in $ac_dummy; do
680     test -z "$ac_dir" && ac_dir=.
681     if test -f $ac_dir/$ac_word; then
682       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
683         ac_prog_rejected=yes
684         continue
685       fi
686       ac_cv_prog_CC="cc"
687       break
688     fi
689   done
690   IFS="$ac_save_ifs"
691 if test $ac_prog_rejected = yes; then
692   # We found a bogon in the path, so make sure we never use it.
693   set dummy $ac_cv_prog_CC
694   shift
695   if test $# -gt 0; then
696     # We chose a different compiler from the bogus one.
697     # However, it has the same basename, so the bogon will be chosen
698     # first if we set CC to just the basename; use the full file name.
699     shift
700     set dummy "$ac_dir/$ac_word" "$@"
701     shift
702     ac_cv_prog_CC="$@"
703   fi
704 fi
705 fi
706 fi
707 CC="$ac_cv_prog_CC"
708 if test -n "$CC"; then
709   echo "$ac_t""$CC" 1>&6
710 else
711   echo "$ac_t""no" 1>&6
712 fi
713
714   if test -z "$CC"; then
715     case "`uname -s`" in
716     *win32* | *WIN32*)
717       # Extract the first word of "cl", so it can be a program name with args.
718 set dummy cl; ac_word=$2
719 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
720 echo "configure:721: checking for $ac_word" >&5
721 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
722   echo $ac_n "(cached) $ac_c" 1>&6
723 else
724   if test -n "$CC"; then
725   ac_cv_prog_CC="$CC" # Let the user override the test.
726 else
727   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
728   ac_dummy="$PATH"
729   for ac_dir in $ac_dummy; do
730     test -z "$ac_dir" && ac_dir=.
731     if test -f $ac_dir/$ac_word; then
732       ac_cv_prog_CC="cl"
733       break
734     fi
735   done
736   IFS="$ac_save_ifs"
737 fi
738 fi
739 CC="$ac_cv_prog_CC"
740 if test -n "$CC"; then
741   echo "$ac_t""$CC" 1>&6
742 else
743   echo "$ac_t""no" 1>&6
744 fi
745  ;;
746     esac
747   fi
748   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
749 fi
750
751 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
752 echo "configure:753: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
753
754 ac_ext=c
755 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
756 ac_cpp='$CPP $CPPFLAGS'
757 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
758 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
759 cross_compiling=$ac_cv_prog_cc_cross
760
761 cat > conftest.$ac_ext << EOF
762
763 #line 764 "configure"
764 #include "confdefs.h"
765
766 main(){return(0);}
767 EOF
768 if { (eval echo configure:769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
769   ac_cv_prog_cc_works=yes
770   # If we can't run a trivial program, we are probably using a cross compiler.
771   if (./conftest; exit) 2>/dev/null; then
772     ac_cv_prog_cc_cross=no
773   else
774     ac_cv_prog_cc_cross=yes
775   fi
776 else
777   echo "configure: failed program was:" >&5
778   cat conftest.$ac_ext >&5
779   ac_cv_prog_cc_works=no
780 fi
781 rm -fr conftest*
782 ac_ext=c
783 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
784 ac_cpp='$CPP $CPPFLAGS'
785 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
786 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
787 cross_compiling=$ac_cv_prog_cc_cross
788
789 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
790 if test $ac_cv_prog_cc_works = no; then
791   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
792 fi
793 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
794 echo "configure:795: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
795 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
796 cross_compiling=$ac_cv_prog_cc_cross
797
798 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
799 echo "configure:800: checking whether we are using GNU C" >&5
800 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
801   echo $ac_n "(cached) $ac_c" 1>&6
802 else
803   cat > conftest.c <<EOF
804 #ifdef __GNUC__
805   yes;
806 #endif
807 EOF
808 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
809   ac_cv_prog_gcc=yes
810 else
811   ac_cv_prog_gcc=no
812 fi
813 fi
814
815 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
816
817 if test $ac_cv_prog_gcc = yes; then
818   GCC=yes
819 else
820   GCC=
821 fi
822
823 ac_test_CFLAGS="${CFLAGS+set}"
824 ac_save_CFLAGS="$CFLAGS"
825 CFLAGS=
826 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
827 echo "configure:828: checking whether ${CC-cc} accepts -g" >&5
828 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
829   echo $ac_n "(cached) $ac_c" 1>&6
830 else
831   echo 'void f(){}' > conftest.c
832 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
833   ac_cv_prog_cc_g=yes
834 else
835   ac_cv_prog_cc_g=no
836 fi
837 rm -f conftest*
838
839 fi
840
841 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
842 if test "$ac_test_CFLAGS" = set; then
843   CFLAGS="$ac_save_CFLAGS"
844 elif test $ac_cv_prog_cc_g = yes; then
845   if test "$GCC" = yes; then
846     CFLAGS="-g -O2"
847   else
848     CFLAGS="-g"
849   fi
850 else
851   if test "$GCC" = yes; then
852     CFLAGS="-O2"
853   else
854     CFLAGS=
855   fi
856 fi
857
858 ac_aux_dir=
859 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
860   if test -f $ac_dir/install-sh; then
861     ac_aux_dir=$ac_dir
862     ac_install_sh="$ac_aux_dir/install-sh -c"
863     break
864   elif test -f $ac_dir/install.sh; then
865     ac_aux_dir=$ac_dir
866     ac_install_sh="$ac_aux_dir/install.sh -c"
867     break
868   fi
869 done
870 if test -z "$ac_aux_dir"; then
871   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
872 fi
873 ac_config_guess=$ac_aux_dir/config.guess
874 ac_config_sub=$ac_aux_dir/config.sub
875 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
876
877 # Find a good install program.  We prefer a C program (faster),
878 # so one script is as good as another.  But avoid the broken or
879 # incompatible versions:
880 # SysV /etc/install, /usr/sbin/install
881 # SunOS /usr/etc/install
882 # IRIX /sbin/install
883 # AIX /bin/install
884 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
885 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
886 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
887 # ./install, which can be erroneously created by make from ./install.sh.
888 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
889 echo "configure:890: checking for a BSD compatible install" >&5
890 if test -z "$INSTALL"; then
891 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
892   echo $ac_n "(cached) $ac_c" 1>&6
893 else
894     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
895   for ac_dir in $PATH; do
896     # Account for people who put trailing slashes in PATH elements.
897     case "$ac_dir/" in
898     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
899     *)
900       # OSF1 and SCO ODT 3.0 have their own names for install.
901       # Don't use installbsd from OSF since it installs stuff as root
902       # by default.
903       for ac_prog in ginstall scoinst install; do
904         if test -f $ac_dir/$ac_prog; then
905           if test $ac_prog = install &&
906             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
907             # AIX install.  It has an incompatible calling convention.
908             :
909           else
910             ac_cv_path_install="$ac_dir/$ac_prog -c"
911             break 2
912           fi
913         fi
914       done
915       ;;
916     esac
917   done
918   IFS="$ac_save_IFS"
919
920 fi
921   if test "${ac_cv_path_install+set}" = set; then
922     INSTALL="$ac_cv_path_install"
923   else
924     # As a last resort, use the slow shell script.  We don't cache a
925     # path for INSTALL within a source directory, because that will
926     # break other packages using the cache if that directory is
927     # removed, or if the path is relative.
928     INSTALL="$ac_install_sh"
929   fi
930 fi
931 echo "$ac_t""$INSTALL" 1>&6
932
933 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
934 # It thinks the first close brace ends the variable substitution.
935 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
936
937 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
938
939 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
940
941 for ac_prog in mawk gawk nawk awk
942 do
943 # Extract the first word of "$ac_prog", so it can be a program name with args.
944 set dummy $ac_prog; ac_word=$2
945 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
946 echo "configure:947: checking for $ac_word" >&5
947 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
948   echo $ac_n "(cached) $ac_c" 1>&6
949 else
950   if test -n "$AWK"; then
951   ac_cv_prog_AWK="$AWK" # Let the user override the test.
952 else
953   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
954   ac_dummy="$PATH"
955   for ac_dir in $ac_dummy; do
956     test -z "$ac_dir" && ac_dir=.
957     if test -f $ac_dir/$ac_word; then
958       ac_cv_prog_AWK="$ac_prog"
959       break
960     fi
961   done
962   IFS="$ac_save_ifs"
963 fi
964 fi
965 AWK="$ac_cv_prog_AWK"
966 if test -n "$AWK"; then
967   echo "$ac_t""$AWK" 1>&6
968 else
969   echo "$ac_t""no" 1>&6
970 fi
971
972 test -n "$AWK" && break
973 done
974
975
976 if test "x$CC" != xcc; then
977   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
978 echo "configure:979: checking whether $CC and cc understand -c and -o together" >&5
979 else
980   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
981 echo "configure:982: checking whether cc understands -c and -o together" >&5
982 fi
983 set dummy $CC; ac_cc="`echo $2 |
984                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
985 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
986   echo $ac_n "(cached) $ac_c" 1>&6
987 else
988   echo 'foo(){}' > conftest.c
989 # Make sure it works both with $CC and with simple cc.
990 # We do the test twice because some compilers refuse to overwrite an
991 # existing .o file with -o, though they will create one.
992 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
993 if { (eval echo configure:994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
994    test -f conftest.o && { (eval echo configure:995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
995 then
996   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
997   if test "x$CC" != xcc; then
998     # Test first that cc exists at all.
999     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1000       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1001       if { (eval echo configure:1002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1002          test -f conftest.o && { (eval echo configure:1003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1003       then
1004         # cc works too.
1005         :
1006       else
1007         # cc exists but doesn't like -o.
1008         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1009       fi
1010     fi
1011   fi
1012 else
1013   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1014 fi
1015 rm -f conftest*
1016
1017 fi
1018 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1019   echo "$ac_t""yes" 1>&6
1020 else
1021   echo "$ac_t""no" 1>&6
1022   cat >> confdefs.h <<\EOF
1023 #define NO_MINUS_C_MINUS_O 1
1024 EOF
1025
1026 fi
1027
1028 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1029       BROKEN_CC=
1030 else
1031       BROKEN_CC=#
1032 fi
1033
1034
1035 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1036 echo "configure:1037: checking that the C compiler understands volatile" >&5
1037 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1038   echo $ac_n "(cached) $ac_c" 1>&6
1039 else
1040   
1041     cat > conftest.$ac_ext <<EOF
1042 #line 1043 "configure"
1043 #include "confdefs.h"
1044 #include <sys/types.h>
1045 int main() {
1046 volatile int i = 0
1047 ; return 0; }
1048 EOF
1049 if { (eval echo configure:1050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1050   rm -rf conftest*
1051   samba_cv_volatile=yes
1052 else
1053   echo "configure: failed program was:" >&5
1054   cat conftest.$ac_ext >&5
1055   rm -rf conftest*
1056   samba_cv_volatile=no
1057 fi
1058 rm -f conftest*
1059 fi
1060
1061 echo "$ac_t""$samba_cv_volatile" 1>&6
1062 if test x"$samba_cv_volatile" = x"yes"; then
1063    cat >> confdefs.h <<\EOF
1064 #define HAVE_VOLATILE 1
1065 EOF
1066
1067 fi
1068
1069
1070 #################################################
1071 # set codepage directory location
1072 # Check whether --with-codepagedir or --without-codepagedir was given.
1073 if test "${with_codepagedir+set}" = set; then
1074   withval="$with_codepagedir"
1075    case "$withval" in
1076   yes|no)
1077   #
1078   # Just in case anybody does it
1079   #
1080     echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2
1081   ;;
1082   * )
1083     codepagedir="$withval"
1084     ;;
1085   esac
1086 fi
1087
1088
1089
1090
1091 # Do some error checking and defaulting for the host and target type.
1092 # The inputs are:
1093 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1094 #
1095 # The rules are:
1096 # 1. You are not allowed to specify --host, --target, and nonopt at the
1097 #    same time.
1098 # 2. Host defaults to nonopt.
1099 # 3. If nonopt is not specified, then host defaults to the current host,
1100 #    as determined by config.guess.
1101 # 4. Target and build default to nonopt.
1102 # 5. If nonopt is not specified, then target and build default to host.
1103
1104 # The aliases save the names the user supplied, while $host etc.
1105 # will get canonicalized.
1106 case $host---$target---$nonopt in
1107 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1108 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1109 esac
1110
1111
1112 # Make sure we can run config.sub.
1113 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1114 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1115 fi
1116
1117 echo $ac_n "checking host system type""... $ac_c" 1>&6
1118 echo "configure:1119: checking host system type" >&5
1119
1120 host_alias=$host
1121 case "$host_alias" in
1122 NONE)
1123   case $nonopt in
1124   NONE)
1125     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1126     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1127     fi ;;
1128   *) host_alias=$nonopt ;;
1129   esac ;;
1130 esac
1131
1132 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1133 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1134 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1135 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1136 echo "$ac_t""$host" 1>&6
1137
1138 echo $ac_n "checking target system type""... $ac_c" 1>&6
1139 echo "configure:1140: checking target system type" >&5
1140
1141 target_alias=$target
1142 case "$target_alias" in
1143 NONE)
1144   case $nonopt in
1145   NONE) target_alias=$host_alias ;;
1146   *) target_alias=$nonopt ;;
1147   esac ;;
1148 esac
1149
1150 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1151 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1152 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1153 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1154 echo "$ac_t""$target" 1>&6
1155
1156 echo $ac_n "checking build system type""... $ac_c" 1>&6
1157 echo "configure:1158: checking build system type" >&5
1158
1159 build_alias=$build
1160 case "$build_alias" in
1161 NONE)
1162   case $nonopt in
1163   NONE) build_alias=$host_alias ;;
1164   *) build_alias=$nonopt ;;
1165   esac ;;
1166 esac
1167
1168 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1169 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1170 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1171 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1172 echo "$ac_t""$build" 1>&6
1173
1174 test "$host_alias" != "$target_alias" &&
1175   test "$program_prefix$program_suffix$program_transform_name" = \
1176     NONENONEs,x,x, &&
1177   program_prefix=${target_alias}-
1178
1179
1180   case "$host_os" in
1181         *irix6*) cat >> confdefs.h <<\EOF
1182 #include <standards.h>
1183 EOF
1184
1185         ;;
1186 esac
1187
1188
1189     
1190     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1191 echo "configure:1192: checking config.cache system type" >&5
1192     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1193          test x"$ac_cv_host_system_type" != x"$host"; } ||
1194        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1195          test x"$ac_cv_build_system_type" != x"$build"; } ||
1196        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1197          test x"$ac_cv_target_system_type" != x"$target"; }; then
1198         echo "$ac_t""different" 1>&6
1199         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1200     else
1201         echo "$ac_t""same" 1>&6
1202     fi
1203     ac_cv_host_system_type="$host"
1204     ac_cv_build_system_type="$build"
1205     ac_cv_target_system_type="$target"
1206
1207
1208 #
1209 # Config CPPFLAG settings for strange OS's that must be set
1210 # before other tests.
1211 #
1212 case "$host_os" in
1213 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1214     *hpux*)
1215       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1216 echo "configure:1217: checking whether ${CC-cc} accepts -Ae" >&5
1217 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1218   echo $ac_n "(cached) $ac_c" 1>&6
1219 else
1220   echo 'void f(){}' > conftest.c
1221 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1222   ac_cv_prog_cc_Ae=yes
1223 else
1224   ac_cv_prog_cc_Ae=no
1225 fi
1226 rm -f conftest*
1227
1228 fi
1229
1230 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1231       if test $ac_cv_prog_cc_Ae = yes; then
1232         CPPFLAGS="$CPPFLAGS -Ae"
1233       fi
1234 #
1235 # Defines needed for HPUX support.
1236 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1237 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1238 #
1239       case `uname -r` in
1240                         *9*|*10*)
1241                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1242                                 cat >> confdefs.h <<\EOF
1243 #define USE_BOTH_CRYPT_CALLS 1
1244 EOF
1245
1246                                 ;;
1247                         *11*)
1248                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1249                                 cat >> confdefs.h <<\EOF
1250 #define USE_BOTH_CRYPT_CALLS 1
1251 EOF
1252
1253                                 ;;
1254       esac
1255       ;;
1256 #
1257 # AIX4.x doesn't even admit to having large
1258 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1259 #
1260     *aix4*)
1261           echo "$ac_t""enabling large file support" 1>&6
1262       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1263       ;;    
1264 #
1265 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1266 # to the existance of large files..
1267 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1268 # recommendations on large file support, however it makes the
1269 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1270 # recommendation makes the compile fail on gcc2.7. JRA.
1271 #
1272         *solaris*)
1273                 case `uname -r` in
1274                         5.6*|5.7*)
1275                         echo "$ac_t""enabling large file support" 1>&6
1276                         if test "$ac_cv_prog_gcc" = yes; then
1277                                 ${CC-cc} -v >conftest.c 2>&1
1278                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1279                                 rm -fr conftest.c
1280                                 case "$ac_cv_gcc_compiler_version_number" in
1281                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1282                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1283                                                 ;;
1284                                         *)
1285                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1286                                                 ;;
1287                                 esac
1288                         else
1289                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1290                         fi
1291                         ;;
1292                 esac
1293                 ;;
1294 #
1295 # Tests needed for SINIX large file support.
1296 #
1297     *sysv4*)
1298       if test $host = mips-sni-sysv4 ; then
1299         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1300 echo "configure:1301: checking for LFS support" >&5
1301         old_CPPFLAGS="$CPPFLAGS"
1302         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1303         if test "$cross_compiling" = yes; then
1304   SINIX_LFS_SUPPORT=cross
1305 else
1306   cat > conftest.$ac_ext <<EOF
1307 #line 1308 "configure"
1308 #include "confdefs.h"
1309
1310 #include <unistd.h>
1311 main () {
1312 #if _LFS64_LARGEFILE == 1
1313 exit(0);
1314 #else
1315 exit(1);
1316 #endif
1317 }
1318 EOF
1319 if { (eval echo configure:1320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1320 then
1321   SINIX_LFS_SUPPORT=yes
1322 else
1323   echo "configure: failed program was:" >&5
1324   cat conftest.$ac_ext >&5
1325   rm -fr conftest*
1326   SINIX_LFS_SUPPORT=no
1327 fi
1328 rm -fr conftest*
1329 fi
1330
1331         CPPFLAGS="$old_CPPFLAGS"
1332         if test x$SINIX_LFS_SUPPORT = xyes ; then
1333           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1334           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1335           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1336           LIBS="`getconf LFS64_LIBS` $LIBS"
1337         fi
1338       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1339       fi
1340     ;;
1341
1342 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1343 #
1344     *linux*)
1345         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1346 echo "configure:1347: checking for LFS support" >&5
1347         old_CPPFLAGS="$CPPFLAGS"
1348         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1349        if test "$cross_compiling" = yes; then
1350   LINUX_LFS_SUPPORT=cross
1351 else
1352   cat > conftest.$ac_ext <<EOF
1353 #line 1354 "configure"
1354 #include "confdefs.h"
1355
1356 #include <unistd.h>
1357 #include <sys/utsname.h>
1358 main() {
1359 #if _LFS64_LARGEFILE == 1
1360        struct utsname uts;
1361        char *release;
1362        int major, minor;
1363
1364        /* Ensure this is glibc 2.2 or higher */
1365 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1366        int libc_major = __GLIBC__;
1367        int libc_minor = __GLIBC_MINOR__;
1368
1369        if (libc_major < 2)
1370               exit(1);
1371        if (libc_minor < 2)
1372               exit(1);
1373 #endif
1374
1375        /* Ensure this is kernel 2.4 or higher */
1376
1377        uname(&uts);
1378        release = uts.release;
1379        major = atoi(strsep(&release, "."));
1380        minor = atoi(strsep(&release, "."));
1381
1382        if (major > 2 || (major == 2 && minor > 3))
1383                exit(0);
1384        exit(1);
1385 #else
1386        exit(1);
1387 #endif
1388 }
1389
1390 EOF
1391 if { (eval echo configure:1392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1392 then
1393   LINUX_LFS_SUPPORT=yes
1394 else
1395   echo "configure: failed program was:" >&5
1396   cat conftest.$ac_ext >&5
1397   rm -fr conftest*
1398   LINUX_LFS_SUPPORT=no
1399 fi
1400 rm -fr conftest*
1401 fi
1402
1403         CPPFLAGS="$old_CPPFLAGS"
1404         if test x$LINUX_LFS_SUPPORT = xyes ; then
1405           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1406         fi
1407        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1408                 ;;
1409
1410     *hurd*)
1411         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1412 echo "configure:1413: checking for LFS support" >&5
1413         old_CPPFLAGS="$CPPFLAGS"
1414         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1415         if test "$cross_compiling" = yes; then
1416   GLIBC_LFS_SUPPORT=cross
1417 else
1418   cat > conftest.$ac_ext <<EOF
1419 #line 1420 "configure"
1420 #include "confdefs.h"
1421
1422 #include <unistd.h>
1423 main () {
1424 #if _LFS64_LARGEFILE == 1
1425 exit(0);
1426 #else
1427 exit(1);
1428 #endif
1429 }
1430 EOF
1431 if { (eval echo configure:1432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1432 then
1433   GLIBC_LFS_SUPPORT=yes
1434 else
1435   echo "configure: failed program was:" >&5
1436   cat conftest.$ac_ext >&5
1437   rm -fr conftest*
1438   GLIBC_LFS_SUPPORT=no
1439 fi
1440 rm -fr conftest*
1441 fi
1442
1443         CPPFLAGS="$old_CPPFLAGS"
1444         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1445           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1446         fi
1447       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1448     ;;
1449
1450 esac
1451
1452 echo $ac_n "checking for inline""... $ac_c" 1>&6
1453 echo "configure:1454: checking for inline" >&5
1454 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1455   echo $ac_n "(cached) $ac_c" 1>&6
1456 else
1457   ac_cv_c_inline=no
1458 for ac_kw in inline __inline__ __inline; do
1459   cat > conftest.$ac_ext <<EOF
1460 #line 1461 "configure"
1461 #include "confdefs.h"
1462
1463 int main() {
1464 } $ac_kw foo() {
1465 ; return 0; }
1466 EOF
1467 if { (eval echo configure:1468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1468   rm -rf conftest*
1469   ac_cv_c_inline=$ac_kw; break
1470 else
1471   echo "configure: failed program was:" >&5
1472   cat conftest.$ac_ext >&5
1473 fi
1474 rm -f conftest*
1475 done
1476
1477 fi
1478
1479 echo "$ac_t""$ac_cv_c_inline" 1>&6
1480 case "$ac_cv_c_inline" in
1481   inline | yes) ;;
1482   no) cat >> confdefs.h <<\EOF
1483 #define inline 
1484 EOF
1485  ;;
1486   *)  cat >> confdefs.h <<EOF
1487 #define inline $ac_cv_c_inline
1488 EOF
1489  ;;
1490 esac
1491
1492 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1493 echo "configure:1494: checking how to run the C preprocessor" >&5
1494 # On Suns, sometimes $CPP names a directory.
1495 if test -n "$CPP" && test -d "$CPP"; then
1496   CPP=
1497 fi
1498 if test -z "$CPP"; then
1499 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1500   echo $ac_n "(cached) $ac_c" 1>&6
1501 else
1502     # This must be in double quotes, not single quotes, because CPP may get
1503   # substituted into the Makefile and "${CC-cc}" will confuse make.
1504   CPP="${CC-cc} -E"
1505   # On the NeXT, cc -E runs the code through the compiler's parser,
1506   # not just through cpp.
1507   cat > conftest.$ac_ext <<EOF
1508 #line 1509 "configure"
1509 #include "confdefs.h"
1510 #include <assert.h>
1511 Syntax Error
1512 EOF
1513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1514 { (eval echo configure:1515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1516 if test -z "$ac_err"; then
1517   :
1518 else
1519   echo "$ac_err" >&5
1520   echo "configure: failed program was:" >&5
1521   cat conftest.$ac_ext >&5
1522   rm -rf conftest*
1523   CPP="${CC-cc} -E -traditional-cpp"
1524   cat > conftest.$ac_ext <<EOF
1525 #line 1526 "configure"
1526 #include "confdefs.h"
1527 #include <assert.h>
1528 Syntax Error
1529 EOF
1530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1531 { (eval echo configure:1532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1533 if test -z "$ac_err"; then
1534   :
1535 else
1536   echo "$ac_err" >&5
1537   echo "configure: failed program was:" >&5
1538   cat conftest.$ac_ext >&5
1539   rm -rf conftest*
1540   CPP="${CC-cc} -nologo -E"
1541   cat > conftest.$ac_ext <<EOF
1542 #line 1543 "configure"
1543 #include "confdefs.h"
1544 #include <assert.h>
1545 Syntax Error
1546 EOF
1547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1548 { (eval echo configure:1549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1550 if test -z "$ac_err"; then
1551   :
1552 else
1553   echo "$ac_err" >&5
1554   echo "configure: failed program was:" >&5
1555   cat conftest.$ac_ext >&5
1556   rm -rf conftest*
1557   CPP=/lib/cpp
1558 fi
1559 rm -f conftest*
1560 fi
1561 rm -f conftest*
1562 fi
1563 rm -f conftest*
1564   ac_cv_prog_CPP="$CPP"
1565 fi
1566   CPP="$ac_cv_prog_CPP"
1567 else
1568   ac_cv_prog_CPP="$CPP"
1569 fi
1570 echo "$ac_t""$CPP" 1>&6
1571
1572 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1573 echo "configure:1574: checking for ANSI C header files" >&5
1574 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1575   echo $ac_n "(cached) $ac_c" 1>&6
1576 else
1577   cat > conftest.$ac_ext <<EOF
1578 #line 1579 "configure"
1579 #include "confdefs.h"
1580 #include <stdlib.h>
1581 #include <stdarg.h>
1582 #include <string.h>
1583 #include <float.h>
1584 EOF
1585 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1586 { (eval echo configure:1587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1587 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1588 if test -z "$ac_err"; then
1589   rm -rf conftest*
1590   ac_cv_header_stdc=yes
1591 else
1592   echo "$ac_err" >&5
1593   echo "configure: failed program was:" >&5
1594   cat conftest.$ac_ext >&5
1595   rm -rf conftest*
1596   ac_cv_header_stdc=no
1597 fi
1598 rm -f conftest*
1599
1600 if test $ac_cv_header_stdc = yes; then
1601   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1602 cat > conftest.$ac_ext <<EOF
1603 #line 1604 "configure"
1604 #include "confdefs.h"
1605 #include <string.h>
1606 EOF
1607 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1608   egrep "memchr" >/dev/null 2>&1; then
1609   :
1610 else
1611   rm -rf conftest*
1612   ac_cv_header_stdc=no
1613 fi
1614 rm -f conftest*
1615
1616 fi
1617
1618 if test $ac_cv_header_stdc = yes; then
1619   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1620 cat > conftest.$ac_ext <<EOF
1621 #line 1622 "configure"
1622 #include "confdefs.h"
1623 #include <stdlib.h>
1624 EOF
1625 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1626   egrep "free" >/dev/null 2>&1; then
1627   :
1628 else
1629   rm -rf conftest*
1630   ac_cv_header_stdc=no
1631 fi
1632 rm -f conftest*
1633
1634 fi
1635
1636 if test $ac_cv_header_stdc = yes; then
1637   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1638 if test "$cross_compiling" = yes; then
1639   :
1640 else
1641   cat > conftest.$ac_ext <<EOF
1642 #line 1643 "configure"
1643 #include "confdefs.h"
1644 #include <ctype.h>
1645 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1646 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1647 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1648 int main () { int i; for (i = 0; i < 256; i++)
1649 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1650 exit (0); }
1651
1652 EOF
1653 if { (eval echo configure:1654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1654 then
1655   :
1656 else
1657   echo "configure: failed program was:" >&5
1658   cat conftest.$ac_ext >&5
1659   rm -fr conftest*
1660   ac_cv_header_stdc=no
1661 fi
1662 rm -fr conftest*
1663 fi
1664
1665 fi
1666 fi
1667
1668 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1669 if test $ac_cv_header_stdc = yes; then
1670   cat >> confdefs.h <<\EOF
1671 #define STDC_HEADERS 1
1672 EOF
1673
1674 fi
1675
1676 ac_header_dirent=no
1677 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1678 do
1679 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1680 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1681 echo "configure:1682: checking for $ac_hdr that defines DIR" >&5
1682 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1683   echo $ac_n "(cached) $ac_c" 1>&6
1684 else
1685   cat > conftest.$ac_ext <<EOF
1686 #line 1687 "configure"
1687 #include "confdefs.h"
1688 #include <sys/types.h>
1689 #include <$ac_hdr>
1690 int main() {
1691 DIR *dirp = 0;
1692 ; return 0; }
1693 EOF
1694 if { (eval echo configure:1695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1695   rm -rf conftest*
1696   eval "ac_cv_header_dirent_$ac_safe=yes"
1697 else
1698   echo "configure: failed program was:" >&5
1699   cat conftest.$ac_ext >&5
1700   rm -rf conftest*
1701   eval "ac_cv_header_dirent_$ac_safe=no"
1702 fi
1703 rm -f conftest*
1704 fi
1705 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1706   echo "$ac_t""yes" 1>&6
1707     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1708   cat >> confdefs.h <<EOF
1709 #define $ac_tr_hdr 1
1710 EOF
1711  ac_header_dirent=$ac_hdr; break
1712 else
1713   echo "$ac_t""no" 1>&6
1714 fi
1715 done
1716 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1717 if test $ac_header_dirent = dirent.h; then
1718 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1719 echo "configure:1720: checking for opendir in -ldir" >&5
1720 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1721 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1722   echo $ac_n "(cached) $ac_c" 1>&6
1723 else
1724   ac_save_LIBS="$LIBS"
1725 LIBS="-ldir  $LIBS"
1726 cat > conftest.$ac_ext <<EOF
1727 #line 1728 "configure"
1728 #include "confdefs.h"
1729 /* Override any gcc2 internal prototype to avoid an error.  */
1730 /* We use char because int might match the return type of a gcc2
1731     builtin and then its argument prototype would still apply.  */
1732 char opendir();
1733
1734 int main() {
1735 opendir()
1736 ; return 0; }
1737 EOF
1738 if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1739   rm -rf conftest*
1740   eval "ac_cv_lib_$ac_lib_var=yes"
1741 else
1742   echo "configure: failed program was:" >&5
1743   cat conftest.$ac_ext >&5
1744   rm -rf conftest*
1745   eval "ac_cv_lib_$ac_lib_var=no"
1746 fi
1747 rm -f conftest*
1748 LIBS="$ac_save_LIBS"
1749
1750 fi
1751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1752   echo "$ac_t""yes" 1>&6
1753   LIBS="$LIBS -ldir"
1754 else
1755   echo "$ac_t""no" 1>&6
1756 fi
1757
1758 else
1759 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1760 echo "configure:1761: checking for opendir in -lx" >&5
1761 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1762 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1763   echo $ac_n "(cached) $ac_c" 1>&6
1764 else
1765   ac_save_LIBS="$LIBS"
1766 LIBS="-lx  $LIBS"
1767 cat > conftest.$ac_ext <<EOF
1768 #line 1769 "configure"
1769 #include "confdefs.h"
1770 /* Override any gcc2 internal prototype to avoid an error.  */
1771 /* We use char because int might match the return type of a gcc2
1772     builtin and then its argument prototype would still apply.  */
1773 char opendir();
1774
1775 int main() {
1776 opendir()
1777 ; return 0; }
1778 EOF
1779 if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1780   rm -rf conftest*
1781   eval "ac_cv_lib_$ac_lib_var=yes"
1782 else
1783   echo "configure: failed program was:" >&5
1784   cat conftest.$ac_ext >&5
1785   rm -rf conftest*
1786   eval "ac_cv_lib_$ac_lib_var=no"
1787 fi
1788 rm -f conftest*
1789 LIBS="$ac_save_LIBS"
1790
1791 fi
1792 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1793   echo "$ac_t""yes" 1>&6
1794   LIBS="$LIBS -lx"
1795 else
1796   echo "$ac_t""no" 1>&6
1797 fi
1798
1799 fi
1800
1801 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1802 echo "configure:1803: checking whether time.h and sys/time.h may both be included" >&5
1803 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1804   echo $ac_n "(cached) $ac_c" 1>&6
1805 else
1806   cat > conftest.$ac_ext <<EOF
1807 #line 1808 "configure"
1808 #include "confdefs.h"
1809 #include <sys/types.h>
1810 #include <sys/time.h>
1811 #include <time.h>
1812 int main() {
1813 struct tm *tp;
1814 ; return 0; }
1815 EOF
1816 if { (eval echo configure:1817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1817   rm -rf conftest*
1818   ac_cv_header_time=yes
1819 else
1820   echo "configure: failed program was:" >&5
1821   cat conftest.$ac_ext >&5
1822   rm -rf conftest*
1823   ac_cv_header_time=no
1824 fi
1825 rm -f conftest*
1826 fi
1827
1828 echo "$ac_t""$ac_cv_header_time" 1>&6
1829 if test $ac_cv_header_time = yes; then
1830   cat >> confdefs.h <<\EOF
1831 #define TIME_WITH_SYS_TIME 1
1832 EOF
1833
1834 fi
1835
1836 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1837 echo "configure:1838: checking for sys/wait.h that is POSIX.1 compatible" >&5
1838 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1839   echo $ac_n "(cached) $ac_c" 1>&6
1840 else
1841   cat > conftest.$ac_ext <<EOF
1842 #line 1843 "configure"
1843 #include "confdefs.h"
1844 #include <sys/types.h>
1845 #include <sys/wait.h>
1846 #ifndef WEXITSTATUS
1847 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1848 #endif
1849 #ifndef WIFEXITED
1850 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1851 #endif
1852 int main() {
1853 int s;
1854 wait (&s);
1855 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1856 ; return 0; }
1857 EOF
1858 if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1859   rm -rf conftest*
1860   ac_cv_header_sys_wait_h=yes
1861 else
1862   echo "configure: failed program was:" >&5
1863   cat conftest.$ac_ext >&5
1864   rm -rf conftest*
1865   ac_cv_header_sys_wait_h=no
1866 fi
1867 rm -f conftest*
1868 fi
1869
1870 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1871 if test $ac_cv_header_sys_wait_h = yes; then
1872   cat >> confdefs.h <<\EOF
1873 #define HAVE_SYS_WAIT_H 1
1874 EOF
1875
1876 fi
1877
1878 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1879 do
1880 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1881 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1882 echo "configure:1883: checking for $ac_hdr" >&5
1883 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1884   echo $ac_n "(cached) $ac_c" 1>&6
1885 else
1886   cat > conftest.$ac_ext <<EOF
1887 #line 1888 "configure"
1888 #include "confdefs.h"
1889 #include <$ac_hdr>
1890 EOF
1891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1892 { (eval echo configure:1893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1894 if test -z "$ac_err"; then
1895   rm -rf conftest*
1896   eval "ac_cv_header_$ac_safe=yes"
1897 else
1898   echo "$ac_err" >&5
1899   echo "configure: failed program was:" >&5
1900   cat conftest.$ac_ext >&5
1901   rm -rf conftest*
1902   eval "ac_cv_header_$ac_safe=no"
1903 fi
1904 rm -f conftest*
1905 fi
1906 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1907   echo "$ac_t""yes" 1>&6
1908     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1909   cat >> confdefs.h <<EOF
1910 #define $ac_tr_hdr 1
1911 EOF
1912  
1913 else
1914   echo "$ac_t""no" 1>&6
1915 fi
1916 done
1917
1918 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1919 do
1920 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1921 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1922 echo "configure:1923: checking for $ac_hdr" >&5
1923 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1924   echo $ac_n "(cached) $ac_c" 1>&6
1925 else
1926   cat > conftest.$ac_ext <<EOF
1927 #line 1928 "configure"
1928 #include "confdefs.h"
1929 #include <$ac_hdr>
1930 EOF
1931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1932 { (eval echo configure:1933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1934 if test -z "$ac_err"; then
1935   rm -rf conftest*
1936   eval "ac_cv_header_$ac_safe=yes"
1937 else
1938   echo "$ac_err" >&5
1939   echo "configure: failed program was:" >&5
1940   cat conftest.$ac_ext >&5
1941   rm -rf conftest*
1942   eval "ac_cv_header_$ac_safe=no"
1943 fi
1944 rm -f conftest*
1945 fi
1946 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1947   echo "$ac_t""yes" 1>&6
1948     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1949   cat >> confdefs.h <<EOF
1950 #define $ac_tr_hdr 1
1951 EOF
1952  
1953 else
1954   echo "$ac_t""no" 1>&6
1955 fi
1956 done
1957
1958 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1959 do
1960 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1961 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1962 echo "configure:1963: checking for $ac_hdr" >&5
1963 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1964   echo $ac_n "(cached) $ac_c" 1>&6
1965 else
1966   cat > conftest.$ac_ext <<EOF
1967 #line 1968 "configure"
1968 #include "confdefs.h"
1969 #include <$ac_hdr>
1970 EOF
1971 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1972 { (eval echo configure:1973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1973 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1974 if test -z "$ac_err"; then
1975   rm -rf conftest*
1976   eval "ac_cv_header_$ac_safe=yes"
1977 else
1978   echo "$ac_err" >&5
1979   echo "configure: failed program was:" >&5
1980   cat conftest.$ac_ext >&5
1981   rm -rf conftest*
1982   eval "ac_cv_header_$ac_safe=no"
1983 fi
1984 rm -f conftest*
1985 fi
1986 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1987   echo "$ac_t""yes" 1>&6
1988     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1989   cat >> confdefs.h <<EOF
1990 #define $ac_tr_hdr 1
1991 EOF
1992  
1993 else
1994   echo "$ac_t""no" 1>&6
1995 fi
1996 done
1997
1998 for ac_hdr in sys/param.h ctype.h sys/un.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
1999 do
2000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2002 echo "configure:2003: checking for $ac_hdr" >&5
2003 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2004   echo $ac_n "(cached) $ac_c" 1>&6
2005 else
2006   cat > conftest.$ac_ext <<EOF
2007 #line 2008 "configure"
2008 #include "confdefs.h"
2009 #include <$ac_hdr>
2010 EOF
2011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2012 { (eval echo configure:2013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2014 if test -z "$ac_err"; then
2015   rm -rf conftest*
2016   eval "ac_cv_header_$ac_safe=yes"
2017 else
2018   echo "$ac_err" >&5
2019   echo "configure: failed program was:" >&5
2020   cat conftest.$ac_ext >&5
2021   rm -rf conftest*
2022   eval "ac_cv_header_$ac_safe=no"
2023 fi
2024 rm -f conftest*
2025 fi
2026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2027   echo "$ac_t""yes" 1>&6
2028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2029   cat >> confdefs.h <<EOF
2030 #define $ac_tr_hdr 1
2031 EOF
2032  
2033 else
2034   echo "$ac_t""no" 1>&6
2035 fi
2036 done
2037
2038 for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h
2039 do
2040 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2041 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2042 echo "configure:2043: checking for $ac_hdr" >&5
2043 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2044   echo $ac_n "(cached) $ac_c" 1>&6
2045 else
2046   cat > conftest.$ac_ext <<EOF
2047 #line 2048 "configure"
2048 #include "confdefs.h"
2049 #include <$ac_hdr>
2050 EOF
2051 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2052 { (eval echo configure:2053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2053 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2054 if test -z "$ac_err"; then
2055   rm -rf conftest*
2056   eval "ac_cv_header_$ac_safe=yes"
2057 else
2058   echo "$ac_err" >&5
2059   echo "configure: failed program was:" >&5
2060   cat conftest.$ac_ext >&5
2061   rm -rf conftest*
2062   eval "ac_cv_header_$ac_safe=no"
2063 fi
2064 rm -f conftest*
2065 fi
2066 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2067   echo "$ac_t""yes" 1>&6
2068     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2069   cat >> confdefs.h <<EOF
2070 #define $ac_tr_hdr 1
2071 EOF
2072  
2073 else
2074   echo "$ac_t""no" 1>&6
2075 fi
2076 done
2077
2078 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2079 do
2080 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2081 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2082 echo "configure:2083: checking for $ac_hdr" >&5
2083 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2084   echo $ac_n "(cached) $ac_c" 1>&6
2085 else
2086   cat > conftest.$ac_ext <<EOF
2087 #line 2088 "configure"
2088 #include "confdefs.h"
2089 #include <$ac_hdr>
2090 EOF
2091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2092 { (eval echo configure:2093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2094 if test -z "$ac_err"; then
2095   rm -rf conftest*
2096   eval "ac_cv_header_$ac_safe=yes"
2097 else
2098   echo "$ac_err" >&5
2099   echo "configure: failed program was:" >&5
2100   cat conftest.$ac_ext >&5
2101   rm -rf conftest*
2102   eval "ac_cv_header_$ac_safe=no"
2103 fi
2104 rm -f conftest*
2105 fi
2106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2107   echo "$ac_t""yes" 1>&6
2108     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2109   cat >> confdefs.h <<EOF
2110 #define $ac_tr_hdr 1
2111 EOF
2112  
2113 else
2114   echo "$ac_t""no" 1>&6
2115 fi
2116 done
2117
2118 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2119 do
2120 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2121 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2122 echo "configure:2123: checking for $ac_hdr" >&5
2123 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2124   echo $ac_n "(cached) $ac_c" 1>&6
2125 else
2126   cat > conftest.$ac_ext <<EOF
2127 #line 2128 "configure"
2128 #include "confdefs.h"
2129 #include <$ac_hdr>
2130 EOF
2131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2132 { (eval echo configure:2133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2134 if test -z "$ac_err"; then
2135   rm -rf conftest*
2136   eval "ac_cv_header_$ac_safe=yes"
2137 else
2138   echo "$ac_err" >&5
2139   echo "configure: failed program was:" >&5
2140   cat conftest.$ac_ext >&5
2141   rm -rf conftest*
2142   eval "ac_cv_header_$ac_safe=no"
2143 fi
2144 rm -f conftest*
2145 fi
2146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2147   echo "$ac_t""yes" 1>&6
2148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2149   cat >> confdefs.h <<EOF
2150 #define $ac_tr_hdr 1
2151 EOF
2152  
2153 else
2154   echo "$ac_t""no" 1>&6
2155 fi
2156 done
2157
2158 for ac_hdr in security/pam_modules.h security/_pam_macros.h
2159 do
2160 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2161 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2162 echo "configure:2163: checking for $ac_hdr" >&5
2163 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2164   echo $ac_n "(cached) $ac_c" 1>&6
2165 else
2166   cat > conftest.$ac_ext <<EOF
2167 #line 2168 "configure"
2168 #include "confdefs.h"
2169 #include <$ac_hdr>
2170 EOF
2171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2172 { (eval echo configure:2173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2174 if test -z "$ac_err"; then
2175   rm -rf conftest*
2176   eval "ac_cv_header_$ac_safe=yes"
2177 else
2178   echo "$ac_err" >&5
2179   echo "configure: failed program was:" >&5
2180   cat conftest.$ac_ext >&5
2181   rm -rf conftest*
2182   eval "ac_cv_header_$ac_safe=no"
2183 fi
2184 rm -f conftest*
2185 fi
2186 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2187   echo "$ac_t""yes" 1>&6
2188     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2189   cat >> confdefs.h <<EOF
2190 #define $ac_tr_hdr 1
2191 EOF
2192  
2193 else
2194   echo "$ac_t""no" 1>&6
2195 fi
2196 done
2197
2198
2199 #
2200 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2201 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2202 #
2203 case "$host_os" in
2204     *hpux*)
2205                 cat > conftest.$ac_ext <<EOF
2206 #line 2207 "configure"
2207 #include "confdefs.h"
2208 #include <shadow.h>
2209 int main() {
2210 struct spwd testme
2211 ; return 0; }
2212 EOF
2213 if { (eval echo configure:2214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2214   rm -rf conftest*
2215   ac_cv_header_shadow_h=yes
2216 else
2217   echo "configure: failed program was:" >&5
2218   cat conftest.$ac_ext >&5
2219   rm -rf conftest*
2220   ac_cv_header_shadow_h=no
2221 fi
2222 rm -f conftest*
2223                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2224                    cat >> confdefs.h <<\EOF
2225 #define HAVE_SHADOW_H 1
2226 EOF
2227
2228                 fi
2229         ;;
2230 esac
2231 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2232 do
2233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2235 echo "configure:2236: checking for $ac_hdr" >&5
2236 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2237   echo $ac_n "(cached) $ac_c" 1>&6
2238 else
2239   cat > conftest.$ac_ext <<EOF
2240 #line 2241 "configure"
2241 #include "confdefs.h"
2242 #include <$ac_hdr>
2243 EOF
2244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2245 { (eval echo configure:2246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2247 if test -z "$ac_err"; then
2248   rm -rf conftest*
2249   eval "ac_cv_header_$ac_safe=yes"
2250 else
2251   echo "$ac_err" >&5
2252   echo "configure: failed program was:" >&5
2253   cat conftest.$ac_ext >&5
2254   rm -rf conftest*
2255   eval "ac_cv_header_$ac_safe=no"
2256 fi
2257 rm -f conftest*
2258 fi
2259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2260   echo "$ac_t""yes" 1>&6
2261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2262   cat >> confdefs.h <<EOF
2263 #define $ac_tr_hdr 1
2264 EOF
2265  
2266 else
2267   echo "$ac_t""no" 1>&6
2268 fi
2269 done
2270
2271 for ac_hdr in nss.h nss_common.h sys/security.h security/pam_appl.h security/pam_modules.h
2272 do
2273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2275 echo "configure:2276: checking for $ac_hdr" >&5
2276 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2277   echo $ac_n "(cached) $ac_c" 1>&6
2278 else
2279   cat > conftest.$ac_ext <<EOF
2280 #line 2281 "configure"
2281 #include "confdefs.h"
2282 #include <$ac_hdr>
2283 EOF
2284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2285 { (eval echo configure:2286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2287 if test -z "$ac_err"; then
2288   rm -rf conftest*
2289   eval "ac_cv_header_$ac_safe=yes"
2290 else
2291   echo "$ac_err" >&5
2292   echo "configure: failed program was:" >&5
2293   cat conftest.$ac_ext >&5
2294   rm -rf conftest*
2295   eval "ac_cv_header_$ac_safe=no"
2296 fi
2297 rm -f conftest*
2298 fi
2299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2300   echo "$ac_t""yes" 1>&6
2301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2302   cat >> confdefs.h <<EOF
2303 #define $ac_tr_hdr 1
2304 EOF
2305  
2306 else
2307   echo "$ac_t""no" 1>&6
2308 fi
2309 done
2310
2311 for ac_hdr in stropts.h poll.h
2312 do
2313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2315 echo "configure:2316: checking for $ac_hdr" >&5
2316 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2317   echo $ac_n "(cached) $ac_c" 1>&6
2318 else
2319   cat > conftest.$ac_ext <<EOF
2320 #line 2321 "configure"
2321 #include "confdefs.h"
2322 #include <$ac_hdr>
2323 EOF
2324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2325 { (eval echo configure:2326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2327 if test -z "$ac_err"; then
2328   rm -rf conftest*
2329   eval "ac_cv_header_$ac_safe=yes"
2330 else
2331   echo "$ac_err" >&5
2332   echo "configure: failed program was:" >&5
2333   cat conftest.$ac_ext >&5
2334   rm -rf conftest*
2335   eval "ac_cv_header_$ac_safe=no"
2336 fi
2337 rm -f conftest*
2338 fi
2339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2340   echo "$ac_t""yes" 1>&6
2341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2342   cat >> confdefs.h <<EOF
2343 #define $ac_tr_hdr 1
2344 EOF
2345  
2346 else
2347   echo "$ac_t""no" 1>&6
2348 fi
2349 done
2350
2351 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2352 do
2353 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2354 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2355 echo "configure:2356: checking for $ac_hdr" >&5
2356 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2357   echo $ac_n "(cached) $ac_c" 1>&6
2358 else
2359   cat > conftest.$ac_ext <<EOF
2360 #line 2361 "configure"
2361 #include "confdefs.h"
2362 #include <$ac_hdr>
2363 EOF
2364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2365 { (eval echo configure:2366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2367 if test -z "$ac_err"; then
2368   rm -rf conftest*
2369   eval "ac_cv_header_$ac_safe=yes"
2370 else
2371   echo "$ac_err" >&5
2372   echo "configure: failed program was:" >&5
2373   cat conftest.$ac_ext >&5
2374   rm -rf conftest*
2375   eval "ac_cv_header_$ac_safe=no"
2376 fi
2377 rm -f conftest*
2378 fi
2379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2380   echo "$ac_t""yes" 1>&6
2381     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2382   cat >> confdefs.h <<EOF
2383 #define $ac_tr_hdr 1
2384 EOF
2385  
2386 else
2387   echo "$ac_t""no" 1>&6
2388 fi
2389 done
2390
2391 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2392 do
2393 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2394 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2395 echo "configure:2396: checking for $ac_hdr" >&5
2396 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2397   echo $ac_n "(cached) $ac_c" 1>&6
2398 else
2399   cat > conftest.$ac_ext <<EOF
2400 #line 2401 "configure"
2401 #include "confdefs.h"
2402 #include <$ac_hdr>
2403 EOF
2404 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2405 { (eval echo configure:2406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2406 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2407 if test -z "$ac_err"; then
2408   rm -rf conftest*
2409   eval "ac_cv_header_$ac_safe=yes"
2410 else
2411   echo "$ac_err" >&5
2412   echo "configure: failed program was:" >&5
2413   cat conftest.$ac_ext >&5
2414   rm -rf conftest*
2415   eval "ac_cv_header_$ac_safe=no"
2416 fi
2417 rm -f conftest*
2418 fi
2419 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2420   echo "$ac_t""yes" 1>&6
2421     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2422   cat >> confdefs.h <<EOF
2423 #define $ac_tr_hdr 1
2424 EOF
2425  
2426 else
2427   echo "$ac_t""no" 1>&6
2428 fi
2429 done
2430
2431
2432 # For experimental utmp support (lastlog on some BSD-like systems)
2433 for ac_hdr in utmp.h utmpx.h lastlog.h
2434 do
2435 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2436 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2437 echo "configure:2438: checking for $ac_hdr" >&5
2438 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2439   echo $ac_n "(cached) $ac_c" 1>&6
2440 else
2441   cat > conftest.$ac_ext <<EOF
2442 #line 2443 "configure"
2443 #include "confdefs.h"
2444 #include <$ac_hdr>
2445 EOF
2446 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2447 { (eval echo configure:2448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2448 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2449 if test -z "$ac_err"; then
2450   rm -rf conftest*
2451   eval "ac_cv_header_$ac_safe=yes"
2452 else
2453   echo "$ac_err" >&5
2454   echo "configure: failed program was:" >&5
2455   cat conftest.$ac_ext >&5
2456   rm -rf conftest*
2457   eval "ac_cv_header_$ac_safe=no"
2458 fi
2459 rm -f conftest*
2460 fi
2461 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2462   echo "$ac_t""yes" 1>&6
2463     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2464   cat >> confdefs.h <<EOF
2465 #define $ac_tr_hdr 1
2466 EOF
2467  
2468 else
2469   echo "$ac_t""no" 1>&6
2470 fi
2471 done
2472
2473  
2474 # For quotas on Veritas VxFS filesystems
2475 for ac_hdr in sys/fs/vx_quota.h
2476 do
2477 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2478 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2479 echo "configure:2480: checking for $ac_hdr" >&5
2480 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2481   echo $ac_n "(cached) $ac_c" 1>&6
2482 else
2483   cat > conftest.$ac_ext <<EOF
2484 #line 2485 "configure"
2485 #include "confdefs.h"
2486 #include <$ac_hdr>
2487 EOF
2488 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2489 { (eval echo configure:2490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2490 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2491 if test -z "$ac_err"; then
2492   rm -rf conftest*
2493   eval "ac_cv_header_$ac_safe=yes"
2494 else
2495   echo "$ac_err" >&5
2496   echo "configure: failed program was:" >&5
2497   cat conftest.$ac_ext >&5
2498   rm -rf conftest*
2499   eval "ac_cv_header_$ac_safe=no"
2500 fi
2501 rm -f conftest*
2502 fi
2503 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2504   echo "$ac_t""yes" 1>&6
2505     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2506   cat >> confdefs.h <<EOF
2507 #define $ac_tr_hdr 1
2508 EOF
2509  
2510 else
2511   echo "$ac_t""no" 1>&6
2512 fi
2513 done
2514
2515
2516 echo $ac_n "checking size of int""... $ac_c" 1>&6
2517 echo "configure:2518: checking size of int" >&5
2518 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2519   echo $ac_n "(cached) $ac_c" 1>&6
2520 else
2521   if test "$cross_compiling" = yes; then
2522   ac_cv_sizeof_int=cross
2523 else
2524   cat > conftest.$ac_ext <<EOF
2525 #line 2526 "configure"
2526 #include "confdefs.h"
2527 #include <stdio.h>
2528 #include <sys/types.h>
2529 main()
2530 {
2531   FILE *f=fopen("conftestval", "w");
2532   if (!f) exit(1);
2533   fprintf(f, "%d\n", sizeof(int));
2534   exit(0);
2535 }
2536 EOF
2537 if { (eval echo configure:2538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2538 then
2539   ac_cv_sizeof_int=`cat conftestval`
2540 else
2541   echo "configure: failed program was:" >&5
2542   cat conftest.$ac_ext >&5
2543   rm -fr conftest*
2544   ac_cv_sizeof_int=0
2545 fi
2546 rm -fr conftest*
2547 fi
2548
2549 fi
2550 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2551 cat >> confdefs.h <<EOF
2552 #define SIZEOF_INT $ac_cv_sizeof_int
2553 EOF
2554
2555
2556 echo $ac_n "checking size of long""... $ac_c" 1>&6
2557 echo "configure:2558: checking size of long" >&5
2558 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2559   echo $ac_n "(cached) $ac_c" 1>&6
2560 else
2561   if test "$cross_compiling" = yes; then
2562   ac_cv_sizeof_long=cross
2563 else
2564   cat > conftest.$ac_ext <<EOF
2565 #line 2566 "configure"
2566 #include "confdefs.h"
2567 #include <stdio.h>
2568 #include <sys/types.h>
2569 main()
2570 {
2571   FILE *f=fopen("conftestval", "w");
2572   if (!f) exit(1);
2573   fprintf(f, "%d\n", sizeof(long));
2574   exit(0);
2575 }
2576 EOF
2577 if { (eval echo configure:2578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2578 then
2579   ac_cv_sizeof_long=`cat conftestval`
2580 else
2581   echo "configure: failed program was:" >&5
2582   cat conftest.$ac_ext >&5
2583   rm -fr conftest*
2584   ac_cv_sizeof_long=0
2585 fi
2586 rm -fr conftest*
2587 fi
2588
2589 fi
2590 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2591 cat >> confdefs.h <<EOF
2592 #define SIZEOF_LONG $ac_cv_sizeof_long
2593 EOF
2594
2595
2596 echo $ac_n "checking size of short""... $ac_c" 1>&6
2597 echo "configure:2598: checking size of short" >&5
2598 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2599   echo $ac_n "(cached) $ac_c" 1>&6
2600 else
2601   if test "$cross_compiling" = yes; then
2602   ac_cv_sizeof_short=cross
2603 else
2604   cat > conftest.$ac_ext <<EOF
2605 #line 2606 "configure"
2606 #include "confdefs.h"
2607 #include <stdio.h>
2608 #include <sys/types.h>
2609 main()
2610 {
2611   FILE *f=fopen("conftestval", "w");
2612   if (!f) exit(1);
2613   fprintf(f, "%d\n", sizeof(short));
2614   exit(0);
2615 }
2616 EOF
2617 if { (eval echo configure:2618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2618 then
2619   ac_cv_sizeof_short=`cat conftestval`
2620 else
2621   echo "configure: failed program was:" >&5
2622   cat conftest.$ac_ext >&5
2623   rm -fr conftest*
2624   ac_cv_sizeof_short=0
2625 fi
2626 rm -fr conftest*
2627 fi
2628
2629 fi
2630 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2631 cat >> confdefs.h <<EOF
2632 #define SIZEOF_SHORT $ac_cv_sizeof_short
2633 EOF
2634
2635
2636
2637 echo $ac_n "checking for working const""... $ac_c" 1>&6
2638 echo "configure:2639: checking for working const" >&5
2639 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2640   echo $ac_n "(cached) $ac_c" 1>&6
2641 else
2642   cat > conftest.$ac_ext <<EOF
2643 #line 2644 "configure"
2644 #include "confdefs.h"
2645
2646 int main() {
2647
2648 /* Ultrix mips cc rejects this.  */
2649 typedef int charset[2]; const charset x;
2650 /* SunOS 4.1.1 cc rejects this.  */
2651 char const *const *ccp;
2652 char **p;
2653 /* NEC SVR4.0.2 mips cc rejects this.  */
2654 struct point {int x, y;};
2655 static struct point const zero = {0,0};
2656 /* AIX XL C 1.02.0.0 rejects this.
2657    It does not let you subtract one const X* pointer from another in an arm
2658    of an if-expression whose if-part is not a constant expression */
2659 const char *g = "string";
2660 ccp = &g + (g ? g-g : 0);
2661 /* HPUX 7.0 cc rejects these. */
2662 ++ccp;
2663 p = (char**) ccp;
2664 ccp = (char const *const *) p;
2665 { /* SCO 3.2v4 cc rejects this.  */
2666   char *t;
2667   char const *s = 0 ? (char *) 0 : (char const *) 0;
2668
2669   *t++ = 0;
2670 }
2671 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2672   int x[] = {25, 17};
2673   const int *foo = &x[0];
2674   ++foo;
2675 }
2676 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2677   typedef const int *iptr;
2678   iptr p = 0;
2679   ++p;
2680 }
2681 { /* AIX XL C 1.02.0.0 rejects this saying
2682      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2683   struct s { int j; const int *ap[3]; };
2684   struct s *b; b->j = 5;
2685 }
2686 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2687   const int foo = 10;
2688 }
2689
2690 ; return 0; }
2691 EOF
2692 if { (eval echo configure:2693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2693   rm -rf conftest*
2694   ac_cv_c_const=yes
2695 else
2696   echo "configure: failed program was:" >&5
2697   cat conftest.$ac_ext >&5
2698   rm -rf conftest*
2699   ac_cv_c_const=no
2700 fi
2701 rm -f conftest*
2702 fi
2703
2704 echo "$ac_t""$ac_cv_c_const" 1>&6
2705 if test $ac_cv_c_const = no; then
2706   cat >> confdefs.h <<\EOF
2707 #define const 
2708 EOF
2709
2710 fi
2711
2712 echo $ac_n "checking for inline""... $ac_c" 1>&6
2713 echo "configure:2714: checking for inline" >&5
2714 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2715   echo $ac_n "(cached) $ac_c" 1>&6
2716 else
2717   ac_cv_c_inline=no
2718 for ac_kw in inline __inline__ __inline; do
2719   cat > conftest.$ac_ext <<EOF
2720 #line 2721 "configure"
2721 #include "confdefs.h"
2722
2723 int main() {
2724 } $ac_kw foo() {
2725 ; return 0; }
2726 EOF
2727 if { (eval echo configure:2728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2728   rm -rf conftest*
2729   ac_cv_c_inline=$ac_kw; break
2730 else
2731   echo "configure: failed program was:" >&5
2732   cat conftest.$ac_ext >&5
2733 fi
2734 rm -f conftest*
2735 done
2736
2737 fi
2738
2739 echo "$ac_t""$ac_cv_c_inline" 1>&6
2740 case "$ac_cv_c_inline" in
2741   inline | yes) ;;
2742   no) cat >> confdefs.h <<\EOF
2743 #define inline 
2744 EOF
2745  ;;
2746   *)  cat >> confdefs.h <<EOF
2747 #define inline $ac_cv_c_inline
2748 EOF
2749  ;;
2750 esac
2751
2752 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2753 echo "configure:2754: checking whether byte ordering is bigendian" >&5
2754 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2755   echo $ac_n "(cached) $ac_c" 1>&6
2756 else
2757   ac_cv_c_bigendian=unknown
2758 # See if sys/param.h defines the BYTE_ORDER macro.
2759 cat > conftest.$ac_ext <<EOF
2760 #line 2761 "configure"
2761 #include "confdefs.h"
2762 #include <sys/types.h>
2763 #include <sys/param.h>
2764 int main() {
2765
2766 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2767  bogus endian macros
2768 #endif
2769 ; return 0; }
2770 EOF
2771 if { (eval echo configure:2772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2772   rm -rf conftest*
2773   # It does; now see whether it defined to BIG_ENDIAN or not.
2774 cat > conftest.$ac_ext <<EOF
2775 #line 2776 "configure"
2776 #include "confdefs.h"
2777 #include <sys/types.h>
2778 #include <sys/param.h>
2779 int main() {
2780
2781 #if BYTE_ORDER != BIG_ENDIAN
2782  not big endian
2783 #endif
2784 ; return 0; }
2785 EOF
2786 if { (eval echo configure:2787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2787   rm -rf conftest*
2788   ac_cv_c_bigendian=yes
2789 else
2790   echo "configure: failed program was:" >&5
2791   cat conftest.$ac_ext >&5
2792   rm -rf conftest*
2793   ac_cv_c_bigendian=no
2794 fi
2795 rm -f conftest*
2796 else
2797   echo "configure: failed program was:" >&5
2798   cat conftest.$ac_ext >&5
2799 fi
2800 rm -f conftest*
2801 if test $ac_cv_c_bigendian = unknown; then
2802 if test "$cross_compiling" = yes; then
2803     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2804 else
2805   cat > conftest.$ac_ext <<EOF
2806 #line 2807 "configure"
2807 #include "confdefs.h"
2808 main () {
2809   /* Are we little or big endian?  From Harbison&Steele.  */
2810   union
2811   {
2812     long l;
2813     char c[sizeof (long)];
2814   } u;
2815   u.l = 1;
2816   exit (u.c[sizeof (long) - 1] == 1);
2817 }
2818 EOF
2819 if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2820 then
2821   ac_cv_c_bigendian=no
2822 else
2823   echo "configure: failed program was:" >&5
2824   cat conftest.$ac_ext >&5
2825   rm -fr conftest*
2826   ac_cv_c_bigendian=yes
2827 fi
2828 rm -fr conftest*
2829 fi
2830
2831 fi
2832 fi
2833
2834 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2835 if test $ac_cv_c_bigendian = yes; then
2836   cat >> confdefs.h <<\EOF
2837 #define WORDS_BIGENDIAN 1
2838 EOF
2839
2840 fi
2841
2842 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2843 echo "configure:2844: checking whether char is unsigned" >&5
2844 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2845   echo $ac_n "(cached) $ac_c" 1>&6
2846 else
2847   if test "$GCC" = yes; then
2848   # GCC predefines this symbol on systems where it applies.
2849 cat > conftest.$ac_ext <<EOF
2850 #line 2851 "configure"
2851 #include "confdefs.h"
2852 #ifdef __CHAR_UNSIGNED__
2853   yes
2854 #endif
2855
2856 EOF
2857 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2858   egrep "yes" >/dev/null 2>&1; then
2859   rm -rf conftest*
2860   ac_cv_c_char_unsigned=yes
2861 else
2862   rm -rf conftest*
2863   ac_cv_c_char_unsigned=no
2864 fi
2865 rm -f conftest*
2866
2867 else
2868 if test "$cross_compiling" = yes; then
2869     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2870 else
2871   cat > conftest.$ac_ext <<EOF
2872 #line 2873 "configure"
2873 #include "confdefs.h"
2874 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2875 #if !defined(__STDC__) || __STDC__ != 1
2876 #define volatile
2877 #endif
2878 main() {
2879   volatile char c = 255; exit(c < 0);
2880 }
2881 EOF
2882 if { (eval echo configure:2883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2883 then
2884   ac_cv_c_char_unsigned=yes
2885 else
2886   echo "configure: failed program was:" >&5
2887   cat conftest.$ac_ext >&5
2888   rm -fr conftest*
2889   ac_cv_c_char_unsigned=no
2890 fi
2891 rm -fr conftest*
2892 fi
2893
2894 fi
2895 fi
2896
2897 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2898 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2899   cat >> confdefs.h <<\EOF
2900 #define __CHAR_UNSIGNED__ 1
2901 EOF
2902
2903 fi
2904
2905
2906 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2907 echo "configure:2908: checking return type of signal handlers" >&5
2908 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2909   echo $ac_n "(cached) $ac_c" 1>&6
2910 else
2911   cat > conftest.$ac_ext <<EOF
2912 #line 2913 "configure"
2913 #include "confdefs.h"
2914 #include <sys/types.h>
2915 #include <signal.h>
2916 #ifdef signal
2917 #undef signal
2918 #endif
2919 #ifdef __cplusplus
2920 extern "C" void (*signal (int, void (*)(int)))(int);
2921 #else
2922 void (*signal ()) ();
2923 #endif
2924
2925 int main() {
2926 int i;
2927 ; return 0; }
2928 EOF
2929 if { (eval echo configure:2930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2930   rm -rf conftest*
2931   ac_cv_type_signal=void
2932 else
2933   echo "configure: failed program was:" >&5
2934   cat conftest.$ac_ext >&5
2935   rm -rf conftest*
2936   ac_cv_type_signal=int
2937 fi
2938 rm -f conftest*
2939 fi
2940
2941 echo "$ac_t""$ac_cv_type_signal" 1>&6
2942 cat >> confdefs.h <<EOF
2943 #define RETSIGTYPE $ac_cv_type_signal
2944 EOF
2945
2946
2947 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2948 echo "configure:2949: checking for uid_t in sys/types.h" >&5
2949 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2950   echo $ac_n "(cached) $ac_c" 1>&6
2951 else
2952   cat > conftest.$ac_ext <<EOF
2953 #line 2954 "configure"
2954 #include "confdefs.h"
2955 #include <sys/types.h>
2956 EOF
2957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2958   egrep "uid_t" >/dev/null 2>&1; then
2959   rm -rf conftest*
2960   ac_cv_type_uid_t=yes
2961 else
2962   rm -rf conftest*
2963   ac_cv_type_uid_t=no
2964 fi
2965 rm -f conftest*
2966
2967 fi
2968
2969 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2970 if test $ac_cv_type_uid_t = no; then
2971   cat >> confdefs.h <<\EOF
2972 #define uid_t int
2973 EOF
2974
2975   cat >> confdefs.h <<\EOF
2976 #define gid_t int
2977 EOF
2978
2979 fi
2980
2981 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2982 echo "configure:2983: checking for mode_t" >&5
2983 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2984   echo $ac_n "(cached) $ac_c" 1>&6
2985 else
2986   cat > conftest.$ac_ext <<EOF
2987 #line 2988 "configure"
2988 #include "confdefs.h"
2989 #include <sys/types.h>
2990 #if STDC_HEADERS
2991 #include <stdlib.h>
2992 #include <stddef.h>
2993 #endif
2994 EOF
2995 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2996   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2997   rm -rf conftest*
2998   ac_cv_type_mode_t=yes
2999 else
3000   rm -rf conftest*
3001   ac_cv_type_mode_t=no
3002 fi
3003 rm -f conftest*
3004
3005 fi
3006 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3007 if test $ac_cv_type_mode_t = no; then
3008   cat >> confdefs.h <<\EOF
3009 #define mode_t int
3010 EOF
3011
3012 fi
3013
3014 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3015 echo "configure:3016: checking for off_t" >&5
3016 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3017   echo $ac_n "(cached) $ac_c" 1>&6
3018 else
3019   cat > conftest.$ac_ext <<EOF
3020 #line 3021 "configure"
3021 #include "confdefs.h"
3022 #include <sys/types.h>
3023 #if STDC_HEADERS
3024 #include <stdlib.h>
3025 #include <stddef.h>
3026 #endif
3027 EOF
3028 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3029   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3030   rm -rf conftest*
3031   ac_cv_type_off_t=yes
3032 else
3033   rm -rf conftest*
3034   ac_cv_type_off_t=no
3035 fi
3036 rm -f conftest*
3037
3038 fi
3039 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3040 if test $ac_cv_type_off_t = no; then
3041   cat >> confdefs.h <<\EOF
3042 #define off_t long
3043 EOF
3044
3045 fi
3046
3047 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3048 echo "configure:3049: checking for size_t" >&5
3049 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3050   echo $ac_n "(cached) $ac_c" 1>&6
3051 else
3052   cat > conftest.$ac_ext <<EOF
3053 #line 3054 "configure"
3054 #include "confdefs.h"
3055 #include <sys/types.h>
3056 #if STDC_HEADERS
3057 #include <stdlib.h>
3058 #include <stddef.h>
3059 #endif
3060 EOF
3061 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3062   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3063   rm -rf conftest*
3064   ac_cv_type_size_t=yes
3065 else
3066   rm -rf conftest*
3067   ac_cv_type_size_t=no
3068 fi
3069 rm -f conftest*
3070
3071 fi
3072 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3073 if test $ac_cv_type_size_t = no; then
3074   cat >> confdefs.h <<\EOF
3075 #define size_t unsigned
3076 EOF
3077
3078 fi
3079
3080 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3081 echo "configure:3082: checking for pid_t" >&5
3082 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3083   echo $ac_n "(cached) $ac_c" 1>&6
3084 else
3085   cat > conftest.$ac_ext <<EOF
3086 #line 3087 "configure"
3087 #include "confdefs.h"
3088 #include <sys/types.h>
3089 #if STDC_HEADERS
3090 #include <stdlib.h>
3091 #include <stddef.h>
3092 #endif
3093 EOF
3094 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3095   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3096   rm -rf conftest*
3097   ac_cv_type_pid_t=yes
3098 else
3099   rm -rf conftest*
3100   ac_cv_type_pid_t=no
3101 fi
3102 rm -f conftest*
3103
3104 fi
3105 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3106 if test $ac_cv_type_pid_t = no; then
3107   cat >> confdefs.h <<\EOF
3108 #define pid_t int
3109 EOF
3110
3111 fi
3112
3113 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3114 echo "configure:3115: checking for st_rdev in struct stat" >&5
3115 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3116   echo $ac_n "(cached) $ac_c" 1>&6
3117 else
3118   cat > conftest.$ac_ext <<EOF
3119 #line 3120 "configure"
3120 #include "confdefs.h"
3121 #include <sys/types.h>
3122 #include <sys/stat.h>
3123 int main() {
3124 struct stat s; s.st_rdev;
3125 ; return 0; }
3126 EOF
3127 if { (eval echo configure:3128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3128   rm -rf conftest*
3129   ac_cv_struct_st_rdev=yes
3130 else
3131   echo "configure: failed program was:" >&5
3132   cat conftest.$ac_ext >&5
3133   rm -rf conftest*
3134   ac_cv_struct_st_rdev=no
3135 fi
3136 rm -f conftest*
3137 fi
3138
3139 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3140 if test $ac_cv_struct_st_rdev = yes; then
3141   cat >> confdefs.h <<\EOF
3142 #define HAVE_ST_RDEV 1
3143 EOF
3144
3145 fi
3146
3147 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3148 echo "configure:3149: checking for d_off in dirent" >&5
3149 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3150   echo $ac_n "(cached) $ac_c" 1>&6
3151 else
3152   cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155
3156 #include <unistd.h>
3157 #include <sys/types.h>
3158 #include <dirent.h>
3159 int main() {
3160 struct dirent d; d.d_off;
3161 ; return 0; }
3162 EOF
3163 if { (eval echo configure:3164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3164   rm -rf conftest*
3165   ac_cv_dirent_d_off=yes
3166 else
3167   echo "configure: failed program was:" >&5
3168   cat conftest.$ac_ext >&5
3169   rm -rf conftest*
3170   ac_cv_dirent_d_off=no
3171 fi
3172 rm -f conftest*
3173 fi
3174
3175 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3176 if test $ac_cv_dirent_d_off = yes; then
3177   cat >> confdefs.h <<\EOF
3178 #define HAVE_DIRENT_D_OFF 1
3179 EOF
3180
3181 fi
3182
3183 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3184 echo "configure:3185: checking for ino_t" >&5
3185 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3186   echo $ac_n "(cached) $ac_c" 1>&6
3187 else
3188   cat > conftest.$ac_ext <<EOF
3189 #line 3190 "configure"
3190 #include "confdefs.h"
3191 #include <sys/types.h>
3192 #if STDC_HEADERS
3193 #include <stdlib.h>
3194 #include <stddef.h>
3195 #endif
3196 EOF
3197 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3198   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3199   rm -rf conftest*
3200   ac_cv_type_ino_t=yes
3201 else
3202   rm -rf conftest*
3203   ac_cv_type_ino_t=no
3204 fi
3205 rm -f conftest*
3206
3207 fi
3208 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3209 if test $ac_cv_type_ino_t = no; then
3210   cat >> confdefs.h <<\EOF
3211 #define ino_t unsigned
3212 EOF
3213
3214 fi
3215
3216 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3217 echo "configure:3218: checking for loff_t" >&5
3218 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3219   echo $ac_n "(cached) $ac_c" 1>&6
3220 else
3221   cat > conftest.$ac_ext <<EOF
3222 #line 3223 "configure"
3223 #include "confdefs.h"
3224 #include <sys/types.h>
3225 #if STDC_HEADERS
3226 #include <stdlib.h>
3227 #include <stddef.h>
3228 #endif
3229 EOF
3230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3231   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3232   rm -rf conftest*
3233   ac_cv_type_loff_t=yes
3234 else
3235   rm -rf conftest*
3236   ac_cv_type_loff_t=no
3237 fi
3238 rm -f conftest*
3239
3240 fi
3241 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3242 if test $ac_cv_type_loff_t = no; then
3243   cat >> confdefs.h <<\EOF
3244 #define loff_t off_t
3245 EOF
3246
3247 fi
3248
3249 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3250 echo "configure:3251: checking for offset_t" >&5
3251 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3252   echo $ac_n "(cached) $ac_c" 1>&6
3253 else
3254   cat > conftest.$ac_ext <<EOF
3255 #line 3256 "configure"
3256 #include "confdefs.h"
3257 #include <sys/types.h>
3258 #if STDC_HEADERS
3259 #include <stdlib.h>
3260 #include <stddef.h>
3261 #endif
3262 EOF
3263 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3264   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3265   rm -rf conftest*
3266   ac_cv_type_offset_t=yes
3267 else
3268   rm -rf conftest*
3269   ac_cv_type_offset_t=no
3270 fi
3271 rm -f conftest*
3272
3273 fi
3274 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3275 if test $ac_cv_type_offset_t = no; then
3276   cat >> confdefs.h <<\EOF
3277 #define offset_t loff_t
3278 EOF
3279
3280 fi
3281
3282 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3283 echo "configure:3284: checking for ssize_t" >&5
3284 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3285   echo $ac_n "(cached) $ac_c" 1>&6
3286 else
3287   cat > conftest.$ac_ext <<EOF
3288 #line 3289 "configure"
3289 #include "confdefs.h"
3290 #include <sys/types.h>
3291 #if STDC_HEADERS
3292 #include <stdlib.h>
3293 #include <stddef.h>
3294 #endif
3295 EOF
3296 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3297   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3298   rm -rf conftest*
3299   ac_cv_type_ssize_t=yes
3300 else
3301   rm -rf conftest*
3302   ac_cv_type_ssize_t=no
3303 fi
3304 rm -f conftest*
3305
3306 fi
3307 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3308 if test $ac_cv_type_ssize_t = no; then
3309   cat >> confdefs.h <<\EOF
3310 #define ssize_t int
3311 EOF
3312
3313 fi
3314
3315 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3316 echo "configure:3317: checking for wchar_t" >&5
3317 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3318   echo $ac_n "(cached) $ac_c" 1>&6
3319 else
3320   cat > conftest.$ac_ext <<EOF
3321 #line 3322 "configure"
3322 #include "confdefs.h"
3323 #include <sys/types.h>
3324 #if STDC_HEADERS
3325 #include <stdlib.h>
3326 #include <stddef.h>
3327 #endif
3328 EOF
3329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3330   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3331   rm -rf conftest*
3332   ac_cv_type_wchar_t=yes
3333 else
3334   rm -rf conftest*
3335   ac_cv_type_wchar_t=no
3336 fi
3337 rm -f conftest*
3338
3339 fi
3340 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3341 if test $ac_cv_type_wchar_t = no; then
3342   cat >> confdefs.h <<\EOF
3343 #define wchar_t unsigned short
3344 EOF
3345
3346 fi
3347
3348
3349 # we need libcups for CUPS support...
3350 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3351 echo "configure:3352: checking for httpConnect in -lcups" >&5
3352 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3353 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3354   echo $ac_n "(cached) $ac_c" 1>&6
3355 else
3356   ac_save_LIBS="$LIBS"
3357 LIBS="-lcups  $LIBS"
3358 cat > conftest.$ac_ext <<EOF
3359 #line 3360 "configure"
3360 #include "confdefs.h"
3361 /* Override any gcc2 internal prototype to avoid an error.  */
3362 /* We use char because int might match the return type of a gcc2
3363     builtin and then its argument prototype would still apply.  */
3364 char httpConnect();
3365
3366 int main() {
3367 httpConnect()
3368 ; return 0; }
3369 EOF
3370 if { (eval echo configure:3371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3371   rm -rf conftest*
3372   eval "ac_cv_lib_$ac_lib_var=yes"
3373 else
3374   echo "configure: failed program was:" >&5
3375   cat conftest.$ac_ext >&5
3376   rm -rf conftest*
3377   eval "ac_cv_lib_$ac_lib_var=no"
3378 fi
3379 rm -f conftest*
3380 LIBS="$ac_save_LIBS"
3381
3382 fi
3383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3384   echo "$ac_t""yes" 1>&6
3385     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3386     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3387   cat >> confdefs.h <<EOF
3388 #define $ac_tr_lib 1
3389 EOF
3390
3391   LIBS="-lcups $LIBS"
3392
3393 else
3394   echo "$ac_t""no" 1>&6
3395 fi
3396
3397
3398 # we need libdl for PAM and the new VFS code
3399 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3400 echo "configure:3401: checking for dlopen in -ldl" >&5
3401 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3402 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3403   echo $ac_n "(cached) $ac_c" 1>&6
3404 else
3405   ac_save_LIBS="$LIBS"
3406 LIBS="-ldl  $LIBS"
3407 cat > conftest.$ac_ext <<EOF
3408 #line 3409 "configure"
3409 #include "confdefs.h"
3410 /* Override any gcc2 internal prototype to avoid an error.  */
3411 /* We use char because int might match the return type of a gcc2
3412     builtin and then its argument prototype would still apply.  */
3413 char dlopen();
3414
3415 int main() {
3416 dlopen()
3417 ; return 0; }
3418 EOF
3419 if { (eval echo configure:3420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3420   rm -rf conftest*
3421   eval "ac_cv_lib_$ac_lib_var=yes"
3422 else
3423   echo "configure: failed program was:" >&5
3424   cat conftest.$ac_ext >&5
3425   rm -rf conftest*
3426   eval "ac_cv_lib_$ac_lib_var=no"
3427 fi
3428 rm -f conftest*
3429 LIBS="$ac_save_LIBS"
3430
3431 fi
3432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3433   echo "$ac_t""yes" 1>&6
3434   LIBS="$LIBS -ldl";
3435         cat >> confdefs.h <<\EOF
3436 #define HAVE_LIBDL 1
3437 EOF
3438
3439 else
3440   echo "$ac_t""no" 1>&6
3441 fi
3442
3443
3444 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3445 echo "configure:3446: checking for socklen_t type" >&5
3446 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3447   echo $ac_n "(cached) $ac_c" 1>&6
3448 else
3449   
3450     cat > conftest.$ac_ext <<EOF
3451 #line 3452 "configure"
3452 #include "confdefs.h"
3453
3454 #include <sys/types.h>
3455 #if STDC_HEADERS
3456 #include <stdlib.h>
3457 #include <stddef.h>
3458 #endif
3459 #include <sys/socket.h>
3460 int main() {
3461 socklen_t i = 0
3462 ; return 0; }
3463 EOF
3464 if { (eval echo configure:3465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3465   rm -rf conftest*
3466   samba_cv_socklen_t=yes
3467 else
3468   echo "configure: failed program was:" >&5
3469   cat conftest.$ac_ext >&5
3470   rm -rf conftest*
3471   samba_cv_socklen_t=no
3472 fi
3473 rm -f conftest*
3474 fi
3475
3476 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3477 if test x"$samba_cv_socklen_t" = x"yes"; then
3478    cat >> confdefs.h <<\EOF
3479 #define HAVE_SOCKLEN_T_TYPE 1
3480 EOF
3481
3482 fi
3483
3484 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3485 echo "configure:3486: checking for sig_atomic_t type" >&5
3486 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3487   echo $ac_n "(cached) $ac_c" 1>&6
3488 else
3489   
3490     cat > conftest.$ac_ext <<EOF
3491 #line 3492 "configure"
3492 #include "confdefs.h"
3493
3494 #include <sys/types.h>
3495 #if STDC_HEADERS
3496 #include <stdlib.h>
3497 #include <stddef.h>
3498 #endif
3499 #include <signal.h>
3500 int main() {
3501 sig_atomic_t i = 0
3502 ; return 0; }
3503 EOF
3504 if { (eval echo configure:3505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3505   rm -rf conftest*
3506   samba_cv_sig_atomic_t=yes
3507 else
3508   echo "configure: failed program was:" >&5
3509   cat conftest.$ac_ext >&5
3510   rm -rf conftest*
3511   samba_cv_sig_atomic_t=no
3512 fi
3513 rm -f conftest*
3514 fi
3515
3516 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3517 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3518    cat >> confdefs.h <<\EOF
3519 #define HAVE_SIG_ATOMIC_T_TYPE 1
3520 EOF
3521
3522 fi
3523
3524 # stupid headers have the functions but no declaration. grrrr.
3525
3526  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3527 echo "configure:3528: checking for errno declaration" >&5
3528 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3529   echo $ac_n "(cached) $ac_c" 1>&6
3530 else
3531   
3532     cat > conftest.$ac_ext <<EOF
3533 #line 3534 "configure"
3534 #include "confdefs.h"
3535 #include <errno.h>
3536 int main() {
3537 int i = (int)errno
3538 ; return 0; }
3539 EOF
3540 if { (eval echo configure:3541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3541   rm -rf conftest*
3542   ac_cv_have_errno_decl=yes
3543 else
3544   echo "configure: failed program was:" >&5
3545   cat conftest.$ac_ext >&5
3546   rm -rf conftest*
3547   ac_cv_have_errno_decl=no
3548 fi
3549 rm -f conftest*
3550 fi
3551
3552 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3553  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3554     cat >> confdefs.h <<\EOF
3555 #define HAVE_ERRNO_DECL 1
3556 EOF
3557
3558  fi
3559
3560
3561  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3562 echo "configure:3563: checking for setresuid declaration" >&5
3563 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3564   echo $ac_n "(cached) $ac_c" 1>&6
3565 else
3566   
3567     cat > conftest.$ac_ext <<EOF
3568 #line 3569 "configure"
3569 #include "confdefs.h"
3570 #include <unistd.h>
3571 int main() {
3572 int i = (int)setresuid
3573 ; return 0; }
3574 EOF
3575 if { (eval echo configure:3576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3576   rm -rf conftest*
3577   ac_cv_have_setresuid_decl=yes
3578 else
3579   echo "configure: failed program was:" >&5
3580   cat conftest.$ac_ext >&5
3581   rm -rf conftest*
3582   ac_cv_have_setresuid_decl=no
3583 fi
3584 rm -f conftest*
3585 fi
3586
3587 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3588  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3589     cat >> confdefs.h <<\EOF
3590 #define HAVE_SETRESUID_DECL 1
3591 EOF
3592
3593  fi
3594
3595
3596  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3597 echo "configure:3598: checking for setresgid declaration" >&5
3598 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3599   echo $ac_n "(cached) $ac_c" 1>&6
3600 else
3601   
3602     cat > conftest.$ac_ext <<EOF
3603 #line 3604 "configure"
3604 #include "confdefs.h"
3605 #include <unistd.h>
3606 int main() {
3607 int i = (int)setresgid
3608 ; return 0; }
3609 EOF
3610 if { (eval echo configure:3611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3611   rm -rf conftest*
3612   ac_cv_have_setresgid_decl=yes
3613 else
3614   echo "configure: failed program was:" >&5
3615   cat conftest.$ac_ext >&5
3616   rm -rf conftest*
3617   ac_cv_have_setresgid_decl=no
3618 fi
3619 rm -f conftest*
3620 fi
3621
3622 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3623  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3624     cat >> confdefs.h <<\EOF
3625 #define HAVE_SETRESGID_DECL 1
3626 EOF
3627
3628  fi
3629
3630
3631  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3632 echo "configure:3633: checking for asprintf declaration" >&5
3633 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3634   echo $ac_n "(cached) $ac_c" 1>&6
3635 else
3636   
3637     cat > conftest.$ac_ext <<EOF
3638 #line 3639 "configure"
3639 #include "confdefs.h"
3640 #include <stdio.h>
3641 int main() {
3642 int i = (int)asprintf
3643 ; return 0; }
3644 EOF
3645 if { (eval echo configure:3646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3646   rm -rf conftest*
3647   ac_cv_have_asprintf_decl=yes
3648 else
3649   echo "configure: failed program was:" >&5
3650   cat conftest.$ac_ext >&5
3651   rm -rf conftest*
3652   ac_cv_have_asprintf_decl=no
3653 fi
3654 rm -f conftest*
3655 fi
3656
3657 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3658  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3659     cat >> confdefs.h <<\EOF
3660 #define HAVE_ASPRINTF_DECL 1
3661 EOF
3662
3663  fi
3664
3665
3666  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3667 echo "configure:3668: checking for vasprintf declaration" >&5
3668 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3669   echo $ac_n "(cached) $ac_c" 1>&6
3670 else
3671   
3672     cat > conftest.$ac_ext <<EOF
3673 #line 3674 "configure"
3674 #include "confdefs.h"
3675 #include <stdio.h>
3676 int main() {
3677 int i = (int)vasprintf
3678 ; return 0; }
3679 EOF
3680 if { (eval echo configure:3681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3681   rm -rf conftest*
3682   ac_cv_have_vasprintf_decl=yes
3683 else
3684   echo "configure: failed program was:" >&5
3685   cat conftest.$ac_ext >&5
3686   rm -rf conftest*
3687   ac_cv_have_vasprintf_decl=no
3688 fi
3689 rm -f conftest*
3690 fi
3691
3692 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3693  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3694     cat >> confdefs.h <<\EOF
3695 #define HAVE_VASPRINTF_DECL 1
3696 EOF
3697
3698  fi
3699
3700
3701  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3702 echo "configure:3703: checking for vsnprintf declaration" >&5
3703 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3704   echo $ac_n "(cached) $ac_c" 1>&6
3705 else
3706   
3707     cat > conftest.$ac_ext <<EOF
3708 #line 3709 "configure"
3709 #include "confdefs.h"
3710 #include <stdio.h>
3711 int main() {
3712 int i = (int)vsnprintf
3713 ; return 0; }
3714 EOF
3715 if { (eval echo configure:3716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3716   rm -rf conftest*
3717   ac_cv_have_vsnprintf_decl=yes
3718 else
3719   echo "configure: failed program was:" >&5
3720   cat conftest.$ac_ext >&5
3721   rm -rf conftest*
3722   ac_cv_have_vsnprintf_decl=no
3723 fi
3724 rm -f conftest*
3725 fi
3726
3727 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3728  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3729     cat >> confdefs.h <<\EOF
3730 #define HAVE_VSNPRINTF_DECL 1
3731 EOF
3732
3733  fi
3734
3735
3736  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3737 echo "configure:3738: checking for snprintf declaration" >&5
3738 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3739   echo $ac_n "(cached) $ac_c" 1>&6
3740 else
3741   
3742     cat > conftest.$ac_ext <<EOF
3743 #line 3744 "configure"
3744 #include "confdefs.h"
3745 #include <stdio.h>
3746 int main() {
3747 int i = (int)snprintf
3748 ; return 0; }
3749 EOF
3750 if { (eval echo configure:3751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3751   rm -rf conftest*
3752   ac_cv_have_snprintf_decl=yes
3753 else
3754   echo "configure: failed program was:" >&5
3755   cat conftest.$ac_ext >&5
3756   rm -rf conftest*
3757   ac_cv_have_snprintf_decl=no
3758 fi
3759 rm -f conftest*
3760 fi
3761
3762 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3763  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3764     cat >> confdefs.h <<\EOF
3765 #define HAVE_SNPRINTF_DECL 1
3766 EOF
3767
3768  fi
3769
3770
3771 # and glibc has setresuid under linux but the function does
3772 # nothing until kernel 2.1.44! very dumb.
3773 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3774 echo "configure:3775: checking for real setresuid" >&5
3775 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3776   echo $ac_n "(cached) $ac_c" 1>&6
3777 else
3778   
3779     if test "$cross_compiling" = yes; then
3780   samba_cv_have_setresuid=cross
3781 else
3782   cat > conftest.$ac_ext <<EOF
3783 #line 3784 "configure"
3784 #include "confdefs.h"
3785 #include <errno.h>
3786 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3787 EOF
3788 if { (eval echo configure:3789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3789 then
3790   samba_cv_have_setresuid=yes
3791 else
3792   echo "configure: failed program was:" >&5
3793   cat conftest.$ac_ext >&5
3794   rm -fr conftest*
3795   samba_cv_have_setresuid=no
3796 fi
3797 rm -fr conftest*
3798 fi
3799
3800 fi
3801
3802 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3803 if test x"$samba_cv_have_setresuid" = x"yes"; then
3804     cat >> confdefs.h <<\EOF
3805 #define HAVE_SETRESUID 1
3806 EOF
3807
3808 fi
3809
3810 # Do the same check for setresguid...
3811 #
3812 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3813 echo "configure:3814: checking for real setresgid" >&5
3814 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
3815   echo $ac_n "(cached) $ac_c" 1>&6
3816 else
3817   
3818     if test "$cross_compiling" = yes; then
3819   samba_cv_have_setresgid=cross
3820 else
3821   cat > conftest.$ac_ext <<EOF
3822 #line 3823 "configure"
3823 #include "confdefs.h"
3824 #include <unistd.h>
3825 #include <errno.h>
3826 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
3827 EOF
3828 if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3829 then
3830   samba_cv_have_setresgid=yes
3831 else
3832   echo "configure: failed program was:" >&5
3833   cat conftest.$ac_ext >&5
3834   rm -fr conftest*
3835   samba_cv_have_setresgid=no
3836 fi
3837 rm -fr conftest*
3838 fi
3839
3840 fi
3841
3842 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
3843 if test x"$samba_cv_have_setresgid" = x"yes"; then
3844     cat >> confdefs.h <<\EOF
3845 #define HAVE_SETRESGID 1
3846 EOF
3847
3848 fi
3849
3850 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3851 echo "configure:3852: checking for 8-bit clean memcmp" >&5
3852 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3853   echo $ac_n "(cached) $ac_c" 1>&6
3854 else
3855   if test "$cross_compiling" = yes; then
3856   ac_cv_func_memcmp_clean=no
3857 else
3858   cat > conftest.$ac_ext <<EOF
3859 #line 3860 "configure"
3860 #include "confdefs.h"
3861
3862 main()
3863 {
3864   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3865   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3866 }
3867
3868 EOF
3869 if { (eval echo configure:3870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3870 then
3871   ac_cv_func_memcmp_clean=yes
3872 else
3873   echo "configure: failed program was:" >&5
3874   cat conftest.$ac_ext >&5
3875   rm -fr conftest*
3876   ac_cv_func_memcmp_clean=no
3877 fi
3878 rm -fr conftest*
3879 fi
3880
3881 fi
3882
3883 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3884 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
3885
3886
3887 ###############################################
3888 # test for where we get crypt() from
3889 for ac_func in crypt
3890 do
3891 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3892 echo "configure:3893: checking for $ac_func" >&5
3893 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3894   echo $ac_n "(cached) $ac_c" 1>&6
3895 else
3896   cat > conftest.$ac_ext <<EOF
3897 #line 3898 "configure"
3898 #include "confdefs.h"
3899 /* System header to define __stub macros and hopefully few prototypes,
3900     which can conflict with char $ac_func(); below.  */
3901 #include <assert.h>
3902 /* Override any gcc2 internal prototype to avoid an error.  */
3903 /* We use char because int might match the return type of a gcc2
3904     builtin and then its argument prototype would still apply.  */
3905 char $ac_func();
3906
3907 int main() {
3908
3909 /* The GNU C library defines this for functions which it implements
3910     to always fail with ENOSYS.  Some functions are actually named
3911     something starting with __ and the normal name is an alias.  */
3912 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3913 choke me
3914 #else
3915 $ac_func();
3916 #endif
3917
3918 ; return 0; }
3919 EOF
3920 if { (eval echo configure:3921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3921   rm -rf conftest*
3922   eval "ac_cv_func_$ac_func=yes"
3923 else
3924   echo "configure: failed program was:" >&5
3925   cat conftest.$ac_ext >&5
3926   rm -rf conftest*
3927   eval "ac_cv_func_$ac_func=no"
3928 fi
3929 rm -f conftest*
3930 fi
3931
3932 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3933   echo "$ac_t""yes" 1>&6
3934     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3935   cat >> confdefs.h <<EOF
3936 #define $ac_tr_func 1
3937 EOF
3938  
3939 else
3940   echo "$ac_t""no" 1>&6
3941 fi
3942 done
3943
3944 if test x"$ac_cv_func_crypt" = x"no"; then
3945     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
3946 echo "configure:3947: checking for crypt in -lcrypt" >&5
3947 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3948 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3949   echo $ac_n "(cached) $ac_c" 1>&6
3950 else
3951   ac_save_LIBS="$LIBS"
3952 LIBS="-lcrypt  $LIBS"
3953 cat > conftest.$ac_ext <<EOF
3954 #line 3955 "configure"
3955 #include "confdefs.h"
3956 /* Override any gcc2 internal prototype to avoid an error.  */
3957 /* We use char because int might match the return type of a gcc2
3958     builtin and then its argument prototype would still apply.  */
3959 char crypt();
3960
3961 int main() {
3962 crypt()
3963 ; return 0; }
3964 EOF
3965 if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3966   rm -rf conftest*
3967   eval "ac_cv_lib_$ac_lib_var=yes"
3968 else
3969   echo "configure: failed program was:" >&5
3970   cat conftest.$ac_ext >&5
3971   rm -rf conftest*
3972   eval "ac_cv_lib_$ac_lib_var=no"
3973 fi
3974 rm -f conftest*
3975 LIBS="$ac_save_LIBS"
3976
3977 fi
3978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3979   echo "$ac_t""yes" 1>&6
3980   LIBS="$LIBS -lcrypt";
3981         cat >> confdefs.h <<\EOF
3982 #define HAVE_CRYPT 1
3983 EOF
3984
3985 else
3986   echo "$ac_t""no" 1>&6
3987 fi
3988
3989 fi
3990
3991
3992 ###############################################
3993 # Readline included by default unless explicitly asked not to
3994 test "${with_readline+set}" != "set" && with_readline=yes
3995
3996 # test for where we get readline() from
3997 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
3998 echo "configure:3999: checking whether to use readline" >&5
3999 # Check whether --with-readline or --without-readline was given.
4000 if test "${with_readline+set}" = set; then
4001   withval="$with_readline"
4002     case "$with_readline" in
4003   yes)
4004     echo "$ac_t""yes" 1>&6
4005
4006     for ac_hdr in readline.h history.h readline/readline.h
4007 do
4008 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4009 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4010 echo "configure:4011: checking for $ac_hdr" >&5
4011 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4012   echo $ac_n "(cached) $ac_c" 1>&6
4013 else
4014   cat > conftest.$ac_ext <<EOF
4015 #line 4016 "configure"
4016 #include "confdefs.h"
4017 #include <$ac_hdr>
4018 EOF
4019 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4020 { (eval echo configure:4021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4021 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4022 if test -z "$ac_err"; then
4023   rm -rf conftest*
4024   eval "ac_cv_header_$ac_safe=yes"
4025 else
4026   echo "$ac_err" >&5
4027   echo "configure: failed program was:" >&5
4028   cat conftest.$ac_ext >&5
4029   rm -rf conftest*
4030   eval "ac_cv_header_$ac_safe=no"
4031 fi
4032 rm -f conftest*
4033 fi
4034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4035   echo "$ac_t""yes" 1>&6
4036     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4037   cat >> confdefs.h <<EOF
4038 #define $ac_tr_hdr 1
4039 EOF
4040  
4041 else
4042   echo "$ac_t""no" 1>&6
4043 fi
4044 done
4045
4046     for ac_hdr in readline/history.h
4047 do
4048 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4049 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4050 echo "configure:4051: checking for $ac_hdr" >&5
4051 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4052   echo $ac_n "(cached) $ac_c" 1>&6
4053 else
4054   cat > conftest.$ac_ext <<EOF
4055 #line 4056 "configure"
4056 #include "confdefs.h"
4057 #include <$ac_hdr>
4058 EOF
4059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4060 { (eval echo configure:4061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4062 if test -z "$ac_err"; then
4063   rm -rf conftest*
4064   eval "ac_cv_header_$ac_safe=yes"
4065 else
4066   echo "$ac_err" >&5
4067   echo "configure: failed program was:" >&5
4068   cat conftest.$ac_ext >&5
4069   rm -rf conftest*
4070   eval "ac_cv_header_$ac_safe=no"
4071 fi
4072 rm -f conftest*
4073 fi
4074 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4075   echo "$ac_t""yes" 1>&6
4076     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4077   cat >> confdefs.h <<EOF
4078 #define $ac_tr_hdr 1
4079 EOF
4080  
4081 else
4082   echo "$ac_t""no" 1>&6
4083 fi
4084 done
4085
4086
4087     for ac_hdr in readline.h readline/readline.h
4088 do
4089 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4090 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4091 echo "configure:4092: checking for $ac_hdr" >&5
4092 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4093   echo $ac_n "(cached) $ac_c" 1>&6
4094 else
4095   cat > conftest.$ac_ext <<EOF
4096 #line 4097 "configure"
4097 #include "confdefs.h"
4098 #include <$ac_hdr>
4099 EOF
4100 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4101 { (eval echo configure:4102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4102 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4103 if test -z "$ac_err"; then
4104   rm -rf conftest*
4105   eval "ac_cv_header_$ac_safe=yes"
4106 else
4107   echo "$ac_err" >&5
4108   echo "configure: failed program was:" >&5
4109   cat conftest.$ac_ext >&5
4110   rm -rf conftest*
4111   eval "ac_cv_header_$ac_safe=no"
4112 fi
4113 rm -f conftest*
4114 fi
4115 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4116   echo "$ac_t""yes" 1>&6
4117     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4118   cat >> confdefs.h <<EOF
4119 #define $ac_tr_hdr 1
4120 EOF
4121  
4122       for termlib in ncurses curses termcap terminfo termlib; do
4123        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4124 echo "configure:4125: checking for tgetent in -l${termlib}" >&5
4125 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4126 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4127   echo $ac_n "(cached) $ac_c" 1>&6
4128 else
4129   ac_save_LIBS="$LIBS"
4130 LIBS="-l${termlib}  $LIBS"
4131 cat > conftest.$ac_ext <<EOF
4132 #line 4133 "configure"
4133 #include "confdefs.h"
4134 /* Override any gcc2 internal prototype to avoid an error.  */
4135 /* We use char because int might match the return type of a gcc2
4136     builtin and then its argument prototype would still apply.  */
4137 char tgetent();
4138
4139 int main() {
4140 tgetent()
4141 ; return 0; }
4142 EOF
4143 if { (eval echo configure:4144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4144   rm -rf conftest*
4145   eval "ac_cv_lib_$ac_lib_var=yes"
4146 else
4147   echo "configure: failed program was:" >&5
4148   cat conftest.$ac_ext >&5
4149   rm -rf conftest*
4150   eval "ac_cv_lib_$ac_lib_var=no"
4151 fi
4152 rm -f conftest*
4153 LIBS="$ac_save_LIBS"
4154
4155 fi
4156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4157   echo "$ac_t""yes" 1>&6
4158   TERMLIBS="-l${termlib}"; break
4159 else
4160   echo "$ac_t""no" 1>&6
4161 fi
4162
4163       done
4164       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4165 echo "configure:4166: checking for rl_callback_handler_install in -lreadline" >&5
4166 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4167 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4168   echo $ac_n "(cached) $ac_c" 1>&6
4169 else
4170   ac_save_LIBS="$LIBS"
4171 LIBS="-lreadline $TERMLIBS $LIBS"
4172 cat > conftest.$ac_ext <<EOF
4173 #line 4174 "configure"
4174 #include "confdefs.h"
4175 /* Override any gcc2 internal prototype to avoid an error.  */
4176 /* We use char because int might match the return type of a gcc2
4177     builtin and then its argument prototype would still apply.  */
4178 char rl_callback_handler_install();
4179
4180 int main() {
4181 rl_callback_handler_install()
4182 ; return 0; }
4183 EOF
4184 if { (eval echo configure:4185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4185   rm -rf conftest*
4186   eval "ac_cv_lib_$ac_lib_var=yes"
4187 else
4188   echo "configure: failed program was:" >&5
4189   cat conftest.$ac_ext >&5
4190   rm -rf conftest*
4191   eval "ac_cv_lib_$ac_lib_var=no"
4192 fi
4193 rm -f conftest*
4194 LIBS="$ac_save_LIBS"
4195
4196 fi
4197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4198   echo "$ac_t""yes" 1>&6
4199   TERMLIBS="-lreadline $TERMLIBS"
4200        cat >> confdefs.h <<\EOF
4201 #define HAVE_LIBREADLINE 1
4202 EOF
4203
4204        break
4205 else
4206   echo "$ac_t""no" 1>&6
4207 TERMLIBS=
4208 fi
4209
4210 else
4211   echo "$ac_t""no" 1>&6
4212 fi
4213 done
4214
4215     ;;
4216   no)
4217     echo "$ac_t""no" 1>&6
4218     ;;
4219   *)
4220     echo "$ac_t""yes" 1>&6
4221
4222     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4223     # alternate readline path
4224     _ldflags=${LDFLAGS}
4225     _cppflags=${CPPFLAGS}
4226
4227     # Add additional search path
4228     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4229     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4230
4231     for ac_hdr in readline.h history.h readline/readline.h
4232 do
4233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4235 echo "configure:4236: checking for $ac_hdr" >&5
4236 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4237   echo $ac_n "(cached) $ac_c" 1>&6
4238 else
4239   cat > conftest.$ac_ext <<EOF
4240 #line 4241 "configure"
4241 #include "confdefs.h"
4242 #include <$ac_hdr>
4243 EOF
4244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4245 { (eval echo configure:4246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4247 if test -z "$ac_err"; then
4248   rm -rf conftest*
4249   eval "ac_cv_header_$ac_safe=yes"
4250 else
4251   echo "$ac_err" >&5
4252   echo "configure: failed program was:" >&5
4253   cat conftest.$ac_ext >&5
4254   rm -rf conftest*
4255   eval "ac_cv_header_$ac_safe=no"
4256 fi
4257 rm -f conftest*
4258 fi
4259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4260   echo "$ac_t""yes" 1>&6
4261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4262   cat >> confdefs.h <<EOF
4263 #define $ac_tr_hdr 1
4264 EOF
4265  
4266 else
4267   echo "$ac_t""no" 1>&6
4268 fi
4269 done
4270
4271     for ac_hdr in readline/history.h
4272 do
4273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4275 echo "configure:4276: checking for $ac_hdr" >&5
4276 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4277   echo $ac_n "(cached) $ac_c" 1>&6
4278 else
4279   cat > conftest.$ac_ext <<EOF
4280 #line 4281 "configure"
4281 #include "confdefs.h"
4282 #include <$ac_hdr>
4283 EOF
4284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4285 { (eval echo configure:4286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4287 if test -z "$ac_err"; then
4288   rm -rf conftest*
4289   eval "ac_cv_header_$ac_safe=yes"
4290 else
4291   echo "$ac_err" >&5
4292   echo "configure: failed program was:" >&5
4293   cat conftest.$ac_ext >&5
4294   rm -rf conftest*
4295   eval "ac_cv_header_$ac_safe=no"
4296 fi
4297 rm -f conftest*
4298 fi
4299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4300   echo "$ac_t""yes" 1>&6
4301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4302   cat >> confdefs.h <<EOF
4303 #define $ac_tr_hdr 1
4304 EOF
4305  
4306 else
4307   echo "$ac_t""no" 1>&6
4308 fi
4309 done
4310
4311
4312     for ac_hdr in readline.h readline/readline.h
4313 do
4314 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4315 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4316 echo "configure:4317: checking for $ac_hdr" >&5
4317 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4318   echo $ac_n "(cached) $ac_c" 1>&6
4319 else
4320   cat > conftest.$ac_ext <<EOF
4321 #line 4322 "configure"
4322 #include "confdefs.h"
4323 #include <$ac_hdr>
4324 EOF
4325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4326 { (eval echo configure:4327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4328 if test -z "$ac_err"; then
4329   rm -rf conftest*
4330   eval "ac_cv_header_$ac_safe=yes"
4331 else
4332   echo "$ac_err" >&5
4333   echo "configure: failed program was:" >&5
4334   cat conftest.$ac_ext >&5
4335   rm -rf conftest*
4336   eval "ac_cv_header_$ac_safe=no"
4337 fi
4338 rm -f conftest*
4339 fi
4340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4341   echo "$ac_t""yes" 1>&6
4342     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4343   cat >> confdefs.h <<EOF
4344 #define $ac_tr_hdr 1
4345 EOF
4346  
4347       for termlib in ncurses curses termcap terminfo termlib; do
4348        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4349 echo "configure:4350: checking for tgetent in -l${termlib}" >&5
4350 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4351 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4352   echo $ac_n "(cached) $ac_c" 1>&6
4353 else
4354   ac_save_LIBS="$LIBS"
4355 LIBS="-l${termlib}  $LIBS"
4356 cat > conftest.$ac_ext <<EOF
4357 #line 4358 "configure"
4358 #include "confdefs.h"
4359 /* Override any gcc2 internal prototype to avoid an error.  */
4360 /* We use char because int might match the return type of a gcc2
4361     builtin and then its argument prototype would still apply.  */
4362 char tgetent();
4363
4364 int main() {
4365 tgetent()
4366 ; return 0; }
4367 EOF
4368 if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4369   rm -rf conftest*
4370   eval "ac_cv_lib_$ac_lib_var=yes"
4371 else
4372   echo "configure: failed program was:" >&5
4373   cat conftest.$ac_ext >&5
4374   rm -rf conftest*
4375   eval "ac_cv_lib_$ac_lib_var=no"
4376 fi
4377 rm -f conftest*
4378 LIBS="$ac_save_LIBS"
4379
4380 fi
4381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4382   echo "$ac_t""yes" 1>&6
4383   TERMLIBS="-l${termlib}"; break
4384 else
4385   echo "$ac_t""no" 1>&6
4386 fi
4387
4388       done
4389       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4390 echo "configure:4391: checking for rl_callback_handler_install in -lreadline" >&5
4391 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4392 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4393   echo $ac_n "(cached) $ac_c" 1>&6
4394 else
4395   ac_save_LIBS="$LIBS"
4396 LIBS="-lreadline $TERMLIBS $LIBS"
4397 cat > conftest.$ac_ext <<EOF
4398 #line 4399 "configure"
4399 #include "confdefs.h"
4400 /* Override any gcc2 internal prototype to avoid an error.  */
4401 /* We use char because int might match the return type of a gcc2
4402     builtin and then its argument prototype would still apply.  */
4403 char rl_callback_handler_install();
4404
4405 int main() {
4406 rl_callback_handler_install()
4407 ; return 0; }
4408 EOF
4409 if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4410   rm -rf conftest*
4411   eval "ac_cv_lib_$ac_lib_var=yes"
4412 else
4413   echo "configure: failed program was:" >&5
4414   cat conftest.$ac_ext >&5
4415   rm -rf conftest*
4416   eval "ac_cv_lib_$ac_lib_var=no"
4417 fi
4418 rm -f conftest*
4419 LIBS="$ac_save_LIBS"
4420
4421 fi
4422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4423   echo "$ac_t""yes" 1>&6
4424   TERMLDFLAGS="-L$with_readline/lib"
4425        TERMCPPFLAGS="-I$with_readline/include"
4426        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4427        TERMLIBS="-lreadline $TERMLIBS"
4428        cat >> confdefs.h <<\EOF
4429 #define HAVE_LIBREADLINE 1
4430 EOF
4431
4432        break
4433 else
4434   echo "$ac_t""no" 1>&6
4435 TERMLIBS= CPPFLAGS=$_cppflags
4436 fi
4437
4438 else
4439   echo "$ac_t""no" 1>&6
4440 fi
4441 done
4442
4443
4444     LDFLAGS=$_ldflags
4445     ;;
4446   esac
4447 else
4448   echo "$ac_t""no" 1>&6
4449
4450 fi
4451
4452
4453
4454
4455 # The following test taken from the cvs sources
4456 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4457 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4458 # libsocket.so which has a bad implementation of gethostbyname (it
4459 # only looks in /etc/hosts), so we only look for -lsocket if we need
4460 # it.
4461 for ac_func in connect
4462 do
4463 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4464 echo "configure:4465: checking for $ac_func" >&5
4465 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4466   echo $ac_n "(cached) $ac_c" 1>&6
4467 else
4468   cat > conftest.$ac_ext <<EOF
4469 #line 4470 "configure"
4470 #include "confdefs.h"
4471 /* System header to define __stub macros and hopefully few prototypes,
4472     which can conflict with char $ac_func(); below.  */
4473 #include <assert.h>
4474 /* Override any gcc2 internal prototype to avoid an error.  */
4475 /* We use char because int might match the return type of a gcc2
4476     builtin and then its argument prototype would still apply.  */
4477 char $ac_func();
4478
4479 int main() {
4480
4481 /* The GNU C library defines this for functions which it implements
4482     to always fail with ENOSYS.  Some functions are actually named
4483     something starting with __ and the normal name is an alias.  */
4484 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4485 choke me
4486 #else
4487 $ac_func();
4488 #endif
4489
4490 ; return 0; }
4491 EOF
4492 if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4493   rm -rf conftest*
4494   eval "ac_cv_func_$ac_func=yes"
4495 else
4496   echo "configure: failed program was:" >&5
4497   cat conftest.$ac_ext >&5
4498   rm -rf conftest*
4499   eval "ac_cv_func_$ac_func=no"
4500 fi
4501 rm -f conftest*
4502 fi
4503
4504 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4505   echo "$ac_t""yes" 1>&6
4506     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4507   cat >> confdefs.h <<EOF
4508 #define $ac_tr_func 1
4509 EOF
4510  
4511 else
4512   echo "$ac_t""no" 1>&6
4513 fi
4514 done
4515
4516 if test x"$ac_cv_func_connect" = x"no"; then
4517     case "$LIBS" in
4518     *-lnsl*) ;;
4519     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4520 echo "configure:4521: checking for printf in -lnsl_s" >&5
4521 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4522 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4523   echo $ac_n "(cached) $ac_c" 1>&6
4524 else
4525   ac_save_LIBS="$LIBS"
4526 LIBS="-lnsl_s  $LIBS"
4527 cat > conftest.$ac_ext <<EOF
4528 #line 4529 "configure"
4529 #include "confdefs.h"
4530 /* Override any gcc2 internal prototype to avoid an error.  */
4531 /* We use char because int might match the return type of a gcc2
4532     builtin and then its argument prototype would still apply.  */
4533 char printf();
4534
4535 int main() {
4536 printf()
4537 ; return 0; }
4538 EOF
4539 if { (eval echo configure:4540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4540   rm -rf conftest*
4541   eval "ac_cv_lib_$ac_lib_var=yes"
4542 else
4543   echo "configure: failed program was:" >&5
4544   cat conftest.$ac_ext >&5
4545   rm -rf conftest*
4546   eval "ac_cv_lib_$ac_lib_var=no"
4547 fi
4548 rm -f conftest*
4549 LIBS="$ac_save_LIBS"
4550
4551 fi
4552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4553   echo "$ac_t""yes" 1>&6
4554     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4555     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4556   cat >> confdefs.h <<EOF
4557 #define $ac_tr_lib 1
4558 EOF
4559
4560   LIBS="-lnsl_s $LIBS"
4561
4562 else
4563   echo "$ac_t""no" 1>&6
4564 fi
4565  ;;
4566     esac
4567     case "$LIBS" in
4568     *-lnsl*) ;;
4569     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4570 echo "configure:4571: checking for printf in -lnsl" >&5
4571 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4572 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4573   echo $ac_n "(cached) $ac_c" 1>&6
4574 else
4575   ac_save_LIBS="$LIBS"
4576 LIBS="-lnsl  $LIBS"
4577 cat > conftest.$ac_ext <<EOF
4578 #line 4579 "configure"
4579 #include "confdefs.h"
4580 /* Override any gcc2 internal prototype to avoid an error.  */
4581 /* We use char because int might match the return type of a gcc2
4582     builtin and then its argument prototype would still apply.  */
4583 char printf();
4584
4585 int main() {
4586 printf()
4587 ; return 0; }
4588 EOF
4589 if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4590   rm -rf conftest*
4591   eval "ac_cv_lib_$ac_lib_var=yes"
4592 else
4593   echo "configure: failed program was:" >&5
4594   cat conftest.$ac_ext >&5
4595   rm -rf conftest*
4596   eval "ac_cv_lib_$ac_lib_var=no"
4597 fi
4598 rm -f conftest*
4599 LIBS="$ac_save_LIBS"
4600
4601 fi
4602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4603   echo "$ac_t""yes" 1>&6
4604     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4605     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4606   cat >> confdefs.h <<EOF
4607 #define $ac_tr_lib 1
4608 EOF
4609
4610   LIBS="-lnsl $LIBS"
4611
4612 else
4613   echo "$ac_t""no" 1>&6
4614 fi
4615  ;;
4616     esac
4617     case "$LIBS" in
4618     *-lsocket*) ;;
4619     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4620 echo "configure:4621: checking for connect in -lsocket" >&5
4621 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4622 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4623   echo $ac_n "(cached) $ac_c" 1>&6
4624 else
4625   ac_save_LIBS="$LIBS"
4626 LIBS="-lsocket  $LIBS"
4627 cat > conftest.$ac_ext <<EOF
4628 #line 4629 "configure"
4629 #include "confdefs.h"
4630 /* Override any gcc2 internal prototype to avoid an error.  */
4631 /* We use char because int might match the return type of a gcc2
4632     builtin and then its argument prototype would still apply.  */
4633 char connect();
4634
4635 int main() {
4636 connect()
4637 ; return 0; }
4638 EOF
4639 if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4640   rm -rf conftest*
4641   eval "ac_cv_lib_$ac_lib_var=yes"
4642 else
4643   echo "configure: failed program was:" >&5
4644   cat conftest.$ac_ext >&5
4645   rm -rf conftest*
4646   eval "ac_cv_lib_$ac_lib_var=no"
4647 fi
4648 rm -f conftest*
4649 LIBS="$ac_save_LIBS"
4650
4651 fi
4652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4653   echo "$ac_t""yes" 1>&6
4654     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4655     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4656   cat >> confdefs.h <<EOF
4657 #define $ac_tr_lib 1
4658 EOF
4659
4660   LIBS="-lsocket $LIBS"
4661
4662 else
4663   echo "$ac_t""no" 1>&6
4664 fi
4665  ;;
4666     esac
4667     case "$LIBS" in
4668     *-linet*) ;;
4669     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4670 echo "configure:4671: checking for connect in -linet" >&5
4671 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4672 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4673   echo $ac_n "(cached) $ac_c" 1>&6
4674 else
4675   ac_save_LIBS="$LIBS"
4676 LIBS="-linet  $LIBS"
4677 cat > conftest.$ac_ext <<EOF
4678 #line 4679 "configure"
4679 #include "confdefs.h"
4680 /* Override any gcc2 internal prototype to avoid an error.  */
4681 /* We use char because int might match the return type of a gcc2
4682     builtin and then its argument prototype would still apply.  */
4683 char connect();
4684
4685 int main() {
4686 connect()
4687 ; return 0; }
4688 EOF
4689 if { (eval echo configure:4690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4690   rm -rf conftest*
4691   eval "ac_cv_lib_$ac_lib_var=yes"
4692 else
4693   echo "configure: failed program was:" >&5
4694   cat conftest.$ac_ext >&5
4695   rm -rf conftest*
4696   eval "ac_cv_lib_$ac_lib_var=no"
4697 fi
4698 rm -f conftest*
4699 LIBS="$ac_save_LIBS"
4700
4701 fi
4702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4703   echo "$ac_t""yes" 1>&6
4704     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4705     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4706   cat >> confdefs.h <<EOF
4707 #define $ac_tr_lib 1
4708 EOF
4709
4710   LIBS="-linet $LIBS"
4711
4712 else
4713   echo "$ac_t""no" 1>&6
4714 fi
4715  ;;
4716     esac
4717             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4718        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4719         # ac_cv_func_connect=yes
4720         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4721         cat >> confdefs.h <<\EOF
4722 #define HAVE_CONNECT 1
4723 EOF
4724
4725     fi
4726 fi
4727
4728 ###############################################
4729 # test for where we get get_yp_default_domain() from
4730 for ac_func in yp_get_default_domain
4731 do
4732 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4733 echo "configure:4734: checking for $ac_func" >&5
4734 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4735   echo $ac_n "(cached) $ac_c" 1>&6
4736 else
4737   cat > conftest.$ac_ext <<EOF
4738 #line 4739 "configure"
4739 #include "confdefs.h"
4740 /* System header to define __stub macros and hopefully few prototypes,
4741     which can conflict with char $ac_func(); below.  */
4742 #include <assert.h>
4743 /* Override any gcc2 internal prototype to avoid an error.  */
4744 /* We use char because int might match the return type of a gcc2
4745     builtin and then its argument prototype would still apply.  */
4746 char $ac_func();
4747
4748 int main() {
4749
4750 /* The GNU C library defines this for functions which it implements
4751     to always fail with ENOSYS.  Some functions are actually named
4752     something starting with __ and the normal name is an alias.  */
4753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4754 choke me
4755 #else
4756 $ac_func();
4757 #endif
4758
4759 ; return 0; }
4760 EOF
4761 if { (eval echo configure:4762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4762   rm -rf conftest*
4763   eval "ac_cv_func_$ac_func=yes"
4764 else
4765   echo "configure: failed program was:" >&5
4766   cat conftest.$ac_ext >&5
4767   rm -rf conftest*
4768   eval "ac_cv_func_$ac_func=no"
4769 fi
4770 rm -f conftest*
4771 fi
4772
4773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4774   echo "$ac_t""yes" 1>&6
4775     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4776   cat >> confdefs.h <<EOF
4777 #define $ac_tr_func 1
4778 EOF
4779  
4780 else
4781   echo "$ac_t""no" 1>&6
4782 fi
4783 done
4784
4785 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
4786         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
4787 echo "configure:4788: checking for yp_get_default_domain in -lnsl" >&5
4788 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
4789 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4790   echo $ac_n "(cached) $ac_c" 1>&6
4791 else
4792   ac_save_LIBS="$LIBS"
4793 LIBS="-lnsl  $LIBS"
4794 cat > conftest.$ac_ext <<EOF
4795 #line 4796 "configure"
4796 #include "confdefs.h"
4797 /* Override any gcc2 internal prototype to avoid an error.  */
4798 /* We use char because int might match the return type of a gcc2
4799     builtin and then its argument prototype would still apply.  */
4800 char yp_get_default_domain();
4801
4802 int main() {
4803 yp_get_default_domain()
4804 ; return 0; }
4805 EOF
4806 if { (eval echo configure:4807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4807   rm -rf conftest*
4808   eval "ac_cv_lib_$ac_lib_var=yes"
4809 else
4810   echo "configure: failed program was:" >&5
4811   cat conftest.$ac_ext >&5
4812   rm -rf conftest*
4813   eval "ac_cv_lib_$ac_lib_var=no"
4814 fi
4815 rm -f conftest*
4816 LIBS="$ac_save_LIBS"
4817
4818 fi
4819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4820   echo "$ac_t""yes" 1>&6
4821   LIBS="$LIBS -lnsl";
4822         cat >> confdefs.h <<\EOF
4823 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
4824 EOF
4825
4826 else
4827   echo "$ac_t""no" 1>&6
4828 fi
4829  
4830 fi
4831
4832 # Check if we have execl, if not we need to compile smbrun.
4833 for ac_func in execl
4834 do
4835 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4836 echo "configure:4837: checking for $ac_func" >&5
4837 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4838   echo $ac_n "(cached) $ac_c" 1>&6
4839 else
4840   cat > conftest.$ac_ext <<EOF
4841 #line 4842 "configure"
4842 #include "confdefs.h"
4843 /* System header to define __stub macros and hopefully few prototypes,
4844     which can conflict with char $ac_func(); below.  */
4845 #include <assert.h>
4846 /* Override any gcc2 internal prototype to avoid an error.  */
4847 /* We use char because int might match the return type of a gcc2
4848     builtin and then its argument prototype would still apply.  */
4849 char $ac_func();
4850
4851 int main() {
4852
4853 /* The GNU C library defines this for functions which it implements
4854     to always fail with ENOSYS.  Some functions are actually named
4855     something starting with __ and the normal name is an alias.  */
4856 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4857 choke me
4858 #else
4859 $ac_func();
4860 #endif
4861
4862 ; return 0; }
4863 EOF
4864 if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4865   rm -rf conftest*
4866   eval "ac_cv_func_$ac_func=yes"
4867 else
4868   echo "configure: failed program was:" >&5
4869   cat conftest.$ac_ext >&5
4870   rm -rf conftest*
4871   eval "ac_cv_func_$ac_func=no"
4872 fi
4873 rm -f conftest*
4874 fi
4875
4876 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4877   echo "$ac_t""yes" 1>&6
4878     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4879   cat >> confdefs.h <<EOF
4880 #define $ac_tr_func 1
4881 EOF
4882  
4883 else
4884   echo "$ac_t""no" 1>&6
4885 fi
4886 done
4887
4888 if test x"$ac_cv_func_execl" = x"no"; then
4889     RUNPROG="bin/smbrun"
4890 else
4891     RUNPROG=""
4892 fi
4893
4894 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
4895 do
4896 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4897 echo "configure:4898: checking for $ac_func" >&5
4898 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4899   echo $ac_n "(cached) $ac_c" 1>&6
4900 else
4901   cat > conftest.$ac_ext <<EOF
4902 #line 4903 "configure"
4903 #include "confdefs.h"
4904 /* System header to define __stub macros and hopefully few prototypes,
4905     which can conflict with char $ac_func(); below.  */
4906 #include <assert.h>
4907 /* Override any gcc2 internal prototype to avoid an error.  */
4908 /* We use char because int might match the return type of a gcc2
4909     builtin and then its argument prototype would still apply.  */
4910 char $ac_func();
4911
4912 int main() {
4913
4914 /* The GNU C library defines this for functions which it implements
4915     to always fail with ENOSYS.  Some functions are actually named
4916     something starting with __ and the normal name is an alias.  */
4917 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4918 choke me
4919 #else
4920 $ac_func();
4921 #endif
4922
4923 ; return 0; }
4924 EOF
4925 if { (eval echo configure:4926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4926   rm -rf conftest*
4927   eval "ac_cv_func_$ac_func=yes"
4928 else
4929   echo "configure: failed program was:" >&5
4930   cat conftest.$ac_ext >&5
4931   rm -rf conftest*
4932   eval "ac_cv_func_$ac_func=no"
4933 fi
4934 rm -f conftest*
4935 fi
4936
4937 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4938   echo "$ac_t""yes" 1>&6
4939     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4940   cat >> confdefs.h <<EOF
4941 #define $ac_tr_func 1
4942 EOF
4943  
4944 else
4945   echo "$ac_t""no" 1>&6
4946 fi
4947 done
4948
4949 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
4950 do
4951 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4952 echo "configure:4953: checking for $ac_func" >&5
4953 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4954   echo $ac_n "(cached) $ac_c" 1>&6
4955 else
4956   cat > conftest.$ac_ext <<EOF
4957 #line 4958 "configure"
4958 #include "confdefs.h"
4959 /* System header to define __stub macros and hopefully few prototypes,
4960     which can conflict with char $ac_func(); below.  */
4961 #include <assert.h>
4962 /* Override any gcc2 internal prototype to avoid an error.  */
4963 /* We use char because int might match the return type of a gcc2
4964     builtin and then its argument prototype would still apply.  */
4965 char $ac_func();
4966
4967 int main() {
4968
4969 /* The GNU C library defines this for functions which it implements
4970     to always fail with ENOSYS.  Some functions are actually named
4971     something starting with __ and the normal name is an alias.  */
4972 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4973 choke me
4974 #else
4975 $ac_func();
4976 #endif
4977
4978 ; return 0; }
4979 EOF
4980 if { (eval echo configure:4981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4981   rm -rf conftest*
4982   eval "ac_cv_func_$ac_func=yes"
4983 else
4984   echo "configure: failed program was:" >&5
4985   cat conftest.$ac_ext >&5
4986   rm -rf conftest*
4987   eval "ac_cv_func_$ac_func=no"
4988 fi
4989 rm -f conftest*
4990 fi
4991
4992 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4993   echo "$ac_t""yes" 1>&6
4994     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4995   cat >> confdefs.h <<EOF
4996 #define $ac_tr_func 1
4997 EOF
4998  
4999 else
5000   echo "$ac_t""no" 1>&6
5001 fi
5002 done
5003
5004 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5005 do
5006 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5007 echo "configure:5008: checking for $ac_func" >&5
5008 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5009   echo $ac_n "(cached) $ac_c" 1>&6
5010 else
5011   cat > conftest.$ac_ext <<EOF
5012 #line 5013 "configure"
5013 #include "confdefs.h"
5014 /* System header to define __stub macros and hopefully few prototypes,
5015     which can conflict with char $ac_func(); below.  */
5016 #include <assert.h>
5017 /* Override any gcc2 internal prototype to avoid an error.  */
5018 /* We use char because int might match the return type of a gcc2
5019     builtin and then its argument prototype would still apply.  */
5020 char $ac_func();
5021
5022 int main() {
5023
5024 /* The GNU C library defines this for functions which it implements
5025     to always fail with ENOSYS.  Some functions are actually named
5026     something starting with __ and the normal name is an alias.  */
5027 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5028 choke me
5029 #else
5030 $ac_func();
5031 #endif
5032
5033 ; return 0; }
5034 EOF
5035 if { (eval echo configure:5036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5036   rm -rf conftest*
5037   eval "ac_cv_func_$ac_func=yes"
5038 else
5039   echo "configure: failed program was:" >&5
5040   cat conftest.$ac_ext >&5
5041   rm -rf conftest*
5042   eval "ac_cv_func_$ac_func=no"
5043 fi
5044 rm -f conftest*
5045 fi
5046
5047 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5048   echo "$ac_t""yes" 1>&6
5049     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5050   cat >> confdefs.h <<EOF
5051 #define $ac_tr_func 1
5052 EOF
5053  
5054 else
5055   echo "$ac_t""no" 1>&6
5056 fi
5057 done
5058
5059 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
5060 do
5061 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5062 echo "configure:5063: checking for $ac_func" >&5
5063 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5064   echo $ac_n "(cached) $ac_c" 1>&6
5065 else
5066   cat > conftest.$ac_ext <<EOF
5067 #line 5068 "configure"
5068 #include "confdefs.h"
5069 /* System header to define __stub macros and hopefully few prototypes,
5070     which can conflict with char $ac_func(); below.  */
5071 #include <assert.h>
5072 /* Override any gcc2 internal prototype to avoid an error.  */
5073 /* We use char because int might match the return type of a gcc2
5074     builtin and then its argument prototype would still apply.  */
5075 char $ac_func();
5076
5077 int main() {
5078
5079 /* The GNU C library defines this for functions which it implements
5080     to always fail with ENOSYS.  Some functions are actually named
5081     something starting with __ and the normal name is an alias.  */
5082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5083 choke me
5084 #else
5085 $ac_func();
5086 #endif
5087
5088 ; return 0; }
5089 EOF
5090 if { (eval echo configure:5091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5091   rm -rf conftest*
5092   eval "ac_cv_func_$ac_func=yes"
5093 else
5094   echo "configure: failed program was:" >&5
5095   cat conftest.$ac_ext >&5
5096   rm -rf conftest*
5097   eval "ac_cv_func_$ac_func=no"
5098 fi
5099 rm -f conftest*
5100 fi
5101
5102 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5103   echo "$ac_t""yes" 1>&6
5104     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5105   cat >> confdefs.h <<EOF
5106 #define $ac_tr_func 1
5107 EOF
5108  
5109 else
5110   echo "$ac_t""no" 1>&6
5111 fi
5112 done
5113
5114 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5115 do
5116 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5117 echo "configure:5118: checking for $ac_func" >&5
5118 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5119   echo $ac_n "(cached) $ac_c" 1>&6
5120 else
5121   cat > conftest.$ac_ext <<EOF
5122 #line 5123 "configure"
5123 #include "confdefs.h"
5124 /* System header to define __stub macros and hopefully few prototypes,
5125     which can conflict with char $ac_func(); below.  */
5126 #include <assert.h>
5127 /* Override any gcc2 internal prototype to avoid an error.  */
5128 /* We use char because int might match the return type of a gcc2
5129     builtin and then its argument prototype would still apply.  */
5130 char $ac_func();
5131
5132 int main() {
5133
5134 /* The GNU C library defines this for functions which it implements
5135     to always fail with ENOSYS.  Some functions are actually named
5136     something starting with __ and the normal name is an alias.  */
5137 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5138 choke me
5139 #else
5140 $ac_func();
5141 #endif
5142
5143 ; return 0; }
5144 EOF
5145 if { (eval echo configure:5146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5146   rm -rf conftest*
5147   eval "ac_cv_func_$ac_func=yes"
5148 else
5149   echo "configure: failed program was:" >&5
5150   cat conftest.$ac_ext >&5
5151   rm -rf conftest*
5152   eval "ac_cv_func_$ac_func=no"
5153 fi
5154 rm -f conftest*
5155 fi
5156
5157 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5158   echo "$ac_t""yes" 1>&6
5159     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5160   cat >> confdefs.h <<EOF
5161 #define $ac_tr_func 1
5162 EOF
5163  
5164 else
5165   echo "$ac_t""no" 1>&6
5166 fi
5167 done
5168
5169 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5170 do
5171 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5172 echo "configure:5173: checking for $ac_func" >&5
5173 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5174   echo $ac_n "(cached) $ac_c" 1>&6
5175 else
5176   cat > conftest.$ac_ext <<EOF
5177 #line 5178 "configure"
5178 #include "confdefs.h"
5179 /* System header to define __stub macros and hopefully few prototypes,
5180     which can conflict with char $ac_func(); below.  */
5181 #include <assert.h>
5182 /* Override any gcc2 internal prototype to avoid an error.  */
5183 /* We use char because int might match the return type of a gcc2
5184     builtin and then its argument prototype would still apply.  */
5185 char $ac_func();
5186
5187 int main() {
5188
5189 /* The GNU C library defines this for functions which it implements
5190     to always fail with ENOSYS.  Some functions are actually named
5191     something starting with __ and the normal name is an alias.  */
5192 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5193 choke me
5194 #else
5195 $ac_func();
5196 #endif
5197
5198 ; return 0; }
5199 EOF
5200 if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5201   rm -rf conftest*
5202   eval "ac_cv_func_$ac_func=yes"
5203 else
5204   echo "configure: failed program was:" >&5
5205   cat conftest.$ac_ext >&5
5206   rm -rf conftest*
5207   eval "ac_cv_func_$ac_func=no"
5208 fi
5209 rm -f conftest*
5210 fi
5211
5212 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5213   echo "$ac_t""yes" 1>&6
5214     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5215   cat >> confdefs.h <<EOF
5216 #define $ac_tr_func 1
5217 EOF
5218  
5219 else
5220   echo "$ac_t""no" 1>&6
5221 fi
5222 done
5223
5224 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5225 do
5226 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5227 echo "configure:5228: checking for $ac_func" >&5
5228 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5229   echo $ac_n "(cached) $ac_c" 1>&6
5230 else
5231   cat > conftest.$ac_ext <<EOF
5232 #line 5233 "configure"
5233 #include "confdefs.h"
5234 /* System header to define __stub macros and hopefully few prototypes,
5235     which can conflict with char $ac_func(); below.  */
5236 #include <assert.h>
5237 /* Override any gcc2 internal prototype to avoid an error.  */
5238 /* We use char because int might match the return type of a gcc2
5239     builtin and then its argument prototype would still apply.  */
5240 char $ac_func();
5241
5242 int main() {
5243
5244 /* The GNU C library defines this for functions which it implements
5245     to always fail with ENOSYS.  Some functions are actually named
5246     something starting with __ and the normal name is an alias.  */
5247 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5248 choke me
5249 #else
5250 $ac_func();
5251 #endif
5252
5253 ; return 0; }
5254 EOF
5255 if { (eval echo configure:5256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5256   rm -rf conftest*
5257   eval "ac_cv_func_$ac_func=yes"
5258 else
5259   echo "configure: failed program was:" >&5
5260   cat conftest.$ac_ext >&5
5261   rm -rf conftest*
5262   eval "ac_cv_func_$ac_func=no"
5263 fi
5264 rm -f conftest*
5265 fi
5266
5267 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5268   echo "$ac_t""yes" 1>&6
5269     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5270   cat >> confdefs.h <<EOF
5271 #define $ac_tr_func 1
5272 EOF
5273  
5274 else
5275   echo "$ac_t""no" 1>&6
5276 fi
5277 done
5278
5279 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5280 do
5281 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5282 echo "configure:5283: checking for $ac_func" >&5
5283 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5284   echo $ac_n "(cached) $ac_c" 1>&6
5285 else
5286   cat > conftest.$ac_ext <<EOF
5287 #line 5288 "configure"
5288 #include "confdefs.h"
5289 /* System header to define __stub macros and hopefully few prototypes,
5290     which can conflict with char $ac_func(); below.  */
5291 #include <assert.h>
5292 /* Override any gcc2 internal prototype to avoid an error.  */
5293 /* We use char because int might match the return type of a gcc2
5294     builtin and then its argument prototype would still apply.  */
5295 char $ac_func();
5296
5297 int main() {
5298
5299 /* The GNU C library defines this for functions which it implements
5300     to always fail with ENOSYS.  Some functions are actually named
5301     something starting with __ and the normal name is an alias.  */
5302 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5303 choke me
5304 #else
5305 $ac_func();
5306 #endif
5307
5308 ; return 0; }
5309 EOF
5310 if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5311   rm -rf conftest*
5312   eval "ac_cv_func_$ac_func=yes"
5313 else
5314   echo "configure: failed program was:" >&5
5315   cat conftest.$ac_ext >&5
5316   rm -rf conftest*
5317   eval "ac_cv_func_$ac_func=no"
5318 fi
5319 rm -f conftest*
5320 fi
5321
5322 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5323   echo "$ac_t""yes" 1>&6
5324     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5325   cat >> confdefs.h <<EOF
5326 #define $ac_tr_func 1
5327 EOF
5328  
5329 else
5330   echo "$ac_t""no" 1>&6
5331 fi
5332 done
5333
5334 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5335 do
5336 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5337 echo "configure:5338: checking for $ac_func" >&5
5338 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5339   echo $ac_n "(cached) $ac_c" 1>&6
5340 else
5341   cat > conftest.$ac_ext <<EOF
5342 #line 5343 "configure"
5343 #include "confdefs.h"
5344 /* System header to define __stub macros and hopefully few prototypes,
5345     which can conflict with char $ac_func(); below.  */
5346 #include <assert.h>
5347 /* Override any gcc2 internal prototype to avoid an error.  */
5348 /* We use char because int might match the return type of a gcc2
5349     builtin and then its argument prototype would still apply.  */
5350 char $ac_func();
5351
5352 int main() {
5353
5354 /* The GNU C library defines this for functions which it implements
5355     to always fail with ENOSYS.  Some functions are actually named
5356     something starting with __ and the normal name is an alias.  */
5357 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5358 choke me
5359 #else
5360 $ac_func();
5361 #endif
5362
5363 ; return 0; }
5364 EOF
5365 if { (eval echo configure:5366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5366   rm -rf conftest*
5367   eval "ac_cv_func_$ac_func=yes"
5368 else
5369   echo "configure: failed program was:" >&5
5370   cat conftest.$ac_ext >&5
5371   rm -rf conftest*
5372   eval "ac_cv_func_$ac_func=no"
5373 fi
5374 rm -f conftest*
5375 fi
5376
5377 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5378   echo "$ac_t""yes" 1>&6
5379     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5380   cat >> confdefs.h <<EOF
5381 #define $ac_tr_func 1
5382 EOF
5383  
5384 else
5385   echo "$ac_t""no" 1>&6
5386 fi
5387 done
5388
5389 # setbuffer is needed for smbtorture
5390 for ac_func in setbuffer
5391 do
5392 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5393 echo "configure:5394: checking for $ac_func" >&5
5394 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5395   echo $ac_n "(cached) $ac_c" 1>&6
5396 else
5397   cat > conftest.$ac_ext <<EOF
5398 #line 5399 "configure"
5399 #include "confdefs.h"
5400 /* System header to define __stub macros and hopefully few prototypes,
5401     which can conflict with char $ac_func(); below.  */
5402 #include <assert.h>
5403 /* Override any gcc2 internal prototype to avoid an error.  */
5404 /* We use char because int might match the return type of a gcc2
5405     builtin and then its argument prototype would still apply.  */
5406 char $ac_func();
5407
5408 int main() {
5409
5410 /* The GNU C library defines this for functions which it implements
5411     to always fail with ENOSYS.  Some functions are actually named
5412     something starting with __ and the normal name is an alias.  */
5413 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5414 choke me
5415 #else
5416 $ac_func();
5417 #endif
5418
5419 ; return 0; }
5420 EOF
5421 if { (eval echo configure:5422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5422   rm -rf conftest*
5423   eval "ac_cv_func_$ac_func=yes"
5424 else
5425   echo "configure: failed program was:" >&5
5426   cat conftest.$ac_ext >&5
5427   rm -rf conftest*
5428   eval "ac_cv_func_$ac_func=no"
5429 fi
5430 rm -f conftest*
5431 fi
5432
5433 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5434   echo "$ac_t""yes" 1>&6
5435     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5436   cat >> confdefs.h <<EOF
5437 #define $ac_tr_func 1
5438 EOF
5439  
5440 else
5441   echo "$ac_t""no" 1>&6
5442 fi
5443 done
5444
5445
5446 # syscall() is needed for smbwrapper.
5447 for ac_func in syscall
5448 do
5449 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5450 echo "configure:5451: checking for $ac_func" >&5
5451 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5452   echo $ac_n "(cached) $ac_c" 1>&6
5453 else
5454   cat > conftest.$ac_ext <<EOF
5455 #line 5456 "configure"
5456 #include "confdefs.h"
5457 /* System header to define __stub macros and hopefully few prototypes,
5458     which can conflict with char $ac_func(); below.  */
5459 #include <assert.h>
5460 /* Override any gcc2 internal prototype to avoid an error.  */
5461 /* We use char because int might match the return type of a gcc2
5462     builtin and then its argument prototype would still apply.  */
5463 char $ac_func();
5464
5465 int main() {
5466
5467 /* The GNU C library defines this for functions which it implements
5468     to always fail with ENOSYS.  Some functions are actually named
5469     something starting with __ and the normal name is an alias.  */
5470 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5471 choke me
5472 #else
5473 $ac_func();
5474 #endif
5475
5476 ; return 0; }
5477 EOF
5478 if { (eval echo configure:5479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5479   rm -rf conftest*
5480   eval "ac_cv_func_$ac_func=yes"
5481 else
5482   echo "configure: failed program was:" >&5
5483   cat conftest.$ac_ext >&5
5484   rm -rf conftest*
5485   eval "ac_cv_func_$ac_func=no"
5486 fi
5487 rm -f conftest*
5488 fi
5489
5490 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5491   echo "$ac_t""yes" 1>&6
5492     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5493   cat >> confdefs.h <<EOF
5494 #define $ac_tr_func 1
5495 EOF
5496  
5497 else
5498   echo "$ac_t""no" 1>&6
5499 fi
5500 done
5501
5502
5503 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5504 do
5505 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5506 echo "configure:5507: checking for $ac_func" >&5
5507 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5508   echo $ac_n "(cached) $ac_c" 1>&6
5509 else
5510   cat > conftest.$ac_ext <<EOF
5511 #line 5512 "configure"
5512 #include "confdefs.h"
5513 /* System header to define __stub macros and hopefully few prototypes,
5514     which can conflict with char $ac_func(); below.  */
5515 #include <assert.h>
5516 /* Override any gcc2 internal prototype to avoid an error.  */
5517 /* We use char because int might match the return type of a gcc2
5518     builtin and then its argument prototype would still apply.  */
5519 char $ac_func();
5520
5521 int main() {
5522
5523 /* The GNU C library defines this for functions which it implements
5524     to always fail with ENOSYS.  Some functions are actually named
5525     something starting with __ and the normal name is an alias.  */
5526 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5527 choke me
5528 #else
5529 $ac_func();
5530 #endif
5531
5532 ; return 0; }
5533 EOF
5534 if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5535   rm -rf conftest*
5536   eval "ac_cv_func_$ac_func=yes"
5537 else
5538   echo "configure: failed program was:" >&5
5539   cat conftest.$ac_ext >&5
5540   rm -rf conftest*
5541   eval "ac_cv_func_$ac_func=no"
5542 fi
5543 rm -f conftest*
5544 fi
5545
5546 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5547   echo "$ac_t""yes" 1>&6
5548     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5549   cat >> confdefs.h <<EOF
5550 #define $ac_tr_func 1
5551 EOF
5552  
5553 else
5554   echo "$ac_t""no" 1>&6
5555 fi
5556 done
5557
5558 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5559 do
5560 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5561 echo "configure:5562: checking for $ac_func" >&5
5562 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5563   echo $ac_n "(cached) $ac_c" 1>&6
5564 else
5565   cat > conftest.$ac_ext <<EOF
5566 #line 5567 "configure"
5567 #include "confdefs.h"
5568 /* System header to define __stub macros and hopefully few prototypes,
5569     which can conflict with char $ac_func(); below.  */
5570 #include <assert.h>
5571 /* Override any gcc2 internal prototype to avoid an error.  */
5572 /* We use char because int might match the return type of a gcc2
5573     builtin and then its argument prototype would still apply.  */
5574 char $ac_func();
5575
5576 int main() {
5577
5578 /* The GNU C library defines this for functions which it implements
5579     to always fail with ENOSYS.  Some functions are actually named
5580     something starting with __ and the normal name is an alias.  */
5581 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5582 choke me
5583 #else
5584 $ac_func();
5585 #endif
5586
5587 ; return 0; }
5588 EOF
5589 if { (eval echo configure:5590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5590   rm -rf conftest*
5591   eval "ac_cv_func_$ac_func=yes"
5592 else
5593   echo "configure: failed program was:" >&5
5594   cat conftest.$ac_ext >&5
5595   rm -rf conftest*
5596   eval "ac_cv_func_$ac_func=no"
5597 fi
5598 rm -f conftest*
5599 fi
5600
5601 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5602   echo "$ac_t""yes" 1>&6
5603     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5604   cat >> confdefs.h <<EOF
5605 #define $ac_tr_func 1
5606 EOF
5607  
5608 else
5609   echo "$ac_t""no" 1>&6
5610 fi
5611 done
5612
5613 for ac_func in __getcwd _getcwd
5614 do
5615 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5616 echo "configure:5617: checking for $ac_func" >&5
5617 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5618   echo $ac_n "(cached) $ac_c" 1>&6
5619 else
5620   cat > conftest.$ac_ext <<EOF
5621 #line 5622 "configure"
5622 #include "confdefs.h"
5623 /* System header to define __stub macros and hopefully few prototypes,
5624     which can conflict with char $ac_func(); below.  */
5625 #include <assert.h>
5626 /* Override any gcc2 internal prototype to avoid an error.  */
5627 /* We use char because int might match the return type of a gcc2
5628     builtin and then its argument prototype would still apply.  */
5629 char $ac_func();
5630
5631 int main() {
5632
5633 /* The GNU C library defines this for functions which it implements
5634     to always fail with ENOSYS.  Some functions are actually named
5635     something starting with __ and the normal name is an alias.  */
5636 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5637 choke me
5638 #else
5639 $ac_func();
5640 #endif
5641
5642 ; return 0; }
5643 EOF
5644 if { (eval echo configure:5645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5645   rm -rf conftest*
5646   eval "ac_cv_func_$ac_func=yes"
5647 else
5648   echo "configure: failed program was:" >&5
5649   cat conftest.$ac_ext >&5
5650   rm -rf conftest*
5651   eval "ac_cv_func_$ac_func=no"
5652 fi
5653 rm -f conftest*
5654 fi
5655
5656 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5657   echo "$ac_t""yes" 1>&6
5658     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5659   cat >> confdefs.h <<EOF
5660 #define $ac_tr_func 1
5661 EOF
5662  
5663 else
5664   echo "$ac_t""no" 1>&6
5665 fi
5666 done
5667
5668 for ac_func in __xstat __fxstat __lxstat
5669 do
5670 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5671 echo "configure:5672: checking for $ac_func" >&5
5672 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5673   echo $ac_n "(cached) $ac_c" 1>&6
5674 else
5675   cat > conftest.$ac_ext <<EOF
5676 #line 5677 "configure"
5677 #include "confdefs.h"
5678 /* System header to define __stub macros and hopefully few prototypes,
5679     which can conflict with char $ac_func(); below.  */
5680 #include <assert.h>
5681 /* Override any gcc2 internal prototype to avoid an error.  */
5682 /* We use char because int might match the return type of a gcc2
5683     builtin and then its argument prototype would still apply.  */
5684 char $ac_func();
5685
5686 int main() {
5687
5688 /* The GNU C library defines this for functions which it implements
5689     to always fail with ENOSYS.  Some functions are actually named
5690     something starting with __ and the normal name is an alias.  */
5691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5692 choke me
5693 #else
5694 $ac_func();
5695 #endif
5696
5697 ; return 0; }
5698 EOF
5699 if { (eval echo configure:5700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5700   rm -rf conftest*
5701   eval "ac_cv_func_$ac_func=yes"
5702 else
5703   echo "configure: failed program was:" >&5
5704   cat conftest.$ac_ext >&5
5705   rm -rf conftest*
5706   eval "ac_cv_func_$ac_func=no"
5707 fi
5708 rm -f conftest*
5709 fi
5710
5711 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5712   echo "$ac_t""yes" 1>&6
5713     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5714   cat >> confdefs.h <<EOF
5715 #define $ac_tr_func 1
5716 EOF
5717  
5718 else
5719   echo "$ac_t""no" 1>&6
5720 fi
5721 done
5722
5723 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
5724 do
5725 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5726 echo "configure:5727: checking for $ac_func" >&5
5727 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5728   echo $ac_n "(cached) $ac_c" 1>&6
5729 else
5730   cat > conftest.$ac_ext <<EOF
5731 #line 5732 "configure"
5732 #include "confdefs.h"
5733 /* System header to define __stub macros and hopefully few prototypes,
5734     which can conflict with char $ac_func(); below.  */
5735 #include <assert.h>
5736 /* Override any gcc2 internal prototype to avoid an error.  */
5737 /* We use char because int might match the return type of a gcc2
5738     builtin and then its argument prototype would still apply.  */
5739 char $ac_func();
5740
5741 int main() {
5742
5743 /* The GNU C library defines this for functions which it implements
5744     to always fail with ENOSYS.  Some functions are actually named
5745     something starting with __ and the normal name is an alias.  */
5746 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5747 choke me
5748 #else
5749 $ac_func();
5750 #endif
5751
5752 ; return 0; }
5753 EOF
5754 if { (eval echo configure:5755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5755   rm -rf conftest*
5756   eval "ac_cv_func_$ac_func=yes"
5757 else
5758   echo "configure: failed program was:" >&5
5759   cat conftest.$ac_ext >&5
5760   rm -rf conftest*
5761   eval "ac_cv_func_$ac_func=no"
5762 fi
5763 rm -f conftest*
5764 fi
5765
5766 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5767   echo "$ac_t""yes" 1>&6
5768     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5769   cat >> confdefs.h <<EOF
5770 #define $ac_tr_func 1
5771 EOF
5772  
5773 else
5774   echo "$ac_t""no" 1>&6
5775 fi
5776 done
5777
5778 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
5779 do
5780 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5781 echo "configure:5782: checking for $ac_func" >&5
5782 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5783   echo $ac_n "(cached) $ac_c" 1>&6
5784 else
5785   cat > conftest.$ac_ext <<EOF
5786 #line 5787 "configure"
5787 #include "confdefs.h"
5788 /* System header to define __stub macros and hopefully few prototypes,
5789     which can conflict with char $ac_func(); below.  */
5790 #include <assert.h>
5791 /* Override any gcc2 internal prototype to avoid an error.  */
5792 /* We use char because int might match the return type of a gcc2
5793     builtin and then its argument prototype would still apply.  */
5794 char $ac_func();
5795
5796 int main() {
5797
5798 /* The GNU C library defines this for functions which it implements
5799     to always fail with ENOSYS.  Some functions are actually named
5800     something starting with __ and the normal name is an alias.  */
5801 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5802 choke me
5803 #else
5804 $ac_func();
5805 #endif
5806
5807 ; return 0; }
5808 EOF
5809 if { (eval echo configure:5810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5810   rm -rf conftest*
5811   eval "ac_cv_func_$ac_func=yes"
5812 else
5813   echo "configure: failed program was:" >&5
5814   cat conftest.$ac_ext >&5
5815   rm -rf conftest*
5816   eval "ac_cv_func_$ac_func=no"
5817 fi
5818 rm -f conftest*
5819 fi
5820
5821 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5822   echo "$ac_t""yes" 1>&6
5823     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5824   cat >> confdefs.h <<EOF
5825 #define $ac_tr_func 1
5826 EOF
5827  
5828 else
5829   echo "$ac_t""no" 1>&6
5830 fi
5831 done
5832
5833 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
5834 do
5835 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5836 echo "configure:5837: checking for $ac_func" >&5
5837 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5838   echo $ac_n "(cached) $ac_c" 1>&6
5839 else
5840   cat > conftest.$ac_ext <<EOF
5841 #line 5842 "configure"
5842 #include "confdefs.h"
5843 /* System header to define __stub macros and hopefully few prototypes,
5844     which can conflict with char $ac_func(); below.  */
5845 #include <assert.h>
5846 /* Override any gcc2 internal prototype to avoid an error.  */
5847 /* We use char because int might match the return type of a gcc2
5848     builtin and then its argument prototype would still apply.  */
5849 char $ac_func();
5850
5851 int main() {
5852
5853 /* The GNU C library defines this for functions which it implements
5854     to always fail with ENOSYS.  Some functions are actually named
5855     something starting with __ and the normal name is an alias.  */
5856 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5857 choke me
5858 #else
5859 $ac_func();
5860 #endif
5861
5862 ; return 0; }
5863 EOF
5864 if { (eval echo configure:5865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5865   rm -rf conftest*
5866   eval "ac_cv_func_$ac_func=yes"
5867 else
5868   echo "configure: failed program was:" >&5
5869   cat conftest.$ac_ext >&5
5870   rm -rf conftest*
5871   eval "ac_cv_func_$ac_func=no"
5872 fi
5873 rm -f conftest*
5874 fi
5875
5876 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5877   echo "$ac_t""yes" 1>&6
5878     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5879   cat >> confdefs.h <<EOF
5880 #define $ac_tr_func 1
5881 EOF
5882  
5883 else
5884   echo "$ac_t""no" 1>&6
5885 fi
5886 done
5887
5888 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
5889 do
5890 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5891 echo "configure:5892: checking for $ac_func" >&5
5892 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5893   echo $ac_n "(cached) $ac_c" 1>&6
5894 else
5895   cat > conftest.$ac_ext <<EOF
5896 #line 5897 "configure"
5897 #include "confdefs.h"
5898 /* System header to define __stub macros and hopefully few prototypes,
5899     which can conflict with char $ac_func(); below.  */
5900 #include <assert.h>
5901 /* Override any gcc2 internal prototype to avoid an error.  */
5902 /* We use char because int might match the return type of a gcc2
5903     builtin and then its argument prototype would still apply.  */
5904 char $ac_func();
5905
5906 int main() {
5907
5908 /* The GNU C library defines this for functions which it implements
5909     to always fail with ENOSYS.  Some functions are actually named
5910     something starting with __ and the normal name is an alias.  */
5911 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5912 choke me
5913 #else
5914 $ac_func();
5915 #endif
5916
5917 ; return 0; }
5918 EOF
5919 if { (eval echo configure:5920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5920   rm -rf conftest*
5921   eval "ac_cv_func_$ac_func=yes"
5922 else
5923   echo "configure: failed program was:" >&5
5924   cat conftest.$ac_ext >&5
5925   rm -rf conftest*
5926   eval "ac_cv_func_$ac_func=no"
5927 fi
5928 rm -f conftest*
5929 fi
5930
5931 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5932   echo "$ac_t""yes" 1>&6
5933     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5934   cat >> confdefs.h <<EOF
5935 #define $ac_tr_func 1
5936 EOF
5937  
5938 else
5939   echo "$ac_t""no" 1>&6
5940 fi
5941 done
5942
5943 for ac_func in _write __write _fork __fork
5944 do
5945 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5946 echo "configure:5947: checking for $ac_func" >&5
5947 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5948   echo $ac_n "(cached) $ac_c" 1>&6
5949 else
5950   cat > conftest.$ac_ext <<EOF
5951 #line 5952 "configure"
5952 #include "confdefs.h"
5953 /* System header to define __stub macros and hopefully few prototypes,
5954     which can conflict with char $ac_func(); below.  */
5955 #include <assert.h>
5956 /* Override any gcc2 internal prototype to avoid an error.  */
5957 /* We use char because int might match the return type of a gcc2
5958     builtin and then its argument prototype would still apply.  */
5959 char $ac_func();
5960
5961 int main() {
5962
5963 /* The GNU C library defines this for functions which it implements
5964     to always fail with ENOSYS.  Some functions are actually named
5965     something starting with __ and the normal name is an alias.  */
5966 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5967 choke me
5968 #else
5969 $ac_func();
5970 #endif
5971
5972 ; return 0; }
5973 EOF
5974 if { (eval echo configure:5975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5975   rm -rf conftest*
5976   eval "ac_cv_func_$ac_func=yes"
5977 else
5978   echo "configure: failed program was:" >&5
5979   cat conftest.$ac_ext >&5
5980   rm -rf conftest*
5981   eval "ac_cv_func_$ac_func=no"
5982 fi
5983 rm -f conftest*
5984 fi
5985
5986 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5987   echo "$ac_t""yes" 1>&6
5988     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5989   cat >> confdefs.h <<EOF
5990 #define $ac_tr_func 1
5991 EOF
5992  
5993 else
5994   echo "$ac_t""no" 1>&6
5995 fi
5996 done
5997
5998 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
5999 do
6000 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6001 echo "configure:6002: checking for $ac_func" >&5
6002 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6003   echo $ac_n "(cached) $ac_c" 1>&6
6004 else
6005   cat > conftest.$ac_ext <<EOF
6006 #line 6007 "configure"
6007 #include "confdefs.h"
6008 /* System header to define __stub macros and hopefully few prototypes,
6009     which can conflict with char $ac_func(); below.  */
6010 #include <assert.h>
6011 /* Override any gcc2 internal prototype to avoid an error.  */
6012 /* We use char because int might match the return type of a gcc2
6013     builtin and then its argument prototype would still apply.  */
6014 char $ac_func();
6015
6016 int main() {
6017
6018 /* The GNU C library defines this for functions which it implements
6019     to always fail with ENOSYS.  Some functions are actually named
6020     something starting with __ and the normal name is an alias.  */
6021 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6022 choke me
6023 #else
6024 $ac_func();
6025 #endif
6026
6027 ; return 0; }
6028 EOF
6029 if { (eval echo configure:6030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6030   rm -rf conftest*
6031   eval "ac_cv_func_$ac_func=yes"
6032 else
6033   echo "configure: failed program was:" >&5
6034   cat conftest.$ac_ext >&5
6035   rm -rf conftest*
6036   eval "ac_cv_func_$ac_func=no"
6037 fi
6038 rm -f conftest*
6039 fi
6040
6041 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6042   echo "$ac_t""yes" 1>&6
6043     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6044   cat >> confdefs.h <<EOF
6045 #define $ac_tr_func 1
6046 EOF
6047  
6048 else
6049   echo "$ac_t""no" 1>&6
6050 fi
6051 done
6052
6053 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6054 do
6055 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6056 echo "configure:6057: checking for $ac_func" >&5
6057 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6058   echo $ac_n "(cached) $ac_c" 1>&6
6059 else
6060   cat > conftest.$ac_ext <<EOF
6061 #line 6062 "configure"
6062 #include "confdefs.h"
6063 /* System header to define __stub macros and hopefully few prototypes,
6064     which can conflict with char $ac_func(); below.  */
6065 #include <assert.h>
6066 /* Override any gcc2 internal prototype to avoid an error.  */
6067 /* We use char because int might match the return type of a gcc2
6068     builtin and then its argument prototype would still apply.  */
6069 char $ac_func();
6070
6071 int main() {
6072
6073 /* The GNU C library defines this for functions which it implements
6074     to always fail with ENOSYS.  Some functions are actually named
6075     something starting with __ and the normal name is an alias.  */
6076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6077 choke me
6078 #else
6079 $ac_func();
6080 #endif
6081
6082 ; return 0; }
6083 EOF
6084 if { (eval echo configure:6085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6085   rm -rf conftest*
6086   eval "ac_cv_func_$ac_func=yes"
6087 else
6088   echo "configure: failed program was:" >&5
6089   cat conftest.$ac_ext >&5
6090   rm -rf conftest*
6091   eval "ac_cv_func_$ac_func=no"
6092 fi
6093 rm -f conftest*
6094 fi
6095
6096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6097   echo "$ac_t""yes" 1>&6
6098     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6099   cat >> confdefs.h <<EOF
6100 #define $ac_tr_func 1
6101 EOF
6102  
6103 else
6104   echo "$ac_t""no" 1>&6
6105 fi
6106 done
6107
6108 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6109 do
6110 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6111 echo "configure:6112: checking for $ac_func" >&5
6112 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6113   echo $ac_n "(cached) $ac_c" 1>&6
6114 else
6115   cat > conftest.$ac_ext <<EOF
6116 #line 6117 "configure"
6117 #include "confdefs.h"
6118 /* System header to define __stub macros and hopefully few prototypes,
6119     which can conflict with char $ac_func(); below.  */
6120 #include <assert.h>
6121 /* Override any gcc2 internal prototype to avoid an error.  */
6122 /* We use char because int might match the return type of a gcc2
6123     builtin and then its argument prototype would still apply.  */
6124 char $ac_func();
6125
6126 int main() {
6127
6128 /* The GNU C library defines this for functions which it implements
6129     to always fail with ENOSYS.  Some functions are actually named
6130     something starting with __ and the normal name is an alias.  */
6131 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6132 choke me
6133 #else
6134 $ac_func();
6135 #endif
6136
6137 ; return 0; }
6138 EOF
6139 if { (eval echo configure:6140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6140   rm -rf conftest*
6141   eval "ac_cv_func_$ac_func=yes"
6142 else
6143   echo "configure: failed program was:" >&5
6144   cat conftest.$ac_ext >&5
6145   rm -rf conftest*
6146   eval "ac_cv_func_$ac_func=no"
6147 fi
6148 rm -f conftest*
6149 fi
6150
6151 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6152   echo "$ac_t""yes" 1>&6
6153     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6154   cat >> confdefs.h <<EOF
6155 #define $ac_tr_func 1
6156 EOF
6157  
6158 else
6159   echo "$ac_t""no" 1>&6
6160 fi
6161 done
6162
6163 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6164 do
6165 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6166 echo "configure:6167: checking for $ac_func" >&5
6167 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6168   echo $ac_n "(cached) $ac_c" 1>&6
6169 else
6170   cat > conftest.$ac_ext <<EOF
6171 #line 6172 "configure"
6172 #include "confdefs.h"
6173 /* System header to define __stub macros and hopefully few prototypes,
6174     which can conflict with char $ac_func(); below.  */
6175 #include <assert.h>
6176 /* Override any gcc2 internal prototype to avoid an error.  */
6177 /* We use char because int might match the return type of a gcc2
6178     builtin and then its argument prototype would still apply.  */
6179 char $ac_func();
6180
6181 int main() {
6182
6183 /* The GNU C library defines this for functions which it implements
6184     to always fail with ENOSYS.  Some functions are actually named
6185     something starting with __ and the normal name is an alias.  */
6186 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6187 choke me
6188 #else
6189 $ac_func();
6190 #endif
6191
6192 ; return 0; }
6193 EOF
6194 if { (eval echo configure:6195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6195   rm -rf conftest*
6196   eval "ac_cv_func_$ac_func=yes"
6197 else
6198   echo "configure: failed program was:" >&5
6199   cat conftest.$ac_ext >&5
6200   rm -rf conftest*
6201   eval "ac_cv_func_$ac_func=no"
6202 fi
6203 rm -f conftest*
6204 fi
6205
6206 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6207   echo "$ac_t""yes" 1>&6
6208     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6209   cat >> confdefs.h <<EOF
6210 #define $ac_tr_func 1
6211 EOF
6212  
6213 else
6214   echo "$ac_t""no" 1>&6
6215 fi
6216 done
6217
6218 for ac_func in open64 _open64 __open64 creat64
6219 do
6220 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6221 echo "configure:6222: checking for $ac_func" >&5
6222 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6223   echo $ac_n "(cached) $ac_c" 1>&6
6224 else
6225   cat > conftest.$ac_ext <<EOF
6226 #line 6227 "configure"
6227 #include "confdefs.h"
6228 /* System header to define __stub macros and hopefully few prototypes,
6229     which can conflict with char $ac_func(); below.  */
6230 #include <assert.h>
6231 /* Override any gcc2 internal prototype to avoid an error.  */
6232 /* We use char because int might match the return type of a gcc2
6233     builtin and then its argument prototype would still apply.  */
6234 char $ac_func();
6235
6236 int main() {
6237
6238 /* The GNU C library defines this for functions which it implements
6239     to always fail with ENOSYS.  Some functions are actually named
6240     something starting with __ and the normal name is an alias.  */
6241 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6242 choke me
6243 #else
6244 $ac_func();
6245 #endif
6246
6247 ; return 0; }
6248 EOF
6249 if { (eval echo configure:6250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6250   rm -rf conftest*
6251   eval "ac_cv_func_$ac_func=yes"
6252 else
6253   echo "configure: failed program was:" >&5
6254   cat conftest.$ac_ext >&5
6255   rm -rf conftest*
6256   eval "ac_cv_func_$ac_func=no"
6257 fi
6258 rm -f conftest*
6259 fi
6260
6261 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6262   echo "$ac_t""yes" 1>&6
6263     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6264   cat >> confdefs.h <<EOF
6265 #define $ac_tr_func 1
6266 EOF
6267  
6268 else
6269   echo "$ac_t""no" 1>&6
6270 fi
6271 done
6272
6273
6274 #
6275 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6276 #
6277
6278 if test x$ac_cv_func_stat64 = xno ; then
6279   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6280 echo "configure:6281: checking for stat64 in <sys/stat.h>" >&5
6281   cat > conftest.$ac_ext <<EOF
6282 #line 6283 "configure"
6283 #include "confdefs.h"
6284
6285 #if defined(HAVE_UNISTD_H)
6286 #include <unistd.h>
6287 #endif
6288 #include <sys/stat.h>
6289
6290 int main() {
6291 struct stat64 st64; exit(stat64(".",&st64));
6292 ; return 0; }
6293 EOF
6294 if { (eval echo configure:6295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6295   rm -rf conftest*
6296   ac_cv_func_stat64=yes
6297 else
6298   echo "configure: failed program was:" >&5
6299   cat conftest.$ac_ext >&5
6300 fi
6301 rm -f conftest*
6302   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6303   if test x$ac_cv_func_stat64 = xyes ; then
6304     cat >> confdefs.h <<\EOF
6305 #define HAVE_STAT64 1
6306 EOF
6307
6308   fi
6309 fi
6310
6311 if test x$ac_cv_func_lstat64 = xno ; then
6312   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6313 echo "configure:6314: checking for lstat64 in <sys/stat.h>" >&5
6314   cat > conftest.$ac_ext <<EOF
6315 #line 6316 "configure"
6316 #include "confdefs.h"
6317
6318 #if defined(HAVE_UNISTD_H)
6319 #include <unistd.h>
6320 #endif
6321 #include <sys/stat.h>
6322
6323 int main() {
6324 struct stat64 st64; exit(lstat64(".",&st64));
6325 ; return 0; }
6326 EOF
6327 if { (eval echo configure:6328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6328   rm -rf conftest*
6329   ac_cv_func_lstat64=yes
6330 else
6331   echo "configure: failed program was:" >&5
6332   cat conftest.$ac_ext >&5
6333 fi
6334 rm -f conftest*
6335   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6336   if test x$ac_cv_func_lstat64 = xyes ; then
6337     cat >> confdefs.h <<\EOF
6338 #define HAVE_LSTAT64 1
6339 EOF
6340
6341   fi
6342 fi
6343
6344 if test x$ac_cv_func_fstat64 = xno ; then
6345   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6346 echo "configure:6347: checking for fstat64 in <sys/stat.h>" >&5
6347   cat > conftest.$ac_ext <<EOF
6348 #line 6349 "configure"
6349 #include "confdefs.h"
6350
6351 #if defined(HAVE_UNISTD_H)
6352 #include <unistd.h>
6353 #endif
6354 #include <sys/stat.h>
6355
6356 int main() {
6357 struct stat64 st64; exit(fstat64(0,&st64));
6358 ; return 0; }
6359 EOF
6360 if { (eval echo configure:6361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6361   rm -rf conftest*
6362   ac_cv_func_fstat64=yes
6363 else
6364   echo "configure: failed program was:" >&5
6365   cat conftest.$ac_ext >&5
6366 fi
6367 rm -f conftest*
6368   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6369   if test x$ac_cv_func_fstat64 = xyes ; then
6370     cat >> confdefs.h <<\EOF
6371 #define HAVE_FSTAT64 1
6372 EOF
6373
6374   fi
6375 fi
6376
6377 #
6378 # If no strcasecmp, check for it in some known places
6379 # It is in -lresolv on ReliantUNIX and UnixWare
6380 #   -lresolve *must* follow -lnsl for name resolution to work properly
6381 #
6382
6383 if test x$ac_cv_func_strcasecmp = xno ; then
6384         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6385 echo "configure:6386: checking for strcasecmp in -lresolv" >&5
6386 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6387 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6388   echo $ac_n "(cached) $ac_c" 1>&6
6389 else
6390   ac_save_LIBS="$LIBS"
6391 LIBS="-lresolv  $LIBS"
6392 cat > conftest.$ac_ext <<EOF
6393 #line 6394 "configure"
6394 #include "confdefs.h"
6395 /* Override any gcc2 internal prototype to avoid an error.  */
6396 /* We use char because int might match the return type of a gcc2
6397     builtin and then its argument prototype would still apply.  */
6398 char strcasecmp();
6399
6400 int main() {
6401 strcasecmp()
6402 ; return 0; }
6403 EOF
6404 if { (eval echo configure:6405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6405   rm -rf conftest*
6406   eval "ac_cv_lib_$ac_lib_var=yes"
6407 else
6408   echo "configure: failed program was:" >&5
6409   cat conftest.$ac_ext >&5
6410   rm -rf conftest*
6411   eval "ac_cv_lib_$ac_lib_var=no"
6412 fi
6413 rm -f conftest*
6414 LIBS="$ac_save_LIBS"
6415
6416 fi
6417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6418   echo "$ac_t""yes" 1>&6
6419   LIBS="$LIBS -lresolv"
6420                 cat >> confdefs.h <<\EOF
6421 #define HAVE_STRCASECMP 1
6422 EOF
6423
6424 else
6425   echo "$ac_t""no" 1>&6
6426 fi
6427
6428 fi
6429
6430 #
6431 # Check for the functions putprpwnam, set_auth_parameters,
6432 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6433 # Needed for OSF1 and HPUX.
6434 #
6435
6436 case "$LIBS" in
6437   *-lsecurity*) for ac_func in putprpwnam
6438 do
6439 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6440 echo "configure:6441: checking for $ac_func" >&5
6441 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6442   echo $ac_n "(cached) $ac_c" 1>&6
6443 else
6444   cat > conftest.$ac_ext <<EOF
6445 #line 6446 "configure"
6446 #include "confdefs.h"
6447 /* System header to define __stub macros and hopefully few prototypes,
6448     which can conflict with char $ac_func(); below.  */
6449 #include <assert.h>
6450 /* Override any gcc2 internal prototype to avoid an error.  */
6451 /* We use char because int might match the return type of a gcc2
6452     builtin and then its argument prototype would still apply.  */
6453 char $ac_func();
6454
6455 int main() {
6456
6457 /* The GNU C library defines this for functions which it implements
6458     to always fail with ENOSYS.  Some functions are actually named
6459     something starting with __ and the normal name is an alias.  */
6460 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6461 choke me
6462 #else
6463 $ac_func();
6464 #endif
6465
6466 ; return 0; }
6467 EOF
6468 if { (eval echo configure:6469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6469   rm -rf conftest*
6470   eval "ac_cv_func_$ac_func=yes"
6471 else
6472   echo "configure: failed program was:" >&5
6473   cat conftest.$ac_ext >&5
6474   rm -rf conftest*
6475   eval "ac_cv_func_$ac_func=no"
6476 fi
6477 rm -f conftest*
6478 fi
6479
6480 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6481   echo "$ac_t""yes" 1>&6
6482     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6483   cat >> confdefs.h <<EOF
6484 #define $ac_tr_func 1
6485 EOF
6486  
6487 else
6488   echo "$ac_t""no" 1>&6
6489 fi
6490 done
6491  ;;
6492   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6493 echo "configure:6494: checking for putprpwnam in -lsecurity" >&5
6494 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6495 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6496   echo $ac_n "(cached) $ac_c" 1>&6
6497 else
6498   ac_save_LIBS="$LIBS"
6499 LIBS="-lsecurity  $LIBS"
6500 cat > conftest.$ac_ext <<EOF
6501 #line 6502 "configure"
6502 #include "confdefs.h"
6503 /* Override any gcc2 internal prototype to avoid an error.  */
6504 /* We use char because int might match the return type of a gcc2
6505     builtin and then its argument prototype would still apply.  */
6506 char putprpwnam();
6507
6508 int main() {
6509 putprpwnam()
6510 ; return 0; }
6511 EOF
6512 if { (eval echo configure:6513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6513   rm -rf conftest*
6514   eval "ac_cv_lib_$ac_lib_var=yes"
6515 else
6516   echo "configure: failed program was:" >&5
6517   cat conftest.$ac_ext >&5
6518   rm -rf conftest*
6519   eval "ac_cv_lib_$ac_lib_var=no"
6520 fi
6521 rm -f conftest*
6522 LIBS="$ac_save_LIBS"
6523
6524 fi
6525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6526   echo "$ac_t""yes" 1>&6
6527     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6528     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6529   cat >> confdefs.h <<EOF
6530 #define $ac_tr_lib 1
6531 EOF
6532
6533   LIBS="-lsecurity $LIBS"
6534
6535 else
6536   echo "$ac_t""no" 1>&6
6537 fi
6538  
6539      for ac_func in putprpwnam
6540 do
6541 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6542 echo "configure:6543: checking for $ac_func" >&5
6543 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6544   echo $ac_n "(cached) $ac_c" 1>&6
6545 else
6546   cat > conftest.$ac_ext <<EOF
6547 #line 6548 "configure"
6548 #include "confdefs.h"
6549 /* System header to define __stub macros and hopefully few prototypes,
6550     which can conflict with char $ac_func(); below.  */
6551 #include <assert.h>
6552 /* Override any gcc2 internal prototype to avoid an error.  */
6553 /* We use char because int might match the return type of a gcc2
6554     builtin and then its argument prototype would still apply.  */
6555 char $ac_func();
6556
6557 int main() {
6558
6559 /* The GNU C library defines this for functions which it implements
6560     to always fail with ENOSYS.  Some functions are actually named
6561     something starting with __ and the normal name is an alias.  */
6562 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6563 choke me
6564 #else
6565 $ac_func();
6566 #endif
6567
6568 ; return 0; }
6569 EOF
6570 if { (eval echo configure:6571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6571   rm -rf conftest*
6572   eval "ac_cv_func_$ac_func=yes"
6573 else
6574   echo "configure: failed program was:" >&5
6575   cat conftest.$ac_ext >&5
6576   rm -rf conftest*
6577   eval "ac_cv_func_$ac_func=no"
6578 fi
6579 rm -f conftest*
6580 fi
6581
6582 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6583   echo "$ac_t""yes" 1>&6
6584     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6585   cat >> confdefs.h <<EOF
6586 #define $ac_tr_func 1
6587 EOF
6588  
6589 else
6590   echo "$ac_t""no" 1>&6
6591 fi
6592 done
6593
6594   ;;
6595   esac
6596
6597 case "$LIBS" in
6598   *-lsec*) for ac_func in putprpwnam
6599 do
6600 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6601 echo "configure:6602: checking for $ac_func" >&5
6602 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6603   echo $ac_n "(cached) $ac_c" 1>&6
6604 else
6605   cat > conftest.$ac_ext <<EOF
6606 #line 6607 "configure"
6607 #include "confdefs.h"
6608 /* System header to define __stub macros and hopefully few prototypes,
6609     which can conflict with char $ac_func(); below.  */
6610 #include <assert.h>
6611 /* Override any gcc2 internal prototype to avoid an error.  */
6612 /* We use char because int might match the return type of a gcc2
6613     builtin and then its argument prototype would still apply.  */
6614 char $ac_func();
6615
6616 int main() {
6617
6618 /* The GNU C library defines this for functions which it implements
6619     to always fail with ENOSYS.  Some functions are actually named
6620     something starting with __ and the normal name is an alias.  */
6621 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6622 choke me
6623 #else
6624 $ac_func();
6625 #endif
6626
6627 ; return 0; }
6628 EOF
6629 if { (eval echo configure:6630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6630   rm -rf conftest*
6631   eval "ac_cv_func_$ac_func=yes"
6632 else
6633   echo "configure: failed program was:" >&5
6634   cat conftest.$ac_ext >&5
6635   rm -rf conftest*
6636   eval "ac_cv_func_$ac_func=no"
6637 fi
6638 rm -f conftest*
6639 fi
6640
6641 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6642   echo "$ac_t""yes" 1>&6
6643     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6644   cat >> confdefs.h <<EOF
6645 #define $ac_tr_func 1
6646 EOF
6647  
6648 else
6649   echo "$ac_t""no" 1>&6
6650 fi
6651 done
6652  ;;
6653   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6654 echo "configure:6655: checking for putprpwnam in -lsec" >&5
6655 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6656 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6657   echo $ac_n "(cached) $ac_c" 1>&6
6658 else
6659   ac_save_LIBS="$LIBS"
6660 LIBS="-lsec  $LIBS"
6661 cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 /* Override any gcc2 internal prototype to avoid an error.  */
6665 /* We use char because int might match the return type of a gcc2
6666     builtin and then its argument prototype would still apply.  */
6667 char putprpwnam();
6668
6669 int main() {
6670 putprpwnam()
6671 ; return 0; }
6672 EOF
6673 if { (eval echo configure:6674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6674   rm -rf conftest*
6675   eval "ac_cv_lib_$ac_lib_var=yes"
6676 else
6677   echo "configure: failed program was:" >&5
6678   cat conftest.$ac_ext >&5
6679   rm -rf conftest*
6680   eval "ac_cv_lib_$ac_lib_var=no"
6681 fi
6682 rm -f conftest*
6683 LIBS="$ac_save_LIBS"
6684
6685 fi
6686 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6687   echo "$ac_t""yes" 1>&6
6688     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6689     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6690   cat >> confdefs.h <<EOF
6691 #define $ac_tr_lib 1
6692 EOF
6693
6694   LIBS="-lsec $LIBS"
6695
6696 else
6697   echo "$ac_t""no" 1>&6
6698 fi
6699  
6700      for ac_func in putprpwnam
6701 do
6702 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6703 echo "configure:6704: checking for $ac_func" >&5
6704 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6705   echo $ac_n "(cached) $ac_c" 1>&6
6706 else
6707   cat > conftest.$ac_ext <<EOF
6708 #line 6709 "configure"
6709 #include "confdefs.h"
6710 /* System header to define __stub macros and hopefully few prototypes,
6711     which can conflict with char $ac_func(); below.  */
6712 #include <assert.h>
6713 /* Override any gcc2 internal prototype to avoid an error.  */
6714 /* We use char because int might match the return type of a gcc2
6715     builtin and then its argument prototype would still apply.  */
6716 char $ac_func();
6717
6718 int main() {
6719
6720 /* The GNU C library defines this for functions which it implements
6721     to always fail with ENOSYS.  Some functions are actually named
6722     something starting with __ and the normal name is an alias.  */
6723 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6724 choke me
6725 #else
6726 $ac_func();
6727 #endif
6728
6729 ; return 0; }
6730 EOF
6731 if { (eval echo configure:6732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6732   rm -rf conftest*
6733   eval "ac_cv_func_$ac_func=yes"
6734 else
6735   echo "configure: failed program was:" >&5
6736   cat conftest.$ac_ext >&5
6737   rm -rf conftest*
6738   eval "ac_cv_func_$ac_func=no"
6739 fi
6740 rm -f conftest*
6741 fi
6742
6743 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6744   echo "$ac_t""yes" 1>&6
6745     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6746   cat >> confdefs.h <<EOF
6747 #define $ac_tr_func 1
6748 EOF
6749  
6750 else
6751   echo "$ac_t""no" 1>&6
6752 fi
6753 done
6754
6755   ;;
6756   esac
6757
6758
6759 case "$LIBS" in
6760   *-lsecurity*) for ac_func in set_auth_parameters
6761 do
6762 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6763 echo "configure:6764: checking for $ac_func" >&5
6764 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6765   echo $ac_n "(cached) $ac_c" 1>&6
6766 else
6767   cat > conftest.$ac_ext <<EOF
6768 #line 6769 "configure"
6769 #include "confdefs.h"
6770 /* System header to define __stub macros and hopefully few prototypes,
6771     which can conflict with char $ac_func(); below.  */
6772 #include <assert.h>
6773 /* Override any gcc2 internal prototype to avoid an error.  */
6774 /* We use char because int might match the return type of a gcc2
6775     builtin and then its argument prototype would still apply.  */
6776 char $ac_func();
6777
6778 int main() {
6779
6780 /* The GNU C library defines this for functions which it implements
6781     to always fail with ENOSYS.  Some functions are actually named
6782     something starting with __ and the normal name is an alias.  */
6783 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6784 choke me
6785 #else
6786 $ac_func();
6787 #endif
6788
6789 ; return 0; }
6790 EOF
6791 if { (eval echo configure:6792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6792   rm -rf conftest*
6793   eval "ac_cv_func_$ac_func=yes"
6794 else
6795   echo "configure: failed program was:" >&5
6796   cat conftest.$ac_ext >&5
6797   rm -rf conftest*
6798   eval "ac_cv_func_$ac_func=no"
6799 fi
6800 rm -f conftest*
6801 fi
6802
6803 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6804   echo "$ac_t""yes" 1>&6
6805     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6806   cat >> confdefs.h <<EOF
6807 #define $ac_tr_func 1
6808 EOF
6809  
6810 else
6811   echo "$ac_t""no" 1>&6
6812 fi
6813 done
6814  ;;
6815   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
6816 echo "configure:6817: checking for set_auth_parameters in -lsecurity" >&5
6817 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6818 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6819   echo $ac_n "(cached) $ac_c" 1>&6
6820 else
6821   ac_save_LIBS="$LIBS"
6822 LIBS="-lsecurity  $LIBS"
6823 cat > conftest.$ac_ext <<EOF
6824 #line 6825 "configure"
6825 #include "confdefs.h"
6826 /* Override any gcc2 internal prototype to avoid an error.  */
6827 /* We use char because int might match the return type of a gcc2
6828     builtin and then its argument prototype would still apply.  */
6829 char set_auth_parameters();
6830
6831 int main() {
6832 set_auth_parameters()
6833 ; return 0; }
6834 EOF
6835 if { (eval echo configure:6836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6836   rm -rf conftest*
6837   eval "ac_cv_lib_$ac_lib_var=yes"
6838 else
6839   echo "configure: failed program was:" >&5
6840   cat conftest.$ac_ext >&5
6841   rm -rf conftest*
6842   eval "ac_cv_lib_$ac_lib_var=no"
6843 fi
6844 rm -f conftest*
6845 LIBS="$ac_save_LIBS"
6846
6847 fi
6848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6849   echo "$ac_t""yes" 1>&6
6850     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6851     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6852   cat >> confdefs.h <<EOF
6853 #define $ac_tr_lib 1
6854 EOF
6855
6856   LIBS="-lsecurity $LIBS"
6857
6858 else
6859   echo "$ac_t""no" 1>&6
6860 fi
6861  
6862      for ac_func in set_auth_parameters
6863 do
6864 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6865 echo "configure:6866: checking for $ac_func" >&5
6866 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6867   echo $ac_n "(cached) $ac_c" 1>&6
6868 else
6869   cat > conftest.$ac_ext <<EOF
6870 #line 6871 "configure"
6871 #include "confdefs.h"
6872 /* System header to define __stub macros and hopefully few prototypes,
6873     which can conflict with char $ac_func(); below.  */
6874 #include <assert.h>
6875 /* Override any gcc2 internal prototype to avoid an error.  */
6876 /* We use char because int might match the return type of a gcc2
6877     builtin and then its argument prototype would still apply.  */
6878 char $ac_func();
6879
6880 int main() {
6881
6882 /* The GNU C library defines this for functions which it implements
6883     to always fail with ENOSYS.  Some functions are actually named
6884     something starting with __ and the normal name is an alias.  */
6885 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6886 choke me
6887 #else
6888 $ac_func();
6889 #endif
6890
6891 ; return 0; }
6892 EOF
6893 if { (eval echo configure:6894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6894   rm -rf conftest*
6895   eval "ac_cv_func_$ac_func=yes"
6896 else
6897   echo "configure: failed program was:" >&5
6898   cat conftest.$ac_ext >&5
6899   rm -rf conftest*
6900   eval "ac_cv_func_$ac_func=no"
6901 fi
6902 rm -f conftest*
6903 fi
6904
6905 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6906   echo "$ac_t""yes" 1>&6
6907     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6908   cat >> confdefs.h <<EOF
6909 #define $ac_tr_func 1
6910 EOF
6911  
6912 else
6913   echo "$ac_t""no" 1>&6
6914 fi
6915 done
6916
6917   ;;
6918   esac
6919
6920 case "$LIBS" in
6921   *-lsec*) for ac_func in set_auth_parameters
6922 do
6923 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6924 echo "configure:6925: checking for $ac_func" >&5
6925 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6926   echo $ac_n "(cached) $ac_c" 1>&6
6927 else
6928   cat > conftest.$ac_ext <<EOF
6929 #line 6930 "configure"
6930 #include "confdefs.h"
6931 /* System header to define __stub macros and hopefully few prototypes,
6932     which can conflict with char $ac_func(); below.  */
6933 #include <assert.h>
6934 /* Override any gcc2 internal prototype to avoid an error.  */
6935 /* We use char because int might match the return type of a gcc2
6936     builtin and then its argument prototype would still apply.  */
6937 char $ac_func();
6938
6939 int main() {
6940
6941 /* The GNU C library defines this for functions which it implements
6942     to always fail with ENOSYS.  Some functions are actually named
6943     something starting with __ and the normal name is an alias.  */
6944 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6945 choke me
6946 #else
6947 $ac_func();
6948 #endif
6949
6950 ; return 0; }
6951 EOF
6952 if { (eval echo configure:6953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6953   rm -rf conftest*
6954   eval "ac_cv_func_$ac_func=yes"
6955 else
6956   echo "configure: failed program was:" >&5
6957   cat conftest.$ac_ext >&5
6958   rm -rf conftest*
6959   eval "ac_cv_func_$ac_func=no"
6960 fi
6961 rm -f conftest*
6962 fi
6963
6964 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6965   echo "$ac_t""yes" 1>&6
6966     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6967   cat >> confdefs.h <<EOF
6968 #define $ac_tr_func 1
6969 EOF
6970  
6971 else
6972   echo "$ac_t""no" 1>&6
6973 fi
6974 done
6975  ;;
6976   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
6977 echo "configure:6978: checking for set_auth_parameters in -lsec" >&5
6978 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6979 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6980   echo $ac_n "(cached) $ac_c" 1>&6
6981 else
6982   ac_save_LIBS="$LIBS"
6983 LIBS="-lsec  $LIBS"
6984 cat > conftest.$ac_ext <<EOF
6985 #line 6986 "configure"
6986 #include "confdefs.h"
6987 /* Override any gcc2 internal prototype to avoid an error.  */
6988 /* We use char because int might match the return type of a gcc2
6989     builtin and then its argument prototype would still apply.  */
6990 char set_auth_parameters();
6991
6992 int main() {
6993 set_auth_parameters()
6994 ; return 0; }
6995 EOF
6996 if { (eval echo configure:6997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6997   rm -rf conftest*
6998   eval "ac_cv_lib_$ac_lib_var=yes"
6999 else
7000   echo "configure: failed program was:" >&5
7001   cat conftest.$ac_ext >&5
7002   rm -rf conftest*
7003   eval "ac_cv_lib_$ac_lib_var=no"
7004 fi
7005 rm -f conftest*
7006 LIBS="$ac_save_LIBS"
7007
7008 fi
7009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7010   echo "$ac_t""yes" 1>&6
7011     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7012     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7013   cat >> confdefs.h <<EOF
7014 #define $ac_tr_lib 1
7015 EOF
7016
7017   LIBS="-lsec $LIBS"
7018
7019 else
7020   echo "$ac_t""no" 1>&6
7021 fi
7022  
7023      for ac_func in set_auth_parameters
7024 do
7025 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7026 echo "configure:7027: checking for $ac_func" >&5
7027 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7028   echo $ac_n "(cached) $ac_c" 1>&6
7029 else
7030   cat > conftest.$ac_ext <<EOF
7031 #line 7032 "configure"
7032 #include "confdefs.h"
7033 /* System header to define __stub macros and hopefully few prototypes,
7034     which can conflict with char $ac_func(); below.  */
7035 #include <assert.h>
7036 /* Override any gcc2 internal prototype to avoid an error.  */
7037 /* We use char because int might match the return type of a gcc2
7038     builtin and then its argument prototype would still apply.  */
7039 char $ac_func();
7040
7041 int main() {
7042
7043 /* The GNU C library defines this for functions which it implements
7044     to always fail with ENOSYS.  Some functions are actually named
7045     something starting with __ and the normal name is an alias.  */
7046 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7047 choke me
7048 #else
7049 $ac_func();
7050 #endif
7051
7052 ; return 0; }
7053 EOF
7054 if { (eval echo configure:7055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7055   rm -rf conftest*
7056   eval "ac_cv_func_$ac_func=yes"
7057 else
7058   echo "configure: failed program was:" >&5
7059   cat conftest.$ac_ext >&5
7060   rm -rf conftest*
7061   eval "ac_cv_func_$ac_func=no"
7062 fi
7063 rm -f conftest*
7064 fi
7065
7066 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7067   echo "$ac_t""yes" 1>&6
7068     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7069   cat >> confdefs.h <<EOF
7070 #define $ac_tr_func 1
7071 EOF
7072  
7073 else
7074   echo "$ac_t""no" 1>&6
7075 fi
7076 done
7077
7078   ;;
7079   esac
7080
7081
7082 # UnixWare 7.x has its getspnam in -lgen
7083 case "$LIBS" in
7084   *-lgen*) for ac_func in getspnam
7085 do
7086 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7087 echo "configure:7088: checking for $ac_func" >&5
7088 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7089   echo $ac_n "(cached) $ac_c" 1>&6
7090 else
7091   cat > conftest.$ac_ext <<EOF
7092 #line 7093 "configure"
7093 #include "confdefs.h"
7094 /* System header to define __stub macros and hopefully few prototypes,
7095     which can conflict with char $ac_func(); below.  */
7096 #include <assert.h>
7097 /* Override any gcc2 internal prototype to avoid an error.  */
7098 /* We use char because int might match the return type of a gcc2
7099     builtin and then its argument prototype would still apply.  */
7100 char $ac_func();
7101
7102 int main() {
7103
7104 /* The GNU C library defines this for functions which it implements
7105     to always fail with ENOSYS.  Some functions are actually named
7106     something starting with __ and the normal name is an alias.  */
7107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7108 choke me
7109 #else
7110 $ac_func();
7111 #endif
7112
7113 ; return 0; }
7114 EOF
7115 if { (eval echo configure:7116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7116   rm -rf conftest*
7117   eval "ac_cv_func_$ac_func=yes"
7118 else
7119   echo "configure: failed program was:" >&5
7120   cat conftest.$ac_ext >&5
7121   rm -rf conftest*
7122   eval "ac_cv_func_$ac_func=no"
7123 fi
7124 rm -f conftest*
7125 fi
7126
7127 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7128   echo "$ac_t""yes" 1>&6
7129     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7130   cat >> confdefs.h <<EOF
7131 #define $ac_tr_func 1
7132 EOF
7133  
7134 else
7135   echo "$ac_t""no" 1>&6
7136 fi
7137 done
7138  ;;
7139   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7140 echo "configure:7141: checking for getspnam in -lgen" >&5
7141 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7142 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7143   echo $ac_n "(cached) $ac_c" 1>&6
7144 else
7145   ac_save_LIBS="$LIBS"
7146 LIBS="-lgen  $LIBS"
7147 cat > conftest.$ac_ext <<EOF
7148 #line 7149 "configure"
7149 #include "confdefs.h"
7150 /* Override any gcc2 internal prototype to avoid an error.  */
7151 /* We use char because int might match the return type of a gcc2
7152     builtin and then its argument prototype would still apply.  */
7153 char getspnam();
7154
7155 int main() {
7156 getspnam()
7157 ; return 0; }
7158 EOF
7159 if { (eval echo configure:7160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7160   rm -rf conftest*
7161   eval "ac_cv_lib_$ac_lib_var=yes"
7162 else
7163   echo "configure: failed program was:" >&5
7164   cat conftest.$ac_ext >&5
7165   rm -rf conftest*
7166   eval "ac_cv_lib_$ac_lib_var=no"
7167 fi
7168 rm -f conftest*
7169 LIBS="$ac_save_LIBS"
7170
7171 fi
7172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7173   echo "$ac_t""yes" 1>&6
7174     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7175     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7176   cat >> confdefs.h <<EOF
7177 #define $ac_tr_lib 1
7178 EOF
7179
7180   LIBS="-lgen $LIBS"
7181
7182 else
7183   echo "$ac_t""no" 1>&6
7184 fi
7185  
7186      for ac_func in getspnam
7187 do
7188 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7189 echo "configure:7190: checking for $ac_func" >&5
7190 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7191   echo $ac_n "(cached) $ac_c" 1>&6
7192 else
7193   cat > conftest.$ac_ext <<EOF
7194 #line 7195 "configure"
7195 #include "confdefs.h"
7196 /* System header to define __stub macros and hopefully few prototypes,
7197     which can conflict with char $ac_func(); below.  */
7198 #include <assert.h>
7199 /* Override any gcc2 internal prototype to avoid an error.  */
7200 /* We use char because int might match the return type of a gcc2
7201     builtin and then its argument prototype would still apply.  */
7202 char $ac_func();
7203
7204 int main() {
7205
7206 /* The GNU C library defines this for functions which it implements
7207     to always fail with ENOSYS.  Some functions are actually named
7208     something starting with __ and the normal name is an alias.  */
7209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7210 choke me
7211 #else
7212 $ac_func();
7213 #endif
7214
7215 ; return 0; }
7216 EOF
7217 if { (eval echo configure:7218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7218   rm -rf conftest*
7219   eval "ac_cv_func_$ac_func=yes"
7220 else
7221   echo "configure: failed program was:" >&5
7222   cat conftest.$ac_ext >&5
7223   rm -rf conftest*
7224   eval "ac_cv_func_$ac_func=no"
7225 fi
7226 rm -f conftest*
7227 fi
7228
7229 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7230   echo "$ac_t""yes" 1>&6
7231     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7232   cat >> confdefs.h <<EOF
7233 #define $ac_tr_func 1
7234 EOF
7235  
7236 else
7237   echo "$ac_t""no" 1>&6
7238 fi
7239 done
7240
7241   ;;
7242   esac
7243
7244
7245 case "$LIBS" in
7246   *-lsecurity*) for ac_func in getspnam
7247 do
7248 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7249 echo "configure:7250: checking for $ac_func" >&5
7250 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7251   echo $ac_n "(cached) $ac_c" 1>&6
7252 else
7253   cat > conftest.$ac_ext <<EOF
7254 #line 7255 "configure"
7255 #include "confdefs.h"
7256 /* System header to define __stub macros and hopefully few prototypes,
7257     which can conflict with char $ac_func(); below.  */
7258 #include <assert.h>
7259 /* Override any gcc2 internal prototype to avoid an error.  */
7260 /* We use char because int might match the return type of a gcc2
7261     builtin and then its argument prototype would still apply.  */
7262 char $ac_func();
7263
7264 int main() {
7265
7266 /* The GNU C library defines this for functions which it implements
7267     to always fail with ENOSYS.  Some functions are actually named
7268     something starting with __ and the normal name is an alias.  */
7269 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7270 choke me
7271 #else
7272 $ac_func();
7273 #endif
7274
7275 ; return 0; }
7276 EOF
7277 if { (eval echo configure:7278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7278   rm -rf conftest*
7279   eval "ac_cv_func_$ac_func=yes"
7280 else
7281   echo "configure: failed program was:" >&5
7282   cat conftest.$ac_ext >&5
7283   rm -rf conftest*
7284   eval "ac_cv_func_$ac_func=no"
7285 fi
7286 rm -f conftest*
7287 fi
7288
7289 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7290   echo "$ac_t""yes" 1>&6
7291     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7292   cat >> confdefs.h <<EOF
7293 #define $ac_tr_func 1
7294 EOF
7295  
7296 else
7297   echo "$ac_t""no" 1>&6
7298 fi
7299 done
7300  ;;
7301   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7302 echo "configure:7303: checking for getspnam in -lsecurity" >&5
7303 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7304 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7305   echo $ac_n "(cached) $ac_c" 1>&6
7306 else
7307   ac_save_LIBS="$LIBS"
7308 LIBS="-lsecurity  $LIBS"
7309 cat > conftest.$ac_ext <<EOF
7310 #line 7311 "configure"
7311 #include "confdefs.h"
7312 /* Override any gcc2 internal prototype to avoid an error.  */
7313 /* We use char because int might match the return type of a gcc2
7314     builtin and then its argument prototype would still apply.  */
7315 char getspnam();
7316
7317 int main() {
7318 getspnam()
7319 ; return 0; }
7320 EOF
7321 if { (eval echo configure:7322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7322   rm -rf conftest*
7323   eval "ac_cv_lib_$ac_lib_var=yes"
7324 else
7325   echo "configure: failed program was:" >&5
7326   cat conftest.$ac_ext >&5
7327   rm -rf conftest*
7328   eval "ac_cv_lib_$ac_lib_var=no"
7329 fi
7330 rm -f conftest*
7331 LIBS="$ac_save_LIBS"
7332
7333 fi
7334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7335   echo "$ac_t""yes" 1>&6
7336     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7337     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7338   cat >> confdefs.h <<EOF
7339 #define $ac_tr_lib 1
7340 EOF
7341
7342   LIBS="-lsecurity $LIBS"
7343
7344 else
7345   echo "$ac_t""no" 1>&6
7346 fi
7347  
7348      for ac_func in getspnam
7349 do
7350 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7351 echo "configure:7352: checking for $ac_func" >&5
7352 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7353   echo $ac_n "(cached) $ac_c" 1>&6
7354 else
7355   cat > conftest.$ac_ext <<EOF
7356 #line 7357 "configure"
7357 #include "confdefs.h"
7358 /* System header to define __stub macros and hopefully few prototypes,
7359     which can conflict with char $ac_func(); below.  */
7360 #include <assert.h>
7361 /* Override any gcc2 internal prototype to avoid an error.  */
7362 /* We use char because int might match the return type of a gcc2
7363     builtin and then its argument prototype would still apply.  */
7364 char $ac_func();
7365
7366 int main() {
7367
7368 /* The GNU C library defines this for functions which it implements
7369     to always fail with ENOSYS.  Some functions are actually named
7370     something starting with __ and the normal name is an alias.  */
7371 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7372 choke me
7373 #else
7374 $ac_func();
7375 #endif
7376
7377 ; return 0; }
7378 EOF
7379 if { (eval echo configure:7380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7380   rm -rf conftest*
7381   eval "ac_cv_func_$ac_func=yes"
7382 else
7383   echo "configure: failed program was:" >&5
7384   cat conftest.$ac_ext >&5
7385   rm -rf conftest*
7386   eval "ac_cv_func_$ac_func=no"
7387 fi
7388 rm -f conftest*
7389 fi
7390
7391 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7392   echo "$ac_t""yes" 1>&6
7393     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7394   cat >> confdefs.h <<EOF
7395 #define $ac_tr_func 1
7396 EOF
7397  
7398 else
7399   echo "$ac_t""no" 1>&6
7400 fi
7401 done
7402
7403   ;;
7404   esac
7405
7406 case "$LIBS" in
7407   *-lsec*) for ac_func in getspnam
7408 do
7409 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7410 echo "configure:7411: checking for $ac_func" >&5
7411 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7412   echo $ac_n "(cached) $ac_c" 1>&6
7413 else
7414   cat > conftest.$ac_ext <<EOF
7415 #line 7416 "configure"
7416 #include "confdefs.h"
7417 /* System header to define __stub macros and hopefully few prototypes,
7418     which can conflict with char $ac_func(); below.  */
7419 #include <assert.h>
7420 /* Override any gcc2 internal prototype to avoid an error.  */
7421 /* We use char because int might match the return type of a gcc2
7422     builtin and then its argument prototype would still apply.  */
7423 char $ac_func();
7424
7425 int main() {
7426
7427 /* The GNU C library defines this for functions which it implements
7428     to always fail with ENOSYS.  Some functions are actually named
7429     something starting with __ and the normal name is an alias.  */
7430 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7431 choke me
7432 #else
7433 $ac_func();
7434 #endif
7435
7436 ; return 0; }
7437 EOF
7438 if { (eval echo configure:7439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7439   rm -rf conftest*
7440   eval "ac_cv_func_$ac_func=yes"
7441 else
7442   echo "configure: failed program was:" >&5
7443   cat conftest.$ac_ext >&5
7444   rm -rf conftest*
7445   eval "ac_cv_func_$ac_func=no"
7446 fi
7447 rm -f conftest*
7448 fi
7449
7450 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7451   echo "$ac_t""yes" 1>&6
7452     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7453   cat >> confdefs.h <<EOF
7454 #define $ac_tr_func 1
7455 EOF
7456  
7457 else
7458   echo "$ac_t""no" 1>&6
7459 fi
7460 done
7461  ;;
7462   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7463 echo "configure:7464: checking for getspnam in -lsec" >&5
7464 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7465 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7466   echo $ac_n "(cached) $ac_c" 1>&6
7467 else
7468   ac_save_LIBS="$LIBS"
7469 LIBS="-lsec  $LIBS"
7470 cat > conftest.$ac_ext <<EOF
7471 #line 7472 "configure"
7472 #include "confdefs.h"
7473 /* Override any gcc2 internal prototype to avoid an error.  */
7474 /* We use char because int might match the return type of a gcc2
7475     builtin and then its argument prototype would still apply.  */
7476 char getspnam();
7477
7478 int main() {
7479 getspnam()
7480 ; return 0; }
7481 EOF
7482 if { (eval echo configure:7483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7483   rm -rf conftest*
7484   eval "ac_cv_lib_$ac_lib_var=yes"
7485 else
7486   echo "configure: failed program was:" >&5
7487   cat conftest.$ac_ext >&5
7488   rm -rf conftest*
7489   eval "ac_cv_lib_$ac_lib_var=no"
7490 fi
7491 rm -f conftest*
7492 LIBS="$ac_save_LIBS"
7493
7494 fi
7495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7496   echo "$ac_t""yes" 1>&6
7497     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7498     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7499   cat >> confdefs.h <<EOF
7500 #define $ac_tr_lib 1
7501 EOF
7502
7503   LIBS="-lsec $LIBS"
7504
7505 else
7506   echo "$ac_t""no" 1>&6
7507 fi
7508  
7509      for ac_func in getspnam
7510 do
7511 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7512 echo "configure:7513: checking for $ac_func" >&5
7513 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7514   echo $ac_n "(cached) $ac_c" 1>&6
7515 else
7516   cat > conftest.$ac_ext <<EOF
7517 #line 7518 "configure"
7518 #include "confdefs.h"
7519 /* System header to define __stub macros and hopefully few prototypes,
7520     which can conflict with char $ac_func(); below.  */
7521 #include <assert.h>
7522 /* Override any gcc2 internal prototype to avoid an error.  */
7523 /* We use char because int might match the return type of a gcc2
7524     builtin and then its argument prototype would still apply.  */
7525 char $ac_func();
7526
7527 int main() {
7528
7529 /* The GNU C library defines this for functions which it implements
7530     to always fail with ENOSYS.  Some functions are actually named
7531     something starting with __ and the normal name is an alias.  */
7532 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7533 choke me
7534 #else
7535 $ac_func();
7536 #endif
7537
7538 ; return 0; }
7539 EOF
7540 if { (eval echo configure:7541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7541   rm -rf conftest*
7542   eval "ac_cv_func_$ac_func=yes"
7543 else
7544   echo "configure: failed program was:" >&5
7545   cat conftest.$ac_ext >&5
7546   rm -rf conftest*
7547   eval "ac_cv_func_$ac_func=no"
7548 fi
7549 rm -f conftest*
7550 fi
7551
7552 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7553   echo "$ac_t""yes" 1>&6
7554     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7555   cat >> confdefs.h <<EOF
7556 #define $ac_tr_func 1
7557 EOF
7558  
7559 else
7560   echo "$ac_t""no" 1>&6
7561 fi
7562 done
7563
7564   ;;
7565   esac
7566
7567
7568 case "$LIBS" in
7569   *-lsecurity*) for ac_func in bigcrypt
7570 do
7571 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7572 echo "configure:7573: checking for $ac_func" >&5
7573 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7574   echo $ac_n "(cached) $ac_c" 1>&6
7575 else
7576   cat > conftest.$ac_ext <<EOF
7577 #line 7578 "configure"
7578 #include "confdefs.h"
7579 /* System header to define __stub macros and hopefully few prototypes,
7580     which can conflict with char $ac_func(); below.  */
7581 #include <assert.h>
7582 /* Override any gcc2 internal prototype to avoid an error.  */
7583 /* We use char because int might match the return type of a gcc2
7584     builtin and then its argument prototype would still apply.  */
7585 char $ac_func();
7586
7587 int main() {
7588
7589 /* The GNU C library defines this for functions which it implements
7590     to always fail with ENOSYS.  Some functions are actually named
7591     something starting with __ and the normal name is an alias.  */
7592 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7593 choke me
7594 #else
7595 $ac_func();
7596 #endif
7597
7598 ; return 0; }
7599 EOF
7600 if { (eval echo configure:7601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7601   rm -rf conftest*
7602   eval "ac_cv_func_$ac_func=yes"
7603 else
7604   echo "configure: failed program was:" >&5
7605   cat conftest.$ac_ext >&5
7606   rm -rf conftest*
7607   eval "ac_cv_func_$ac_func=no"
7608 fi
7609 rm -f conftest*
7610 fi
7611
7612 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7613   echo "$ac_t""yes" 1>&6
7614     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7615   cat >> confdefs.h <<EOF
7616 #define $ac_tr_func 1
7617 EOF
7618  
7619 else
7620   echo "$ac_t""no" 1>&6
7621 fi
7622 done
7623  ;;
7624   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7625 echo "configure:7626: checking for bigcrypt in -lsecurity" >&5
7626 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7627 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7628   echo $ac_n "(cached) $ac_c" 1>&6
7629 else
7630   ac_save_LIBS="$LIBS"
7631 LIBS="-lsecurity  $LIBS"
7632 cat > conftest.$ac_ext <<EOF
7633 #line 7634 "configure"
7634 #include "confdefs.h"
7635 /* Override any gcc2 internal prototype to avoid an error.  */
7636 /* We use char because int might match the return type of a gcc2
7637     builtin and then its argument prototype would still apply.  */
7638 char bigcrypt();
7639
7640 int main() {
7641 bigcrypt()
7642 ; return 0; }
7643 EOF
7644 if { (eval echo configure:7645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7645   rm -rf conftest*
7646   eval "ac_cv_lib_$ac_lib_var=yes"
7647 else
7648   echo "configure: failed program was:" >&5
7649   cat conftest.$ac_ext >&5
7650   rm -rf conftest*
7651   eval "ac_cv_lib_$ac_lib_var=no"
7652 fi
7653 rm -f conftest*
7654 LIBS="$ac_save_LIBS"
7655
7656 fi
7657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7658   echo "$ac_t""yes" 1>&6
7659     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7660     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7661   cat >> confdefs.h <<EOF
7662 #define $ac_tr_lib 1
7663 EOF
7664
7665   LIBS="-lsecurity $LIBS"
7666
7667 else
7668   echo "$ac_t""no" 1>&6
7669 fi
7670  
7671      for ac_func in bigcrypt
7672 do
7673 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7674 echo "configure:7675: checking for $ac_func" >&5
7675 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7676   echo $ac_n "(cached) $ac_c" 1>&6
7677 else
7678   cat > conftest.$ac_ext <<EOF
7679 #line 7680 "configure"
7680 #include "confdefs.h"
7681 /* System header to define __stub macros and hopefully few prototypes,
7682     which can conflict with char $ac_func(); below.  */
7683 #include <assert.h>
7684 /* Override any gcc2 internal prototype to avoid an error.  */
7685 /* We use char because int might match the return type of a gcc2
7686     builtin and then its argument prototype would still apply.  */
7687 char $ac_func();
7688
7689 int main() {
7690
7691 /* The GNU C library defines this for functions which it implements
7692     to always fail with ENOSYS.  Some functions are actually named
7693     something starting with __ and the normal name is an alias.  */
7694 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7695 choke me
7696 #else
7697 $ac_func();
7698 #endif
7699
7700 ; return 0; }
7701 EOF
7702 if { (eval echo configure:7703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7703   rm -rf conftest*
7704   eval "ac_cv_func_$ac_func=yes"
7705 else
7706   echo "configure: failed program was:" >&5
7707   cat conftest.$ac_ext >&5
7708   rm -rf conftest*
7709   eval "ac_cv_func_$ac_func=no"
7710 fi
7711 rm -f conftest*
7712 fi
7713
7714 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7715   echo "$ac_t""yes" 1>&6
7716     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7717   cat >> confdefs.h <<EOF
7718 #define $ac_tr_func 1
7719 EOF
7720  
7721 else
7722   echo "$ac_t""no" 1>&6
7723 fi
7724 done
7725
7726   ;;
7727   esac
7728
7729 case "$LIBS" in
7730   *-lsec*) for ac_func in bigcrypt
7731 do
7732 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7733 echo "configure:7734: checking for $ac_func" >&5
7734 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7735   echo $ac_n "(cached) $ac_c" 1>&6
7736 else
7737   cat > conftest.$ac_ext <<EOF
7738 #line 7739 "configure"
7739 #include "confdefs.h"
7740 /* System header to define __stub macros and hopefully few prototypes,
7741     which can conflict with char $ac_func(); below.  */
7742 #include <assert.h>
7743 /* Override any gcc2 internal prototype to avoid an error.  */
7744 /* We use char because int might match the return type of a gcc2
7745     builtin and then its argument prototype would still apply.  */
7746 char $ac_func();
7747
7748 int main() {
7749
7750 /* The GNU C library defines this for functions which it implements
7751     to always fail with ENOSYS.  Some functions are actually named
7752     something starting with __ and the normal name is an alias.  */
7753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7754 choke me
7755 #else
7756 $ac_func();
7757 #endif
7758
7759 ; return 0; }
7760 EOF
7761 if { (eval echo configure:7762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7762   rm -rf conftest*
7763   eval "ac_cv_func_$ac_func=yes"
7764 else
7765   echo "configure: failed program was:" >&5
7766   cat conftest.$ac_ext >&5
7767   rm -rf conftest*
7768   eval "ac_cv_func_$ac_func=no"
7769 fi
7770 rm -f conftest*
7771 fi
7772
7773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7774   echo "$ac_t""yes" 1>&6
7775     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7776   cat >> confdefs.h <<EOF
7777 #define $ac_tr_func 1
7778 EOF
7779  
7780 else
7781   echo "$ac_t""no" 1>&6
7782 fi
7783 done
7784  ;;
7785   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7786 echo "configure:7787: checking for bigcrypt in -lsec" >&5
7787 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7788 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7789   echo $ac_n "(cached) $ac_c" 1>&6
7790 else
7791   ac_save_LIBS="$LIBS"
7792 LIBS="-lsec  $LIBS"
7793 cat > conftest.$ac_ext <<EOF
7794 #line 7795 "configure"
7795 #include "confdefs.h"
7796 /* Override any gcc2 internal prototype to avoid an error.  */
7797 /* We use char because int might match the return type of a gcc2
7798     builtin and then its argument prototype would still apply.  */
7799 char bigcrypt();
7800
7801 int main() {
7802 bigcrypt()
7803 ; return 0; }
7804 EOF
7805 if { (eval echo configure:7806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7806   rm -rf conftest*
7807   eval "ac_cv_lib_$ac_lib_var=yes"
7808 else
7809   echo "configure: failed program was:" >&5
7810   cat conftest.$ac_ext >&5
7811   rm -rf conftest*
7812   eval "ac_cv_lib_$ac_lib_var=no"
7813 fi
7814 rm -f conftest*
7815 LIBS="$ac_save_LIBS"
7816
7817 fi
7818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7819   echo "$ac_t""yes" 1>&6
7820     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7821     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7822   cat >> confdefs.h <<EOF
7823 #define $ac_tr_lib 1
7824 EOF
7825
7826   LIBS="-lsec $LIBS"
7827
7828 else
7829   echo "$ac_t""no" 1>&6
7830 fi
7831  
7832      for ac_func in bigcrypt
7833 do
7834 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7835 echo "configure:7836: checking for $ac_func" >&5
7836 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7837   echo $ac_n "(cached) $ac_c" 1>&6
7838 else
7839   cat > conftest.$ac_ext <<EOF
7840 #line 7841 "configure"
7841 #include "confdefs.h"
7842 /* System header to define __stub macros and hopefully few prototypes,
7843     which can conflict with char $ac_func(); below.  */
7844 #include <assert.h>
7845 /* Override any gcc2 internal prototype to avoid an error.  */
7846 /* We use char because int might match the return type of a gcc2
7847     builtin and then its argument prototype would still apply.  */
7848 char $ac_func();
7849
7850 int main() {
7851
7852 /* The GNU C library defines this for functions which it implements
7853     to always fail with ENOSYS.  Some functions are actually named
7854     something starting with __ and the normal name is an alias.  */
7855 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7856 choke me
7857 #else
7858 $ac_func();
7859 #endif
7860
7861 ; return 0; }
7862 EOF
7863 if { (eval echo configure:7864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7864   rm -rf conftest*
7865   eval "ac_cv_func_$ac_func=yes"
7866 else
7867   echo "configure: failed program was:" >&5
7868   cat conftest.$ac_ext >&5
7869   rm -rf conftest*
7870   eval "ac_cv_func_$ac_func=no"
7871 fi
7872 rm -f conftest*
7873 fi
7874
7875 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7876   echo "$ac_t""yes" 1>&6
7877     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7878   cat >> confdefs.h <<EOF
7879 #define $ac_tr_func 1
7880 EOF
7881  
7882 else
7883   echo "$ac_t""no" 1>&6
7884 fi
7885 done
7886
7887   ;;
7888   esac
7889
7890
7891 case "$LIBS" in
7892   *-lsecurity*) for ac_func in getprpwnam
7893 do
7894 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7895 echo "configure:7896: checking for $ac_func" >&5
7896 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7897   echo $ac_n "(cached) $ac_c" 1>&6
7898 else
7899   cat > conftest.$ac_ext <<EOF
7900 #line 7901 "configure"
7901 #include "confdefs.h"
7902 /* System header to define __stub macros and hopefully few prototypes,
7903     which can conflict with char $ac_func(); below.  */
7904 #include <assert.h>
7905 /* Override any gcc2 internal prototype to avoid an error.  */
7906 /* We use char because int might match the return type of a gcc2
7907     builtin and then its argument prototype would still apply.  */
7908 char $ac_func();
7909
7910 int main() {
7911
7912 /* The GNU C library defines this for functions which it implements
7913     to always fail with ENOSYS.  Some functions are actually named
7914     something starting with __ and the normal name is an alias.  */
7915 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7916 choke me
7917 #else
7918 $ac_func();
7919 #endif
7920
7921 ; return 0; }
7922 EOF
7923 if { (eval echo configure:7924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7924   rm -rf conftest*
7925   eval "ac_cv_func_$ac_func=yes"
7926 else
7927   echo "configure: failed program was:" >&5
7928   cat conftest.$ac_ext >&5
7929   rm -rf conftest*
7930   eval "ac_cv_func_$ac_func=no"
7931 fi
7932 rm -f conftest*
7933 fi
7934
7935 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7936   echo "$ac_t""yes" 1>&6
7937     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7938   cat >> confdefs.h <<EOF
7939 #define $ac_tr_func 1
7940 EOF
7941  
7942 else
7943   echo "$ac_t""no" 1>&6
7944 fi
7945 done
7946  ;;
7947   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
7948 echo "configure:7949: checking for getprpwnam in -lsecurity" >&5
7949 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
7950 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7951   echo $ac_n "(cached) $ac_c" 1>&6
7952 else
7953   ac_save_LIBS="$LIBS"
7954 LIBS="-lsecurity  $LIBS"
7955 cat > conftest.$ac_ext <<EOF
7956 #line 7957 "configure"
7957 #include "confdefs.h"
7958 /* Override any gcc2 internal prototype to avoid an error.  */
7959 /* We use char because int might match the return type of a gcc2
7960     builtin and then its argument prototype would still apply.  */
7961 char getprpwnam();
7962
7963 int main() {
7964 getprpwnam()
7965 ; return 0; }
7966 EOF
7967 if { (eval echo configure:7968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7968   rm -rf conftest*
7969   eval "ac_cv_lib_$ac_lib_var=yes"
7970 else
7971   echo "configure: failed program was:" >&5
7972   cat conftest.$ac_ext >&5
7973   rm -rf conftest*
7974   eval "ac_cv_lib_$ac_lib_var=no"
7975 fi
7976 rm -f conftest*
7977 LIBS="$ac_save_LIBS"
7978
7979 fi
7980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7981   echo "$ac_t""yes" 1>&6
7982     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7983     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7984   cat >> confdefs.h <<EOF
7985 #define $ac_tr_lib 1
7986 EOF
7987
7988   LIBS="-lsecurity $LIBS"
7989
7990 else
7991   echo "$ac_t""no" 1>&6
7992 fi
7993  
7994      for ac_func in getprpwnam
7995 do
7996 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7997 echo "configure:7998: checking for $ac_func" >&5
7998 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7999   echo $ac_n "(cached) $ac_c" 1>&6
8000 else
8001   cat > conftest.$ac_ext <<EOF
8002 #line 8003 "configure"
8003 #include "confdefs.h"
8004 /* System header to define __stub macros and hopefully few prototypes,
8005     which can conflict with char $ac_func(); below.  */
8006 #include <assert.h>
8007 /* Override any gcc2 internal prototype to avoid an error.  */
8008 /* We use char because int might match the return type of a gcc2
8009     builtin and then its argument prototype would still apply.  */
8010 char $ac_func();
8011
8012 int main() {
8013
8014 /* The GNU C library defines this for functions which it implements
8015     to always fail with ENOSYS.  Some functions are actually named
8016     something starting with __ and the normal name is an alias.  */
8017 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8018 choke me
8019 #else
8020 $ac_func();
8021 #endif
8022
8023 ; return 0; }
8024 EOF
8025 if { (eval echo configure:8026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8026   rm -rf conftest*
8027   eval "ac_cv_func_$ac_func=yes"
8028 else
8029   echo "configure: failed program was:" >&5
8030   cat conftest.$ac_ext >&5
8031   rm -rf conftest*
8032   eval "ac_cv_func_$ac_func=no"
8033 fi
8034 rm -f conftest*
8035 fi
8036
8037 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8038   echo "$ac_t""yes" 1>&6
8039     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8040   cat >> confdefs.h <<EOF
8041 #define $ac_tr_func 1
8042 EOF
8043  
8044 else
8045   echo "$ac_t""no" 1>&6
8046 fi
8047 done
8048
8049   ;;
8050   esac
8051
8052 case "$LIBS" in
8053   *-lsec*) for ac_func in getprpwnam
8054 do
8055 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8056 echo "configure:8057: checking for $ac_func" >&5
8057 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8058   echo $ac_n "(cached) $ac_c" 1>&6
8059 else
8060   cat > conftest.$ac_ext <<EOF
8061 #line 8062 "configure"
8062 #include "confdefs.h"
8063 /* System header to define __stub macros and hopefully few prototypes,
8064     which can conflict with char $ac_func(); below.  */
8065 #include <assert.h>
8066 /* Override any gcc2 internal prototype to avoid an error.  */
8067 /* We use char because int might match the return type of a gcc2
8068     builtin and then its argument prototype would still apply.  */
8069 char $ac_func();
8070
8071 int main() {
8072
8073 /* The GNU C library defines this for functions which it implements
8074     to always fail with ENOSYS.  Some functions are actually named
8075     something starting with __ and the normal name is an alias.  */
8076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8077 choke me
8078 #else
8079 $ac_func();
8080 #endif
8081
8082 ; return 0; }
8083 EOF
8084 if { (eval echo configure:8085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8085   rm -rf conftest*
8086   eval "ac_cv_func_$ac_func=yes"
8087 else
8088   echo "configure: failed program was:" >&5
8089   cat conftest.$ac_ext >&5
8090   rm -rf conftest*
8091   eval "ac_cv_func_$ac_func=no"
8092 fi
8093 rm -f conftest*
8094 fi
8095
8096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8097   echo "$ac_t""yes" 1>&6
8098     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8099   cat >> confdefs.h <<EOF
8100 #define $ac_tr_func 1
8101 EOF
8102  
8103 else
8104   echo "$ac_t""no" 1>&6
8105 fi
8106 done
8107  ;;
8108   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8109 echo "configure:8110: checking for getprpwnam in -lsec" >&5
8110 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8111 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8112   echo $ac_n "(cached) $ac_c" 1>&6
8113 else
8114   ac_save_LIBS="$LIBS"
8115 LIBS="-lsec  $LIBS"
8116 cat > conftest.$ac_ext <<EOF
8117 #line 8118 "configure"
8118 #include "confdefs.h"
8119 /* Override any gcc2 internal prototype to avoid an error.  */
8120 /* We use char because int might match the return type of a gcc2
8121     builtin and then its argument prototype would still apply.  */
8122 char getprpwnam();
8123
8124 int main() {
8125 getprpwnam()
8126 ; return 0; }
8127 EOF
8128 if { (eval echo configure:8129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8129   rm -rf conftest*
8130   eval "ac_cv_lib_$ac_lib_var=yes"
8131 else
8132   echo "configure: failed program was:" >&5
8133   cat conftest.$ac_ext >&5
8134   rm -rf conftest*
8135   eval "ac_cv_lib_$ac_lib_var=no"
8136 fi
8137 rm -f conftest*
8138 LIBS="$ac_save_LIBS"
8139
8140 fi
8141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8142   echo "$ac_t""yes" 1>&6
8143     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8144     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8145   cat >> confdefs.h <<EOF
8146 #define $ac_tr_lib 1
8147 EOF
8148
8149   LIBS="-lsec $LIBS"
8150
8151 else
8152   echo "$ac_t""no" 1>&6
8153 fi
8154  
8155      for ac_func in getprpwnam
8156 do
8157 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8158 echo "configure:8159: checking for $ac_func" >&5
8159 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8160   echo $ac_n "(cached) $ac_c" 1>&6
8161 else
8162   cat > conftest.$ac_ext <<EOF
8163 #line 8164 "configure"
8164 #include "confdefs.h"
8165 /* System header to define __stub macros and hopefully few prototypes,
8166     which can conflict with char $ac_func(); below.  */
8167 #include <assert.h>
8168 /* Override any gcc2 internal prototype to avoid an error.  */
8169 /* We use char because int might match the return type of a gcc2
8170     builtin and then its argument prototype would still apply.  */
8171 char $ac_func();
8172
8173 int main() {
8174
8175 /* The GNU C library defines this for functions which it implements
8176     to always fail with ENOSYS.  Some functions are actually named
8177     something starting with __ and the normal name is an alias.  */
8178 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8179 choke me
8180 #else
8181 $ac_func();
8182 #endif
8183
8184 ; return 0; }
8185 EOF
8186 if { (eval echo configure:8187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8187   rm -rf conftest*
8188   eval "ac_cv_func_$ac_func=yes"
8189 else
8190   echo "configure: failed program was:" >&5
8191   cat conftest.$ac_ext >&5
8192   rm -rf conftest*
8193   eval "ac_cv_func_$ac_func=no"
8194 fi
8195 rm -f conftest*
8196 fi
8197
8198 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8199   echo "$ac_t""yes" 1>&6
8200     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8201   cat >> confdefs.h <<EOF
8202 #define $ac_tr_func 1
8203 EOF
8204  
8205 else
8206   echo "$ac_t""no" 1>&6
8207 fi
8208 done
8209
8210   ;;
8211   esac
8212
8213
8214 # this bit needs to be modified for each OS that is suported by
8215 # smbwrapper. You need to specify how to created a shared library and
8216 # how to compile C code to produce PIC object files
8217
8218 # these are the defaults, good for lots of systems
8219 HOST_OS="$host_os"
8220 LDSHFLAGS="-shared"
8221 PICFLAG=""
8222 SHLIBEXT="so"
8223 BLDSHARED="false"
8224
8225 # and these are for particular systems
8226 case "$host_os" in
8227                 *linux*)   cat >> confdefs.h <<\EOF
8228 #define LINUX 1
8229 EOF
8230
8231                                         BLDSHARED="true"
8232                 ;;
8233                 *solaris*) cat >> confdefs.h <<\EOF
8234 #define SUNOS5 1
8235 EOF
8236
8237                                         LDSHFLAGS="-G"
8238                                         BLDSHARED="true"
8239                 ;;
8240                 *sunos*) cat >> confdefs.h <<\EOF
8241 #define SUNOS4 1
8242 EOF
8243
8244                                         LDSHFLAGS=""
8245                 ;;
8246                 *bsd*) LDSHFLAGS="-shared -Bshareable"
8247                         BLDSHARED="true"
8248                 ;;
8249                 *irix*) cat >> confdefs.h <<\EOF
8250 #define IRIX 1
8251 EOF
8252
8253                         case "$host_os" in
8254                         *irix6*) cat >> confdefs.h <<\EOF
8255 #define IRIX6 1
8256 EOF
8257
8258                         ;;
8259                         esac
8260                         ATTEMPT_WRAP32_BUILD=yes
8261                 ;;
8262                 *aix*) cat >> confdefs.h <<\EOF
8263 #define AIX 1
8264 EOF
8265 ;;
8266                 *hpux*) cat >> confdefs.h <<\EOF
8267 #define HPUX 1
8268 EOF
8269
8270                         SHLIBEXT="sl"
8271                         # Use special PIC flags for the native HP-UX compiler.
8272                         if test $ac_cv_prog_cc_Ae = yes; then
8273                                 LDSHFLAGS="-b"
8274                                 PICFLAG="+z"
8275                         fi
8276                 ;;
8277                 *qnx*) cat >> confdefs.h <<\EOF
8278 #define QNX 1
8279 EOF
8280 ;;
8281                 *osf*) cat >> confdefs.h <<\EOF
8282 #define OSF1 1
8283 EOF
8284 ;;
8285                 *sco*) cat >> confdefs.h <<\EOF
8286 #define SCO 1
8287 EOF
8288 ;;
8289                 *next2*) cat >> confdefs.h <<\EOF
8290 #define NEXT2 1
8291 EOF
8292 ;;
8293                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8294 set dummy groff; ac_word=$2
8295 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8296 echo "configure:8297: checking for $ac_word" >&5
8297 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8298   echo $ac_n "(cached) $ac_c" 1>&6
8299 else
8300   if test -n "$ROFF"; then
8301   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8302 else
8303   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8304   ac_dummy="$PATH"
8305   for ac_dir in $ac_dummy; do
8306     test -z "$ac_dir" && ac_dir=.
8307     if test -f $ac_dir/$ac_word; then
8308       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8309       break
8310     fi
8311   done
8312   IFS="$ac_save_ifs"
8313 fi
8314 fi
8315 ROFF="$ac_cv_prog_ROFF"
8316 if test -n "$ROFF"; then
8317   echo "$ac_t""$ROFF" 1>&6
8318 else
8319   echo "$ac_t""no" 1>&6
8320 fi
8321 ;;
8322                 *sysv4*)
8323                         case "$host" in
8324                                 *-univel-*)     if  test "$GCC" != yes ; then
8325                                                                         cat >> confdefs.h <<\EOF
8326 #define HAVE_MEMSET 1
8327 EOF
8328
8329                                                                 fi
8330                                                                 LDSHFLAGS="-G"
8331                                 ;;
8332                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8333 #define RELIANTUNIX 1
8334 EOF
8335 ;;
8336                         esac
8337                         ;;
8338                 *sysv5*)
8339                         if  test "$GCC" != yes ; then
8340                                 cat >> confdefs.h <<\EOF
8341 #define HAVE_MEMSET 1
8342 EOF
8343
8344                         fi
8345                         LDSHFLAGS="-G"
8346                         ;;
8347 esac
8348
8349 # try to work out how to produce PIC code with this compiler
8350 echo $ac_n "checking whether ${CC-cc} accepts -fPIC""... $ac_c" 1>&6
8351 echo "configure:8352: checking whether ${CC-cc} accepts -fPIC" >&5
8352 if eval "test \"`echo '$''{'ac_cv_prog_cc_fPIC'+set}'`\" = set"; then
8353   echo $ac_n "(cached) $ac_c" 1>&6
8354 else
8355   echo 'void f(){}' > conftest.c
8356 if test -z "`${CC-cc} -fPIC -c conftest.c 2>&1`"; then
8357   ac_cv_prog_cc_fPIC=yes
8358 else
8359   ac_cv_prog_cc_fPIC=no
8360 fi
8361 rm -f conftest*
8362
8363 fi
8364
8365 echo "$ac_t""$ac_cv_prog_cc_fPIC" 1>&6
8366 if test $ac_cv_prog_cc_fPIC = yes; then
8367     PICFLAG="-fPIC";
8368 fi
8369 if test x$PICFLAG = x; then
8370   echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
8371 echo "configure:8372: checking whether ${CC-cc} accepts -KPIC" >&5
8372 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
8373   echo $ac_n "(cached) $ac_c" 1>&6
8374 else
8375   echo 'void f(){}' > conftest.c
8376 if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
8377   ac_cv_prog_cc_KPIC=yes
8378 else
8379   ac_cv_prog_cc_KPIC=no
8380 fi
8381 rm -f conftest*
8382
8383 fi
8384
8385 echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
8386   if test $ac_cv_prog_cc_KPIC = yes; then
8387     PICFLAG="-KPIC";
8388   fi
8389 fi
8390 if test x$PICFLAG = x; then
8391   echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
8392 echo "configure:8393: checking whether ${CC-cc} accepts -Kpic" >&5
8393 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
8394   echo $ac_n "(cached) $ac_c" 1>&6
8395 else
8396   echo 'void f(){}' > conftest.c
8397 if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
8398   ac_cv_prog_cc_Kpic=yes
8399 else
8400   ac_cv_prog_cc_Kpic=no
8401 fi
8402 rm -f conftest*
8403
8404 fi
8405
8406 echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
8407   if test $ac_cv_prog_cc_Kpic = yes; then
8408     PICFLAG="-Kpic";
8409   fi
8410 fi
8411
8412 ################
8413
8414 echo $ac_n "checking for long long""... $ac_c" 1>&6
8415 echo "configure:8416: checking for long long" >&5
8416 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8417   echo $ac_n "(cached) $ac_c" 1>&6
8418 else
8419   
8420 if test "$cross_compiling" = yes; then
8421   samba_cv_have_longlong=cross
8422 else
8423   cat > conftest.$ac_ext <<EOF
8424 #line 8425 "configure"
8425 #include "confdefs.h"
8426 #include <stdio.h>
8427 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8428 EOF
8429 if { (eval echo configure:8430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8430 then
8431   samba_cv_have_longlong=yes
8432 else
8433   echo "configure: failed program was:" >&5
8434   cat conftest.$ac_ext >&5
8435   rm -fr conftest*
8436   samba_cv_have_longlong=no
8437 fi
8438 rm -fr conftest*
8439 fi
8440
8441 fi
8442
8443 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8444 if test x"$samba_cv_have_longlong" = x"yes"; then
8445     cat >> confdefs.h <<\EOF
8446 #define HAVE_LONGLONG 1
8447 EOF
8448
8449 fi
8450
8451 #
8452 # Check if the compiler supports the LL prefix on long long integers.
8453 # AIX needs this.
8454
8455 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8456 echo "configure:8457: checking for LL suffix on long long integers" >&5
8457 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8458   echo $ac_n "(cached) $ac_c" 1>&6
8459 else
8460   
8461     cat > conftest.$ac_ext <<EOF
8462 #line 8463 "configure"
8463 #include "confdefs.h"
8464 #include <stdio.h>
8465 int main() {
8466 long long i = 0x8000000000LL
8467 ; return 0; }
8468 EOF
8469 if { (eval echo configure:8470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8470   rm -rf conftest*
8471   samba_cv_compiler_supports_ll=yes
8472 else
8473   echo "configure: failed program was:" >&5
8474   cat conftest.$ac_ext >&5
8475   rm -rf conftest*
8476   samba_cv_compiler_supports_ll=no
8477 fi
8478 rm -f conftest*
8479 fi
8480
8481 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8482 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8483    cat >> confdefs.h <<\EOF
8484 #define COMPILER_SUPPORTS_LL 1
8485 EOF
8486
8487 fi
8488
8489   
8490 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8491 echo "configure:8492: checking for 64 bit off_t" >&5
8492 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8493   echo $ac_n "(cached) $ac_c" 1>&6
8494 else
8495   
8496 if test "$cross_compiling" = yes; then
8497   samba_cv_SIZEOF_OFF_T=cross
8498 else
8499   cat > conftest.$ac_ext <<EOF
8500 #line 8501 "configure"
8501 #include "confdefs.h"
8502 #include <stdio.h>
8503 #include <sys/stat.h>
8504 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8505 EOF
8506 if { (eval echo configure:8507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8507 then
8508   samba_cv_SIZEOF_OFF_T=yes
8509 else
8510   echo "configure: failed program was:" >&5
8511   cat conftest.$ac_ext >&5
8512   rm -fr conftest*
8513   samba_cv_SIZEOF_OFF_T=no
8514 fi
8515 rm -fr conftest*
8516 fi
8517
8518 fi
8519
8520 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8521 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8522     cat >> confdefs.h <<\EOF
8523 #define SIZEOF_OFF_T 8
8524 EOF
8525
8526 fi
8527
8528 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8529 echo "configure:8530: checking for off64_t" >&5
8530 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8531   echo $ac_n "(cached) $ac_c" 1>&6
8532 else
8533   
8534 if test "$cross_compiling" = yes; then
8535   samba_cv_HAVE_OFF64_T=cross
8536 else
8537   cat > conftest.$ac_ext <<EOF
8538 #line 8539 "configure"
8539 #include "confdefs.h"
8540
8541 #if defined(HAVE_UNISTD_H)
8542 #include <unistd.h>
8543 #endif
8544 #include <stdio.h>
8545 #include <sys/stat.h>
8546 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8547 EOF
8548 if { (eval echo configure:8549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8549 then
8550   samba_cv_HAVE_OFF64_T=yes
8551 else
8552   echo "configure: failed program was:" >&5
8553   cat conftest.$ac_ext >&5
8554   rm -fr conftest*
8555   samba_cv_HAVE_OFF64_T=no
8556 fi
8557 rm -fr conftest*
8558 fi
8559
8560 fi
8561
8562 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8563 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8564     cat >> confdefs.h <<\EOF
8565 #define HAVE_OFF64_T 1
8566 EOF
8567
8568 fi
8569
8570 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8571 echo "configure:8572: checking for 64 bit ino_t" >&5
8572 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8573   echo $ac_n "(cached) $ac_c" 1>&6
8574 else
8575   
8576 if test "$cross_compiling" = yes; then
8577   samba_cv_SIZEOF_INO_T=cross
8578 else
8579   cat > conftest.$ac_ext <<EOF
8580 #line 8581 "configure"
8581 #include "confdefs.h"
8582 #include <stdio.h>
8583 #include <sys/stat.h>
8584 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8585 EOF
8586 if { (eval echo configure:8587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8587 then
8588   samba_cv_SIZEOF_INO_T=yes
8589 else
8590   echo "configure: failed program was:" >&5
8591   cat conftest.$ac_ext >&5
8592   rm -fr conftest*
8593   samba_cv_SIZEOF_INO_T=no
8594 fi
8595 rm -fr conftest*
8596 fi
8597
8598 fi
8599
8600 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8601 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8602     cat >> confdefs.h <<\EOF
8603 #define SIZEOF_INO_T 8
8604 EOF
8605
8606 fi
8607
8608 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8609 echo "configure:8610: checking for ino64_t" >&5
8610 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8611   echo $ac_n "(cached) $ac_c" 1>&6
8612 else
8613   
8614 if test "$cross_compiling" = yes; then
8615   samba_cv_HAVE_INO64_T=cross
8616 else
8617   cat > conftest.$ac_ext <<EOF
8618 #line 8619 "configure"
8619 #include "confdefs.h"
8620
8621 #if defined(HAVE_UNISTD_H)
8622 #include <unistd.h>
8623 #endif
8624 #include <stdio.h>
8625 #include <sys/stat.h>
8626 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8627 EOF
8628 if { (eval echo configure:8629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8629 then
8630   samba_cv_HAVE_INO64_T=yes
8631 else
8632   echo "configure: failed program was:" >&5
8633   cat conftest.$ac_ext >&5
8634   rm -fr conftest*
8635   samba_cv_HAVE_INO64_T=no
8636 fi
8637 rm -fr conftest*
8638 fi
8639
8640 fi
8641
8642 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8643 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8644     cat >> confdefs.h <<\EOF
8645 #define HAVE_INO64_T 1
8646 EOF
8647
8648 fi
8649
8650 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8651 echo "configure:8652: checking for struct dirent64" >&5
8652 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8653   echo $ac_n "(cached) $ac_c" 1>&6
8654 else
8655   
8656 cat > conftest.$ac_ext <<EOF
8657 #line 8658 "configure"
8658 #include "confdefs.h"
8659
8660 #if defined(HAVE_UNISTD_H)
8661 #include <unistd.h>
8662 #endif
8663 #include <sys/types.h>
8664 #include <dirent.h>
8665 int main() {
8666 struct dirent64 de;
8667 ; return 0; }
8668 EOF
8669 if { (eval echo configure:8670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8670   rm -rf conftest*
8671   samba_cv_HAVE_STRUCT_DIRENT64=yes
8672 else
8673   echo "configure: failed program was:" >&5
8674   cat conftest.$ac_ext >&5
8675   rm -rf conftest*
8676   samba_cv_HAVE_STRUCT_DIRENT64=no
8677 fi
8678 rm -f conftest*
8679 fi
8680
8681 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8682 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8683     cat >> confdefs.h <<\EOF
8684 #define HAVE_STRUCT_DIRENT64 1
8685 EOF
8686
8687 fi
8688
8689 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8690 echo "configure:8691: checking for unsigned char" >&5
8691 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8692   echo $ac_n "(cached) $ac_c" 1>&6
8693 else
8694   
8695 if test "$cross_compiling" = yes; then
8696   samba_cv_HAVE_UNSIGNED_CHAR=cross
8697 else
8698   cat > conftest.$ac_ext <<EOF
8699 #line 8700 "configure"
8700 #include "confdefs.h"
8701 #include <stdio.h>
8702 main() { char c; c=250; exit((c > 0)?0:1); }
8703 EOF
8704 if { (eval echo configure:8705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8705 then
8706   samba_cv_HAVE_UNSIGNED_CHAR=yes
8707 else
8708   echo "configure: failed program was:" >&5
8709   cat conftest.$ac_ext >&5
8710   rm -fr conftest*
8711   samba_cv_HAVE_UNSIGNED_CHAR=no
8712 fi
8713 rm -fr conftest*
8714 fi
8715
8716 fi
8717
8718 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8719 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8720     cat >> confdefs.h <<\EOF
8721 #define HAVE_UNSIGNED_CHAR 1
8722 EOF
8723
8724 fi
8725
8726 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8727 echo "configure:8728: checking for sin_len in sock" >&5
8728 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8729   echo $ac_n "(cached) $ac_c" 1>&6
8730 else
8731   
8732 cat > conftest.$ac_ext <<EOF
8733 #line 8734 "configure"
8734 #include "confdefs.h"
8735 #include <sys/types.h>
8736 #include <sys/socket.h>
8737 #include <netinet/in.h>
8738 int main() {
8739 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8740 ; return 0; }
8741 EOF
8742 if { (eval echo configure:8743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8743   rm -rf conftest*
8744   samba_cv_HAVE_SOCK_SIN_LEN=yes
8745 else
8746   echo "configure: failed program was:" >&5
8747   cat conftest.$ac_ext >&5
8748   rm -rf conftest*
8749   samba_cv_HAVE_SOCK_SIN_LEN=no
8750 fi
8751 rm -f conftest*
8752 fi
8753
8754 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8755 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8756     cat >> confdefs.h <<\EOF
8757 #define HAVE_SOCK_SIN_LEN 1
8758 EOF
8759
8760 fi
8761
8762 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8763 echo "configure:8764: checking whether seekdir returns void" >&5
8764 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8765   echo $ac_n "(cached) $ac_c" 1>&6
8766 else
8767   
8768 cat > conftest.$ac_ext <<EOF
8769 #line 8770 "configure"
8770 #include "confdefs.h"
8771 #include <sys/types.h>
8772 #include <dirent.h>
8773 void seekdir(DIR *d, long loc) { return; }
8774 int main() {
8775 return 0;
8776 ; return 0; }
8777 EOF
8778 if { (eval echo configure:8779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8779   rm -rf conftest*
8780   samba_cv_SEEKDIR_RETURNS_VOID=yes
8781 else
8782   echo "configure: failed program was:" >&5
8783   cat conftest.$ac_ext >&5
8784   rm -rf conftest*
8785   samba_cv_SEEKDIR_RETURNS_VOID=no
8786 fi
8787 rm -f conftest*
8788 fi
8789
8790 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
8791 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
8792     cat >> confdefs.h <<\EOF
8793 #define SEEKDIR_RETURNS_VOID 1
8794 EOF
8795
8796 fi
8797
8798 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
8799 echo "configure:8800: checking for __FILE__ macro" >&5
8800 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
8801   echo $ac_n "(cached) $ac_c" 1>&6
8802 else
8803   
8804 cat > conftest.$ac_ext <<EOF
8805 #line 8806 "configure"
8806 #include "confdefs.h"
8807 #include <stdio.h>
8808 int main() {
8809 printf("%s\n", __FILE__);
8810 ; return 0; }
8811 EOF
8812 if { (eval echo configure:8813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8813   rm -rf conftest*
8814   samba_cv_HAVE_FILE_MACRO=yes
8815 else
8816   echo "configure: failed program was:" >&5
8817   cat conftest.$ac_ext >&5
8818   rm -rf conftest*
8819   samba_cv_HAVE_FILE_MACRO=no
8820 fi
8821 rm -f conftest*
8822 fi
8823
8824 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
8825 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
8826     cat >> confdefs.h <<\EOF
8827 #define HAVE_FILE_MACRO 1
8828 EOF
8829
8830 fi
8831
8832 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
8833 echo "configure:8834: checking for __FUNCTION__ macro" >&5
8834 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
8835   echo $ac_n "(cached) $ac_c" 1>&6
8836 else
8837   
8838 cat > conftest.$ac_ext <<EOF
8839 #line 8840 "configure"
8840 #include "confdefs.h"
8841 #include <stdio.h>
8842 int main() {
8843 printf("%s\n", __FUNCTION__);
8844 ; return 0; }
8845 EOF
8846 if { (eval echo configure:8847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8847   rm -rf conftest*
8848   samba_cv_HAVE_FUNCTION_MACRO=yes
8849 else
8850   echo "configure: failed program was:" >&5
8851   cat conftest.$ac_ext >&5
8852   rm -rf conftest*
8853   samba_cv_HAVE_FUNCTION_MACRO=no
8854 fi
8855 rm -f conftest*
8856 fi
8857
8858 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
8859 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
8860     cat >> confdefs.h <<\EOF
8861 #define HAVE_FUNCTION_MACRO 1
8862 EOF
8863
8864 fi
8865
8866 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
8867 echo "configure:8868: checking if gettimeofday takes tz argument" >&5
8868 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
8869   echo $ac_n "(cached) $ac_c" 1>&6
8870 else
8871   
8872 if test "$cross_compiling" = yes; then
8873   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
8874 else
8875   cat > conftest.$ac_ext <<EOF
8876 #line 8877 "configure"
8877 #include "confdefs.h"
8878
8879 #include <sys/time.h>
8880 #include <unistd.h>
8881 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
8882 EOF
8883 if { (eval echo configure:8884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8884 then
8885   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
8886 else
8887   echo "configure: failed program was:" >&5
8888   cat conftest.$ac_ext >&5
8889   rm -fr conftest*
8890   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
8891 fi
8892 rm -fr conftest*
8893 fi
8894
8895 fi
8896
8897 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
8898 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
8899     cat >> confdefs.h <<\EOF
8900 #define HAVE_GETTIMEOFDAY_TZ 1
8901 EOF
8902
8903 fi
8904
8905 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
8906 echo "configure:8907: checking for C99 vsnprintf" >&5
8907 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
8908   echo $ac_n "(cached) $ac_c" 1>&6
8909 else
8910   
8911 if test "$cross_compiling" = yes; then
8912   samba_cv_HAVE_C99_VSNPRINTF=cross
8913 else
8914   cat > conftest.$ac_ext <<EOF
8915 #line 8916 "configure"
8916 #include "confdefs.h"
8917
8918 #include <sys/types.h>
8919 #include <stdarg.h>
8920 void foo(const char *format, ...) { 
8921        va_list ap;
8922        int len;
8923        char buf[5];
8924
8925        va_start(ap, format);
8926        len = vsnprintf(0, 0, format, ap);
8927        va_end(ap);
8928        if (len != 5) exit(1);
8929
8930        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
8931
8932        exit(0);
8933 }
8934 main() { foo("hello"); }
8935
8936 EOF
8937 if { (eval echo configure:8938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8938 then
8939   samba_cv_HAVE_C99_VSNPRINTF=yes
8940 else
8941   echo "configure: failed program was:" >&5
8942   cat conftest.$ac_ext >&5
8943   rm -fr conftest*
8944   samba_cv_HAVE_C99_VSNPRINTF=no
8945 fi
8946 rm -fr conftest*
8947 fi
8948
8949 fi
8950
8951 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
8952 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
8953     cat >> confdefs.h <<\EOF
8954 #define HAVE_C99_VSNPRINTF 1
8955 EOF
8956
8957 fi
8958
8959 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
8960 echo "configure:8961: checking for broken readdir" >&5
8961 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
8962   echo $ac_n "(cached) $ac_c" 1>&6
8963 else
8964   
8965 if test "$cross_compiling" = yes; then
8966   samba_cv_HAVE_BROKEN_READDIR=cross
8967 else
8968   cat > conftest.$ac_ext <<EOF
8969 #line 8970 "configure"
8970 #include "confdefs.h"
8971 #include <sys/types.h>
8972 #include <dirent.h>
8973 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
8974 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
8975 di->d_name[0] == 0) exit(0); exit(1);} 
8976 EOF
8977 if { (eval echo configure:8978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8978 then
8979   samba_cv_HAVE_BROKEN_READDIR=yes
8980 else
8981   echo "configure: failed program was:" >&5
8982   cat conftest.$ac_ext >&5
8983   rm -fr conftest*
8984   samba_cv_HAVE_BROKEN_READDIR=no
8985 fi
8986 rm -fr conftest*
8987 fi
8988
8989 fi
8990
8991 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
8992 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
8993     cat >> confdefs.h <<\EOF
8994 #define HAVE_BROKEN_READDIR 1
8995 EOF
8996
8997 fi
8998
8999 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9000 echo "configure:9001: checking for utimbuf" >&5
9001 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9002   echo $ac_n "(cached) $ac_c" 1>&6
9003 else
9004   
9005 cat > conftest.$ac_ext <<EOF
9006 #line 9007 "configure"
9007 #include "confdefs.h"
9008 #include <sys/types.h>
9009 #include <utime.h>
9010 int main() {
9011 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9012 ; return 0; }
9013 EOF
9014 if { (eval echo configure:9015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9015   rm -rf conftest*
9016   samba_cv_HAVE_UTIMBUF=yes
9017 else
9018   echo "configure: failed program was:" >&5
9019   cat conftest.$ac_ext >&5
9020   rm -rf conftest*
9021   samba_cv_HAVE_UTIMBUF=no
9022 fi
9023 rm -f conftest*
9024 fi
9025
9026 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9027 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9028     cat >> confdefs.h <<\EOF
9029 #define HAVE_UTIMBUF 1
9030 EOF
9031
9032 fi
9033
9034
9035 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9036 do
9037 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9038 echo "configure:9039: checking for $ac_func" >&5
9039 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9040   echo $ac_n "(cached) $ac_c" 1>&6
9041 else
9042   cat > conftest.$ac_ext <<EOF
9043 #line 9044 "configure"
9044 #include "confdefs.h"
9045 /* System header to define __stub macros and hopefully few prototypes,
9046     which can conflict with char $ac_func(); below.  */
9047 #include <assert.h>
9048 /* Override any gcc2 internal prototype to avoid an error.  */
9049 /* We use char because int might match the return type of a gcc2
9050     builtin and then its argument prototype would still apply.  */
9051 char $ac_func();
9052
9053 int main() {
9054
9055 /* The GNU C library defines this for functions which it implements
9056     to always fail with ENOSYS.  Some functions are actually named
9057     something starting with __ and the normal name is an alias.  */
9058 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9059 choke me
9060 #else
9061 $ac_func();
9062 #endif
9063
9064 ; return 0; }
9065 EOF
9066 if { (eval echo configure:9067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9067   rm -rf conftest*
9068   eval "ac_cv_func_$ac_func=yes"
9069 else
9070   echo "configure: failed program was:" >&5
9071   cat conftest.$ac_ext >&5
9072   rm -rf conftest*
9073   eval "ac_cv_func_$ac_func=no"
9074 fi
9075 rm -f conftest*
9076 fi
9077
9078 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9079   echo "$ac_t""yes" 1>&6
9080     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9081   cat >> confdefs.h <<EOF
9082 #define $ac_tr_func 1
9083 EOF
9084  
9085 else
9086   echo "$ac_t""no" 1>&6
9087 fi
9088 done
9089
9090
9091 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9092 echo "configure:9093: checking for ut_name in utmp" >&5
9093 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9094   echo $ac_n "(cached) $ac_c" 1>&6
9095 else
9096   
9097 cat > conftest.$ac_ext <<EOF
9098 #line 9099 "configure"
9099 #include "confdefs.h"
9100 #include <sys/types.h>
9101 #include <utmp.h>
9102 int main() {
9103 struct utmp ut;  ut.ut_name[0] = 'a';
9104 ; return 0; }
9105 EOF
9106 if { (eval echo configure:9107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9107   rm -rf conftest*
9108   samba_cv_HAVE_UT_UT_NAME=yes
9109 else
9110   echo "configure: failed program was:" >&5
9111   cat conftest.$ac_ext >&5
9112   rm -rf conftest*
9113   samba_cv_HAVE_UT_UT_NAME=no
9114 fi
9115 rm -f conftest*
9116 fi
9117
9118 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9119 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9120     cat >> confdefs.h <<\EOF
9121 #define HAVE_UT_UT_NAME 1
9122 EOF
9123
9124 fi 
9125
9126 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9127 echo "configure:9128: checking for ut_user in utmp" >&5
9128 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9129   echo $ac_n "(cached) $ac_c" 1>&6
9130 else
9131   
9132 cat > conftest.$ac_ext <<EOF
9133 #line 9134 "configure"
9134 #include "confdefs.h"
9135 #include <sys/types.h>
9136 #include <utmp.h>
9137 int main() {
9138 struct utmp ut;  ut.ut_user[0] = 'a';
9139 ; return 0; }
9140 EOF
9141 if { (eval echo configure:9142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9142   rm -rf conftest*
9143   samba_cv_HAVE_UT_UT_USER=yes
9144 else
9145   echo "configure: failed program was:" >&5
9146   cat conftest.$ac_ext >&5
9147   rm -rf conftest*
9148   samba_cv_HAVE_UT_UT_USER=no
9149 fi
9150 rm -f conftest*
9151 fi
9152
9153 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9154 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9155     cat >> confdefs.h <<\EOF
9156 #define HAVE_UT_UT_USER 1
9157 EOF
9158
9159 fi 
9160
9161 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9162 echo "configure:9163: checking for ut_id in utmp" >&5
9163 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9164   echo $ac_n "(cached) $ac_c" 1>&6
9165 else
9166   
9167 cat > conftest.$ac_ext <<EOF
9168 #line 9169 "configure"
9169 #include "confdefs.h"
9170 #include <sys/types.h>
9171 #include <utmp.h>
9172 int main() {
9173 struct utmp ut;  ut.ut_id[0] = 'a';
9174 ; return 0; }
9175 EOF
9176 if { (eval echo configure:9177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9177   rm -rf conftest*
9178   samba_cv_HAVE_UT_UT_ID=yes
9179 else
9180   echo "configure: failed program was:" >&5
9181   cat conftest.$ac_ext >&5
9182   rm -rf conftest*
9183   samba_cv_HAVE_UT_UT_ID=no
9184 fi
9185 rm -f conftest*
9186 fi
9187
9188 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9189 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9190     cat >> confdefs.h <<\EOF
9191 #define HAVE_UT_UT_ID 1
9192 EOF
9193
9194 fi 
9195
9196 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9197 echo "configure:9198: checking for ut_host in utmp" >&5
9198 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9199   echo $ac_n "(cached) $ac_c" 1>&6
9200 else
9201   
9202 cat > conftest.$ac_ext <<EOF
9203 #line 9204 "configure"
9204 #include "confdefs.h"
9205 #include <sys/types.h>
9206 #include <utmp.h>
9207 int main() {
9208 struct utmp ut;  ut.ut_host[0] = 'a';
9209 ; return 0; }
9210 EOF
9211 if { (eval echo configure:9212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9212   rm -rf conftest*
9213   samba_cv_HAVE_UT_UT_HOST=yes
9214 else
9215   echo "configure: failed program was:" >&5
9216   cat conftest.$ac_ext >&5
9217   rm -rf conftest*
9218   samba_cv_HAVE_UT_UT_HOST=no
9219 fi
9220 rm -f conftest*
9221 fi
9222
9223 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9224 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9225     cat >> confdefs.h <<\EOF
9226 #define HAVE_UT_UT_HOST 1
9227 EOF
9228
9229 fi 
9230
9231 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9232 echo "configure:9233: checking for ut_time in utmp" >&5
9233 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9234   echo $ac_n "(cached) $ac_c" 1>&6
9235 else
9236   
9237 cat > conftest.$ac_ext <<EOF
9238 #line 9239 "configure"
9239 #include "confdefs.h"
9240 #include <sys/types.h>
9241 #include <utmp.h>
9242 int main() {
9243 struct utmp ut;  time_t t; ut.ut_time = t;
9244 ; return 0; }
9245 EOF
9246 if { (eval echo configure:9247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9247   rm -rf conftest*
9248   samba_cv_HAVE_UT_UT_TIME=yes
9249 else
9250   echo "configure: failed program was:" >&5
9251   cat conftest.$ac_ext >&5
9252   rm -rf conftest*
9253   samba_cv_HAVE_UT_UT_TIME=no
9254 fi
9255 rm -f conftest*
9256 fi
9257
9258 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9259 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9260     cat >> confdefs.h <<\EOF
9261 #define HAVE_UT_UT_TIME 1
9262 EOF
9263
9264 fi 
9265
9266 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9267 echo "configure:9268: checking for ut_tv in utmp" >&5
9268 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9269   echo $ac_n "(cached) $ac_c" 1>&6
9270 else
9271   
9272 cat > conftest.$ac_ext <<EOF
9273 #line 9274 "configure"
9274 #include "confdefs.h"
9275 #include <sys/types.h>
9276 #include <utmp.h>
9277 int main() {
9278 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9279 ; return 0; }
9280 EOF
9281 if { (eval echo configure:9282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9282   rm -rf conftest*
9283   samba_cv_HAVE_UT_UT_TV=yes
9284 else
9285   echo "configure: failed program was:" >&5
9286   cat conftest.$ac_ext >&5
9287   rm -rf conftest*
9288   samba_cv_HAVE_UT_UT_TV=no
9289 fi
9290 rm -f conftest*
9291 fi
9292
9293 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9294 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9295     cat >> confdefs.h <<\EOF
9296 #define HAVE_UT_UT_TV 1
9297 EOF
9298
9299 fi 
9300
9301 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9302 echo "configure:9303: checking for ut_type in utmp" >&5
9303 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9304   echo $ac_n "(cached) $ac_c" 1>&6
9305 else
9306   
9307 cat > conftest.$ac_ext <<EOF
9308 #line 9309 "configure"
9309 #include "confdefs.h"
9310 #include <sys/types.h>
9311 #include <utmp.h>
9312 int main() {
9313 struct utmp ut;  ut.ut_type = 0;
9314 ; return 0; }
9315 EOF
9316 if { (eval echo configure:9317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9317   rm -rf conftest*
9318   samba_cv_HAVE_UT_UT_TYPE=yes
9319 else
9320   echo "configure: failed program was:" >&5
9321   cat conftest.$ac_ext >&5
9322   rm -rf conftest*
9323   samba_cv_HAVE_UT_UT_TYPE=no
9324 fi
9325 rm -f conftest*
9326 fi
9327
9328 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9329 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9330     cat >> confdefs.h <<\EOF
9331 #define HAVE_UT_UT_TYPE 1
9332 EOF
9333
9334 fi 
9335
9336 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9337 echo "configure:9338: checking for ut_pid in utmp" >&5
9338 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9339   echo $ac_n "(cached) $ac_c" 1>&6
9340 else
9341   
9342 cat > conftest.$ac_ext <<EOF
9343 #line 9344 "configure"
9344 #include "confdefs.h"
9345 #include <sys/types.h>
9346 #include <utmp.h>
9347 int main() {
9348 struct utmp ut;  ut.ut_pid = 0;
9349 ; return 0; }
9350 EOF
9351 if { (eval echo configure:9352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9352   rm -rf conftest*
9353   samba_cv_HAVE_UT_UT_PID=yes
9354 else
9355   echo "configure: failed program was:" >&5
9356   cat conftest.$ac_ext >&5
9357   rm -rf conftest*
9358   samba_cv_HAVE_UT_UT_PID=no
9359 fi
9360 rm -f conftest*
9361 fi
9362
9363 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9364 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9365     cat >> confdefs.h <<\EOF
9366 #define HAVE_UT_UT_PID 1
9367 EOF
9368
9369 fi 
9370
9371 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9372 echo "configure:9373: checking for ut_exit in utmp" >&5
9373 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9374   echo $ac_n "(cached) $ac_c" 1>&6
9375 else
9376   
9377 cat > conftest.$ac_ext <<EOF
9378 #line 9379 "configure"
9379 #include "confdefs.h"
9380 #include <sys/types.h>
9381 #include <utmp.h>
9382 int main() {
9383 struct utmp ut;  ut.ut_exit.e_exit = 0;
9384 ; return 0; }
9385 EOF
9386 if { (eval echo configure:9387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9387   rm -rf conftest*
9388   samba_cv_HAVE_UT_UT_EXIT=yes
9389 else
9390   echo "configure: failed program was:" >&5
9391   cat conftest.$ac_ext >&5
9392   rm -rf conftest*
9393   samba_cv_HAVE_UT_UT_EXIT=no
9394 fi
9395 rm -f conftest*
9396 fi
9397
9398 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9399 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9400     cat >> confdefs.h <<\EOF
9401 #define HAVE_UT_UT_EXIT 1
9402 EOF
9403
9404 fi 
9405
9406 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9407 echo "configure:9408: checking for ut_addr in utmp" >&5
9408 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9409   echo $ac_n "(cached) $ac_c" 1>&6
9410 else
9411   
9412 cat > conftest.$ac_ext <<EOF
9413 #line 9414 "configure"
9414 #include "confdefs.h"
9415 #include <sys/types.h>
9416 #include <utmp.h>
9417 int main() {
9418 struct utmp ut;  ut.ut_addr = 0;
9419 ; return 0; }
9420 EOF
9421 if { (eval echo configure:9422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9422   rm -rf conftest*
9423   samba_cv_HAVE_UT_UT_ADDR=yes
9424 else
9425   echo "configure: failed program was:" >&5
9426   cat conftest.$ac_ext >&5
9427   rm -rf conftest*
9428   samba_cv_HAVE_UT_UT_ADDR=no
9429 fi
9430 rm -f conftest*
9431 fi
9432
9433 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9434 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9435     cat >> confdefs.h <<\EOF
9436 #define HAVE_UT_UT_ADDR 1
9437 EOF
9438
9439 fi 
9440
9441 if test x$ac_cv_func_pututline = xyes ; then
9442   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9443 echo "configure:9444: checking whether pututline returns pointer" >&5
9444 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9445   echo $ac_n "(cached) $ac_c" 1>&6
9446 else
9447   
9448   cat > conftest.$ac_ext <<EOF
9449 #line 9450 "configure"
9450 #include "confdefs.h"
9451 #include <sys/types.h>
9452 #include <utmp.h>
9453 int main() {
9454 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9455 ; return 0; }
9456 EOF
9457 if { (eval echo configure:9458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9458   rm -rf conftest*
9459   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9460 else
9461   echo "configure: failed program was:" >&5
9462   cat conftest.$ac_ext >&5
9463   rm -rf conftest*
9464   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9465 fi
9466 rm -f conftest*
9467 fi
9468
9469 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9470   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9471       cat >> confdefs.h <<\EOF
9472 #define PUTUTLINE_RETURNS_UTMP 1
9473 EOF
9474
9475   fi
9476 fi
9477
9478 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9479 echo "configure:9480: checking for ut_syslen in utmpx" >&5
9480 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9481   echo $ac_n "(cached) $ac_c" 1>&6
9482 else
9483   
9484 cat > conftest.$ac_ext <<EOF
9485 #line 9486 "configure"
9486 #include "confdefs.h"
9487 #include <sys/types.h>
9488 #include <utmpx.h>
9489 int main() {
9490 struct utmpx ux;  ux.ut_syslen = 0;
9491 ; return 0; }
9492 EOF
9493 if { (eval echo configure:9494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9494   rm -rf conftest*
9495   samba_cv_HAVE_UX_UT_SYSLEN=yes
9496 else
9497   echo "configure: failed program was:" >&5
9498   cat conftest.$ac_ext >&5
9499   rm -rf conftest*
9500   samba_cv_HAVE_UX_UT_SYSLEN=no
9501 fi
9502 rm -f conftest*
9503 fi
9504
9505 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9506 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9507     cat >> confdefs.h <<\EOF
9508 #define HAVE_UX_UT_SYSLEN 1
9509 EOF
9510
9511 fi 
9512
9513 ############
9514 # check for iconv in libc, and if not then we build our own
9515 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9516 echo "configure:9517: checking for working iconv" >&5
9517 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9518   echo $ac_n "(cached) $ac_c" 1>&6
9519 else
9520   
9521 if test "$cross_compiling" = yes; then
9522   samba_cv_HAVE_NATIVE_ICONV=cross
9523 else
9524   cat > conftest.$ac_ext <<EOF
9525 #line 9526 "configure"
9526 #include "confdefs.h"
9527
9528 #include <iconv.h>
9529 main() {
9530        iconv_t cd = iconv_open("ASCII", "UCS2");
9531        if (cd == 0 || cd == (iconv_t)-1) return -1;
9532        return 0;
9533 }
9534
9535 EOF
9536 if { (eval echo configure:9537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9537 then
9538   samba_cv_HAVE_NATIVE_ICONV=yes
9539 else
9540   echo "configure: failed program was:" >&5
9541   cat conftest.$ac_ext >&5
9542   rm -fr conftest*
9543   samba_cv_HAVE_NATIVE_ICONV=no
9544 fi
9545 rm -fr conftest*
9546 fi
9547
9548 fi
9549
9550 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9551 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9552     cat >> confdefs.h <<\EOF
9553 #define HAVE_NATIVE_ICONV 1
9554 EOF
9555
9556 fi
9557
9558
9559 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9560 echo "configure:9561: checking for Linux kernel oplocks" >&5
9561 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9562   echo $ac_n "(cached) $ac_c" 1>&6
9563 else
9564   
9565 if test "$cross_compiling" = yes; then
9566   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9567 else
9568   cat > conftest.$ac_ext <<EOF
9569 #line 9570 "configure"
9570 #include "confdefs.h"
9571
9572 #include <sys/types.h>
9573 #include <fcntl.h>
9574 #ifndef F_GETLEASE
9575 #define F_GETLEASE      1025
9576 #endif
9577 main() {
9578        int fd = open("/dev/null", O_RDONLY);
9579        return fcntl(fd, F_GETLEASE, 0) == -1;
9580 }
9581
9582 EOF
9583 if { (eval echo configure:9584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9584 then
9585   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9586 else
9587   echo "configure: failed program was:" >&5
9588   cat conftest.$ac_ext >&5
9589   rm -fr conftest*
9590   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9591 fi
9592 rm -fr conftest*
9593 fi
9594
9595 fi
9596
9597 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9598 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9599     cat >> confdefs.h <<\EOF
9600 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9601 EOF
9602
9603 fi
9604
9605 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9606 echo "configure:9607: checking for kernel change notify support" >&5
9607 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9608   echo $ac_n "(cached) $ac_c" 1>&6
9609 else
9610   
9611 if test "$cross_compiling" = yes; then
9612   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9613 else
9614   cat > conftest.$ac_ext <<EOF
9615 #line 9616 "configure"
9616 #include "confdefs.h"
9617
9618 #include <sys/types.h>
9619 #include <fcntl.h>
9620 #include <signal.h>
9621 #ifndef F_NOTIFY
9622 #define F_NOTIFY 1026
9623 #endif
9624 main() {
9625         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9626 }
9627
9628 EOF
9629 if { (eval echo configure:9630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9630 then
9631   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9632 else
9633   echo "configure: failed program was:" >&5
9634   cat conftest.$ac_ext >&5
9635   rm -fr conftest*
9636   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9637 fi
9638 rm -fr conftest*
9639 fi
9640
9641 fi
9642
9643 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9644 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9645     cat >> confdefs.h <<\EOF
9646 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9647 EOF
9648
9649 fi
9650
9651 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9652 echo "configure:9653: checking for kernel share modes" >&5
9653 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9654   echo $ac_n "(cached) $ac_c" 1>&6
9655 else
9656   
9657 if test "$cross_compiling" = yes; then
9658   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9659 else
9660   cat > conftest.$ac_ext <<EOF
9661 #line 9662 "configure"
9662 #include "confdefs.h"
9663
9664 #include <sys/types.h>
9665 #include <fcntl.h>
9666 #include <signal.h>
9667 #include <sys/file.h>
9668 #ifndef LOCK_MAND
9669 #define LOCK_MAND       32
9670 #define LOCK_READ       64
9671 #endif
9672 main() {
9673         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9674 }
9675
9676 EOF
9677 if { (eval echo configure:9678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9678 then
9679   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9680 else
9681   echo "configure: failed program was:" >&5
9682   cat conftest.$ac_ext >&5
9683   rm -fr conftest*
9684   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9685 fi
9686 rm -fr conftest*
9687 fi
9688
9689 fi
9690
9691 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
9692 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
9693     cat >> confdefs.h <<\EOF
9694 #define HAVE_KERNEL_SHARE_MODES 1
9695 EOF
9696
9697 fi
9698
9699
9700
9701
9702 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
9703 echo "configure:9704: checking for IRIX kernel oplock type definitions" >&5
9704 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
9705   echo $ac_n "(cached) $ac_c" 1>&6
9706 else
9707   
9708 cat > conftest.$ac_ext <<EOF
9709 #line 9710 "configure"
9710 #include "confdefs.h"
9711 #include <sys/types.h>
9712 #include <fcntl.h>
9713 int main() {
9714 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
9715 ; return 0; }
9716 EOF
9717 if { (eval echo configure:9718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9718   rm -rf conftest*
9719   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
9720 else
9721   echo "configure: failed program was:" >&5
9722   cat conftest.$ac_ext >&5
9723   rm -rf conftest*
9724   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
9725 fi
9726 rm -f conftest*
9727 fi
9728
9729 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
9730 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
9731     cat >> confdefs.h <<\EOF
9732 #define HAVE_KERNEL_OPLOCKS_IRIX 1
9733 EOF
9734
9735 fi
9736
9737 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
9738 echo "configure:9739: checking for irix specific capabilities" >&5
9739 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
9740   echo $ac_n "(cached) $ac_c" 1>&6
9741 else
9742   
9743 if test "$cross_compiling" = yes; then
9744   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
9745 else
9746   cat > conftest.$ac_ext <<EOF
9747 #line 9748 "configure"
9748 #include "confdefs.h"
9749 #include <sys/types.h>
9750 #include <sys/capability.h>
9751 main() {
9752  cap_t cap;
9753  if ((cap = cap_get_proc()) == NULL)
9754    exit(1);
9755  cap->cap_effective |= CAP_NETWORK_MGT;
9756  cap->cap_inheritable |= CAP_NETWORK_MGT;
9757  cap_set_proc(cap);
9758  exit(0);
9759 }
9760
9761 EOF
9762 if { (eval echo configure:9763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9763 then
9764   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
9765 else
9766   echo "configure: failed program was:" >&5
9767   cat conftest.$ac_ext >&5
9768   rm -fr conftest*
9769   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
9770 fi
9771 rm -fr conftest*
9772 fi
9773
9774 fi
9775
9776 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
9777 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
9778     cat >> confdefs.h <<\EOF
9779 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
9780 EOF
9781
9782 fi
9783
9784 #
9785 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
9786 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
9787 #
9788
9789 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9790 echo "configure:9791: checking for int16 typedef included by rpc/rpc.h" >&5
9791 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_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 int16 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_INT16_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_INT16_FROM_RPC_RPC_H=no
9814 fi
9815 rm -f conftest*
9816 fi
9817
9818 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
9819 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
9820     cat >> confdefs.h <<\EOF
9821 #define HAVE_INT16_FROM_RPC_RPC_H 1
9822 EOF
9823
9824 fi
9825
9826 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9827 echo "configure:9828: checking for uint16 typedef included by rpc/rpc.h" >&5
9828 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_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 uint16 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_UINT16_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_UINT16_FROM_RPC_RPC_H=no
9851 fi
9852 rm -f conftest*
9853 fi
9854
9855 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
9856 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
9857     cat >> confdefs.h <<\EOF
9858 #define HAVE_UINT16_FROM_RPC_RPC_H 1
9859 EOF
9860
9861 fi
9862
9863 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9864 echo "configure:9865: checking for int32 typedef included by rpc/rpc.h" >&5
9865 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_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 int32 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_INT32_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_INT32_FROM_RPC_RPC_H=no
9888 fi
9889 rm -f conftest*
9890 fi
9891
9892 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
9893 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
9894     cat >> confdefs.h <<\EOF
9895 #define HAVE_INT32_FROM_RPC_RPC_H 1
9896 EOF
9897
9898 fi
9899
9900 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9901 echo "configure:9902: checking for uint32 typedef included by rpc/rpc.h" >&5
9902 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
9903   echo $ac_n "(cached) $ac_c" 1>&6
9904 else
9905   
9906 cat > conftest.$ac_ext <<EOF
9907 #line 9908 "configure"
9908 #include "confdefs.h"
9909 #include <sys/types.h>
9910 #if defined(HAVE_RPC_RPC_H)
9911 #include <rpc/rpc.h>
9912 #endif
9913 int main() {
9914 uint32 testvar;
9915 ; return 0; }
9916 EOF
9917 if { (eval echo configure:9918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9918   rm -rf conftest*
9919   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
9920 else
9921   echo "configure: failed program was:" >&5
9922   cat conftest.$ac_ext >&5
9923   rm -rf conftest*
9924   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
9925 fi
9926 rm -f conftest*
9927 fi
9928
9929 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
9930 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
9931     cat >> confdefs.h <<\EOF
9932 #define HAVE_UINT32_FROM_RPC_RPC_H 1
9933 EOF
9934
9935 fi
9936
9937
9938 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
9939 echo "configure:9940: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
9940 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
9941   echo $ac_n "(cached) $ac_c" 1>&6
9942 else
9943   
9944 cat > conftest.$ac_ext <<EOF
9945 #line 9946 "configure"
9946 #include "confdefs.h"
9947 #include <sys/types.h>
9948 #ifdef HAVE_SYS_SECURITY_H
9949 #include <sys/security.h>
9950 #include <prot.h>
9951 #endif  /* HAVE_SYS_SECURITY_H */
9952 #if defined(HAVE_RPC_RPC_H)
9953 #include <rpc/rpc.h>
9954 #endif
9955 int main() {
9956 int testvar;
9957 ; return 0; }
9958 EOF
9959 if { (eval echo configure:9960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9960   rm -rf conftest*
9961   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
9962 else
9963   echo "configure: failed program was:" >&5
9964   cat conftest.$ac_ext >&5
9965   rm -rf conftest*
9966   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
9967 fi
9968 rm -f conftest*
9969 fi
9970
9971 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
9972 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
9973     cat >> confdefs.h <<\EOF
9974 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
9975 EOF
9976
9977 fi
9978
9979 echo $ac_n "checking for test routines""... $ac_c" 1>&6
9980 echo "configure:9981: checking for test routines" >&5
9981 if test "$cross_compiling" = yes; then
9982   echo "configure: warning: cannot run when cross-compiling" 1>&2
9983 else
9984   cat > conftest.$ac_ext <<EOF
9985 #line 9986 "configure"
9986 #include "confdefs.h"
9987 #include "${srcdir-.}/tests/trivial.c"
9988 EOF
9989 if { (eval echo configure:9990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9990 then
9991   echo "$ac_t""yes" 1>&6
9992 else
9993   echo "configure: failed program was:" >&5
9994   cat conftest.$ac_ext >&5
9995   rm -fr conftest*
9996   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
9997 fi
9998 rm -fr conftest*
9999 fi
10000
10001
10002 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10003 echo "configure:10004: checking for ftruncate extend" >&5
10004 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10005   echo $ac_n "(cached) $ac_c" 1>&6
10006 else
10007   
10008 if test "$cross_compiling" = yes; then
10009   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10010 else
10011   cat > conftest.$ac_ext <<EOF
10012 #line 10013 "configure"
10013 #include "confdefs.h"
10014 #include "${srcdir-.}/tests/ftruncate.c"
10015 EOF
10016 if { (eval echo configure:10017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10017 then
10018   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10019 else
10020   echo "configure: failed program was:" >&5
10021   cat conftest.$ac_ext >&5
10022   rm -fr conftest*
10023   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10024 fi
10025 rm -fr conftest*
10026 fi
10027
10028 fi
10029
10030 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10031 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10032     cat >> confdefs.h <<\EOF
10033 #define HAVE_FTRUNCATE_EXTEND 1
10034 EOF
10035
10036 fi
10037
10038 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10039 echo "configure:10040: checking for AF_LOCAL socket support" >&5
10040 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+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_WORKING_AF_LOCAL=cross
10046 else
10047   cat > conftest.$ac_ext <<EOF
10048 #line 10049 "configure"
10049 #include "confdefs.h"
10050 #include "${srcdir-.}/tests/unixsock.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_WORKING_AF_LOCAL=yes
10055 else
10056   echo "configure: failed program was:" >&5
10057   cat conftest.$ac_ext >&5
10058   rm -fr conftest*
10059   samba_cv_HAVE_WORKING_AF_LOCAL=no
10060 fi
10061 rm -fr conftest*
10062 fi
10063
10064 fi
10065
10066 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10067 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10068 then
10069     cat >> confdefs.h <<\EOF
10070 #define HAVE_WORKING_AF_LOCAL 1
10071 EOF
10072
10073 fi
10074
10075 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10076 echo "configure:10077: checking for broken getgroups" >&5
10077 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10078   echo $ac_n "(cached) $ac_c" 1>&6
10079 else
10080   
10081 if test "$cross_compiling" = yes; then
10082   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10083 else
10084   cat > conftest.$ac_ext <<EOF
10085 #line 10086 "configure"
10086 #include "confdefs.h"
10087 #include "${srcdir-.}/tests/getgroups.c"
10088 EOF
10089 if { (eval echo configure:10090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10090 then
10091   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10092 else
10093   echo "configure: failed program was:" >&5
10094   cat conftest.$ac_ext >&5
10095   rm -fr conftest*
10096   samba_cv_HAVE_BROKEN_GETGROUPS=no
10097 fi
10098 rm -fr conftest*
10099 fi
10100
10101 fi
10102
10103 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10104 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10105     cat >> confdefs.h <<\EOF
10106 #define HAVE_BROKEN_GETGROUPS 1
10107 EOF
10108
10109 fi
10110
10111 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10112 echo "configure:10113: checking whether getpass should be replaced" >&5
10113 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10114   echo $ac_n "(cached) $ac_c" 1>&6
10115 else
10116   
10117 SAVE_CPPFLAGS="$CPPFLAGS"
10118 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10119 cat > conftest.$ac_ext <<EOF
10120 #line 10121 "configure"
10121 #include "confdefs.h"
10122
10123 #define REPLACE_GETPASS 1
10124 #define NO_CONFIG_H 1
10125 #define main dont_declare_main
10126 #include "${srcdir-.}/lib/getsmbpass.c"
10127 #undef main
10128
10129 int main() {
10130
10131 ; return 0; }
10132 EOF
10133 if { (eval echo configure:10134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10134   rm -rf conftest*
10135   samba_cv_REPLACE_GETPASS=yes
10136 else
10137   echo "configure: failed program was:" >&5
10138   cat conftest.$ac_ext >&5
10139   rm -rf conftest*
10140   samba_cv_REPLACE_GETPASS=no
10141 fi
10142 rm -f conftest*
10143 CPPFLAGS="$SAVE_CPPFLAGS"
10144
10145 fi
10146
10147 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10148 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10149         cat >> confdefs.h <<\EOF
10150 #define REPLACE_GETPASS 1
10151 EOF
10152
10153 fi
10154
10155 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10156 echo "configure:10157: checking for broken inet_ntoa" >&5
10157 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10158   echo $ac_n "(cached) $ac_c" 1>&6
10159 else
10160   
10161 if test "$cross_compiling" = yes; then
10162   samba_cv_REPLACE_INET_NTOA=cross
10163 else
10164   cat > conftest.$ac_ext <<EOF
10165 #line 10166 "configure"
10166 #include "confdefs.h"
10167
10168 #include <stdio.h>
10169 #include <sys/types.h>
10170 #include <netinet/in.h>
10171 #ifdef HAVE_ARPA_INET_H
10172 #include <arpa/inet.h>
10173 #endif
10174 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10175 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10176     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10177 exit(1);}
10178 EOF
10179 if { (eval echo configure:10180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10180 then
10181   samba_cv_REPLACE_INET_NTOA=yes
10182 else
10183   echo "configure: failed program was:" >&5
10184   cat conftest.$ac_ext >&5
10185   rm -fr conftest*
10186   samba_cv_REPLACE_INET_NTOA=no
10187 fi
10188 rm -fr conftest*
10189 fi
10190
10191 fi
10192
10193 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10194 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10195     cat >> confdefs.h <<\EOF
10196 #define REPLACE_INET_NTOA 1
10197 EOF
10198
10199 fi
10200
10201 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10202 echo "configure:10203: checking for secure mkstemp" >&5
10203 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10204   echo $ac_n "(cached) $ac_c" 1>&6
10205 else
10206   
10207 if test "$cross_compiling" = yes; then
10208   samba_cv_HAVE_SECURE_MKSTEMP=cross
10209 else
10210   cat > conftest.$ac_ext <<EOF
10211 #line 10212 "configure"
10212 #include "confdefs.h"
10213 #include <stdlib.h>
10214 #include <sys/types.h>
10215 #include <sys/stat.h>
10216 #include <unistd.h>
10217 main() { 
10218   struct stat st;
10219   char tpl[20]="/tmp/test.XXXXXX"; 
10220   int fd = mkstemp(tpl); 
10221   if (fd == -1) exit(1);
10222   unlink(tpl);
10223   if (fstat(fd, &st) != 0) exit(1);
10224   if ((st.st_mode & 0777) != 0600) exit(1);
10225   exit(0);
10226 }
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_HAVE_SECURE_MKSTEMP=yes
10231 else
10232   echo "configure: failed program was:" >&5
10233   cat conftest.$ac_ext >&5
10234   rm -fr conftest*
10235   samba_cv_HAVE_SECURE_MKSTEMP=no
10236 fi
10237 rm -fr conftest*
10238 fi
10239
10240 fi
10241
10242 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10243 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10244     cat >> confdefs.h <<\EOF
10245 #define HAVE_SECURE_MKSTEMP 1
10246 EOF
10247
10248 fi
10249
10250 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10251 echo "configure:10252: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10252 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+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_SYSCONF_SC_NGROUPS_MAX=cross
10258 else
10259   cat > conftest.$ac_ext <<EOF
10260 #line 10261 "configure"
10261 #include "confdefs.h"
10262 #include <unistd.h>
10263 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10264 EOF
10265 if { (eval echo configure:10266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10266 then
10267   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10268 else
10269   echo "configure: failed program was:" >&5
10270   cat conftest.$ac_ext >&5
10271   rm -fr conftest*
10272   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10273 fi
10274 rm -fr conftest*
10275 fi
10276
10277 fi
10278
10279 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10280 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10281     cat >> confdefs.h <<\EOF
10282 #define SYSCONF_SC_NGROUPS_MAX 1
10283 EOF
10284
10285 fi
10286
10287 echo $ac_n "checking for root""... $ac_c" 1>&6
10288 echo "configure:10289: checking for root" >&5
10289 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10290   echo $ac_n "(cached) $ac_c" 1>&6
10291 else
10292   
10293 if test "$cross_compiling" = yes; then
10294   samba_cv_HAVE_ROOT=cross
10295 else
10296   cat > conftest.$ac_ext <<EOF
10297 #line 10298 "configure"
10298 #include "confdefs.h"
10299 main() { exit(getuid() != 0); }
10300 EOF
10301 if { (eval echo configure:10302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10302 then
10303   samba_cv_HAVE_ROOT=yes
10304 else
10305   echo "configure: failed program was:" >&5
10306   cat conftest.$ac_ext >&5
10307   rm -fr conftest*
10308   samba_cv_HAVE_ROOT=no
10309 fi
10310 rm -fr conftest*
10311 fi
10312
10313 fi
10314
10315 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10316 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10317     cat >> confdefs.h <<\EOF
10318 #define HAVE_ROOT 1
10319 EOF
10320
10321 else
10322     echo "configure: warning: running as non-root will disable some tests" 1>&2
10323 fi
10324
10325 ##################
10326 # look for a method of finding the list of network interfaces
10327 iface=no;
10328 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10329 echo "configure:10330: checking for iface AIX" >&5
10330 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10331   echo $ac_n "(cached) $ac_c" 1>&6
10332 else
10333   
10334 if test "$cross_compiling" = yes; then
10335   samba_cv_HAVE_IFACE_AIX=cross
10336 else
10337   cat > conftest.$ac_ext <<EOF
10338 #line 10339 "configure"
10339 #include "confdefs.h"
10340
10341 #define HAVE_IFACE_AIX 1
10342 #define AUTOCONF_TEST 1
10343 #include "confdefs.h"
10344 #include "${srcdir-.}/lib/interfaces.c"
10345 EOF
10346 if { (eval echo configure:10347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10347 then
10348   samba_cv_HAVE_IFACE_AIX=yes
10349 else
10350   echo "configure: failed program was:" >&5
10351   cat conftest.$ac_ext >&5
10352   rm -fr conftest*
10353   samba_cv_HAVE_IFACE_AIX=no
10354 fi
10355 rm -fr conftest*
10356 fi
10357
10358 fi
10359
10360 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10361 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10362     iface=yes;cat >> confdefs.h <<\EOF
10363 #define HAVE_IFACE_AIX 1
10364 EOF
10365
10366 fi
10367
10368 if test $iface = no; then
10369 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10370 echo "configure:10371: checking for iface ifconf" >&5
10371 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10372   echo $ac_n "(cached) $ac_c" 1>&6
10373 else
10374   
10375 if test "$cross_compiling" = yes; then
10376   samba_cv_HAVE_IFACE_IFCONF=cross
10377 else
10378   cat > conftest.$ac_ext <<EOF
10379 #line 10380 "configure"
10380 #include "confdefs.h"
10381
10382 #define HAVE_IFACE_IFCONF 1
10383 #define AUTOCONF_TEST 1
10384 #include "confdefs.h"
10385 #include "${srcdir-.}/lib/interfaces.c"
10386 EOF
10387 if { (eval echo configure:10388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10388 then
10389   samba_cv_HAVE_IFACE_IFCONF=yes
10390 else
10391   echo "configure: failed program was:" >&5
10392   cat conftest.$ac_ext >&5
10393   rm -fr conftest*
10394   samba_cv_HAVE_IFACE_IFCONF=no
10395 fi
10396 rm -fr conftest*
10397 fi
10398
10399 fi
10400
10401 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10402 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10403     iface=yes;cat >> confdefs.h <<\EOF
10404 #define HAVE_IFACE_IFCONF 1
10405 EOF
10406
10407 fi
10408 fi
10409
10410 if test $iface = no; then
10411 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10412 echo "configure:10413: checking for iface ifreq" >&5
10413 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10414   echo $ac_n "(cached) $ac_c" 1>&6
10415 else
10416   
10417 if test "$cross_compiling" = yes; then
10418   samba_cv_HAVE_IFACE_IFREQ=cross
10419 else
10420   cat > conftest.$ac_ext <<EOF
10421 #line 10422 "configure"
10422 #include "confdefs.h"
10423
10424 #define HAVE_IFACE_IFREQ 1
10425 #define AUTOCONF_TEST 1
10426 #include "confdefs.h"
10427 #include "${srcdir-.}/lib/interfaces.c"
10428 EOF
10429 if { (eval echo configure:10430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10430 then
10431   samba_cv_HAVE_IFACE_IFREQ=yes
10432 else
10433   echo "configure: failed program was:" >&5
10434   cat conftest.$ac_ext >&5
10435   rm -fr conftest*
10436   samba_cv_HAVE_IFACE_IFREQ=no
10437 fi
10438 rm -fr conftest*
10439 fi
10440
10441 fi
10442
10443 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10444 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10445     iface=yes;cat >> confdefs.h <<\EOF
10446 #define HAVE_IFACE_IFREQ 1
10447 EOF
10448
10449 fi
10450 fi
10451
10452
10453 ################################################
10454 # look for a method of setting the effective uid
10455 seteuid=no;
10456 if test $seteuid = no; then
10457 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10458 echo "configure:10459: checking for setresuid" >&5
10459 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10460   echo $ac_n "(cached) $ac_c" 1>&6
10461 else
10462   
10463 if test "$cross_compiling" = yes; then
10464   samba_cv_USE_SETRESUID=cross
10465 else
10466   cat > conftest.$ac_ext <<EOF
10467 #line 10468 "configure"
10468 #include "confdefs.h"
10469
10470 #define AUTOCONF_TEST 1
10471 #define USE_SETRESUID 1
10472 #include "confdefs.h"
10473 #include "${srcdir-.}/lib/util_sec.c"
10474 EOF
10475 if { (eval echo configure:10476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10476 then
10477   samba_cv_USE_SETRESUID=yes
10478 else
10479   echo "configure: failed program was:" >&5
10480   cat conftest.$ac_ext >&5
10481   rm -fr conftest*
10482   samba_cv_USE_SETRESUID=no
10483 fi
10484 rm -fr conftest*
10485 fi
10486
10487 fi
10488
10489 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10490 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10491     seteuid=yes;cat >> confdefs.h <<\EOF
10492 #define USE_SETRESUID 1
10493 EOF
10494
10495 fi
10496 fi
10497
10498
10499 if test $seteuid = no; then
10500 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10501 echo "configure:10502: checking for setreuid" >&5
10502 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10503   echo $ac_n "(cached) $ac_c" 1>&6
10504 else
10505   
10506 if test "$cross_compiling" = yes; then
10507   samba_cv_USE_SETREUID=cross
10508 else
10509   cat > conftest.$ac_ext <<EOF
10510 #line 10511 "configure"
10511 #include "confdefs.h"
10512
10513 #define AUTOCONF_TEST 1
10514 #define USE_SETREUID 1
10515 #include "confdefs.h"
10516 #include "${srcdir-.}/lib/util_sec.c"
10517 EOF
10518 if { (eval echo configure:10519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10519 then
10520   samba_cv_USE_SETREUID=yes
10521 else
10522   echo "configure: failed program was:" >&5
10523   cat conftest.$ac_ext >&5
10524   rm -fr conftest*
10525   samba_cv_USE_SETREUID=no
10526 fi
10527 rm -fr conftest*
10528 fi
10529
10530 fi
10531
10532 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10533 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10534     seteuid=yes;cat >> confdefs.h <<\EOF
10535 #define USE_SETREUID 1
10536 EOF
10537
10538 fi
10539 fi
10540
10541 if test $seteuid = no; then
10542 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10543 echo "configure:10544: checking for seteuid" >&5
10544 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10545   echo $ac_n "(cached) $ac_c" 1>&6
10546 else
10547   
10548 if test "$cross_compiling" = yes; then
10549   samba_cv_USE_SETEUID=cross
10550 else
10551   cat > conftest.$ac_ext <<EOF
10552 #line 10553 "configure"
10553 #include "confdefs.h"
10554
10555 #define AUTOCONF_TEST 1
10556 #define USE_SETEUID 1
10557 #include "confdefs.h"
10558 #include "${srcdir-.}/lib/util_sec.c"
10559 EOF
10560 if { (eval echo configure:10561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10561 then
10562   samba_cv_USE_SETEUID=yes
10563 else
10564   echo "configure: failed program was:" >&5
10565   cat conftest.$ac_ext >&5
10566   rm -fr conftest*
10567   samba_cv_USE_SETEUID=no
10568 fi
10569 rm -fr conftest*
10570 fi
10571
10572 fi
10573
10574 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10575 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10576     seteuid=yes;cat >> confdefs.h <<\EOF
10577 #define USE_SETEUID 1
10578 EOF
10579
10580 fi
10581 fi
10582
10583 if test $seteuid = no; then
10584 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10585 echo "configure:10586: checking for setuidx" >&5
10586 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10587   echo $ac_n "(cached) $ac_c" 1>&6
10588 else
10589   
10590 if test "$cross_compiling" = yes; then
10591   samba_cv_USE_SETUIDX=cross
10592 else
10593   cat > conftest.$ac_ext <<EOF
10594 #line 10595 "configure"
10595 #include "confdefs.h"
10596
10597 #define AUTOCONF_TEST 1
10598 #define USE_SETUIDX 1
10599 #include "confdefs.h"
10600 #include "${srcdir-.}/lib/util_sec.c"
10601 EOF
10602 if { (eval echo configure:10603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10603 then
10604   samba_cv_USE_SETUIDX=yes
10605 else
10606   echo "configure: failed program was:" >&5
10607   cat conftest.$ac_ext >&5
10608   rm -fr conftest*
10609   samba_cv_USE_SETUIDX=no
10610 fi
10611 rm -fr conftest*
10612 fi
10613
10614 fi
10615
10616 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10617 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10618     seteuid=yes;cat >> confdefs.h <<\EOF
10619 #define USE_SETUIDX 1
10620 EOF
10621
10622 fi
10623 fi
10624
10625
10626 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10627 echo "configure:10628: checking for working mmap" >&5
10628 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10629   echo $ac_n "(cached) $ac_c" 1>&6
10630 else
10631   
10632 if test "$cross_compiling" = yes; then
10633   samba_cv_HAVE_MMAP=cross
10634 else
10635   cat > conftest.$ac_ext <<EOF
10636 #line 10637 "configure"
10637 #include "confdefs.h"
10638 #include "${srcdir-.}/tests/shared_mmap.c"
10639 EOF
10640 if { (eval echo configure:10641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10641 then
10642   samba_cv_HAVE_MMAP=yes
10643 else
10644   echo "configure: failed program was:" >&5
10645   cat conftest.$ac_ext >&5
10646   rm -fr conftest*
10647   samba_cv_HAVE_MMAP=no
10648 fi
10649 rm -fr conftest*
10650 fi
10651
10652 fi
10653
10654 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10655 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10656     cat >> confdefs.h <<\EOF
10657 #define HAVE_MMAP 1
10658 EOF
10659
10660 fi
10661
10662 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10663 echo "configure:10664: checking for ftruncate needs root" >&5
10664 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10665   echo $ac_n "(cached) $ac_c" 1>&6
10666 else
10667   
10668 if test "$cross_compiling" = yes; then
10669   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10670 else
10671   cat > conftest.$ac_ext <<EOF
10672 #line 10673 "configure"
10673 #include "confdefs.h"
10674 #include "${srcdir-.}/tests/ftruncroot.c"
10675 EOF
10676 if { (eval echo configure:10677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10677 then
10678   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10679 else
10680   echo "configure: failed program was:" >&5
10681   cat conftest.$ac_ext >&5
10682   rm -fr conftest*
10683   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10684 fi
10685 rm -fr conftest*
10686 fi
10687
10688 fi
10689
10690 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10691 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10692     cat >> confdefs.h <<\EOF
10693 #define FTRUNCATE_NEEDS_ROOT 1
10694 EOF
10695
10696 fi
10697
10698 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10699 echo "configure:10700: checking for fcntl locking" >&5
10700 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10701   echo $ac_n "(cached) $ac_c" 1>&6
10702 else
10703   
10704 if test "$cross_compiling" = yes; then
10705   samba_cv_HAVE_FCNTL_LOCK=cross
10706 else
10707   cat > conftest.$ac_ext <<EOF
10708 #line 10709 "configure"
10709 #include "confdefs.h"
10710 #include "${srcdir-.}/tests/fcntl_lock.c"
10711 EOF
10712 if { (eval echo configure:10713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10713 then
10714   samba_cv_HAVE_FCNTL_LOCK=yes
10715 else
10716   echo "configure: failed program was:" >&5
10717   cat conftest.$ac_ext >&5
10718   rm -fr conftest*
10719   samba_cv_HAVE_FCNTL_LOCK=no
10720 fi
10721 rm -fr conftest*
10722 fi
10723
10724 fi
10725
10726 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
10727 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
10728     cat >> confdefs.h <<\EOF
10729 #define HAVE_FCNTL_LOCK 1
10730 EOF
10731
10732 fi
10733
10734 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
10735 echo "configure:10736: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
10736 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
10737   echo $ac_n "(cached) $ac_c" 1>&6
10738 else
10739   
10740 if test "$cross_compiling" = yes; then
10741   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
10742 else
10743   cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746 #include "${srcdir-.}/tests/fcntl_lock64.c"
10747 EOF
10748 if { (eval echo configure:10749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10749 then
10750   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
10751 else
10752   echo "configure: failed program was:" >&5
10753   cat conftest.$ac_ext >&5
10754   rm -fr conftest*
10755   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
10756 fi
10757 rm -fr conftest*
10758 fi
10759
10760 fi
10761
10762 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
10763 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
10764     cat >> confdefs.h <<\EOF
10765 #define HAVE_BROKEN_FCNTL64_LOCKS 1
10766 EOF
10767
10768
10769 else
10770
10771
10772   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
10773 echo "configure:10774: checking for 64 bit fcntl locking" >&5
10774 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
10775   echo $ac_n "(cached) $ac_c" 1>&6
10776 else
10777   
10778   if test "$cross_compiling" = yes; then
10779   samba_cv_HAVE_STRUCT_FLOCK64=cross
10780 else
10781   cat > conftest.$ac_ext <<EOF
10782 #line 10783 "configure"
10783 #include "confdefs.h"
10784
10785 #if defined(HAVE_UNISTD_H)
10786 #include <unistd.h>
10787 #endif
10788 #include <stdio.h>
10789 #include <stdlib.h>
10790
10791 #ifdef HAVE_FCNTL_H
10792 #include <fcntl.h>
10793 #endif
10794
10795 #ifdef HAVE_SYS_FCNTL_H
10796 #include <sys/fcntl.h>
10797 #endif
10798 main() { struct flock64 fl64;
10799 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
10800 exit(0);
10801 #else
10802 exit(1);
10803 #endif
10804 }
10805 EOF
10806 if { (eval echo configure:10807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10807 then
10808   samba_cv_HAVE_STRUCT_FLOCK64=yes
10809 else
10810   echo "configure: failed program was:" >&5
10811   cat conftest.$ac_ext >&5
10812   rm -fr conftest*
10813   samba_cv_HAVE_STRUCT_FLOCK64=no
10814 fi
10815 rm -fr conftest*
10816 fi
10817
10818 fi
10819
10820 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
10821
10822   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
10823       cat >> confdefs.h <<\EOF
10824 #define HAVE_STRUCT_FLOCK64 1
10825 EOF
10826
10827   fi
10828 fi
10829
10830 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
10831 echo "configure:10832: checking for a crypt that needs truncated salt" >&5
10832 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
10833   echo $ac_n "(cached) $ac_c" 1>&6
10834 else
10835   
10836 if test "$cross_compiling" = yes; then
10837   samba_cv_HAVE_TRUNCATED_SALT=cross
10838 else
10839   cat > conftest.$ac_ext <<EOF
10840 #line 10841 "configure"
10841 #include "confdefs.h"
10842 #include "${srcdir-.}/tests/crypttest.c"
10843 EOF
10844 if { (eval echo configure:10845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10845 then
10846   samba_cv_HAVE_TRUNCATED_SALT=no
10847 else
10848   echo "configure: failed program was:" >&5
10849   cat conftest.$ac_ext >&5
10850   rm -fr conftest*
10851   samba_cv_HAVE_TRUNCATED_SALT=yes
10852 fi
10853 rm -fr conftest*
10854 fi
10855
10856 fi
10857
10858 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
10859 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
10860     cat >> confdefs.h <<\EOF
10861 #define HAVE_TRUNCATED_SALT 1
10862 EOF
10863
10864 fi
10865
10866 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
10867 echo "configure:10868: checking for broken nisplus include files" >&5
10868 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
10869   echo $ac_n "(cached) $ac_c" 1>&6
10870 else
10871   
10872 cat > conftest.$ac_ext <<EOF
10873 #line 10874 "configure"
10874 #include "confdefs.h"
10875 #include <sys/acl.h>
10876 #if defined(HAVE_RPCSVC_NIS_H)
10877 #include <rpcsvc/nis.h>
10878 #endif
10879 int main() {
10880 return 0;
10881 ; return 0; }
10882 EOF
10883 if { (eval echo configure:10884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10884   rm -rf conftest*
10885   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
10886 else
10887   echo "configure: failed program was:" >&5
10888   cat conftest.$ac_ext >&5
10889   rm -rf conftest*
10890   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
10891 fi
10892 rm -f conftest*
10893 fi
10894
10895 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
10896 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
10897     cat >> confdefs.h <<\EOF
10898 #define BROKEN_NISPLUS_INCLUDE_FILES 1
10899 EOF
10900
10901 fi
10902
10903
10904 #################################################
10905 # check for smbwrapper support
10906 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
10907 echo "configure:10908: checking whether to use smbwrapper" >&5
10908 # Check whether --with-smbwrapper or --without-smbwrapper was given.
10909 if test "${with_smbwrapper+set}" = set; then
10910   withval="$with_smbwrapper"
10911    case "$withval" in
10912   yes)
10913     echo "$ac_t""yes" 1>&6
10914     cat >> confdefs.h <<\EOF
10915 #define WITH_SMBWRAPPER 1
10916 EOF
10917
10918         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
10919
10920         if test x$ATTEMPT_WRAP32_BUILD = x; then
10921                 WRAP32=""
10922         else
10923                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
10924         fi
10925
10926 # Conditions under which smbwrapper should not be built.
10927
10928         if test x$PICFLAG = x; then
10929            echo No support for PIC code - disabling smbwrapper and smbsh
10930            WRAP=""
10931            WRAP32=""
10932         elif test x$ac_cv_func_syscall = xno; then
10933            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
10934            WRAP=""
10935            WRAP32=""
10936         fi
10937     ;;
10938   *)
10939     echo "$ac_t""no" 1>&6
10940     ;;
10941   esac 
10942 else
10943   echo "$ac_t""no" 1>&6
10944
10945 fi
10946
10947
10948 #################################################
10949 # check for the AFS filesystem
10950 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
10951 echo "configure:10952: checking whether to use AFS" >&5
10952 # Check whether --with-afs or --without-afs was given.
10953 if test "${with_afs+set}" = set; then
10954   withval="$with_afs"
10955    case "$withval" in
10956   yes)
10957     echo "$ac_t""yes" 1>&6
10958     cat >> confdefs.h <<\EOF
10959 #define WITH_AFS 1
10960 EOF
10961
10962     ;;
10963   *)
10964     echo "$ac_t""no" 1>&6
10965     ;;
10966   esac 
10967 else
10968   echo "$ac_t""no" 1>&6
10969
10970 fi
10971
10972
10973
10974 #################################################
10975 # check for the DFS auth system
10976 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
10977 echo "configure:10978: checking whether to use DFS auth" >&5
10978 # Check whether --with-dfs or --without-dfs was given.
10979 if test "${with_dfs+set}" = set; then
10980   withval="$with_dfs"
10981    case "$withval" in
10982   yes)
10983     echo "$ac_t""yes" 1>&6
10984     cat >> confdefs.h <<\EOF
10985 #define WITH_DFS 1
10986 EOF
10987
10988     ;;
10989   *)
10990     echo "$ac_t""no" 1>&6
10991     ;;
10992   esac 
10993 else
10994   echo "$ac_t""no" 1>&6
10995
10996 fi
10997
10998
10999 #################################################
11000 # check for Kerberos IV auth system
11001 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
11002 echo "configure:11003: checking whether to use Kerberos IV" >&5
11003 # Check whether --with-krb4 or --without-krb4 was given.
11004 if test "${with_krb4+set}" = set; then
11005   withval="$with_krb4"
11006      echo "$ac_t""yes" 1>&6
11007     cat >> confdefs.h <<\EOF
11008 #define KRB4_AUTH 1
11009 EOF
11010
11011     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
11012 echo "configure:11013: checking for dn_expand in -lresolv" >&5
11013 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
11014 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11015   echo $ac_n "(cached) $ac_c" 1>&6
11016 else
11017   ac_save_LIBS="$LIBS"
11018 LIBS="-lresolv  $LIBS"
11019 cat > conftest.$ac_ext <<EOF
11020 #line 11021 "configure"
11021 #include "confdefs.h"
11022 /* Override any gcc2 internal prototype to avoid an error.  */
11023 /* We use char because int might match the return type of a gcc2
11024     builtin and then its argument prototype would still apply.  */
11025 char dn_expand();
11026
11027 int main() {
11028 dn_expand()
11029 ; return 0; }
11030 EOF
11031 if { (eval echo configure:11032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11032   rm -rf conftest*
11033   eval "ac_cv_lib_$ac_lib_var=yes"
11034 else
11035   echo "configure: failed program was:" >&5
11036   cat conftest.$ac_ext >&5
11037   rm -rf conftest*
11038   eval "ac_cv_lib_$ac_lib_var=no"
11039 fi
11040 rm -f conftest*
11041 LIBS="$ac_save_LIBS"
11042
11043 fi
11044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11045   echo "$ac_t""yes" 1>&6
11046     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11047     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11048   cat >> confdefs.h <<EOF
11049 #define $ac_tr_lib 1
11050 EOF
11051
11052   LIBS="-lresolv $LIBS"
11053
11054 else
11055   echo "$ac_t""no" 1>&6
11056 fi
11057
11058     LIBS="$LIBS -lkrb -ldes"
11059     CFLAGS="$CFLAGS -I$withval/include"
11060     LDFLAGS="$LDFLAGS -L$withval/lib"
11061 else
11062   echo "$ac_t""no" 1>&6
11063
11064 fi
11065
11066
11067 #################################################
11068 # check for Kerberos 5 auth system
11069 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
11070 echo "configure:11071: checking whether to use Kerberos 5" >&5
11071 # Check whether --with-krb5 or --without-krb5 was given.
11072 if test "${with_krb5+set}" = set; then
11073   withval="$with_krb5"
11074      echo "$ac_t""yes" 1>&6
11075     cat >> confdefs.h <<\EOF
11076 #define KRB5_AUTH 1
11077 EOF
11078
11079     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
11080     CFLAGS="$CFLAGS -I$withval/include"
11081     LDFLAGS="$LDFLAGS -L$withval/lib"
11082 else
11083   echo "$ac_t""no" 1>&6
11084
11085 fi
11086
11087
11088 #################################################
11089 # check for automount support
11090 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11091 echo "configure:11092: checking whether to use AUTOMOUNT" >&5
11092 # Check whether --with-automount or --without-automount was given.
11093 if test "${with_automount+set}" = set; then
11094   withval="$with_automount"
11095    case "$withval" in
11096   yes)
11097     echo "$ac_t""yes" 1>&6
11098     cat >> confdefs.h <<\EOF
11099 #define WITH_AUTOMOUNT 1
11100 EOF
11101
11102     ;;
11103   *)
11104     echo "$ac_t""no" 1>&6
11105     ;;
11106   esac 
11107 else
11108   echo "$ac_t""no" 1>&6
11109
11110 fi
11111
11112
11113 #################################################
11114 # check for smbmount support
11115 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11116 echo "configure:11117: checking whether to use SMBMOUNT" >&5
11117 # Check whether --with-smbmount or --without-smbmount was given.
11118 if test "${with_smbmount+set}" = set; then
11119   withval="$with_smbmount"
11120    case "$withval" in
11121   yes)
11122     echo "$ac_t""yes" 1>&6
11123     cat >> confdefs.h <<\EOF
11124 #define WITH_SMBMOUNT 1
11125 EOF
11126
11127     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11128     ;;
11129   *)
11130     echo "$ac_t""no" 1>&6
11131     MPROGS=
11132     ;;
11133   esac 
11134 else
11135   echo "$ac_t""no" 1>&6
11136   MPROGS=
11137
11138 fi
11139
11140
11141
11142 #################################################
11143 # check for a PAM password database
11144
11145 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
11146 echo "configure:11147: checking whether to use PAM password database" >&5
11147 # Check whether --with-pam or --without-pam was given.
11148 if test "${with_pam+set}" = set; then
11149   withval="$with_pam"
11150    case "$withval" in
11151   yes)
11152     echo "$ac_t""yes" 1>&6
11153     cat >> confdefs.h <<\EOF
11154 #define WITH_PAM 1
11155 EOF
11156
11157     LIBS="$LIBS -lpam"
11158     ;;
11159   *)
11160     echo "$ac_t""no" 1>&6
11161     ;;
11162   esac 
11163 else
11164   echo "$ac_t""no" 1>&6
11165
11166 fi
11167
11168
11169 # we can't build a pam module if we don't have pam.
11170 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11171 echo "configure:11172: checking for pam_get_data in -lpam" >&5
11172 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11173 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11174   echo $ac_n "(cached) $ac_c" 1>&6
11175 else
11176   ac_save_LIBS="$LIBS"
11177 LIBS="-lpam  $LIBS"
11178 cat > conftest.$ac_ext <<EOF
11179 #line 11180 "configure"
11180 #include "confdefs.h"
11181 /* Override any gcc2 internal prototype to avoid an error.  */
11182 /* We use char because int might match the return type of a gcc2
11183     builtin and then its argument prototype would still apply.  */
11184 char pam_get_data();
11185
11186 int main() {
11187 pam_get_data()
11188 ; return 0; }
11189 EOF
11190 if { (eval echo configure:11191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11191   rm -rf conftest*
11192   eval "ac_cv_lib_$ac_lib_var=yes"
11193 else
11194   echo "configure: failed program was:" >&5
11195   cat conftest.$ac_ext >&5
11196   rm -rf conftest*
11197   eval "ac_cv_lib_$ac_lib_var=no"
11198 fi
11199 rm -f conftest*
11200 LIBS="$ac_save_LIBS"
11201
11202 fi
11203 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11204   echo "$ac_t""yes" 1>&6
11205   cat >> confdefs.h <<\EOF
11206 #define HAVE_LIBPAM 1
11207 EOF
11208
11209 else
11210   echo "$ac_t""no" 1>&6
11211 fi
11212
11213
11214 #################################################
11215 # check for pam_smbpass support
11216 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11217 echo "configure:11218: checking whether to use pam_smbpass" >&5
11218 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11219 if test "${with_pam_smbpass+set}" = set; then
11220   withval="$with_pam_smbpass"
11221    case "$withval" in
11222   yes)
11223     echo "$ac_t""yes" 1>&6
11224
11225 # Conditions under which pam_smbpass should not be built.
11226
11227        if test x$PICFLAG = x; then
11228           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11229           PAM_MOD=""
11230        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11231           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11232           PAM_MOD=""
11233        else
11234           cat >> confdefs.h <<\EOF
11235 #define WITH_PAM_SMBPASS 1
11236 EOF
11237
11238           PAM_MOD="bin/pam_smbpass.so"
11239        fi
11240     ;;
11241   *)
11242     echo "$ac_t""no" 1>&6
11243     ;;
11244   esac 
11245 else
11246   echo "$ac_t""no" 1>&6
11247
11248 fi
11249
11250
11251
11252 ###############################################
11253 # test for where we get crypt() from, but only
11254 # if not using PAM
11255 if test "$with_pam" != yes; then
11256 for ac_func in crypt
11257 do
11258 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11259 echo "configure:11260: checking for $ac_func" >&5
11260 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11261   echo $ac_n "(cached) $ac_c" 1>&6
11262 else
11263   cat > conftest.$ac_ext <<EOF
11264 #line 11265 "configure"
11265 #include "confdefs.h"
11266 /* System header to define __stub macros and hopefully few prototypes,
11267     which can conflict with char $ac_func(); below.  */
11268 #include <assert.h>
11269 /* Override any gcc2 internal prototype to avoid an error.  */
11270 /* We use char because int might match the return type of a gcc2
11271     builtin and then its argument prototype would still apply.  */
11272 char $ac_func();
11273
11274 int main() {
11275
11276 /* The GNU C library defines this for functions which it implements
11277     to always fail with ENOSYS.  Some functions are actually named
11278     something starting with __ and the normal name is an alias.  */
11279 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11280 choke me
11281 #else
11282 $ac_func();
11283 #endif
11284
11285 ; return 0; }
11286 EOF
11287 if { (eval echo configure:11288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11288   rm -rf conftest*
11289   eval "ac_cv_func_$ac_func=yes"
11290 else
11291   echo "configure: failed program was:" >&5
11292   cat conftest.$ac_ext >&5
11293   rm -rf conftest*
11294   eval "ac_cv_func_$ac_func=no"
11295 fi
11296 rm -f conftest*
11297 fi
11298
11299 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11300   echo "$ac_t""yes" 1>&6
11301     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11302   cat >> confdefs.h <<EOF
11303 #define $ac_tr_func 1
11304 EOF
11305  
11306 else
11307   echo "$ac_t""no" 1>&6
11308 fi
11309 done
11310
11311 if test x"$ac_cv_func_crypt" = x"no"; then
11312     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11313 echo "configure:11314: checking for crypt in -lcrypt" >&5
11314 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11315 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11316   echo $ac_n "(cached) $ac_c" 1>&6
11317 else
11318   ac_save_LIBS="$LIBS"
11319 LIBS="-lcrypt  $LIBS"
11320 cat > conftest.$ac_ext <<EOF
11321 #line 11322 "configure"
11322 #include "confdefs.h"
11323 /* Override any gcc2 internal prototype to avoid an error.  */
11324 /* We use char because int might match the return type of a gcc2
11325     builtin and then its argument prototype would still apply.  */
11326 char crypt();
11327
11328 int main() {
11329 crypt()
11330 ; return 0; }
11331 EOF
11332 if { (eval echo configure:11333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11333   rm -rf conftest*
11334   eval "ac_cv_lib_$ac_lib_var=yes"
11335 else
11336   echo "configure: failed program was:" >&5
11337   cat conftest.$ac_ext >&5
11338   rm -rf conftest*
11339   eval "ac_cv_lib_$ac_lib_var=no"
11340 fi
11341 rm -f conftest*
11342 LIBS="$ac_save_LIBS"
11343
11344 fi
11345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11346   echo "$ac_t""yes" 1>&6
11347   LIBS="$LIBS -lcrypt";
11348         cat >> confdefs.h <<\EOF
11349 #define HAVE_CRYPT 1
11350 EOF
11351
11352 else
11353   echo "$ac_t""no" 1>&6
11354 fi
11355
11356 fi
11357 fi
11358
11359
11360 #################################################
11361 # check for a TDB password database
11362 echo $ac_n "checking whether to use TDB password database""... $ac_c" 1>&6
11363 echo "configure:11364: checking whether to use TDB password database" >&5
11364 # Check whether --with-tdbsam or --without-tdbsam was given.
11365 if test "${with_tdbsam+set}" = set; then
11366   withval="$with_tdbsam"
11367    case "$withval" in
11368   yes)
11369     echo "$ac_t""yes" 1>&6
11370     cat >> confdefs.h <<\EOF
11371 #define WITH_TDBPWD 1
11372 EOF
11373
11374 #    AC_MSG_ERROR([TDB password database not supported in this version.])
11375     ;;
11376   *)
11377     echo "$ac_t""no" 1>&6
11378     ;;
11379   esac 
11380 else
11381   echo "$ac_t""no" 1>&6
11382
11383 fi
11384
11385
11386 #################################################
11387 # check for a LDAP password database
11388 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
11389 echo "configure:11390: checking whether to use LDAP password database" >&5
11390 # Check whether --with-ldap or --without-ldap was given.
11391 if test "${with_ldap+set}" = set; then
11392   withval="$with_ldap"
11393    case "$withval" in
11394   yes)
11395     echo "$ac_t""yes" 1>&6
11396     cat >> confdefs.h <<\EOF
11397 #define WITH_LDAP 1
11398 EOF
11399
11400     { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
11401     ;;
11402   *)
11403     echo "$ac_t""no" 1>&6
11404     ;;
11405   esac 
11406 else
11407   echo "$ac_t""no" 1>&6
11408
11409 fi
11410
11411
11412 #################################################
11413 # check for a NISPLUS password database
11414 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
11415 echo "configure:11416: checking whether to use NISPLUS password database" >&5
11416 # Check whether --with-nisplus or --without-nisplus was given.
11417 if test "${with_nisplus+set}" = set; then
11418   withval="$with_nisplus"
11419    case "$withval" in
11420   yes)
11421     echo "$ac_t""yes" 1>&6
11422     cat >> confdefs.h <<\EOF
11423 #define WITH_NISPLUS 1
11424 EOF
11425
11426     ;;
11427   *)
11428     echo "$ac_t""no" 1>&6
11429     ;;
11430   esac 
11431 else
11432   echo "$ac_t""no" 1>&6
11433
11434 fi
11435
11436
11437 #################################################
11438 # check for a NISPLUS_HOME support 
11439 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11440 echo "configure:11441: checking whether to use NISPLUS_HOME" >&5
11441 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11442 if test "${with_nisplus_home+set}" = set; then
11443   withval="$with_nisplus_home"
11444    case "$withval" in
11445   yes)
11446     echo "$ac_t""yes" 1>&6
11447     cat >> confdefs.h <<\EOF
11448 #define WITH_NISPLUS_HOME 1
11449 EOF
11450
11451     ;;
11452   *)
11453     echo "$ac_t""no" 1>&6
11454     ;;
11455   esac 
11456 else
11457   echo "$ac_t""no" 1>&6
11458
11459 fi
11460
11461
11462 #################################################
11463 # check for the secure socket layer
11464 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11465 echo "configure:11466: checking whether to use SSL" >&5
11466 # Check whether --with-ssl or --without-ssl was given.
11467 if test "${with_ssl+set}" = set; then
11468   withval="$with_ssl"
11469    case "$withval" in
11470   yes)
11471     echo "$ac_t""yes" 1>&6
11472     cat >> confdefs.h <<\EOF
11473 #define WITH_SSL 1
11474 EOF
11475
11476     withval="/usr/local/ssl"     # default
11477
11478     if test "${with_sslinc+set}" = set; then
11479
11480         withval="$with_sslinc"
11481         case "$withval" in
11482         yes|no)
11483           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11484           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11485           LIBS="-lssl -lcrypto $LIBS"
11486           LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
11487         ;;
11488         * )
11489           CFLAGS="-I${withval} $CFLAGS"
11490           LIBS="-lssl -lcrypto $LIBS"
11491           LDFLAGS="-L${withval}/lib $LDFLAGS"
11492         ;;
11493         esac
11494
11495     else
11496
11497         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11498         LIBS="-lssl -lcrypto $LIBS"
11499         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11500
11501     fi
11502
11503     if test ! -d ${withval}; then
11504       echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
11505       exit 1
11506     fi 
11507
11508     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
11509
11510     ;;
11511   *)
11512     echo "$ac_t""no" 1>&6
11513     ;;
11514   esac 
11515 else
11516   echo "$ac_t""no" 1>&6
11517
11518 fi
11519
11520
11521 #################################################
11522 # check for syslog logging
11523 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
11524 echo "configure:11525: checking whether to use syslog logging" >&5
11525 # Check whether --with-syslog or --without-syslog was given.
11526 if test "${with_syslog+set}" = set; then
11527   withval="$with_syslog"
11528    case "$withval" in
11529   yes)
11530     echo "$ac_t""yes" 1>&6
11531     cat >> confdefs.h <<\EOF
11532 #define WITH_SYSLOG 1
11533 EOF
11534
11535     ;;
11536   *)
11537     echo "$ac_t""no" 1>&6
11538     ;;
11539   esac 
11540 else
11541   echo "$ac_t""no" 1>&6
11542
11543 fi
11544
11545
11546 #################################################
11547 # check for a shared memory profiling support
11548 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
11549 echo "configure:11550: checking whether to use profiling" >&5
11550 # Check whether --with-profile or --without-profile was given.
11551 if test "${with_profile+set}" = set; then
11552   withval="$with_profile"
11553    case "$withval" in
11554   yes)
11555     echo "$ac_t""yes" 1>&6
11556     cat >> confdefs.h <<\EOF
11557 #define WITH_PROFILE 1
11558 EOF
11559
11560     ;;
11561   *)
11562     echo "$ac_t""no" 1>&6
11563     ;;
11564   esac 
11565 else
11566   echo "$ac_t""no" 1>&6
11567
11568 fi
11569
11570
11571
11572 #################################################
11573 # check for experimental netatalk resource fork support
11574 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
11575 echo "configure:11576: checking whether to support netatalk" >&5
11576 # Check whether --with-netatalk or --without-netatalk was given.
11577 if test "${with_netatalk+set}" = set; then
11578   withval="$with_netatalk"
11579    case "$withval" in
11580   yes)
11581     echo "$ac_t""yes" 1>&6
11582     cat >> confdefs.h <<\EOF
11583 #define WITH_NETATALK 1
11584 EOF
11585
11586     ;;
11587   *)
11588     echo "$ac_t""no" 1>&6
11589     ;;
11590   esac 
11591 else
11592   echo "$ac_t""no" 1>&6
11593
11594 fi
11595
11596
11597 #################################################
11598 # check for experimental disk-quotas support
11599 QUOTAOBJS=smbd/noquotas.o
11600
11601 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
11602 echo "configure:11603: checking whether to support disk-quotas" >&5
11603 # Check whether --with-quotas or --without-quotas was given.
11604 if test "${with_quotas+set}" = set; then
11605   withval="$with_quotas"
11606    case "$withval" in
11607   yes)
11608     echo "$ac_t""yes" 1>&6
11609     QUOTAOBJS=smbd/quotas.o
11610     ;;
11611   *)
11612     echo "$ac_t""no" 1>&6
11613     ;;
11614   esac 
11615 else
11616   echo "$ac_t""no" 1>&6
11617
11618 fi
11619
11620
11621
11622 #################################################
11623 # check for experimental utmp accounting
11624
11625 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
11626 echo "configure:11627: checking whether to support utmp accounting" >&5
11627 # Check whether --with-utmp or --without-utmp was given.
11628 if test "${with_utmp+set}" = set; then
11629   withval="$with_utmp"
11630    case "$withval" in
11631   yes)
11632     echo "$ac_t""yes" 1>&6
11633     cat >> confdefs.h <<\EOF
11634 #define WITH_UTMP 1
11635 EOF
11636
11637     ;;
11638   *)
11639     echo "$ac_t""no" 1>&6
11640     ;;
11641   esac 
11642 else
11643   echo "$ac_t""no" 1>&6
11644
11645 fi
11646
11647
11648 #################################################
11649 # check for MS Dfs support
11650
11651 echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
11652 echo "configure:11653: checking whether to support Microsoft Dfs" >&5
11653 # Check whether --with-msdfs or --without-msdfs was given.
11654 if test "${with_msdfs+set}" = set; then
11655   withval="$with_msdfs"
11656    case "$withval" in
11657   yes)
11658      echo "$ac_t""yes" 1>&6
11659      cat >> confdefs.h <<\EOF
11660 #define WITH_MSDFS 1
11661 EOF
11662
11663      ;;
11664   *)
11665     echo "$ac_t""no" 1>&6
11666     ;;
11667   esac 
11668 else
11669   echo "$ac_t""no" 1>&6
11670
11671 fi
11672
11673
11674 #################################################
11675 # set private directory location
11676 # Check whether --with-privatedir or --without-privatedir was given.
11677 if test "${with_privatedir+set}" = set; then
11678   withval="$with_privatedir"
11679    case "$withval" in
11680   yes|no)
11681   #
11682   # Just in case anybody calls it without argument
11683   #
11684     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
11685     privatedir='${prefix}/private'
11686   ;;
11687   * )
11688     privatedir="$withval"
11689     ;;
11690   esac
11691   
11692 else
11693   privatedir='${prefix}/private'
11694    
11695
11696 fi
11697
11698
11699 #################################################
11700 # set lock directory location
11701 # Check whether --with-lockdir or --without-lockdir was given.
11702 if test "${with_lockdir+set}" = set; then
11703   withval="$with_lockdir"
11704    case "$withval" in
11705   yes|no)
11706   #
11707   # Just in case anybody calls it without argument
11708   #
11709     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
11710     lockdir='$(VARDIR)/locks'
11711   ;;
11712   * )
11713     lockdir="$withval"
11714     ;;
11715   esac
11716   
11717 else
11718   lockdir='$(VARDIR)/locks'
11719    
11720
11721 fi
11722
11723
11724 #################################################
11725 # set SWAT directory location
11726 # Check whether --with-swatdir or --without-swatdir was given.
11727 if test "${with_swatdir+set}" = set; then
11728   withval="$with_swatdir"
11729    case "$withval" in
11730   yes|no)
11731   #
11732   # Just in case anybody does it
11733   #
11734     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
11735     swatdir='${prefix}/swat'
11736   ;;
11737   * )
11738     swatdir="$withval"
11739     ;;
11740   esac
11741   
11742 else
11743   swatdir='${prefix}/swat'
11744    
11745
11746 fi
11747
11748
11749 #################################################
11750 # these tests are taken from the GNU fileutils package
11751 echo "checking how to get filesystem space usage" 1>&6
11752 echo "configure:11753: checking how to get filesystem space usage" >&5
11753 space=no
11754
11755 # Test for statvfs64.
11756 if test $space = no; then
11757   # SVR4
11758   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
11759 echo "configure:11760: checking statvfs64 function (SVR4)" >&5
11760 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
11761   echo $ac_n "(cached) $ac_c" 1>&6
11762 else
11763   if test "$cross_compiling" = yes; then
11764   fu_cv_sys_stat_statvfs64=cross
11765 else
11766   cat > conftest.$ac_ext <<EOF
11767 #line 11768 "configure"
11768 #include "confdefs.h"
11769
11770 #if defined(HAVE_UNISTD_H)
11771 #include <unistd.h>
11772 #endif
11773 #include <sys/types.h>
11774 #include <sys/statvfs.h>
11775   main ()
11776   {
11777     struct statvfs64 fsd;
11778     exit (statvfs64 (".", &fsd));
11779   }
11780 EOF
11781 if { (eval echo configure:11782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11782 then
11783   fu_cv_sys_stat_statvfs64=yes
11784 else
11785   echo "configure: failed program was:" >&5
11786   cat conftest.$ac_ext >&5
11787   rm -fr conftest*
11788   fu_cv_sys_stat_statvfs64=no
11789 fi
11790 rm -fr conftest*
11791 fi
11792
11793 fi
11794
11795 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
11796   if test $fu_cv_sys_stat_statvfs64 = yes; then
11797     space=yes
11798     cat >> confdefs.h <<\EOF
11799 #define STAT_STATVFS64 1
11800 EOF
11801
11802   fi
11803 fi
11804
11805 # Perform only the link test since it seems there are no variants of the
11806 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
11807 # because that got a false positive on SCO OSR5.  Adding the declaration
11808 # of a `struct statvfs' causes this test to fail (as it should) on such
11809 # systems.  That system is reported to work fine with STAT_STATFS4 which
11810 # is what it gets when this test fails.
11811 if test $space = no; then
11812   # SVR4
11813   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
11814 echo "configure:11815: checking statvfs function (SVR4)" >&5
11815 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
11816   echo $ac_n "(cached) $ac_c" 1>&6
11817 else
11818   cat > conftest.$ac_ext <<EOF
11819 #line 11820 "configure"
11820 #include "confdefs.h"
11821 #include <sys/types.h>
11822 #include <sys/statvfs.h>
11823 int main() {
11824 struct statvfs fsd; statvfs (0, &fsd);
11825 ; return 0; }
11826 EOF
11827 if { (eval echo configure:11828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11828   rm -rf conftest*
11829   fu_cv_sys_stat_statvfs=yes
11830 else
11831   echo "configure: failed program was:" >&5
11832   cat conftest.$ac_ext >&5
11833   rm -rf conftest*
11834   fu_cv_sys_stat_statvfs=no
11835 fi
11836 rm -f conftest*
11837 fi
11838
11839 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
11840   if test $fu_cv_sys_stat_statvfs = yes; then
11841     space=yes
11842     cat >> confdefs.h <<\EOF
11843 #define STAT_STATVFS 1
11844 EOF
11845
11846   fi
11847 fi
11848
11849 if test $space = no; then
11850   # DEC Alpha running OSF/1
11851   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
11852 echo "configure:11853: checking for 3-argument statfs function (DEC OSF/1)" >&5
11853   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
11854   echo $ac_n "(cached) $ac_c" 1>&6
11855 else
11856   if test "$cross_compiling" = yes; then
11857   fu_cv_sys_stat_statfs3_osf1=no
11858 else
11859   cat > conftest.$ac_ext <<EOF
11860 #line 11861 "configure"
11861 #include "confdefs.h"
11862
11863 #include <sys/param.h>
11864 #include <sys/types.h>
11865 #include <sys/mount.h>
11866   main ()
11867   {
11868     struct statfs fsd;
11869     fsd.f_fsize = 0;
11870     exit (statfs (".", &fsd, sizeof (struct statfs)));
11871   }
11872 EOF
11873 if { (eval echo configure:11874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11874 then
11875   fu_cv_sys_stat_statfs3_osf1=yes
11876 else
11877   echo "configure: failed program was:" >&5
11878   cat conftest.$ac_ext >&5
11879   rm -fr conftest*
11880   fu_cv_sys_stat_statfs3_osf1=no
11881 fi
11882 rm -fr conftest*
11883 fi
11884
11885 fi
11886
11887   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
11888   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
11889     space=yes
11890     cat >> confdefs.h <<\EOF
11891 #define STAT_STATFS3_OSF1 1
11892 EOF
11893
11894   fi
11895 fi
11896
11897 if test $space = no; then
11898 # AIX
11899   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
11900 echo "configure:11901: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
11901   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
11902   echo $ac_n "(cached) $ac_c" 1>&6
11903 else
11904   if test "$cross_compiling" = yes; then
11905   fu_cv_sys_stat_statfs2_bsize=no
11906 else
11907   cat > conftest.$ac_ext <<EOF
11908 #line 11909 "configure"
11909 #include "confdefs.h"
11910
11911 #ifdef HAVE_SYS_PARAM_H
11912 #include <sys/param.h>
11913 #endif
11914 #ifdef HAVE_SYS_MOUNT_H
11915 #include <sys/mount.h>
11916 #endif
11917 #ifdef HAVE_SYS_VFS_H
11918 #include <sys/vfs.h>
11919 #endif
11920   main ()
11921   {
11922   struct statfs fsd;
11923   fsd.f_bsize = 0;
11924   exit (statfs (".", &fsd));
11925   }
11926 EOF
11927 if { (eval echo configure:11928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11928 then
11929   fu_cv_sys_stat_statfs2_bsize=yes
11930 else
11931   echo "configure: failed program was:" >&5
11932   cat conftest.$ac_ext >&5
11933   rm -fr conftest*
11934   fu_cv_sys_stat_statfs2_bsize=no
11935 fi
11936 rm -fr conftest*
11937 fi
11938
11939 fi
11940
11941   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
11942   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
11943     space=yes
11944     cat >> confdefs.h <<\EOF
11945 #define STAT_STATFS2_BSIZE 1
11946 EOF
11947
11948   fi
11949 fi
11950
11951 if test $space = no; then
11952 # SVR3
11953   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
11954 echo "configure:11955: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
11955   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
11956   echo $ac_n "(cached) $ac_c" 1>&6
11957 else
11958   if test "$cross_compiling" = yes; then
11959   fu_cv_sys_stat_statfs4=no
11960 else
11961   cat > conftest.$ac_ext <<EOF
11962 #line 11963 "configure"
11963 #include "confdefs.h"
11964 #include <sys/types.h>
11965 #include <sys/statfs.h>
11966   main ()
11967   {
11968   struct statfs fsd;
11969   exit (statfs (".", &fsd, sizeof fsd, 0));
11970   }
11971 EOF
11972 if { (eval echo configure:11973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11973 then
11974   fu_cv_sys_stat_statfs4=yes
11975 else
11976   echo "configure: failed program was:" >&5
11977   cat conftest.$ac_ext >&5
11978   rm -fr conftest*
11979   fu_cv_sys_stat_statfs4=no
11980 fi
11981 rm -fr conftest*
11982 fi
11983
11984 fi
11985
11986   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
11987   if test $fu_cv_sys_stat_statfs4 = yes; then
11988     space=yes
11989     cat >> confdefs.h <<\EOF
11990 #define STAT_STATFS4 1
11991 EOF
11992
11993   fi
11994 fi
11995
11996 if test $space = no; then
11997 # 4.4BSD and NetBSD
11998   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
11999 echo "configure:12000: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12000   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12001   echo $ac_n "(cached) $ac_c" 1>&6
12002 else
12003   if test "$cross_compiling" = yes; then
12004   fu_cv_sys_stat_statfs2_fsize=no
12005 else
12006   cat > conftest.$ac_ext <<EOF
12007 #line 12008 "configure"
12008 #include "confdefs.h"
12009 #include <sys/types.h>
12010 #ifdef HAVE_SYS_PARAM_H
12011 #include <sys/param.h>
12012 #endif
12013 #ifdef HAVE_SYS_MOUNT_H
12014 #include <sys/mount.h>
12015 #endif
12016   main ()
12017   {
12018   struct statfs fsd;
12019   fsd.f_fsize = 0;
12020   exit (statfs (".", &fsd));
12021   }
12022 EOF
12023 if { (eval echo configure:12024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12024 then
12025   fu_cv_sys_stat_statfs2_fsize=yes
12026 else
12027   echo "configure: failed program was:" >&5
12028   cat conftest.$ac_ext >&5
12029   rm -fr conftest*
12030   fu_cv_sys_stat_statfs2_fsize=no
12031 fi
12032 rm -fr conftest*
12033 fi
12034
12035 fi
12036
12037   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12038   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12039     space=yes
12040     cat >> confdefs.h <<\EOF
12041 #define STAT_STATFS2_FSIZE 1
12042 EOF
12043
12044   fi
12045 fi
12046
12047 if test $space = no; then
12048   # Ultrix
12049   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12050 echo "configure:12051: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12051   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12052   echo $ac_n "(cached) $ac_c" 1>&6
12053 else
12054   if test "$cross_compiling" = yes; then
12055   fu_cv_sys_stat_fs_data=no
12056 else
12057   cat > conftest.$ac_ext <<EOF
12058 #line 12059 "configure"
12059 #include "confdefs.h"
12060 #include <sys/types.h>
12061 #ifdef HAVE_SYS_PARAM_H
12062 #include <sys/param.h>
12063 #endif
12064 #ifdef HAVE_SYS_MOUNT_H
12065 #include <sys/mount.h>
12066 #endif
12067 #ifdef HAVE_SYS_FS_TYPES_H
12068 #include <sys/fs_types.h>
12069 #endif
12070   main ()
12071   {
12072   struct fs_data fsd;
12073   /* Ultrix's statfs returns 1 for success,
12074      0 for not mounted, -1 for failure.  */
12075   exit (statfs (".", &fsd) != 1);
12076   }
12077 EOF
12078 if { (eval echo configure:12079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12079 then
12080   fu_cv_sys_stat_fs_data=yes
12081 else
12082   echo "configure: failed program was:" >&5
12083   cat conftest.$ac_ext >&5
12084   rm -fr conftest*
12085   fu_cv_sys_stat_fs_data=no
12086 fi
12087 rm -fr conftest*
12088 fi
12089
12090 fi
12091
12092   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12093   if test $fu_cv_sys_stat_fs_data = yes; then
12094     space=yes
12095     cat >> confdefs.h <<\EOF
12096 #define STAT_STATFS2_FS_DATA 1
12097 EOF
12098
12099   fi
12100 fi
12101
12102 #
12103 # As a gating factor for large file support, in order to
12104 # use <4GB files we must have the following minimal support
12105 # available.
12106 # long long, and a 64 bit off_t or off64_t.
12107 # If we don't have all of these then disable large
12108 # file support.
12109 #
12110 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12111 echo "configure:12112: checking if large file support can be enabled" >&5
12112 cat > conftest.$ac_ext <<EOF
12113 #line 12114 "configure"
12114 #include "confdefs.h"
12115
12116 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12117 #include <sys/types.h>
12118 #else
12119 __COMPILE_ERROR_
12120 #endif
12121
12122 int main() {
12123 int i
12124 ; return 0; }
12125 EOF
12126 if { (eval echo configure:12127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12127   rm -rf conftest*
12128   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12129 else
12130   echo "configure: failed program was:" >&5
12131   cat conftest.$ac_ext >&5
12132   rm -rf conftest*
12133   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12134 fi
12135 rm -f conftest*
12136 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12137     cat >> confdefs.h <<\EOF
12138 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12139 EOF
12140
12141 fi
12142 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12143
12144 # Check whether --with-spinlocks or --without-spinlocks was given.
12145 if test "${with_spinlocks+set}" = set; then
12146   withval="$with_spinlocks"
12147   :
12148 fi
12149
12150 if test "x$with_spinlocks" = "xyes"; then
12151     cat >> confdefs.h <<\EOF
12152 #define USE_SPINLOCKS 1
12153 EOF
12154
12155
12156     case "$host_cpu" in
12157         sparc)
12158             cat >> confdefs.h <<\EOF
12159 #define SPARC_SPINLOCKS 1
12160 EOF
12161
12162             ;;
12163
12164         i386|i486|i586|i686)
12165             cat >> confdefs.h <<\EOF
12166 #define INTEL_SPINLOCKS 1
12167 EOF
12168
12169             ;;
12170
12171         mips)
12172             cat >> confdefs.h <<\EOF
12173 #define MIPS_SPINLOCKS 1
12174 EOF
12175
12176             ;;
12177
12178         powerpc)
12179             cat >> confdefs.h <<\EOF
12180 #define POWERPC_SPINLOCKS 1
12181 EOF
12182
12183             ;;
12184     esac
12185 fi
12186
12187 #################################################
12188 # check for ACL support
12189
12190 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12191 echo "configure:12192: checking whether to support ACLs" >&5
12192 # Check whether --with-acl-support or --without-acl-support was given.
12193 if test "${with_acl_support+set}" = set; then
12194   withval="$with_acl_support"
12195    case "$withval" in
12196   yes)
12197
12198         case "$host_os" in
12199         *sysv5*)
12200             echo "$ac_t""Using UnixWare ACLs" 1>&6
12201             cat >> confdefs.h <<\EOF
12202 #define HAVE_UNIXWARE_ACLS 1
12203 EOF
12204
12205             ;;
12206         *solaris*)
12207             echo "$ac_t""Using solaris ACLs" 1>&6
12208             cat >> confdefs.h <<\EOF
12209 #define HAVE_SOLARIS_ACLS 1
12210 EOF
12211
12212             ;;
12213                 *irix*)
12214                         echo "$ac_t""Using IRIX ACLs" 1>&6
12215                         cat >> confdefs.h <<\EOF
12216 #define HAVE_IRIX_ACLS 1
12217 EOF
12218
12219                         ;;
12220                 *aix*)
12221                         echo "$ac_t""Using AIX ACLs" 1>&6
12222                         cat >> confdefs.h <<\EOF
12223 #define HAVE_AIX_ACLS 1
12224 EOF
12225
12226                         ;;
12227         *)
12228                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12229 echo "configure:12230: checking for acl_get_file in -lacl" >&5
12230 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12231 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12232   echo $ac_n "(cached) $ac_c" 1>&6
12233 else
12234   ac_save_LIBS="$LIBS"
12235 LIBS="-lacl  $LIBS"
12236 cat > conftest.$ac_ext <<EOF
12237 #line 12238 "configure"
12238 #include "confdefs.h"
12239 /* Override any gcc2 internal prototype to avoid an error.  */
12240 /* We use char because int might match the return type of a gcc2
12241     builtin and then its argument prototype would still apply.  */
12242 char acl_get_file();
12243
12244 int main() {
12245 acl_get_file()
12246 ; return 0; }
12247 EOF
12248 if { (eval echo configure:12249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12249   rm -rf conftest*
12250   eval "ac_cv_lib_$ac_lib_var=yes"
12251 else
12252   echo "configure: failed program was:" >&5
12253   cat conftest.$ac_ext >&5
12254   rm -rf conftest*
12255   eval "ac_cv_lib_$ac_lib_var=no"
12256 fi
12257 rm -f conftest*
12258 LIBS="$ac_save_LIBS"
12259
12260 fi
12261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12262   echo "$ac_t""yes" 1>&6
12263     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12264     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12265   cat >> confdefs.h <<EOF
12266 #define $ac_tr_lib 1
12267 EOF
12268
12269   LIBS="-lacl $LIBS"
12270
12271 else
12272   echo "$ac_t""no" 1>&6
12273 fi
12274
12275                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12276 echo "configure:12277: checking for ACL support" >&5
12277 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12278   echo $ac_n "(cached) $ac_c" 1>&6
12279 else
12280   
12281                         cat > conftest.$ac_ext <<EOF
12282 #line 12283 "configure"
12283 #include "confdefs.h"
12284 #include <sys/types.h>
12285 #include <sys/acl.h>
12286 int main() {
12287  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12288 ; return 0; }
12289 EOF
12290 if { (eval echo configure:12291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12291   rm -rf conftest*
12292   samba_cv_HAVE_POSIX_ACLS=yes
12293 else
12294   echo "configure: failed program was:" >&5
12295   cat conftest.$ac_ext >&5
12296   rm -rf conftest*
12297   samba_cv_HAVE_POSIX_ACLS=no
12298 fi
12299 rm -f conftest*
12300 fi
12301
12302 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12303                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12304                                 echo "$ac_t""Using posix ACLs" 1>&6
12305                                 cat >> confdefs.h <<\EOF
12306 #define HAVE_POSIX_ACLS 1
12307 EOF
12308
12309                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12310 echo "configure:12311: checking for acl_get_perm_np" >&5
12311 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12312   echo $ac_n "(cached) $ac_c" 1>&6
12313 else
12314   
12315                                 cat > conftest.$ac_ext <<EOF
12316 #line 12317 "configure"
12317 #include "confdefs.h"
12318 #include <sys/types.h>
12319 #include <sys/acl.h>
12320 int main() {
12321  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12322 ; return 0; }
12323 EOF
12324 if { (eval echo configure:12325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12325   rm -rf conftest*
12326   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12327 else
12328   echo "configure: failed program was:" >&5
12329   cat conftest.$ac_ext >&5
12330   rm -rf conftest*
12331   samba_cv_HAVE_ACL_GET_PERM_NP=no
12332 fi
12333 rm -f conftest*
12334 fi
12335
12336 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12337                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12338                                         cat >> confdefs.h <<\EOF
12339 #define HAVE_ACL_GET_PERM_NP 1
12340 EOF
12341
12342                                 fi
12343                         fi
12344             ;;
12345         esac
12346         ;;
12347   *)
12348     echo "$ac_t""no" 1>&6
12349     cat >> confdefs.h <<\EOF
12350 #define HAVE_NO_ACLS 1
12351 EOF
12352
12353     ;;
12354   esac 
12355 else
12356   cat >> confdefs.h <<\EOF
12357 #define HAVE_NO_ACLS 1
12358 EOF
12359
12360   echo "$ac_t""no" 1>&6
12361
12362 fi
12363
12364
12365 #################################################
12366 # check whether winbind is supported on this platform
12367
12368 echo $ac_n "checking whether to compile winbind""... $ac_c" 1>&6
12369 echo "configure:12370: checking whether to compile winbind" >&5
12370
12371 case "$host_os" in 
12372         *linux*|*solaris*)
12373                 WINBIND_TARGETS="$WINBIND_TARGETS \$(WINBIND_PROGS)"
12374                 case "$with_pam" in
12375                         yes)
12376                                 WINBIND_TARGETS="$WINBIND_TARGETS \$(WINBIND_PAM_PROGS)"
12377                         ;;
12378                         *)
12379                 esac
12380                 ;;
12381         *)
12382                 winbind_no_reason=", unsupported on $host_os"
12383                 ;;
12384 esac
12385
12386 # Check whether --with-winbind or --without-winbind was given.
12387 if test "${with_winbind+set}" = set; then
12388   withval="$with_winbind"
12389    
12390   case "$withval" in
12391         no)
12392                 WINBIND_TARGETS=""
12393                 winbind_reason=""
12394                 ;;
12395   esac 
12396 fi
12397
12398
12399 if test x"$WINBIND_TARGETS" = x; then
12400         echo "$ac_t""no$winbind_no_reason" 1>&6
12401 else
12402         echo "$ac_t""yes" 1>&6
12403 fi
12404
12405
12406
12407 #################################################
12408 # final configure stuff
12409
12410 echo "checking configure summary"
12411 if test "$cross_compiling" = yes; then
12412   :
12413 else
12414   cat > conftest.$ac_ext <<EOF
12415 #line 12416 "configure"
12416 #include "confdefs.h"
12417 #include "${srcdir-.}/tests/summary.c"
12418 EOF
12419 if { (eval echo configure:12420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12420 then
12421   echo "configure OK";
12422 else
12423   echo "configure: failed program was:" >&5
12424   cat conftest.$ac_ext >&5
12425   rm -fr conftest*
12426   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
12427 fi
12428 rm -fr conftest*
12429 fi
12430
12431
12432 builddir=`pwd`
12433
12434
12435 trap '' 1 2 15
12436 cat > confcache <<\EOF
12437 # This file is a shell script that caches the results of configure
12438 # tests run on this system so they can be shared between configure
12439 # scripts and configure runs.  It is not useful on other systems.
12440 # If it contains results you don't want to keep, you may remove or edit it.
12441 #
12442 # By default, configure uses ./config.cache as the cache file,
12443 # creating it if it does not exist already.  You can give configure
12444 # the --cache-file=FILE option to use a different cache file; that is
12445 # what configure does when it calls configure scripts in
12446 # subdirectories, so they share the cache.
12447 # Giving --cache-file=/dev/null disables caching, for debugging configure.
12448 # config.status only pays attention to the cache file if you give it the
12449 # --recheck option to rerun configure.
12450 #
12451 EOF
12452 # The following way of writing the cache mishandles newlines in values,
12453 # but we know of no workaround that is simple, portable, and efficient.
12454 # So, don't put newlines in cache variables' values.
12455 # Ultrix sh set writes to stderr and can't be redirected directly,
12456 # and sets the high bit in the cache file unless we assign to the vars.
12457 (set) 2>&1 |
12458   case `(ac_space=' '; set | grep ac_space) 2>&1` in
12459   *ac_space=\ *)
12460     # `set' does not quote correctly, so add quotes (double-quote substitution
12461     # turns \\\\ into \\, and sed turns \\ into \).
12462     sed -n \
12463       -e "s/'/'\\\\''/g" \
12464       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
12465     ;;
12466   *)
12467     # `set' quotes correctly as required by POSIX, so do not add quotes.
12468     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
12469     ;;
12470   esac >> confcache
12471 if cmp -s $cache_file confcache; then
12472   :
12473 else
12474   if test -w $cache_file; then
12475     echo "updating cache $cache_file"
12476     cat confcache > $cache_file
12477   else
12478     echo "not updating unwritable cache $cache_file"
12479   fi
12480 fi
12481 rm -f confcache
12482
12483 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12484
12485 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12486 # Let make expand exec_prefix.
12487 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12488
12489 # Any assignment to VPATH causes Sun make to only execute
12490 # the first set of double-colon rules, so remove it if not needed.
12491 # If there is a colon in the path, we need to keep it.
12492 if test "x$srcdir" = x.; then
12493   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12494 fi
12495
12496 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12497
12498 DEFS=-DHAVE_CONFIG_H
12499
12500 # Without the "./", some shells look in PATH for config.status.
12501 : ${CONFIG_STATUS=./config.status}
12502
12503 echo creating $CONFIG_STATUS
12504 rm -f $CONFIG_STATUS
12505 cat > $CONFIG_STATUS <<EOF
12506 #! /bin/sh
12507 # Generated automatically by configure.
12508 # Run this file to recreate the current configuration.
12509 # This directory was configured as follows,
12510 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12511 #
12512 # $0 $ac_configure_args
12513 #
12514 # Compiler output produced by configure, useful for debugging
12515 # configure, is in ./config.log if it exists.
12516
12517 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12518 for ac_option
12519 do
12520   case "\$ac_option" in
12521   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12522     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12523     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12524   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12525     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12526     exit 0 ;;
12527   -help | --help | --hel | --he | --h)
12528     echo "\$ac_cs_usage"; exit 0 ;;
12529   *) echo "\$ac_cs_usage"; exit 1 ;;
12530   esac
12531 done
12532
12533 ac_given_srcdir=$srcdir
12534 ac_given_INSTALL="$INSTALL"
12535
12536 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12537 EOF
12538 cat >> $CONFIG_STATUS <<EOF
12539
12540 # Protect against being on the right side of a sed subst in config.status.
12541 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12542  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12543 $ac_vpsub
12544 $extrasub
12545 s%@SHELL@%$SHELL%g
12546 s%@CFLAGS@%$CFLAGS%g
12547 s%@CPPFLAGS@%$CPPFLAGS%g
12548 s%@CXXFLAGS@%$CXXFLAGS%g
12549 s%@FFLAGS@%$FFLAGS%g
12550 s%@DEFS@%$DEFS%g
12551 s%@LDFLAGS@%$LDFLAGS%g
12552 s%@LIBS@%$LIBS%g
12553 s%@exec_prefix@%$exec_prefix%g
12554 s%@prefix@%$prefix%g
12555 s%@program_transform_name@%$program_transform_name%g
12556 s%@bindir@%$bindir%g
12557 s%@sbindir@%$sbindir%g
12558 s%@libexecdir@%$libexecdir%g
12559 s%@datadir@%$datadir%g
12560 s%@sysconfdir@%$sysconfdir%g
12561 s%@sharedstatedir@%$sharedstatedir%g
12562 s%@localstatedir@%$localstatedir%g
12563 s%@libdir@%$libdir%g
12564 s%@includedir@%$includedir%g
12565 s%@oldincludedir@%$oldincludedir%g
12566 s%@infodir@%$infodir%g
12567 s%@mandir@%$mandir%g
12568 s%@RUNPROG@%$RUNPROG%g
12569 s%@MPROGS@%$MPROGS%g
12570 s%@LDSHFLAGS@%$LDSHFLAGS%g
12571 s%@HOST_OS@%$HOST_OS%g
12572 s%@PAM_MOD@%$PAM_MOD%g
12573 s%@WRAP@%$WRAP%g
12574 s%@WRAP32@%$WRAP32%g
12575 s%@PICFLAG@%$PICFLAG%g
12576 s%@SHLIBEXT@%$SHLIBEXT%g
12577 s%@BLDSHARED@%$BLDSHARED%g
12578 s%@CC@%$CC%g
12579 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12580 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12581 s%@INSTALL_DATA@%$INSTALL_DATA%g
12582 s%@AWK@%$AWK%g
12583 s%@BROKEN_CC@%$BROKEN_CC%g
12584 s%@host@%$host%g
12585 s%@host_alias@%$host_alias%g
12586 s%@host_cpu@%$host_cpu%g
12587 s%@host_vendor@%$host_vendor%g
12588 s%@host_os@%$host_os%g
12589 s%@target@%$target%g
12590 s%@target_alias@%$target_alias%g
12591 s%@target_cpu@%$target_cpu%g
12592 s%@target_vendor@%$target_vendor%g
12593 s%@target_os@%$target_os%g
12594 s%@build@%$build%g
12595 s%@build_alias@%$build_alias%g
12596 s%@build_cpu@%$build_cpu%g
12597 s%@build_vendor@%$build_vendor%g
12598 s%@build_os@%$build_os%g
12599 s%@CPP@%$CPP%g
12600 s%@LIBOBJS@%$LIBOBJS%g
12601 s%@TERMLIBS@%$TERMLIBS%g
12602 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
12603 s%@ROFF@%$ROFF%g
12604 s%@QUOTAOBJS@%$QUOTAOBJS%g
12605 s%@privatedir@%$privatedir%g
12606 s%@lockdir@%$lockdir%g
12607 s%@swatdir@%$swatdir%g
12608 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
12609 s%@builddir@%$builddir%g
12610
12611 CEOF
12612 EOF
12613
12614 cat >> $CONFIG_STATUS <<\EOF
12615
12616 # Split the substitutions into bite-sized pieces for seds with
12617 # small command number limits, like on Digital OSF/1 and HP-UX.
12618 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12619 ac_file=1 # Number of current file.
12620 ac_beg=1 # First line for current file.
12621 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12622 ac_more_lines=:
12623 ac_sed_cmds=""
12624 while $ac_more_lines; do
12625   if test $ac_beg -gt 1; then
12626     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12627   else
12628     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12629   fi
12630   if test ! -s conftest.s$ac_file; then
12631     ac_more_lines=false
12632     rm -f conftest.s$ac_file
12633   else
12634     if test -z "$ac_sed_cmds"; then
12635       ac_sed_cmds="sed -f conftest.s$ac_file"
12636     else
12637       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12638     fi
12639     ac_file=`expr $ac_file + 1`
12640     ac_beg=$ac_end
12641     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12642   fi
12643 done
12644 if test -z "$ac_sed_cmds"; then
12645   ac_sed_cmds=cat
12646 fi
12647 EOF
12648
12649 cat >> $CONFIG_STATUS <<EOF
12650
12651 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
12652 EOF
12653 cat >> $CONFIG_STATUS <<\EOF
12654 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12655   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12656   case "$ac_file" in
12657   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12658        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12659   *) ac_file_in="${ac_file}.in" ;;
12660   esac
12661
12662   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12663
12664   # Remove last slash and all that follows it.  Not all systems have dirname.
12665   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12666   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12667     # The file is in a subdirectory.
12668     test ! -d "$ac_dir" && mkdir "$ac_dir"
12669     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12670     # A "../" for each directory in $ac_dir_suffix.
12671     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12672   else
12673     ac_dir_suffix= ac_dots=
12674   fi
12675
12676   case "$ac_given_srcdir" in
12677   .)  srcdir=.
12678       if test -z "$ac_dots"; then top_srcdir=.
12679       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12680   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12681   *) # Relative path.
12682     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12683     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12684   esac
12685
12686   case "$ac_given_INSTALL" in
12687   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12688   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12689   esac
12690
12691   echo creating "$ac_file"
12692   rm -f "$ac_file"
12693   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12694   case "$ac_file" in
12695   *Makefile*) ac_comsub="1i\\
12696 # $configure_input" ;;
12697   *) ac_comsub= ;;
12698   esac
12699
12700   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12701   sed -e "$ac_comsub
12702 s%@configure_input@%$configure_input%g
12703 s%@srcdir@%$srcdir%g
12704 s%@top_srcdir@%$top_srcdir%g
12705 s%@INSTALL@%$INSTALL%g
12706 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12707 fi; done
12708 rm -f conftest.s*
12709
12710 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12711 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12712 #
12713 # ac_d sets the value in "#define NAME VALUE" lines.
12714 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12715 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12716 ac_dC='\3'
12717 ac_dD='%g'
12718 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12719 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12720 ac_uB='\([      ]\)%\1#\2define\3'
12721 ac_uC=' '
12722 ac_uD='\4%g'
12723 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12724 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12725 ac_eB='$%\1#\2define\3'
12726 ac_eC=' '
12727 ac_eD='%g'
12728
12729 if test "${CONFIG_HEADERS+set}" != set; then
12730 EOF
12731 cat >> $CONFIG_STATUS <<EOF
12732   CONFIG_HEADERS="include/config.h"
12733 EOF
12734 cat >> $CONFIG_STATUS <<\EOF
12735 fi
12736 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12737   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12738   case "$ac_file" in
12739   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12740        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12741   *) ac_file_in="${ac_file}.in" ;;
12742   esac
12743
12744   echo creating $ac_file
12745
12746   rm -f conftest.frag conftest.in conftest.out
12747   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12748   cat $ac_file_inputs > conftest.in
12749
12750 EOF
12751
12752 # Transform confdefs.h into a sed script conftest.vals that substitutes
12753 # the proper values into config.h.in to produce config.h.  And first:
12754 # Protect against being on the right side of a sed subst in config.status.
12755 # Protect against being in an unquoted here document in config.status.
12756 rm -f conftest.vals
12757 cat > conftest.hdr <<\EOF
12758 s/[\\&%]/\\&/g
12759 s%[\\$`]%\\&%g
12760 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12761 s%ac_d%ac_u%gp
12762 s%ac_u%ac_e%gp
12763 EOF
12764 sed -n -f conftest.hdr confdefs.h > conftest.vals
12765 rm -f conftest.hdr
12766
12767 # This sed command replaces #undef with comments.  This is necessary, for
12768 # example, in the case of _POSIX_SOURCE, which is predefined and required
12769 # on some systems where configure will not decide to define it.
12770 cat >> conftest.vals <<\EOF
12771 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12772 EOF
12773
12774 # Break up conftest.vals because some shells have a limit on
12775 # the size of here documents, and old seds have small limits too.
12776
12777 rm -f conftest.tail
12778 while :
12779 do
12780   ac_lines=`grep -c . conftest.vals`
12781   # grep -c gives empty output for an empty file on some AIX systems.
12782   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12783   # Write a limited-size here document to conftest.frag.
12784   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12785   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12786   echo 'CEOF
12787   sed -f conftest.frag conftest.in > conftest.out
12788   rm -f conftest.in
12789   mv conftest.out conftest.in
12790 ' >> $CONFIG_STATUS
12791   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12792   rm -f conftest.vals
12793   mv conftest.tail conftest.vals
12794 done
12795 rm -f conftest.vals
12796
12797 cat >> $CONFIG_STATUS <<\EOF
12798   rm -f conftest.frag conftest.h
12799   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12800   cat conftest.in >> conftest.h
12801   rm -f conftest.in
12802   if cmp -s $ac_file conftest.h 2>/dev/null; then
12803     echo "$ac_file is unchanged"
12804     rm -f conftest.h
12805   else
12806     # Remove last slash and all that follows it.  Not all systems have dirname.
12807       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12808       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12809       # The file is in a subdirectory.
12810       test ! -d "$ac_dir" && mkdir "$ac_dir"
12811     fi
12812     rm -f $ac_file
12813     mv conftest.h $ac_file
12814   fi
12815 fi; done
12816
12817 EOF
12818 cat >> $CONFIG_STATUS <<EOF
12819
12820 EOF
12821 cat >> $CONFIG_STATUS <<\EOF
12822
12823 exit 0
12824 EOF
12825 chmod +x $CONFIG_STATUS
12826 rm -fr confdefs* $ac_clean_files
12827 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
12828