trailing backslashes spotted by andrej.
[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.12 
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-maintainer-mode enable some make rules for maintainers"
17 ac_help="$ac_help
18   --with-smbwrapper     Include SMB wrapper support
19   --without-smbwrapper  Don't include SMB wrapper support (default)"
20 ac_help="$ac_help
21   --with-afs     Include AFS support
22   --without-afs  Don't include AFS support (default)"
23 ac_help="$ac_help
24   --with-dfs     Include DFS support
25   --without-dfs  Don't include DFS support (default)"
26 ac_help="$ac_help
27   --with-krb4=base-dir     Include Kerberos IV support
28   --whithout-krb4          Don't include Kerbers IV support (default)"
29 ac_help="$ac_help
30   --with-automount     Include AUTOMOUNT support
31   --without-automount  Don't include AUTOMOUNT support (default)"
32 ac_help="$ac_help
33   --with-smbmount     Include SMBMOUNT (Linux only) support
34   --without-smbmount  Don't include SMBMOUNT support (default)"
35 ac_help="$ac_help
36   --with-ldap     Include LDAP support
37   --without-ldap  Don't include LDAP support (default)"
38 ac_help="$ac_help
39   --with-nisplus     Include NISPLUS password database support
40   --without-nisplus  Don't include NISPLUS password database support (default)"
41 ac_help="$ac_help
42   --with-nisplus-home     Include NISPLUS_HOME support
43   --without-nisplus-home  Don't include NISPLUS_HOME support (default)"
44 ac_help="$ac_help
45   --with-ssl     Include SSL support
46   --without-ssl  Don't include SSL support (default)"
47 ac_help="$ac_help
48   --with-mmap     Include experimental MMAP support
49   --without-mmap  Don't include MMAP support (default)"
50 ac_help="$ac_help
51   --with-syslog     Include experimental SYSLOG support
52   --without-syslog  Don't include SYSLOG support (default)"
53 ac_help="$ac_help
54   --with-netatalk     Include experimental Netatalk support
55   --without-netatalk  Don't include experimental Netatalk support (default)"
56 ac_help="$ac_help
57   --with-quotas     Include experimental disk-quota support
58   --without-quotas  Don't include experimental disk-quota support (default)"
59
60 # Initialize some variables set by options.
61 # The variables have the same names as the options, with
62 # dashes changed to underlines.
63 build=NONE
64 cache_file=./config.cache
65 exec_prefix=NONE
66 host=NONE
67 no_create=
68 nonopt=NONE
69 no_recursion=
70 prefix=NONE
71 program_prefix=NONE
72 program_suffix=NONE
73 program_transform_name=s,x,x,
74 silent=
75 site=
76 srcdir=
77 target=NONE
78 verbose=
79 x_includes=NONE
80 x_libraries=NONE
81 bindir='${exec_prefix}/bin'
82 sbindir='${exec_prefix}/sbin'
83 libexecdir='${exec_prefix}/libexec'
84 datadir='${prefix}/share'
85 sysconfdir='${prefix}/etc'
86 sharedstatedir='${prefix}/com'
87 localstatedir='${prefix}/var'
88 libdir='${exec_prefix}/lib'
89 includedir='${prefix}/include'
90 oldincludedir='/usr/include'
91 infodir='${prefix}/info'
92 mandir='${prefix}/man'
93
94 # Initialize some other variables.
95 subdirs=
96 MFLAGS= MAKEFLAGS=
97 # Maximum number of lines to put in a shell here document.
98 ac_max_here_lines=12
99
100 ac_prev=
101 for ac_option
102 do
103
104   # If the previous option needs an argument, assign it.
105   if test -n "$ac_prev"; then
106     eval "$ac_prev=\$ac_option"
107     ac_prev=
108     continue
109   fi
110
111   case "$ac_option" in
112   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
113   *) ac_optarg= ;;
114   esac
115
116   # Accept the important Cygnus configure options, so we can diagnose typos.
117
118   case "$ac_option" in
119
120   -bindir | --bindir | --bindi | --bind | --bin | --bi)
121     ac_prev=bindir ;;
122   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
123     bindir="$ac_optarg" ;;
124
125   -build | --build | --buil | --bui | --bu)
126     ac_prev=build ;;
127   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
128     build="$ac_optarg" ;;
129
130   -cache-file | --cache-file | --cache-fil | --cache-fi \
131   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
132     ac_prev=cache_file ;;
133   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
134   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
135     cache_file="$ac_optarg" ;;
136
137   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
138     ac_prev=datadir ;;
139   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
140   | --da=*)
141     datadir="$ac_optarg" ;;
142
143   -disable-* | --disable-*)
144     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
145     # Reject names that are not valid shell variable names.
146     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
147       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
148     fi
149     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
150     eval "enable_${ac_feature}=no" ;;
151
152   -enable-* | --enable-*)
153     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
154     # Reject names that are not valid shell variable names.
155     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
156       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
157     fi
158     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
159     case "$ac_option" in
160       *=*) ;;
161       *) ac_optarg=yes ;;
162     esac
163     eval "enable_${ac_feature}='$ac_optarg'" ;;
164
165   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
166   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
167   | --exec | --exe | --ex)
168     ac_prev=exec_prefix ;;
169   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
170   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
171   | --exec=* | --exe=* | --ex=*)
172     exec_prefix="$ac_optarg" ;;
173
174   -gas | --gas | --ga | --g)
175     # Obsolete; use --with-gas.
176     with_gas=yes ;;
177
178   -help | --help | --hel | --he)
179     # Omit some internal or obsolete options to make the list less imposing.
180     # This message is too long to be a string in the A/UX 3.1 sh.
181     cat << EOF
182 Usage: configure [options] [host]
183 Options: [defaults in brackets after descriptions]
184 Configuration:
185   --cache-file=FILE       cache test results in FILE
186   --help                  print this message
187   --no-create             do not create output files
188   --quiet, --silent       do not print \`checking...' messages
189   --version               print the version of autoconf that created configure
190 Directory and file names:
191   --prefix=PREFIX         install architecture-independent files in PREFIX
192                           [$ac_default_prefix]
193   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
194                           [same as prefix]
195   --bindir=DIR            user executables in DIR [EPREFIX/bin]
196   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
197   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
198   --datadir=DIR           read-only architecture-independent data in DIR
199                           [PREFIX/share]
200   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
201   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
202                           [PREFIX/com]
203   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
204   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
205   --includedir=DIR        C header files in DIR [PREFIX/include]
206   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
207   --infodir=DIR           info documentation in DIR [PREFIX/info]
208   --mandir=DIR            man documentation in DIR [PREFIX/man]
209   --srcdir=DIR            find the sources in DIR [configure dir or ..]
210   --program-prefix=PREFIX prepend PREFIX to installed program names
211   --program-suffix=SUFFIX append SUFFIX to installed program names
212   --program-transform-name=PROGRAM
213                           run sed PROGRAM on installed program names
214 EOF
215     cat << EOF
216 Host type:
217   --build=BUILD           configure for building on BUILD [BUILD=HOST]
218   --host=HOST             configure for HOST [guessed]
219   --target=TARGET         configure for TARGET [TARGET=HOST]
220 Features and packages:
221   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
222   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
223   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
224   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
225   --x-includes=DIR        X include files are in DIR
226   --x-libraries=DIR       X library files are in DIR
227 EOF
228     if test -n "$ac_help"; then
229       echo "--enable and --with options recognized:$ac_help"
230     fi
231     exit 0 ;;
232
233   -host | --host | --hos | --ho)
234     ac_prev=host ;;
235   -host=* | --host=* | --hos=* | --ho=*)
236     host="$ac_optarg" ;;
237
238   -includedir | --includedir | --includedi | --included | --include \
239   | --includ | --inclu | --incl | --inc)
240     ac_prev=includedir ;;
241   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
242   | --includ=* | --inclu=* | --incl=* | --inc=*)
243     includedir="$ac_optarg" ;;
244
245   -infodir | --infodir | --infodi | --infod | --info | --inf)
246     ac_prev=infodir ;;
247   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
248     infodir="$ac_optarg" ;;
249
250   -libdir | --libdir | --libdi | --libd)
251     ac_prev=libdir ;;
252   -libdir=* | --libdir=* | --libdi=* | --libd=*)
253     libdir="$ac_optarg" ;;
254
255   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
256   | --libexe | --libex | --libe)
257     ac_prev=libexecdir ;;
258   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
259   | --libexe=* | --libex=* | --libe=*)
260     libexecdir="$ac_optarg" ;;
261
262   -localstatedir | --localstatedir | --localstatedi | --localstated \
263   | --localstate | --localstat | --localsta | --localst \
264   | --locals | --local | --loca | --loc | --lo)
265     ac_prev=localstatedir ;;
266   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
267   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
268   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
269     localstatedir="$ac_optarg" ;;
270
271   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
272     ac_prev=mandir ;;
273   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
274     mandir="$ac_optarg" ;;
275
276   -nfp | --nfp | --nf)
277     # Obsolete; use --without-fp.
278     with_fp=no ;;
279
280   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
281   | --no-cr | --no-c)
282     no_create=yes ;;
283
284   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
285   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
286     no_recursion=yes ;;
287
288   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
289   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
290   | --oldin | --oldi | --old | --ol | --o)
291     ac_prev=oldincludedir ;;
292   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
293   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
294   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
295     oldincludedir="$ac_optarg" ;;
296
297   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
298     ac_prev=prefix ;;
299   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
300     prefix="$ac_optarg" ;;
301
302   -program-prefix | --program-prefix | --program-prefi | --program-pref \
303   | --program-pre | --program-pr | --program-p)
304     ac_prev=program_prefix ;;
305   -program-prefix=* | --program-prefix=* | --program-prefi=* \
306   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
307     program_prefix="$ac_optarg" ;;
308
309   -program-suffix | --program-suffix | --program-suffi | --program-suff \
310   | --program-suf | --program-su | --program-s)
311     ac_prev=program_suffix ;;
312   -program-suffix=* | --program-suffix=* | --program-suffi=* \
313   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
314     program_suffix="$ac_optarg" ;;
315
316   -program-transform-name | --program-transform-name \
317   | --program-transform-nam | --program-transform-na \
318   | --program-transform-n | --program-transform- \
319   | --program-transform | --program-transfor \
320   | --program-transfo | --program-transf \
321   | --program-trans | --program-tran \
322   | --progr-tra | --program-tr | --program-t)
323     ac_prev=program_transform_name ;;
324   -program-transform-name=* | --program-transform-name=* \
325   | --program-transform-nam=* | --program-transform-na=* \
326   | --program-transform-n=* | --program-transform-=* \
327   | --program-transform=* | --program-transfor=* \
328   | --program-transfo=* | --program-transf=* \
329   | --program-trans=* | --program-tran=* \
330   | --progr-tra=* | --program-tr=* | --program-t=*)
331     program_transform_name="$ac_optarg" ;;
332
333   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
334   | -silent | --silent | --silen | --sile | --sil)
335     silent=yes ;;
336
337   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
338     ac_prev=sbindir ;;
339   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
340   | --sbi=* | --sb=*)
341     sbindir="$ac_optarg" ;;
342
343   -sharedstatedir | --sharedstatedir | --sharedstatedi \
344   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
345   | --sharedst | --shareds | --shared | --share | --shar \
346   | --sha | --sh)
347     ac_prev=sharedstatedir ;;
348   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
349   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
350   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
351   | --sha=* | --sh=*)
352     sharedstatedir="$ac_optarg" ;;
353
354   -site | --site | --sit)
355     ac_prev=site ;;
356   -site=* | --site=* | --sit=*)
357     site="$ac_optarg" ;;
358
359   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
360     ac_prev=srcdir ;;
361   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
362     srcdir="$ac_optarg" ;;
363
364   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
365   | --syscon | --sysco | --sysc | --sys | --sy)
366     ac_prev=sysconfdir ;;
367   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
368   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
369     sysconfdir="$ac_optarg" ;;
370
371   -target | --target | --targe | --targ | --tar | --ta | --t)
372     ac_prev=target ;;
373   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
374     target="$ac_optarg" ;;
375
376   -v | -verbose | --verbose | --verbos | --verbo | --verb)
377     verbose=yes ;;
378
379   -version | --version | --versio | --versi | --vers)
380     echo "configure generated by autoconf version 2.12"
381     exit 0 ;;
382
383   -with-* | --with-*)
384     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
385     # Reject names that are not valid shell variable names.
386     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
387       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
388     fi
389     ac_package=`echo $ac_package| sed 's/-/_/g'`
390     case "$ac_option" in
391       *=*) ;;
392       *) ac_optarg=yes ;;
393     esac
394     eval "with_${ac_package}='$ac_optarg'" ;;
395
396   -without-* | --without-*)
397     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
398     # Reject names that are not valid shell variable names.
399     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
400       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
401     fi
402     ac_package=`echo $ac_package| sed 's/-/_/g'`
403     eval "with_${ac_package}=no" ;;
404
405   --x)
406     # Obsolete; use --with-x.
407     with_x=yes ;;
408
409   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
410   | --x-incl | --x-inc | --x-in | --x-i)
411     ac_prev=x_includes ;;
412   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
413   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
414     x_includes="$ac_optarg" ;;
415
416   -x-libraries | --x-libraries | --x-librarie | --x-librari \
417   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
418     ac_prev=x_libraries ;;
419   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
420   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
421     x_libraries="$ac_optarg" ;;
422
423   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
424     ;;
425
426   *)
427     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
428       echo "configure: warning: $ac_option: invalid host type" 1>&2
429     fi
430     if test "x$nonopt" != xNONE; then
431       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
432     fi
433     nonopt="$ac_option"
434     ;;
435
436   esac
437 done
438
439 if test -n "$ac_prev"; then
440   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
441 fi
442
443 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
444
445 # File descriptor usage:
446 # 0 standard input
447 # 1 file creation
448 # 2 errors and warnings
449 # 3 some systems may open it to /dev/tty
450 # 4 used on the Kubota Titan
451 # 6 checking for... messages and results
452 # 5 compiler messages saved in config.log
453 if test "$silent" = yes; then
454   exec 6>/dev/null
455 else
456   exec 6>&1
457 fi
458 exec 5>./config.log
459
460 echo "\
461 This file contains any messages produced by compilers while
462 running configure, to aid debugging if configure makes a mistake.
463 " 1>&5
464
465 # Strip out --no-create and --no-recursion so they do not pile up.
466 # Also quote any args containing shell metacharacters.
467 ac_configure_args=
468 for ac_arg
469 do
470   case "$ac_arg" in
471   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
472   | --no-cr | --no-c) ;;
473   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
474   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
475   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
476   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
477   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
478   esac
479 done
480
481 # NLS nuisances.
482 # Only set these to C if already set.  These must not be set unconditionally
483 # because not all systems understand e.g. LANG=C (notably SCO).
484 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
485 # Non-C LC_CTYPE values break the ctype check.
486 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
487 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
488 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
489 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
490
491 # confdefs.h avoids OS command line length limits that DEFS can exceed.
492 rm -rf conftest* confdefs.h
493 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
494 echo > confdefs.h
495
496 # A filename unique to this package, relative to the directory that
497 # configure is in, which we can look for to find out if srcdir is correct.
498 ac_unique_file=include/includes.h
499
500 # Find the source files, if location was not specified.
501 if test -z "$srcdir"; then
502   ac_srcdir_defaulted=yes
503   # Try the directory containing this script, then its parent.
504   ac_prog=$0
505   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
506   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
507   srcdir=$ac_confdir
508   if test ! -r $srcdir/$ac_unique_file; then
509     srcdir=..
510   fi
511 else
512   ac_srcdir_defaulted=no
513 fi
514 if test ! -r $srcdir/$ac_unique_file; then
515   if test "$ac_srcdir_defaulted" = yes; then
516     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
517   else
518     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
519   fi
520 fi
521 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
522
523 # Prefer explicitly selected file to automatically selected ones.
524 if test -z "$CONFIG_SITE"; then
525   if test "x$prefix" != xNONE; then
526     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
527   else
528     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
529   fi
530 fi
531 for ac_site_file in $CONFIG_SITE; do
532   if test -r "$ac_site_file"; then
533     echo "loading site script $ac_site_file"
534     . "$ac_site_file"
535   fi
536 done
537
538 if test -r "$cache_file"; then
539   echo "loading cache $cache_file"
540   . $cache_file
541 else
542   echo "creating cache $cache_file"
543   > $cache_file
544 fi
545
546 ac_ext=c
547 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
548 ac_cpp='$CPP $CPPFLAGS'
549 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
550 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
551 cross_compiling=$ac_cv_prog_cc_cross
552
553 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
554   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
555   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
556     ac_n= ac_c='
557 ' ac_t='        '
558   else
559     ac_n=-n ac_c= ac_t=
560   fi
561 else
562   ac_n= ac_c='\c' ac_t=
563 fi
564
565
566
567 # we want to be compatibe with older versions of Samba
568
569
570
571
572
573
574
575
576
577
578 # compile with optimisation and without debugging by default
579 CFLAGS=${CFLAGS-"-O"}
580
581 # Extract the first word of "gcc", so it can be a program name with args.
582 set dummy gcc; ac_word=$2
583 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
584 echo "configure:585: checking for $ac_word" >&5
585 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
586   echo $ac_n "(cached) $ac_c" 1>&6
587 else
588   if test -n "$CC"; then
589   ac_cv_prog_CC="$CC" # Let the user override the test.
590 else
591   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
592   for ac_dir in $PATH; do
593     test -z "$ac_dir" && ac_dir=.
594     if test -f $ac_dir/$ac_word; then
595       ac_cv_prog_CC="gcc"
596       break
597     fi
598   done
599   IFS="$ac_save_ifs"
600 fi
601 fi
602 CC="$ac_cv_prog_CC"
603 if test -n "$CC"; then
604   echo "$ac_t""$CC" 1>&6
605 else
606   echo "$ac_t""no" 1>&6
607 fi
608
609 if test -z "$CC"; then
610   # Extract the first word of "cc", so it can be a program name with args.
611 set dummy cc; ac_word=$2
612 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
613 echo "configure:614: checking for $ac_word" >&5
614 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
615   echo $ac_n "(cached) $ac_c" 1>&6
616 else
617   if test -n "$CC"; then
618   ac_cv_prog_CC="$CC" # Let the user override the test.
619 else
620   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
621   ac_prog_rejected=no
622   for ac_dir in $PATH; do
623     test -z "$ac_dir" && ac_dir=.
624     if test -f $ac_dir/$ac_word; then
625       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
626         ac_prog_rejected=yes
627         continue
628       fi
629       ac_cv_prog_CC="cc"
630       break
631     fi
632   done
633   IFS="$ac_save_ifs"
634 if test $ac_prog_rejected = yes; then
635   # We found a bogon in the path, so make sure we never use it.
636   set dummy $ac_cv_prog_CC
637   shift
638   if test $# -gt 0; then
639     # We chose a different compiler from the bogus one.
640     # However, it has the same basename, so the bogon will be chosen
641     # first if we set CC to just the basename; use the full file name.
642     shift
643     set dummy "$ac_dir/$ac_word" "$@"
644     shift
645     ac_cv_prog_CC="$@"
646   fi
647 fi
648 fi
649 fi
650 CC="$ac_cv_prog_CC"
651 if test -n "$CC"; then
652   echo "$ac_t""$CC" 1>&6
653 else
654   echo "$ac_t""no" 1>&6
655 fi
656
657   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
658 fi
659
660 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
661 echo "configure:662: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
662
663 ac_ext=c
664 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
665 ac_cpp='$CPP $CPPFLAGS'
666 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
667 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
668 cross_compiling=$ac_cv_prog_cc_cross
669
670 cat > conftest.$ac_ext <<EOF
671 #line 672 "configure"
672 #include "confdefs.h"
673 main(){return(0);}
674 EOF
675 if { (eval echo configure:676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
676   ac_cv_prog_cc_works=yes
677   # If we can't run a trivial program, we are probably using a cross compiler.
678   if (./conftest; exit) 2>/dev/null; then
679     ac_cv_prog_cc_cross=no
680   else
681     ac_cv_prog_cc_cross=yes
682   fi
683 else
684   echo "configure: failed program was:" >&5
685   cat conftest.$ac_ext >&5
686   ac_cv_prog_cc_works=no
687 fi
688 rm -fr conftest*
689
690 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
691 if test $ac_cv_prog_cc_works = no; then
692   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
693 fi
694 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
695 echo "configure:696: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
696 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
697 cross_compiling=$ac_cv_prog_cc_cross
698
699 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
700 echo "configure:701: checking whether we are using GNU C" >&5
701 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
702   echo $ac_n "(cached) $ac_c" 1>&6
703 else
704   cat > conftest.c <<EOF
705 #ifdef __GNUC__
706   yes;
707 #endif
708 EOF
709 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
710   ac_cv_prog_gcc=yes
711 else
712   ac_cv_prog_gcc=no
713 fi
714 fi
715
716 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
717
718 if test $ac_cv_prog_gcc = yes; then
719   GCC=yes
720   ac_test_CFLAGS="${CFLAGS+set}"
721   ac_save_CFLAGS="$CFLAGS"
722   CFLAGS=
723   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
724 echo "configure:725: checking whether ${CC-cc} accepts -g" >&5
725 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
726   echo $ac_n "(cached) $ac_c" 1>&6
727 else
728   echo 'void f(){}' > conftest.c
729 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
730   ac_cv_prog_cc_g=yes
731 else
732   ac_cv_prog_cc_g=no
733 fi
734 rm -f conftest*
735
736 fi
737
738 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
739   if test "$ac_test_CFLAGS" = set; then
740     CFLAGS="$ac_save_CFLAGS"
741   elif test $ac_cv_prog_cc_g = yes; then
742     CFLAGS="-g -O2"
743   else
744     CFLAGS="-O2"
745   fi
746 else
747   GCC=
748   test "${CFLAGS+set}" = set || CFLAGS="-g"
749 fi
750
751 ac_aux_dir=
752 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
753   if test -f $ac_dir/install-sh; then
754     ac_aux_dir=$ac_dir
755     ac_install_sh="$ac_aux_dir/install-sh -c"
756     break
757   elif test -f $ac_dir/install.sh; then
758     ac_aux_dir=$ac_dir
759     ac_install_sh="$ac_aux_dir/install.sh -c"
760     break
761   fi
762 done
763 if test -z "$ac_aux_dir"; then
764   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
765 fi
766 ac_config_guess=$ac_aux_dir/config.guess
767 ac_config_sub=$ac_aux_dir/config.sub
768 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
769
770 # Find a good install program.  We prefer a C program (faster),
771 # so one script is as good as another.  But avoid the broken or
772 # incompatible versions:
773 # SysV /etc/install, /usr/sbin/install
774 # SunOS /usr/etc/install
775 # IRIX /sbin/install
776 # AIX /bin/install
777 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
778 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
779 # ./install, which can be erroneously created by make from ./install.sh.
780 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
781 echo "configure:782: checking for a BSD compatible install" >&5
782 if test -z "$INSTALL"; then
783 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
784   echo $ac_n "(cached) $ac_c" 1>&6
785 else
786     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
787   for ac_dir in $PATH; do
788     # Account for people who put trailing slashes in PATH elements.
789     case "$ac_dir/" in
790     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
791     *)
792       # OSF1 and SCO ODT 3.0 have their own names for install.
793       for ac_prog in ginstall installbsd scoinst install; do
794         if test -f $ac_dir/$ac_prog; then
795           if test $ac_prog = install &&
796             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
797             # AIX install.  It has an incompatible calling convention.
798             # OSF/1 installbsd also uses dspmsg, but is usable.
799             :
800           else
801             ac_cv_path_install="$ac_dir/$ac_prog -c"
802             break 2
803           fi
804         fi
805       done
806       ;;
807     esac
808   done
809   IFS="$ac_save_IFS"
810
811 fi
812   if test "${ac_cv_path_install+set}" = set; then
813     INSTALL="$ac_cv_path_install"
814   else
815     # As a last resort, use the slow shell script.  We don't cache a
816     # path for INSTALL within a source directory, because that will
817     # break other packages using the cache if that directory is
818     # removed, or if the path is relative.
819     INSTALL="$ac_install_sh"
820   fi
821 fi
822 echo "$ac_t""$INSTALL" 1>&6
823
824 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
825 # It thinks the first close brace ends the variable substitution.
826 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
827
828 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
829
830 for ac_prog in mawk gawk nawk awk
831 do
832 # Extract the first word of "$ac_prog", so it can be a program name with args.
833 set dummy $ac_prog; ac_word=$2
834 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
835 echo "configure:836: checking for $ac_word" >&5
836 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
837   echo $ac_n "(cached) $ac_c" 1>&6
838 else
839   if test -n "$AWK"; then
840   ac_cv_prog_AWK="$AWK" # Let the user override the test.
841 else
842   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
843   for ac_dir in $PATH; do
844     test -z "$ac_dir" && ac_dir=.
845     if test -f $ac_dir/$ac_word; then
846       ac_cv_prog_AWK="$ac_prog"
847       break
848     fi
849   done
850   IFS="$ac_save_ifs"
851 fi
852 fi
853 AWK="$ac_cv_prog_AWK"
854 if test -n "$AWK"; then
855   echo "$ac_t""$AWK" 1>&6
856 else
857   echo "$ac_t""no" 1>&6
858 fi
859
860 test -n "$AWK" && break
861 done
862
863
864
865 # Do some error checking and defaulting for the host and target type.
866 # The inputs are:
867 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
868 #
869 # The rules are:
870 # 1. You are not allowed to specify --host, --target, and nonopt at the
871 #    same time.
872 # 2. Host defaults to nonopt.
873 # 3. If nonopt is not specified, then host defaults to the current host,
874 #    as determined by config.guess.
875 # 4. Target and build default to nonopt.
876 # 5. If nonopt is not specified, then target and build default to host.
877
878 # The aliases save the names the user supplied, while $host etc.
879 # will get canonicalized.
880 case $host---$target---$nonopt in
881 NONE---*---* | *---NONE---* | *---*---NONE) ;;
882 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
883 esac
884
885
886 # Make sure we can run config.sub.
887 if $ac_config_sub sun4 >/dev/null 2>&1; then :
888 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
889 fi
890
891 echo $ac_n "checking host system type""... $ac_c" 1>&6
892 echo "configure:893: checking host system type" >&5
893
894 host_alias=$host
895 case "$host_alias" in
896 NONE)
897   case $nonopt in
898   NONE)
899     if host_alias=`$ac_config_guess`; then :
900     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
901     fi ;;
902   *) host_alias=$nonopt ;;
903   esac ;;
904 esac
905
906 host=`$ac_config_sub $host_alias`
907 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
908 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
909 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
910 echo "$ac_t""$host" 1>&6
911
912 echo $ac_n "checking target system type""... $ac_c" 1>&6
913 echo "configure:914: checking target system type" >&5
914
915 target_alias=$target
916 case "$target_alias" in
917 NONE)
918   case $nonopt in
919   NONE) target_alias=$host_alias ;;
920   *) target_alias=$nonopt ;;
921   esac ;;
922 esac
923
924 target=`$ac_config_sub $target_alias`
925 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
926 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
927 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
928 echo "$ac_t""$target" 1>&6
929
930 echo $ac_n "checking build system type""... $ac_c" 1>&6
931 echo "configure:932: checking build system type" >&5
932
933 build_alias=$build
934 case "$build_alias" in
935 NONE)
936   case $nonopt in
937   NONE) build_alias=$host_alias ;;
938   *) build_alias=$nonopt ;;
939   esac ;;
940 esac
941
942 build=`$ac_config_sub $build_alias`
943 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
944 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
945 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
946 echo "$ac_t""$build" 1>&6
947
948 test "$host_alias" != "$target_alias" &&
949   test "$program_prefix$program_suffix$program_transform_name" = \
950     NONENONEs,x,x, &&
951   program_prefix=${target_alias}-
952
953
954     
955     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
956 echo "configure:957: checking config.cache system type" >&5
957     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
958          test x"$ac_cv_host_system_type" != x"$host"; } ||
959        { test x"${ac_cv_build_system_type+set}" = x"set" &&
960          test x"$ac_cv_build_system_type" != x"$build"; } ||
961        { test x"${ac_cv_target_system_type+set}" = x"set" &&
962          test x"$ac_cv_target_system_type" != x"$target"; }; then
963         echo "$ac_t""different" 1>&6
964         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
965     else
966         echo "$ac_t""same" 1>&6
967     fi
968     ac_cv_host_system_type="$host"
969     ac_cv_build_system_type="$build"
970     ac_cv_target_system_type="$target"
971
972
973   # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
974 if test "${enable_maintainer_mode+set}" = set; then
975   enableval="$enable_maintainer_mode"
976   maint_mode=$enableval
977 else
978   maint_mode=no
979 fi
980
981   if test x"$maint_mode" = x"yes"; then MAINT=; else MAINT='#'; fi
982   
983   # Extract the first word of "autoconf", so it can be a program name with args.
984 set dummy autoconf; ac_word=$2
985 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
986 echo "configure:987: checking for $ac_word" >&5
987 if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then
988   echo $ac_n "(cached) $ac_c" 1>&6
989 else
990   case "$AUTOCONF" in
991   /*)
992   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
993   ;;
994   *)
995   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
996   for ac_dir in $PATH; do
997     test -z "$ac_dir" && ac_dir=.
998     if test -f $ac_dir/$ac_word; then
999       ac_cv_path_AUTOCONF="$ac_dir/$ac_word"
1000       break
1001     fi
1002   done
1003   IFS="$ac_save_ifs"
1004   test -z "$ac_cv_path_AUTOCONF" && ac_cv_path_AUTOCONF="autoconf"
1005   ;;
1006 esac
1007 fi
1008 AUTOCONF="$ac_cv_path_AUTOCONF"
1009 if test -n "$AUTOCONF"; then
1010   echo "$ac_t""$AUTOCONF" 1>&6
1011 else
1012   echo "$ac_t""no" 1>&6
1013 fi
1014
1015   
1016   # Extract the first word of "autoheader", so it can be a program name with args.
1017 set dummy autoheader; ac_word=$2
1018 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1019 echo "configure:1020: checking for $ac_word" >&5
1020 if eval "test \"`echo '$''{'ac_cv_path_AUTOHEADER'+set}'`\" = set"; then
1021   echo $ac_n "(cached) $ac_c" 1>&6
1022 else
1023   case "$AUTOHEADER" in
1024   /*)
1025   ac_cv_path_AUTOHEADER="$AUTOHEADER" # Let the user override the test with a path.
1026   ;;
1027   *)
1028   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1029   for ac_dir in $PATH; do
1030     test -z "$ac_dir" && ac_dir=.
1031     if test -f $ac_dir/$ac_word; then
1032       ac_cv_path_AUTOHEADER="$ac_dir/$ac_word"
1033       break
1034     fi
1035   done
1036   IFS="$ac_save_ifs"
1037   test -z "$ac_cv_path_AUTOHEADER" && ac_cv_path_AUTOHEADER="autoheader"
1038   ;;
1039 esac
1040 fi
1041 AUTOHEADER="$ac_cv_path_AUTOHEADER"
1042 if test -n "$AUTOHEADER"; then
1043   echo "$ac_t""$AUTOHEADER" 1>&6
1044 else
1045   echo "$ac_t""no" 1>&6
1046 fi
1047
1048   
1049
1050
1051 #
1052 # Config CPPFLAG settings for strange OS's that must be set
1053 # before other tests.
1054 #
1055 case "$host_os" in
1056 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1057     *hpux*)
1058       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1059 echo "configure:1060: checking whether ${CC-cc} accepts -Ae" >&5
1060 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1061   echo $ac_n "(cached) $ac_c" 1>&6
1062 else
1063   echo 'void f(){}' > conftest.c
1064 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1065   ac_cv_prog_cc_Ae=yes
1066 else
1067   ac_cv_prog_cc_Ae=no
1068 fi
1069 rm -f conftest*
1070
1071 fi
1072
1073 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1074       if test $ac_cv_prog_cc_Ae = yes; then
1075         CPPFLAGS="$CPPFLAGS -Ae"
1076       fi
1077       ;;
1078 #
1079 # AIX4.x is *so* broken. It doesn't even admit to having large
1080 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1081 #
1082     *aix4*)
1083       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1084       ;;    
1085 esac
1086
1087 echo $ac_n "checking for inline""... $ac_c" 1>&6
1088 echo "configure:1089: checking for inline" >&5
1089 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1090   echo $ac_n "(cached) $ac_c" 1>&6
1091 else
1092   ac_cv_c_inline=no
1093 for ac_kw in inline __inline__ __inline; do
1094   cat > conftest.$ac_ext <<EOF
1095 #line 1096 "configure"
1096 #include "confdefs.h"
1097
1098 int main() {
1099 } $ac_kw foo() {
1100 ; return 0; }
1101 EOF
1102 if { (eval echo configure:1103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1103   rm -rf conftest*
1104   ac_cv_c_inline=$ac_kw; break
1105 else
1106   echo "configure: failed program was:" >&5
1107   cat conftest.$ac_ext >&5
1108 fi
1109 rm -f conftest*
1110 done
1111
1112 fi
1113
1114 echo "$ac_t""$ac_cv_c_inline" 1>&6
1115 case "$ac_cv_c_inline" in
1116   inline | yes) ;;
1117   no) cat >> confdefs.h <<\EOF
1118 #define inline 
1119 EOF
1120  ;;
1121   *)  cat >> confdefs.h <<EOF
1122 #define inline $ac_cv_c_inline
1123 EOF
1124  ;;
1125 esac
1126
1127 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1128 echo "configure:1129: checking how to run the C preprocessor" >&5
1129 # On Suns, sometimes $CPP names a directory.
1130 if test -n "$CPP" && test -d "$CPP"; then
1131   CPP=
1132 fi
1133 if test -z "$CPP"; then
1134 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1135   echo $ac_n "(cached) $ac_c" 1>&6
1136 else
1137     # This must be in double quotes, not single quotes, because CPP may get
1138   # substituted into the Makefile and "${CC-cc}" will confuse make.
1139   CPP="${CC-cc} -E"
1140   # On the NeXT, cc -E runs the code through the compiler's parser,
1141   # not just through cpp.
1142   cat > conftest.$ac_ext <<EOF
1143 #line 1144 "configure"
1144 #include "confdefs.h"
1145 #include <assert.h>
1146 Syntax Error
1147 EOF
1148 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1149 { (eval echo configure:1150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1150 ac_err=`grep -v '^ *+' conftest.out`
1151 if test -z "$ac_err"; then
1152   :
1153 else
1154   echo "$ac_err" >&5
1155   echo "configure: failed program was:" >&5
1156   cat conftest.$ac_ext >&5
1157   rm -rf conftest*
1158   CPP="${CC-cc} -E -traditional-cpp"
1159   cat > conftest.$ac_ext <<EOF
1160 #line 1161 "configure"
1161 #include "confdefs.h"
1162 #include <assert.h>
1163 Syntax Error
1164 EOF
1165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1166 { (eval echo configure:1167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1167 ac_err=`grep -v '^ *+' conftest.out`
1168 if test -z "$ac_err"; then
1169   :
1170 else
1171   echo "$ac_err" >&5
1172   echo "configure: failed program was:" >&5
1173   cat conftest.$ac_ext >&5
1174   rm -rf conftest*
1175   CPP=/lib/cpp
1176 fi
1177 rm -f conftest*
1178 fi
1179 rm -f conftest*
1180   ac_cv_prog_CPP="$CPP"
1181 fi
1182   CPP="$ac_cv_prog_CPP"
1183 else
1184   ac_cv_prog_CPP="$CPP"
1185 fi
1186 echo "$ac_t""$CPP" 1>&6
1187
1188 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1189 echo "configure:1190: checking for ANSI C header files" >&5
1190 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1191   echo $ac_n "(cached) $ac_c" 1>&6
1192 else
1193   cat > conftest.$ac_ext <<EOF
1194 #line 1195 "configure"
1195 #include "confdefs.h"
1196 #include <stdlib.h>
1197 #include <stdarg.h>
1198 #include <string.h>
1199 #include <float.h>
1200 EOF
1201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1202 { (eval echo configure:1203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1203 ac_err=`grep -v '^ *+' conftest.out`
1204 if test -z "$ac_err"; then
1205   rm -rf conftest*
1206   ac_cv_header_stdc=yes
1207 else
1208   echo "$ac_err" >&5
1209   echo "configure: failed program was:" >&5
1210   cat conftest.$ac_ext >&5
1211   rm -rf conftest*
1212   ac_cv_header_stdc=no
1213 fi
1214 rm -f conftest*
1215
1216 if test $ac_cv_header_stdc = yes; then
1217   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1218 cat > conftest.$ac_ext <<EOF
1219 #line 1220 "configure"
1220 #include "confdefs.h"
1221 #include <string.h>
1222 EOF
1223 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1224   egrep "memchr" >/dev/null 2>&1; then
1225   :
1226 else
1227   rm -rf conftest*
1228   ac_cv_header_stdc=no
1229 fi
1230 rm -f conftest*
1231
1232 fi
1233
1234 if test $ac_cv_header_stdc = yes; then
1235   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1236 cat > conftest.$ac_ext <<EOF
1237 #line 1238 "configure"
1238 #include "confdefs.h"
1239 #include <stdlib.h>
1240 EOF
1241 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1242   egrep "free" >/dev/null 2>&1; then
1243   :
1244 else
1245   rm -rf conftest*
1246   ac_cv_header_stdc=no
1247 fi
1248 rm -f conftest*
1249
1250 fi
1251
1252 if test $ac_cv_header_stdc = yes; then
1253   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1254 if test "$cross_compiling" = yes; then
1255   :
1256 else
1257   cat > conftest.$ac_ext <<EOF
1258 #line 1259 "configure"
1259 #include "confdefs.h"
1260 #include <ctype.h>
1261 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1262 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1263 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1264 int main () { int i; for (i = 0; i < 256; i++)
1265 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1266 exit (0); }
1267
1268 EOF
1269 if { (eval echo configure:1270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1270 then
1271   :
1272 else
1273   echo "configure: failed program was:" >&5
1274   cat conftest.$ac_ext >&5
1275   rm -fr conftest*
1276   ac_cv_header_stdc=no
1277 fi
1278 rm -fr conftest*
1279 fi
1280
1281 fi
1282 fi
1283
1284 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1285 if test $ac_cv_header_stdc = yes; then
1286   cat >> confdefs.h <<\EOF
1287 #define STDC_HEADERS 1
1288 EOF
1289
1290 fi
1291
1292 ac_header_dirent=no
1293 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1294 do
1295 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1296 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1297 echo "configure:1298: checking for $ac_hdr that defines DIR" >&5
1298 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1299   echo $ac_n "(cached) $ac_c" 1>&6
1300 else
1301   cat > conftest.$ac_ext <<EOF
1302 #line 1303 "configure"
1303 #include "confdefs.h"
1304 #include <sys/types.h>
1305 #include <$ac_hdr>
1306 int main() {
1307 DIR *dirp = 0;
1308 ; return 0; }
1309 EOF
1310 if { (eval echo configure:1311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1311   rm -rf conftest*
1312   eval "ac_cv_header_dirent_$ac_safe=yes"
1313 else
1314   echo "configure: failed program was:" >&5
1315   cat conftest.$ac_ext >&5
1316   rm -rf conftest*
1317   eval "ac_cv_header_dirent_$ac_safe=no"
1318 fi
1319 rm -f conftest*
1320 fi
1321 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1322   echo "$ac_t""yes" 1>&6
1323     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1324   cat >> confdefs.h <<EOF
1325 #define $ac_tr_hdr 1
1326 EOF
1327  ac_header_dirent=$ac_hdr; break
1328 else
1329   echo "$ac_t""no" 1>&6
1330 fi
1331 done
1332 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1333 if test $ac_header_dirent = dirent.h; then
1334 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1335 echo "configure:1336: checking for opendir in -ldir" >&5
1336 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1337 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1338   echo $ac_n "(cached) $ac_c" 1>&6
1339 else
1340   ac_save_LIBS="$LIBS"
1341 LIBS="-ldir  $LIBS"
1342 cat > conftest.$ac_ext <<EOF
1343 #line 1344 "configure"
1344 #include "confdefs.h"
1345 /* Override any gcc2 internal prototype to avoid an error.  */
1346 /* We use char because int might match the return type of a gcc2
1347     builtin and then its argument prototype would still apply.  */
1348 char opendir();
1349
1350 int main() {
1351 opendir()
1352 ; return 0; }
1353 EOF
1354 if { (eval echo configure:1355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1355   rm -rf conftest*
1356   eval "ac_cv_lib_$ac_lib_var=yes"
1357 else
1358   echo "configure: failed program was:" >&5
1359   cat conftest.$ac_ext >&5
1360   rm -rf conftest*
1361   eval "ac_cv_lib_$ac_lib_var=no"
1362 fi
1363 rm -f conftest*
1364 LIBS="$ac_save_LIBS"
1365
1366 fi
1367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1368   echo "$ac_t""yes" 1>&6
1369   LIBS="$LIBS -ldir"
1370 else
1371   echo "$ac_t""no" 1>&6
1372 fi
1373
1374 else
1375 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1376 echo "configure:1377: checking for opendir in -lx" >&5
1377 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1378 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1379   echo $ac_n "(cached) $ac_c" 1>&6
1380 else
1381   ac_save_LIBS="$LIBS"
1382 LIBS="-lx  $LIBS"
1383 cat > conftest.$ac_ext <<EOF
1384 #line 1385 "configure"
1385 #include "confdefs.h"
1386 /* Override any gcc2 internal prototype to avoid an error.  */
1387 /* We use char because int might match the return type of a gcc2
1388     builtin and then its argument prototype would still apply.  */
1389 char opendir();
1390
1391 int main() {
1392 opendir()
1393 ; return 0; }
1394 EOF
1395 if { (eval echo configure:1396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1396   rm -rf conftest*
1397   eval "ac_cv_lib_$ac_lib_var=yes"
1398 else
1399   echo "configure: failed program was:" >&5
1400   cat conftest.$ac_ext >&5
1401   rm -rf conftest*
1402   eval "ac_cv_lib_$ac_lib_var=no"
1403 fi
1404 rm -f conftest*
1405 LIBS="$ac_save_LIBS"
1406
1407 fi
1408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1409   echo "$ac_t""yes" 1>&6
1410   LIBS="$LIBS -lx"
1411 else
1412   echo "$ac_t""no" 1>&6
1413 fi
1414
1415 fi
1416
1417 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1418 echo "configure:1419: checking whether time.h and sys/time.h may both be included" >&5
1419 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1420   echo $ac_n "(cached) $ac_c" 1>&6
1421 else
1422   cat > conftest.$ac_ext <<EOF
1423 #line 1424 "configure"
1424 #include "confdefs.h"
1425 #include <sys/types.h>
1426 #include <sys/time.h>
1427 #include <time.h>
1428 int main() {
1429 struct tm *tp;
1430 ; return 0; }
1431 EOF
1432 if { (eval echo configure:1433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1433   rm -rf conftest*
1434   ac_cv_header_time=yes
1435 else
1436   echo "configure: failed program was:" >&5
1437   cat conftest.$ac_ext >&5
1438   rm -rf conftest*
1439   ac_cv_header_time=no
1440 fi
1441 rm -f conftest*
1442 fi
1443
1444 echo "$ac_t""$ac_cv_header_time" 1>&6
1445 if test $ac_cv_header_time = yes; then
1446   cat >> confdefs.h <<\EOF
1447 #define TIME_WITH_SYS_TIME 1
1448 EOF
1449
1450 fi
1451
1452 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1453 echo "configure:1454: checking for sys/wait.h that is POSIX.1 compatible" >&5
1454 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1455   echo $ac_n "(cached) $ac_c" 1>&6
1456 else
1457   cat > conftest.$ac_ext <<EOF
1458 #line 1459 "configure"
1459 #include "confdefs.h"
1460 #include <sys/types.h>
1461 #include <sys/wait.h>
1462 #ifndef WEXITSTATUS
1463 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1464 #endif
1465 #ifndef WIFEXITED
1466 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1467 #endif
1468 int main() {
1469 int s;
1470 wait (&s);
1471 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1472 ; return 0; }
1473 EOF
1474 if { (eval echo configure:1475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1475   rm -rf conftest*
1476   ac_cv_header_sys_wait_h=yes
1477 else
1478   echo "configure: failed program was:" >&5
1479   cat conftest.$ac_ext >&5
1480   rm -rf conftest*
1481   ac_cv_header_sys_wait_h=no
1482 fi
1483 rm -f conftest*
1484 fi
1485
1486 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1487 if test $ac_cv_header_sys_wait_h = yes; then
1488   cat >> confdefs.h <<\EOF
1489 #define HAVE_SYS_WAIT_H 1
1490 EOF
1491
1492 fi
1493
1494 for ac_hdr in sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1495 do
1496 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1497 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1498 echo "configure:1499: checking for $ac_hdr" >&5
1499 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1500   echo $ac_n "(cached) $ac_c" 1>&6
1501 else
1502   cat > conftest.$ac_ext <<EOF
1503 #line 1504 "configure"
1504 #include "confdefs.h"
1505 #include <$ac_hdr>
1506 EOF
1507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1508 { (eval echo configure:1509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1509 ac_err=`grep -v '^ *+' conftest.out`
1510 if test -z "$ac_err"; then
1511   rm -rf conftest*
1512   eval "ac_cv_header_$ac_safe=yes"
1513 else
1514   echo "$ac_err" >&5
1515   echo "configure: failed program was:" >&5
1516   cat conftest.$ac_ext >&5
1517   rm -rf conftest*
1518   eval "ac_cv_header_$ac_safe=no"
1519 fi
1520 rm -f conftest*
1521 fi
1522 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1523   echo "$ac_t""yes" 1>&6
1524     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1525   cat >> confdefs.h <<EOF
1526 #define $ac_tr_hdr 1
1527 EOF
1528  
1529 else
1530   echo "$ac_t""no" 1>&6
1531 fi
1532 done
1533
1534 for ac_hdr in sys/param.h ctype.h 
1535 do
1536 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1537 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1538 echo "configure:1539: checking for $ac_hdr" >&5
1539 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1540   echo $ac_n "(cached) $ac_c" 1>&6
1541 else
1542   cat > conftest.$ac_ext <<EOF
1543 #line 1544 "configure"
1544 #include "confdefs.h"
1545 #include <$ac_hdr>
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`
1550 if test -z "$ac_err"; then
1551   rm -rf conftest*
1552   eval "ac_cv_header_$ac_safe=yes"
1553 else
1554   echo "$ac_err" >&5
1555   echo "configure: failed program was:" >&5
1556   cat conftest.$ac_ext >&5
1557   rm -rf conftest*
1558   eval "ac_cv_header_$ac_safe=no"
1559 fi
1560 rm -f conftest*
1561 fi
1562 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1563   echo "$ac_t""yes" 1>&6
1564     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1565   cat >> confdefs.h <<EOF
1566 #define $ac_tr_hdr 1
1567 EOF
1568  
1569 else
1570   echo "$ac_t""no" 1>&6
1571 fi
1572 done
1573
1574 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/route.h net/if.h
1575 do
1576 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1577 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1578 echo "configure:1579: checking for $ac_hdr" >&5
1579 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1580   echo $ac_n "(cached) $ac_c" 1>&6
1581 else
1582   cat > conftest.$ac_ext <<EOF
1583 #line 1584 "configure"
1584 #include "confdefs.h"
1585 #include <$ac_hdr>
1586 EOF
1587 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1588 { (eval echo configure:1589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1589 ac_err=`grep -v '^ *+' conftest.out`
1590 if test -z "$ac_err"; then
1591   rm -rf conftest*
1592   eval "ac_cv_header_$ac_safe=yes"
1593 else
1594   echo "$ac_err" >&5
1595   echo "configure: failed program was:" >&5
1596   cat conftest.$ac_ext >&5
1597   rm -rf conftest*
1598   eval "ac_cv_header_$ac_safe=no"
1599 fi
1600 rm -f conftest*
1601 fi
1602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1603   echo "$ac_t""yes" 1>&6
1604     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1605   cat >> confdefs.h <<EOF
1606 #define $ac_tr_hdr 1
1607 EOF
1608  
1609 else
1610   echo "$ac_t""no" 1>&6
1611 fi
1612 done
1613
1614 for ac_hdr in compat.h rpc/rpc.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h sys/param.h ctype.h 
1615 do
1616 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1617 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1618 echo "configure:1619: checking for $ac_hdr" >&5
1619 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1620   echo $ac_n "(cached) $ac_c" 1>&6
1621 else
1622   cat > conftest.$ac_ext <<EOF
1623 #line 1624 "configure"
1624 #include "confdefs.h"
1625 #include <$ac_hdr>
1626 EOF
1627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1628 { (eval echo configure:1629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1629 ac_err=`grep -v '^ *+' conftest.out`
1630 if test -z "$ac_err"; then
1631   rm -rf conftest*
1632   eval "ac_cv_header_$ac_safe=yes"
1633 else
1634   echo "$ac_err" >&5
1635   echo "configure: failed program was:" >&5
1636   cat conftest.$ac_ext >&5
1637   rm -rf conftest*
1638   eval "ac_cv_header_$ac_safe=no"
1639 fi
1640 rm -f conftest*
1641 fi
1642 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1643   echo "$ac_t""yes" 1>&6
1644     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1645   cat >> confdefs.h <<EOF
1646 #define $ac_tr_hdr 1
1647 EOF
1648  
1649 else
1650   echo "$ac_t""no" 1>&6
1651 fi
1652 done
1653
1654 for ac_hdr in sys/wait.h sys/resource.h sys/ioctl.h sys/mode.h
1655 do
1656 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1657 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1658 echo "configure:1659: checking for $ac_hdr" >&5
1659 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1660   echo $ac_n "(cached) $ac_c" 1>&6
1661 else
1662   cat > conftest.$ac_ext <<EOF
1663 #line 1664 "configure"
1664 #include "confdefs.h"
1665 #include <$ac_hdr>
1666 EOF
1667 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1668 { (eval echo configure:1669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1669 ac_err=`grep -v '^ *+' conftest.out`
1670 if test -z "$ac_err"; then
1671   rm -rf conftest*
1672   eval "ac_cv_header_$ac_safe=yes"
1673 else
1674   echo "$ac_err" >&5
1675   echo "configure: failed program was:" >&5
1676   cat conftest.$ac_ext >&5
1677   rm -rf conftest*
1678   eval "ac_cv_header_$ac_safe=no"
1679 fi
1680 rm -f conftest*
1681 fi
1682 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1683   echo "$ac_t""yes" 1>&6
1684     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1685   cat >> confdefs.h <<EOF
1686 #define $ac_tr_hdr 1
1687 EOF
1688  
1689 else
1690   echo "$ac_t""no" 1>&6
1691 fi
1692 done
1693
1694 for ac_hdr in sys/filio.h string.h strings.h stdlib.h sys/socket.h
1695 do
1696 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1697 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1698 echo "configure:1699: checking for $ac_hdr" >&5
1699 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1700   echo $ac_n "(cached) $ac_c" 1>&6
1701 else
1702   cat > conftest.$ac_ext <<EOF
1703 #line 1704 "configure"
1704 #include "confdefs.h"
1705 #include <$ac_hdr>
1706 EOF
1707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1708 { (eval echo configure:1709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1709 ac_err=`grep -v '^ *+' conftest.out`
1710 if test -z "$ac_err"; then
1711   rm -rf conftest*
1712   eval "ac_cv_header_$ac_safe=yes"
1713 else
1714   echo "$ac_err" >&5
1715   echo "configure: failed program was:" >&5
1716   cat conftest.$ac_ext >&5
1717   rm -rf conftest*
1718   eval "ac_cv_header_$ac_safe=no"
1719 fi
1720 rm -f conftest*
1721 fi
1722 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1723   echo "$ac_t""yes" 1>&6
1724     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1725   cat >> confdefs.h <<EOF
1726 #define $ac_tr_hdr 1
1727 EOF
1728  
1729 else
1730   echo "$ac_t""no" 1>&6
1731 fi
1732 done
1733
1734 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h
1735 do
1736 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1737 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1738 echo "configure:1739: checking for $ac_hdr" >&5
1739 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1740   echo $ac_n "(cached) $ac_c" 1>&6
1741 else
1742   cat > conftest.$ac_ext <<EOF
1743 #line 1744 "configure"
1744 #include "confdefs.h"
1745 #include <$ac_hdr>
1746 EOF
1747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1748 { (eval echo configure:1749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1749 ac_err=`grep -v '^ *+' conftest.out`
1750 if test -z "$ac_err"; then
1751   rm -rf conftest*
1752   eval "ac_cv_header_$ac_safe=yes"
1753 else
1754   echo "$ac_err" >&5
1755   echo "configure: failed program was:" >&5
1756   cat conftest.$ac_ext >&5
1757   rm -rf conftest*
1758   eval "ac_cv_header_$ac_safe=no"
1759 fi
1760 rm -f conftest*
1761 fi
1762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1763   echo "$ac_t""yes" 1>&6
1764     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1765   cat >> confdefs.h <<EOF
1766 #define $ac_tr_hdr 1
1767 EOF
1768  
1769 else
1770   echo "$ac_t""no" 1>&6
1771 fi
1772 done
1773
1774 for ac_hdr in sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
1775 do
1776 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1777 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1778 echo "configure:1779: checking for $ac_hdr" >&5
1779 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1780   echo $ac_n "(cached) $ac_c" 1>&6
1781 else
1782   cat > conftest.$ac_ext <<EOF
1783 #line 1784 "configure"
1784 #include "confdefs.h"
1785 #include <$ac_hdr>
1786 EOF
1787 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1788 { (eval echo configure:1789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1789 ac_err=`grep -v '^ *+' conftest.out`
1790 if test -z "$ac_err"; then
1791   rm -rf conftest*
1792   eval "ac_cv_header_$ac_safe=yes"
1793 else
1794   echo "$ac_err" >&5
1795   echo "configure: failed program was:" >&5
1796   cat conftest.$ac_ext >&5
1797   rm -rf conftest*
1798   eval "ac_cv_header_$ac_safe=no"
1799 fi
1800 rm -f conftest*
1801 fi
1802 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1803   echo "$ac_t""yes" 1>&6
1804     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1805   cat >> confdefs.h <<EOF
1806 #define $ac_tr_hdr 1
1807 EOF
1808  
1809 else
1810   echo "$ac_t""no" 1>&6
1811 fi
1812 done
1813
1814 for ac_hdr in shadow.h netinet/tcp.h sys/security.h security/pam_appl.h
1815 do
1816 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1817 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1818 echo "configure:1819: checking for $ac_hdr" >&5
1819 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1820   echo $ac_n "(cached) $ac_c" 1>&6
1821 else
1822   cat > conftest.$ac_ext <<EOF
1823 #line 1824 "configure"
1824 #include "confdefs.h"
1825 #include <$ac_hdr>
1826 EOF
1827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1828 { (eval echo configure:1829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1829 ac_err=`grep -v '^ *+' conftest.out`
1830 if test -z "$ac_err"; then
1831   rm -rf conftest*
1832   eval "ac_cv_header_$ac_safe=yes"
1833 else
1834   echo "$ac_err" >&5
1835   echo "configure: failed program was:" >&5
1836   cat conftest.$ac_ext >&5
1837   rm -rf conftest*
1838   eval "ac_cv_header_$ac_safe=no"
1839 fi
1840 rm -f conftest*
1841 fi
1842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1843   echo "$ac_t""yes" 1>&6
1844     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1845   cat >> confdefs.h <<EOF
1846 #define $ac_tr_hdr 1
1847 EOF
1848  
1849 else
1850   echo "$ac_t""no" 1>&6
1851 fi
1852 done
1853
1854 for ac_hdr in stropts.h poll.h readline.h history.h readline/readline.h
1855 do
1856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1858 echo "configure:1859: checking for $ac_hdr" >&5
1859 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1860   echo $ac_n "(cached) $ac_c" 1>&6
1861 else
1862   cat > conftest.$ac_ext <<EOF
1863 #line 1864 "configure"
1864 #include "confdefs.h"
1865 #include <$ac_hdr>
1866 EOF
1867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1868 { (eval echo configure:1869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1869 ac_err=`grep -v '^ *+' conftest.out`
1870 if test -z "$ac_err"; then
1871   rm -rf conftest*
1872   eval "ac_cv_header_$ac_safe=yes"
1873 else
1874   echo "$ac_err" >&5
1875   echo "configure: failed program was:" >&5
1876   cat conftest.$ac_ext >&5
1877   rm -rf conftest*
1878   eval "ac_cv_header_$ac_safe=no"
1879 fi
1880 rm -f conftest*
1881 fi
1882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1883   echo "$ac_t""yes" 1>&6
1884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1885   cat >> confdefs.h <<EOF
1886 #define $ac_tr_hdr 1
1887 EOF
1888  
1889 else
1890   echo "$ac_t""no" 1>&6
1891 fi
1892 done
1893
1894 for ac_hdr in readline/history.h sys/capability.h syscall.h sys/syscall.h
1895 do
1896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1898 echo "configure:1899: checking for $ac_hdr" >&5
1899 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1900   echo $ac_n "(cached) $ac_c" 1>&6
1901 else
1902   cat > conftest.$ac_ext <<EOF
1903 #line 1904 "configure"
1904 #include "confdefs.h"
1905 #include <$ac_hdr>
1906 EOF
1907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1908 { (eval echo configure:1909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1909 ac_err=`grep -v '^ *+' conftest.out`
1910 if test -z "$ac_err"; then
1911   rm -rf conftest*
1912   eval "ac_cv_header_$ac_safe=yes"
1913 else
1914   echo "$ac_err" >&5
1915   echo "configure: failed program was:" >&5
1916   cat conftest.$ac_ext >&5
1917   rm -rf conftest*
1918   eval "ac_cv_header_$ac_safe=no"
1919 fi
1920 rm -f conftest*
1921 fi
1922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1923   echo "$ac_t""yes" 1>&6
1924     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1925   cat >> confdefs.h <<EOF
1926 #define $ac_tr_hdr 1
1927 EOF
1928  
1929 else
1930   echo "$ac_t""no" 1>&6
1931 fi
1932 done
1933
1934 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
1935 do
1936 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1937 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1938 echo "configure:1939: checking for $ac_hdr" >&5
1939 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1940   echo $ac_n "(cached) $ac_c" 1>&6
1941 else
1942   cat > conftest.$ac_ext <<EOF
1943 #line 1944 "configure"
1944 #include "confdefs.h"
1945 #include <$ac_hdr>
1946 EOF
1947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1948 { (eval echo configure:1949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1949 ac_err=`grep -v '^ *+' conftest.out`
1950 if test -z "$ac_err"; then
1951   rm -rf conftest*
1952   eval "ac_cv_header_$ac_safe=yes"
1953 else
1954   echo "$ac_err" >&5
1955   echo "configure: failed program was:" >&5
1956   cat conftest.$ac_ext >&5
1957   rm -rf conftest*
1958   eval "ac_cv_header_$ac_safe=no"
1959 fi
1960 rm -f conftest*
1961 fi
1962 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1963   echo "$ac_t""yes" 1>&6
1964     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1965   cat >> confdefs.h <<EOF
1966 #define $ac_tr_hdr 1
1967 EOF
1968  
1969 else
1970   echo "$ac_t""no" 1>&6
1971 fi
1972 done
1973
1974
1975 echo $ac_n "checking size of int""... $ac_c" 1>&6
1976 echo "configure:1977: checking size of int" >&5
1977 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1978   echo $ac_n "(cached) $ac_c" 1>&6
1979 else
1980   if test "$cross_compiling" = yes; then
1981   ac_cv_sizeof_int=cross
1982 else
1983   cat > conftest.$ac_ext <<EOF
1984 #line 1985 "configure"
1985 #include "confdefs.h"
1986 #include <stdio.h>
1987 main()
1988 {
1989   FILE *f=fopen("conftestval", "w");
1990   if (!f) exit(1);
1991   fprintf(f, "%d\n", sizeof(int));
1992   exit(0);
1993 }
1994 EOF
1995 if { (eval echo configure:1996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1996 then
1997   ac_cv_sizeof_int=`cat conftestval`
1998 else
1999   echo "configure: failed program was:" >&5
2000   cat conftest.$ac_ext >&5
2001   rm -fr conftest*
2002   ac_cv_sizeof_int=0
2003 fi
2004 rm -fr conftest*
2005 fi
2006
2007 fi
2008 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2009 cat >> confdefs.h <<EOF
2010 #define SIZEOF_INT $ac_cv_sizeof_int
2011 EOF
2012
2013
2014 echo $ac_n "checking size of long""... $ac_c" 1>&6
2015 echo "configure:2016: checking size of long" >&5
2016 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2017   echo $ac_n "(cached) $ac_c" 1>&6
2018 else
2019   if test "$cross_compiling" = yes; then
2020   ac_cv_sizeof_long=cross
2021 else
2022   cat > conftest.$ac_ext <<EOF
2023 #line 2024 "configure"
2024 #include "confdefs.h"
2025 #include <stdio.h>
2026 main()
2027 {
2028   FILE *f=fopen("conftestval", "w");
2029   if (!f) exit(1);
2030   fprintf(f, "%d\n", sizeof(long));
2031   exit(0);
2032 }
2033 EOF
2034 if { (eval echo configure:2035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2035 then
2036   ac_cv_sizeof_long=`cat conftestval`
2037 else
2038   echo "configure: failed program was:" >&5
2039   cat conftest.$ac_ext >&5
2040   rm -fr conftest*
2041   ac_cv_sizeof_long=0
2042 fi
2043 rm -fr conftest*
2044 fi
2045
2046 fi
2047 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2048 cat >> confdefs.h <<EOF
2049 #define SIZEOF_LONG $ac_cv_sizeof_long
2050 EOF
2051
2052
2053 echo $ac_n "checking size of short""... $ac_c" 1>&6
2054 echo "configure:2055: checking size of short" >&5
2055 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2056   echo $ac_n "(cached) $ac_c" 1>&6
2057 else
2058   if test "$cross_compiling" = yes; then
2059   ac_cv_sizeof_short=cross
2060 else
2061   cat > conftest.$ac_ext <<EOF
2062 #line 2063 "configure"
2063 #include "confdefs.h"
2064 #include <stdio.h>
2065 main()
2066 {
2067   FILE *f=fopen("conftestval", "w");
2068   if (!f) exit(1);
2069   fprintf(f, "%d\n", sizeof(short));
2070   exit(0);
2071 }
2072 EOF
2073 if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2074 then
2075   ac_cv_sizeof_short=`cat conftestval`
2076 else
2077   echo "configure: failed program was:" >&5
2078   cat conftest.$ac_ext >&5
2079   rm -fr conftest*
2080   ac_cv_sizeof_short=0
2081 fi
2082 rm -fr conftest*
2083 fi
2084
2085 fi
2086 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2087 cat >> confdefs.h <<EOF
2088 #define SIZEOF_SHORT $ac_cv_sizeof_short
2089 EOF
2090
2091
2092
2093 echo $ac_n "checking for working const""... $ac_c" 1>&6
2094 echo "configure:2095: checking for working const" >&5
2095 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2096   echo $ac_n "(cached) $ac_c" 1>&6
2097 else
2098   cat > conftest.$ac_ext <<EOF
2099 #line 2100 "configure"
2100 #include "confdefs.h"
2101
2102 int main() {
2103
2104 /* Ultrix mips cc rejects this.  */
2105 typedef int charset[2]; const charset x;
2106 /* SunOS 4.1.1 cc rejects this.  */
2107 char const *const *ccp;
2108 char **p;
2109 /* NEC SVR4.0.2 mips cc rejects this.  */
2110 struct point {int x, y;};
2111 static struct point const zero = {0,0};
2112 /* AIX XL C 1.02.0.0 rejects this.
2113    It does not let you subtract one const X* pointer from another in an arm
2114    of an if-expression whose if-part is not a constant expression */
2115 const char *g = "string";
2116 ccp = &g + (g ? g-g : 0);
2117 /* HPUX 7.0 cc rejects these. */
2118 ++ccp;
2119 p = (char**) ccp;
2120 ccp = (char const *const *) p;
2121 { /* SCO 3.2v4 cc rejects this.  */
2122   char *t;
2123   char const *s = 0 ? (char *) 0 : (char const *) 0;
2124
2125   *t++ = 0;
2126 }
2127 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2128   int x[] = {25, 17};
2129   const int *foo = &x[0];
2130   ++foo;
2131 }
2132 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2133   typedef const int *iptr;
2134   iptr p = 0;
2135   ++p;
2136 }
2137 { /* AIX XL C 1.02.0.0 rejects this saying
2138      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2139   struct s { int j; const int *ap[3]; };
2140   struct s *b; b->j = 5;
2141 }
2142 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2143   const int foo = 10;
2144 }
2145
2146 ; return 0; }
2147 EOF
2148 if { (eval echo configure:2149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2149   rm -rf conftest*
2150   ac_cv_c_const=yes
2151 else
2152   echo "configure: failed program was:" >&5
2153   cat conftest.$ac_ext >&5
2154   rm -rf conftest*
2155   ac_cv_c_const=no
2156 fi
2157 rm -f conftest*
2158 fi
2159
2160 echo "$ac_t""$ac_cv_c_const" 1>&6
2161 if test $ac_cv_c_const = no; then
2162   cat >> confdefs.h <<\EOF
2163 #define const 
2164 EOF
2165
2166 fi
2167
2168 echo $ac_n "checking for inline""... $ac_c" 1>&6
2169 echo "configure:2170: checking for inline" >&5
2170 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2171   echo $ac_n "(cached) $ac_c" 1>&6
2172 else
2173   ac_cv_c_inline=no
2174 for ac_kw in inline __inline__ __inline; do
2175   cat > conftest.$ac_ext <<EOF
2176 #line 2177 "configure"
2177 #include "confdefs.h"
2178
2179 int main() {
2180 } $ac_kw foo() {
2181 ; return 0; }
2182 EOF
2183 if { (eval echo configure:2184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2184   rm -rf conftest*
2185   ac_cv_c_inline=$ac_kw; break
2186 else
2187   echo "configure: failed program was:" >&5
2188   cat conftest.$ac_ext >&5
2189 fi
2190 rm -f conftest*
2191 done
2192
2193 fi
2194
2195 echo "$ac_t""$ac_cv_c_inline" 1>&6
2196 case "$ac_cv_c_inline" in
2197   inline | yes) ;;
2198   no) cat >> confdefs.h <<\EOF
2199 #define inline 
2200 EOF
2201  ;;
2202   *)  cat >> confdefs.h <<EOF
2203 #define inline $ac_cv_c_inline
2204 EOF
2205  ;;
2206 esac
2207
2208 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2209 echo "configure:2210: checking whether byte ordering is bigendian" >&5
2210 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2211   echo $ac_n "(cached) $ac_c" 1>&6
2212 else
2213   ac_cv_c_bigendian=unknown
2214 # See if sys/param.h defines the BYTE_ORDER macro.
2215 cat > conftest.$ac_ext <<EOF
2216 #line 2217 "configure"
2217 #include "confdefs.h"
2218 #include <sys/types.h>
2219 #include <sys/param.h>
2220 int main() {
2221
2222 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2223  bogus endian macros
2224 #endif
2225 ; return 0; }
2226 EOF
2227 if { (eval echo configure:2228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2228   rm -rf conftest*
2229   # It does; now see whether it defined to BIG_ENDIAN or not.
2230 cat > conftest.$ac_ext <<EOF
2231 #line 2232 "configure"
2232 #include "confdefs.h"
2233 #include <sys/types.h>
2234 #include <sys/param.h>
2235 int main() {
2236
2237 #if BYTE_ORDER != BIG_ENDIAN
2238  not big endian
2239 #endif
2240 ; return 0; }
2241 EOF
2242 if { (eval echo configure:2243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2243   rm -rf conftest*
2244   ac_cv_c_bigendian=yes
2245 else
2246   echo "configure: failed program was:" >&5
2247   cat conftest.$ac_ext >&5
2248   rm -rf conftest*
2249   ac_cv_c_bigendian=no
2250 fi
2251 rm -f conftest*
2252 else
2253   echo "configure: failed program was:" >&5
2254   cat conftest.$ac_ext >&5
2255 fi
2256 rm -f conftest*
2257 if test $ac_cv_c_bigendian = unknown; then
2258 if test "$cross_compiling" = yes; then
2259     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2260 else
2261   cat > conftest.$ac_ext <<EOF
2262 #line 2263 "configure"
2263 #include "confdefs.h"
2264 main () {
2265   /* Are we little or big endian?  From Harbison&Steele.  */
2266   union
2267   {
2268     long l;
2269     char c[sizeof (long)];
2270   } u;
2271   u.l = 1;
2272   exit (u.c[sizeof (long) - 1] == 1);
2273 }
2274 EOF
2275 if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2276 then
2277   ac_cv_c_bigendian=no
2278 else
2279   echo "configure: failed program was:" >&5
2280   cat conftest.$ac_ext >&5
2281   rm -fr conftest*
2282   ac_cv_c_bigendian=yes
2283 fi
2284 rm -fr conftest*
2285 fi
2286
2287 fi
2288 fi
2289
2290 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2291 if test $ac_cv_c_bigendian = yes; then
2292   cat >> confdefs.h <<\EOF
2293 #define WORDS_BIGENDIAN 1
2294 EOF
2295
2296 fi
2297
2298 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2299 echo "configure:2300: checking whether char is unsigned" >&5
2300 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2301   echo $ac_n "(cached) $ac_c" 1>&6
2302 else
2303   if test "$GCC" = yes; then
2304   # GCC predefines this symbol on systems where it applies.
2305 cat > conftest.$ac_ext <<EOF
2306 #line 2307 "configure"
2307 #include "confdefs.h"
2308 #ifdef __CHAR_UNSIGNED__
2309   yes
2310 #endif
2311
2312 EOF
2313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2314   egrep "yes" >/dev/null 2>&1; then
2315   rm -rf conftest*
2316   ac_cv_c_char_unsigned=yes
2317 else
2318   rm -rf conftest*
2319   ac_cv_c_char_unsigned=no
2320 fi
2321 rm -f conftest*
2322
2323 else
2324 if test "$cross_compiling" = yes; then
2325     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2326 else
2327   cat > conftest.$ac_ext <<EOF
2328 #line 2329 "configure"
2329 #include "confdefs.h"
2330 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2331 #if !defined(__STDC__) || __STDC__ != 1
2332 #define volatile
2333 #endif
2334 main() {
2335   volatile char c = 255; exit(c < 0);
2336 }
2337 EOF
2338 if { (eval echo configure:2339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2339 then
2340   ac_cv_c_char_unsigned=yes
2341 else
2342   echo "configure: failed program was:" >&5
2343   cat conftest.$ac_ext >&5
2344   rm -fr conftest*
2345   ac_cv_c_char_unsigned=no
2346 fi
2347 rm -fr conftest*
2348 fi
2349
2350 fi
2351 fi
2352
2353 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2354 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2355   cat >> confdefs.h <<\EOF
2356 #define __CHAR_UNSIGNED__ 1
2357 EOF
2358
2359 fi
2360
2361
2362 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2363 echo "configure:2364: checking return type of signal handlers" >&5
2364 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2365   echo $ac_n "(cached) $ac_c" 1>&6
2366 else
2367   cat > conftest.$ac_ext <<EOF
2368 #line 2369 "configure"
2369 #include "confdefs.h"
2370 #include <sys/types.h>
2371 #include <signal.h>
2372 #ifdef signal
2373 #undef signal
2374 #endif
2375 #ifdef __cplusplus
2376 extern "C" void (*signal (int, void (*)(int)))(int);
2377 #else
2378 void (*signal ()) ();
2379 #endif
2380
2381 int main() {
2382 int i;
2383 ; return 0; }
2384 EOF
2385 if { (eval echo configure:2386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2386   rm -rf conftest*
2387   ac_cv_type_signal=void
2388 else
2389   echo "configure: failed program was:" >&5
2390   cat conftest.$ac_ext >&5
2391   rm -rf conftest*
2392   ac_cv_type_signal=int
2393 fi
2394 rm -f conftest*
2395 fi
2396
2397 echo "$ac_t""$ac_cv_type_signal" 1>&6
2398 cat >> confdefs.h <<EOF
2399 #define RETSIGTYPE $ac_cv_type_signal
2400 EOF
2401
2402
2403 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2404 echo "configure:2405: checking for uid_t in sys/types.h" >&5
2405 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2406   echo $ac_n "(cached) $ac_c" 1>&6
2407 else
2408   cat > conftest.$ac_ext <<EOF
2409 #line 2410 "configure"
2410 #include "confdefs.h"
2411 #include <sys/types.h>
2412 EOF
2413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2414   egrep "uid_t" >/dev/null 2>&1; then
2415   rm -rf conftest*
2416   ac_cv_type_uid_t=yes
2417 else
2418   rm -rf conftest*
2419   ac_cv_type_uid_t=no
2420 fi
2421 rm -f conftest*
2422
2423 fi
2424
2425 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2426 if test $ac_cv_type_uid_t = no; then
2427   cat >> confdefs.h <<\EOF
2428 #define uid_t int
2429 EOF
2430
2431   cat >> confdefs.h <<\EOF
2432 #define gid_t int
2433 EOF
2434
2435 fi
2436
2437 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2438 echo "configure:2439: checking for mode_t" >&5
2439 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2440   echo $ac_n "(cached) $ac_c" 1>&6
2441 else
2442   cat > conftest.$ac_ext <<EOF
2443 #line 2444 "configure"
2444 #include "confdefs.h"
2445 #include <sys/types.h>
2446 #if STDC_HEADERS
2447 #include <stdlib.h>
2448 #include <stddef.h>
2449 #endif
2450 EOF
2451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2452   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2453   rm -rf conftest*
2454   ac_cv_type_mode_t=yes
2455 else
2456   rm -rf conftest*
2457   ac_cv_type_mode_t=no
2458 fi
2459 rm -f conftest*
2460
2461 fi
2462 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2463 if test $ac_cv_type_mode_t = no; then
2464   cat >> confdefs.h <<\EOF
2465 #define mode_t int
2466 EOF
2467
2468 fi
2469
2470 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2471 echo "configure:2472: checking for off_t" >&5
2472 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2473   echo $ac_n "(cached) $ac_c" 1>&6
2474 else
2475   cat > conftest.$ac_ext <<EOF
2476 #line 2477 "configure"
2477 #include "confdefs.h"
2478 #include <sys/types.h>
2479 #if STDC_HEADERS
2480 #include <stdlib.h>
2481 #include <stddef.h>
2482 #endif
2483 EOF
2484 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2485   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2486   rm -rf conftest*
2487   ac_cv_type_off_t=yes
2488 else
2489   rm -rf conftest*
2490   ac_cv_type_off_t=no
2491 fi
2492 rm -f conftest*
2493
2494 fi
2495 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2496 if test $ac_cv_type_off_t = no; then
2497   cat >> confdefs.h <<\EOF
2498 #define off_t long
2499 EOF
2500
2501 fi
2502
2503 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2504 echo "configure:2505: checking for size_t" >&5
2505 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2506   echo $ac_n "(cached) $ac_c" 1>&6
2507 else
2508   cat > conftest.$ac_ext <<EOF
2509 #line 2510 "configure"
2510 #include "confdefs.h"
2511 #include <sys/types.h>
2512 #if STDC_HEADERS
2513 #include <stdlib.h>
2514 #include <stddef.h>
2515 #endif
2516 EOF
2517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2518   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2519   rm -rf conftest*
2520   ac_cv_type_size_t=yes
2521 else
2522   rm -rf conftest*
2523   ac_cv_type_size_t=no
2524 fi
2525 rm -f conftest*
2526
2527 fi
2528 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2529 if test $ac_cv_type_size_t = no; then
2530   cat >> confdefs.h <<\EOF
2531 #define size_t unsigned
2532 EOF
2533
2534 fi
2535
2536 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2537 echo "configure:2538: checking for pid_t" >&5
2538 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2539   echo $ac_n "(cached) $ac_c" 1>&6
2540 else
2541   cat > conftest.$ac_ext <<EOF
2542 #line 2543 "configure"
2543 #include "confdefs.h"
2544 #include <sys/types.h>
2545 #if STDC_HEADERS
2546 #include <stdlib.h>
2547 #include <stddef.h>
2548 #endif
2549 EOF
2550 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2551   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2552   rm -rf conftest*
2553   ac_cv_type_pid_t=yes
2554 else
2555   rm -rf conftest*
2556   ac_cv_type_pid_t=no
2557 fi
2558 rm -f conftest*
2559
2560 fi
2561 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2562 if test $ac_cv_type_pid_t = no; then
2563   cat >> confdefs.h <<\EOF
2564 #define pid_t int
2565 EOF
2566
2567 fi
2568
2569 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
2570 echo "configure:2571: checking for st_rdev in struct stat" >&5
2571 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
2572   echo $ac_n "(cached) $ac_c" 1>&6
2573 else
2574   cat > conftest.$ac_ext <<EOF
2575 #line 2576 "configure"
2576 #include "confdefs.h"
2577 #include <sys/types.h>
2578 #include <sys/stat.h>
2579 int main() {
2580 struct stat s; s.st_rdev;
2581 ; return 0; }
2582 EOF
2583 if { (eval echo configure:2584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2584   rm -rf conftest*
2585   ac_cv_struct_st_rdev=yes
2586 else
2587   echo "configure: failed program was:" >&5
2588   cat conftest.$ac_ext >&5
2589   rm -rf conftest*
2590   ac_cv_struct_st_rdev=no
2591 fi
2592 rm -f conftest*
2593 fi
2594
2595 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
2596 if test $ac_cv_struct_st_rdev = yes; then
2597   cat >> confdefs.h <<\EOF
2598 #define HAVE_ST_RDEV 1
2599 EOF
2600
2601 fi
2602
2603 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
2604 echo "configure:2605: checking for d_off in dirent" >&5
2605 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
2606   echo $ac_n "(cached) $ac_c" 1>&6
2607 else
2608   cat > conftest.$ac_ext <<EOF
2609 #line 2610 "configure"
2610 #include "confdefs.h"
2611
2612 #include <unistd.h>
2613 #include <sys/types.h>
2614 #include <dirent.h>
2615 int main() {
2616 struct dirent d; d.d_off;
2617 ; return 0; }
2618 EOF
2619 if { (eval echo configure:2620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2620   rm -rf conftest*
2621   ac_cv_dirent_d_off=yes
2622 else
2623   echo "configure: failed program was:" >&5
2624   cat conftest.$ac_ext >&5
2625   rm -rf conftest*
2626   ac_cv_dirent_d_off=no
2627 fi
2628 rm -f conftest*
2629 fi
2630
2631 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
2632 if test $ac_cv_dirent_d_off = yes; then
2633   cat >> confdefs.h <<\EOF
2634 #define HAVE_DIRENT_D_OFF 1
2635 EOF
2636
2637 fi
2638
2639 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
2640 echo "configure:2641: checking for ino_t" >&5
2641 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
2642   echo $ac_n "(cached) $ac_c" 1>&6
2643 else
2644   cat > conftest.$ac_ext <<EOF
2645 #line 2646 "configure"
2646 #include "confdefs.h"
2647 #include <sys/types.h>
2648 #if STDC_HEADERS
2649 #include <stdlib.h>
2650 #include <stddef.h>
2651 #endif
2652 EOF
2653 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2654   egrep "ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2655   rm -rf conftest*
2656   ac_cv_type_ino_t=yes
2657 else
2658   rm -rf conftest*
2659   ac_cv_type_ino_t=no
2660 fi
2661 rm -f conftest*
2662
2663 fi
2664 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
2665 if test $ac_cv_type_ino_t = no; then
2666   cat >> confdefs.h <<\EOF
2667 #define ino_t unsigned
2668 EOF
2669
2670 fi
2671
2672 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
2673 echo "configure:2674: checking for loff_t" >&5
2674 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
2675   echo $ac_n "(cached) $ac_c" 1>&6
2676 else
2677   cat > conftest.$ac_ext <<EOF
2678 #line 2679 "configure"
2679 #include "confdefs.h"
2680 #include <sys/types.h>
2681 #if STDC_HEADERS
2682 #include <stdlib.h>
2683 #include <stddef.h>
2684 #endif
2685 EOF
2686 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2687   egrep "loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2688   rm -rf conftest*
2689   ac_cv_type_loff_t=yes
2690 else
2691   rm -rf conftest*
2692   ac_cv_type_loff_t=no
2693 fi
2694 rm -f conftest*
2695
2696 fi
2697 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
2698 if test $ac_cv_type_loff_t = no; then
2699   cat >> confdefs.h <<\EOF
2700 #define loff_t off_t
2701 EOF
2702
2703 fi
2704
2705 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
2706 echo "configure:2707: checking for offset_t" >&5
2707 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
2708   echo $ac_n "(cached) $ac_c" 1>&6
2709 else
2710   cat > conftest.$ac_ext <<EOF
2711 #line 2712 "configure"
2712 #include "confdefs.h"
2713 #include <sys/types.h>
2714 #if STDC_HEADERS
2715 #include <stdlib.h>
2716 #include <stddef.h>
2717 #endif
2718 EOF
2719 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2720   egrep "offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2721   rm -rf conftest*
2722   ac_cv_type_offset_t=yes
2723 else
2724   rm -rf conftest*
2725   ac_cv_type_offset_t=no
2726 fi
2727 rm -f conftest*
2728
2729 fi
2730 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
2731 if test $ac_cv_type_offset_t = no; then
2732   cat >> confdefs.h <<\EOF
2733 #define offset_t loff_t
2734 EOF
2735
2736 fi
2737
2738 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
2739 echo "configure:2740: checking for ssize_t" >&5
2740 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
2741   echo $ac_n "(cached) $ac_c" 1>&6
2742 else
2743   cat > conftest.$ac_ext <<EOF
2744 #line 2745 "configure"
2745 #include "confdefs.h"
2746 #include <sys/types.h>
2747 #if STDC_HEADERS
2748 #include <stdlib.h>
2749 #include <stddef.h>
2750 #endif
2751 EOF
2752 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2753   egrep "ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2754   rm -rf conftest*
2755   ac_cv_type_ssize_t=yes
2756 else
2757   rm -rf conftest*
2758   ac_cv_type_ssize_t=no
2759 fi
2760 rm -f conftest*
2761
2762 fi
2763 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
2764 if test $ac_cv_type_ssize_t = no; then
2765   cat >> confdefs.h <<\EOF
2766 #define ssize_t int
2767 EOF
2768
2769 fi
2770
2771
2772 echo $ac_n "checking for errno in errno.h""... $ac_c" 1>&6
2773 echo "configure:2774: checking for errno in errno.h" >&5
2774 if eval "test \"`echo '$''{'samba_cv_errno'+set}'`\" = set"; then
2775   echo $ac_n "(cached) $ac_c" 1>&6
2776 else
2777   
2778     cat > conftest.$ac_ext <<EOF
2779 #line 2780 "configure"
2780 #include "confdefs.h"
2781 #include <errno.h>
2782 int main() {
2783 int i = errno
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   samba_cv_errno=yes
2789 else
2790   echo "configure: failed program was:" >&5
2791   cat conftest.$ac_ext >&5
2792   rm -rf conftest*
2793   samba_cv_have_errno_decl=no
2794 fi
2795 rm -f conftest*
2796 fi
2797
2798 echo "$ac_t""$samba_cv_errno" 1>&6
2799 if test x"$samba_cv_errno" = x"yes"; then
2800    cat >> confdefs.h <<\EOF
2801 #define HAVE_ERRNO_DECL 1
2802 EOF
2803
2804 fi
2805
2806 # stupid glibc has the functions but no declaration. grrrr.
2807 echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
2808 echo "configure:2809: checking for setresuid declaration" >&5
2809 if eval "test \"`echo '$''{'samba_cv_have_setresuid_decl'+set}'`\" = set"; then
2810   echo $ac_n "(cached) $ac_c" 1>&6
2811 else
2812   
2813     cat > conftest.$ac_ext <<EOF
2814 #line 2815 "configure"
2815 #include "confdefs.h"
2816 #include <unistd.h>
2817 int main() {
2818 int i = (int)setresuid
2819 ; return 0; }
2820 EOF
2821 if { (eval echo configure:2822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2822   rm -rf conftest*
2823   samba_cv_have_setresuid_decl=yes
2824 else
2825   echo "configure: failed program was:" >&5
2826   cat conftest.$ac_ext >&5
2827   rm -rf conftest*
2828   samba_cv_have_setresuid_decl=no
2829 fi
2830 rm -f conftest*
2831 fi
2832
2833 echo "$ac_t""$samba_cv_have_setresuid_decl" 1>&6
2834 if test x"$samba_cv_have_setresuid_decl" = x"yes"; then
2835     cat >> confdefs.h <<\EOF
2836 #define HAVE_SETRESUID_DECL 1
2837 EOF
2838
2839 fi
2840
2841 # stupid glibc has the functions but no declaration. grrrr.
2842 echo $ac_n "checking for crypt declaration""... $ac_c" 1>&6
2843 echo "configure:2844: checking for crypt declaration" >&5
2844 if eval "test \"`echo '$''{'samba_cv_have_crypt_decl'+set}'`\" = set"; then
2845   echo $ac_n "(cached) $ac_c" 1>&6
2846 else
2847   
2848     cat > conftest.$ac_ext <<EOF
2849 #line 2850 "configure"
2850 #include "confdefs.h"
2851 #include <unistd.h>
2852 int main() {
2853 int i = (int)crypt
2854 ; return 0; }
2855 EOF
2856 if { (eval echo configure:2857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2857   rm -rf conftest*
2858   samba_cv_have_crypt_decl=yes
2859 else
2860   echo "configure: failed program was:" >&5
2861   cat conftest.$ac_ext >&5
2862   rm -rf conftest*
2863   samba_cv_have_crypt_decl=no
2864 fi
2865 rm -f conftest*
2866 fi
2867
2868 echo "$ac_t""$samba_cv_have_crypt_decl" 1>&6
2869 if test x"$samba_cv_have_crypt_decl" = x"yes"; then
2870     cat >> confdefs.h <<\EOF
2871 #define HAVE_CRYPT_DECL 1
2872 EOF
2873
2874 fi
2875
2876 # and glibc has setresuid under linux but the function does
2877 # nothing until kernel 2.1.44! very dumb.
2878 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
2879 echo "configure:2880: checking for real setresuid" >&5
2880 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
2881   echo $ac_n "(cached) $ac_c" 1>&6
2882 else
2883   
2884     if test "$cross_compiling" = yes; then
2885   samba_cv_have_setresuid=cross
2886 else
2887   cat > conftest.$ac_ext <<EOF
2888 #line 2889 "configure"
2889 #include "confdefs.h"
2890 #include <errno.h>
2891 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
2892 EOF
2893 if { (eval echo configure:2894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2894 then
2895   samba_cv_have_setresuid=yes
2896 else
2897   echo "configure: failed program was:" >&5
2898   cat conftest.$ac_ext >&5
2899   rm -fr conftest*
2900   samba_cv_have_setresuid=no
2901 fi
2902 rm -fr conftest*
2903 fi
2904
2905 fi
2906
2907 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
2908 if test x"$samba_cv_have_setresuid" = x"yes"; then
2909     cat >> confdefs.h <<\EOF
2910 #define HAVE_SETRESUID 1
2911 EOF
2912
2913 fi
2914
2915 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
2916 echo "configure:2917: checking for 8-bit clean memcmp" >&5
2917 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
2918   echo $ac_n "(cached) $ac_c" 1>&6
2919 else
2920   if test "$cross_compiling" = yes; then
2921   ac_cv_func_memcmp_clean=no
2922 else
2923   cat > conftest.$ac_ext <<EOF
2924 #line 2925 "configure"
2925 #include "confdefs.h"
2926
2927 main()
2928 {
2929   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
2930   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
2931 }
2932
2933 EOF
2934 if { (eval echo configure:2935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2935 then
2936   ac_cv_func_memcmp_clean=yes
2937 else
2938   echo "configure: failed program was:" >&5
2939   cat conftest.$ac_ext >&5
2940   rm -fr conftest*
2941   ac_cv_func_memcmp_clean=no
2942 fi
2943 rm -fr conftest*
2944 fi
2945
2946 fi
2947
2948 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
2949 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
2950
2951
2952 ###############################################
2953 # test for where we get crypt() from
2954 for ac_func in crypt
2955 do
2956 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2957 echo "configure:2958: checking for $ac_func" >&5
2958 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2959   echo $ac_n "(cached) $ac_c" 1>&6
2960 else
2961   cat > conftest.$ac_ext <<EOF
2962 #line 2963 "configure"
2963 #include "confdefs.h"
2964 /* System header to define __stub macros and hopefully few prototypes,
2965     which can conflict with char $ac_func(); below.  */
2966 #include <assert.h>
2967 /* Override any gcc2 internal prototype to avoid an error.  */
2968 /* We use char because int might match the return type of a gcc2
2969     builtin and then its argument prototype would still apply.  */
2970 char $ac_func();
2971
2972 int main() {
2973
2974 /* The GNU C library defines this for functions which it implements
2975     to always fail with ENOSYS.  Some functions are actually named
2976     something starting with __ and the normal name is an alias.  */
2977 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2978 choke me
2979 #else
2980 $ac_func();
2981 #endif
2982
2983 ; return 0; }
2984 EOF
2985 if { (eval echo configure:2986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2986   rm -rf conftest*
2987   eval "ac_cv_func_$ac_func=yes"
2988 else
2989   echo "configure: failed program was:" >&5
2990   cat conftest.$ac_ext >&5
2991   rm -rf conftest*
2992   eval "ac_cv_func_$ac_func=no"
2993 fi
2994 rm -f conftest*
2995 fi
2996
2997 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2998   echo "$ac_t""yes" 1>&6
2999     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3000   cat >> confdefs.h <<EOF
3001 #define $ac_tr_func 1
3002 EOF
3003  
3004 else
3005   echo "$ac_t""no" 1>&6
3006 fi
3007 done
3008
3009 if test x"$ac_cv_func_crypt" = x"no"; then
3010     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
3011 echo "configure:3012: checking for crypt in -lcrypt" >&5
3012 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3013 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3014   echo $ac_n "(cached) $ac_c" 1>&6
3015 else
3016   ac_save_LIBS="$LIBS"
3017 LIBS="-lcrypt  $LIBS"
3018 cat > conftest.$ac_ext <<EOF
3019 #line 3020 "configure"
3020 #include "confdefs.h"
3021 /* Override any gcc2 internal prototype to avoid an error.  */
3022 /* We use char because int might match the return type of a gcc2
3023     builtin and then its argument prototype would still apply.  */
3024 char crypt();
3025
3026 int main() {
3027 crypt()
3028 ; return 0; }
3029 EOF
3030 if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3031   rm -rf conftest*
3032   eval "ac_cv_lib_$ac_lib_var=yes"
3033 else
3034   echo "configure: failed program was:" >&5
3035   cat conftest.$ac_ext >&5
3036   rm -rf conftest*
3037   eval "ac_cv_lib_$ac_lib_var=no"
3038 fi
3039 rm -f conftest*
3040 LIBS="$ac_save_LIBS"
3041
3042 fi
3043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3044   echo "$ac_t""yes" 1>&6
3045   LIBS="$LIBS -lcrypt";
3046         cat >> confdefs.h <<\EOF
3047 #define HAVE_CRYPT 1
3048 EOF
3049
3050 else
3051   echo "$ac_t""no" 1>&6
3052 fi
3053
3054 fi
3055
3056
3057 ###############################################
3058 # test for where we get pam_authenticate() from
3059 # might need libdl for this to work
3060 if test "$ac_cv_header_security_pam_appl_h" = "yes"; then
3061   echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
3062 echo "configure:3063: checking for main in -ldl" >&5
3063 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
3064 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3065   echo $ac_n "(cached) $ac_c" 1>&6
3066 else
3067   ac_save_LIBS="$LIBS"
3068 LIBS="-ldl  $LIBS"
3069 cat > conftest.$ac_ext <<EOF
3070 #line 3071 "configure"
3071 #include "confdefs.h"
3072
3073 int main() {
3074 main()
3075 ; return 0; }
3076 EOF
3077 if { (eval echo configure:3078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3078   rm -rf conftest*
3079   eval "ac_cv_lib_$ac_lib_var=yes"
3080 else
3081   echo "configure: failed program was:" >&5
3082   cat conftest.$ac_ext >&5
3083   rm -rf conftest*
3084   eval "ac_cv_lib_$ac_lib_var=no"
3085 fi
3086 rm -f conftest*
3087 LIBS="$ac_save_LIBS"
3088
3089 fi
3090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3091   echo "$ac_t""yes" 1>&6
3092     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3093     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3094   cat >> confdefs.h <<EOF
3095 #define $ac_tr_lib 1
3096 EOF
3097
3098   LIBS="-ldl $LIBS"
3099
3100 else
3101   echo "$ac_t""no" 1>&6
3102 fi
3103
3104 fi
3105 for ac_func in pam_authenticate
3106 do
3107 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3108 echo "configure:3109: checking for $ac_func" >&5
3109 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3110   echo $ac_n "(cached) $ac_c" 1>&6
3111 else
3112   cat > conftest.$ac_ext <<EOF
3113 #line 3114 "configure"
3114 #include "confdefs.h"
3115 /* System header to define __stub macros and hopefully few prototypes,
3116     which can conflict with char $ac_func(); below.  */
3117 #include <assert.h>
3118 /* Override any gcc2 internal prototype to avoid an error.  */
3119 /* We use char because int might match the return type of a gcc2
3120     builtin and then its argument prototype would still apply.  */
3121 char $ac_func();
3122
3123 int main() {
3124
3125 /* The GNU C library defines this for functions which it implements
3126     to always fail with ENOSYS.  Some functions are actually named
3127     something starting with __ and the normal name is an alias.  */
3128 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3129 choke me
3130 #else
3131 $ac_func();
3132 #endif
3133
3134 ; return 0; }
3135 EOF
3136 if { (eval echo configure:3137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3137   rm -rf conftest*
3138   eval "ac_cv_func_$ac_func=yes"
3139 else
3140   echo "configure: failed program was:" >&5
3141   cat conftest.$ac_ext >&5
3142   rm -rf conftest*
3143   eval "ac_cv_func_$ac_func=no"
3144 fi
3145 rm -f conftest*
3146 fi
3147
3148 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3149   echo "$ac_t""yes" 1>&6
3150     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3151   cat >> confdefs.h <<EOF
3152 #define $ac_tr_func 1
3153 EOF
3154  
3155 else
3156   echo "$ac_t""no" 1>&6
3157 fi
3158 done
3159
3160 if test x"$ac_cv_func_pam_authenticate" = x"no"; then
3161     echo $ac_n "checking for pam_authenticate in -lpam""... $ac_c" 1>&6
3162 echo "configure:3163: checking for pam_authenticate in -lpam" >&5
3163 ac_lib_var=`echo pam'_'pam_authenticate | sed 'y%./+-%__p_%'`
3164 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3165   echo $ac_n "(cached) $ac_c" 1>&6
3166 else
3167   ac_save_LIBS="$LIBS"
3168 LIBS="-lpam  $LIBS"
3169 cat > conftest.$ac_ext <<EOF
3170 #line 3171 "configure"
3171 #include "confdefs.h"
3172 /* Override any gcc2 internal prototype to avoid an error.  */
3173 /* We use char because int might match the return type of a gcc2
3174     builtin and then its argument prototype would still apply.  */
3175 char pam_authenticate();
3176
3177 int main() {
3178 pam_authenticate()
3179 ; return 0; }
3180 EOF
3181 if { (eval echo configure:3182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3182   rm -rf conftest*
3183   eval "ac_cv_lib_$ac_lib_var=yes"
3184 else
3185   echo "configure: failed program was:" >&5
3186   cat conftest.$ac_ext >&5
3187   rm -rf conftest*
3188   eval "ac_cv_lib_$ac_lib_var=no"
3189 fi
3190 rm -f conftest*
3191 LIBS="$ac_save_LIBS"
3192
3193 fi
3194 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3195   echo "$ac_t""yes" 1>&6
3196   LIBS="$LIBS -lpam"
3197         cat >> confdefs.h <<\EOF
3198 #define HAVE_PAM_AUTHENTICATE 1
3199 EOF
3200
3201 else
3202   echo "$ac_t""no" 1>&6
3203 fi
3204
3205 fi
3206
3207
3208 ###############################################
3209 # test for where we get readline() from
3210 if test "$ac_cv_header_readline_h" = "yes" ||
3211    test "$ac_cv_header_readline_readline_h" = "yes"; then
3212   echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
3213 echo "configure:3214: checking for readline in -lreadline" >&5
3214 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
3215 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3216   echo $ac_n "(cached) $ac_c" 1>&6
3217 else
3218   ac_save_LIBS="$LIBS"
3219 LIBS="-lreadline  $LIBS"
3220 cat > conftest.$ac_ext <<EOF
3221 #line 3222 "configure"
3222 #include "confdefs.h"
3223 /* Override any gcc2 internal prototype to avoid an error.  */
3224 /* We use char because int might match the return type of a gcc2
3225     builtin and then its argument prototype would still apply.  */
3226 char readline();
3227
3228 int main() {
3229 readline()
3230 ; return 0; }
3231 EOF
3232 if { (eval echo configure:3233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3233   rm -rf conftest*
3234   eval "ac_cv_lib_$ac_lib_var=yes"
3235 else
3236   echo "configure: failed program was:" >&5
3237   cat conftest.$ac_ext >&5
3238   rm -rf conftest*
3239   eval "ac_cv_lib_$ac_lib_var=no"
3240 fi
3241 rm -f conftest*
3242 LIBS="$ac_save_LIBS"
3243
3244 fi
3245 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3246   echo "$ac_t""yes" 1>&6
3247     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3248     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3249   cat >> confdefs.h <<EOF
3250 #define $ac_tr_lib 1
3251 EOF
3252
3253   LIBS="-lreadline $LIBS"
3254
3255 else
3256   echo "$ac_t""no" 1>&6
3257 fi
3258
3259 fi
3260
3261
3262 # The following test taken from the cvs sources
3263 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
3264 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
3265 # libsocket.so which has a bad implementation of gethostbyname (it
3266 # only looks in /etc/hosts), so we only look for -lsocket if we need
3267 # it.
3268 for ac_func in connect
3269 do
3270 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3271 echo "configure:3272: checking for $ac_func" >&5
3272 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3273   echo $ac_n "(cached) $ac_c" 1>&6
3274 else
3275   cat > conftest.$ac_ext <<EOF
3276 #line 3277 "configure"
3277 #include "confdefs.h"
3278 /* System header to define __stub macros and hopefully few prototypes,
3279     which can conflict with char $ac_func(); below.  */
3280 #include <assert.h>
3281 /* Override any gcc2 internal prototype to avoid an error.  */
3282 /* We use char because int might match the return type of a gcc2
3283     builtin and then its argument prototype would still apply.  */
3284 char $ac_func();
3285
3286 int main() {
3287
3288 /* The GNU C library defines this for functions which it implements
3289     to always fail with ENOSYS.  Some functions are actually named
3290     something starting with __ and the normal name is an alias.  */
3291 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3292 choke me
3293 #else
3294 $ac_func();
3295 #endif
3296
3297 ; return 0; }
3298 EOF
3299 if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3300   rm -rf conftest*
3301   eval "ac_cv_func_$ac_func=yes"
3302 else
3303   echo "configure: failed program was:" >&5
3304   cat conftest.$ac_ext >&5
3305   rm -rf conftest*
3306   eval "ac_cv_func_$ac_func=no"
3307 fi
3308 rm -f conftest*
3309 fi
3310
3311 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3312   echo "$ac_t""yes" 1>&6
3313     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3314   cat >> confdefs.h <<EOF
3315 #define $ac_tr_func 1
3316 EOF
3317  
3318 else
3319   echo "$ac_t""no" 1>&6
3320 fi
3321 done
3322
3323 if test x"$ac_cv_func_connect" = x"no"; then
3324     case "$LIBS" in
3325     *-lnsl*) ;;
3326     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
3327 echo "configure:3328: checking for printf in -lnsl_s" >&5
3328 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
3329 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3330   echo $ac_n "(cached) $ac_c" 1>&6
3331 else
3332   ac_save_LIBS="$LIBS"
3333 LIBS="-lnsl_s  $LIBS"
3334 cat > conftest.$ac_ext <<EOF
3335 #line 3336 "configure"
3336 #include "confdefs.h"
3337 /* Override any gcc2 internal prototype to avoid an error.  */
3338 /* We use char because int might match the return type of a gcc2
3339     builtin and then its argument prototype would still apply.  */
3340 char printf();
3341
3342 int main() {
3343 printf()
3344 ; return 0; }
3345 EOF
3346 if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3347   rm -rf conftest*
3348   eval "ac_cv_lib_$ac_lib_var=yes"
3349 else
3350   echo "configure: failed program was:" >&5
3351   cat conftest.$ac_ext >&5
3352   rm -rf conftest*
3353   eval "ac_cv_lib_$ac_lib_var=no"
3354 fi
3355 rm -f conftest*
3356 LIBS="$ac_save_LIBS"
3357
3358 fi
3359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3360   echo "$ac_t""yes" 1>&6
3361     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3362     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3363   cat >> confdefs.h <<EOF
3364 #define $ac_tr_lib 1
3365 EOF
3366
3367   LIBS="-lnsl_s $LIBS"
3368
3369 else
3370   echo "$ac_t""no" 1>&6
3371 fi
3372  ;;
3373     esac
3374     case "$LIBS" in
3375     *-lnsl*) ;;
3376     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
3377 echo "configure:3378: checking for printf in -lnsl" >&5
3378 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
3379 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3380   echo $ac_n "(cached) $ac_c" 1>&6
3381 else
3382   ac_save_LIBS="$LIBS"
3383 LIBS="-lnsl  $LIBS"
3384 cat > conftest.$ac_ext <<EOF
3385 #line 3386 "configure"
3386 #include "confdefs.h"
3387 /* Override any gcc2 internal prototype to avoid an error.  */
3388 /* We use char because int might match the return type of a gcc2
3389     builtin and then its argument prototype would still apply.  */
3390 char printf();
3391
3392 int main() {
3393 printf()
3394 ; return 0; }
3395 EOF
3396 if { (eval echo configure:3397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3397   rm -rf conftest*
3398   eval "ac_cv_lib_$ac_lib_var=yes"
3399 else
3400   echo "configure: failed program was:" >&5
3401   cat conftest.$ac_ext >&5
3402   rm -rf conftest*
3403   eval "ac_cv_lib_$ac_lib_var=no"
3404 fi
3405 rm -f conftest*
3406 LIBS="$ac_save_LIBS"
3407
3408 fi
3409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3410   echo "$ac_t""yes" 1>&6
3411     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3412     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3413   cat >> confdefs.h <<EOF
3414 #define $ac_tr_lib 1
3415 EOF
3416
3417   LIBS="-lnsl $LIBS"
3418
3419 else
3420   echo "$ac_t""no" 1>&6
3421 fi
3422  ;;
3423     esac
3424     case "$LIBS" in
3425     *-lsocket*) ;;
3426     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3427 echo "configure:3428: checking for connect in -lsocket" >&5
3428 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3429 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3430   echo $ac_n "(cached) $ac_c" 1>&6
3431 else
3432   ac_save_LIBS="$LIBS"
3433 LIBS="-lsocket  $LIBS"
3434 cat > conftest.$ac_ext <<EOF
3435 #line 3436 "configure"
3436 #include "confdefs.h"
3437 /* Override any gcc2 internal prototype to avoid an error.  */
3438 /* We use char because int might match the return type of a gcc2
3439     builtin and then its argument prototype would still apply.  */
3440 char connect();
3441
3442 int main() {
3443 connect()
3444 ; return 0; }
3445 EOF
3446 if { (eval echo configure:3447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3447   rm -rf conftest*
3448   eval "ac_cv_lib_$ac_lib_var=yes"
3449 else
3450   echo "configure: failed program was:" >&5
3451   cat conftest.$ac_ext >&5
3452   rm -rf conftest*
3453   eval "ac_cv_lib_$ac_lib_var=no"
3454 fi
3455 rm -f conftest*
3456 LIBS="$ac_save_LIBS"
3457
3458 fi
3459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3460   echo "$ac_t""yes" 1>&6
3461     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3462     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3463   cat >> confdefs.h <<EOF
3464 #define $ac_tr_lib 1
3465 EOF
3466
3467   LIBS="-lsocket $LIBS"
3468
3469 else
3470   echo "$ac_t""no" 1>&6
3471 fi
3472  ;;
3473     esac
3474     case "$LIBS" in
3475     *-linet*) ;;
3476     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
3477 echo "configure:3478: checking for connect in -linet" >&5
3478 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
3479 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3480   echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482   ac_save_LIBS="$LIBS"
3483 LIBS="-linet  $LIBS"
3484 cat > conftest.$ac_ext <<EOF
3485 #line 3486 "configure"
3486 #include "confdefs.h"
3487 /* Override any gcc2 internal prototype to avoid an error.  */
3488 /* We use char because int might match the return type of a gcc2
3489     builtin and then its argument prototype would still apply.  */
3490 char connect();
3491
3492 int main() {
3493 connect()
3494 ; return 0; }
3495 EOF
3496 if { (eval echo configure:3497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3497   rm -rf conftest*
3498   eval "ac_cv_lib_$ac_lib_var=yes"
3499 else
3500   echo "configure: failed program was:" >&5
3501   cat conftest.$ac_ext >&5
3502   rm -rf conftest*
3503   eval "ac_cv_lib_$ac_lib_var=no"
3504 fi
3505 rm -f conftest*
3506 LIBS="$ac_save_LIBS"
3507
3508 fi
3509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3510   echo "$ac_t""yes" 1>&6
3511     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3512     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3513   cat >> confdefs.h <<EOF
3514 #define $ac_tr_lib 1
3515 EOF
3516
3517   LIBS="-linet $LIBS"
3518
3519 else
3520   echo "$ac_t""no" 1>&6
3521 fi
3522  ;;
3523     esac
3524             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
3525        test x"$ac_cv_lib_inet_connect" = x"yes"; then
3526         # ac_cv_func_connect=yes
3527         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
3528         cat >> confdefs.h <<\EOF
3529 #define HAVE_CONNECT 1
3530 EOF
3531
3532     fi
3533 fi
3534
3535
3536 for ac_func in waitpid getcwd strdup strtoul strerror chown chmod chroot
3537 do
3538 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3539 echo "configure:3540: checking for $ac_func" >&5
3540 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3541   echo $ac_n "(cached) $ac_c" 1>&6
3542 else
3543   cat > conftest.$ac_ext <<EOF
3544 #line 3545 "configure"
3545 #include "confdefs.h"
3546 /* System header to define __stub macros and hopefully few prototypes,
3547     which can conflict with char $ac_func(); below.  */
3548 #include <assert.h>
3549 /* Override any gcc2 internal prototype to avoid an error.  */
3550 /* We use char because int might match the return type of a gcc2
3551     builtin and then its argument prototype would still apply.  */
3552 char $ac_func();
3553
3554 int main() {
3555
3556 /* The GNU C library defines this for functions which it implements
3557     to always fail with ENOSYS.  Some functions are actually named
3558     something starting with __ and the normal name is an alias.  */
3559 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3560 choke me
3561 #else
3562 $ac_func();
3563 #endif
3564
3565 ; return 0; }
3566 EOF
3567 if { (eval echo configure:3568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3568   rm -rf conftest*
3569   eval "ac_cv_func_$ac_func=yes"
3570 else
3571   echo "configure: failed program was:" >&5
3572   cat conftest.$ac_ext >&5
3573   rm -rf conftest*
3574   eval "ac_cv_func_$ac_func=no"
3575 fi
3576 rm -f conftest*
3577 fi
3578
3579 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3580   echo "$ac_t""yes" 1>&6
3581     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3582   cat >> confdefs.h <<EOF
3583 #define $ac_tr_func 1
3584 EOF
3585  
3586 else
3587   echo "$ac_t""no" 1>&6
3588 fi
3589 done
3590
3591 for ac_func in fstat strchr utime utimes getrlimit fsync execl bzero memset
3592 do
3593 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3594 echo "configure:3595: checking for $ac_func" >&5
3595 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3596   echo $ac_n "(cached) $ac_c" 1>&6
3597 else
3598   cat > conftest.$ac_ext <<EOF
3599 #line 3600 "configure"
3600 #include "confdefs.h"
3601 /* System header to define __stub macros and hopefully few prototypes,
3602     which can conflict with char $ac_func(); below.  */
3603 #include <assert.h>
3604 /* Override any gcc2 internal prototype to avoid an error.  */
3605 /* We use char because int might match the return type of a gcc2
3606     builtin and then its argument prototype would still apply.  */
3607 char $ac_func();
3608
3609 int main() {
3610
3611 /* The GNU C library defines this for functions which it implements
3612     to always fail with ENOSYS.  Some functions are actually named
3613     something starting with __ and the normal name is an alias.  */
3614 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3615 choke me
3616 #else
3617 $ac_func();
3618 #endif
3619
3620 ; return 0; }
3621 EOF
3622 if { (eval echo configure:3623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3623   rm -rf conftest*
3624   eval "ac_cv_func_$ac_func=yes"
3625 else
3626   echo "configure: failed program was:" >&5
3627   cat conftest.$ac_ext >&5
3628   rm -rf conftest*
3629   eval "ac_cv_func_$ac_func=no"
3630 fi
3631 rm -f conftest*
3632 fi
3633
3634 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3635   echo "$ac_t""yes" 1>&6
3636     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3637   cat >> confdefs.h <<EOF
3638 #define $ac_tr_func 1
3639 EOF
3640  
3641 else
3642   echo "$ac_t""no" 1>&6
3643 fi
3644 done
3645
3646 for ac_func in memmove vsnprintf snprintf setsid glob strpbrk pipe crypt16 getauthuid
3647 do
3648 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3649 echo "configure:3650: checking for $ac_func" >&5
3650 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3651   echo $ac_n "(cached) $ac_c" 1>&6
3652 else
3653   cat > conftest.$ac_ext <<EOF
3654 #line 3655 "configure"
3655 #include "confdefs.h"
3656 /* System header to define __stub macros and hopefully few prototypes,
3657     which can conflict with char $ac_func(); below.  */
3658 #include <assert.h>
3659 /* Override any gcc2 internal prototype to avoid an error.  */
3660 /* We use char because int might match the return type of a gcc2
3661     builtin and then its argument prototype would still apply.  */
3662 char $ac_func();
3663
3664 int main() {
3665
3666 /* The GNU C library defines this for functions which it implements
3667     to always fail with ENOSYS.  Some functions are actually named
3668     something starting with __ and the normal name is an alias.  */
3669 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3670 choke me
3671 #else
3672 $ac_func();
3673 #endif
3674
3675 ; return 0; }
3676 EOF
3677 if { (eval echo configure:3678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3678   rm -rf conftest*
3679   eval "ac_cv_func_$ac_func=yes"
3680 else
3681   echo "configure: failed program was:" >&5
3682   cat conftest.$ac_ext >&5
3683   rm -rf conftest*
3684   eval "ac_cv_func_$ac_func=no"
3685 fi
3686 rm -f conftest*
3687 fi
3688
3689 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3690   echo "$ac_t""yes" 1>&6
3691     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3692   cat >> confdefs.h <<EOF
3693 #define $ac_tr_func 1
3694 EOF
3695  
3696 else
3697   echo "$ac_t""no" 1>&6
3698 fi
3699 done
3700
3701 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
3702 do
3703 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3704 echo "configure:3705: checking for $ac_func" >&5
3705 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3706   echo $ac_n "(cached) $ac_c" 1>&6
3707 else
3708   cat > conftest.$ac_ext <<EOF
3709 #line 3710 "configure"
3710 #include "confdefs.h"
3711 /* System header to define __stub macros and hopefully few prototypes,
3712     which can conflict with char $ac_func(); below.  */
3713 #include <assert.h>
3714 /* Override any gcc2 internal prototype to avoid an error.  */
3715 /* We use char because int might match the return type of a gcc2
3716     builtin and then its argument prototype would still apply.  */
3717 char $ac_func();
3718
3719 int main() {
3720
3721 /* The GNU C library defines this for functions which it implements
3722     to always fail with ENOSYS.  Some functions are actually named
3723     something starting with __ and the normal name is an alias.  */
3724 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3725 choke me
3726 #else
3727 $ac_func();
3728 #endif
3729
3730 ; return 0; }
3731 EOF
3732 if { (eval echo configure:3733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3733   rm -rf conftest*
3734   eval "ac_cv_func_$ac_func=yes"
3735 else
3736   echo "configure: failed program was:" >&5
3737   cat conftest.$ac_ext >&5
3738   rm -rf conftest*
3739   eval "ac_cv_func_$ac_func=no"
3740 fi
3741 rm -f conftest*
3742 fi
3743
3744 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3745   echo "$ac_t""yes" 1>&6
3746     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3747   cat >> confdefs.h <<EOF
3748 #define $ac_tr_func 1
3749 EOF
3750  
3751 else
3752   echo "$ac_t""no" 1>&6
3753 fi
3754 done
3755
3756 for ac_func in initgroups select rdchk getgrnam pathconf
3757 do
3758 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3759 echo "configure:3760: checking for $ac_func" >&5
3760 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3761   echo $ac_n "(cached) $ac_c" 1>&6
3762 else
3763   cat > conftest.$ac_ext <<EOF
3764 #line 3765 "configure"
3765 #include "confdefs.h"
3766 /* System header to define __stub macros and hopefully few prototypes,
3767     which can conflict with char $ac_func(); below.  */
3768 #include <assert.h>
3769 /* Override any gcc2 internal prototype to avoid an error.  */
3770 /* We use char because int might match the return type of a gcc2
3771     builtin and then its argument prototype would still apply.  */
3772 char $ac_func();
3773
3774 int main() {
3775
3776 /* The GNU C library defines this for functions which it implements
3777     to always fail with ENOSYS.  Some functions are actually named
3778     something starting with __ and the normal name is an alias.  */
3779 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3780 choke me
3781 #else
3782 $ac_func();
3783 #endif
3784
3785 ; return 0; }
3786 EOF
3787 if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3788   rm -rf conftest*
3789   eval "ac_cv_func_$ac_func=yes"
3790 else
3791   echo "configure: failed program was:" >&5
3792   cat conftest.$ac_ext >&5
3793   rm -rf conftest*
3794   eval "ac_cv_func_$ac_func=no"
3795 fi
3796 rm -f conftest*
3797 fi
3798
3799 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3800   echo "$ac_t""yes" 1>&6
3801     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3802   cat >> confdefs.h <<EOF
3803 #define $ac_tr_func 1
3804 EOF
3805  
3806 else
3807   echo "$ac_t""no" 1>&6
3808 fi
3809 done
3810
3811 for ac_func in setuidx setgroups mktime rename ftruncate stat64 fstat64 lstat64 fopen64
3812 do
3813 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3814 echo "configure:3815: checking for $ac_func" >&5
3815 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3816   echo $ac_n "(cached) $ac_c" 1>&6
3817 else
3818   cat > conftest.$ac_ext <<EOF
3819 #line 3820 "configure"
3820 #include "confdefs.h"
3821 /* System header to define __stub macros and hopefully few prototypes,
3822     which can conflict with char $ac_func(); below.  */
3823 #include <assert.h>
3824 /* Override any gcc2 internal prototype to avoid an error.  */
3825 /* We use char because int might match the return type of a gcc2
3826     builtin and then its argument prototype would still apply.  */
3827 char $ac_func();
3828
3829 int main() {
3830
3831 /* The GNU C library defines this for functions which it implements
3832     to always fail with ENOSYS.  Some functions are actually named
3833     something starting with __ and the normal name is an alias.  */
3834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3835 choke me
3836 #else
3837 $ac_func();
3838 #endif
3839
3840 ; return 0; }
3841 EOF
3842 if { (eval echo configure:3843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3843   rm -rf conftest*
3844   eval "ac_cv_func_$ac_func=yes"
3845 else
3846   echo "configure: failed program was:" >&5
3847   cat conftest.$ac_ext >&5
3848   rm -rf conftest*
3849   eval "ac_cv_func_$ac_func=no"
3850 fi
3851 rm -f conftest*
3852 fi
3853
3854 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3855   echo "$ac_t""yes" 1>&6
3856     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3857   cat >> confdefs.h <<EOF
3858 #define $ac_tr_func 1
3859 EOF
3860  
3861 else
3862   echo "$ac_t""no" 1>&6
3863 fi
3864 done
3865
3866 for ac_func in atexit grantpt dup2 lseek64 ftruncate64
3867 do
3868 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3869 echo "configure:3870: checking for $ac_func" >&5
3870 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3871   echo $ac_n "(cached) $ac_c" 1>&6
3872 else
3873   cat > conftest.$ac_ext <<EOF
3874 #line 3875 "configure"
3875 #include "confdefs.h"
3876 /* System header to define __stub macros and hopefully few prototypes,
3877     which can conflict with char $ac_func(); below.  */
3878 #include <assert.h>
3879 /* Override any gcc2 internal prototype to avoid an error.  */
3880 /* We use char because int might match the return type of a gcc2
3881     builtin and then its argument prototype would still apply.  */
3882 char $ac_func();
3883
3884 int main() {
3885
3886 /* The GNU C library defines this for functions which it implements
3887     to always fail with ENOSYS.  Some functions are actually named
3888     something starting with __ and the normal name is an alias.  */
3889 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3890 choke me
3891 #else
3892 $ac_func();
3893 #endif
3894
3895 ; return 0; }
3896 EOF
3897 if { (eval echo configure:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3898   rm -rf conftest*
3899   eval "ac_cv_func_$ac_func=yes"
3900 else
3901   echo "configure: failed program was:" >&5
3902   cat conftest.$ac_ext >&5
3903   rm -rf conftest*
3904   eval "ac_cv_func_$ac_func=no"
3905 fi
3906 rm -f conftest*
3907 fi
3908
3909 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3910   echo "$ac_t""yes" 1>&6
3911     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3912   cat >> confdefs.h <<EOF
3913 #define $ac_tr_func 1
3914 EOF
3915  
3916 else
3917   echo "$ac_t""no" 1>&6
3918 fi
3919 done
3920
3921 for ac_func in fseek64 ftell64 setluid yp_get_default_domain getpwanam
3922 do
3923 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3924 echo "configure:3925: checking for $ac_func" >&5
3925 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3926   echo $ac_n "(cached) $ac_c" 1>&6
3927 else
3928   cat > conftest.$ac_ext <<EOF
3929 #line 3930 "configure"
3930 #include "confdefs.h"
3931 /* System header to define __stub macros and hopefully few prototypes,
3932     which can conflict with char $ac_func(); below.  */
3933 #include <assert.h>
3934 /* Override any gcc2 internal prototype to avoid an error.  */
3935 /* We use char because int might match the return type of a gcc2
3936     builtin and then its argument prototype would still apply.  */
3937 char $ac_func();
3938
3939 int main() {
3940
3941 /* The GNU C library defines this for functions which it implements
3942     to always fail with ENOSYS.  Some functions are actually named
3943     something starting with __ and the normal name is an alias.  */
3944 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3945 choke me
3946 #else
3947 $ac_func();
3948 #endif
3949
3950 ; return 0; }
3951 EOF
3952 if { (eval echo configure:3953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3953   rm -rf conftest*
3954   eval "ac_cv_func_$ac_func=yes"
3955 else
3956   echo "configure: failed program was:" >&5
3957   cat conftest.$ac_ext >&5
3958   rm -rf conftest*
3959   eval "ac_cv_func_$ac_func=no"
3960 fi
3961 rm -f conftest*
3962 fi
3963
3964 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3965   echo "$ac_t""yes" 1>&6
3966     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3967   cat >> confdefs.h <<EOF
3968 #define $ac_tr_func 1
3969 EOF
3970  
3971 else
3972   echo "$ac_t""no" 1>&6
3973 fi
3974 done
3975
3976 for ac_func in srandom random srand rand setenv mmap64
3977 do
3978 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3979 echo "configure:3980: checking for $ac_func" >&5
3980 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3981   echo $ac_n "(cached) $ac_c" 1>&6
3982 else
3983   cat > conftest.$ac_ext <<EOF
3984 #line 3985 "configure"
3985 #include "confdefs.h"
3986 /* System header to define __stub macros and hopefully few prototypes,
3987     which can conflict with char $ac_func(); below.  */
3988 #include <assert.h>
3989 /* Override any gcc2 internal prototype to avoid an error.  */
3990 /* We use char because int might match the return type of a gcc2
3991     builtin and then its argument prototype would still apply.  */
3992 char $ac_func();
3993
3994 int main() {
3995
3996 /* The GNU C library defines this for functions which it implements
3997     to always fail with ENOSYS.  Some functions are actually named
3998     something starting with __ and the normal name is an alias.  */
3999 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4000 choke me
4001 #else
4002 $ac_func();
4003 #endif
4004
4005 ; return 0; }
4006 EOF
4007 if { (eval echo configure:4008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4008   rm -rf conftest*
4009   eval "ac_cv_func_$ac_func=yes"
4010 else
4011   echo "configure: failed program was:" >&5
4012   cat conftest.$ac_ext >&5
4013   rm -rf conftest*
4014   eval "ac_cv_func_$ac_func=no"
4015 fi
4016 rm -f conftest*
4017 fi
4018
4019 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4020   echo "$ac_t""yes" 1>&6
4021     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4022   cat >> confdefs.h <<EOF
4023 #define $ac_tr_func 1
4024 EOF
4025  
4026 else
4027   echo "$ac_t""no" 1>&6
4028 fi
4029 done
4030
4031 # syscall() is needed for smbwrapper.
4032 for ac_func in syscall
4033 do
4034 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4035 echo "configure:4036: checking for $ac_func" >&5
4036 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4037   echo $ac_n "(cached) $ac_c" 1>&6
4038 else
4039   cat > conftest.$ac_ext <<EOF
4040 #line 4041 "configure"
4041 #include "confdefs.h"
4042 /* System header to define __stub macros and hopefully few prototypes,
4043     which can conflict with char $ac_func(); below.  */
4044 #include <assert.h>
4045 /* Override any gcc2 internal prototype to avoid an error.  */
4046 /* We use char because int might match the return type of a gcc2
4047     builtin and then its argument prototype would still apply.  */
4048 char $ac_func();
4049
4050 int main() {
4051
4052 /* The GNU C library defines this for functions which it implements
4053     to always fail with ENOSYS.  Some functions are actually named
4054     something starting with __ and the normal name is an alias.  */
4055 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4056 choke me
4057 #else
4058 $ac_func();
4059 #endif
4060
4061 ; return 0; }
4062 EOF
4063 if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4064   rm -rf conftest*
4065   eval "ac_cv_func_$ac_func=yes"
4066 else
4067   echo "configure: failed program was:" >&5
4068   cat conftest.$ac_ext >&5
4069   rm -rf conftest*
4070   eval "ac_cv_func_$ac_func=no"
4071 fi
4072 rm -f conftest*
4073 fi
4074
4075 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4076   echo "$ac_t""yes" 1>&6
4077     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4078   cat >> confdefs.h <<EOF
4079 #define $ac_tr_func 1
4080 EOF
4081  
4082 else
4083   echo "$ac_t""no" 1>&6
4084 fi
4085 done
4086
4087
4088 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
4089 do
4090 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4091 echo "configure:4092: checking for $ac_func" >&5
4092 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+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 /* System header to define __stub macros and hopefully few prototypes,
4099     which can conflict with char $ac_func(); below.  */
4100 #include <assert.h>
4101 /* Override any gcc2 internal prototype to avoid an error.  */
4102 /* We use char because int might match the return type of a gcc2
4103     builtin and then its argument prototype would still apply.  */
4104 char $ac_func();
4105
4106 int main() {
4107
4108 /* The GNU C library defines this for functions which it implements
4109     to always fail with ENOSYS.  Some functions are actually named
4110     something starting with __ and the normal name is an alias.  */
4111 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4112 choke me
4113 #else
4114 $ac_func();
4115 #endif
4116
4117 ; return 0; }
4118 EOF
4119 if { (eval echo configure:4120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4120   rm -rf conftest*
4121   eval "ac_cv_func_$ac_func=yes"
4122 else
4123   echo "configure: failed program was:" >&5
4124   cat conftest.$ac_ext >&5
4125   rm -rf conftest*
4126   eval "ac_cv_func_$ac_func=no"
4127 fi
4128 rm -f conftest*
4129 fi
4130
4131 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4132   echo "$ac_t""yes" 1>&6
4133     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4134   cat >> confdefs.h <<EOF
4135 #define $ac_tr_func 1
4136 EOF
4137  
4138 else
4139   echo "$ac_t""no" 1>&6
4140 fi
4141 done
4142
4143 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
4144 do
4145 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4146 echo "configure:4147: checking for $ac_func" >&5
4147 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4148   echo $ac_n "(cached) $ac_c" 1>&6
4149 else
4150   cat > conftest.$ac_ext <<EOF
4151 #line 4152 "configure"
4152 #include "confdefs.h"
4153 /* System header to define __stub macros and hopefully few prototypes,
4154     which can conflict with char $ac_func(); below.  */
4155 #include <assert.h>
4156 /* Override any gcc2 internal prototype to avoid an error.  */
4157 /* We use char because int might match the return type of a gcc2
4158     builtin and then its argument prototype would still apply.  */
4159 char $ac_func();
4160
4161 int main() {
4162
4163 /* The GNU C library defines this for functions which it implements
4164     to always fail with ENOSYS.  Some functions are actually named
4165     something starting with __ and the normal name is an alias.  */
4166 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4167 choke me
4168 #else
4169 $ac_func();
4170 #endif
4171
4172 ; return 0; }
4173 EOF
4174 if { (eval echo configure:4175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4175   rm -rf conftest*
4176   eval "ac_cv_func_$ac_func=yes"
4177 else
4178   echo "configure: failed program was:" >&5
4179   cat conftest.$ac_ext >&5
4180   rm -rf conftest*
4181   eval "ac_cv_func_$ac_func=no"
4182 fi
4183 rm -f conftest*
4184 fi
4185
4186 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4187   echo "$ac_t""yes" 1>&6
4188     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4189   cat >> confdefs.h <<EOF
4190 #define $ac_tr_func 1
4191 EOF
4192  
4193 else
4194   echo "$ac_t""no" 1>&6
4195 fi
4196 done
4197
4198 for ac_func in __getcwd _getcwd
4199 do
4200 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4201 echo "configure:4202: checking for $ac_func" >&5
4202 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4203   echo $ac_n "(cached) $ac_c" 1>&6
4204 else
4205   cat > conftest.$ac_ext <<EOF
4206 #line 4207 "configure"
4207 #include "confdefs.h"
4208 /* System header to define __stub macros and hopefully few prototypes,
4209     which can conflict with char $ac_func(); below.  */
4210 #include <assert.h>
4211 /* Override any gcc2 internal prototype to avoid an error.  */
4212 /* We use char because int might match the return type of a gcc2
4213     builtin and then its argument prototype would still apply.  */
4214 char $ac_func();
4215
4216 int main() {
4217
4218 /* The GNU C library defines this for functions which it implements
4219     to always fail with ENOSYS.  Some functions are actually named
4220     something starting with __ and the normal name is an alias.  */
4221 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4222 choke me
4223 #else
4224 $ac_func();
4225 #endif
4226
4227 ; return 0; }
4228 EOF
4229 if { (eval echo configure:4230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4230   rm -rf conftest*
4231   eval "ac_cv_func_$ac_func=yes"
4232 else
4233   echo "configure: failed program was:" >&5
4234   cat conftest.$ac_ext >&5
4235   rm -rf conftest*
4236   eval "ac_cv_func_$ac_func=no"
4237 fi
4238 rm -f conftest*
4239 fi
4240
4241 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4242   echo "$ac_t""yes" 1>&6
4243     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4244   cat >> confdefs.h <<EOF
4245 #define $ac_tr_func 1
4246 EOF
4247  
4248 else
4249   echo "$ac_t""no" 1>&6
4250 fi
4251 done
4252
4253 for ac_func in __xstat __fxstat __lxstat
4254 do
4255 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4256 echo "configure:4257: checking for $ac_func" >&5
4257 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4258   echo $ac_n "(cached) $ac_c" 1>&6
4259 else
4260   cat > conftest.$ac_ext <<EOF
4261 #line 4262 "configure"
4262 #include "confdefs.h"
4263 /* System header to define __stub macros and hopefully few prototypes,
4264     which can conflict with char $ac_func(); below.  */
4265 #include <assert.h>
4266 /* Override any gcc2 internal prototype to avoid an error.  */
4267 /* We use char because int might match the return type of a gcc2
4268     builtin and then its argument prototype would still apply.  */
4269 char $ac_func();
4270
4271 int main() {
4272
4273 /* The GNU C library defines this for functions which it implements
4274     to always fail with ENOSYS.  Some functions are actually named
4275     something starting with __ and the normal name is an alias.  */
4276 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4277 choke me
4278 #else
4279 $ac_func();
4280 #endif
4281
4282 ; return 0; }
4283 EOF
4284 if { (eval echo configure:4285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4285   rm -rf conftest*
4286   eval "ac_cv_func_$ac_func=yes"
4287 else
4288   echo "configure: failed program was:" >&5
4289   cat conftest.$ac_ext >&5
4290   rm -rf conftest*
4291   eval "ac_cv_func_$ac_func=no"
4292 fi
4293 rm -f conftest*
4294 fi
4295
4296 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4297   echo "$ac_t""yes" 1>&6
4298     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4299   cat >> confdefs.h <<EOF
4300 #define $ac_tr_func 1
4301 EOF
4302  
4303 else
4304   echo "$ac_t""no" 1>&6
4305 fi
4306 done
4307
4308 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
4309 do
4310 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4311 echo "configure:4312: checking for $ac_func" >&5
4312 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4313   echo $ac_n "(cached) $ac_c" 1>&6
4314 else
4315   cat > conftest.$ac_ext <<EOF
4316 #line 4317 "configure"
4317 #include "confdefs.h"
4318 /* System header to define __stub macros and hopefully few prototypes,
4319     which can conflict with char $ac_func(); below.  */
4320 #include <assert.h>
4321 /* Override any gcc2 internal prototype to avoid an error.  */
4322 /* We use char because int might match the return type of a gcc2
4323     builtin and then its argument prototype would still apply.  */
4324 char $ac_func();
4325
4326 int main() {
4327
4328 /* The GNU C library defines this for functions which it implements
4329     to always fail with ENOSYS.  Some functions are actually named
4330     something starting with __ and the normal name is an alias.  */
4331 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4332 choke me
4333 #else
4334 $ac_func();
4335 #endif
4336
4337 ; return 0; }
4338 EOF
4339 if { (eval echo configure:4340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4340   rm -rf conftest*
4341   eval "ac_cv_func_$ac_func=yes"
4342 else
4343   echo "configure: failed program was:" >&5
4344   cat conftest.$ac_ext >&5
4345   rm -rf conftest*
4346   eval "ac_cv_func_$ac_func=no"
4347 fi
4348 rm -f conftest*
4349 fi
4350
4351 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4352   echo "$ac_t""yes" 1>&6
4353     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4354   cat >> confdefs.h <<EOF
4355 #define $ac_tr_func 1
4356 EOF
4357  
4358 else
4359   echo "$ac_t""no" 1>&6
4360 fi
4361 done
4362
4363 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
4364 do
4365 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4366 echo "configure:4367: checking for $ac_func" >&5
4367 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4368   echo $ac_n "(cached) $ac_c" 1>&6
4369 else
4370   cat > conftest.$ac_ext <<EOF
4371 #line 4372 "configure"
4372 #include "confdefs.h"
4373 /* System header to define __stub macros and hopefully few prototypes,
4374     which can conflict with char $ac_func(); below.  */
4375 #include <assert.h>
4376 /* Override any gcc2 internal prototype to avoid an error.  */
4377 /* We use char because int might match the return type of a gcc2
4378     builtin and then its argument prototype would still apply.  */
4379 char $ac_func();
4380
4381 int main() {
4382
4383 /* The GNU C library defines this for functions which it implements
4384     to always fail with ENOSYS.  Some functions are actually named
4385     something starting with __ and the normal name is an alias.  */
4386 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4387 choke me
4388 #else
4389 $ac_func();
4390 #endif
4391
4392 ; return 0; }
4393 EOF
4394 if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4395   rm -rf conftest*
4396   eval "ac_cv_func_$ac_func=yes"
4397 else
4398   echo "configure: failed program was:" >&5
4399   cat conftest.$ac_ext >&5
4400   rm -rf conftest*
4401   eval "ac_cv_func_$ac_func=no"
4402 fi
4403 rm -f conftest*
4404 fi
4405
4406 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4407   echo "$ac_t""yes" 1>&6
4408     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4409   cat >> confdefs.h <<EOF
4410 #define $ac_tr_func 1
4411 EOF
4412  
4413 else
4414   echo "$ac_t""no" 1>&6
4415 fi
4416 done
4417
4418 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
4419 do
4420 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4421 echo "configure:4422: checking for $ac_func" >&5
4422 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4423   echo $ac_n "(cached) $ac_c" 1>&6
4424 else
4425   cat > conftest.$ac_ext <<EOF
4426 #line 4427 "configure"
4427 #include "confdefs.h"
4428 /* System header to define __stub macros and hopefully few prototypes,
4429     which can conflict with char $ac_func(); below.  */
4430 #include <assert.h>
4431 /* Override any gcc2 internal prototype to avoid an error.  */
4432 /* We use char because int might match the return type of a gcc2
4433     builtin and then its argument prototype would still apply.  */
4434 char $ac_func();
4435
4436 int main() {
4437
4438 /* The GNU C library defines this for functions which it implements
4439     to always fail with ENOSYS.  Some functions are actually named
4440     something starting with __ and the normal name is an alias.  */
4441 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4442 choke me
4443 #else
4444 $ac_func();
4445 #endif
4446
4447 ; return 0; }
4448 EOF
4449 if { (eval echo configure:4450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4450   rm -rf conftest*
4451   eval "ac_cv_func_$ac_func=yes"
4452 else
4453   echo "configure: failed program was:" >&5
4454   cat conftest.$ac_ext >&5
4455   rm -rf conftest*
4456   eval "ac_cv_func_$ac_func=no"
4457 fi
4458 rm -f conftest*
4459 fi
4460
4461 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4462   echo "$ac_t""yes" 1>&6
4463     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4464   cat >> confdefs.h <<EOF
4465 #define $ac_tr_func 1
4466 EOF
4467  
4468 else
4469   echo "$ac_t""no" 1>&6
4470 fi
4471 done
4472
4473 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
4474 do
4475 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4476 echo "configure:4477: checking for $ac_func" >&5
4477 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4478   echo $ac_n "(cached) $ac_c" 1>&6
4479 else
4480   cat > conftest.$ac_ext <<EOF
4481 #line 4482 "configure"
4482 #include "confdefs.h"
4483 /* System header to define __stub macros and hopefully few prototypes,
4484     which can conflict with char $ac_func(); below.  */
4485 #include <assert.h>
4486 /* Override any gcc2 internal prototype to avoid an error.  */
4487 /* We use char because int might match the return type of a gcc2
4488     builtin and then its argument prototype would still apply.  */
4489 char $ac_func();
4490
4491 int main() {
4492
4493 /* The GNU C library defines this for functions which it implements
4494     to always fail with ENOSYS.  Some functions are actually named
4495     something starting with __ and the normal name is an alias.  */
4496 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4497 choke me
4498 #else
4499 $ac_func();
4500 #endif
4501
4502 ; return 0; }
4503 EOF
4504 if { (eval echo configure:4505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4505   rm -rf conftest*
4506   eval "ac_cv_func_$ac_func=yes"
4507 else
4508   echo "configure: failed program was:" >&5
4509   cat conftest.$ac_ext >&5
4510   rm -rf conftest*
4511   eval "ac_cv_func_$ac_func=no"
4512 fi
4513 rm -f conftest*
4514 fi
4515
4516 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4517   echo "$ac_t""yes" 1>&6
4518     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4519   cat >> confdefs.h <<EOF
4520 #define $ac_tr_func 1
4521 EOF
4522  
4523 else
4524   echo "$ac_t""no" 1>&6
4525 fi
4526 done
4527
4528 for ac_func in _write __write _fork __fork
4529 do
4530 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4531 echo "configure:4532: checking for $ac_func" >&5
4532 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4533   echo $ac_n "(cached) $ac_c" 1>&6
4534 else
4535   cat > conftest.$ac_ext <<EOF
4536 #line 4537 "configure"
4537 #include "confdefs.h"
4538 /* System header to define __stub macros and hopefully few prototypes,
4539     which can conflict with char $ac_func(); below.  */
4540 #include <assert.h>
4541 /* Override any gcc2 internal prototype to avoid an error.  */
4542 /* We use char because int might match the return type of a gcc2
4543     builtin and then its argument prototype would still apply.  */
4544 char $ac_func();
4545
4546 int main() {
4547
4548 /* The GNU C library defines this for functions which it implements
4549     to always fail with ENOSYS.  Some functions are actually named
4550     something starting with __ and the normal name is an alias.  */
4551 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4552 choke me
4553 #else
4554 $ac_func();
4555 #endif
4556
4557 ; return 0; }
4558 EOF
4559 if { (eval echo configure:4560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4560   rm -rf conftest*
4561   eval "ac_cv_func_$ac_func=yes"
4562 else
4563   echo "configure: failed program was:" >&5
4564   cat conftest.$ac_ext >&5
4565   rm -rf conftest*
4566   eval "ac_cv_func_$ac_func=no"
4567 fi
4568 rm -f conftest*
4569 fi
4570
4571 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4572   echo "$ac_t""yes" 1>&6
4573     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4574   cat >> confdefs.h <<EOF
4575 #define $ac_tr_func 1
4576 EOF
4577  
4578 else
4579   echo "$ac_t""no" 1>&6
4580 fi
4581 done
4582
4583 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
4584 do
4585 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4586 echo "configure:4587: checking for $ac_func" >&5
4587 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4588   echo $ac_n "(cached) $ac_c" 1>&6
4589 else
4590   cat > conftest.$ac_ext <<EOF
4591 #line 4592 "configure"
4592 #include "confdefs.h"
4593 /* System header to define __stub macros and hopefully few prototypes,
4594     which can conflict with char $ac_func(); below.  */
4595 #include <assert.h>
4596 /* Override any gcc2 internal prototype to avoid an error.  */
4597 /* We use char because int might match the return type of a gcc2
4598     builtin and then its argument prototype would still apply.  */
4599 char $ac_func();
4600
4601 int main() {
4602
4603 /* The GNU C library defines this for functions which it implements
4604     to always fail with ENOSYS.  Some functions are actually named
4605     something starting with __ and the normal name is an alias.  */
4606 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4607 choke me
4608 #else
4609 $ac_func();
4610 #endif
4611
4612 ; return 0; }
4613 EOF
4614 if { (eval echo configure:4615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4615   rm -rf conftest*
4616   eval "ac_cv_func_$ac_func=yes"
4617 else
4618   echo "configure: failed program was:" >&5
4619   cat conftest.$ac_ext >&5
4620   rm -rf conftest*
4621   eval "ac_cv_func_$ac_func=no"
4622 fi
4623 rm -f conftest*
4624 fi
4625
4626 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4627   echo "$ac_t""yes" 1>&6
4628     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4629   cat >> confdefs.h <<EOF
4630 #define $ac_tr_func 1
4631 EOF
4632  
4633 else
4634   echo "$ac_t""no" 1>&6
4635 fi
4636 done
4637
4638 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
4639 do
4640 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4641 echo "configure:4642: checking for $ac_func" >&5
4642 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4643   echo $ac_n "(cached) $ac_c" 1>&6
4644 else
4645   cat > conftest.$ac_ext <<EOF
4646 #line 4647 "configure"
4647 #include "confdefs.h"
4648 /* System header to define __stub macros and hopefully few prototypes,
4649     which can conflict with char $ac_func(); below.  */
4650 #include <assert.h>
4651 /* Override any gcc2 internal prototype to avoid an error.  */
4652 /* We use char because int might match the return type of a gcc2
4653     builtin and then its argument prototype would still apply.  */
4654 char $ac_func();
4655
4656 int main() {
4657
4658 /* The GNU C library defines this for functions which it implements
4659     to always fail with ENOSYS.  Some functions are actually named
4660     something starting with __ and the normal name is an alias.  */
4661 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4662 choke me
4663 #else
4664 $ac_func();
4665 #endif
4666
4667 ; return 0; }
4668 EOF
4669 if { (eval echo configure:4670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4670   rm -rf conftest*
4671   eval "ac_cv_func_$ac_func=yes"
4672 else
4673   echo "configure: failed program was:" >&5
4674   cat conftest.$ac_ext >&5
4675   rm -rf conftest*
4676   eval "ac_cv_func_$ac_func=no"
4677 fi
4678 rm -f conftest*
4679 fi
4680
4681 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4682   echo "$ac_t""yes" 1>&6
4683     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4684   cat >> confdefs.h <<EOF
4685 #define $ac_tr_func 1
4686 EOF
4687  
4688 else
4689   echo "$ac_t""no" 1>&6
4690 fi
4691 done
4692
4693 for ac_func in pread _pread __pread pread64 _pread64 __pread64
4694 do
4695 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4696 echo "configure:4697: checking for $ac_func" >&5
4697 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4698   echo $ac_n "(cached) $ac_c" 1>&6
4699 else
4700   cat > conftest.$ac_ext <<EOF
4701 #line 4702 "configure"
4702 #include "confdefs.h"
4703 /* System header to define __stub macros and hopefully few prototypes,
4704     which can conflict with char $ac_func(); below.  */
4705 #include <assert.h>
4706 /* Override any gcc2 internal prototype to avoid an error.  */
4707 /* We use char because int might match the return type of a gcc2
4708     builtin and then its argument prototype would still apply.  */
4709 char $ac_func();
4710
4711 int main() {
4712
4713 /* The GNU C library defines this for functions which it implements
4714     to always fail with ENOSYS.  Some functions are actually named
4715     something starting with __ and the normal name is an alias.  */
4716 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4717 choke me
4718 #else
4719 $ac_func();
4720 #endif
4721
4722 ; return 0; }
4723 EOF
4724 if { (eval echo configure:4725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4725   rm -rf conftest*
4726   eval "ac_cv_func_$ac_func=yes"
4727 else
4728   echo "configure: failed program was:" >&5
4729   cat conftest.$ac_ext >&5
4730   rm -rf conftest*
4731   eval "ac_cv_func_$ac_func=no"
4732 fi
4733 rm -f conftest*
4734 fi
4735
4736 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4737   echo "$ac_t""yes" 1>&6
4738     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4739   cat >> confdefs.h <<EOF
4740 #define $ac_tr_func 1
4741 EOF
4742  
4743 else
4744   echo "$ac_t""no" 1>&6
4745 fi
4746 done
4747
4748 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
4749 do
4750 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4751 echo "configure:4752: checking for $ac_func" >&5
4752 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4753   echo $ac_n "(cached) $ac_c" 1>&6
4754 else
4755   cat > conftest.$ac_ext <<EOF
4756 #line 4757 "configure"
4757 #include "confdefs.h"
4758 /* System header to define __stub macros and hopefully few prototypes,
4759     which can conflict with char $ac_func(); below.  */
4760 #include <assert.h>
4761 /* Override any gcc2 internal prototype to avoid an error.  */
4762 /* We use char because int might match the return type of a gcc2
4763     builtin and then its argument prototype would still apply.  */
4764 char $ac_func();
4765
4766 int main() {
4767
4768 /* The GNU C library defines this for functions which it implements
4769     to always fail with ENOSYS.  Some functions are actually named
4770     something starting with __ and the normal name is an alias.  */
4771 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4772 choke me
4773 #else
4774 $ac_func();
4775 #endif
4776
4777 ; return 0; }
4778 EOF
4779 if { (eval echo configure:4780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4780   rm -rf conftest*
4781   eval "ac_cv_func_$ac_func=yes"
4782 else
4783   echo "configure: failed program was:" >&5
4784   cat conftest.$ac_ext >&5
4785   rm -rf conftest*
4786   eval "ac_cv_func_$ac_func=no"
4787 fi
4788 rm -f conftest*
4789 fi
4790
4791 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4792   echo "$ac_t""yes" 1>&6
4793     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4794   cat >> confdefs.h <<EOF
4795 #define $ac_tr_func 1
4796 EOF
4797  
4798 else
4799   echo "$ac_t""no" 1>&6
4800 fi
4801 done
4802
4803 for ac_func in open64 _open64 __open64 creat64
4804 do
4805 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4806 echo "configure:4807: checking for $ac_func" >&5
4807 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4808   echo $ac_n "(cached) $ac_c" 1>&6
4809 else
4810   cat > conftest.$ac_ext <<EOF
4811 #line 4812 "configure"
4812 #include "confdefs.h"
4813 /* System header to define __stub macros and hopefully few prototypes,
4814     which can conflict with char $ac_func(); below.  */
4815 #include <assert.h>
4816 /* Override any gcc2 internal prototype to avoid an error.  */
4817 /* We use char because int might match the return type of a gcc2
4818     builtin and then its argument prototype would still apply.  */
4819 char $ac_func();
4820
4821 int main() {
4822
4823 /* The GNU C library defines this for functions which it implements
4824     to always fail with ENOSYS.  Some functions are actually named
4825     something starting with __ and the normal name is an alias.  */
4826 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4827 choke me
4828 #else
4829 $ac_func();
4830 #endif
4831
4832 ; return 0; }
4833 EOF
4834 if { (eval echo configure:4835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4835   rm -rf conftest*
4836   eval "ac_cv_func_$ac_func=yes"
4837 else
4838   echo "configure: failed program was:" >&5
4839   cat conftest.$ac_ext >&5
4840   rm -rf conftest*
4841   eval "ac_cv_func_$ac_func=no"
4842 fi
4843 rm -f conftest*
4844 fi
4845
4846 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4847   echo "$ac_t""yes" 1>&6
4848     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4849   cat >> confdefs.h <<EOF
4850 #define $ac_tr_func 1
4851 EOF
4852  
4853 else
4854   echo "$ac_t""no" 1>&6
4855 fi
4856 done
4857
4858
4859 #
4860 # Check for the functions putprpwnam, set_auth_parameters,
4861 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
4862 # Needed for OSF1 and HPUX.
4863 #
4864
4865 case "$LIBS" in
4866   *-lsecurity*) for ac_func in putprpwnam
4867 do
4868 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4869 echo "configure:4870: checking for $ac_func" >&5
4870 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873   cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876 /* System header to define __stub macros and hopefully few prototypes,
4877     which can conflict with char $ac_func(); below.  */
4878 #include <assert.h>
4879 /* Override any gcc2 internal prototype to avoid an error.  */
4880 /* We use char because int might match the return type of a gcc2
4881     builtin and then its argument prototype would still apply.  */
4882 char $ac_func();
4883
4884 int main() {
4885
4886 /* The GNU C library defines this for functions which it implements
4887     to always fail with ENOSYS.  Some functions are actually named
4888     something starting with __ and the normal name is an alias.  */
4889 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4890 choke me
4891 #else
4892 $ac_func();
4893 #endif
4894
4895 ; return 0; }
4896 EOF
4897 if { (eval echo configure:4898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4898   rm -rf conftest*
4899   eval "ac_cv_func_$ac_func=yes"
4900 else
4901   echo "configure: failed program was:" >&5
4902   cat conftest.$ac_ext >&5
4903   rm -rf conftest*
4904   eval "ac_cv_func_$ac_func=no"
4905 fi
4906 rm -f conftest*
4907 fi
4908
4909 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4910   echo "$ac_t""yes" 1>&6
4911     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4912   cat >> confdefs.h <<EOF
4913 #define $ac_tr_func 1
4914 EOF
4915  
4916 else
4917   echo "$ac_t""no" 1>&6
4918 fi
4919 done
4920  ;;
4921   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
4922 echo "configure:4923: checking for putprpwnam in -lsecurity" >&5
4923 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
4924 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4925   echo $ac_n "(cached) $ac_c" 1>&6
4926 else
4927   ac_save_LIBS="$LIBS"
4928 LIBS="-lsecurity  $LIBS"
4929 cat > conftest.$ac_ext <<EOF
4930 #line 4931 "configure"
4931 #include "confdefs.h"
4932 /* Override any gcc2 internal prototype to avoid an error.  */
4933 /* We use char because int might match the return type of a gcc2
4934     builtin and then its argument prototype would still apply.  */
4935 char putprpwnam();
4936
4937 int main() {
4938 putprpwnam()
4939 ; return 0; }
4940 EOF
4941 if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4942   rm -rf conftest*
4943   eval "ac_cv_lib_$ac_lib_var=yes"
4944 else
4945   echo "configure: failed program was:" >&5
4946   cat conftest.$ac_ext >&5
4947   rm -rf conftest*
4948   eval "ac_cv_lib_$ac_lib_var=no"
4949 fi
4950 rm -f conftest*
4951 LIBS="$ac_save_LIBS"
4952
4953 fi
4954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4955   echo "$ac_t""yes" 1>&6
4956     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4957     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4958   cat >> confdefs.h <<EOF
4959 #define $ac_tr_lib 1
4960 EOF
4961
4962   LIBS="-lsecurity $LIBS"
4963
4964 else
4965   echo "$ac_t""no" 1>&6
4966 fi
4967  
4968      for ac_func in putprpwnam
4969 do
4970 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4971 echo "configure:4972: checking for $ac_func" >&5
4972 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4973   echo $ac_n "(cached) $ac_c" 1>&6
4974 else
4975   cat > conftest.$ac_ext <<EOF
4976 #line 4977 "configure"
4977 #include "confdefs.h"
4978 /* System header to define __stub macros and hopefully few prototypes,
4979     which can conflict with char $ac_func(); below.  */
4980 #include <assert.h>
4981 /* Override any gcc2 internal prototype to avoid an error.  */
4982 /* We use char because int might match the return type of a gcc2
4983     builtin and then its argument prototype would still apply.  */
4984 char $ac_func();
4985
4986 int main() {
4987
4988 /* The GNU C library defines this for functions which it implements
4989     to always fail with ENOSYS.  Some functions are actually named
4990     something starting with __ and the normal name is an alias.  */
4991 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4992 choke me
4993 #else
4994 $ac_func();
4995 #endif
4996
4997 ; return 0; }
4998 EOF
4999 if { (eval echo configure:5000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5000   rm -rf conftest*
5001   eval "ac_cv_func_$ac_func=yes"
5002 else
5003   echo "configure: failed program was:" >&5
5004   cat conftest.$ac_ext >&5
5005   rm -rf conftest*
5006   eval "ac_cv_func_$ac_func=no"
5007 fi
5008 rm -f conftest*
5009 fi
5010
5011 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5012   echo "$ac_t""yes" 1>&6
5013     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5014   cat >> confdefs.h <<EOF
5015 #define $ac_tr_func 1
5016 EOF
5017  
5018 else
5019   echo "$ac_t""no" 1>&6
5020 fi
5021 done
5022
5023   ;;
5024   esac
5025
5026 case "$LIBS" in
5027   *-lsec*) for ac_func in putprpwnam
5028 do
5029 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5030 echo "configure:5031: checking for $ac_func" >&5
5031 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5032   echo $ac_n "(cached) $ac_c" 1>&6
5033 else
5034   cat > conftest.$ac_ext <<EOF
5035 #line 5036 "configure"
5036 #include "confdefs.h"
5037 /* System header to define __stub macros and hopefully few prototypes,
5038     which can conflict with char $ac_func(); below.  */
5039 #include <assert.h>
5040 /* Override any gcc2 internal prototype to avoid an error.  */
5041 /* We use char because int might match the return type of a gcc2
5042     builtin and then its argument prototype would still apply.  */
5043 char $ac_func();
5044
5045 int main() {
5046
5047 /* The GNU C library defines this for functions which it implements
5048     to always fail with ENOSYS.  Some functions are actually named
5049     something starting with __ and the normal name is an alias.  */
5050 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5051 choke me
5052 #else
5053 $ac_func();
5054 #endif
5055
5056 ; return 0; }
5057 EOF
5058 if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5059   rm -rf conftest*
5060   eval "ac_cv_func_$ac_func=yes"
5061 else
5062   echo "configure: failed program was:" >&5
5063   cat conftest.$ac_ext >&5
5064   rm -rf conftest*
5065   eval "ac_cv_func_$ac_func=no"
5066 fi
5067 rm -f conftest*
5068 fi
5069
5070 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5071   echo "$ac_t""yes" 1>&6
5072     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5073   cat >> confdefs.h <<EOF
5074 #define $ac_tr_func 1
5075 EOF
5076  
5077 else
5078   echo "$ac_t""no" 1>&6
5079 fi
5080 done
5081  ;;
5082   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
5083 echo "configure:5084: checking for putprpwnam in -lsec" >&5
5084 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
5085 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5086   echo $ac_n "(cached) $ac_c" 1>&6
5087 else
5088   ac_save_LIBS="$LIBS"
5089 LIBS="-lsec  $LIBS"
5090 cat > conftest.$ac_ext <<EOF
5091 #line 5092 "configure"
5092 #include "confdefs.h"
5093 /* Override any gcc2 internal prototype to avoid an error.  */
5094 /* We use char because int might match the return type of a gcc2
5095     builtin and then its argument prototype would still apply.  */
5096 char putprpwnam();
5097
5098 int main() {
5099 putprpwnam()
5100 ; return 0; }
5101 EOF
5102 if { (eval echo configure:5103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5103   rm -rf conftest*
5104   eval "ac_cv_lib_$ac_lib_var=yes"
5105 else
5106   echo "configure: failed program was:" >&5
5107   cat conftest.$ac_ext >&5
5108   rm -rf conftest*
5109   eval "ac_cv_lib_$ac_lib_var=no"
5110 fi
5111 rm -f conftest*
5112 LIBS="$ac_save_LIBS"
5113
5114 fi
5115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5116   echo "$ac_t""yes" 1>&6
5117     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5118     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5119   cat >> confdefs.h <<EOF
5120 #define $ac_tr_lib 1
5121 EOF
5122
5123   LIBS="-lsec $LIBS"
5124
5125 else
5126   echo "$ac_t""no" 1>&6
5127 fi
5128  
5129      for ac_func in putprpwnam
5130 do
5131 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5132 echo "configure:5133: checking for $ac_func" >&5
5133 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5134   echo $ac_n "(cached) $ac_c" 1>&6
5135 else
5136   cat > conftest.$ac_ext <<EOF
5137 #line 5138 "configure"
5138 #include "confdefs.h"
5139 /* System header to define __stub macros and hopefully few prototypes,
5140     which can conflict with char $ac_func(); below.  */
5141 #include <assert.h>
5142 /* Override any gcc2 internal prototype to avoid an error.  */
5143 /* We use char because int might match the return type of a gcc2
5144     builtin and then its argument prototype would still apply.  */
5145 char $ac_func();
5146
5147 int main() {
5148
5149 /* The GNU C library defines this for functions which it implements
5150     to always fail with ENOSYS.  Some functions are actually named
5151     something starting with __ and the normal name is an alias.  */
5152 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5153 choke me
5154 #else
5155 $ac_func();
5156 #endif
5157
5158 ; return 0; }
5159 EOF
5160 if { (eval echo configure:5161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5161   rm -rf conftest*
5162   eval "ac_cv_func_$ac_func=yes"
5163 else
5164   echo "configure: failed program was:" >&5
5165   cat conftest.$ac_ext >&5
5166   rm -rf conftest*
5167   eval "ac_cv_func_$ac_func=no"
5168 fi
5169 rm -f conftest*
5170 fi
5171
5172 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5173   echo "$ac_t""yes" 1>&6
5174     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5175   cat >> confdefs.h <<EOF
5176 #define $ac_tr_func 1
5177 EOF
5178  
5179 else
5180   echo "$ac_t""no" 1>&6
5181 fi
5182 done
5183
5184   ;;
5185   esac
5186
5187
5188 case "$LIBS" in
5189   *-lsecurity*) for ac_func in set_auth_parameters
5190 do
5191 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5192 echo "configure:5193: checking for $ac_func" >&5
5193 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5194   echo $ac_n "(cached) $ac_c" 1>&6
5195 else
5196   cat > conftest.$ac_ext <<EOF
5197 #line 5198 "configure"
5198 #include "confdefs.h"
5199 /* System header to define __stub macros and hopefully few prototypes,
5200     which can conflict with char $ac_func(); below.  */
5201 #include <assert.h>
5202 /* Override any gcc2 internal prototype to avoid an error.  */
5203 /* We use char because int might match the return type of a gcc2
5204     builtin and then its argument prototype would still apply.  */
5205 char $ac_func();
5206
5207 int main() {
5208
5209 /* The GNU C library defines this for functions which it implements
5210     to always fail with ENOSYS.  Some functions are actually named
5211     something starting with __ and the normal name is an alias.  */
5212 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5213 choke me
5214 #else
5215 $ac_func();
5216 #endif
5217
5218 ; return 0; }
5219 EOF
5220 if { (eval echo configure:5221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5221   rm -rf conftest*
5222   eval "ac_cv_func_$ac_func=yes"
5223 else
5224   echo "configure: failed program was:" >&5
5225   cat conftest.$ac_ext >&5
5226   rm -rf conftest*
5227   eval "ac_cv_func_$ac_func=no"
5228 fi
5229 rm -f conftest*
5230 fi
5231
5232 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5233   echo "$ac_t""yes" 1>&6
5234     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5235   cat >> confdefs.h <<EOF
5236 #define $ac_tr_func 1
5237 EOF
5238  
5239 else
5240   echo "$ac_t""no" 1>&6
5241 fi
5242 done
5243  ;;
5244   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
5245 echo "configure:5246: checking for set_auth_parameters in -lsecurity" >&5
5246 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
5247 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5248   echo $ac_n "(cached) $ac_c" 1>&6
5249 else
5250   ac_save_LIBS="$LIBS"
5251 LIBS="-lsecurity  $LIBS"
5252 cat > conftest.$ac_ext <<EOF
5253 #line 5254 "configure"
5254 #include "confdefs.h"
5255 /* Override any gcc2 internal prototype to avoid an error.  */
5256 /* We use char because int might match the return type of a gcc2
5257     builtin and then its argument prototype would still apply.  */
5258 char set_auth_parameters();
5259
5260 int main() {
5261 set_auth_parameters()
5262 ; return 0; }
5263 EOF
5264 if { (eval echo configure:5265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5265   rm -rf conftest*
5266   eval "ac_cv_lib_$ac_lib_var=yes"
5267 else
5268   echo "configure: failed program was:" >&5
5269   cat conftest.$ac_ext >&5
5270   rm -rf conftest*
5271   eval "ac_cv_lib_$ac_lib_var=no"
5272 fi
5273 rm -f conftest*
5274 LIBS="$ac_save_LIBS"
5275
5276 fi
5277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5278   echo "$ac_t""yes" 1>&6
5279     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5280     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5281   cat >> confdefs.h <<EOF
5282 #define $ac_tr_lib 1
5283 EOF
5284
5285   LIBS="-lsecurity $LIBS"
5286
5287 else
5288   echo "$ac_t""no" 1>&6
5289 fi
5290  
5291      for ac_func in set_auth_parameters
5292 do
5293 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5294 echo "configure:5295: checking for $ac_func" >&5
5295 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5296   echo $ac_n "(cached) $ac_c" 1>&6
5297 else
5298   cat > conftest.$ac_ext <<EOF
5299 #line 5300 "configure"
5300 #include "confdefs.h"
5301 /* System header to define __stub macros and hopefully few prototypes,
5302     which can conflict with char $ac_func(); below.  */
5303 #include <assert.h>
5304 /* Override any gcc2 internal prototype to avoid an error.  */
5305 /* We use char because int might match the return type of a gcc2
5306     builtin and then its argument prototype would still apply.  */
5307 char $ac_func();
5308
5309 int main() {
5310
5311 /* The GNU C library defines this for functions which it implements
5312     to always fail with ENOSYS.  Some functions are actually named
5313     something starting with __ and the normal name is an alias.  */
5314 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5315 choke me
5316 #else
5317 $ac_func();
5318 #endif
5319
5320 ; return 0; }
5321 EOF
5322 if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5323   rm -rf conftest*
5324   eval "ac_cv_func_$ac_func=yes"
5325 else
5326   echo "configure: failed program was:" >&5
5327   cat conftest.$ac_ext >&5
5328   rm -rf conftest*
5329   eval "ac_cv_func_$ac_func=no"
5330 fi
5331 rm -f conftest*
5332 fi
5333
5334 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5335   echo "$ac_t""yes" 1>&6
5336     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5337   cat >> confdefs.h <<EOF
5338 #define $ac_tr_func 1
5339 EOF
5340  
5341 else
5342   echo "$ac_t""no" 1>&6
5343 fi
5344 done
5345
5346   ;;
5347   esac
5348
5349 case "$LIBS" in
5350   *-lsec*) for ac_func in set_auth_parameters
5351 do
5352 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5353 echo "configure:5354: checking for $ac_func" >&5
5354 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5355   echo $ac_n "(cached) $ac_c" 1>&6
5356 else
5357   cat > conftest.$ac_ext <<EOF
5358 #line 5359 "configure"
5359 #include "confdefs.h"
5360 /* System header to define __stub macros and hopefully few prototypes,
5361     which can conflict with char $ac_func(); below.  */
5362 #include <assert.h>
5363 /* Override any gcc2 internal prototype to avoid an error.  */
5364 /* We use char because int might match the return type of a gcc2
5365     builtin and then its argument prototype would still apply.  */
5366 char $ac_func();
5367
5368 int main() {
5369
5370 /* The GNU C library defines this for functions which it implements
5371     to always fail with ENOSYS.  Some functions are actually named
5372     something starting with __ and the normal name is an alias.  */
5373 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5374 choke me
5375 #else
5376 $ac_func();
5377 #endif
5378
5379 ; return 0; }
5380 EOF
5381 if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5382   rm -rf conftest*
5383   eval "ac_cv_func_$ac_func=yes"
5384 else
5385   echo "configure: failed program was:" >&5
5386   cat conftest.$ac_ext >&5
5387   rm -rf conftest*
5388   eval "ac_cv_func_$ac_func=no"
5389 fi
5390 rm -f conftest*
5391 fi
5392
5393 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5394   echo "$ac_t""yes" 1>&6
5395     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5396   cat >> confdefs.h <<EOF
5397 #define $ac_tr_func 1
5398 EOF
5399  
5400 else
5401   echo "$ac_t""no" 1>&6
5402 fi
5403 done
5404  ;;
5405   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
5406 echo "configure:5407: checking for set_auth_parameters in -lsec" >&5
5407 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
5408 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5409   echo $ac_n "(cached) $ac_c" 1>&6
5410 else
5411   ac_save_LIBS="$LIBS"
5412 LIBS="-lsec  $LIBS"
5413 cat > conftest.$ac_ext <<EOF
5414 #line 5415 "configure"
5415 #include "confdefs.h"
5416 /* Override any gcc2 internal prototype to avoid an error.  */
5417 /* We use char because int might match the return type of a gcc2
5418     builtin and then its argument prototype would still apply.  */
5419 char set_auth_parameters();
5420
5421 int main() {
5422 set_auth_parameters()
5423 ; return 0; }
5424 EOF
5425 if { (eval echo configure:5426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5426   rm -rf conftest*
5427   eval "ac_cv_lib_$ac_lib_var=yes"
5428 else
5429   echo "configure: failed program was:" >&5
5430   cat conftest.$ac_ext >&5
5431   rm -rf conftest*
5432   eval "ac_cv_lib_$ac_lib_var=no"
5433 fi
5434 rm -f conftest*
5435 LIBS="$ac_save_LIBS"
5436
5437 fi
5438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5439   echo "$ac_t""yes" 1>&6
5440     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5441     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5442   cat >> confdefs.h <<EOF
5443 #define $ac_tr_lib 1
5444 EOF
5445
5446   LIBS="-lsec $LIBS"
5447
5448 else
5449   echo "$ac_t""no" 1>&6
5450 fi
5451  
5452      for ac_func in set_auth_parameters
5453 do
5454 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5455 echo "configure:5456: checking for $ac_func" >&5
5456 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5457   echo $ac_n "(cached) $ac_c" 1>&6
5458 else
5459   cat > conftest.$ac_ext <<EOF
5460 #line 5461 "configure"
5461 #include "confdefs.h"
5462 /* System header to define __stub macros and hopefully few prototypes,
5463     which can conflict with char $ac_func(); below.  */
5464 #include <assert.h>
5465 /* Override any gcc2 internal prototype to avoid an error.  */
5466 /* We use char because int might match the return type of a gcc2
5467     builtin and then its argument prototype would still apply.  */
5468 char $ac_func();
5469
5470 int main() {
5471
5472 /* The GNU C library defines this for functions which it implements
5473     to always fail with ENOSYS.  Some functions are actually named
5474     something starting with __ and the normal name is an alias.  */
5475 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5476 choke me
5477 #else
5478 $ac_func();
5479 #endif
5480
5481 ; return 0; }
5482 EOF
5483 if { (eval echo configure:5484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5484   rm -rf conftest*
5485   eval "ac_cv_func_$ac_func=yes"
5486 else
5487   echo "configure: failed program was:" >&5
5488   cat conftest.$ac_ext >&5
5489   rm -rf conftest*
5490   eval "ac_cv_func_$ac_func=no"
5491 fi
5492 rm -f conftest*
5493 fi
5494
5495 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5496   echo "$ac_t""yes" 1>&6
5497     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5498   cat >> confdefs.h <<EOF
5499 #define $ac_tr_func 1
5500 EOF
5501  
5502 else
5503   echo "$ac_t""no" 1>&6
5504 fi
5505 done
5506
5507   ;;
5508   esac
5509
5510
5511 case "$LIBS" in
5512   *-lsecurity*) for ac_func in getspnam
5513 do
5514 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5515 echo "configure:5516: checking for $ac_func" >&5
5516 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5517   echo $ac_n "(cached) $ac_c" 1>&6
5518 else
5519   cat > conftest.$ac_ext <<EOF
5520 #line 5521 "configure"
5521 #include "confdefs.h"
5522 /* System header to define __stub macros and hopefully few prototypes,
5523     which can conflict with char $ac_func(); below.  */
5524 #include <assert.h>
5525 /* Override any gcc2 internal prototype to avoid an error.  */
5526 /* We use char because int might match the return type of a gcc2
5527     builtin and then its argument prototype would still apply.  */
5528 char $ac_func();
5529
5530 int main() {
5531
5532 /* The GNU C library defines this for functions which it implements
5533     to always fail with ENOSYS.  Some functions are actually named
5534     something starting with __ and the normal name is an alias.  */
5535 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5536 choke me
5537 #else
5538 $ac_func();
5539 #endif
5540
5541 ; return 0; }
5542 EOF
5543 if { (eval echo configure:5544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5544   rm -rf conftest*
5545   eval "ac_cv_func_$ac_func=yes"
5546 else
5547   echo "configure: failed program was:" >&5
5548   cat conftest.$ac_ext >&5
5549   rm -rf conftest*
5550   eval "ac_cv_func_$ac_func=no"
5551 fi
5552 rm -f conftest*
5553 fi
5554
5555 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5556   echo "$ac_t""yes" 1>&6
5557     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5558   cat >> confdefs.h <<EOF
5559 #define $ac_tr_func 1
5560 EOF
5561  
5562 else
5563   echo "$ac_t""no" 1>&6
5564 fi
5565 done
5566  ;;
5567   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
5568 echo "configure:5569: checking for getspnam in -lsecurity" >&5
5569 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
5570 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5571   echo $ac_n "(cached) $ac_c" 1>&6
5572 else
5573   ac_save_LIBS="$LIBS"
5574 LIBS="-lsecurity  $LIBS"
5575 cat > conftest.$ac_ext <<EOF
5576 #line 5577 "configure"
5577 #include "confdefs.h"
5578 /* Override any gcc2 internal prototype to avoid an error.  */
5579 /* We use char because int might match the return type of a gcc2
5580     builtin and then its argument prototype would still apply.  */
5581 char getspnam();
5582
5583 int main() {
5584 getspnam()
5585 ; return 0; }
5586 EOF
5587 if { (eval echo configure:5588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5588   rm -rf conftest*
5589   eval "ac_cv_lib_$ac_lib_var=yes"
5590 else
5591   echo "configure: failed program was:" >&5
5592   cat conftest.$ac_ext >&5
5593   rm -rf conftest*
5594   eval "ac_cv_lib_$ac_lib_var=no"
5595 fi
5596 rm -f conftest*
5597 LIBS="$ac_save_LIBS"
5598
5599 fi
5600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5601   echo "$ac_t""yes" 1>&6
5602     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5603     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5604   cat >> confdefs.h <<EOF
5605 #define $ac_tr_lib 1
5606 EOF
5607
5608   LIBS="-lsecurity $LIBS"
5609
5610 else
5611   echo "$ac_t""no" 1>&6
5612 fi
5613  
5614      for ac_func in getspnam
5615 do
5616 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5617 echo "configure:5618: checking for $ac_func" >&5
5618 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5619   echo $ac_n "(cached) $ac_c" 1>&6
5620 else
5621   cat > conftest.$ac_ext <<EOF
5622 #line 5623 "configure"
5623 #include "confdefs.h"
5624 /* System header to define __stub macros and hopefully few prototypes,
5625     which can conflict with char $ac_func(); below.  */
5626 #include <assert.h>
5627 /* Override any gcc2 internal prototype to avoid an error.  */
5628 /* We use char because int might match the return type of a gcc2
5629     builtin and then its argument prototype would still apply.  */
5630 char $ac_func();
5631
5632 int main() {
5633
5634 /* The GNU C library defines this for functions which it implements
5635     to always fail with ENOSYS.  Some functions are actually named
5636     something starting with __ and the normal name is an alias.  */
5637 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5638 choke me
5639 #else
5640 $ac_func();
5641 #endif
5642
5643 ; return 0; }
5644 EOF
5645 if { (eval echo configure:5646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5646   rm -rf conftest*
5647   eval "ac_cv_func_$ac_func=yes"
5648 else
5649   echo "configure: failed program was:" >&5
5650   cat conftest.$ac_ext >&5
5651   rm -rf conftest*
5652   eval "ac_cv_func_$ac_func=no"
5653 fi
5654 rm -f conftest*
5655 fi
5656
5657 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5658   echo "$ac_t""yes" 1>&6
5659     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5660   cat >> confdefs.h <<EOF
5661 #define $ac_tr_func 1
5662 EOF
5663  
5664 else
5665   echo "$ac_t""no" 1>&6
5666 fi
5667 done
5668
5669   ;;
5670   esac
5671
5672 case "$LIBS" in
5673   *-lsec*) for ac_func in getspnam
5674 do
5675 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5676 echo "configure:5677: checking for $ac_func" >&5
5677 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5678   echo $ac_n "(cached) $ac_c" 1>&6
5679 else
5680   cat > conftest.$ac_ext <<EOF
5681 #line 5682 "configure"
5682 #include "confdefs.h"
5683 /* System header to define __stub macros and hopefully few prototypes,
5684     which can conflict with char $ac_func(); below.  */
5685 #include <assert.h>
5686 /* Override any gcc2 internal prototype to avoid an error.  */
5687 /* We use char because int might match the return type of a gcc2
5688     builtin and then its argument prototype would still apply.  */
5689 char $ac_func();
5690
5691 int main() {
5692
5693 /* The GNU C library defines this for functions which it implements
5694     to always fail with ENOSYS.  Some functions are actually named
5695     something starting with __ and the normal name is an alias.  */
5696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5697 choke me
5698 #else
5699 $ac_func();
5700 #endif
5701
5702 ; return 0; }
5703 EOF
5704 if { (eval echo configure:5705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5705   rm -rf conftest*
5706   eval "ac_cv_func_$ac_func=yes"
5707 else
5708   echo "configure: failed program was:" >&5
5709   cat conftest.$ac_ext >&5
5710   rm -rf conftest*
5711   eval "ac_cv_func_$ac_func=no"
5712 fi
5713 rm -f conftest*
5714 fi
5715
5716 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5717   echo "$ac_t""yes" 1>&6
5718     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5719   cat >> confdefs.h <<EOF
5720 #define $ac_tr_func 1
5721 EOF
5722  
5723 else
5724   echo "$ac_t""no" 1>&6
5725 fi
5726 done
5727  ;;
5728   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
5729 echo "configure:5730: checking for getspnam in -lsec" >&5
5730 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
5731 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5732   echo $ac_n "(cached) $ac_c" 1>&6
5733 else
5734   ac_save_LIBS="$LIBS"
5735 LIBS="-lsec  $LIBS"
5736 cat > conftest.$ac_ext <<EOF
5737 #line 5738 "configure"
5738 #include "confdefs.h"
5739 /* Override any gcc2 internal prototype to avoid an error.  */
5740 /* We use char because int might match the return type of a gcc2
5741     builtin and then its argument prototype would still apply.  */
5742 char getspnam();
5743
5744 int main() {
5745 getspnam()
5746 ; return 0; }
5747 EOF
5748 if { (eval echo configure:5749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5749   rm -rf conftest*
5750   eval "ac_cv_lib_$ac_lib_var=yes"
5751 else
5752   echo "configure: failed program was:" >&5
5753   cat conftest.$ac_ext >&5
5754   rm -rf conftest*
5755   eval "ac_cv_lib_$ac_lib_var=no"
5756 fi
5757 rm -f conftest*
5758 LIBS="$ac_save_LIBS"
5759
5760 fi
5761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5762   echo "$ac_t""yes" 1>&6
5763     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5764     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5765   cat >> confdefs.h <<EOF
5766 #define $ac_tr_lib 1
5767 EOF
5768
5769   LIBS="-lsec $LIBS"
5770
5771 else
5772   echo "$ac_t""no" 1>&6
5773 fi
5774  
5775      for ac_func in getspnam
5776 do
5777 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5778 echo "configure:5779: checking for $ac_func" >&5
5779 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5780   echo $ac_n "(cached) $ac_c" 1>&6
5781 else
5782   cat > conftest.$ac_ext <<EOF
5783 #line 5784 "configure"
5784 #include "confdefs.h"
5785 /* System header to define __stub macros and hopefully few prototypes,
5786     which can conflict with char $ac_func(); below.  */
5787 #include <assert.h>
5788 /* Override any gcc2 internal prototype to avoid an error.  */
5789 /* We use char because int might match the return type of a gcc2
5790     builtin and then its argument prototype would still apply.  */
5791 char $ac_func();
5792
5793 int main() {
5794
5795 /* The GNU C library defines this for functions which it implements
5796     to always fail with ENOSYS.  Some functions are actually named
5797     something starting with __ and the normal name is an alias.  */
5798 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5799 choke me
5800 #else
5801 $ac_func();
5802 #endif
5803
5804 ; return 0; }
5805 EOF
5806 if { (eval echo configure:5807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5807   rm -rf conftest*
5808   eval "ac_cv_func_$ac_func=yes"
5809 else
5810   echo "configure: failed program was:" >&5
5811   cat conftest.$ac_ext >&5
5812   rm -rf conftest*
5813   eval "ac_cv_func_$ac_func=no"
5814 fi
5815 rm -f conftest*
5816 fi
5817
5818 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5819   echo "$ac_t""yes" 1>&6
5820     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5821   cat >> confdefs.h <<EOF
5822 #define $ac_tr_func 1
5823 EOF
5824  
5825 else
5826   echo "$ac_t""no" 1>&6
5827 fi
5828 done
5829
5830   ;;
5831   esac
5832
5833
5834 case "$LIBS" in
5835   *-lsecurity*) for ac_func in bigcrypt
5836 do
5837 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5838 echo "configure:5839: checking for $ac_func" >&5
5839 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5840   echo $ac_n "(cached) $ac_c" 1>&6
5841 else
5842   cat > conftest.$ac_ext <<EOF
5843 #line 5844 "configure"
5844 #include "confdefs.h"
5845 /* System header to define __stub macros and hopefully few prototypes,
5846     which can conflict with char $ac_func(); below.  */
5847 #include <assert.h>
5848 /* Override any gcc2 internal prototype to avoid an error.  */
5849 /* We use char because int might match the return type of a gcc2
5850     builtin and then its argument prototype would still apply.  */
5851 char $ac_func();
5852
5853 int main() {
5854
5855 /* The GNU C library defines this for functions which it implements
5856     to always fail with ENOSYS.  Some functions are actually named
5857     something starting with __ and the normal name is an alias.  */
5858 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5859 choke me
5860 #else
5861 $ac_func();
5862 #endif
5863
5864 ; return 0; }
5865 EOF
5866 if { (eval echo configure:5867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5867   rm -rf conftest*
5868   eval "ac_cv_func_$ac_func=yes"
5869 else
5870   echo "configure: failed program was:" >&5
5871   cat conftest.$ac_ext >&5
5872   rm -rf conftest*
5873   eval "ac_cv_func_$ac_func=no"
5874 fi
5875 rm -f conftest*
5876 fi
5877
5878 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5879   echo "$ac_t""yes" 1>&6
5880     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5881   cat >> confdefs.h <<EOF
5882 #define $ac_tr_func 1
5883 EOF
5884  
5885 else
5886   echo "$ac_t""no" 1>&6
5887 fi
5888 done
5889  ;;
5890   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
5891 echo "configure:5892: checking for bigcrypt in -lsecurity" >&5
5892 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
5893 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5894   echo $ac_n "(cached) $ac_c" 1>&6
5895 else
5896   ac_save_LIBS="$LIBS"
5897 LIBS="-lsecurity  $LIBS"
5898 cat > conftest.$ac_ext <<EOF
5899 #line 5900 "configure"
5900 #include "confdefs.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 bigcrypt();
5905
5906 int main() {
5907 bigcrypt()
5908 ; return 0; }
5909 EOF
5910 if { (eval echo configure:5911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5911   rm -rf conftest*
5912   eval "ac_cv_lib_$ac_lib_var=yes"
5913 else
5914   echo "configure: failed program was:" >&5
5915   cat conftest.$ac_ext >&5
5916   rm -rf conftest*
5917   eval "ac_cv_lib_$ac_lib_var=no"
5918 fi
5919 rm -f conftest*
5920 LIBS="$ac_save_LIBS"
5921
5922 fi
5923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5924   echo "$ac_t""yes" 1>&6
5925     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5926     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5927   cat >> confdefs.h <<EOF
5928 #define $ac_tr_lib 1
5929 EOF
5930
5931   LIBS="-lsecurity $LIBS"
5932
5933 else
5934   echo "$ac_t""no" 1>&6
5935 fi
5936  
5937      for ac_func in bigcrypt
5938 do
5939 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5940 echo "configure:5941: checking for $ac_func" >&5
5941 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5942   echo $ac_n "(cached) $ac_c" 1>&6
5943 else
5944   cat > conftest.$ac_ext <<EOF
5945 #line 5946 "configure"
5946 #include "confdefs.h"
5947 /* System header to define __stub macros and hopefully few prototypes,
5948     which can conflict with char $ac_func(); below.  */
5949 #include <assert.h>
5950 /* Override any gcc2 internal prototype to avoid an error.  */
5951 /* We use char because int might match the return type of a gcc2
5952     builtin and then its argument prototype would still apply.  */
5953 char $ac_func();
5954
5955 int main() {
5956
5957 /* The GNU C library defines this for functions which it implements
5958     to always fail with ENOSYS.  Some functions are actually named
5959     something starting with __ and the normal name is an alias.  */
5960 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5961 choke me
5962 #else
5963 $ac_func();
5964 #endif
5965
5966 ; return 0; }
5967 EOF
5968 if { (eval echo configure:5969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5969   rm -rf conftest*
5970   eval "ac_cv_func_$ac_func=yes"
5971 else
5972   echo "configure: failed program was:" >&5
5973   cat conftest.$ac_ext >&5
5974   rm -rf conftest*
5975   eval "ac_cv_func_$ac_func=no"
5976 fi
5977 rm -f conftest*
5978 fi
5979
5980 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5981   echo "$ac_t""yes" 1>&6
5982     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5983   cat >> confdefs.h <<EOF
5984 #define $ac_tr_func 1
5985 EOF
5986  
5987 else
5988   echo "$ac_t""no" 1>&6
5989 fi
5990 done
5991
5992   ;;
5993   esac
5994
5995 case "$LIBS" in
5996   *-lsec*) for ac_func in bigcrypt
5997 do
5998 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5999 echo "configure:6000: checking for $ac_func" >&5
6000 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6001   echo $ac_n "(cached) $ac_c" 1>&6
6002 else
6003   cat > conftest.$ac_ext <<EOF
6004 #line 6005 "configure"
6005 #include "confdefs.h"
6006 /* System header to define __stub macros and hopefully few prototypes,
6007     which can conflict with char $ac_func(); below.  */
6008 #include <assert.h>
6009 /* Override any gcc2 internal prototype to avoid an error.  */
6010 /* We use char because int might match the return type of a gcc2
6011     builtin and then its argument prototype would still apply.  */
6012 char $ac_func();
6013
6014 int main() {
6015
6016 /* The GNU C library defines this for functions which it implements
6017     to always fail with ENOSYS.  Some functions are actually named
6018     something starting with __ and the normal name is an alias.  */
6019 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6020 choke me
6021 #else
6022 $ac_func();
6023 #endif
6024
6025 ; return 0; }
6026 EOF
6027 if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6028   rm -rf conftest*
6029   eval "ac_cv_func_$ac_func=yes"
6030 else
6031   echo "configure: failed program was:" >&5
6032   cat conftest.$ac_ext >&5
6033   rm -rf conftest*
6034   eval "ac_cv_func_$ac_func=no"
6035 fi
6036 rm -f conftest*
6037 fi
6038
6039 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6040   echo "$ac_t""yes" 1>&6
6041     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6042   cat >> confdefs.h <<EOF
6043 #define $ac_tr_func 1
6044 EOF
6045  
6046 else
6047   echo "$ac_t""no" 1>&6
6048 fi
6049 done
6050  ;;
6051   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
6052 echo "configure:6053: checking for bigcrypt in -lsec" >&5
6053 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
6054 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6055   echo $ac_n "(cached) $ac_c" 1>&6
6056 else
6057   ac_save_LIBS="$LIBS"
6058 LIBS="-lsec  $LIBS"
6059 cat > conftest.$ac_ext <<EOF
6060 #line 6061 "configure"
6061 #include "confdefs.h"
6062 /* Override any gcc2 internal prototype to avoid an error.  */
6063 /* We use char because int might match the return type of a gcc2
6064     builtin and then its argument prototype would still apply.  */
6065 char bigcrypt();
6066
6067 int main() {
6068 bigcrypt()
6069 ; return 0; }
6070 EOF
6071 if { (eval echo configure:6072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6072   rm -rf conftest*
6073   eval "ac_cv_lib_$ac_lib_var=yes"
6074 else
6075   echo "configure: failed program was:" >&5
6076   cat conftest.$ac_ext >&5
6077   rm -rf conftest*
6078   eval "ac_cv_lib_$ac_lib_var=no"
6079 fi
6080 rm -f conftest*
6081 LIBS="$ac_save_LIBS"
6082
6083 fi
6084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6085   echo "$ac_t""yes" 1>&6
6086     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6087     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6088   cat >> confdefs.h <<EOF
6089 #define $ac_tr_lib 1
6090 EOF
6091
6092   LIBS="-lsec $LIBS"
6093
6094 else
6095   echo "$ac_t""no" 1>&6
6096 fi
6097  
6098      for ac_func in bigcrypt
6099 do
6100 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6101 echo "configure:6102: checking for $ac_func" >&5
6102 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6103   echo $ac_n "(cached) $ac_c" 1>&6
6104 else
6105   cat > conftest.$ac_ext <<EOF
6106 #line 6107 "configure"
6107 #include "confdefs.h"
6108 /* System header to define __stub macros and hopefully few prototypes,
6109     which can conflict with char $ac_func(); below.  */
6110 #include <assert.h>
6111 /* Override any gcc2 internal prototype to avoid an error.  */
6112 /* We use char because int might match the return type of a gcc2
6113     builtin and then its argument prototype would still apply.  */
6114 char $ac_func();
6115
6116 int main() {
6117
6118 /* The GNU C library defines this for functions which it implements
6119     to always fail with ENOSYS.  Some functions are actually named
6120     something starting with __ and the normal name is an alias.  */
6121 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6122 choke me
6123 #else
6124 $ac_func();
6125 #endif
6126
6127 ; return 0; }
6128 EOF
6129 if { (eval echo configure:6130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6130   rm -rf conftest*
6131   eval "ac_cv_func_$ac_func=yes"
6132 else
6133   echo "configure: failed program was:" >&5
6134   cat conftest.$ac_ext >&5
6135   rm -rf conftest*
6136   eval "ac_cv_func_$ac_func=no"
6137 fi
6138 rm -f conftest*
6139 fi
6140
6141 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6142   echo "$ac_t""yes" 1>&6
6143     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6144   cat >> confdefs.h <<EOF
6145 #define $ac_tr_func 1
6146 EOF
6147  
6148 else
6149   echo "$ac_t""no" 1>&6
6150 fi
6151 done
6152
6153   ;;
6154   esac
6155
6156
6157 case "$LIBS" in
6158   *-lsecurity*) for ac_func in getprpwnam
6159 do
6160 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6161 echo "configure:6162: checking for $ac_func" >&5
6162 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6163   echo $ac_n "(cached) $ac_c" 1>&6
6164 else
6165   cat > conftest.$ac_ext <<EOF
6166 #line 6167 "configure"
6167 #include "confdefs.h"
6168 /* System header to define __stub macros and hopefully few prototypes,
6169     which can conflict with char $ac_func(); below.  */
6170 #include <assert.h>
6171 /* Override any gcc2 internal prototype to avoid an error.  */
6172 /* We use char because int might match the return type of a gcc2
6173     builtin and then its argument prototype would still apply.  */
6174 char $ac_func();
6175
6176 int main() {
6177
6178 /* The GNU C library defines this for functions which it implements
6179     to always fail with ENOSYS.  Some functions are actually named
6180     something starting with __ and the normal name is an alias.  */
6181 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6182 choke me
6183 #else
6184 $ac_func();
6185 #endif
6186
6187 ; return 0; }
6188 EOF
6189 if { (eval echo configure:6190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6190   rm -rf conftest*
6191   eval "ac_cv_func_$ac_func=yes"
6192 else
6193   echo "configure: failed program was:" >&5
6194   cat conftest.$ac_ext >&5
6195   rm -rf conftest*
6196   eval "ac_cv_func_$ac_func=no"
6197 fi
6198 rm -f conftest*
6199 fi
6200
6201 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6202   echo "$ac_t""yes" 1>&6
6203     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6204   cat >> confdefs.h <<EOF
6205 #define $ac_tr_func 1
6206 EOF
6207  
6208 else
6209   echo "$ac_t""no" 1>&6
6210 fi
6211 done
6212  ;;
6213   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
6214 echo "configure:6215: checking for getprpwnam in -lsecurity" >&5
6215 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
6216 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6217   echo $ac_n "(cached) $ac_c" 1>&6
6218 else
6219   ac_save_LIBS="$LIBS"
6220 LIBS="-lsecurity  $LIBS"
6221 cat > conftest.$ac_ext <<EOF
6222 #line 6223 "configure"
6223 #include "confdefs.h"
6224 /* Override any gcc2 internal prototype to avoid an error.  */
6225 /* We use char because int might match the return type of a gcc2
6226     builtin and then its argument prototype would still apply.  */
6227 char getprpwnam();
6228
6229 int main() {
6230 getprpwnam()
6231 ; return 0; }
6232 EOF
6233 if { (eval echo configure:6234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6234   rm -rf conftest*
6235   eval "ac_cv_lib_$ac_lib_var=yes"
6236 else
6237   echo "configure: failed program was:" >&5
6238   cat conftest.$ac_ext >&5
6239   rm -rf conftest*
6240   eval "ac_cv_lib_$ac_lib_var=no"
6241 fi
6242 rm -f conftest*
6243 LIBS="$ac_save_LIBS"
6244
6245 fi
6246 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6247   echo "$ac_t""yes" 1>&6
6248     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6249     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6250   cat >> confdefs.h <<EOF
6251 #define $ac_tr_lib 1
6252 EOF
6253
6254   LIBS="-lsecurity $LIBS"
6255
6256 else
6257   echo "$ac_t""no" 1>&6
6258 fi
6259  
6260      for ac_func in getprpwnam
6261 do
6262 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6263 echo "configure:6264: checking for $ac_func" >&5
6264 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6265   echo $ac_n "(cached) $ac_c" 1>&6
6266 else
6267   cat > conftest.$ac_ext <<EOF
6268 #line 6269 "configure"
6269 #include "confdefs.h"
6270 /* System header to define __stub macros and hopefully few prototypes,
6271     which can conflict with char $ac_func(); below.  */
6272 #include <assert.h>
6273 /* Override any gcc2 internal prototype to avoid an error.  */
6274 /* We use char because int might match the return type of a gcc2
6275     builtin and then its argument prototype would still apply.  */
6276 char $ac_func();
6277
6278 int main() {
6279
6280 /* The GNU C library defines this for functions which it implements
6281     to always fail with ENOSYS.  Some functions are actually named
6282     something starting with __ and the normal name is an alias.  */
6283 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6284 choke me
6285 #else
6286 $ac_func();
6287 #endif
6288
6289 ; return 0; }
6290 EOF
6291 if { (eval echo configure:6292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6292   rm -rf conftest*
6293   eval "ac_cv_func_$ac_func=yes"
6294 else
6295   echo "configure: failed program was:" >&5
6296   cat conftest.$ac_ext >&5
6297   rm -rf conftest*
6298   eval "ac_cv_func_$ac_func=no"
6299 fi
6300 rm -f conftest*
6301 fi
6302
6303 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6304   echo "$ac_t""yes" 1>&6
6305     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6306   cat >> confdefs.h <<EOF
6307 #define $ac_tr_func 1
6308 EOF
6309  
6310 else
6311   echo "$ac_t""no" 1>&6
6312 fi
6313 done
6314
6315   ;;
6316   esac
6317
6318 case "$LIBS" in
6319   *-lsec*) for ac_func in getprpwnam
6320 do
6321 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6322 echo "configure:6323: checking for $ac_func" >&5
6323 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6324   echo $ac_n "(cached) $ac_c" 1>&6
6325 else
6326   cat > conftest.$ac_ext <<EOF
6327 #line 6328 "configure"
6328 #include "confdefs.h"
6329 /* System header to define __stub macros and hopefully few prototypes,
6330     which can conflict with char $ac_func(); below.  */
6331 #include <assert.h>
6332 /* Override any gcc2 internal prototype to avoid an error.  */
6333 /* We use char because int might match the return type of a gcc2
6334     builtin and then its argument prototype would still apply.  */
6335 char $ac_func();
6336
6337 int main() {
6338
6339 /* The GNU C library defines this for functions which it implements
6340     to always fail with ENOSYS.  Some functions are actually named
6341     something starting with __ and the normal name is an alias.  */
6342 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6343 choke me
6344 #else
6345 $ac_func();
6346 #endif
6347
6348 ; return 0; }
6349 EOF
6350 if { (eval echo configure:6351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6351   rm -rf conftest*
6352   eval "ac_cv_func_$ac_func=yes"
6353 else
6354   echo "configure: failed program was:" >&5
6355   cat conftest.$ac_ext >&5
6356   rm -rf conftest*
6357   eval "ac_cv_func_$ac_func=no"
6358 fi
6359 rm -f conftest*
6360 fi
6361
6362 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6363   echo "$ac_t""yes" 1>&6
6364     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6365   cat >> confdefs.h <<EOF
6366 #define $ac_tr_func 1
6367 EOF
6368  
6369 else
6370   echo "$ac_t""no" 1>&6
6371 fi
6372 done
6373  ;;
6374   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
6375 echo "configure:6376: checking for getprpwnam in -lsec" >&5
6376 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
6377 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6378   echo $ac_n "(cached) $ac_c" 1>&6
6379 else
6380   ac_save_LIBS="$LIBS"
6381 LIBS="-lsec  $LIBS"
6382 cat > conftest.$ac_ext <<EOF
6383 #line 6384 "configure"
6384 #include "confdefs.h"
6385 /* Override any gcc2 internal prototype to avoid an error.  */
6386 /* We use char because int might match the return type of a gcc2
6387     builtin and then its argument prototype would still apply.  */
6388 char getprpwnam();
6389
6390 int main() {
6391 getprpwnam()
6392 ; return 0; }
6393 EOF
6394 if { (eval echo configure:6395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6395   rm -rf conftest*
6396   eval "ac_cv_lib_$ac_lib_var=yes"
6397 else
6398   echo "configure: failed program was:" >&5
6399   cat conftest.$ac_ext >&5
6400   rm -rf conftest*
6401   eval "ac_cv_lib_$ac_lib_var=no"
6402 fi
6403 rm -f conftest*
6404 LIBS="$ac_save_LIBS"
6405
6406 fi
6407 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6408   echo "$ac_t""yes" 1>&6
6409     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6410     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6411   cat >> confdefs.h <<EOF
6412 #define $ac_tr_lib 1
6413 EOF
6414
6415   LIBS="-lsec $LIBS"
6416
6417 else
6418   echo "$ac_t""no" 1>&6
6419 fi
6420  
6421      for ac_func in getprpwnam
6422 do
6423 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6424 echo "configure:6425: checking for $ac_func" >&5
6425 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6426   echo $ac_n "(cached) $ac_c" 1>&6
6427 else
6428   cat > conftest.$ac_ext <<EOF
6429 #line 6430 "configure"
6430 #include "confdefs.h"
6431 /* System header to define __stub macros and hopefully few prototypes,
6432     which can conflict with char $ac_func(); below.  */
6433 #include <assert.h>
6434 /* Override any gcc2 internal prototype to avoid an error.  */
6435 /* We use char because int might match the return type of a gcc2
6436     builtin and then its argument prototype would still apply.  */
6437 char $ac_func();
6438
6439 int main() {
6440
6441 /* The GNU C library defines this for functions which it implements
6442     to always fail with ENOSYS.  Some functions are actually named
6443     something starting with __ and the normal name is an alias.  */
6444 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6445 choke me
6446 #else
6447 $ac_func();
6448 #endif
6449
6450 ; return 0; }
6451 EOF
6452 if { (eval echo configure:6453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6453   rm -rf conftest*
6454   eval "ac_cv_func_$ac_func=yes"
6455 else
6456   echo "configure: failed program was:" >&5
6457   cat conftest.$ac_ext >&5
6458   rm -rf conftest*
6459   eval "ac_cv_func_$ac_func=no"
6460 fi
6461 rm -f conftest*
6462 fi
6463
6464 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6465   echo "$ac_t""yes" 1>&6
6466     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6467   cat >> confdefs.h <<EOF
6468 #define $ac_tr_func 1
6469 EOF
6470  
6471 else
6472   echo "$ac_t""no" 1>&6
6473 fi
6474 done
6475
6476   ;;
6477   esac
6478
6479
6480 # this bit needs to be modified for each OS that is suported by
6481 # smbwrapper. You need to specify how to created a shared library and
6482 # how to compile C code to produce PIC object files
6483
6484 # these are the defaults, good for lots of systems
6485 HOST_OS="$host_os"
6486 LDSHFLAGS="-shared"
6487
6488 # and these are for particular systems
6489 case "$host_os" in
6490                 *linux*)   cat >> confdefs.h <<\EOF
6491 #define LINUX 1
6492 EOF
6493 ;;
6494                 *solaris*) cat >> confdefs.h <<\EOF
6495 #define SUNOS5 1
6496 EOF
6497
6498                                         LDSHFLAGS="-G"
6499                 ;;
6500                 *sunos*) cat >> confdefs.h <<\EOF
6501 #define SUNOS4 1
6502 EOF
6503
6504                                         LDSHFLAGS=""
6505                 ;;
6506                 *bsd*) LDSHFLAGS="-shared -Bshareable"
6507                 ;;
6508                 *irix*) cat >> confdefs.h <<\EOF
6509 #define IRIX 1
6510 EOF
6511
6512                         ATTEMPT_WRAP32_BUILD=yes
6513                 ;;
6514                 *aix*) cat >> confdefs.h <<\EOF
6515 #define AIX 1
6516 EOF
6517 ;;
6518                 *hpux*) cat >> confdefs.h <<\EOF
6519 #define HPUX 1
6520 EOF
6521 ;;
6522                 *qnx*) cat >> confdefs.h <<\EOF
6523 #define QNX 1
6524 EOF
6525 ;;
6526                 *osf*) cat >> confdefs.h <<\EOF
6527 #define OSF1 1
6528 EOF
6529 ;;
6530                 *sco*) cat >> confdefs.h <<\EOF
6531 #define SCO 1
6532 EOF
6533 ;;
6534                 *next2*) cat >> confdefs.h <<\EOF
6535 #define NEXT2 1
6536 EOF
6537 ;;
6538                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
6539 set dummy groff; ac_word=$2
6540 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6541 echo "configure:6542: checking for $ac_word" >&5
6542 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
6543   echo $ac_n "(cached) $ac_c" 1>&6
6544 else
6545   if test -n "$ROFF"; then
6546   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
6547 else
6548   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6549   for ac_dir in $PATH; do
6550     test -z "$ac_dir" && ac_dir=.
6551     if test -f $ac_dir/$ac_word; then
6552       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
6553       break
6554     fi
6555   done
6556   IFS="$ac_save_ifs"
6557 fi
6558 fi
6559 ROFF="$ac_cv_prog_ROFF"
6560 if test -n "$ROFF"; then
6561   echo "$ac_t""$ROFF" 1>&6
6562 else
6563   echo "$ac_t""no" 1>&6
6564 fi
6565 ;;
6566                 *sysv4.2*) echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6567 echo "configure:6568: checking for strcasecmp in -lresolv" >&5
6568 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6569 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6570   echo $ac_n "(cached) $ac_c" 1>&6
6571 else
6572   ac_save_LIBS="$LIBS"
6573 LIBS="-lresolv  $LIBS"
6574 cat > conftest.$ac_ext <<EOF
6575 #line 6576 "configure"
6576 #include "confdefs.h"
6577 /* Override any gcc2 internal prototype to avoid an error.  */
6578 /* We use char because int might match the return type of a gcc2
6579     builtin and then its argument prototype would still apply.  */
6580 char strcasecmp();
6581
6582 int main() {
6583 strcasecmp()
6584 ; return 0; }
6585 EOF
6586 if { (eval echo configure:6587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6587   rm -rf conftest*
6588   eval "ac_cv_lib_$ac_lib_var=yes"
6589 else
6590   echo "configure: failed program was:" >&5
6591   cat conftest.$ac_ext >&5
6592   rm -rf conftest*
6593   eval "ac_cv_lib_$ac_lib_var=no"
6594 fi
6595 rm -f conftest*
6596 LIBS="$ac_save_LIBS"
6597
6598 fi
6599 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6600   echo "$ac_t""yes" 1>&6
6601     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6602     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6603   cat >> confdefs.h <<EOF
6604 #define $ac_tr_lib 1
6605 EOF
6606
6607   LIBS="-lresolv $LIBS"
6608
6609 else
6610   echo "$ac_t""no" 1>&6
6611 fi
6612 ;;
6613 esac
6614
6615 # try to work out how to produce pic code with this compiler
6616 PICFLAG=""
6617 echo $ac_n "checking whether ${CC-cc} accepts -fpic""... $ac_c" 1>&6
6618 echo "configure:6619: checking whether ${CC-cc} accepts -fpic" >&5
6619 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then
6620   echo $ac_n "(cached) $ac_c" 1>&6
6621 else
6622   echo 'void f(){}' > conftest.c
6623 if test -z "`${CC-cc} -fpic -c conftest.c 2>&1`"; then
6624   ac_cv_prog_cc_fpic=yes
6625 else
6626   ac_cv_prog_cc_fpic=no
6627 fi
6628 rm -f conftest*
6629
6630 fi
6631
6632 echo "$ac_t""$ac_cv_prog_cc_fpic" 1>&6
6633 if test $ac_cv_prog_cc_fpic = yes; then
6634    PICFLAG="-fpic";
6635 fi
6636 if test x$PICFLAG = x; then
6637   echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
6638 echo "configure:6639: checking whether ${CC-cc} accepts -Kpic" >&5
6639 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
6640   echo $ac_n "(cached) $ac_c" 1>&6
6641 else
6642   echo 'void f(){}' > conftest.c
6643 if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
6644   ac_cv_prog_cc_Kpic=yes
6645 else
6646   ac_cv_prog_cc_Kpic=no
6647 fi
6648 rm -f conftest*
6649
6650 fi
6651
6652 echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
6653   if test $ac_cv_prog_cc_Kpic = yes; then
6654     PICFLAG="-Kpic";
6655   fi 
6656 fi
6657 if test x$PICFLAG = x; then
6658   echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
6659 echo "configure:6660: checking whether ${CC-cc} accepts -KPIC" >&5
6660 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
6661   echo $ac_n "(cached) $ac_c" 1>&6
6662 else
6663   echo 'void f(){}' > conftest.c
6664 if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
6665   ac_cv_prog_cc_KPIC=yes
6666 else
6667   ac_cv_prog_cc_KPIC=no
6668 fi
6669 rm -f conftest*
6670
6671 fi
6672
6673 echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
6674   if test $ac_cv_prog_cc_KPIC = yes; then
6675     PICFLAG="-KPIC";
6676   fi 
6677 fi
6678
6679 ################
6680
6681 echo $ac_n "checking for long long""... $ac_c" 1>&6
6682 echo "configure:6683: checking for long long" >&5
6683 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
6684   echo $ac_n "(cached) $ac_c" 1>&6
6685 else
6686   
6687 if test "$cross_compiling" = yes; then
6688   samba_cv_have_longlong=cross
6689 else
6690   cat > conftest.$ac_ext <<EOF
6691 #line 6692 "configure"
6692 #include "confdefs.h"
6693 #include <stdio.h>
6694 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
6695 EOF
6696 if { (eval echo configure:6697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6697 then
6698   samba_cv_have_longlong=yes
6699 else
6700   echo "configure: failed program was:" >&5
6701   cat conftest.$ac_ext >&5
6702   rm -fr conftest*
6703   samba_cv_have_longlong=no
6704 fi
6705 rm -fr conftest*
6706 fi
6707
6708 fi
6709
6710 echo "$ac_t""$samba_cv_have_longlong" 1>&6
6711 if test x"$samba_cv_have_longlong" = x"yes"; then
6712     cat >> confdefs.h <<\EOF
6713 #define HAVE_LONGLONG 1
6714 EOF
6715
6716 fi
6717
6718 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
6719 echo "configure:6720: checking for 64 bit off_t" >&5
6720 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
6721   echo $ac_n "(cached) $ac_c" 1>&6
6722 else
6723   
6724 if test "$cross_compiling" = yes; then
6725   samba_cv_SIZEOF_OFF_T=cross
6726 else
6727   cat > conftest.$ac_ext <<EOF
6728 #line 6729 "configure"
6729 #include "confdefs.h"
6730 #include <stdio.h>
6731 #include <sys/stat.h>
6732 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
6733 EOF
6734 if { (eval echo configure:6735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6735 then
6736   samba_cv_SIZEOF_OFF_T=yes
6737 else
6738   echo "configure: failed program was:" >&5
6739   cat conftest.$ac_ext >&5
6740   rm -fr conftest*
6741   samba_cv_SIZEOF_OFF_T=no
6742 fi
6743 rm -fr conftest*
6744 fi
6745
6746 fi
6747
6748 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
6749 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
6750     cat >> confdefs.h <<\EOF
6751 #define SIZEOF_OFF_T 8
6752 EOF
6753
6754 fi
6755
6756 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
6757 echo "configure:6758: checking for off64_t" >&5
6758 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
6759   echo $ac_n "(cached) $ac_c" 1>&6
6760 else
6761   
6762 if test "$cross_compiling" = yes; then
6763   samba_cv_HAVE_OFF64_T=cross
6764 else
6765   cat > conftest.$ac_ext <<EOF
6766 #line 6767 "configure"
6767 #include "confdefs.h"
6768 #include <stdio.h>
6769 #include <sys/stat.h>
6770 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
6771 EOF
6772 if { (eval echo configure:6773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6773 then
6774   samba_cv_HAVE_OFF64_T=yes
6775 else
6776   echo "configure: failed program was:" >&5
6777   cat conftest.$ac_ext >&5
6778   rm -fr conftest*
6779   samba_cv_HAVE_OFF64_T=no
6780 fi
6781 rm -fr conftest*
6782 fi
6783
6784 fi
6785
6786 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
6787 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
6788     cat >> confdefs.h <<\EOF
6789 #define HAVE_OFF64_T 1
6790 EOF
6791
6792 fi
6793
6794 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
6795 echo "configure:6796: checking for 64 bit ino_t" >&5
6796 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
6797   echo $ac_n "(cached) $ac_c" 1>&6
6798 else
6799   
6800 if test "$cross_compiling" = yes; then
6801   samba_cv_SIZEOF_INO_T=cross
6802 else
6803   cat > conftest.$ac_ext <<EOF
6804 #line 6805 "configure"
6805 #include "confdefs.h"
6806 #include <stdio.h>
6807 #include <sys/stat.h>
6808 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
6809 EOF
6810 if { (eval echo configure:6811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6811 then
6812   samba_cv_SIZEOF_INO_T=yes
6813 else
6814   echo "configure: failed program was:" >&5
6815   cat conftest.$ac_ext >&5
6816   rm -fr conftest*
6817   samba_cv_SIZEOF_INO_T=no
6818 fi
6819 rm -fr conftest*
6820 fi
6821
6822 fi
6823
6824 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
6825 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
6826     cat >> confdefs.h <<\EOF
6827 #define SIZEOF_INO_T 8
6828 EOF
6829
6830 fi
6831
6832 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
6833 echo "configure:6834: checking for ino64_t" >&5
6834 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
6835   echo $ac_n "(cached) $ac_c" 1>&6
6836 else
6837   
6838 if test "$cross_compiling" = yes; then
6839   samba_cv_HAVE_INO64_T=cross
6840 else
6841   cat > conftest.$ac_ext <<EOF
6842 #line 6843 "configure"
6843 #include "confdefs.h"
6844 #include <stdio.h>
6845 #include <sys/stat.h>
6846 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
6847 EOF
6848 if { (eval echo configure:6849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6849 then
6850   samba_cv_HAVE_INO64_T=yes
6851 else
6852   echo "configure: failed program was:" >&5
6853   cat conftest.$ac_ext >&5
6854   rm -fr conftest*
6855   samba_cv_HAVE_INO64_T=no
6856 fi
6857 rm -fr conftest*
6858 fi
6859
6860 fi
6861
6862 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
6863 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
6864     cat >> confdefs.h <<\EOF
6865 #define HAVE_INO64_T 1
6866 EOF
6867
6868 fi
6869
6870 echo $ac_n "checking for union semun""... $ac_c" 1>&6
6871 echo "configure:6872: checking for union semun" >&5
6872 if eval "test \"`echo '$''{'samba_cv_HAVE_UNION_SEMUN'+set}'`\" = set"; then
6873   echo $ac_n "(cached) $ac_c" 1>&6
6874 else
6875   
6876 if test "$cross_compiling" = yes; then
6877   samba_cv_HAVE_UNION_SEMUN=cross
6878 else
6879   cat > conftest.$ac_ext <<EOF
6880 #line 6881 "configure"
6881 #include "confdefs.h"
6882
6883 #include <sys/types.h>
6884 #include <sys/ipc.h>
6885 #include <sys/sem.h>
6886 main() { union semun ss; exit(0); }
6887 EOF
6888 if { (eval echo configure:6889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6889 then
6890   samba_cv_HAVE_UNION_SEMUN=yes
6891 else
6892   echo "configure: failed program was:" >&5
6893   cat conftest.$ac_ext >&5
6894   rm -fr conftest*
6895   samba_cv_HAVE_UNION_SEMUN=no
6896 fi
6897 rm -fr conftest*
6898 fi
6899
6900 fi
6901
6902 echo "$ac_t""$samba_cv_HAVE_UNION_SEMUN" 1>&6
6903 if test x"$samba_cv_HAVE_UNION_SEMUN" = x"yes"; then
6904     cat >> confdefs.h <<\EOF
6905 #define HAVE_UNION_SEMUN 1
6906 EOF
6907
6908 fi
6909
6910 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
6911 echo "configure:6912: checking for unsigned char" >&5
6912 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
6913   echo $ac_n "(cached) $ac_c" 1>&6
6914 else
6915   
6916 if test "$cross_compiling" = yes; then
6917   samba_cv_HAVE_UNSIGNED_CHAR=cross
6918 else
6919   cat > conftest.$ac_ext <<EOF
6920 #line 6921 "configure"
6921 #include "confdefs.h"
6922 #include <stdio.h>
6923 main() { char c; c=250; exit((c > 0)?0:1); }
6924 EOF
6925 if { (eval echo configure:6926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6926 then
6927   samba_cv_HAVE_UNSIGNED_CHAR=yes
6928 else
6929   echo "configure: failed program was:" >&5
6930   cat conftest.$ac_ext >&5
6931   rm -fr conftest*
6932   samba_cv_HAVE_UNSIGNED_CHAR=no
6933 fi
6934 rm -fr conftest*
6935 fi
6936
6937 fi
6938
6939 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
6940 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
6941     cat >> confdefs.h <<\EOF
6942 #define HAVE_UNSIGNED_CHAR 1
6943 EOF
6944
6945 fi
6946
6947 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
6948 echo "configure:6949: checking for sin_len in sock" >&5
6949 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
6950   echo $ac_n "(cached) $ac_c" 1>&6
6951 else
6952   
6953 cat > conftest.$ac_ext <<EOF
6954 #line 6955 "configure"
6955 #include "confdefs.h"
6956 #include <sys/types.h>
6957 #include <sys/socket.h>
6958 #include <netinet/in.h>
6959 int main() {
6960 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
6961 ; return 0; }
6962 EOF
6963 if { (eval echo configure:6964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6964   rm -rf conftest*
6965   samba_cv_HAVE_SOCK_SIN_LEN=yes
6966 else
6967   echo "configure: failed program was:" >&5
6968   cat conftest.$ac_ext >&5
6969   rm -rf conftest*
6970   samba_cv_HAVE_SOCK_SIN_LEN=no
6971 fi
6972 rm -f conftest*
6973 fi
6974
6975 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
6976 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
6977     cat >> confdefs.h <<\EOF
6978 #define HAVE_SOCK_SIN_LEN 1
6979 EOF
6980
6981 fi
6982
6983 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
6984 echo "configure:6985: checking whether seekdir returns void" >&5
6985 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
6986   echo $ac_n "(cached) $ac_c" 1>&6
6987 else
6988   
6989 cat > conftest.$ac_ext <<EOF
6990 #line 6991 "configure"
6991 #include "confdefs.h"
6992 #include <sys/types.h>
6993 #include <dirent.h>
6994 void seekdir(DIR *d, long loc) { return; }
6995 int main() {
6996 return 0;
6997 ; return 0; }
6998 EOF
6999 if { (eval echo configure:7000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7000   rm -rf conftest*
7001   samba_cv_SEEKDIR_RETURNS_VOID=yes
7002 else
7003   echo "configure: failed program was:" >&5
7004   cat conftest.$ac_ext >&5
7005   rm -rf conftest*
7006   samba_cv_SEEKDIR_RETURNS_VOID=no
7007 fi
7008 rm -f conftest*
7009 fi
7010
7011 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
7012 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
7013     cat >> confdefs.h <<\EOF
7014 #define SEEKDIR_RETURNS_VOID 1
7015 EOF
7016
7017 fi
7018
7019 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
7020 echo "configure:7021: checking for __FILE__ macro" >&5
7021 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
7022   echo $ac_n "(cached) $ac_c" 1>&6
7023 else
7024   
7025 cat > conftest.$ac_ext <<EOF
7026 #line 7027 "configure"
7027 #include "confdefs.h"
7028 #include <stdio.h>
7029 int main() {
7030 printf("%s\n", __FILE__);
7031 ; return 0; }
7032 EOF
7033 if { (eval echo configure:7034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7034   rm -rf conftest*
7035   samba_cv_HAVE_FILE_MACRO=yes
7036 else
7037   echo "configure: failed program was:" >&5
7038   cat conftest.$ac_ext >&5
7039   rm -rf conftest*
7040   samba_cv_HAVE_FILE_MACRO=no
7041 fi
7042 rm -f conftest*
7043 fi
7044
7045 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
7046 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
7047     cat >> confdefs.h <<\EOF
7048 #define HAVE_FILE_MACRO 1
7049 EOF
7050
7051 fi
7052
7053 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
7054 echo "configure:7055: checking for __FUNCTION__ macro" >&5
7055 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
7056   echo $ac_n "(cached) $ac_c" 1>&6
7057 else
7058   
7059 cat > conftest.$ac_ext <<EOF
7060 #line 7061 "configure"
7061 #include "confdefs.h"
7062 #include <stdio.h>
7063 int main() {
7064 printf("%s\n", __FUNCTION__);
7065 ; return 0; }
7066 EOF
7067 if { (eval echo configure:7068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7068   rm -rf conftest*
7069   samba_cv_HAVE_FUNCTION_MACRO=yes
7070 else
7071   echo "configure: failed program was:" >&5
7072   cat conftest.$ac_ext >&5
7073   rm -rf conftest*
7074   samba_cv_HAVE_FUNCTION_MACRO=no
7075 fi
7076 rm -f conftest*
7077 fi
7078
7079 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
7080 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
7081     cat >> confdefs.h <<\EOF
7082 #define HAVE_FUNCTION_MACRO 1
7083 EOF
7084
7085 fi
7086
7087 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
7088 echo "configure:7089: checking if gettimeofday takes tz argument" >&5
7089 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
7090   echo $ac_n "(cached) $ac_c" 1>&6
7091 else
7092   
7093 if test "$cross_compiling" = yes; then
7094   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
7095 else
7096   cat > conftest.$ac_ext <<EOF
7097 #line 7098 "configure"
7098 #include "confdefs.h"
7099
7100 #include <sys/time.h>
7101 #include <unistd.h>
7102 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
7103 EOF
7104 if { (eval echo configure:7105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7105 then
7106   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
7107 else
7108   echo "configure: failed program was:" >&5
7109   cat conftest.$ac_ext >&5
7110   rm -fr conftest*
7111   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
7112 fi
7113 rm -fr conftest*
7114 fi
7115
7116 fi
7117
7118 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
7119 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
7120     cat >> confdefs.h <<\EOF
7121 #define HAVE_GETTIMEOFDAY_TZ 1
7122 EOF
7123
7124 fi
7125
7126
7127 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
7128 echo "configure:7129: checking for broken readdir" >&5
7129 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
7130   echo $ac_n "(cached) $ac_c" 1>&6
7131 else
7132   
7133 if test "$cross_compiling" = yes; then
7134   samba_cv_HAVE_BROKEN_READDIR=cross
7135 else
7136   cat > conftest.$ac_ext <<EOF
7137 #line 7138 "configure"
7138 #include "confdefs.h"
7139 #include <sys/types.h>
7140 #include <dirent.h>
7141 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
7142 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
7143 di->d_name[0] == 0) exit(0); exit(1);} 
7144 EOF
7145 if { (eval echo configure:7146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7146 then
7147   samba_cv_HAVE_BROKEN_READDIR=yes
7148 else
7149   echo "configure: failed program was:" >&5
7150   cat conftest.$ac_ext >&5
7151   rm -fr conftest*
7152   samba_cv_HAVE_BROKEN_READDIR=no
7153 fi
7154 rm -fr conftest*
7155 fi
7156
7157 fi
7158
7159 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
7160 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
7161     cat >> confdefs.h <<\EOF
7162 #define HAVE_BROKEN_READDIR 1
7163 EOF
7164
7165 fi
7166
7167 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
7168 echo "configure:7169: checking for utimbuf" >&5
7169 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
7170   echo $ac_n "(cached) $ac_c" 1>&6
7171 else
7172   
7173 cat > conftest.$ac_ext <<EOF
7174 #line 7175 "configure"
7175 #include "confdefs.h"
7176 #include <sys/types.h>
7177 #include <utime.h>
7178 int main() {
7179 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
7180 ; return 0; }
7181 EOF
7182 if { (eval echo configure:7183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7183   rm -rf conftest*
7184   samba_cv_HAVE_UTIMBUF=yes
7185 else
7186   echo "configure: failed program was:" >&5
7187   cat conftest.$ac_ext >&5
7188   rm -rf conftest*
7189   samba_cv_HAVE_UTIMBUF=no
7190 fi
7191 rm -f conftest*
7192 fi
7193
7194 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
7195 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
7196     cat >> confdefs.h <<\EOF
7197 #define HAVE_UTIMBUF 1
7198 EOF
7199
7200 fi
7201
7202 echo $ac_n "checking for kernel oplock type definitions""... $ac_c" 1>&6
7203 echo "configure:7204: checking for kernel oplock type definitions" >&5
7204 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS'+set}'`\" = set"; then
7205   echo $ac_n "(cached) $ac_c" 1>&6
7206 else
7207   
7208 cat > conftest.$ac_ext <<EOF
7209 #line 7210 "configure"
7210 #include "confdefs.h"
7211 #include <sys/types.h>
7212 #include <fcntl.h>
7213 int main() {
7214 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
7215 ; return 0; }
7216 EOF
7217 if { (eval echo configure:7218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7218   rm -rf conftest*
7219   samba_cv_HAVE_KERNEL_OPLOCKS=yes
7220 else
7221   echo "configure: failed program was:" >&5
7222   cat conftest.$ac_ext >&5
7223   rm -rf conftest*
7224   samba_cv_HAVE_KERNEL_OPLOCKS=no
7225 fi
7226 rm -f conftest*
7227 fi
7228
7229 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS" 1>&6
7230 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS" = x"yes"; then
7231     cat >> confdefs.h <<\EOF
7232 #define HAVE_KERNEL_OPLOCKS 1
7233 EOF
7234
7235 fi
7236
7237 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
7238 echo "configure:7239: checking for irix specific capabilities" >&5
7239 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
7240   echo $ac_n "(cached) $ac_c" 1>&6
7241 else
7242   
7243 if test "$cross_compiling" = yes; then
7244   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
7245 else
7246   cat > conftest.$ac_ext <<EOF
7247 #line 7248 "configure"
7248 #include "confdefs.h"
7249 #include <sys/types.h>
7250 #include <sys/capability.h>
7251 main() {
7252  cap_t cap;
7253  if ((cap = cap_get_proc()) == NULL)
7254    exit(1);
7255  cap->cap_effective |= CAP_NETWORK_MGT;
7256  cap->cap_inheritable |= CAP_NETWORK_MGT;
7257  cap_set_proc(cap);
7258  exit(0);
7259 }
7260
7261 EOF
7262 if { (eval echo configure:7263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7263 then
7264   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
7265 else
7266   echo "configure: failed program was:" >&5
7267   cat conftest.$ac_ext >&5
7268   rm -fr conftest*
7269   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
7270 fi
7271 rm -fr conftest*
7272 fi
7273
7274 fi
7275
7276 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
7277 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
7278     cat >> confdefs.h <<\EOF
7279 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
7280 EOF
7281
7282 fi
7283
7284 #
7285 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
7286 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
7287 #
7288
7289 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
7290 echo "configure:7291: checking for int16 typedef included by rpc/rpc.h" >&5
7291 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
7292   echo $ac_n "(cached) $ac_c" 1>&6
7293 else
7294   
7295 cat > conftest.$ac_ext <<EOF
7296 #line 7297 "configure"
7297 #include "confdefs.h"
7298 #include <sys/types.h>
7299 #if defined(HAVE_RPC_RPC_H)
7300 #include <rpc/rpc.h>
7301 #endif
7302 int main() {
7303 int16 testvar;
7304 ; return 0; }
7305 EOF
7306 if { (eval echo configure:7307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7307   rm -rf conftest*
7308   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
7309 else
7310   echo "configure: failed program was:" >&5
7311   cat conftest.$ac_ext >&5
7312   rm -rf conftest*
7313   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
7314 fi
7315 rm -f conftest*
7316 fi
7317
7318 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
7319 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
7320     cat >> confdefs.h <<\EOF
7321 #define HAVE_INT16_FROM_RPC_RPC_H 1
7322 EOF
7323
7324 fi
7325
7326 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
7327 echo "configure:7328: checking for uint16 typedef included by rpc/rpc.h" >&5
7328 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
7329   echo $ac_n "(cached) $ac_c" 1>&6
7330 else
7331   
7332 cat > conftest.$ac_ext <<EOF
7333 #line 7334 "configure"
7334 #include "confdefs.h"
7335 #include <sys/types.h>
7336 #if defined(HAVE_RPC_RPC_H)
7337 #include <rpc/rpc.h>
7338 #endif
7339 int main() {
7340 uint16 testvar;
7341 ; return 0; }
7342 EOF
7343 if { (eval echo configure:7344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7344   rm -rf conftest*
7345   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
7346 else
7347   echo "configure: failed program was:" >&5
7348   cat conftest.$ac_ext >&5
7349   rm -rf conftest*
7350   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
7351 fi
7352 rm -f conftest*
7353 fi
7354
7355 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
7356 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
7357     cat >> confdefs.h <<\EOF
7358 #define HAVE_UINT16_FROM_RPC_RPC_H 1
7359 EOF
7360
7361 fi
7362
7363 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
7364 echo "configure:7365: checking for int32 typedef included by rpc/rpc.h" >&5
7365 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
7366   echo $ac_n "(cached) $ac_c" 1>&6
7367 else
7368   
7369 cat > conftest.$ac_ext <<EOF
7370 #line 7371 "configure"
7371 #include "confdefs.h"
7372 #include <sys/types.h>
7373 #if defined(HAVE_RPC_RPC_H)
7374 #include <rpc/rpc.h>
7375 #endif
7376 int main() {
7377 int32 testvar;
7378 ; return 0; }
7379 EOF
7380 if { (eval echo configure:7381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7381   rm -rf conftest*
7382   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
7383 else
7384   echo "configure: failed program was:" >&5
7385   cat conftest.$ac_ext >&5
7386   rm -rf conftest*
7387   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
7388 fi
7389 rm -f conftest*
7390 fi
7391
7392 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
7393 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
7394     cat >> confdefs.h <<\EOF
7395 #define HAVE_INT32_FROM_RPC_RPC_H 1
7396 EOF
7397
7398 fi
7399
7400 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
7401 echo "configure:7402: checking for uint32 typedef included by rpc/rpc.h" >&5
7402 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
7403   echo $ac_n "(cached) $ac_c" 1>&6
7404 else
7405   
7406 cat > conftest.$ac_ext <<EOF
7407 #line 7408 "configure"
7408 #include "confdefs.h"
7409 #include <sys/types.h>
7410 #if defined(HAVE_RPC_RPC_H)
7411 #include <rpc/rpc.h>
7412 #endif
7413 int main() {
7414 uint32 testvar;
7415 ; return 0; }
7416 EOF
7417 if { (eval echo configure:7418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7418   rm -rf conftest*
7419   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
7420 else
7421   echo "configure: failed program was:" >&5
7422   cat conftest.$ac_ext >&5
7423   rm -rf conftest*
7424   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
7425 fi
7426 rm -f conftest*
7427 fi
7428
7429 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
7430 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
7431     cat >> confdefs.h <<\EOF
7432 #define HAVE_UINT32_FROM_RPC_RPC_H 1
7433 EOF
7434
7435 fi
7436
7437 echo $ac_n "checking for test routines""... $ac_c" 1>&6
7438 echo "configure:7439: checking for test routines" >&5
7439 if test "$cross_compiling" = yes; then
7440   echo "configure: warning: cannot run when cross-compiling" 1>&2
7441 else
7442   cat > conftest.$ac_ext <<EOF
7443 #line 7444 "configure"
7444 #include "confdefs.h"
7445 #include "${srcdir-.}/tests/trivial.c"
7446 EOF
7447 if { (eval echo configure:7448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7448 then
7449   echo "$ac_t""yes" 1>&6
7450 else
7451   echo "configure: failed program was:" >&5
7452   cat conftest.$ac_ext >&5
7453   rm -fr conftest*
7454   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
7455 fi
7456 rm -fr conftest*
7457 fi
7458
7459
7460 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
7461 echo "configure:7462: checking for ftruncate extend" >&5
7462 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
7463   echo $ac_n "(cached) $ac_c" 1>&6
7464 else
7465   
7466 if test "$cross_compiling" = yes; then
7467   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
7468 else
7469   cat > conftest.$ac_ext <<EOF
7470 #line 7471 "configure"
7471 #include "confdefs.h"
7472 #include "${srcdir-.}/tests/ftruncate.c"
7473 EOF
7474 if { (eval echo configure:7475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7475 then
7476   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
7477 else
7478   echo "configure: failed program was:" >&5
7479   cat conftest.$ac_ext >&5
7480   rm -fr conftest*
7481   samba_cv_HAVE_FTRUNCATE_EXTEND=no
7482 fi
7483 rm -fr conftest*
7484 fi
7485
7486 fi
7487
7488 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
7489 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
7490     cat >> confdefs.h <<\EOF
7491 #define HAVE_FTRUNCATE_EXTEND 1
7492 EOF
7493
7494 fi
7495
7496 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
7497 echo "configure:7498: checking for broken getgroups" >&5
7498 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
7499   echo $ac_n "(cached) $ac_c" 1>&6
7500 else
7501   
7502 if test "$cross_compiling" = yes; then
7503   samba_cv_HAVE_BROKEN_GETGROUPS=cross
7504 else
7505   cat > conftest.$ac_ext <<EOF
7506 #line 7507 "configure"
7507 #include "confdefs.h"
7508 #include "${srcdir-.}/tests/getgroups.c"
7509 EOF
7510 if { (eval echo configure:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7511 then
7512   samba_cv_HAVE_BROKEN_GETGROUPS=yes
7513 else
7514   echo "configure: failed program was:" >&5
7515   cat conftest.$ac_ext >&5
7516   rm -fr conftest*
7517   samba_cv_HAVE_BROKEN_GETGROUPS=no
7518 fi
7519 rm -fr conftest*
7520 fi
7521
7522 fi
7523
7524 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
7525 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
7526     cat >> confdefs.h <<\EOF
7527 #define HAVE_BROKEN_GETGROUPS 1
7528 EOF
7529
7530 fi
7531
7532 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
7533 echo "configure:7534: checking whether getpass should be replaced" >&5
7534 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
7535   echo $ac_n "(cached) $ac_c" 1>&6
7536 else
7537   
7538 SAVE_CPPFLAGS="$CPPFLAGS"
7539 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/include -I${srcdir-.}/ubiqx"
7540 cat > conftest.$ac_ext <<EOF
7541 #line 7542 "configure"
7542 #include "confdefs.h"
7543
7544 #define REPLACE_GETPASS 1
7545 #define NO_CONFIG_H 1
7546 #define main dont_declare_main
7547 #include "${srcdir-.}/lib/getsmbpass.c"
7548 #undef main
7549
7550 int main() {
7551
7552 ; return 0; }
7553 EOF
7554 if { (eval echo configure:7555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7555   rm -rf conftest*
7556   samba_cv_REPLACE_GETPASS=yes
7557 else
7558   echo "configure: failed program was:" >&5
7559   cat conftest.$ac_ext >&5
7560   rm -rf conftest*
7561   samba_cv_REPLACE_GETPASS=no
7562 fi
7563 rm -f conftest*
7564 CPPFLAGS="$SAVE_CPPFLAGS"
7565
7566 fi
7567
7568 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
7569 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
7570         cat >> confdefs.h <<\EOF
7571 #define REPLACE_GETPASS 1
7572 EOF
7573
7574 fi
7575
7576 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
7577 echo "configure:7578: checking for broken inet_ntoa" >&5
7578 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
7579   echo $ac_n "(cached) $ac_c" 1>&6
7580 else
7581   
7582 if test "$cross_compiling" = yes; then
7583   samba_cv_REPLACE_INET_NTOA=cross
7584 else
7585   cat > conftest.$ac_ext <<EOF
7586 #line 7587 "configure"
7587 #include "confdefs.h"
7588
7589 #include <stdio.h>
7590 #include <sys/types.h>
7591 #include <netinet/in.h>
7592 #include <arpa/inet.h>
7593 main() { struct in_addr ip; ip.s_addr = 0x12345678;
7594 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
7595     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
7596 exit(1);}
7597 EOF
7598 if { (eval echo configure:7599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7599 then
7600   samba_cv_REPLACE_INET_NTOA=yes
7601 else
7602   echo "configure: failed program was:" >&5
7603   cat conftest.$ac_ext >&5
7604   rm -fr conftest*
7605   samba_cv_REPLACE_INET_NTOA=no
7606 fi
7607 rm -fr conftest*
7608 fi
7609
7610 fi
7611
7612 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
7613 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
7614     cat >> confdefs.h <<\EOF
7615 #define REPLACE_INET_NTOA 1
7616 EOF
7617
7618 fi
7619
7620 echo $ac_n "checking for root""... $ac_c" 1>&6
7621 echo "configure:7622: checking for root" >&5
7622 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
7623   echo $ac_n "(cached) $ac_c" 1>&6
7624 else
7625   
7626 if test "$cross_compiling" = yes; then
7627   samba_cv_HAVE_ROOT=cross
7628 else
7629   cat > conftest.$ac_ext <<EOF
7630 #line 7631 "configure"
7631 #include "confdefs.h"
7632 main() { exit(getuid() != 0); }
7633 EOF
7634 if { (eval echo configure:7635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7635 then
7636   samba_cv_HAVE_ROOT=yes
7637 else
7638   echo "configure: failed program was:" >&5
7639   cat conftest.$ac_ext >&5
7640   rm -fr conftest*
7641   samba_cv_HAVE_ROOT=no
7642 fi
7643 rm -fr conftest*
7644 fi
7645
7646 fi
7647
7648 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
7649 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
7650     cat >> confdefs.h <<\EOF
7651 #define HAVE_ROOT 1
7652 EOF
7653
7654 else
7655     echo "configure: warning: running as non-root will disable some tests" 1>&2
7656 fi
7657
7658 netmask=no;
7659 echo $ac_n "checking for netmask ifconf""... $ac_c" 1>&6
7660 echo "configure:7661: checking for netmask ifconf" >&5
7661 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_IFCONF'+set}'`\" = set"; then
7662   echo $ac_n "(cached) $ac_c" 1>&6
7663 else
7664   
7665 if test "$cross_compiling" = yes; then
7666   samba_cv_HAVE_NETMASK_IFCONF=cross
7667 else
7668   cat > conftest.$ac_ext <<EOF
7669 #line 7670 "configure"
7670 #include "confdefs.h"
7671
7672 #define HAVE_NETMASK_IFCONF 1
7673 #define AUTOCONF 1
7674 #include "${srcdir-.}/lib/netmask.c"
7675 EOF
7676 if { (eval echo configure:7677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7677 then
7678   samba_cv_HAVE_NETMASK_IFCONF=yes
7679 else
7680   echo "configure: failed program was:" >&5
7681   cat conftest.$ac_ext >&5
7682   rm -fr conftest*
7683   samba_cv_HAVE_NETMASK_IFCONF=no
7684 fi
7685 rm -fr conftest*
7686 fi
7687
7688 fi
7689
7690 echo "$ac_t""$samba_cv_HAVE_NETMASK_IFCONF" 1>&6
7691 if test x"$samba_cv_HAVE_NETMASK_IFCONF" = x"yes"; then
7692     netmask=yes;cat >> confdefs.h <<\EOF
7693 #define HAVE_NETMASK_IFCONF 1
7694 EOF
7695
7696 fi
7697
7698 if test $netmask = no; then
7699 echo $ac_n "checking for netmask ifreq""... $ac_c" 1>&6
7700 echo "configure:7701: checking for netmask ifreq" >&5
7701 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_IFREQ'+set}'`\" = set"; then
7702   echo $ac_n "(cached) $ac_c" 1>&6
7703 else
7704   
7705 if test "$cross_compiling" = yes; then
7706   samba_cv_HAVE_NETMASK_IFREQ=cross
7707 else
7708   cat > conftest.$ac_ext <<EOF
7709 #line 7710 "configure"
7710 #include "confdefs.h"
7711
7712 #define HAVE_NETMASK_IFREQ 1
7713 #define AUTOCONF 1
7714 #include "${srcdir-.}/lib/netmask.c"
7715 EOF
7716 if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7717 then
7718   samba_cv_HAVE_NETMASK_IFREQ=yes
7719 else
7720   echo "configure: failed program was:" >&5
7721   cat conftest.$ac_ext >&5
7722   rm -fr conftest*
7723   samba_cv_HAVE_NETMASK_IFREQ=no
7724 fi
7725 rm -fr conftest*
7726 fi
7727
7728 fi
7729
7730 echo "$ac_t""$samba_cv_HAVE_NETMASK_IFREQ" 1>&6
7731 if test x"$samba_cv_HAVE_NETMASK_IFREQ" = x"yes"; then
7732     netmask=yes;cat >> confdefs.h <<\EOF
7733 #define HAVE_NETMASK_IFREQ 1
7734 EOF
7735
7736 fi
7737 fi
7738
7739 if test $netmask = no; then
7740 echo $ac_n "checking for netmask AIX""... $ac_c" 1>&6
7741 echo "configure:7742: checking for netmask AIX" >&5
7742 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_AIX'+set}'`\" = set"; then
7743   echo $ac_n "(cached) $ac_c" 1>&6
7744 else
7745   
7746 if test "$cross_compiling" = yes; then
7747   samba_cv_HAVE_NETMASK_AIX=cross
7748 else
7749   cat > conftest.$ac_ext <<EOF
7750 #line 7751 "configure"
7751 #include "confdefs.h"
7752
7753 #define HAVE_NETMASK_AIX 1
7754 #define AUTOCONF 1
7755 #include "${srcdir-.}/lib/netmask.c"
7756 EOF
7757 if { (eval echo configure:7758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7758 then
7759   samba_cv_HAVE_NETMASK_AIX=yes
7760 else
7761   echo "configure: failed program was:" >&5
7762   cat conftest.$ac_ext >&5
7763   rm -fr conftest*
7764   samba_cv_HAVE_NETMASK_AIX=no
7765 fi
7766 rm -fr conftest*
7767 fi
7768
7769 fi
7770
7771 echo "$ac_t""$samba_cv_HAVE_NETMASK_AIX" 1>&6
7772 if test x"$samba_cv_HAVE_NETMASK_AIX" = x"yes"; then
7773     netmask=yes;cat >> confdefs.h <<\EOF
7774 #define HAVE_NETMASK_AIX 1
7775 EOF
7776
7777 fi
7778 fi
7779
7780 echo $ac_n "checking for trapdoor seteuid""... $ac_c" 1>&6
7781 echo "configure:7782: checking for trapdoor seteuid" >&5
7782 if eval "test \"`echo '$''{'samba_cv_HAVE_TRAPDOOR_UID'+set}'`\" = set"; then
7783   echo $ac_n "(cached) $ac_c" 1>&6
7784 else
7785   
7786 if test "$cross_compiling" = yes; then
7787   :
7788 else
7789   cat > conftest.$ac_ext <<EOF
7790 #line 7791 "configure"
7791 #include "confdefs.h"
7792 #include "${srcdir-.}/tests/trapdoor.c"
7793 EOF
7794 if { (eval echo configure:7795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7795 then
7796   samba_cv_HAVE_TRAPDOOR_UID=no
7797 else
7798   echo "configure: failed program was:" >&5
7799   cat conftest.$ac_ext >&5
7800   rm -fr conftest*
7801   samba_cv_HAVE_TRAPDOOR_UID=yes
7802 fi
7803 rm -fr conftest*
7804 fi
7805
7806 fi
7807
7808 echo "$ac_t""$samba_cv_HAVE_TRAPDOOR_UID" 1>&6
7809 if test x"$samba_cv_HAVE_TRAPDOOR_UID" = x"yes"; then
7810     cat >> confdefs.h <<\EOF
7811 #define HAVE_TRAPDOOR_UID 1
7812 EOF
7813
7814 fi
7815
7816 echo $ac_n "checking for shared mmap""... $ac_c" 1>&6
7817 echo "configure:7818: checking for shared mmap" >&5
7818 if eval "test \"`echo '$''{'samba_cv_HAVE_SHARED_MMAP'+set}'`\" = set"; then
7819   echo $ac_n "(cached) $ac_c" 1>&6
7820 else
7821   
7822 if test "$cross_compiling" = yes; then
7823   samba_cv_HAVE_SHARED_MMAP=cross
7824 else
7825   cat > conftest.$ac_ext <<EOF
7826 #line 7827 "configure"
7827 #include "confdefs.h"
7828 #include "${srcdir-.}/tests/shared_mmap.c"
7829 EOF
7830 if { (eval echo configure:7831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7831 then
7832   samba_cv_HAVE_SHARED_MMAP=yes
7833 else
7834   echo "configure: failed program was:" >&5
7835   cat conftest.$ac_ext >&5
7836   rm -fr conftest*
7837   samba_cv_HAVE_SHARED_MMAP=no
7838 fi
7839 rm -fr conftest*
7840 fi
7841
7842 fi
7843
7844 echo "$ac_t""$samba_cv_HAVE_SHARED_MMAP" 1>&6
7845 if test x"$samba_cv_HAVE_SHARED_MMAP" = x"yes"; then
7846     cat >> confdefs.h <<\EOF
7847 #define HAVE_SHARED_MMAP 1
7848 EOF
7849
7850 fi
7851
7852 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
7853 echo "configure:7854: checking for fcntl locking" >&5
7854 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
7855   echo $ac_n "(cached) $ac_c" 1>&6
7856 else
7857   
7858 if test "$cross_compiling" = yes; then
7859   samba_cv_HAVE_FCNTL_LOCK=cross
7860 else
7861   cat > conftest.$ac_ext <<EOF
7862 #line 7863 "configure"
7863 #include "confdefs.h"
7864 #include "${srcdir-.}/tests/fcntl_lock.c"
7865 EOF
7866 if { (eval echo configure:7867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7867 then
7868   samba_cv_HAVE_FCNTL_LOCK=yes
7869 else
7870   echo "configure: failed program was:" >&5
7871   cat conftest.$ac_ext >&5
7872   rm -fr conftest*
7873   samba_cv_HAVE_FCNTL_LOCK=no
7874 fi
7875 rm -fr conftest*
7876 fi
7877
7878 fi
7879
7880 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
7881 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
7882     cat >> confdefs.h <<\EOF
7883 #define HAVE_FCNTL_LOCK 1
7884 EOF
7885
7886 fi
7887
7888 echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
7889 echo "configure:7890: checking for 64 bit fcntl locking" >&5
7890 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
7891   echo $ac_n "(cached) $ac_c" 1>&6
7892 else
7893   
7894 if test "$cross_compiling" = yes; then
7895   samba_cv_HAVE_STRUCT_FLOCK64=cross
7896 else
7897   cat > conftest.$ac_ext <<EOF
7898 #line 7899 "configure"
7899 #include "confdefs.h"
7900
7901 #include <stdio.h>
7902 #include <stdlib.h>
7903
7904 #ifdef HAVE_FCNTL_H
7905 #include <fcntl.h>
7906 #endif
7907
7908 #ifdef HAVE_SYS_FCNTL_H
7909 #include <sys/fcntl.h>
7910 #endif
7911 main() { struct flock64 fl64;
7912 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
7913 exit(0);
7914 #else
7915 exit(1);
7916 #endif
7917 }
7918 EOF
7919 if { (eval echo configure:7920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7920 then
7921   samba_cv_HAVE_STRUCT_FLOCK64=yes
7922 else
7923   echo "configure: failed program was:" >&5
7924   cat conftest.$ac_ext >&5
7925   rm -fr conftest*
7926   samba_cv_HAVE_STRUCT_FLOCK64=no
7927 fi
7928 rm -fr conftest*
7929 fi
7930
7931 fi
7932
7933 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
7934 if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
7935     cat >> confdefs.h <<\EOF
7936 #define HAVE_STRUCT_FLOCK64 1
7937 EOF
7938
7939 fi
7940
7941 echo $ac_n "checking for sysv ipc""... $ac_c" 1>&6
7942 echo "configure:7943: checking for sysv ipc" >&5
7943 if eval "test \"`echo '$''{'samba_cv_HAVE_SYSV_IPC'+set}'`\" = set"; then
7944   echo $ac_n "(cached) $ac_c" 1>&6
7945 else
7946   
7947 if test "$cross_compiling" = yes; then
7948   samba_cv_HAVE_SYSV_IPC=cross
7949 else
7950   cat > conftest.$ac_ext <<EOF
7951 #line 7952 "configure"
7952 #include "confdefs.h"
7953 #include "${srcdir-.}/tests/sysv_ipc.c"
7954 EOF
7955 if { (eval echo configure:7956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7956 then
7957   samba_cv_HAVE_SYSV_IPC=yes
7958 else
7959   echo "configure: failed program was:" >&5
7960   cat conftest.$ac_ext >&5
7961   rm -fr conftest*
7962   samba_cv_HAVE_SYSV_IPC=no
7963 fi
7964 rm -fr conftest*
7965 fi
7966
7967 fi
7968
7969 echo "$ac_t""$samba_cv_HAVE_SYSV_IPC" 1>&6
7970 if test x"$samba_cv_HAVE_SYSV_IPC" = x"yes"; then
7971     cat >> confdefs.h <<\EOF
7972 #define HAVE_SYSV_IPC 1
7973 EOF
7974
7975 fi
7976
7977 #################################################
7978 # check for smbwrapper support
7979 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
7980 echo "configure:7981: checking whether to use smbwrapper" >&5
7981 # Check whether --with-smbwrapper or --without-smbwrapper was given.
7982 if test "${with_smbwrapper+set}" = set; then
7983   withval="$with_smbwrapper"
7984    case "$withval" in
7985   yes)
7986     echo "$ac_t""yes" 1>&6
7987     cat >> confdefs.h <<\EOF
7988 #define WITH_SMBWRAPPER 1
7989 EOF
7990
7991         WRAP="bin/smbsh bin/smbwrapper.so"
7992
7993         if test x$ATTEMPT_WRAP32_BUILD = x; then
7994                 WRAP32=""
7995         else
7996                         WRAP32=bin/smbwrapper.32.so
7997         fi
7998
7999 # Conditions under which smbwrapper should not be built.
8000
8001         if test x$PICFLAG = x; then
8002            echo No support for PIC code - disabling smbwrapper and smbsh
8003            WRAP=""
8004            WRAP32=""
8005         elif test x$ac_cv_func_syscall = xno; then
8006            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
8007            WRAP=""
8008            WRAP32=""
8009         fi
8010     ;;
8011   *)
8012     echo "$ac_t""no" 1>&6
8013     ;;
8014   esac 
8015 else
8016   echo "$ac_t""no" 1>&6
8017
8018 fi
8019
8020
8021 #################################################
8022 # check for the AFS filesystem
8023 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
8024 echo "configure:8025: checking whether to use AFS" >&5
8025 # Check whether --with-afs or --without-afs was given.
8026 if test "${with_afs+set}" = set; then
8027   withval="$with_afs"
8028    case "$withval" in
8029   yes)
8030     echo "$ac_t""yes" 1>&6
8031     cat >> confdefs.h <<\EOF
8032 #define WITH_AFS 1
8033 EOF
8034
8035     ;;
8036   *)
8037     echo "$ac_t""no" 1>&6
8038     ;;
8039   esac 
8040 else
8041   echo "$ac_t""no" 1>&6
8042
8043 fi
8044
8045
8046
8047 #################################################
8048 # check for the DFS auth system
8049 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
8050 echo "configure:8051: checking whether to use DFS auth" >&5
8051 # Check whether --with-dfs or --without-dfs was given.
8052 if test "${with_dfs+set}" = set; then
8053   withval="$with_dfs"
8054    case "$withval" in
8055   yes)
8056     echo "$ac_t""yes" 1>&6
8057     cat >> confdefs.h <<\EOF
8058 #define WITH_DFS 1
8059 EOF
8060
8061     ;;
8062   *)
8063     echo "$ac_t""no" 1>&6
8064     ;;
8065   esac 
8066 else
8067   echo "$ac_t""no" 1>&6
8068
8069 fi
8070
8071
8072 #################################################
8073 # check for Kerberos IV auth system
8074 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
8075 echo "configure:8076: checking whether to use Kerberos IV" >&5
8076 # Check whether --with-krb4 or --without-krb4 was given.
8077 if test "${with_krb4+set}" = set; then
8078   withval="$with_krb4"
8079      echo "$ac_t""yes" 1>&6
8080     cat >> confdefs.h <<\EOF
8081 #define KRB4_AUTH 1
8082 EOF
8083
8084     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
8085 echo "configure:8086: checking for dn_expand in -lresolv" >&5
8086 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
8087 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8088   echo $ac_n "(cached) $ac_c" 1>&6
8089 else
8090   ac_save_LIBS="$LIBS"
8091 LIBS="-lresolv  $LIBS"
8092 cat > conftest.$ac_ext <<EOF
8093 #line 8094 "configure"
8094 #include "confdefs.h"
8095 /* Override any gcc2 internal prototype to avoid an error.  */
8096 /* We use char because int might match the return type of a gcc2
8097     builtin and then its argument prototype would still apply.  */
8098 char dn_expand();
8099
8100 int main() {
8101 dn_expand()
8102 ; return 0; }
8103 EOF
8104 if { (eval echo configure:8105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8105   rm -rf conftest*
8106   eval "ac_cv_lib_$ac_lib_var=yes"
8107 else
8108   echo "configure: failed program was:" >&5
8109   cat conftest.$ac_ext >&5
8110   rm -rf conftest*
8111   eval "ac_cv_lib_$ac_lib_var=no"
8112 fi
8113 rm -f conftest*
8114 LIBS="$ac_save_LIBS"
8115
8116 fi
8117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8118   echo "$ac_t""yes" 1>&6
8119     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8120     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8121   cat >> confdefs.h <<EOF
8122 #define $ac_tr_lib 1
8123 EOF
8124
8125   LIBS="-lresolv $LIBS"
8126
8127 else
8128   echo "$ac_t""no" 1>&6
8129 fi
8130
8131     LIBS="$LIBS -lkrb -ldes"
8132     CFLAGS="$CFLAGS -I$withval/include"
8133     LDFLAGS="$LDFLAGS -L$withval/lib"
8134 else
8135   echo "$ac_t""no" 1>&6
8136
8137 fi
8138
8139
8140 #################################################
8141 # check for automount support
8142 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
8143 echo "configure:8144: checking whether to use AUTOMOUNT" >&5
8144 # Check whether --with-automount or --without-automount was given.
8145 if test "${with_automount+set}" = set; then
8146   withval="$with_automount"
8147    case "$withval" in
8148   yes)
8149     echo "$ac_t""yes" 1>&6
8150     cat >> confdefs.h <<\EOF
8151 #define WITH_AUTOMOUNT 1
8152 EOF
8153
8154     ;;
8155   *)
8156     echo "$ac_t""no" 1>&6
8157     ;;
8158   esac 
8159 else
8160   echo "$ac_t""no" 1>&6
8161
8162 fi
8163
8164
8165 #################################################
8166 # check for smbmount support
8167 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
8168 echo "configure:8169: checking whether to use SMBMOUNT" >&5
8169 # Check whether --with-smbmount or --without-smbmount was given.
8170 if test "${with_smbmount+set}" = set; then
8171   withval="$with_smbmount"
8172    case "$withval" in
8173   yes)
8174     echo "$ac_t""yes" 1>&6
8175     cat >> confdefs.h <<\EOF
8176 #define WITH_SMBMOUNT 1
8177 EOF
8178
8179     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
8180     ;;
8181   *)
8182     echo "$ac_t""no" 1>&6
8183     MPROGS=
8184     ;;
8185   esac 
8186 else
8187   echo "$ac_t""no" 1>&6
8188   MPROGS=
8189
8190 fi
8191
8192
8193 #################################################
8194 # check for a LDAP password database
8195 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
8196 echo "configure:8197: checking whether to use LDAP password database" >&5
8197 # Check whether --with-ldap or --without-ldap was given.
8198 if test "${with_ldap+set}" = set; then
8199   withval="$with_ldap"
8200    case "$withval" in
8201   yes)
8202     echo "$ac_t""yes" 1>&6
8203     cat >> confdefs.h <<\EOF
8204 #define WITH_LDAP 1
8205 EOF
8206
8207     ;;
8208   *)
8209     echo "$ac_t""no" 1>&6
8210     ;;
8211   esac 
8212 else
8213   echo "$ac_t""no" 1>&6
8214
8215 fi
8216
8217
8218 #################################################
8219 # check for a NISPLUS password database
8220 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
8221 echo "configure:8222: checking whether to use NISPLUS password database" >&5
8222 # Check whether --with-nisplus or --without-nisplus was given.
8223 if test "${with_nisplus+set}" = set; then
8224   withval="$with_nisplus"
8225    case "$withval" in
8226   yes)
8227     echo "$ac_t""yes" 1>&6
8228     cat >> confdefs.h <<\EOF
8229 #define WITH_NISPLUS 1
8230 EOF
8231
8232     ;;
8233   *)
8234     echo "$ac_t""no" 1>&6
8235     ;;
8236   esac 
8237 else
8238   echo "$ac_t""no" 1>&6
8239
8240 fi
8241
8242
8243 #################################################
8244 # check for a NISPLUS_HOME support 
8245 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
8246 echo "configure:8247: checking whether to use NISPLUS_HOME" >&5
8247 # Check whether --with-nisplus-home or --without-nisplus-home was given.
8248 if test "${with_nisplus_home+set}" = set; then
8249   withval="$with_nisplus_home"
8250    case "$withval" in
8251   yes)
8252     echo "$ac_t""yes" 1>&6
8253     cat >> confdefs.h <<\EOF
8254 #define WITH_NISPLUS_HOME 1
8255 EOF
8256
8257     ;;
8258   *)
8259     echo "$ac_t""no" 1>&6
8260     ;;
8261   esac 
8262 else
8263   echo "$ac_t""no" 1>&6
8264
8265 fi
8266
8267
8268 #################################################
8269 # check for the secure socket layer
8270 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
8271 echo "configure:8272: checking whether to use SSL" >&5
8272 # Check whether --with-ssl or --without-ssl was given.
8273 if test "${with_ssl+set}" = set; then
8274   withval="$with_ssl"
8275    case "$withval" in
8276   yes)
8277     echo "$ac_t""yes" 1>&6
8278     cat >> confdefs.h <<\EOF
8279 #define WITH_SSL 1
8280 EOF
8281
8282     ;;
8283   *)
8284     echo "$ac_t""no" 1>&6
8285     ;;
8286   esac 
8287 else
8288   echo "$ac_t""no" 1>&6
8289
8290 fi
8291
8292
8293 #################################################
8294 # check for experimental mmap support
8295 echo $ac_n "checking whether to use MMAP""... $ac_c" 1>&6
8296 echo "configure:8297: checking whether to use MMAP" >&5
8297 # Check whether --with-mmap or --without-mmap was given.
8298 if test "${with_mmap+set}" = set; then
8299   withval="$with_mmap"
8300    case "$withval" in
8301   yes)
8302     echo "$ac_t""yes" 1>&6
8303     cat >> confdefs.h <<\EOF
8304 #define WITH_MMAP 1
8305 EOF
8306
8307     ;;
8308   *)
8309     echo "$ac_t""no" 1>&6
8310     ;;
8311   esac 
8312 else
8313   echo "$ac_t""no" 1>&6
8314
8315 fi
8316
8317
8318 #################################################
8319 # check for syslog logging
8320 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
8321 echo "configure:8322: checking whether to use syslog logging" >&5
8322 # Check whether --with-syslog or --without-syslog was given.
8323 if test "${with_syslog+set}" = set; then
8324   withval="$with_syslog"
8325    case "$withval" in
8326   yes)
8327     echo "$ac_t""yes" 1>&6
8328     cat >> confdefs.h <<\EOF
8329 #define WITH_SYSLOG 1
8330 EOF
8331
8332     ;;
8333   *)
8334     echo "$ac_t""no" 1>&6
8335     ;;
8336   esac 
8337 else
8338   echo "$ac_t""no" 1>&6
8339
8340 fi
8341
8342
8343 #################################################
8344 # check for experimental netatalk resource fork support
8345 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
8346 echo "configure:8347: checking whether to support netatalk" >&5
8347 # Check whether --with-netatalk or --without-netatalk was given.
8348 if test "${with_netatalk+set}" = set; then
8349   withval="$with_netatalk"
8350    case "$withval" in
8351   yes)
8352     echo "$ac_t""yes" 1>&6
8353     cat >> confdefs.h <<\EOF
8354 #define WITH_NETATALK 1
8355 EOF
8356
8357     ;;
8358   *)
8359     echo "$ac_t""no" 1>&6
8360     ;;
8361   esac 
8362 else
8363   echo "$ac_t""no" 1>&6
8364
8365 fi
8366
8367
8368 #################################################
8369 # check for experimental disk-quotas support
8370 QUOTAOBJS=noquotas.o
8371
8372 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
8373 echo "configure:8374: checking whether to support disk-quotas" >&5
8374 # Check whether --with-quotas or --without-quotas was given.
8375 if test "${with_quotas+set}" = set; then
8376   withval="$with_quotas"
8377    case "$withval" in
8378   yes)
8379     echo "$ac_t""yes" 1>&6
8380     QUOTAOBJS=quotas.o
8381     ;;
8382   *)
8383     echo "$ac_t""no" 1>&6
8384     ;;
8385   esac 
8386 else
8387   echo "$ac_t""no" 1>&6
8388
8389 fi
8390
8391
8392
8393 #################################################
8394 # these tests are taken from the GNU fileutils package
8395 echo "checking how to get filesystem space usage" 1>&6
8396 echo "configure:8397: checking how to get filesystem space usage" >&5
8397 space=no
8398
8399 # Test for statvfs64.
8400 if test $space = no; then
8401   # SVR4
8402   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
8403 echo "configure:8404: checking statvfs64 function (SVR4)" >&5
8404 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
8405   echo $ac_n "(cached) $ac_c" 1>&6
8406 else
8407   if test "$cross_compiling" = yes; then
8408   fu_cv_sys_stat_statvfs64=cross
8409 else
8410   cat > conftest.$ac_ext <<EOF
8411 #line 8412 "configure"
8412 #include "confdefs.h"
8413
8414 #include <sys/types.h>
8415 #include <sys/statvfs.h>
8416   main ()
8417   {
8418     struct statvfs64 fsd;
8419     exit (statfs64 (".", &fsd));
8420   }
8421 EOF
8422 if { (eval echo configure:8423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
8423 then
8424   fu_cv_sys_stat_statvfs64=yes
8425 else
8426   echo "configure: failed program was:" >&5
8427   cat conftest.$ac_ext >&5
8428   rm -fr conftest*
8429   fu_cv_sys_stat_statvfs64=no
8430 fi
8431 rm -fr conftest*
8432 fi
8433
8434 fi
8435
8436 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
8437   if test $fu_cv_sys_stat_statvfs64 = yes; then
8438     space=yes
8439     cat >> confdefs.h <<\EOF
8440 #define STAT_STATVFS64 1
8441 EOF
8442
8443   fi
8444 fi
8445
8446 # Perform only the link test since it seems there are no variants of the
8447 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
8448 # because that got a false positive on SCO OSR5.  Adding the declaration
8449 # of a `struct statvfs' causes this test to fail (as it should) on such
8450 # systems.  That system is reported to work fine with STAT_STATFS4 which
8451 # is what it gets when this test fails.
8452 if test $space = no; then
8453   # SVR4
8454   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
8455 echo "configure:8456: checking statvfs function (SVR4)" >&5
8456 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
8457   echo $ac_n "(cached) $ac_c" 1>&6
8458 else
8459   cat > conftest.$ac_ext <<EOF
8460 #line 8461 "configure"
8461 #include "confdefs.h"
8462 #include <sys/types.h>
8463 #include <sys/statvfs.h>
8464 int main() {
8465 struct statvfs fsd; statvfs (0, &fsd);
8466 ; return 0; }
8467 EOF
8468 if { (eval echo configure:8469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8469   rm -rf conftest*
8470   fu_cv_sys_stat_statvfs=yes
8471 else
8472   echo "configure: failed program was:" >&5
8473   cat conftest.$ac_ext >&5
8474   rm -rf conftest*
8475   fu_cv_sys_stat_statvfs=no
8476 fi
8477 rm -f conftest*
8478 fi
8479
8480 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
8481   if test $fu_cv_sys_stat_statvfs = yes; then
8482     space=yes
8483     cat >> confdefs.h <<\EOF
8484 #define STAT_STATVFS 1
8485 EOF
8486
8487   fi
8488 fi
8489
8490 if test $space = no; then
8491   # DEC Alpha running OSF/1
8492   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
8493 echo "configure:8494: checking for 3-argument statfs function (DEC OSF/1)" >&5
8494   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
8495   echo $ac_n "(cached) $ac_c" 1>&6
8496 else
8497   if test "$cross_compiling" = yes; then
8498   fu_cv_sys_stat_statfs3_osf1=no
8499 else
8500   cat > conftest.$ac_ext <<EOF
8501 #line 8502 "configure"
8502 #include "confdefs.h"
8503
8504 #include <sys/param.h>
8505 #include <sys/types.h>
8506 #include <sys/mount.h>
8507   main ()
8508   {
8509     struct statfs fsd;
8510     fsd.f_fsize = 0;
8511     exit (statfs (".", &fsd, sizeof (struct statfs)));
8512   }
8513 EOF
8514 if { (eval echo configure:8515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
8515 then
8516   fu_cv_sys_stat_statfs3_osf1=yes
8517 else
8518   echo "configure: failed program was:" >&5
8519   cat conftest.$ac_ext >&5
8520   rm -fr conftest*
8521   fu_cv_sys_stat_statfs3_osf1=no
8522 fi
8523 rm -fr conftest*
8524 fi
8525
8526 fi
8527
8528   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
8529   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
8530     space=yes
8531     cat >> confdefs.h <<\EOF
8532 #define STAT_STATFS3_OSF1 1
8533 EOF
8534
8535   fi
8536 fi
8537
8538 if test $space = no; then
8539 # AIX
8540   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
8541 echo "configure:8542: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
8542   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
8543   echo $ac_n "(cached) $ac_c" 1>&6
8544 else
8545   if test "$cross_compiling" = yes; then
8546   fu_cv_sys_stat_statfs2_bsize=no
8547 else
8548   cat > conftest.$ac_ext <<EOF
8549 #line 8550 "configure"
8550 #include "confdefs.h"
8551
8552 #ifdef HAVE_SYS_PARAM_H
8553 #include <sys/param.h>
8554 #endif
8555 #ifdef HAVE_SYS_MOUNT_H
8556 #include <sys/mount.h>
8557 #endif
8558 #ifdef HAVE_SYS_VFS_H
8559 #include <sys/vfs.h>
8560 #endif
8561   main ()
8562   {
8563   struct statfs fsd;
8564   fsd.f_bsize = 0;
8565   exit (statfs (".", &fsd));
8566   }
8567 EOF
8568 if { (eval echo configure:8569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
8569 then
8570   fu_cv_sys_stat_statfs2_bsize=yes
8571 else
8572   echo "configure: failed program was:" >&5
8573   cat conftest.$ac_ext >&5
8574   rm -fr conftest*
8575   fu_cv_sys_stat_statfs2_bsize=no
8576 fi
8577 rm -fr conftest*
8578 fi
8579
8580 fi
8581
8582   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
8583   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
8584     space=yes
8585     cat >> confdefs.h <<\EOF
8586 #define STAT_STATFS2_BSIZE 1
8587 EOF
8588
8589   fi
8590 fi
8591
8592 if test $space = no; then
8593 # SVR3
8594   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
8595 echo "configure:8596: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
8596   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
8597   echo $ac_n "(cached) $ac_c" 1>&6
8598 else
8599   if test "$cross_compiling" = yes; then
8600   fu_cv_sys_stat_statfs4=no
8601 else
8602   cat > conftest.$ac_ext <<EOF
8603 #line 8604 "configure"
8604 #include "confdefs.h"
8605 #include <sys/types.h>
8606 #include <sys/statfs.h>
8607   main ()
8608   {
8609   struct statfs fsd;
8610   exit (statfs (".", &fsd, sizeof fsd, 0));
8611   }
8612 EOF
8613 if { (eval echo configure:8614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
8614 then
8615   fu_cv_sys_stat_statfs4=yes
8616 else
8617   echo "configure: failed program was:" >&5
8618   cat conftest.$ac_ext >&5
8619   rm -fr conftest*
8620   fu_cv_sys_stat_statfs4=no
8621 fi
8622 rm -fr conftest*
8623 fi
8624
8625 fi
8626
8627   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
8628   if test $fu_cv_sys_stat_statfs4 = yes; then
8629     space=yes
8630     cat >> confdefs.h <<\EOF
8631 #define STAT_STATFS4 1
8632 EOF
8633
8634   fi
8635 fi
8636
8637 if test $space = no; then
8638 # 4.4BSD and NetBSD
8639   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
8640 echo "configure:8641: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
8641   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
8642   echo $ac_n "(cached) $ac_c" 1>&6
8643 else
8644   if test "$cross_compiling" = yes; then
8645   fu_cv_sys_stat_statfs2_fsize=no
8646 else
8647   cat > conftest.$ac_ext <<EOF
8648 #line 8649 "configure"
8649 #include "confdefs.h"
8650 #include <sys/types.h>
8651 #ifdef HAVE_SYS_PARAM_H
8652 #include <sys/param.h>
8653 #endif
8654 #ifdef HAVE_SYS_MOUNT_H
8655 #include <sys/mount.h>
8656 #endif
8657   main ()
8658   {
8659   struct statfs fsd;
8660   fsd.f_fsize = 0;
8661   exit (statfs (".", &fsd));
8662   }
8663 EOF
8664 if { (eval echo configure:8665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
8665 then
8666   fu_cv_sys_stat_statfs2_fsize=yes
8667 else
8668   echo "configure: failed program was:" >&5
8669   cat conftest.$ac_ext >&5
8670   rm -fr conftest*
8671   fu_cv_sys_stat_statfs2_fsize=no
8672 fi
8673 rm -fr conftest*
8674 fi
8675
8676 fi
8677
8678   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
8679   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
8680     space=yes
8681     cat >> confdefs.h <<\EOF
8682 #define STAT_STATFS2_FSIZE 1
8683 EOF
8684
8685   fi
8686 fi
8687
8688 if test $space = no; then
8689   # Ultrix
8690   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
8691 echo "configure:8692: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
8692   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
8693   echo $ac_n "(cached) $ac_c" 1>&6
8694 else
8695   if test "$cross_compiling" = yes; then
8696   fu_cv_sys_stat_fs_data=no
8697 else
8698   cat > conftest.$ac_ext <<EOF
8699 #line 8700 "configure"
8700 #include "confdefs.h"
8701 #include <sys/types.h>
8702 #ifdef HAVE_SYS_PARAM_H
8703 #include <sys/param.h>
8704 #endif
8705 #ifdef HAVE_SYS_MOUNT_H
8706 #include <sys/mount.h>
8707 #endif
8708 #ifdef HAVE_SYS_FS_TYPES_H
8709 #include <sys/fs_types.h>
8710 #endif
8711   main ()
8712   {
8713   struct fs_data fsd;
8714   /* Ultrix's statfs returns 1 for success,
8715      0 for not mounted, -1 for failure.  */
8716   exit (statfs (".", &fsd) != 1);
8717   }
8718 EOF
8719 if { (eval echo configure:8720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
8720 then
8721   fu_cv_sys_stat_fs_data=yes
8722 else
8723   echo "configure: failed program was:" >&5
8724   cat conftest.$ac_ext >&5
8725   rm -fr conftest*
8726   fu_cv_sys_stat_fs_data=no
8727 fi
8728 rm -fr conftest*
8729 fi
8730
8731 fi
8732
8733   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
8734   if test $fu_cv_sys_stat_fs_data = yes; then
8735     space=yes
8736     cat >> confdefs.h <<\EOF
8737 #define STAT_STATFS2_FS_DATA 1
8738 EOF
8739
8740   fi
8741 fi
8742
8743 echo "checking configure summary"
8744 if test "$cross_compiling" = yes; then
8745   :
8746 else
8747   cat > conftest.$ac_ext <<EOF
8748 #line 8749 "configure"
8749 #include "confdefs.h"
8750 #include "${srcdir-.}/tests/summary.c"
8751 EOF
8752 if { (eval echo configure:8753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
8753 then
8754   echo "configure OK";
8755 else
8756   echo "configure: failed program was:" >&5
8757   cat conftest.$ac_ext >&5
8758   rm -fr conftest*
8759   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
8760 fi
8761 rm -fr conftest*
8762 fi
8763
8764
8765 builddir=`pwd`
8766
8767
8768 trap '' 1 2 15
8769 cat > confcache <<\EOF
8770 # This file is a shell script that caches the results of configure
8771 # tests run on this system so they can be shared between configure
8772 # scripts and configure runs.  It is not useful on other systems.
8773 # If it contains results you don't want to keep, you may remove or edit it.
8774 #
8775 # By default, configure uses ./config.cache as the cache file,
8776 # creating it if it does not exist already.  You can give configure
8777 # the --cache-file=FILE option to use a different cache file; that is
8778 # what configure does when it calls configure scripts in
8779 # subdirectories, so they share the cache.
8780 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8781 # config.status only pays attention to the cache file if you give it the
8782 # --recheck option to rerun configure.
8783 #
8784 EOF
8785 # The following way of writing the cache mishandles newlines in values,
8786 # but we know of no workaround that is simple, portable, and efficient.
8787 # So, don't put newlines in cache variables' values.
8788 # Ultrix sh set writes to stderr and can't be redirected directly,
8789 # and sets the high bit in the cache file unless we assign to the vars.
8790 (set) 2>&1 |
8791   case `(ac_space=' '; set) 2>&1` in
8792   *ac_space=\ *)
8793     # `set' does not quote correctly, so add quotes (double-quote substitution
8794     # turns \\\\ into \\, and sed turns \\ into \).
8795     sed -n \
8796       -e "s/'/'\\\\''/g" \
8797       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8798     ;;
8799   *)
8800     # `set' quotes correctly as required by POSIX, so do not add quotes.
8801     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8802     ;;
8803   esac >> confcache
8804 if cmp -s $cache_file confcache; then
8805   :
8806 else
8807   if test -w $cache_file; then
8808     echo "updating cache $cache_file"
8809     cat confcache > $cache_file
8810   else
8811     echo "not updating unwritable cache $cache_file"
8812   fi
8813 fi
8814 rm -f confcache
8815
8816 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8817
8818 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8819 # Let make expand exec_prefix.
8820 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8821
8822 # Any assignment to VPATH causes Sun make to only execute
8823 # the first set of double-colon rules, so remove it if not needed.
8824 # If there is a colon in the path, we need to keep it.
8825 if test "x$srcdir" = x.; then
8826   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
8827 fi
8828
8829 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8830
8831 DEFS=-DHAVE_CONFIG_H
8832
8833 # Without the "./", some shells look in PATH for config.status.
8834 : ${CONFIG_STATUS=./config.status}
8835
8836 echo creating $CONFIG_STATUS
8837 rm -f $CONFIG_STATUS
8838 cat > $CONFIG_STATUS <<EOF
8839 #! /bin/sh
8840 # Generated automatically by configure.
8841 # Run this file to recreate the current configuration.
8842 # This directory was configured as follows,
8843 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8844 #
8845 # $0 $ac_configure_args
8846 #
8847 # Compiler output produced by configure, useful for debugging
8848 # configure, is in ./config.log if it exists.
8849
8850 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8851 for ac_option
8852 do
8853   case "\$ac_option" in
8854   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8855     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8856     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8857   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8858     echo "$CONFIG_STATUS generated by autoconf version 2.12"
8859     exit 0 ;;
8860   -help | --help | --hel | --he | --h)
8861     echo "\$ac_cs_usage"; exit 0 ;;
8862   *) echo "\$ac_cs_usage"; exit 1 ;;
8863   esac
8864 done
8865
8866 ac_given_srcdir=$srcdir
8867 ac_given_INSTALL="$INSTALL"
8868
8869 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8870 EOF
8871 cat >> $CONFIG_STATUS <<EOF
8872
8873 # Protect against being on the right side of a sed subst in config.status.
8874 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8875  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8876 $ac_vpsub
8877 $extrasub
8878 s%@CFLAGS@%$CFLAGS%g
8879 s%@CPPFLAGS@%$CPPFLAGS%g
8880 s%@CXXFLAGS@%$CXXFLAGS%g
8881 s%@DEFS@%$DEFS%g
8882 s%@LDFLAGS@%$LDFLAGS%g
8883 s%@LIBS@%$LIBS%g
8884 s%@exec_prefix@%$exec_prefix%g
8885 s%@prefix@%$prefix%g
8886 s%@program_transform_name@%$program_transform_name%g
8887 s%@bindir@%$bindir%g
8888 s%@sbindir@%$sbindir%g
8889 s%@libexecdir@%$libexecdir%g
8890 s%@datadir@%$datadir%g
8891 s%@sysconfdir@%$sysconfdir%g
8892 s%@sharedstatedir@%$sharedstatedir%g
8893 s%@localstatedir@%$localstatedir%g
8894 s%@libdir@%$libdir%g
8895 s%@includedir@%$includedir%g
8896 s%@oldincludedir@%$oldincludedir%g
8897 s%@infodir@%$infodir%g
8898 s%@mandir@%$mandir%g
8899 s%@SHELL@%$SHELL%g
8900 s%@MPROGS@%$MPROGS%g
8901 s%@LDSHFLAGS@%$LDSHFLAGS%g
8902 s%@HOST_OS@%$HOST_OS%g
8903 s%@WRAP@%$WRAP%g
8904 s%@WRAP32@%$WRAP32%g
8905 s%@PICFLAG@%$PICFLAG%g
8906 s%@CC@%$CC%g
8907 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8908 s%@INSTALL_DATA@%$INSTALL_DATA%g
8909 s%@AWK@%$AWK%g
8910 s%@host@%$host%g
8911 s%@host_alias@%$host_alias%g
8912 s%@host_cpu@%$host_cpu%g
8913 s%@host_vendor@%$host_vendor%g
8914 s%@host_os@%$host_os%g
8915 s%@target@%$target%g
8916 s%@target_alias@%$target_alias%g
8917 s%@target_cpu@%$target_cpu%g
8918 s%@target_vendor@%$target_vendor%g
8919 s%@target_os@%$target_os%g
8920 s%@build@%$build%g
8921 s%@build_alias@%$build_alias%g
8922 s%@build_cpu@%$build_cpu%g
8923 s%@build_vendor@%$build_vendor%g
8924 s%@build_os@%$build_os%g
8925 s%@MAINT@%$MAINT%g
8926 s%@AUTOCONF@%$AUTOCONF%g
8927 s%@AUTOHEADER@%$AUTOHEADER%g
8928 s%@CPP@%$CPP%g
8929 s%@LIBOBJS@%$LIBOBJS%g
8930 s%@ROFF@%$ROFF%g
8931 s%@QUOTAOBJS@%$QUOTAOBJS%g
8932 s%@builddir@%$builddir%g
8933
8934 CEOF
8935 EOF
8936
8937 cat >> $CONFIG_STATUS <<\EOF
8938
8939 # Split the substitutions into bite-sized pieces for seds with
8940 # small command number limits, like on Digital OSF/1 and HP-UX.
8941 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8942 ac_file=1 # Number of current file.
8943 ac_beg=1 # First line for current file.
8944 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8945 ac_more_lines=:
8946 ac_sed_cmds=""
8947 while $ac_more_lines; do
8948   if test $ac_beg -gt 1; then
8949     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8950   else
8951     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8952   fi
8953   if test ! -s conftest.s$ac_file; then
8954     ac_more_lines=false
8955     rm -f conftest.s$ac_file
8956   else
8957     if test -z "$ac_sed_cmds"; then
8958       ac_sed_cmds="sed -f conftest.s$ac_file"
8959     else
8960       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8961     fi
8962     ac_file=`expr $ac_file + 1`
8963     ac_beg=$ac_end
8964     ac_end=`expr $ac_end + $ac_max_sed_cmds`
8965   fi
8966 done
8967 if test -z "$ac_sed_cmds"; then
8968   ac_sed_cmds=cat
8969 fi
8970 EOF
8971
8972 cat >> $CONFIG_STATUS <<EOF
8973
8974 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
8975 EOF
8976 cat >> $CONFIG_STATUS <<\EOF
8977 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8978   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8979   case "$ac_file" in
8980   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8981        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8982   *) ac_file_in="${ac_file}.in" ;;
8983   esac
8984
8985   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8986
8987   # Remove last slash and all that follows it.  Not all systems have dirname.
8988   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8989   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8990     # The file is in a subdirectory.
8991     test ! -d "$ac_dir" && mkdir "$ac_dir"
8992     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8993     # A "../" for each directory in $ac_dir_suffix.
8994     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8995   else
8996     ac_dir_suffix= ac_dots=
8997   fi
8998
8999   case "$ac_given_srcdir" in
9000   .)  srcdir=.
9001       if test -z "$ac_dots"; then top_srcdir=.
9002       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9003   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9004   *) # Relative path.
9005     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9006     top_srcdir="$ac_dots$ac_given_srcdir" ;;
9007   esac
9008
9009   case "$ac_given_INSTALL" in
9010   [/$]*) INSTALL="$ac_given_INSTALL" ;;
9011   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9012   esac
9013
9014   echo creating "$ac_file"
9015   rm -f "$ac_file"
9016   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9017   case "$ac_file" in
9018   *Makefile*) ac_comsub="1i\\
9019 # $configure_input" ;;
9020   *) ac_comsub= ;;
9021   esac
9022
9023   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9024   sed -e "$ac_comsub
9025 s%@configure_input@%$configure_input%g
9026 s%@srcdir@%$srcdir%g
9027 s%@top_srcdir@%$top_srcdir%g
9028 s%@INSTALL@%$INSTALL%g
9029 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9030 fi; done
9031 rm -f conftest.s*
9032
9033 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9034 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9035 #
9036 # ac_d sets the value in "#define NAME VALUE" lines.
9037 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9038 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
9039 ac_dC='\3'
9040 ac_dD='%g'
9041 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9042 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9043 ac_uB='\([      ]\)%\1#\2define\3'
9044 ac_uC=' '
9045 ac_uD='\4%g'
9046 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9047 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9048 ac_eB='$%\1#\2define\3'
9049 ac_eC=' '
9050 ac_eD='%g'
9051
9052 if test "${CONFIG_HEADERS+set}" != set; then
9053 EOF
9054 cat >> $CONFIG_STATUS <<EOF
9055   CONFIG_HEADERS="include/config.h"
9056 EOF
9057 cat >> $CONFIG_STATUS <<\EOF
9058 fi
9059 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9060   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9061   case "$ac_file" in
9062   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9063        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9064   *) ac_file_in="${ac_file}.in" ;;
9065   esac
9066
9067   echo creating $ac_file
9068
9069   rm -f conftest.frag conftest.in conftest.out
9070   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9071   cat $ac_file_inputs > conftest.in
9072
9073 EOF
9074
9075 # Transform confdefs.h into a sed script conftest.vals that substitutes
9076 # the proper values into config.h.in to produce config.h.  And first:
9077 # Protect against being on the right side of a sed subst in config.status.
9078 # Protect against being in an unquoted here document in config.status.
9079 rm -f conftest.vals
9080 cat > conftest.hdr <<\EOF
9081 s/[\\&%]/\\&/g
9082 s%[\\$`]%\\&%g
9083 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9084 s%ac_d%ac_u%gp
9085 s%ac_u%ac_e%gp
9086 EOF
9087 sed -n -f conftest.hdr confdefs.h > conftest.vals
9088 rm -f conftest.hdr
9089
9090 # This sed command replaces #undef with comments.  This is necessary, for
9091 # example, in the case of _POSIX_SOURCE, which is predefined and required
9092 # on some systems where configure will not decide to define it.
9093 cat >> conftest.vals <<\EOF
9094 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9095 EOF
9096
9097 # Break up conftest.vals because some shells have a limit on
9098 # the size of here documents, and old seds have small limits too.
9099
9100 rm -f conftest.tail
9101 while :
9102 do
9103   ac_lines=`grep -c . conftest.vals`
9104   # grep -c gives empty output for an empty file on some AIX systems.
9105   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9106   # Write a limited-size here document to conftest.frag.
9107   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9108   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9109   echo 'CEOF
9110   sed -f conftest.frag conftest.in > conftest.out
9111   rm -f conftest.in
9112   mv conftest.out conftest.in
9113 ' >> $CONFIG_STATUS
9114   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9115   rm -f conftest.vals
9116   mv conftest.tail conftest.vals
9117 done
9118 rm -f conftest.vals
9119
9120 cat >> $CONFIG_STATUS <<\EOF
9121   rm -f conftest.frag conftest.h
9122   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
9123   cat conftest.in >> conftest.h
9124   rm -f conftest.in
9125   if cmp -s $ac_file conftest.h 2>/dev/null; then
9126     echo "$ac_file is unchanged"
9127     rm -f conftest.h
9128   else
9129     # Remove last slash and all that follows it.  Not all systems have dirname.
9130       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9131       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9132       # The file is in a subdirectory.
9133       test ! -d "$ac_dir" && mkdir "$ac_dir"
9134     fi
9135     rm -f $ac_file
9136     mv conftest.h $ac_file
9137   fi
9138 fi; done
9139
9140 EOF
9141 cat >> $CONFIG_STATUS <<EOF
9142
9143 EOF
9144 cat >> $CONFIG_STATUS <<\EOF
9145
9146 exit 0
9147 EOF
9148 chmod +x $CONFIG_STATUS
9149 rm -fr confdefs* $ac_clean_files
9150 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9151