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