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