6720d10ee1e422108fc0a2b652a773790456681b
[samba.git] / source3 / 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   --with-afs     Include AFS support
16   --without-afs  Don't include AFS support (default)"
17 ac_help="$ac_help
18   --with-dfs     Include DFS support
19   --without-dfs  Don't include DFS support (default)"
20 ac_help="$ac_help
21   --with-automount     Include AUTOMOUNT support
22   --without-automount  Don't include AUTOMOUNT support (default)"
23 ac_help="$ac_help
24   --with-ldap     Include LDAP support
25   --without-ldap  Don't include LDAP support (default)"
26 ac_help="$ac_help
27   --with-nisplus     Include NISPLUS password database support
28   --without-nisplus  Don't include NISPLUS password database support (default)"
29 ac_help="$ac_help
30   --with-nisplus-home     Include NISPLUS_HOME support
31   --without-nisplus-home  Don't include NISPLUS_HOME support (default)"
32 ac_help="$ac_help
33   --with-ssl     Include SSL support
34   --without-ssl  Don't include SSL support (default)"
35 ac_help="$ac_help
36   --with-mmap     Include experimental MMAP support
37   --without-mmap  Don't include MMAP support (default)"
38 ac_help="$ac_help
39   --with-syslog     Include experimental SYSLOG support
40   --without-syslog  Don't include SYSLOG support (default)"
41 ac_help="$ac_help
42   --with-netatalk     Include experimental Netatalk support
43   --without-netatalk  Don't include experimental Netatalk support (default)"
44
45 # Initialize some variables set by options.
46 # The variables have the same names as the options, with
47 # dashes changed to underlines.
48 build=NONE
49 cache_file=./config.cache
50 exec_prefix=NONE
51 host=NONE
52 no_create=
53 nonopt=NONE
54 no_recursion=
55 prefix=NONE
56 program_prefix=NONE
57 program_suffix=NONE
58 program_transform_name=s,x,x,
59 silent=
60 site=
61 srcdir=
62 target=NONE
63 verbose=
64 x_includes=NONE
65 x_libraries=NONE
66 bindir='${exec_prefix}/bin'
67 sbindir='${exec_prefix}/sbin'
68 libexecdir='${exec_prefix}/libexec'
69 datadir='${prefix}/share'
70 sysconfdir='${prefix}/etc'
71 sharedstatedir='${prefix}/com'
72 localstatedir='${prefix}/var'
73 libdir='${exec_prefix}/lib'
74 includedir='${prefix}/include'
75 oldincludedir='/usr/include'
76 infodir='${prefix}/info'
77 mandir='${prefix}/man'
78
79 # Initialize some other variables.
80 subdirs=
81 MFLAGS= MAKEFLAGS=
82 # Maximum number of lines to put in a shell here document.
83 ac_max_here_lines=12
84
85 ac_prev=
86 for ac_option
87 do
88
89   # If the previous option needs an argument, assign it.
90   if test -n "$ac_prev"; then
91     eval "$ac_prev=\$ac_option"
92     ac_prev=
93     continue
94   fi
95
96   case "$ac_option" in
97   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
98   *) ac_optarg= ;;
99   esac
100
101   # Accept the important Cygnus configure options, so we can diagnose typos.
102
103   case "$ac_option" in
104
105   -bindir | --bindir | --bindi | --bind | --bin | --bi)
106     ac_prev=bindir ;;
107   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
108     bindir="$ac_optarg" ;;
109
110   -build | --build | --buil | --bui | --bu)
111     ac_prev=build ;;
112   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
113     build="$ac_optarg" ;;
114
115   -cache-file | --cache-file | --cache-fil | --cache-fi \
116   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
117     ac_prev=cache_file ;;
118   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
119   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
120     cache_file="$ac_optarg" ;;
121
122   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
123     ac_prev=datadir ;;
124   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
125   | --da=*)
126     datadir="$ac_optarg" ;;
127
128   -disable-* | --disable-*)
129     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
130     # Reject names that are not valid shell variable names.
131     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
132       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
133     fi
134     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
135     eval "enable_${ac_feature}=no" ;;
136
137   -enable-* | --enable-*)
138     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
139     # Reject names that are not valid shell variable names.
140     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
141       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
142     fi
143     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
144     case "$ac_option" in
145       *=*) ;;
146       *) ac_optarg=yes ;;
147     esac
148     eval "enable_${ac_feature}='$ac_optarg'" ;;
149
150   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
151   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
152   | --exec | --exe | --ex)
153     ac_prev=exec_prefix ;;
154   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
155   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
156   | --exec=* | --exe=* | --ex=*)
157     exec_prefix="$ac_optarg" ;;
158
159   -gas | --gas | --ga | --g)
160     # Obsolete; use --with-gas.
161     with_gas=yes ;;
162
163   -help | --help | --hel | --he)
164     # Omit some internal or obsolete options to make the list less imposing.
165     # This message is too long to be a string in the A/UX 3.1 sh.
166     cat << EOF
167 Usage: configure [options] [host]
168 Options: [defaults in brackets after descriptions]
169 Configuration:
170   --cache-file=FILE       cache test results in FILE
171   --help                  print this message
172   --no-create             do not create output files
173   --quiet, --silent       do not print \`checking...' messages
174   --version               print the version of autoconf that created configure
175 Directory and file names:
176   --prefix=PREFIX         install architecture-independent files in PREFIX
177                           [$ac_default_prefix]
178   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
179                           [same as prefix]
180   --bindir=DIR            user executables in DIR [EPREFIX/bin]
181   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
182   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
183   --datadir=DIR           read-only architecture-independent data in DIR
184                           [PREFIX/share]
185   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
186   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
187                           [PREFIX/com]
188   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
189   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
190   --includedir=DIR        C header files in DIR [PREFIX/include]
191   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
192   --infodir=DIR           info documentation in DIR [PREFIX/info]
193   --mandir=DIR            man documentation in DIR [PREFIX/man]
194   --srcdir=DIR            find the sources in DIR [configure dir or ..]
195   --program-prefix=PREFIX prepend PREFIX to installed program names
196   --program-suffix=SUFFIX append SUFFIX to installed program names
197   --program-transform-name=PROGRAM
198                           run sed PROGRAM on installed program names
199 EOF
200     cat << EOF
201 Host type:
202   --build=BUILD           configure for building on BUILD [BUILD=HOST]
203   --host=HOST             configure for HOST [guessed]
204   --target=TARGET         configure for TARGET [TARGET=HOST]
205 Features and packages:
206   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
207   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
208   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
209   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
210   --x-includes=DIR        X include files are in DIR
211   --x-libraries=DIR       X library files are in DIR
212 EOF
213     if test -n "$ac_help"; then
214       echo "--enable and --with options recognized:$ac_help"
215     fi
216     exit 0 ;;
217
218   -host | --host | --hos | --ho)
219     ac_prev=host ;;
220   -host=* | --host=* | --hos=* | --ho=*)
221     host="$ac_optarg" ;;
222
223   -includedir | --includedir | --includedi | --included | --include \
224   | --includ | --inclu | --incl | --inc)
225     ac_prev=includedir ;;
226   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
227   | --includ=* | --inclu=* | --incl=* | --inc=*)
228     includedir="$ac_optarg" ;;
229
230   -infodir | --infodir | --infodi | --infod | --info | --inf)
231     ac_prev=infodir ;;
232   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
233     infodir="$ac_optarg" ;;
234
235   -libdir | --libdir | --libdi | --libd)
236     ac_prev=libdir ;;
237   -libdir=* | --libdir=* | --libdi=* | --libd=*)
238     libdir="$ac_optarg" ;;
239
240   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
241   | --libexe | --libex | --libe)
242     ac_prev=libexecdir ;;
243   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
244   | --libexe=* | --libex=* | --libe=*)
245     libexecdir="$ac_optarg" ;;
246
247   -localstatedir | --localstatedir | --localstatedi | --localstated \
248   | --localstate | --localstat | --localsta | --localst \
249   | --locals | --local | --loca | --loc | --lo)
250     ac_prev=localstatedir ;;
251   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
252   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
253   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
254     localstatedir="$ac_optarg" ;;
255
256   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
257     ac_prev=mandir ;;
258   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
259     mandir="$ac_optarg" ;;
260
261   -nfp | --nfp | --nf)
262     # Obsolete; use --without-fp.
263     with_fp=no ;;
264
265   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
266   | --no-cr | --no-c)
267     no_create=yes ;;
268
269   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
270   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
271     no_recursion=yes ;;
272
273   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
274   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
275   | --oldin | --oldi | --old | --ol | --o)
276     ac_prev=oldincludedir ;;
277   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
278   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
279   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
280     oldincludedir="$ac_optarg" ;;
281
282   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
283     ac_prev=prefix ;;
284   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
285     prefix="$ac_optarg" ;;
286
287   -program-prefix | --program-prefix | --program-prefi | --program-pref \
288   | --program-pre | --program-pr | --program-p)
289     ac_prev=program_prefix ;;
290   -program-prefix=* | --program-prefix=* | --program-prefi=* \
291   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
292     program_prefix="$ac_optarg" ;;
293
294   -program-suffix | --program-suffix | --program-suffi | --program-suff \
295   | --program-suf | --program-su | --program-s)
296     ac_prev=program_suffix ;;
297   -program-suffix=* | --program-suffix=* | --program-suffi=* \
298   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
299     program_suffix="$ac_optarg" ;;
300
301   -program-transform-name | --program-transform-name \
302   | --program-transform-nam | --program-transform-na \
303   | --program-transform-n | --program-transform- \
304   | --program-transform | --program-transfor \
305   | --program-transfo | --program-transf \
306   | --program-trans | --program-tran \
307   | --progr-tra | --program-tr | --program-t)
308     ac_prev=program_transform_name ;;
309   -program-transform-name=* | --program-transform-name=* \
310   | --program-transform-nam=* | --program-transform-na=* \
311   | --program-transform-n=* | --program-transform-=* \
312   | --program-transform=* | --program-transfor=* \
313   | --program-transfo=* | --program-transf=* \
314   | --program-trans=* | --program-tran=* \
315   | --progr-tra=* | --program-tr=* | --program-t=*)
316     program_transform_name="$ac_optarg" ;;
317
318   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
319   | -silent | --silent | --silen | --sile | --sil)
320     silent=yes ;;
321
322   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
323     ac_prev=sbindir ;;
324   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
325   | --sbi=* | --sb=*)
326     sbindir="$ac_optarg" ;;
327
328   -sharedstatedir | --sharedstatedir | --sharedstatedi \
329   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
330   | --sharedst | --shareds | --shared | --share | --shar \
331   | --sha | --sh)
332     ac_prev=sharedstatedir ;;
333   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
334   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
335   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
336   | --sha=* | --sh=*)
337     sharedstatedir="$ac_optarg" ;;
338
339   -site | --site | --sit)
340     ac_prev=site ;;
341   -site=* | --site=* | --sit=*)
342     site="$ac_optarg" ;;
343
344   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
345     ac_prev=srcdir ;;
346   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
347     srcdir="$ac_optarg" ;;
348
349   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
350   | --syscon | --sysco | --sysc | --sys | --sy)
351     ac_prev=sysconfdir ;;
352   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
353   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
354     sysconfdir="$ac_optarg" ;;
355
356   -target | --target | --targe | --targ | --tar | --ta | --t)
357     ac_prev=target ;;
358   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
359     target="$ac_optarg" ;;
360
361   -v | -verbose | --verbose | --verbos | --verbo | --verb)
362     verbose=yes ;;
363
364   -version | --version | --versio | --versi | --vers)
365     echo "configure generated by autoconf version 2.12"
366     exit 0 ;;
367
368   -with-* | --with-*)
369     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
370     # Reject names that are not valid shell variable names.
371     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
372       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
373     fi
374     ac_package=`echo $ac_package| sed 's/-/_/g'`
375     case "$ac_option" in
376       *=*) ;;
377       *) ac_optarg=yes ;;
378     esac
379     eval "with_${ac_package}='$ac_optarg'" ;;
380
381   -without-* | --without-*)
382     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
383     # Reject names that are not valid shell variable names.
384     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
385       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
386     fi
387     ac_package=`echo $ac_package| sed 's/-/_/g'`
388     eval "with_${ac_package}=no" ;;
389
390   --x)
391     # Obsolete; use --with-x.
392     with_x=yes ;;
393
394   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
395   | --x-incl | --x-inc | --x-in | --x-i)
396     ac_prev=x_includes ;;
397   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
398   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
399     x_includes="$ac_optarg" ;;
400
401   -x-libraries | --x-libraries | --x-librarie | --x-librari \
402   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
403     ac_prev=x_libraries ;;
404   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
405   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
406     x_libraries="$ac_optarg" ;;
407
408   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
409     ;;
410
411   *)
412     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
413       echo "configure: warning: $ac_option: invalid host type" 1>&2
414     fi
415     if test "x$nonopt" != xNONE; then
416       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
417     fi
418     nonopt="$ac_option"
419     ;;
420
421   esac
422 done
423
424 if test -n "$ac_prev"; then
425   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
426 fi
427
428 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
429
430 # File descriptor usage:
431 # 0 standard input
432 # 1 file creation
433 # 2 errors and warnings
434 # 3 some systems may open it to /dev/tty
435 # 4 used on the Kubota Titan
436 # 6 checking for... messages and results
437 # 5 compiler messages saved in config.log
438 if test "$silent" = yes; then
439   exec 6>/dev/null
440 else
441   exec 6>&1
442 fi
443 exec 5>./config.log
444
445 echo "\
446 This file contains any messages produced by compilers while
447 running configure, to aid debugging if configure makes a mistake.
448 " 1>&5
449
450 # Strip out --no-create and --no-recursion so they do not pile up.
451 # Also quote any args containing shell metacharacters.
452 ac_configure_args=
453 for ac_arg
454 do
455   case "$ac_arg" in
456   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
457   | --no-cr | --no-c) ;;
458   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
459   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
460   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
461   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
462   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
463   esac
464 done
465
466 # NLS nuisances.
467 # Only set these to C if already set.  These must not be set unconditionally
468 # because not all systems understand e.g. LANG=C (notably SCO).
469 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
470 # Non-C LC_CTYPE values break the ctype check.
471 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
472 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
473 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
474 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
475
476 # confdefs.h avoids OS command line length limits that DEFS can exceed.
477 rm -rf conftest* confdefs.h
478 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
479 echo > confdefs.h
480
481 # A filename unique to this package, relative to the directory that
482 # configure is in, which we can look for to find out if srcdir is correct.
483 ac_unique_file=include/includes.h
484
485 # Find the source files, if location was not specified.
486 if test -z "$srcdir"; then
487   ac_srcdir_defaulted=yes
488   # Try the directory containing this script, then its parent.
489   ac_prog=$0
490   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
491   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
492   srcdir=$ac_confdir
493   if test ! -r $srcdir/$ac_unique_file; then
494     srcdir=..
495   fi
496 else
497   ac_srcdir_defaulted=no
498 fi
499 if test ! -r $srcdir/$ac_unique_file; then
500   if test "$ac_srcdir_defaulted" = yes; then
501     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
502   else
503     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
504   fi
505 fi
506 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
507
508 # Prefer explicitly selected file to automatically selected ones.
509 if test -z "$CONFIG_SITE"; then
510   if test "x$prefix" != xNONE; then
511     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
512   else
513     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
514   fi
515 fi
516 for ac_site_file in $CONFIG_SITE; do
517   if test -r "$ac_site_file"; then
518     echo "loading site script $ac_site_file"
519     . "$ac_site_file"
520   fi
521 done
522
523 if test -r "$cache_file"; then
524   echo "loading cache $cache_file"
525   . $cache_file
526 else
527   echo "creating cache $cache_file"
528   > $cache_file
529 fi
530
531 ac_ext=c
532 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
533 ac_cpp='$CPP $CPPFLAGS'
534 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
535 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
536 cross_compiling=$ac_cv_prog_cc_cross
537
538 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
539   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
540   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
541     ac_n= ac_c='
542 ' ac_t='        '
543   else
544     ac_n=-n ac_c= ac_t=
545   fi
546 else
547   ac_n= ac_c='\c' ac_t=
548 fi
549
550
551
552
553 # Extract the first word of "gcc", so it can be a program name with args.
554 set dummy gcc; ac_word=$2
555 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
556 echo "configure:557: checking for $ac_word" >&5
557 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
558   echo $ac_n "(cached) $ac_c" 1>&6
559 else
560   if test -n "$CC"; then
561   ac_cv_prog_CC="$CC" # Let the user override the test.
562 else
563   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
564   for ac_dir in $PATH; do
565     test -z "$ac_dir" && ac_dir=.
566     if test -f $ac_dir/$ac_word; then
567       ac_cv_prog_CC="gcc"
568       break
569     fi
570   done
571   IFS="$ac_save_ifs"
572 fi
573 fi
574 CC="$ac_cv_prog_CC"
575 if test -n "$CC"; then
576   echo "$ac_t""$CC" 1>&6
577 else
578   echo "$ac_t""no" 1>&6
579 fi
580
581 if test -z "$CC"; then
582   # Extract the first word of "cc", so it can be a program name with args.
583 set dummy cc; ac_word=$2
584 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
585 echo "configure:586: checking for $ac_word" >&5
586 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
587   echo $ac_n "(cached) $ac_c" 1>&6
588 else
589   if test -n "$CC"; then
590   ac_cv_prog_CC="$CC" # Let the user override the test.
591 else
592   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
593   ac_prog_rejected=no
594   for ac_dir in $PATH; do
595     test -z "$ac_dir" && ac_dir=.
596     if test -f $ac_dir/$ac_word; then
597       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
598         ac_prog_rejected=yes
599         continue
600       fi
601       ac_cv_prog_CC="cc"
602       break
603     fi
604   done
605   IFS="$ac_save_ifs"
606 if test $ac_prog_rejected = yes; then
607   # We found a bogon in the path, so make sure we never use it.
608   set dummy $ac_cv_prog_CC
609   shift
610   if test $# -gt 0; then
611     # We chose a different compiler from the bogus one.
612     # However, it has the same basename, so the bogon will be chosen
613     # first if we set CC to just the basename; use the full file name.
614     shift
615     set dummy "$ac_dir/$ac_word" "$@"
616     shift
617     ac_cv_prog_CC="$@"
618   fi
619 fi
620 fi
621 fi
622 CC="$ac_cv_prog_CC"
623 if test -n "$CC"; then
624   echo "$ac_t""$CC" 1>&6
625 else
626   echo "$ac_t""no" 1>&6
627 fi
628
629   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
630 fi
631
632 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
633 echo "configure:634: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
634
635 ac_ext=c
636 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
637 ac_cpp='$CPP $CPPFLAGS'
638 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
639 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
640 cross_compiling=$ac_cv_prog_cc_cross
641
642 cat > conftest.$ac_ext <<EOF
643 #line 644 "configure"
644 #include "confdefs.h"
645 main(){return(0);}
646 EOF
647 if { (eval echo configure:648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
648   ac_cv_prog_cc_works=yes
649   # If we can't run a trivial program, we are probably using a cross compiler.
650   if (./conftest; exit) 2>/dev/null; then
651     ac_cv_prog_cc_cross=no
652   else
653     ac_cv_prog_cc_cross=yes
654   fi
655 else
656   echo "configure: failed program was:" >&5
657   cat conftest.$ac_ext >&5
658   ac_cv_prog_cc_works=no
659 fi
660 rm -fr conftest*
661
662 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
663 if test $ac_cv_prog_cc_works = no; then
664   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
665 fi
666 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
667 echo "configure:668: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
668 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
669 cross_compiling=$ac_cv_prog_cc_cross
670
671 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
672 echo "configure:673: checking whether we are using GNU C" >&5
673 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
674   echo $ac_n "(cached) $ac_c" 1>&6
675 else
676   cat > conftest.c <<EOF
677 #ifdef __GNUC__
678   yes;
679 #endif
680 EOF
681 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
682   ac_cv_prog_gcc=yes
683 else
684   ac_cv_prog_gcc=no
685 fi
686 fi
687
688 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
689
690 if test $ac_cv_prog_gcc = yes; then
691   GCC=yes
692   ac_test_CFLAGS="${CFLAGS+set}"
693   ac_save_CFLAGS="$CFLAGS"
694   CFLAGS=
695   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
696 echo "configure:697: checking whether ${CC-cc} accepts -g" >&5
697 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
698   echo $ac_n "(cached) $ac_c" 1>&6
699 else
700   echo 'void f(){}' > conftest.c
701 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
702   ac_cv_prog_cc_g=yes
703 else
704   ac_cv_prog_cc_g=no
705 fi
706 rm -f conftest*
707
708 fi
709
710 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
711   if test "$ac_test_CFLAGS" = set; then
712     CFLAGS="$ac_save_CFLAGS"
713   elif test $ac_cv_prog_cc_g = yes; then
714     CFLAGS="-g -O2"
715   else
716     CFLAGS="-O2"
717   fi
718 else
719   GCC=
720   test "${CFLAGS+set}" = set || CFLAGS="-g"
721 fi
722
723 ac_aux_dir=
724 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
725   if test -f $ac_dir/install-sh; then
726     ac_aux_dir=$ac_dir
727     ac_install_sh="$ac_aux_dir/install-sh -c"
728     break
729   elif test -f $ac_dir/install.sh; then
730     ac_aux_dir=$ac_dir
731     ac_install_sh="$ac_aux_dir/install.sh -c"
732     break
733   fi
734 done
735 if test -z "$ac_aux_dir"; then
736   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
737 fi
738 ac_config_guess=$ac_aux_dir/config.guess
739 ac_config_sub=$ac_aux_dir/config.sub
740 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
741
742 # Find a good install program.  We prefer a C program (faster),
743 # so one script is as good as another.  But avoid the broken or
744 # incompatible versions:
745 # SysV /etc/install, /usr/sbin/install
746 # SunOS /usr/etc/install
747 # IRIX /sbin/install
748 # AIX /bin/install
749 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
750 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
751 # ./install, which can be erroneously created by make from ./install.sh.
752 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
753 echo "configure:754: checking for a BSD compatible install" >&5
754 if test -z "$INSTALL"; then
755 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
756   echo $ac_n "(cached) $ac_c" 1>&6
757 else
758     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
759   for ac_dir in $PATH; do
760     # Account for people who put trailing slashes in PATH elements.
761     case "$ac_dir/" in
762     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
763     *)
764       # OSF1 and SCO ODT 3.0 have their own names for install.
765       for ac_prog in ginstall installbsd scoinst install; do
766         if test -f $ac_dir/$ac_prog; then
767           if test $ac_prog = install &&
768             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
769             # AIX install.  It has an incompatible calling convention.
770             # OSF/1 installbsd also uses dspmsg, but is usable.
771             :
772           else
773             ac_cv_path_install="$ac_dir/$ac_prog -c"
774             break 2
775           fi
776         fi
777       done
778       ;;
779     esac
780   done
781   IFS="$ac_save_IFS"
782
783 fi
784   if test "${ac_cv_path_install+set}" = set; then
785     INSTALL="$ac_cv_path_install"
786   else
787     # As a last resort, use the slow shell script.  We don't cache a
788     # path for INSTALL within a source directory, because that will
789     # break other packages using the cache if that directory is
790     # removed, or if the path is relative.
791     INSTALL="$ac_install_sh"
792   fi
793 fi
794 echo "$ac_t""$INSTALL" 1>&6
795
796 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
797 # It thinks the first close brace ends the variable substitution.
798 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
799
800 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
801
802
803 for ac_prog in mawk gawk nawk awk
804 do
805 # Extract the first word of "$ac_prog", so it can be a program name with args.
806 set dummy $ac_prog; ac_word=$2
807 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
808 echo "configure:809: checking for $ac_word" >&5
809 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
810   echo $ac_n "(cached) $ac_c" 1>&6
811 else
812   if test -n "$AWK"; then
813   ac_cv_prog_AWK="$AWK" # Let the user override the test.
814 else
815   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
816   for ac_dir in $PATH; do
817     test -z "$ac_dir" && ac_dir=.
818     if test -f $ac_dir/$ac_word; then
819       ac_cv_prog_AWK="$ac_prog"
820       break
821     fi
822   done
823   IFS="$ac_save_ifs"
824 fi
825 fi
826 AWK="$ac_cv_prog_AWK"
827 if test -n "$AWK"; then
828   echo "$ac_t""$AWK" 1>&6
829 else
830   echo "$ac_t""no" 1>&6
831 fi
832
833 test -n "$AWK" && break
834 done
835
836
837
838 # Do some error checking and defaulting for the host and target type.
839 # The inputs are:
840 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
841 #
842 # The rules are:
843 # 1. You are not allowed to specify --host, --target, and nonopt at the
844 #    same time.
845 # 2. Host defaults to nonopt.
846 # 3. If nonopt is not specified, then host defaults to the current host,
847 #    as determined by config.guess.
848 # 4. Target and build default to nonopt.
849 # 5. If nonopt is not specified, then target and build default to host.
850
851 # The aliases save the names the user supplied, while $host etc.
852 # will get canonicalized.
853 case $host---$target---$nonopt in
854 NONE---*---* | *---NONE---* | *---*---NONE) ;;
855 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
856 esac
857
858
859 # Make sure we can run config.sub.
860 if $ac_config_sub sun4 >/dev/null 2>&1; then :
861 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
862 fi
863
864 echo $ac_n "checking host system type""... $ac_c" 1>&6
865 echo "configure:866: checking host system type" >&5
866
867 host_alias=$host
868 case "$host_alias" in
869 NONE)
870   case $nonopt in
871   NONE)
872     if host_alias=`$ac_config_guess`; then :
873     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
874     fi ;;
875   *) host_alias=$nonopt ;;
876   esac ;;
877 esac
878
879 host=`$ac_config_sub $host_alias`
880 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
881 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
882 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
883 echo "$ac_t""$host" 1>&6
884
885 echo $ac_n "checking target system type""... $ac_c" 1>&6
886 echo "configure:887: checking target system type" >&5
887
888 target_alias=$target
889 case "$target_alias" in
890 NONE)
891   case $nonopt in
892   NONE) target_alias=$host_alias ;;
893   *) target_alias=$nonopt ;;
894   esac ;;
895 esac
896
897 target=`$ac_config_sub $target_alias`
898 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
899 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
900 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
901 echo "$ac_t""$target" 1>&6
902
903 echo $ac_n "checking build system type""... $ac_c" 1>&6
904 echo "configure:905: checking build system type" >&5
905
906 build_alias=$build
907 case "$build_alias" in
908 NONE)
909   case $nonopt in
910   NONE) build_alias=$host_alias ;;
911   *) build_alias=$nonopt ;;
912   esac ;;
913 esac
914
915 build=`$ac_config_sub $build_alias`
916 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
917 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
918 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
919 echo "$ac_t""$build" 1>&6
920
921 test "$host_alias" != "$target_alias" &&
922   test "$program_prefix$program_suffix$program_transform_name" = \
923     NONENONEs,x,x, &&
924   program_prefix=${target_alias}-
925
926 case "$host_os" in
927         *linux*)   cat >> confdefs.h <<\EOF
928 #define LINUX 1
929 EOF
930 ;;
931         *solaris*) cat >> confdefs.h <<\EOF
932 #define SUNOS5 1
933 EOF
934 ;;
935         *sunos*) cat >> confdefs.h <<\EOF
936 #define SUNOS4 1
937 EOF
938 ;;
939         *irix*) cat >> confdefs.h <<\EOF
940 #define IRIX 1
941 EOF
942 ;;
943         *aix*) cat >> confdefs.h <<\EOF
944 #define AIX 1
945 EOF
946 ;;
947         *hpux*) cat >> confdefs.h <<\EOF
948 #define HPUX 1
949 EOF
950 ;;
951         *qnx*) cat >> confdefs.h <<\EOF
952 #define QNX 1
953 EOF
954 ;;
955         *osf1*) cat >> confdefs.h <<\EOF
956 #define OSF1 1
957 EOF
958 ;;
959         *sco*) cat >> confdefs.h <<\EOF
960 #define SCO 1
961 EOF
962 ;;
963         *next2*) cat >> confdefs.h <<\EOF
964 #define NEXT2 1
965 EOF
966 ;;
967 esac
968
969 if test x"$ac_cv_canonical_host" != x &&
970    test x"$ac_cv_canonical_host" != x"$host"; then
971    echo "system config has changed - remove config.cache"; exit 1;
972 fi
973
974 if eval "test \"`echo '$''{'ac_cv_canonical_host'+set}'`\" = set"; then
975   echo $ac_n "(cached) $ac_c" 1>&6
976 else
977   ac_cv_canonical_host=$host;
978 fi
979
980
981
982 echo $ac_n "checking for inline""... $ac_c" 1>&6
983 echo "configure:984: checking for inline" >&5
984 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
985   echo $ac_n "(cached) $ac_c" 1>&6
986 else
987   ac_cv_c_inline=no
988 for ac_kw in inline __inline__ __inline; do
989   cat > conftest.$ac_ext <<EOF
990 #line 991 "configure"
991 #include "confdefs.h"
992
993 int main() {
994 } $ac_kw foo() {
995 ; return 0; }
996 EOF
997 if { (eval echo configure:998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
998   rm -rf conftest*
999   ac_cv_c_inline=$ac_kw; break
1000 else
1001   echo "configure: failed program was:" >&5
1002   cat conftest.$ac_ext >&5
1003 fi
1004 rm -f conftest*
1005 done
1006
1007 fi
1008
1009 echo "$ac_t""$ac_cv_c_inline" 1>&6
1010 case "$ac_cv_c_inline" in
1011   inline | yes) ;;
1012   no) cat >> confdefs.h <<\EOF
1013 #define inline 
1014 EOF
1015  ;;
1016   *)  cat >> confdefs.h <<EOF
1017 #define inline $ac_cv_c_inline
1018 EOF
1019  ;;
1020 esac
1021
1022 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1023 echo "configure:1024: checking how to run the C preprocessor" >&5
1024 # On Suns, sometimes $CPP names a directory.
1025 if test -n "$CPP" && test -d "$CPP"; then
1026   CPP=
1027 fi
1028 if test -z "$CPP"; then
1029 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1030   echo $ac_n "(cached) $ac_c" 1>&6
1031 else
1032     # This must be in double quotes, not single quotes, because CPP may get
1033   # substituted into the Makefile and "${CC-cc}" will confuse make.
1034   CPP="${CC-cc} -E"
1035   # On the NeXT, cc -E runs the code through the compiler's parser,
1036   # not just through cpp.
1037   cat > conftest.$ac_ext <<EOF
1038 #line 1039 "configure"
1039 #include "confdefs.h"
1040 #include <assert.h>
1041 Syntax Error
1042 EOF
1043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1044 { (eval echo configure:1045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1045 ac_err=`grep -v '^ *+' conftest.out`
1046 if test -z "$ac_err"; then
1047   :
1048 else
1049   echo "$ac_err" >&5
1050   echo "configure: failed program was:" >&5
1051   cat conftest.$ac_ext >&5
1052   rm -rf conftest*
1053   CPP="${CC-cc} -E -traditional-cpp"
1054   cat > conftest.$ac_ext <<EOF
1055 #line 1056 "configure"
1056 #include "confdefs.h"
1057 #include <assert.h>
1058 Syntax Error
1059 EOF
1060 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1061 { (eval echo configure:1062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1062 ac_err=`grep -v '^ *+' conftest.out`
1063 if test -z "$ac_err"; then
1064   :
1065 else
1066   echo "$ac_err" >&5
1067   echo "configure: failed program was:" >&5
1068   cat conftest.$ac_ext >&5
1069   rm -rf conftest*
1070   CPP=/lib/cpp
1071 fi
1072 rm -f conftest*
1073 fi
1074 rm -f conftest*
1075   ac_cv_prog_CPP="$CPP"
1076 fi
1077   CPP="$ac_cv_prog_CPP"
1078 else
1079   ac_cv_prog_CPP="$CPP"
1080 fi
1081 echo "$ac_t""$CPP" 1>&6
1082
1083 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1084 echo "configure:1085: checking for ANSI C header files" >&5
1085 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1086   echo $ac_n "(cached) $ac_c" 1>&6
1087 else
1088   cat > conftest.$ac_ext <<EOF
1089 #line 1090 "configure"
1090 #include "confdefs.h"
1091 #include <stdlib.h>
1092 #include <stdarg.h>
1093 #include <string.h>
1094 #include <float.h>
1095 EOF
1096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1097 { (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1098 ac_err=`grep -v '^ *+' conftest.out`
1099 if test -z "$ac_err"; then
1100   rm -rf conftest*
1101   ac_cv_header_stdc=yes
1102 else
1103   echo "$ac_err" >&5
1104   echo "configure: failed program was:" >&5
1105   cat conftest.$ac_ext >&5
1106   rm -rf conftest*
1107   ac_cv_header_stdc=no
1108 fi
1109 rm -f conftest*
1110
1111 if test $ac_cv_header_stdc = yes; then
1112   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1113 cat > conftest.$ac_ext <<EOF
1114 #line 1115 "configure"
1115 #include "confdefs.h"
1116 #include <string.h>
1117 EOF
1118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1119   egrep "memchr" >/dev/null 2>&1; then
1120   :
1121 else
1122   rm -rf conftest*
1123   ac_cv_header_stdc=no
1124 fi
1125 rm -f conftest*
1126
1127 fi
1128
1129 if test $ac_cv_header_stdc = yes; then
1130   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1131 cat > conftest.$ac_ext <<EOF
1132 #line 1133 "configure"
1133 #include "confdefs.h"
1134 #include <stdlib.h>
1135 EOF
1136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1137   egrep "free" >/dev/null 2>&1; then
1138   :
1139 else
1140   rm -rf conftest*
1141   ac_cv_header_stdc=no
1142 fi
1143 rm -f conftest*
1144
1145 fi
1146
1147 if test $ac_cv_header_stdc = yes; then
1148   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1149 if test "$cross_compiling" = yes; then
1150   :
1151 else
1152   cat > conftest.$ac_ext <<EOF
1153 #line 1154 "configure"
1154 #include "confdefs.h"
1155 #include <ctype.h>
1156 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1157 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1158 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1159 int main () { int i; for (i = 0; i < 256; i++)
1160 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1161 exit (0); }
1162
1163 EOF
1164 if { (eval echo configure:1165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1165 then
1166   :
1167 else
1168   echo "configure: failed program was:" >&5
1169   cat conftest.$ac_ext >&5
1170   rm -fr conftest*
1171   ac_cv_header_stdc=no
1172 fi
1173 rm -fr conftest*
1174 fi
1175
1176 fi
1177 fi
1178
1179 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1180 if test $ac_cv_header_stdc = yes; then
1181   cat >> confdefs.h <<\EOF
1182 #define STDC_HEADERS 1
1183 EOF
1184
1185 fi
1186
1187 ac_header_dirent=no
1188 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1189 do
1190 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1191 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1192 echo "configure:1193: checking for $ac_hdr that defines DIR" >&5
1193 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1194   echo $ac_n "(cached) $ac_c" 1>&6
1195 else
1196   cat > conftest.$ac_ext <<EOF
1197 #line 1198 "configure"
1198 #include "confdefs.h"
1199 #include <sys/types.h>
1200 #include <$ac_hdr>
1201 int main() {
1202 DIR *dirp = 0;
1203 ; return 0; }
1204 EOF
1205 if { (eval echo configure:1206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1206   rm -rf conftest*
1207   eval "ac_cv_header_dirent_$ac_safe=yes"
1208 else
1209   echo "configure: failed program was:" >&5
1210   cat conftest.$ac_ext >&5
1211   rm -rf conftest*
1212   eval "ac_cv_header_dirent_$ac_safe=no"
1213 fi
1214 rm -f conftest*
1215 fi
1216 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1217   echo "$ac_t""yes" 1>&6
1218     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1219   cat >> confdefs.h <<EOF
1220 #define $ac_tr_hdr 1
1221 EOF
1222  ac_header_dirent=$ac_hdr; break
1223 else
1224   echo "$ac_t""no" 1>&6
1225 fi
1226 done
1227 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1228 if test $ac_header_dirent = dirent.h; then
1229 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1230 echo "configure:1231: checking for opendir in -ldir" >&5
1231 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1232 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1233   echo $ac_n "(cached) $ac_c" 1>&6
1234 else
1235   ac_save_LIBS="$LIBS"
1236 LIBS="-ldir  $LIBS"
1237 cat > conftest.$ac_ext <<EOF
1238 #line 1239 "configure"
1239 #include "confdefs.h"
1240 /* Override any gcc2 internal prototype to avoid an error.  */
1241 /* We use char because int might match the return type of a gcc2
1242     builtin and then its argument prototype would still apply.  */
1243 char opendir();
1244
1245 int main() {
1246 opendir()
1247 ; return 0; }
1248 EOF
1249 if { (eval echo configure:1250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1250   rm -rf conftest*
1251   eval "ac_cv_lib_$ac_lib_var=yes"
1252 else
1253   echo "configure: failed program was:" >&5
1254   cat conftest.$ac_ext >&5
1255   rm -rf conftest*
1256   eval "ac_cv_lib_$ac_lib_var=no"
1257 fi
1258 rm -f conftest*
1259 LIBS="$ac_save_LIBS"
1260
1261 fi
1262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1263   echo "$ac_t""yes" 1>&6
1264   LIBS="$LIBS -ldir"
1265 else
1266   echo "$ac_t""no" 1>&6
1267 fi
1268
1269 else
1270 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1271 echo "configure:1272: checking for opendir in -lx" >&5
1272 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1273 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1274   echo $ac_n "(cached) $ac_c" 1>&6
1275 else
1276   ac_save_LIBS="$LIBS"
1277 LIBS="-lx  $LIBS"
1278 cat > conftest.$ac_ext <<EOF
1279 #line 1280 "configure"
1280 #include "confdefs.h"
1281 /* Override any gcc2 internal prototype to avoid an error.  */
1282 /* We use char because int might match the return type of a gcc2
1283     builtin and then its argument prototype would still apply.  */
1284 char opendir();
1285
1286 int main() {
1287 opendir()
1288 ; return 0; }
1289 EOF
1290 if { (eval echo configure:1291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1291   rm -rf conftest*
1292   eval "ac_cv_lib_$ac_lib_var=yes"
1293 else
1294   echo "configure: failed program was:" >&5
1295   cat conftest.$ac_ext >&5
1296   rm -rf conftest*
1297   eval "ac_cv_lib_$ac_lib_var=no"
1298 fi
1299 rm -f conftest*
1300 LIBS="$ac_save_LIBS"
1301
1302 fi
1303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1304   echo "$ac_t""yes" 1>&6
1305   LIBS="$LIBS -lx"
1306 else
1307   echo "$ac_t""no" 1>&6
1308 fi
1309
1310 fi
1311
1312 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1313 echo "configure:1314: checking whether time.h and sys/time.h may both be included" >&5
1314 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1315   echo $ac_n "(cached) $ac_c" 1>&6
1316 else
1317   cat > conftest.$ac_ext <<EOF
1318 #line 1319 "configure"
1319 #include "confdefs.h"
1320 #include <sys/types.h>
1321 #include <sys/time.h>
1322 #include <time.h>
1323 int main() {
1324 struct tm *tp;
1325 ; return 0; }
1326 EOF
1327 if { (eval echo configure:1328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1328   rm -rf conftest*
1329   ac_cv_header_time=yes
1330 else
1331   echo "configure: failed program was:" >&5
1332   cat conftest.$ac_ext >&5
1333   rm -rf conftest*
1334   ac_cv_header_time=no
1335 fi
1336 rm -f conftest*
1337 fi
1338
1339 echo "$ac_t""$ac_cv_header_time" 1>&6
1340 if test $ac_cv_header_time = yes; then
1341   cat >> confdefs.h <<\EOF
1342 #define TIME_WITH_SYS_TIME 1
1343 EOF
1344
1345 fi
1346
1347 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1348 echo "configure:1349: checking for sys/wait.h that is POSIX.1 compatible" >&5
1349 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1350   echo $ac_n "(cached) $ac_c" 1>&6
1351 else
1352   cat > conftest.$ac_ext <<EOF
1353 #line 1354 "configure"
1354 #include "confdefs.h"
1355 #include <sys/types.h>
1356 #include <sys/wait.h>
1357 #ifndef WEXITSTATUS
1358 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1359 #endif
1360 #ifndef WIFEXITED
1361 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1362 #endif
1363 int main() {
1364 int s;
1365 wait (&s);
1366 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1367 ; return 0; }
1368 EOF
1369 if { (eval echo configure:1370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1370   rm -rf conftest*
1371   ac_cv_header_sys_wait_h=yes
1372 else
1373   echo "configure: failed program was:" >&5
1374   cat conftest.$ac_ext >&5
1375   rm -rf conftest*
1376   ac_cv_header_sys_wait_h=no
1377 fi
1378 rm -f conftest*
1379 fi
1380
1381 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1382 if test $ac_cv_header_sys_wait_h = yes; then
1383   cat >> confdefs.h <<\EOF
1384 #define HAVE_SYS_WAIT_H 1
1385 EOF
1386
1387 fi
1388
1389 for ac_hdr in sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1390 do
1391 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1392 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1393 echo "configure:1394: checking for $ac_hdr" >&5
1394 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1395   echo $ac_n "(cached) $ac_c" 1>&6
1396 else
1397   cat > conftest.$ac_ext <<EOF
1398 #line 1399 "configure"
1399 #include "confdefs.h"
1400 #include <$ac_hdr>
1401 EOF
1402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1403 { (eval echo configure:1404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1404 ac_err=`grep -v '^ *+' conftest.out`
1405 if test -z "$ac_err"; then
1406   rm -rf conftest*
1407   eval "ac_cv_header_$ac_safe=yes"
1408 else
1409   echo "$ac_err" >&5
1410   echo "configure: failed program was:" >&5
1411   cat conftest.$ac_ext >&5
1412   rm -rf conftest*
1413   eval "ac_cv_header_$ac_safe=no"
1414 fi
1415 rm -f conftest*
1416 fi
1417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1418   echo "$ac_t""yes" 1>&6
1419     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1420   cat >> confdefs.h <<EOF
1421 #define $ac_tr_hdr 1
1422 EOF
1423  
1424 else
1425   echo "$ac_t""no" 1>&6
1426 fi
1427 done
1428
1429 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1430 do
1431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1433 echo "configure:1434: checking for $ac_hdr" >&5
1434 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1435   echo $ac_n "(cached) $ac_c" 1>&6
1436 else
1437   cat > conftest.$ac_ext <<EOF
1438 #line 1439 "configure"
1439 #include "confdefs.h"
1440 #include <$ac_hdr>
1441 EOF
1442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1443 { (eval echo configure:1444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1444 ac_err=`grep -v '^ *+' conftest.out`
1445 if test -z "$ac_err"; then
1446   rm -rf conftest*
1447   eval "ac_cv_header_$ac_safe=yes"
1448 else
1449   echo "$ac_err" >&5
1450   echo "configure: failed program was:" >&5
1451   cat conftest.$ac_ext >&5
1452   rm -rf conftest*
1453   eval "ac_cv_header_$ac_safe=no"
1454 fi
1455 rm -f conftest*
1456 fi
1457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1458   echo "$ac_t""yes" 1>&6
1459     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1460   cat >> confdefs.h <<EOF
1461 #define $ac_tr_hdr 1
1462 EOF
1463  
1464 else
1465   echo "$ac_t""no" 1>&6
1466 fi
1467 done
1468
1469 for ac_hdr in compat.h rpc/types.h rpc/xdr.h rpc/auth.h rpc/clnt.h
1470 do
1471 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1472 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1473 echo "configure:1474: checking for $ac_hdr" >&5
1474 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1475   echo $ac_n "(cached) $ac_c" 1>&6
1476 else
1477   cat > conftest.$ac_ext <<EOF
1478 #line 1479 "configure"
1479 #include "confdefs.h"
1480 #include <$ac_hdr>
1481 EOF
1482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1483 { (eval echo configure:1484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1484 ac_err=`grep -v '^ *+' conftest.out`
1485 if test -z "$ac_err"; then
1486   rm -rf conftest*
1487   eval "ac_cv_header_$ac_safe=yes"
1488 else
1489   echo "$ac_err" >&5
1490   echo "configure: failed program was:" >&5
1491   cat conftest.$ac_ext >&5
1492   rm -rf conftest*
1493   eval "ac_cv_header_$ac_safe=no"
1494 fi
1495 rm -f conftest*
1496 fi
1497 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1498   echo "$ac_t""yes" 1>&6
1499     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1500   cat >> confdefs.h <<EOF
1501 #define $ac_tr_hdr 1
1502 EOF
1503  
1504 else
1505   echo "$ac_t""no" 1>&6
1506 fi
1507 done
1508
1509 for ac_hdr in rpcsvc/yp_prot.h rpcsvc/ypclnt.h sys/param.h ctype.h 
1510 do
1511 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1512 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1513 echo "configure:1514: checking for $ac_hdr" >&5
1514 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1515   echo $ac_n "(cached) $ac_c" 1>&6
1516 else
1517   cat > conftest.$ac_ext <<EOF
1518 #line 1519 "configure"
1519 #include "confdefs.h"
1520 #include <$ac_hdr>
1521 EOF
1522 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1523 { (eval echo configure:1524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1524 ac_err=`grep -v '^ *+' conftest.out`
1525 if test -z "$ac_err"; then
1526   rm -rf conftest*
1527   eval "ac_cv_header_$ac_safe=yes"
1528 else
1529   echo "$ac_err" >&5
1530   echo "configure: failed program was:" >&5
1531   cat conftest.$ac_ext >&5
1532   rm -rf conftest*
1533   eval "ac_cv_header_$ac_safe=no"
1534 fi
1535 rm -f conftest*
1536 fi
1537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1538   echo "$ac_t""yes" 1>&6
1539     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1540   cat >> confdefs.h <<EOF
1541 #define $ac_tr_hdr 1
1542 EOF
1543  
1544 else
1545   echo "$ac_t""no" 1>&6
1546 fi
1547 done
1548
1549 for ac_hdr in sys/wait.h sys/resource.h sys/ioctl.h sys/mode.h
1550 do
1551 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1552 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1553 echo "configure:1554: checking for $ac_hdr" >&5
1554 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1555   echo $ac_n "(cached) $ac_c" 1>&6
1556 else
1557   cat > conftest.$ac_ext <<EOF
1558 #line 1559 "configure"
1559 #include "confdefs.h"
1560 #include <$ac_hdr>
1561 EOF
1562 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1563 { (eval echo configure:1564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1564 ac_err=`grep -v '^ *+' conftest.out`
1565 if test -z "$ac_err"; then
1566   rm -rf conftest*
1567   eval "ac_cv_header_$ac_safe=yes"
1568 else
1569   echo "$ac_err" >&5
1570   echo "configure: failed program was:" >&5
1571   cat conftest.$ac_ext >&5
1572   rm -rf conftest*
1573   eval "ac_cv_header_$ac_safe=no"
1574 fi
1575 rm -f conftest*
1576 fi
1577 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1578   echo "$ac_t""yes" 1>&6
1579     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1580   cat >> confdefs.h <<EOF
1581 #define $ac_tr_hdr 1
1582 EOF
1583  
1584 else
1585   echo "$ac_t""no" 1>&6
1586 fi
1587 done
1588
1589 for ac_hdr in sys/filio.h string.h strings.h stdlib.h sys/socket.h
1590 do
1591 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1592 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1593 echo "configure:1594: checking for $ac_hdr" >&5
1594 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1595   echo $ac_n "(cached) $ac_c" 1>&6
1596 else
1597   cat > conftest.$ac_ext <<EOF
1598 #line 1599 "configure"
1599 #include "confdefs.h"
1600 #include <$ac_hdr>
1601 EOF
1602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1603 { (eval echo configure:1604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1604 ac_err=`grep -v '^ *+' conftest.out`
1605 if test -z "$ac_err"; then
1606   rm -rf conftest*
1607   eval "ac_cv_header_$ac_safe=yes"
1608 else
1609   echo "$ac_err" >&5
1610   echo "configure: failed program was:" >&5
1611   cat conftest.$ac_ext >&5
1612   rm -rf conftest*
1613   eval "ac_cv_header_$ac_safe=no"
1614 fi
1615 rm -f conftest*
1616 fi
1617 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1618   echo "$ac_t""yes" 1>&6
1619     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1620   cat >> confdefs.h <<EOF
1621 #define $ac_tr_hdr 1
1622 EOF
1623  
1624 else
1625   echo "$ac_t""no" 1>&6
1626 fi
1627 done
1628
1629 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h
1630 do
1631 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1632 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1633 echo "configure:1634: checking for $ac_hdr" >&5
1634 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1635   echo $ac_n "(cached) $ac_c" 1>&6
1636 else
1637   cat > conftest.$ac_ext <<EOF
1638 #line 1639 "configure"
1639 #include "confdefs.h"
1640 #include <$ac_hdr>
1641 EOF
1642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1643 { (eval echo configure:1644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1644 ac_err=`grep -v '^ *+' conftest.out`
1645 if test -z "$ac_err"; then
1646   rm -rf conftest*
1647   eval "ac_cv_header_$ac_safe=yes"
1648 else
1649   echo "$ac_err" >&5
1650   echo "configure: failed program was:" >&5
1651   cat conftest.$ac_ext >&5
1652   rm -rf conftest*
1653   eval "ac_cv_header_$ac_safe=no"
1654 fi
1655 rm -f conftest*
1656 fi
1657 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1658   echo "$ac_t""yes" 1>&6
1659     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1660   cat >> confdefs.h <<EOF
1661 #define $ac_tr_hdr 1
1662 EOF
1663  
1664 else
1665   echo "$ac_t""no" 1>&6
1666 fi
1667 done
1668
1669 for ac_hdr in sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
1670 do
1671 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1672 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1673 echo "configure:1674: checking for $ac_hdr" >&5
1674 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1675   echo $ac_n "(cached) $ac_c" 1>&6
1676 else
1677   cat > conftest.$ac_ext <<EOF
1678 #line 1679 "configure"
1679 #include "confdefs.h"
1680 #include <$ac_hdr>
1681 EOF
1682 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1683 { (eval echo configure:1684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1684 ac_err=`grep -v '^ *+' conftest.out`
1685 if test -z "$ac_err"; then
1686   rm -rf conftest*
1687   eval "ac_cv_header_$ac_safe=yes"
1688 else
1689   echo "$ac_err" >&5
1690   echo "configure: failed program was:" >&5
1691   cat conftest.$ac_ext >&5
1692   rm -rf conftest*
1693   eval "ac_cv_header_$ac_safe=no"
1694 fi
1695 rm -f conftest*
1696 fi
1697 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1698   echo "$ac_t""yes" 1>&6
1699     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1700   cat >> confdefs.h <<EOF
1701 #define $ac_tr_hdr 1
1702 EOF
1703  
1704 else
1705   echo "$ac_t""no" 1>&6
1706 fi
1707 done
1708
1709 for ac_hdr in shadow.h netinet/tcp.h sys/security.h security/pam_appl.h
1710 do
1711 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1712 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1713 echo "configure:1714: checking for $ac_hdr" >&5
1714 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1715   echo $ac_n "(cached) $ac_c" 1>&6
1716 else
1717   cat > conftest.$ac_ext <<EOF
1718 #line 1719 "configure"
1719 #include "confdefs.h"
1720 #include <$ac_hdr>
1721 EOF
1722 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1723 { (eval echo configure:1724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1724 ac_err=`grep -v '^ *+' conftest.out`
1725 if test -z "$ac_err"; then
1726   rm -rf conftest*
1727   eval "ac_cv_header_$ac_safe=yes"
1728 else
1729   echo "$ac_err" >&5
1730   echo "configure: failed program was:" >&5
1731   cat conftest.$ac_ext >&5
1732   rm -rf conftest*
1733   eval "ac_cv_header_$ac_safe=no"
1734 fi
1735 rm -f conftest*
1736 fi
1737 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1738   echo "$ac_t""yes" 1>&6
1739     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1740   cat >> confdefs.h <<EOF
1741 #define $ac_tr_hdr 1
1742 EOF
1743  
1744 else
1745   echo "$ac_t""no" 1>&6
1746 fi
1747 done
1748
1749 for ac_hdr in stropts.h poll.h readline.h history.h readline/readline.h
1750 do
1751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1753 echo "configure:1754: checking for $ac_hdr" >&5
1754 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1755   echo $ac_n "(cached) $ac_c" 1>&6
1756 else
1757   cat > conftest.$ac_ext <<EOF
1758 #line 1759 "configure"
1759 #include "confdefs.h"
1760 #include <$ac_hdr>
1761 EOF
1762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1763 { (eval echo configure:1764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1764 ac_err=`grep -v '^ *+' conftest.out`
1765 if test -z "$ac_err"; then
1766   rm -rf conftest*
1767   eval "ac_cv_header_$ac_safe=yes"
1768 else
1769   echo "$ac_err" >&5
1770   echo "configure: failed program was:" >&5
1771   cat conftest.$ac_ext >&5
1772   rm -rf conftest*
1773   eval "ac_cv_header_$ac_safe=no"
1774 fi
1775 rm -f conftest*
1776 fi
1777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1778   echo "$ac_t""yes" 1>&6
1779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1780   cat >> confdefs.h <<EOF
1781 #define $ac_tr_hdr 1
1782 EOF
1783  
1784 else
1785   echo "$ac_t""no" 1>&6
1786 fi
1787 done
1788
1789 for ac_hdr in readline/history.h
1790 do
1791 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1792 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1793 echo "configure:1794: checking for $ac_hdr" >&5
1794 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1795   echo $ac_n "(cached) $ac_c" 1>&6
1796 else
1797   cat > conftest.$ac_ext <<EOF
1798 #line 1799 "configure"
1799 #include "confdefs.h"
1800 #include <$ac_hdr>
1801 EOF
1802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1803 { (eval echo configure:1804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1804 ac_err=`grep -v '^ *+' conftest.out`
1805 if test -z "$ac_err"; then
1806   rm -rf conftest*
1807   eval "ac_cv_header_$ac_safe=yes"
1808 else
1809   echo "$ac_err" >&5
1810   echo "configure: failed program was:" >&5
1811   cat conftest.$ac_ext >&5
1812   rm -rf conftest*
1813   eval "ac_cv_header_$ac_safe=no"
1814 fi
1815 rm -f conftest*
1816 fi
1817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1818   echo "$ac_t""yes" 1>&6
1819     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1820   cat >> confdefs.h <<EOF
1821 #define $ac_tr_hdr 1
1822 EOF
1823  
1824 else
1825   echo "$ac_t""no" 1>&6
1826 fi
1827 done
1828
1829
1830 echo $ac_n "checking size of int""... $ac_c" 1>&6
1831 echo "configure:1832: checking size of int" >&5
1832 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1833   echo $ac_n "(cached) $ac_c" 1>&6
1834 else
1835   if test "$cross_compiling" = yes; then
1836   ac_cv_sizeof_int=cross
1837 else
1838   cat > conftest.$ac_ext <<EOF
1839 #line 1840 "configure"
1840 #include "confdefs.h"
1841 #include <stdio.h>
1842 main()
1843 {
1844   FILE *f=fopen("conftestval", "w");
1845   if (!f) exit(1);
1846   fprintf(f, "%d\n", sizeof(int));
1847   exit(0);
1848 }
1849 EOF
1850 if { (eval echo configure:1851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1851 then
1852   ac_cv_sizeof_int=`cat conftestval`
1853 else
1854   echo "configure: failed program was:" >&5
1855   cat conftest.$ac_ext >&5
1856   rm -fr conftest*
1857   ac_cv_sizeof_int=0
1858 fi
1859 rm -fr conftest*
1860 fi
1861
1862 fi
1863 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1864 cat >> confdefs.h <<EOF
1865 #define SIZEOF_INT $ac_cv_sizeof_int
1866 EOF
1867
1868
1869 echo $ac_n "checking size of long""... $ac_c" 1>&6
1870 echo "configure:1871: checking size of long" >&5
1871 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1872   echo $ac_n "(cached) $ac_c" 1>&6
1873 else
1874   if test "$cross_compiling" = yes; then
1875   ac_cv_sizeof_long=cross
1876 else
1877   cat > conftest.$ac_ext <<EOF
1878 #line 1879 "configure"
1879 #include "confdefs.h"
1880 #include <stdio.h>
1881 main()
1882 {
1883   FILE *f=fopen("conftestval", "w");
1884   if (!f) exit(1);
1885   fprintf(f, "%d\n", sizeof(long));
1886   exit(0);
1887 }
1888 EOF
1889 if { (eval echo configure:1890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1890 then
1891   ac_cv_sizeof_long=`cat conftestval`
1892 else
1893   echo "configure: failed program was:" >&5
1894   cat conftest.$ac_ext >&5
1895   rm -fr conftest*
1896   ac_cv_sizeof_long=0
1897 fi
1898 rm -fr conftest*
1899 fi
1900
1901 fi
1902 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1903 cat >> confdefs.h <<EOF
1904 #define SIZEOF_LONG $ac_cv_sizeof_long
1905 EOF
1906
1907
1908 echo $ac_n "checking size of short""... $ac_c" 1>&6
1909 echo "configure:1910: checking size of short" >&5
1910 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1911   echo $ac_n "(cached) $ac_c" 1>&6
1912 else
1913   if test "$cross_compiling" = yes; then
1914   ac_cv_sizeof_short=cross
1915 else
1916   cat > conftest.$ac_ext <<EOF
1917 #line 1918 "configure"
1918 #include "confdefs.h"
1919 #include <stdio.h>
1920 main()
1921 {
1922   FILE *f=fopen("conftestval", "w");
1923   if (!f) exit(1);
1924   fprintf(f, "%d\n", sizeof(short));
1925   exit(0);
1926 }
1927 EOF
1928 if { (eval echo configure:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1929 then
1930   ac_cv_sizeof_short=`cat conftestval`
1931 else
1932   echo "configure: failed program was:" >&5
1933   cat conftest.$ac_ext >&5
1934   rm -fr conftest*
1935   ac_cv_sizeof_short=0
1936 fi
1937 rm -fr conftest*
1938 fi
1939
1940 fi
1941 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1942 cat >> confdefs.h <<EOF
1943 #define SIZEOF_SHORT $ac_cv_sizeof_short
1944 EOF
1945
1946
1947
1948 echo $ac_n "checking for working const""... $ac_c" 1>&6
1949 echo "configure:1950: checking for working const" >&5
1950 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1951   echo $ac_n "(cached) $ac_c" 1>&6
1952 else
1953   cat > conftest.$ac_ext <<EOF
1954 #line 1955 "configure"
1955 #include "confdefs.h"
1956
1957 int main() {
1958
1959 /* Ultrix mips cc rejects this.  */
1960 typedef int charset[2]; const charset x;
1961 /* SunOS 4.1.1 cc rejects this.  */
1962 char const *const *ccp;
1963 char **p;
1964 /* NEC SVR4.0.2 mips cc rejects this.  */
1965 struct point {int x, y;};
1966 static struct point const zero = {0,0};
1967 /* AIX XL C 1.02.0.0 rejects this.
1968    It does not let you subtract one const X* pointer from another in an arm
1969    of an if-expression whose if-part is not a constant expression */
1970 const char *g = "string";
1971 ccp = &g + (g ? g-g : 0);
1972 /* HPUX 7.0 cc rejects these. */
1973 ++ccp;
1974 p = (char**) ccp;
1975 ccp = (char const *const *) p;
1976 { /* SCO 3.2v4 cc rejects this.  */
1977   char *t;
1978   char const *s = 0 ? (char *) 0 : (char const *) 0;
1979
1980   *t++ = 0;
1981 }
1982 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1983   int x[] = {25, 17};
1984   const int *foo = &x[0];
1985   ++foo;
1986 }
1987 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1988   typedef const int *iptr;
1989   iptr p = 0;
1990   ++p;
1991 }
1992 { /* AIX XL C 1.02.0.0 rejects this saying
1993      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1994   struct s { int j; const int *ap[3]; };
1995   struct s *b; b->j = 5;
1996 }
1997 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1998   const int foo = 10;
1999 }
2000
2001 ; return 0; }
2002 EOF
2003 if { (eval echo configure:2004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2004   rm -rf conftest*
2005   ac_cv_c_const=yes
2006 else
2007   echo "configure: failed program was:" >&5
2008   cat conftest.$ac_ext >&5
2009   rm -rf conftest*
2010   ac_cv_c_const=no
2011 fi
2012 rm -f conftest*
2013 fi
2014
2015 echo "$ac_t""$ac_cv_c_const" 1>&6
2016 if test $ac_cv_c_const = no; then
2017   cat >> confdefs.h <<\EOF
2018 #define const 
2019 EOF
2020
2021 fi
2022
2023 echo $ac_n "checking for inline""... $ac_c" 1>&6
2024 echo "configure:2025: checking for inline" >&5
2025 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2026   echo $ac_n "(cached) $ac_c" 1>&6
2027 else
2028   ac_cv_c_inline=no
2029 for ac_kw in inline __inline__ __inline; do
2030   cat > conftest.$ac_ext <<EOF
2031 #line 2032 "configure"
2032 #include "confdefs.h"
2033
2034 int main() {
2035 } $ac_kw foo() {
2036 ; return 0; }
2037 EOF
2038 if { (eval echo configure:2039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2039   rm -rf conftest*
2040   ac_cv_c_inline=$ac_kw; break
2041 else
2042   echo "configure: failed program was:" >&5
2043   cat conftest.$ac_ext >&5
2044 fi
2045 rm -f conftest*
2046 done
2047
2048 fi
2049
2050 echo "$ac_t""$ac_cv_c_inline" 1>&6
2051 case "$ac_cv_c_inline" in
2052   inline | yes) ;;
2053   no) cat >> confdefs.h <<\EOF
2054 #define inline 
2055 EOF
2056  ;;
2057   *)  cat >> confdefs.h <<EOF
2058 #define inline $ac_cv_c_inline
2059 EOF
2060  ;;
2061 esac
2062
2063 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2064 echo "configure:2065: checking whether byte ordering is bigendian" >&5
2065 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2066   echo $ac_n "(cached) $ac_c" 1>&6
2067 else
2068   ac_cv_c_bigendian=unknown
2069 # See if sys/param.h defines the BYTE_ORDER macro.
2070 cat > conftest.$ac_ext <<EOF
2071 #line 2072 "configure"
2072 #include "confdefs.h"
2073 #include <sys/types.h>
2074 #include <sys/param.h>
2075 int main() {
2076
2077 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2078  bogus endian macros
2079 #endif
2080 ; return 0; }
2081 EOF
2082 if { (eval echo configure:2083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2083   rm -rf conftest*
2084   # It does; now see whether it defined to BIG_ENDIAN or not.
2085 cat > conftest.$ac_ext <<EOF
2086 #line 2087 "configure"
2087 #include "confdefs.h"
2088 #include <sys/types.h>
2089 #include <sys/param.h>
2090 int main() {
2091
2092 #if BYTE_ORDER != BIG_ENDIAN
2093  not big endian
2094 #endif
2095 ; return 0; }
2096 EOF
2097 if { (eval echo configure:2098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2098   rm -rf conftest*
2099   ac_cv_c_bigendian=yes
2100 else
2101   echo "configure: failed program was:" >&5
2102   cat conftest.$ac_ext >&5
2103   rm -rf conftest*
2104   ac_cv_c_bigendian=no
2105 fi
2106 rm -f conftest*
2107 else
2108   echo "configure: failed program was:" >&5
2109   cat conftest.$ac_ext >&5
2110 fi
2111 rm -f conftest*
2112 if test $ac_cv_c_bigendian = unknown; then
2113 if test "$cross_compiling" = yes; then
2114     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2115 else
2116   cat > conftest.$ac_ext <<EOF
2117 #line 2118 "configure"
2118 #include "confdefs.h"
2119 main () {
2120   /* Are we little or big endian?  From Harbison&Steele.  */
2121   union
2122   {
2123     long l;
2124     char c[sizeof (long)];
2125   } u;
2126   u.l = 1;
2127   exit (u.c[sizeof (long) - 1] == 1);
2128 }
2129 EOF
2130 if { (eval echo configure:2131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2131 then
2132   ac_cv_c_bigendian=no
2133 else
2134   echo "configure: failed program was:" >&5
2135   cat conftest.$ac_ext >&5
2136   rm -fr conftest*
2137   ac_cv_c_bigendian=yes
2138 fi
2139 rm -fr conftest*
2140 fi
2141
2142 fi
2143 fi
2144
2145 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2146 if test $ac_cv_c_bigendian = yes; then
2147   cat >> confdefs.h <<\EOF
2148 #define WORDS_BIGENDIAN 1
2149 EOF
2150
2151 fi
2152
2153 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2154 echo "configure:2155: checking whether char is unsigned" >&5
2155 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2156   echo $ac_n "(cached) $ac_c" 1>&6
2157 else
2158   if test "$GCC" = yes; then
2159   # GCC predefines this symbol on systems where it applies.
2160 cat > conftest.$ac_ext <<EOF
2161 #line 2162 "configure"
2162 #include "confdefs.h"
2163 #ifdef __CHAR_UNSIGNED__
2164   yes
2165 #endif
2166
2167 EOF
2168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2169   egrep "yes" >/dev/null 2>&1; then
2170   rm -rf conftest*
2171   ac_cv_c_char_unsigned=yes
2172 else
2173   rm -rf conftest*
2174   ac_cv_c_char_unsigned=no
2175 fi
2176 rm -f conftest*
2177
2178 else
2179 if test "$cross_compiling" = yes; then
2180     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2181 else
2182   cat > conftest.$ac_ext <<EOF
2183 #line 2184 "configure"
2184 #include "confdefs.h"
2185 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2186 #if !defined(__STDC__) || __STDC__ != 1
2187 #define volatile
2188 #endif
2189 main() {
2190   volatile char c = 255; exit(c < 0);
2191 }
2192 EOF
2193 if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2194 then
2195   ac_cv_c_char_unsigned=yes
2196 else
2197   echo "configure: failed program was:" >&5
2198   cat conftest.$ac_ext >&5
2199   rm -fr conftest*
2200   ac_cv_c_char_unsigned=no
2201 fi
2202 rm -fr conftest*
2203 fi
2204
2205 fi
2206 fi
2207
2208 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2209 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2210   cat >> confdefs.h <<\EOF
2211 #define __CHAR_UNSIGNED__ 1
2212 EOF
2213
2214 fi
2215
2216
2217 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2218 echo "configure:2219: checking return type of signal handlers" >&5
2219 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2220   echo $ac_n "(cached) $ac_c" 1>&6
2221 else
2222   cat > conftest.$ac_ext <<EOF
2223 #line 2224 "configure"
2224 #include "confdefs.h"
2225 #include <sys/types.h>
2226 #include <signal.h>
2227 #ifdef signal
2228 #undef signal
2229 #endif
2230 #ifdef __cplusplus
2231 extern "C" void (*signal (int, void (*)(int)))(int);
2232 #else
2233 void (*signal ()) ();
2234 #endif
2235
2236 int main() {
2237 int i;
2238 ; return 0; }
2239 EOF
2240 if { (eval echo configure:2241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2241   rm -rf conftest*
2242   ac_cv_type_signal=void
2243 else
2244   echo "configure: failed program was:" >&5
2245   cat conftest.$ac_ext >&5
2246   rm -rf conftest*
2247   ac_cv_type_signal=int
2248 fi
2249 rm -f conftest*
2250 fi
2251
2252 echo "$ac_t""$ac_cv_type_signal" 1>&6
2253 cat >> confdefs.h <<EOF
2254 #define RETSIGTYPE $ac_cv_type_signal
2255 EOF
2256
2257
2258 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2259 echo "configure:2260: checking for uid_t in sys/types.h" >&5
2260 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2261   echo $ac_n "(cached) $ac_c" 1>&6
2262 else
2263   cat > conftest.$ac_ext <<EOF
2264 #line 2265 "configure"
2265 #include "confdefs.h"
2266 #include <sys/types.h>
2267 EOF
2268 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2269   egrep "uid_t" >/dev/null 2>&1; then
2270   rm -rf conftest*
2271   ac_cv_type_uid_t=yes
2272 else
2273   rm -rf conftest*
2274   ac_cv_type_uid_t=no
2275 fi
2276 rm -f conftest*
2277
2278 fi
2279
2280 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2281 if test $ac_cv_type_uid_t = no; then
2282   cat >> confdefs.h <<\EOF
2283 #define uid_t int
2284 EOF
2285
2286   cat >> confdefs.h <<\EOF
2287 #define gid_t int
2288 EOF
2289
2290 fi
2291
2292 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2293 echo "configure:2294: checking for mode_t" >&5
2294 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2295   echo $ac_n "(cached) $ac_c" 1>&6
2296 else
2297   cat > conftest.$ac_ext <<EOF
2298 #line 2299 "configure"
2299 #include "confdefs.h"
2300 #include <sys/types.h>
2301 #if STDC_HEADERS
2302 #include <stdlib.h>
2303 #include <stddef.h>
2304 #endif
2305 EOF
2306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2307   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2308   rm -rf conftest*
2309   ac_cv_type_mode_t=yes
2310 else
2311   rm -rf conftest*
2312   ac_cv_type_mode_t=no
2313 fi
2314 rm -f conftest*
2315
2316 fi
2317 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2318 if test $ac_cv_type_mode_t = no; then
2319   cat >> confdefs.h <<\EOF
2320 #define mode_t int
2321 EOF
2322
2323 fi
2324
2325 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2326 echo "configure:2327: checking for off_t" >&5
2327 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2328   echo $ac_n "(cached) $ac_c" 1>&6
2329 else
2330   cat > conftest.$ac_ext <<EOF
2331 #line 2332 "configure"
2332 #include "confdefs.h"
2333 #include <sys/types.h>
2334 #if STDC_HEADERS
2335 #include <stdlib.h>
2336 #include <stddef.h>
2337 #endif
2338 EOF
2339 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2340   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2341   rm -rf conftest*
2342   ac_cv_type_off_t=yes
2343 else
2344   rm -rf conftest*
2345   ac_cv_type_off_t=no
2346 fi
2347 rm -f conftest*
2348
2349 fi
2350 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2351 if test $ac_cv_type_off_t = no; then
2352   cat >> confdefs.h <<\EOF
2353 #define off_t long
2354 EOF
2355
2356 fi
2357
2358 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2359 echo "configure:2360: checking for size_t" >&5
2360 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2361   echo $ac_n "(cached) $ac_c" 1>&6
2362 else
2363   cat > conftest.$ac_ext <<EOF
2364 #line 2365 "configure"
2365 #include "confdefs.h"
2366 #include <sys/types.h>
2367 #if STDC_HEADERS
2368 #include <stdlib.h>
2369 #include <stddef.h>
2370 #endif
2371 EOF
2372 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2373   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2374   rm -rf conftest*
2375   ac_cv_type_size_t=yes
2376 else
2377   rm -rf conftest*
2378   ac_cv_type_size_t=no
2379 fi
2380 rm -f conftest*
2381
2382 fi
2383 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2384 if test $ac_cv_type_size_t = no; then
2385   cat >> confdefs.h <<\EOF
2386 #define size_t unsigned
2387 EOF
2388
2389 fi
2390
2391 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2392 echo "configure:2393: checking for pid_t" >&5
2393 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2394   echo $ac_n "(cached) $ac_c" 1>&6
2395 else
2396   cat > conftest.$ac_ext <<EOF
2397 #line 2398 "configure"
2398 #include "confdefs.h"
2399 #include <sys/types.h>
2400 #if STDC_HEADERS
2401 #include <stdlib.h>
2402 #include <stddef.h>
2403 #endif
2404 EOF
2405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2406   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2407   rm -rf conftest*
2408   ac_cv_type_pid_t=yes
2409 else
2410   rm -rf conftest*
2411   ac_cv_type_pid_t=no
2412 fi
2413 rm -f conftest*
2414
2415 fi
2416 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2417 if test $ac_cv_type_pid_t = no; then
2418   cat >> confdefs.h <<\EOF
2419 #define pid_t int
2420 EOF
2421
2422 fi
2423
2424 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
2425 echo "configure:2426: checking for st_rdev in struct stat" >&5
2426 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
2427   echo $ac_n "(cached) $ac_c" 1>&6
2428 else
2429   cat > conftest.$ac_ext <<EOF
2430 #line 2431 "configure"
2431 #include "confdefs.h"
2432 #include <sys/types.h>
2433 #include <sys/stat.h>
2434 int main() {
2435 struct stat s; s.st_rdev;
2436 ; return 0; }
2437 EOF
2438 if { (eval echo configure:2439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2439   rm -rf conftest*
2440   ac_cv_struct_st_rdev=yes
2441 else
2442   echo "configure: failed program was:" >&5
2443   cat conftest.$ac_ext >&5
2444   rm -rf conftest*
2445   ac_cv_struct_st_rdev=no
2446 fi
2447 rm -f conftest*
2448 fi
2449
2450 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
2451 if test $ac_cv_struct_st_rdev = yes; then
2452   cat >> confdefs.h <<\EOF
2453 #define HAVE_ST_RDEV 1
2454 EOF
2455
2456 fi
2457
2458 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
2459 echo "configure:2460: checking for ino_t" >&5
2460 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
2461   echo $ac_n "(cached) $ac_c" 1>&6
2462 else
2463   cat > conftest.$ac_ext <<EOF
2464 #line 2465 "configure"
2465 #include "confdefs.h"
2466 #include <sys/types.h>
2467 #if STDC_HEADERS
2468 #include <stdlib.h>
2469 #include <stddef.h>
2470 #endif
2471 EOF
2472 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2473   egrep "ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2474   rm -rf conftest*
2475   ac_cv_type_ino_t=yes
2476 else
2477   rm -rf conftest*
2478   ac_cv_type_ino_t=no
2479 fi
2480 rm -f conftest*
2481
2482 fi
2483 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
2484 if test $ac_cv_type_ino_t = no; then
2485   cat >> confdefs.h <<\EOF
2486 #define ino_t unsigned
2487 EOF
2488
2489 fi
2490
2491 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
2492 echo "configure:2493: checking for ssize_t" >&5
2493 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
2494   echo $ac_n "(cached) $ac_c" 1>&6
2495 else
2496   cat > conftest.$ac_ext <<EOF
2497 #line 2498 "configure"
2498 #include "confdefs.h"
2499 #include <sys/types.h>
2500 #if STDC_HEADERS
2501 #include <stdlib.h>
2502 #include <stddef.h>
2503 #endif
2504 EOF
2505 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2506   egrep "ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2507   rm -rf conftest*
2508   ac_cv_type_ssize_t=yes
2509 else
2510   rm -rf conftest*
2511   ac_cv_type_ssize_t=no
2512 fi
2513 rm -f conftest*
2514
2515 fi
2516 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
2517 if test $ac_cv_type_ssize_t = no; then
2518   cat >> confdefs.h <<\EOF
2519 #define ssize_t int
2520 EOF
2521
2522 fi
2523
2524
2525 echo $ac_n "checking for errno in errno.h""... $ac_c" 1>&6
2526 echo "configure:2527: checking for errno in errno.h" >&5
2527 if eval "test \"`echo '$''{'samba_cv_errno'+set}'`\" = set"; then
2528   echo $ac_n "(cached) $ac_c" 1>&6
2529 else
2530   
2531     cat > conftest.$ac_ext <<EOF
2532 #line 2533 "configure"
2533 #include "confdefs.h"
2534 #include <errno.h>
2535 int main() {
2536 int i = errno
2537 ; return 0; }
2538 EOF
2539 if { (eval echo configure:2540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2540   rm -rf conftest*
2541   samba_cv_errno=yes
2542 else
2543   echo "configure: failed program was:" >&5
2544   cat conftest.$ac_ext >&5
2545   rm -rf conftest*
2546   samba_cv_have_errno_decl=no
2547 fi
2548 rm -f conftest*
2549 fi
2550
2551 echo "$ac_t""$samba_cv_errno" 1>&6
2552 if test x"$samba_cv_errno" = x"yes"; then
2553    cat >> confdefs.h <<\EOF
2554 #define HAVE_ERRNO_DECL 1
2555 EOF
2556
2557 fi
2558
2559 # stupid glibc has the functions but no declaration. grrrr.
2560 echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
2561 echo "configure:2562: checking for setresuid declaration" >&5
2562 if eval "test \"`echo '$''{'samba_cv_have_setresuid_decl'+set}'`\" = set"; then
2563   echo $ac_n "(cached) $ac_c" 1>&6
2564 else
2565   
2566     cat > conftest.$ac_ext <<EOF
2567 #line 2568 "configure"
2568 #include "confdefs.h"
2569 #include <unistd.h>
2570 int main() {
2571 int i = setresuid
2572 ; return 0; }
2573 EOF
2574 if { (eval echo configure:2575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2575   rm -rf conftest*
2576   samba_cv_have_setresuid_decl=yes
2577 else
2578   echo "configure: failed program was:" >&5
2579   cat conftest.$ac_ext >&5
2580   rm -rf conftest*
2581   samba_cv_have_setresuid_decl=no
2582 fi
2583 rm -f conftest*
2584 fi
2585
2586 echo "$ac_t""$samba_cv_have_setresuid_decl" 1>&6
2587 if test x"$samba_cv_have_setresuid_decl" = x"yes"; then
2588     cat >> confdefs.h <<\EOF
2589 #define HAVE_SETRESUID_DECL 1
2590 EOF
2591
2592 fi
2593
2594 # and glibc has setresuid under linux but the function does
2595 # nothing until kernel 2.1.44! very dumb.
2596 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
2597 echo "configure:2598: checking for real setresuid" >&5
2598 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
2599   echo $ac_n "(cached) $ac_c" 1>&6
2600 else
2601   
2602     if test "$cross_compiling" = yes; then
2603   samba_cv_have_setresuid=cross
2604 else
2605   cat > conftest.$ac_ext <<EOF
2606 #line 2607 "configure"
2607 #include "confdefs.h"
2608 #include <errno.h>
2609 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
2610 EOF
2611 if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2612 then
2613   samba_cv_have_setresuid=yes
2614 else
2615   echo "configure: failed program was:" >&5
2616   cat conftest.$ac_ext >&5
2617   rm -fr conftest*
2618   samba_cv_have_setresuid=no
2619 fi
2620 rm -fr conftest*
2621 fi
2622
2623 fi
2624
2625 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
2626 if test x"$samba_cv_have_setresuid" = x"yes"; then
2627     cat >> confdefs.h <<\EOF
2628 #define HAVE_SETRESUID 1
2629 EOF
2630
2631 fi
2632
2633 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
2634 echo "configure:2635: checking for 8-bit clean memcmp" >&5
2635 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
2636   echo $ac_n "(cached) $ac_c" 1>&6
2637 else
2638   if test "$cross_compiling" = yes; then
2639   ac_cv_func_memcmp_clean=no
2640 else
2641   cat > conftest.$ac_ext <<EOF
2642 #line 2643 "configure"
2643 #include "confdefs.h"
2644
2645 main()
2646 {
2647   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
2648   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
2649 }
2650
2651 EOF
2652 if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2653 then
2654   ac_cv_func_memcmp_clean=yes
2655 else
2656   echo "configure: failed program was:" >&5
2657   cat conftest.$ac_ext >&5
2658   rm -fr conftest*
2659   ac_cv_func_memcmp_clean=no
2660 fi
2661 rm -fr conftest*
2662 fi
2663
2664 fi
2665
2666 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
2667 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
2668
2669
2670 ###############################################
2671 # test for where we get crypt() from
2672 for ac_func in crypt
2673 do
2674 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2675 echo "configure:2676: checking for $ac_func" >&5
2676 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2677   echo $ac_n "(cached) $ac_c" 1>&6
2678 else
2679   cat > conftest.$ac_ext <<EOF
2680 #line 2681 "configure"
2681 #include "confdefs.h"
2682 /* System header to define __stub macros and hopefully few prototypes,
2683     which can conflict with char $ac_func(); below.  */
2684 #include <assert.h>
2685 /* Override any gcc2 internal prototype to avoid an error.  */
2686 /* We use char because int might match the return type of a gcc2
2687     builtin and then its argument prototype would still apply.  */
2688 char $ac_func();
2689
2690 int main() {
2691
2692 /* The GNU C library defines this for functions which it implements
2693     to always fail with ENOSYS.  Some functions are actually named
2694     something starting with __ and the normal name is an alias.  */
2695 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2696 choke me
2697 #else
2698 $ac_func();
2699 #endif
2700
2701 ; return 0; }
2702 EOF
2703 if { (eval echo configure:2704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2704   rm -rf conftest*
2705   eval "ac_cv_func_$ac_func=yes"
2706 else
2707   echo "configure: failed program was:" >&5
2708   cat conftest.$ac_ext >&5
2709   rm -rf conftest*
2710   eval "ac_cv_func_$ac_func=no"
2711 fi
2712 rm -f conftest*
2713 fi
2714
2715 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2716   echo "$ac_t""yes" 1>&6
2717     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2718   cat >> confdefs.h <<EOF
2719 #define $ac_tr_func 1
2720 EOF
2721  
2722 else
2723   echo "$ac_t""no" 1>&6
2724 fi
2725 done
2726
2727 if test x"$ac_cv_func_crypt" = x"no"; then
2728     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
2729 echo "configure:2730: checking for crypt in -lcrypt" >&5
2730 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
2731 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2732   echo $ac_n "(cached) $ac_c" 1>&6
2733 else
2734   ac_save_LIBS="$LIBS"
2735 LIBS="-lcrypt  $LIBS"
2736 cat > conftest.$ac_ext <<EOF
2737 #line 2738 "configure"
2738 #include "confdefs.h"
2739 /* Override any gcc2 internal prototype to avoid an error.  */
2740 /* We use char because int might match the return type of a gcc2
2741     builtin and then its argument prototype would still apply.  */
2742 char crypt();
2743
2744 int main() {
2745 crypt()
2746 ; return 0; }
2747 EOF
2748 if { (eval echo configure:2749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2749   rm -rf conftest*
2750   eval "ac_cv_lib_$ac_lib_var=yes"
2751 else
2752   echo "configure: failed program was:" >&5
2753   cat conftest.$ac_ext >&5
2754   rm -rf conftest*
2755   eval "ac_cv_lib_$ac_lib_var=no"
2756 fi
2757 rm -f conftest*
2758 LIBS="$ac_save_LIBS"
2759
2760 fi
2761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2762   echo "$ac_t""yes" 1>&6
2763   LIBS="$LIBS -lcrypt";
2764         cat >> confdefs.h <<\EOF
2765 #define HAVE_CRYPT 1
2766 EOF
2767
2768 else
2769   echo "$ac_t""no" 1>&6
2770 fi
2771
2772 fi
2773
2774
2775 ###############################################
2776 # test for where we get pam_authenticate() from
2777 # might need libdl for this to work
2778 if test "$ac_cv_header_security_pam_appl_h" = "yes"; then
2779   echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
2780 echo "configure:2781: checking for main in -ldl" >&5
2781 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
2782 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2783   echo $ac_n "(cached) $ac_c" 1>&6
2784 else
2785   ac_save_LIBS="$LIBS"
2786 LIBS="-ldl  $LIBS"
2787 cat > conftest.$ac_ext <<EOF
2788 #line 2789 "configure"
2789 #include "confdefs.h"
2790
2791 int main() {
2792 main()
2793 ; return 0; }
2794 EOF
2795 if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2796   rm -rf conftest*
2797   eval "ac_cv_lib_$ac_lib_var=yes"
2798 else
2799   echo "configure: failed program was:" >&5
2800   cat conftest.$ac_ext >&5
2801   rm -rf conftest*
2802   eval "ac_cv_lib_$ac_lib_var=no"
2803 fi
2804 rm -f conftest*
2805 LIBS="$ac_save_LIBS"
2806
2807 fi
2808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2809   echo "$ac_t""yes" 1>&6
2810     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2811     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2812   cat >> confdefs.h <<EOF
2813 #define $ac_tr_lib 1
2814 EOF
2815
2816   LIBS="-ldl $LIBS"
2817
2818 else
2819   echo "$ac_t""no" 1>&6
2820 fi
2821
2822 fi
2823 for ac_func in pam_authenticate
2824 do
2825 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2826 echo "configure:2827: checking for $ac_func" >&5
2827 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2828   echo $ac_n "(cached) $ac_c" 1>&6
2829 else
2830   cat > conftest.$ac_ext <<EOF
2831 #line 2832 "configure"
2832 #include "confdefs.h"
2833 /* System header to define __stub macros and hopefully few prototypes,
2834     which can conflict with char $ac_func(); below.  */
2835 #include <assert.h>
2836 /* Override any gcc2 internal prototype to avoid an error.  */
2837 /* We use char because int might match the return type of a gcc2
2838     builtin and then its argument prototype would still apply.  */
2839 char $ac_func();
2840
2841 int main() {
2842
2843 /* The GNU C library defines this for functions which it implements
2844     to always fail with ENOSYS.  Some functions are actually named
2845     something starting with __ and the normal name is an alias.  */
2846 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2847 choke me
2848 #else
2849 $ac_func();
2850 #endif
2851
2852 ; return 0; }
2853 EOF
2854 if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2855   rm -rf conftest*
2856   eval "ac_cv_func_$ac_func=yes"
2857 else
2858   echo "configure: failed program was:" >&5
2859   cat conftest.$ac_ext >&5
2860   rm -rf conftest*
2861   eval "ac_cv_func_$ac_func=no"
2862 fi
2863 rm -f conftest*
2864 fi
2865
2866 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2867   echo "$ac_t""yes" 1>&6
2868     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2869   cat >> confdefs.h <<EOF
2870 #define $ac_tr_func 1
2871 EOF
2872  
2873 else
2874   echo "$ac_t""no" 1>&6
2875 fi
2876 done
2877
2878 if test x"$ac_cv_func_pam_authenticate" = x"no"; then
2879     echo $ac_n "checking for pam_authenticate in -lpam""... $ac_c" 1>&6
2880 echo "configure:2881: checking for pam_authenticate in -lpam" >&5
2881 ac_lib_var=`echo pam'_'pam_authenticate | sed 'y%./+-%__p_%'`
2882 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2883   echo $ac_n "(cached) $ac_c" 1>&6
2884 else
2885   ac_save_LIBS="$LIBS"
2886 LIBS="-lpam  $LIBS"
2887 cat > conftest.$ac_ext <<EOF
2888 #line 2889 "configure"
2889 #include "confdefs.h"
2890 /* Override any gcc2 internal prototype to avoid an error.  */
2891 /* We use char because int might match the return type of a gcc2
2892     builtin and then its argument prototype would still apply.  */
2893 char pam_authenticate();
2894
2895 int main() {
2896 pam_authenticate()
2897 ; return 0; }
2898 EOF
2899 if { (eval echo configure:2900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2900   rm -rf conftest*
2901   eval "ac_cv_lib_$ac_lib_var=yes"
2902 else
2903   echo "configure: failed program was:" >&5
2904   cat conftest.$ac_ext >&5
2905   rm -rf conftest*
2906   eval "ac_cv_lib_$ac_lib_var=no"
2907 fi
2908 rm -f conftest*
2909 LIBS="$ac_save_LIBS"
2910
2911 fi
2912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2913   echo "$ac_t""yes" 1>&6
2914   LIBS="$LIBS -lpam"
2915         cat >> confdefs.h <<\EOF
2916 #define HAVE_PAM_AUTHENTICATE 1
2917 EOF
2918
2919 else
2920   echo "$ac_t""no" 1>&6
2921 fi
2922
2923 fi
2924
2925
2926 ###############################################
2927 # test for where we get readline() from
2928 if test "$ac_cv_header_readline_h" = "yes" ||
2929    test "$ac_cv_header_readline_readline_h" = "yes"; then
2930   echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
2931 echo "configure:2932: checking for readline in -lreadline" >&5
2932 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
2933 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2934   echo $ac_n "(cached) $ac_c" 1>&6
2935 else
2936   ac_save_LIBS="$LIBS"
2937 LIBS="-lreadline  $LIBS"
2938 cat > conftest.$ac_ext <<EOF
2939 #line 2940 "configure"
2940 #include "confdefs.h"
2941 /* Override any gcc2 internal prototype to avoid an error.  */
2942 /* We use char because int might match the return type of a gcc2
2943     builtin and then its argument prototype would still apply.  */
2944 char readline();
2945
2946 int main() {
2947 readline()
2948 ; return 0; }
2949 EOF
2950 if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2951   rm -rf conftest*
2952   eval "ac_cv_lib_$ac_lib_var=yes"
2953 else
2954   echo "configure: failed program was:" >&5
2955   cat conftest.$ac_ext >&5
2956   rm -rf conftest*
2957   eval "ac_cv_lib_$ac_lib_var=no"
2958 fi
2959 rm -f conftest*
2960 LIBS="$ac_save_LIBS"
2961
2962 fi
2963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2964   echo "$ac_t""yes" 1>&6
2965     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2966     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2967   cat >> confdefs.h <<EOF
2968 #define $ac_tr_lib 1
2969 EOF
2970
2971   LIBS="-lreadline $LIBS"
2972
2973 else
2974   echo "$ac_t""no" 1>&6
2975 fi
2976
2977 fi
2978
2979
2980 # The following test taken from the cvs sources
2981 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
2982 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
2983 # libsocket.so which has a bad implementation of gethostbyname (it
2984 # only looks in /etc/hosts), so we only look for -lsocket if we need
2985 # it.
2986 for ac_func in connect
2987 do
2988 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2989 echo "configure:2990: checking for $ac_func" >&5
2990 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2991   echo $ac_n "(cached) $ac_c" 1>&6
2992 else
2993   cat > conftest.$ac_ext <<EOF
2994 #line 2995 "configure"
2995 #include "confdefs.h"
2996 /* System header to define __stub macros and hopefully few prototypes,
2997     which can conflict with char $ac_func(); below.  */
2998 #include <assert.h>
2999 /* Override any gcc2 internal prototype to avoid an error.  */
3000 /* We use char because int might match the return type of a gcc2
3001     builtin and then its argument prototype would still apply.  */
3002 char $ac_func();
3003
3004 int main() {
3005
3006 /* The GNU C library defines this for functions which it implements
3007     to always fail with ENOSYS.  Some functions are actually named
3008     something starting with __ and the normal name is an alias.  */
3009 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3010 choke me
3011 #else
3012 $ac_func();
3013 #endif
3014
3015 ; return 0; }
3016 EOF
3017 if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3018   rm -rf conftest*
3019   eval "ac_cv_func_$ac_func=yes"
3020 else
3021   echo "configure: failed program was:" >&5
3022   cat conftest.$ac_ext >&5
3023   rm -rf conftest*
3024   eval "ac_cv_func_$ac_func=no"
3025 fi
3026 rm -f conftest*
3027 fi
3028
3029 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3030   echo "$ac_t""yes" 1>&6
3031     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3032   cat >> confdefs.h <<EOF
3033 #define $ac_tr_func 1
3034 EOF
3035  
3036 else
3037   echo "$ac_t""no" 1>&6
3038 fi
3039 done
3040
3041 if test x"$ac_cv_func_connect" = x"no"; then
3042     case "$LIBS" in
3043     *-lnsl*) ;;
3044     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
3045 echo "configure:3046: checking for printf in -lnsl_s" >&5
3046 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
3047 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3048   echo $ac_n "(cached) $ac_c" 1>&6
3049 else
3050   ac_save_LIBS="$LIBS"
3051 LIBS="-lnsl_s  $LIBS"
3052 cat > conftest.$ac_ext <<EOF
3053 #line 3054 "configure"
3054 #include "confdefs.h"
3055 /* Override any gcc2 internal prototype to avoid an error.  */
3056 /* We use char because int might match the return type of a gcc2
3057     builtin and then its argument prototype would still apply.  */
3058 char printf();
3059
3060 int main() {
3061 printf()
3062 ; return 0; }
3063 EOF
3064 if { (eval echo configure:3065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3065   rm -rf conftest*
3066   eval "ac_cv_lib_$ac_lib_var=yes"
3067 else
3068   echo "configure: failed program was:" >&5
3069   cat conftest.$ac_ext >&5
3070   rm -rf conftest*
3071   eval "ac_cv_lib_$ac_lib_var=no"
3072 fi
3073 rm -f conftest*
3074 LIBS="$ac_save_LIBS"
3075
3076 fi
3077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3078   echo "$ac_t""yes" 1>&6
3079     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3080     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3081   cat >> confdefs.h <<EOF
3082 #define $ac_tr_lib 1
3083 EOF
3084
3085   LIBS="-lnsl_s $LIBS"
3086
3087 else
3088   echo "$ac_t""no" 1>&6
3089 fi
3090  ;;
3091     esac
3092     case "$LIBS" in
3093     *-lnsl*) ;;
3094     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
3095 echo "configure:3096: checking for printf in -lnsl" >&5
3096 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
3097 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3098   echo $ac_n "(cached) $ac_c" 1>&6
3099 else
3100   ac_save_LIBS="$LIBS"
3101 LIBS="-lnsl  $LIBS"
3102 cat > conftest.$ac_ext <<EOF
3103 #line 3104 "configure"
3104 #include "confdefs.h"
3105 /* Override any gcc2 internal prototype to avoid an error.  */
3106 /* We use char because int might match the return type of a gcc2
3107     builtin and then its argument prototype would still apply.  */
3108 char printf();
3109
3110 int main() {
3111 printf()
3112 ; return 0; }
3113 EOF
3114 if { (eval echo configure:3115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3115   rm -rf conftest*
3116   eval "ac_cv_lib_$ac_lib_var=yes"
3117 else
3118   echo "configure: failed program was:" >&5
3119   cat conftest.$ac_ext >&5
3120   rm -rf conftest*
3121   eval "ac_cv_lib_$ac_lib_var=no"
3122 fi
3123 rm -f conftest*
3124 LIBS="$ac_save_LIBS"
3125
3126 fi
3127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3128   echo "$ac_t""yes" 1>&6
3129     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3130     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3131   cat >> confdefs.h <<EOF
3132 #define $ac_tr_lib 1
3133 EOF
3134
3135   LIBS="-lnsl $LIBS"
3136
3137 else
3138   echo "$ac_t""no" 1>&6
3139 fi
3140  ;;
3141     esac
3142     case "$LIBS" in
3143     *-lsocket*) ;;
3144     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3145 echo "configure:3146: checking for connect in -lsocket" >&5
3146 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3147 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3148   echo $ac_n "(cached) $ac_c" 1>&6
3149 else
3150   ac_save_LIBS="$LIBS"
3151 LIBS="-lsocket  $LIBS"
3152 cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155 /* Override any gcc2 internal prototype to avoid an error.  */
3156 /* We use char because int might match the return type of a gcc2
3157     builtin and then its argument prototype would still apply.  */
3158 char connect();
3159
3160 int main() {
3161 connect()
3162 ; return 0; }
3163 EOF
3164 if { (eval echo configure:3165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3165   rm -rf conftest*
3166   eval "ac_cv_lib_$ac_lib_var=yes"
3167 else
3168   echo "configure: failed program was:" >&5
3169   cat conftest.$ac_ext >&5
3170   rm -rf conftest*
3171   eval "ac_cv_lib_$ac_lib_var=no"
3172 fi
3173 rm -f conftest*
3174 LIBS="$ac_save_LIBS"
3175
3176 fi
3177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3178   echo "$ac_t""yes" 1>&6
3179     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3180     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3181   cat >> confdefs.h <<EOF
3182 #define $ac_tr_lib 1
3183 EOF
3184
3185   LIBS="-lsocket $LIBS"
3186
3187 else
3188   echo "$ac_t""no" 1>&6
3189 fi
3190  ;;
3191     esac
3192     case "$LIBS" in
3193     *-linet*) ;;
3194     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
3195 echo "configure:3196: checking for connect in -linet" >&5
3196 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
3197 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3198   echo $ac_n "(cached) $ac_c" 1>&6
3199 else
3200   ac_save_LIBS="$LIBS"
3201 LIBS="-linet  $LIBS"
3202 cat > conftest.$ac_ext <<EOF
3203 #line 3204 "configure"
3204 #include "confdefs.h"
3205 /* Override any gcc2 internal prototype to avoid an error.  */
3206 /* We use char because int might match the return type of a gcc2
3207     builtin and then its argument prototype would still apply.  */
3208 char connect();
3209
3210 int main() {
3211 connect()
3212 ; return 0; }
3213 EOF
3214 if { (eval echo configure:3215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3215   rm -rf conftest*
3216   eval "ac_cv_lib_$ac_lib_var=yes"
3217 else
3218   echo "configure: failed program was:" >&5
3219   cat conftest.$ac_ext >&5
3220   rm -rf conftest*
3221   eval "ac_cv_lib_$ac_lib_var=no"
3222 fi
3223 rm -f conftest*
3224 LIBS="$ac_save_LIBS"
3225
3226 fi
3227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3228   echo "$ac_t""yes" 1>&6
3229     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3230     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3231   cat >> confdefs.h <<EOF
3232 #define $ac_tr_lib 1
3233 EOF
3234
3235   LIBS="-linet $LIBS"
3236
3237 else
3238   echo "$ac_t""no" 1>&6
3239 fi
3240  ;;
3241     esac
3242             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
3243        test x"$ac_cv_lib_inet_connect" = x"yes"; then
3244         # ac_cv_func_connect=yes
3245         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
3246         cat >> confdefs.h <<\EOF
3247 #define HAVE_CONNECT 1
3248 EOF
3249
3250     fi
3251 fi
3252
3253
3254 for ac_func in waitpid getcwd strdup strerror chown chmod chroot
3255 do
3256 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3257 echo "configure:3258: checking for $ac_func" >&5
3258 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3259   echo $ac_n "(cached) $ac_c" 1>&6
3260 else
3261   cat > conftest.$ac_ext <<EOF
3262 #line 3263 "configure"
3263 #include "confdefs.h"
3264 /* System header to define __stub macros and hopefully few prototypes,
3265     which can conflict with char $ac_func(); below.  */
3266 #include <assert.h>
3267 /* Override any gcc2 internal prototype to avoid an error.  */
3268 /* We use char because int might match the return type of a gcc2
3269     builtin and then its argument prototype would still apply.  */
3270 char $ac_func();
3271
3272 int main() {
3273
3274 /* The GNU C library defines this for functions which it implements
3275     to always fail with ENOSYS.  Some functions are actually named
3276     something starting with __ and the normal name is an alias.  */
3277 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3278 choke me
3279 #else
3280 $ac_func();
3281 #endif
3282
3283 ; return 0; }
3284 EOF
3285 if { (eval echo configure:3286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3286   rm -rf conftest*
3287   eval "ac_cv_func_$ac_func=yes"
3288 else
3289   echo "configure: failed program was:" >&5
3290   cat conftest.$ac_ext >&5
3291   rm -rf conftest*
3292   eval "ac_cv_func_$ac_func=no"
3293 fi
3294 rm -f conftest*
3295 fi
3296
3297 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3298   echo "$ac_t""yes" 1>&6
3299     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3300   cat >> confdefs.h <<EOF
3301 #define $ac_tr_func 1
3302 EOF
3303  
3304 else
3305   echo "$ac_t""no" 1>&6
3306 fi
3307 done
3308
3309 for ac_func in fstat strchr utime utimes getrlimit fsync execl bzero memset
3310 do
3311 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3312 echo "configure:3313: checking for $ac_func" >&5
3313 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3314   echo $ac_n "(cached) $ac_c" 1>&6
3315 else
3316   cat > conftest.$ac_ext <<EOF
3317 #line 3318 "configure"
3318 #include "confdefs.h"
3319 /* System header to define __stub macros and hopefully few prototypes,
3320     which can conflict with char $ac_func(); below.  */
3321 #include <assert.h>
3322 /* Override any gcc2 internal prototype to avoid an error.  */
3323 /* We use char because int might match the return type of a gcc2
3324     builtin and then its argument prototype would still apply.  */
3325 char $ac_func();
3326
3327 int main() {
3328
3329 /* The GNU C library defines this for functions which it implements
3330     to always fail with ENOSYS.  Some functions are actually named
3331     something starting with __ and the normal name is an alias.  */
3332 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3333 choke me
3334 #else
3335 $ac_func();
3336 #endif
3337
3338 ; return 0; }
3339 EOF
3340 if { (eval echo configure:3341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3341   rm -rf conftest*
3342   eval "ac_cv_func_$ac_func=yes"
3343 else
3344   echo "configure: failed program was:" >&5
3345   cat conftest.$ac_ext >&5
3346   rm -rf conftest*
3347   eval "ac_cv_func_$ac_func=no"
3348 fi
3349 rm -f conftest*
3350 fi
3351
3352 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3353   echo "$ac_t""yes" 1>&6
3354     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3355   cat >> confdefs.h <<EOF
3356 #define $ac_tr_func 1
3357 EOF
3358  
3359 else
3360   echo "$ac_t""no" 1>&6
3361 fi
3362 done
3363
3364 for ac_func in memmove vsnprintf setsid glob strpbrk pipe crypt16 getauthuid
3365 do
3366 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3367 echo "configure:3368: checking for $ac_func" >&5
3368 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3369   echo $ac_n "(cached) $ac_c" 1>&6
3370 else
3371   cat > conftest.$ac_ext <<EOF
3372 #line 3373 "configure"
3373 #include "confdefs.h"
3374 /* System header to define __stub macros and hopefully few prototypes,
3375     which can conflict with char $ac_func(); below.  */
3376 #include <assert.h>
3377 /* Override any gcc2 internal prototype to avoid an error.  */
3378 /* We use char because int might match the return type of a gcc2
3379     builtin and then its argument prototype would still apply.  */
3380 char $ac_func();
3381
3382 int main() {
3383
3384 /* The GNU C library defines this for functions which it implements
3385     to always fail with ENOSYS.  Some functions are actually named
3386     something starting with __ and the normal name is an alias.  */
3387 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3388 choke me
3389 #else
3390 $ac_func();
3391 #endif
3392
3393 ; return 0; }
3394 EOF
3395 if { (eval echo configure:3396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3396   rm -rf conftest*
3397   eval "ac_cv_func_$ac_func=yes"
3398 else
3399   echo "configure: failed program was:" >&5
3400   cat conftest.$ac_ext >&5
3401   rm -rf conftest*
3402   eval "ac_cv_func_$ac_func=no"
3403 fi
3404 rm -f conftest*
3405 fi
3406
3407 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3408   echo "$ac_t""yes" 1>&6
3409     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3410   cat >> confdefs.h <<EOF
3411 #define $ac_tr_func 1
3412 EOF
3413  
3414 else
3415   echo "$ac_t""no" 1>&6
3416 fi
3417 done
3418
3419 for ac_func in strftime sigprocmask sigblock sigaction innetgr
3420 do
3421 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3422 echo "configure:3423: checking for $ac_func" >&5
3423 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3424   echo $ac_n "(cached) $ac_c" 1>&6
3425 else
3426   cat > conftest.$ac_ext <<EOF
3427 #line 3428 "configure"
3428 #include "confdefs.h"
3429 /* System header to define __stub macros and hopefully few prototypes,
3430     which can conflict with char $ac_func(); below.  */
3431 #include <assert.h>
3432 /* Override any gcc2 internal prototype to avoid an error.  */
3433 /* We use char because int might match the return type of a gcc2
3434     builtin and then its argument prototype would still apply.  */
3435 char $ac_func();
3436
3437 int main() {
3438
3439 /* The GNU C library defines this for functions which it implements
3440     to always fail with ENOSYS.  Some functions are actually named
3441     something starting with __ and the normal name is an alias.  */
3442 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3443 choke me
3444 #else
3445 $ac_func();
3446 #endif
3447
3448 ; return 0; }
3449 EOF
3450 if { (eval echo configure:3451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3451   rm -rf conftest*
3452   eval "ac_cv_func_$ac_func=yes"
3453 else
3454   echo "configure: failed program was:" >&5
3455   cat conftest.$ac_ext >&5
3456   rm -rf conftest*
3457   eval "ac_cv_func_$ac_func=no"
3458 fi
3459 rm -f conftest*
3460 fi
3461
3462 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3463   echo "$ac_t""yes" 1>&6
3464     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3465   cat >> confdefs.h <<EOF
3466 #define $ac_tr_func 1
3467 EOF
3468  
3469 else
3470   echo "$ac_t""no" 1>&6
3471 fi
3472 done
3473
3474 for ac_func in initgroups select rdchk getgrnam pathconf putprpwnam
3475 do
3476 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3477 echo "configure:3478: checking for $ac_func" >&5
3478 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3479   echo $ac_n "(cached) $ac_c" 1>&6
3480 else
3481   cat > conftest.$ac_ext <<EOF
3482 #line 3483 "configure"
3483 #include "confdefs.h"
3484 /* System header to define __stub macros and hopefully few prototypes,
3485     which can conflict with char $ac_func(); below.  */
3486 #include <assert.h>
3487 /* Override any gcc2 internal prototype to avoid an error.  */
3488 /* We use char because int might match the return type of a gcc2
3489     builtin and then its argument prototype would still apply.  */
3490 char $ac_func();
3491
3492 int main() {
3493
3494 /* The GNU C library defines this for functions which it implements
3495     to always fail with ENOSYS.  Some functions are actually named
3496     something starting with __ and the normal name is an alias.  */
3497 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3498 choke me
3499 #else
3500 $ac_func();
3501 #endif
3502
3503 ; return 0; }
3504 EOF
3505 if { (eval echo configure:3506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3506   rm -rf conftest*
3507   eval "ac_cv_func_$ac_func=yes"
3508 else
3509   echo "configure: failed program was:" >&5
3510   cat conftest.$ac_ext >&5
3511   rm -rf conftest*
3512   eval "ac_cv_func_$ac_func=no"
3513 fi
3514 rm -f conftest*
3515 fi
3516
3517 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3518   echo "$ac_t""yes" 1>&6
3519     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3520   cat >> confdefs.h <<EOF
3521 #define $ac_tr_func 1
3522 EOF
3523  
3524 else
3525   echo "$ac_t""no" 1>&6
3526 fi
3527 done
3528
3529 for ac_func in setuidx setgroups mktime rename ftruncate stat64 fstat64 lstat64
3530 do
3531 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3532 echo "configure:3533: checking for $ac_func" >&5
3533 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3534   echo $ac_n "(cached) $ac_c" 1>&6
3535 else
3536   cat > conftest.$ac_ext <<EOF
3537 #line 3538 "configure"
3538 #include "confdefs.h"
3539 /* System header to define __stub macros and hopefully few prototypes,
3540     which can conflict with char $ac_func(); below.  */
3541 #include <assert.h>
3542 /* Override any gcc2 internal prototype to avoid an error.  */
3543 /* We use char because int might match the return type of a gcc2
3544     builtin and then its argument prototype would still apply.  */
3545 char $ac_func();
3546
3547 int main() {
3548
3549 /* The GNU C library defines this for functions which it implements
3550     to always fail with ENOSYS.  Some functions are actually named
3551     something starting with __ and the normal name is an alias.  */
3552 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3553 choke me
3554 #else
3555 $ac_func();
3556 #endif
3557
3558 ; return 0; }
3559 EOF
3560 if { (eval echo configure:3561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3561   rm -rf conftest*
3562   eval "ac_cv_func_$ac_func=yes"
3563 else
3564   echo "configure: failed program was:" >&5
3565   cat conftest.$ac_ext >&5
3566   rm -rf conftest*
3567   eval "ac_cv_func_$ac_func=no"
3568 fi
3569 rm -f conftest*
3570 fi
3571
3572 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3573   echo "$ac_t""yes" 1>&6
3574     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3575   cat >> confdefs.h <<EOF
3576 #define $ac_tr_func 1
3577 EOF
3578  
3579 else
3580   echo "$ac_t""no" 1>&6
3581 fi
3582 done
3583
3584 for ac_func in set_auth_parameters atexit grantpt getspnam dup2 lseek64 ftruncate64
3585 do
3586 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3587 echo "configure:3588: checking for $ac_func" >&5
3588 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3589   echo $ac_n "(cached) $ac_c" 1>&6
3590 else
3591   cat > conftest.$ac_ext <<EOF
3592 #line 3593 "configure"
3593 #include "confdefs.h"
3594 /* System header to define __stub macros and hopefully few prototypes,
3595     which can conflict with char $ac_func(); below.  */
3596 #include <assert.h>
3597 /* Override any gcc2 internal prototype to avoid an error.  */
3598 /* We use char because int might match the return type of a gcc2
3599     builtin and then its argument prototype would still apply.  */
3600 char $ac_func();
3601
3602 int main() {
3603
3604 /* The GNU C library defines this for functions which it implements
3605     to always fail with ENOSYS.  Some functions are actually named
3606     something starting with __ and the normal name is an alias.  */
3607 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3608 choke me
3609 #else
3610 $ac_func();
3611 #endif
3612
3613 ; return 0; }
3614 EOF
3615 if { (eval echo configure:3616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3616   rm -rf conftest*
3617   eval "ac_cv_func_$ac_func=yes"
3618 else
3619   echo "configure: failed program was:" >&5
3620   cat conftest.$ac_ext >&5
3621   rm -rf conftest*
3622   eval "ac_cv_func_$ac_func=no"
3623 fi
3624 rm -f conftest*
3625 fi
3626
3627 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3628   echo "$ac_t""yes" 1>&6
3629     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3630   cat >> confdefs.h <<EOF
3631 #define $ac_tr_func 1
3632 EOF
3633  
3634 else
3635   echo "$ac_t""no" 1>&6
3636 fi
3637 done
3638
3639 for ac_func in fseek64 ftell64 bigcrypt getprpwnam setluid yp_get_default_domain getpwanam
3640 do
3641 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3642 echo "configure:3643: checking for $ac_func" >&5
3643 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3644   echo $ac_n "(cached) $ac_c" 1>&6
3645 else
3646   cat > conftest.$ac_ext <<EOF
3647 #line 3648 "configure"
3648 #include "confdefs.h"
3649 /* System header to define __stub macros and hopefully few prototypes,
3650     which can conflict with char $ac_func(); below.  */
3651 #include <assert.h>
3652 /* Override any gcc2 internal prototype to avoid an error.  */
3653 /* We use char because int might match the return type of a gcc2
3654     builtin and then its argument prototype would still apply.  */
3655 char $ac_func();
3656
3657 int main() {
3658
3659 /* The GNU C library defines this for functions which it implements
3660     to always fail with ENOSYS.  Some functions are actually named
3661     something starting with __ and the normal name is an alias.  */
3662 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3663 choke me
3664 #else
3665 $ac_func();
3666 #endif
3667
3668 ; return 0; }
3669 EOF
3670 if { (eval echo configure:3671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3671   rm -rf conftest*
3672   eval "ac_cv_func_$ac_func=yes"
3673 else
3674   echo "configure: failed program was:" >&5
3675   cat conftest.$ac_ext >&5
3676   rm -rf conftest*
3677   eval "ac_cv_func_$ac_func=no"
3678 fi
3679 rm -f conftest*
3680 fi
3681
3682 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3683   echo "$ac_t""yes" 1>&6
3684     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3685   cat >> confdefs.h <<EOF
3686 #define $ac_tr_func 1
3687 EOF
3688  
3689 else
3690   echo "$ac_t""no" 1>&6
3691 fi
3692 done
3693
3694
3695 echo $ac_n "checking for long long""... $ac_c" 1>&6
3696 echo "configure:3697: checking for long long" >&5
3697 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
3698   echo $ac_n "(cached) $ac_c" 1>&6
3699 else
3700   
3701 if test "$cross_compiling" = yes; then
3702   samba_cv_have_longlong=cross
3703 else
3704   cat > conftest.$ac_ext <<EOF
3705 #line 3706 "configure"
3706 #include "confdefs.h"
3707 #include <stdio.h>
3708 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
3709 EOF
3710 if { (eval echo configure:3711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3711 then
3712   samba_cv_have_longlong=yes
3713 else
3714   echo "configure: failed program was:" >&5
3715   cat conftest.$ac_ext >&5
3716   rm -fr conftest*
3717   samba_cv_have_longlong=no
3718 fi
3719 rm -fr conftest*
3720 fi
3721
3722 fi
3723
3724 echo "$ac_t""$samba_cv_have_longlong" 1>&6
3725 if test x"$samba_cv_have_longlong" = x"yes"; then
3726     cat >> confdefs.h <<\EOF
3727 #define HAVE_LONGLONG 1
3728 EOF
3729
3730 fi
3731
3732 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
3733 echo "configure:3734: checking for 64 bit off_t" >&5
3734 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
3735   echo $ac_n "(cached) $ac_c" 1>&6
3736 else
3737   
3738 if test "$cross_compiling" = yes; then
3739   samba_cv_SIZEOF_OFF_T=cross
3740 else
3741   cat > conftest.$ac_ext <<EOF
3742 #line 3743 "configure"
3743 #include "confdefs.h"
3744 #include <stdio.h>
3745 #include <sys/stat.h>
3746 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
3747 EOF
3748 if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3749 then
3750   samba_cv_SIZEOF_OFF_T=yes
3751 else
3752   echo "configure: failed program was:" >&5
3753   cat conftest.$ac_ext >&5
3754   rm -fr conftest*
3755   samba_cv_SIZEOF_OFF_T=no
3756 fi
3757 rm -fr conftest*
3758 fi
3759
3760 fi
3761
3762 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
3763 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
3764     cat >> confdefs.h <<\EOF
3765 #define SIZEOF_OFF_T 8
3766 EOF
3767
3768 fi
3769
3770 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
3771 echo "configure:3772: checking for off64_t" >&5
3772 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
3773   echo $ac_n "(cached) $ac_c" 1>&6
3774 else
3775   
3776 if test "$cross_compiling" = yes; then
3777   samba_cv_HAVE_OFF64_T=cross
3778 else
3779   cat > conftest.$ac_ext <<EOF
3780 #line 3781 "configure"
3781 #include "confdefs.h"
3782 #include <stdio.h>
3783 #include <sys/stat.h>
3784 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
3785 EOF
3786 if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3787 then
3788   samba_cv_HAVE_OFF64_T=yes
3789 else
3790   echo "configure: failed program was:" >&5
3791   cat conftest.$ac_ext >&5
3792   rm -fr conftest*
3793   samba_cv_HAVE_OFF64_T=no
3794 fi
3795 rm -fr conftest*
3796 fi
3797
3798 fi
3799
3800 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
3801 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
3802     cat >> confdefs.h <<\EOF
3803 #define HAVE_OFF64_T 1
3804 EOF
3805
3806 fi
3807
3808 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
3809 echo "configure:3810: checking for 64 bit ino_t" >&5
3810 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
3811   echo $ac_n "(cached) $ac_c" 1>&6
3812 else
3813   
3814 if test "$cross_compiling" = yes; then
3815   samba_cv_SIZEOF_INO_T=cross
3816 else
3817   cat > conftest.$ac_ext <<EOF
3818 #line 3819 "configure"
3819 #include "confdefs.h"
3820 #include <stdio.h>
3821 #include <sys/stat.h>
3822 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
3823 EOF
3824 if { (eval echo configure:3825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3825 then
3826   samba_cv_SIZEOF_INO_T=yes
3827 else
3828   echo "configure: failed program was:" >&5
3829   cat conftest.$ac_ext >&5
3830   rm -fr conftest*
3831   samba_cv_SIZEOF_INO_T=no
3832 fi
3833 rm -fr conftest*
3834 fi
3835
3836 fi
3837
3838 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
3839 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
3840     cat >> confdefs.h <<\EOF
3841 #define SIZEOF_INO_T 8
3842 EOF
3843
3844 fi
3845
3846 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
3847 echo "configure:3848: checking for ino64_t" >&5
3848 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
3849   echo $ac_n "(cached) $ac_c" 1>&6
3850 else
3851   
3852 if test "$cross_compiling" = yes; then
3853   samba_cv_HAVE_INO64_T=cross
3854 else
3855   cat > conftest.$ac_ext <<EOF
3856 #line 3857 "configure"
3857 #include "confdefs.h"
3858 #include <stdio.h>
3859 #include <sys/stat.h>
3860 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
3861 EOF
3862 if { (eval echo configure:3863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3863 then
3864   samba_cv_HAVE_INO64_T=yes
3865 else
3866   echo "configure: failed program was:" >&5
3867   cat conftest.$ac_ext >&5
3868   rm -fr conftest*
3869   samba_cv_HAVE_INO64_T=no
3870 fi
3871 rm -fr conftest*
3872 fi
3873
3874 fi
3875
3876 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
3877 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
3878     cat >> confdefs.h <<\EOF
3879 #define HAVE_INO64_T 1
3880 EOF
3881
3882 fi
3883
3884 echo $ac_n "checking for union semun""... $ac_c" 1>&6
3885 echo "configure:3886: checking for union semun" >&5
3886 if eval "test \"`echo '$''{'samba_cv_HAVE_UNION_SEMUN'+set}'`\" = set"; then
3887   echo $ac_n "(cached) $ac_c" 1>&6
3888 else
3889   
3890 if test "$cross_compiling" = yes; then
3891   samba_cv_HAVE_UNION_SEMUN=cross
3892 else
3893   cat > conftest.$ac_ext <<EOF
3894 #line 3895 "configure"
3895 #include "confdefs.h"
3896
3897 #include <sys/types.h>
3898 #include <sys/ipc.h>
3899 #include <sys/sem.h>
3900 main() { union semun ss; exit(0); }
3901 EOF
3902 if { (eval echo configure:3903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3903 then
3904   samba_cv_HAVE_UNION_SEMUN=yes
3905 else
3906   echo "configure: failed program was:" >&5
3907   cat conftest.$ac_ext >&5
3908   rm -fr conftest*
3909   samba_cv_HAVE_UNION_SEMUN=no
3910 fi
3911 rm -fr conftest*
3912 fi
3913
3914 fi
3915
3916 echo "$ac_t""$samba_cv_HAVE_UNION_SEMUN" 1>&6
3917 if test x"$samba_cv_HAVE_UNION_SEMUN" = x"yes"; then
3918     cat >> confdefs.h <<\EOF
3919 #define HAVE_UNION_SEMUN 1
3920 EOF
3921
3922 fi
3923
3924 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
3925 echo "configure:3926: checking for unsigned char" >&5
3926 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
3927   echo $ac_n "(cached) $ac_c" 1>&6
3928 else
3929   
3930 if test "$cross_compiling" = yes; then
3931   samba_cv_HAVE_UNSIGNED_CHAR=cross
3932 else
3933   cat > conftest.$ac_ext <<EOF
3934 #line 3935 "configure"
3935 #include "confdefs.h"
3936 #include <stdio.h>
3937 main() { char c; c=250; exit((c > 0)?0:1); }
3938 EOF
3939 if { (eval echo configure:3940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3940 then
3941   samba_cv_HAVE_UNSIGNED_CHAR=yes
3942 else
3943   echo "configure: failed program was:" >&5
3944   cat conftest.$ac_ext >&5
3945   rm -fr conftest*
3946   samba_cv_HAVE_UNSIGNED_CHAR=no
3947 fi
3948 rm -fr conftest*
3949 fi
3950
3951 fi
3952
3953 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
3954 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
3955     cat >> confdefs.h <<\EOF
3956 #define HAVE_UNSIGNED_CHAR 1
3957 EOF
3958
3959 fi
3960
3961 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
3962 echo "configure:3963: checking for sin_len in sock" >&5
3963 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
3964   echo $ac_n "(cached) $ac_c" 1>&6
3965 else
3966   
3967 cat > conftest.$ac_ext <<EOF
3968 #line 3969 "configure"
3969 #include "confdefs.h"
3970 #include <sys/types.h>
3971 #include <sys/socket.h>
3972 #include <netinet/in.h>
3973 int main() {
3974 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
3975 ; return 0; }
3976 EOF
3977 if { (eval echo configure:3978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3978   rm -rf conftest*
3979   samba_cv_HAVE_SOCK_SIN_LEN=yes
3980 else
3981   echo "configure: failed program was:" >&5
3982   cat conftest.$ac_ext >&5
3983   rm -rf conftest*
3984   samba_cv_HAVE_SOCK_SIN_LEN=no
3985 fi
3986 rm -f conftest*
3987 fi
3988
3989 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
3990 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
3991     cat >> confdefs.h <<\EOF
3992 #define HAVE_SOCK_SIN_LEN 1
3993 EOF
3994
3995 fi
3996
3997 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
3998 echo "configure:3999: checking for __FILE__ macro" >&5
3999 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
4000   echo $ac_n "(cached) $ac_c" 1>&6
4001 else
4002   
4003 cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4006 #include <stdio.h>
4007 int main() {
4008 printf("%s\n", __FILE__);
4009 ; return 0; }
4010 EOF
4011 if { (eval echo configure:4012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4012   rm -rf conftest*
4013   samba_cv_HAVE_FILE_MACRO=yes
4014 else
4015   echo "configure: failed program was:" >&5
4016   cat conftest.$ac_ext >&5
4017   rm -rf conftest*
4018   samba_cv_HAVE_FILE_MACRO=no
4019 fi
4020 rm -f conftest*
4021 fi
4022
4023 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
4024 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
4025     cat >> confdefs.h <<\EOF
4026 #define HAVE_FILE_MACRO 1
4027 EOF
4028
4029 fi
4030
4031 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
4032 echo "configure:4033: checking for __FUNCTION__ macro" >&5
4033 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
4034   echo $ac_n "(cached) $ac_c" 1>&6
4035 else
4036   
4037 cat > conftest.$ac_ext <<EOF
4038 #line 4039 "configure"
4039 #include "confdefs.h"
4040 #include <stdio.h>
4041 int main() {
4042 printf("%s\n", __FUNCTION__);
4043 ; return 0; }
4044 EOF
4045 if { (eval echo configure:4046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4046   rm -rf conftest*
4047   samba_cv_HAVE_FUNCTION_MACRO=yes
4048 else
4049   echo "configure: failed program was:" >&5
4050   cat conftest.$ac_ext >&5
4051   rm -rf conftest*
4052   samba_cv_HAVE_FUNCTION_MACRO=no
4053 fi
4054 rm -f conftest*
4055 fi
4056
4057 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
4058 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
4059     cat >> confdefs.h <<\EOF
4060 #define HAVE_FUNCTION_MACRO 1
4061 EOF
4062
4063 fi
4064
4065 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
4066 echo "configure:4067: checking if gettimeofday takes tz argument" >&5
4067 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
4068   echo $ac_n "(cached) $ac_c" 1>&6
4069 else
4070   
4071 if test "$cross_compiling" = yes; then
4072   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
4073 else
4074   cat > conftest.$ac_ext <<EOF
4075 #line 4076 "configure"
4076 #include "confdefs.h"
4077
4078 #include <sys/time.h>
4079 #include <unistd.h>
4080 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
4081 EOF
4082 if { (eval echo configure:4083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4083 then
4084   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
4085 else
4086   echo "configure: failed program was:" >&5
4087   cat conftest.$ac_ext >&5
4088   rm -fr conftest*
4089   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
4090 fi
4091 rm -fr conftest*
4092 fi
4093
4094 fi
4095
4096 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
4097 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
4098     cat >> confdefs.h <<\EOF
4099 #define HAVE_GETTIMEOFDAY_TZ 1
4100 EOF
4101
4102 fi
4103
4104
4105 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
4106 echo "configure:4107: checking for broken readdir" >&5
4107 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
4108   echo $ac_n "(cached) $ac_c" 1>&6
4109 else
4110   
4111 if test "$cross_compiling" = yes; then
4112   samba_cv_HAVE_BROKEN_READDIR=cross
4113 else
4114   cat > conftest.$ac_ext <<EOF
4115 #line 4116 "configure"
4116 #include "confdefs.h"
4117 #include <sys/types.h>
4118 #include <dirent.h>
4119 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
4120 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
4121 di->d_name[0] == 0) exit(0); exit(1);} 
4122 EOF
4123 if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4124 then
4125   samba_cv_HAVE_BROKEN_READDIR=yes
4126 else
4127   echo "configure: failed program was:" >&5
4128   cat conftest.$ac_ext >&5
4129   rm -fr conftest*
4130   samba_cv_HAVE_BROKEN_READDIR=no
4131 fi
4132 rm -fr conftest*
4133 fi
4134
4135 fi
4136
4137 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
4138 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
4139     cat >> confdefs.h <<\EOF
4140 #define HAVE_BROKEN_READDIR 1
4141 EOF
4142
4143 fi
4144
4145 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
4146 echo "configure:4147: checking for utimbuf" >&5
4147 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
4148   echo $ac_n "(cached) $ac_c" 1>&6
4149 else
4150   
4151 cat > conftest.$ac_ext <<EOF
4152 #line 4153 "configure"
4153 #include "confdefs.h"
4154 #include <sys/types.h>
4155 #include <utime.h>
4156 int main() {
4157 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
4158 ; return 0; }
4159 EOF
4160 if { (eval echo configure:4161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4161   rm -rf conftest*
4162   samba_cv_HAVE_UTIMBUF=yes
4163 else
4164   echo "configure: failed program was:" >&5
4165   cat conftest.$ac_ext >&5
4166   rm -rf conftest*
4167   samba_cv_HAVE_UTIMBUF=no
4168 fi
4169 rm -f conftest*
4170 fi
4171
4172 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
4173 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
4174     cat >> confdefs.h <<\EOF
4175 #define HAVE_UTIMBUF 1
4176 EOF
4177
4178 fi
4179
4180 echo $ac_n "checking for kernel oplock type definitions""... $ac_c" 1>&6
4181 echo "configure:4182: checking for kernel oplock type definitions" >&5
4182 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS'+set}'`\" = set"; then
4183   echo $ac_n "(cached) $ac_c" 1>&6
4184 else
4185   
4186 cat > conftest.$ac_ext <<EOF
4187 #line 4188 "configure"
4188 #include "confdefs.h"
4189 #include <sys/types.h>
4190 #include <fcntl.h>
4191 int main() {
4192 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
4193 ; return 0; }
4194 EOF
4195 if { (eval echo configure:4196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4196   rm -rf conftest*
4197   samba_cv_HAVE_KERNEL_OPLOCKS=yes
4198 else
4199   echo "configure: failed program was:" >&5
4200   cat conftest.$ac_ext >&5
4201   rm -rf conftest*
4202   samba_cv_HAVE_KERNEL_OPLOCKS=no
4203 fi
4204 rm -f conftest*
4205 fi
4206
4207 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS" 1>&6
4208 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS" = x"yes"; then
4209     cat >> confdefs.h <<\EOF
4210 #define HAVE_KERNEL_OPLOCKS 1
4211 EOF
4212
4213 fi
4214
4215
4216 echo $ac_n "checking for test routines""... $ac_c" 1>&6
4217 echo "configure:4218: checking for test routines" >&5
4218 if test "$cross_compiling" = yes; then
4219   echo "configure: warning: cannot run when cross-compiling" 1>&2
4220 else
4221   cat > conftest.$ac_ext <<EOF
4222 #line 4223 "configure"
4223 #include "confdefs.h"
4224 #include "${srcdir-.}/tests/trivial.c"
4225 EOF
4226 if { (eval echo configure:4227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4227 then
4228   echo "$ac_t""yes" 1>&6
4229 else
4230   echo "configure: failed program was:" >&5
4231   cat conftest.$ac_ext >&5
4232   rm -fr conftest*
4233   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
4234 fi
4235 rm -fr conftest*
4236 fi
4237
4238
4239 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
4240 echo "configure:4241: checking for ftruncate extend" >&5
4241 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
4242   echo $ac_n "(cached) $ac_c" 1>&6
4243 else
4244   
4245 if test "$cross_compiling" = yes; then
4246   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
4247 else
4248   cat > conftest.$ac_ext <<EOF
4249 #line 4250 "configure"
4250 #include "confdefs.h"
4251 #include "${srcdir-.}/tests/ftruncate.c"
4252 EOF
4253 if { (eval echo configure:4254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4254 then
4255   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
4256 else
4257   echo "configure: failed program was:" >&5
4258   cat conftest.$ac_ext >&5
4259   rm -fr conftest*
4260   samba_cv_HAVE_FTRUNCATE_EXTEND=no
4261 fi
4262 rm -fr conftest*
4263 fi
4264
4265 fi
4266
4267 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
4268 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
4269     cat >> confdefs.h <<\EOF
4270 #define HAVE_FTRUNCATE_EXTEND 1
4271 EOF
4272
4273 fi
4274
4275 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
4276 echo "configure:4277: checking for broken getgroups" >&5
4277 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
4278   echo $ac_n "(cached) $ac_c" 1>&6
4279 else
4280   
4281 if test "$cross_compiling" = yes; then
4282   samba_cv_HAVE_BROKEN_GETGROUPS=cross
4283 else
4284   cat > conftest.$ac_ext <<EOF
4285 #line 4286 "configure"
4286 #include "confdefs.h"
4287 #include "${srcdir-.}/tests/getgroups.c"
4288 EOF
4289 if { (eval echo configure:4290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4290 then
4291   samba_cv_HAVE_BROKEN_GETGROUPS=yes
4292 else
4293   echo "configure: failed program was:" >&5
4294   cat conftest.$ac_ext >&5
4295   rm -fr conftest*
4296   samba_cv_HAVE_BROKEN_GETGROUPS=no
4297 fi
4298 rm -fr conftest*
4299 fi
4300
4301 fi
4302
4303 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
4304 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
4305     cat >> confdefs.h <<\EOF
4306 #define HAVE_BROKEN_GETGROUPS 1
4307 EOF
4308
4309 fi
4310
4311 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
4312 echo "configure:4313: checking whether getpass should be replaced" >&5
4313 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
4314   echo $ac_n "(cached) $ac_c" 1>&6
4315 else
4316   
4317 SAVE_CPPFLAGS="$CPPFLAGS"
4318 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/include -I${srcdir-.}/ubiqx"
4319 cat > conftest.$ac_ext <<EOF
4320 #line 4321 "configure"
4321 #include "confdefs.h"
4322
4323 #define REPLACE_GETPASS 1
4324 #define NO_CONFIG_H 1
4325 #define main dont_declare_main
4326 #include "${srcdir-.}/lib/getsmbpass.c"
4327 #undef main
4328
4329 int main() {
4330
4331 ; return 0; }
4332 EOF
4333 if { (eval echo configure:4334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4334   rm -rf conftest*
4335   samba_cv_REPLACE_GETPASS=yes
4336 else
4337   echo "configure: failed program was:" >&5
4338   cat conftest.$ac_ext >&5
4339   rm -rf conftest*
4340   samba_cv_REPLACE_GETPASS=no
4341 fi
4342 rm -f conftest*
4343 CPPFLAGS="$SAVE_CPPFLAGS"
4344
4345 fi
4346
4347 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
4348 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
4349         cat >> confdefs.h <<\EOF
4350 #define REPLACE_GETPASS 1
4351 EOF
4352
4353 fi
4354
4355 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
4356 echo "configure:4357: checking for broken inet_ntoa" >&5
4357 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
4358   echo $ac_n "(cached) $ac_c" 1>&6
4359 else
4360   
4361 if test "$cross_compiling" = yes; then
4362   samba_cv_REPLACE_INET_NTOA=cross
4363 else
4364   cat > conftest.$ac_ext <<EOF
4365 #line 4366 "configure"
4366 #include "confdefs.h"
4367
4368 #include <stdio.h>
4369 #include <sys/types.h>
4370 #include <netinet/in.h>
4371 #include <arpa/inet.h>
4372 main() { struct in_addr ip; ip.s_addr = 0x12345678;
4373 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
4374     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
4375 exit(1);}
4376 EOF
4377 if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4378 then
4379   samba_cv_REPLACE_INET_NTOA=yes
4380 else
4381   echo "configure: failed program was:" >&5
4382   cat conftest.$ac_ext >&5
4383   rm -fr conftest*
4384   samba_cv_REPLACE_INET_NTOA=no
4385 fi
4386 rm -fr conftest*
4387 fi
4388
4389 fi
4390
4391 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
4392 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
4393     cat >> confdefs.h <<\EOF
4394 #define REPLACE_INET_NTOA 1
4395 EOF
4396
4397 fi
4398
4399 echo $ac_n "checking for root""... $ac_c" 1>&6
4400 echo "configure:4401: checking for root" >&5
4401 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
4402   echo $ac_n "(cached) $ac_c" 1>&6
4403 else
4404   
4405 if test "$cross_compiling" = yes; then
4406   samba_cv_HAVE_ROOT=cross
4407 else
4408   cat > conftest.$ac_ext <<EOF
4409 #line 4410 "configure"
4410 #include "confdefs.h"
4411 main() { exit(getuid() != 0); }
4412 EOF
4413 if { (eval echo configure:4414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4414 then
4415   samba_cv_HAVE_ROOT=yes
4416 else
4417   echo "configure: failed program was:" >&5
4418   cat conftest.$ac_ext >&5
4419   rm -fr conftest*
4420   samba_cv_HAVE_ROOT=no
4421 fi
4422 rm -fr conftest*
4423 fi
4424
4425 fi
4426
4427 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
4428 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
4429     cat >> confdefs.h <<\EOF
4430 #define HAVE_ROOT 1
4431 EOF
4432
4433 else
4434     echo "configure: warning: running as non-root will disable some tests" 1>&2
4435 fi
4436
4437 netmask=no;
4438 echo $ac_n "checking for netmask ifconf""... $ac_c" 1>&6
4439 echo "configure:4440: checking for netmask ifconf" >&5
4440 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_IFCONF'+set}'`\" = set"; then
4441   echo $ac_n "(cached) $ac_c" 1>&6
4442 else
4443   
4444 if test "$cross_compiling" = yes; then
4445   samba_cv_HAVE_NETMASK_IFCONF=cross
4446 else
4447   cat > conftest.$ac_ext <<EOF
4448 #line 4449 "configure"
4449 #include "confdefs.h"
4450
4451 #define HAVE_NETMASK_IFCONF 1
4452 #define AUTOCONF 1
4453 #include "${srcdir-.}/lib/netmask.c"
4454 EOF
4455 if { (eval echo configure:4456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4456 then
4457   samba_cv_HAVE_NETMASK_IFCONF=yes
4458 else
4459   echo "configure: failed program was:" >&5
4460   cat conftest.$ac_ext >&5
4461   rm -fr conftest*
4462   samba_cv_HAVE_NETMASK_IFCONF=no
4463 fi
4464 rm -fr conftest*
4465 fi
4466
4467 fi
4468
4469 echo "$ac_t""$samba_cv_HAVE_NETMASK_IFCONF" 1>&6
4470 if test x"$samba_cv_HAVE_NETMASK_IFCONF" = x"yes"; then
4471     netmask=yes;cat >> confdefs.h <<\EOF
4472 #define HAVE_NETMASK_IFCONF 1
4473 EOF
4474
4475 fi
4476
4477 if test $netmask = no; then
4478 echo $ac_n "checking for netmask ifreq""... $ac_c" 1>&6
4479 echo "configure:4480: checking for netmask ifreq" >&5
4480 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_IFREQ'+set}'`\" = set"; then
4481   echo $ac_n "(cached) $ac_c" 1>&6
4482 else
4483   
4484 if test "$cross_compiling" = yes; then
4485   samba_cv_HAVE_NETMASK_IFREQ=cross
4486 else
4487   cat > conftest.$ac_ext <<EOF
4488 #line 4489 "configure"
4489 #include "confdefs.h"
4490
4491 #define HAVE_NETMASK_IFREQ 1
4492 #define AUTOCONF 1
4493 #include "${srcdir-.}/lib/netmask.c"
4494 EOF
4495 if { (eval echo configure:4496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4496 then
4497   samba_cv_HAVE_NETMASK_IFREQ=yes
4498 else
4499   echo "configure: failed program was:" >&5
4500   cat conftest.$ac_ext >&5
4501   rm -fr conftest*
4502   samba_cv_HAVE_NETMASK_IFREQ=no
4503 fi
4504 rm -fr conftest*
4505 fi
4506
4507 fi
4508
4509 echo "$ac_t""$samba_cv_HAVE_NETMASK_IFREQ" 1>&6
4510 if test x"$samba_cv_HAVE_NETMASK_IFREQ" = x"yes"; then
4511     netmask=yes;cat >> confdefs.h <<\EOF
4512 #define HAVE_NETMASK_IFREQ 1
4513 EOF
4514
4515 fi
4516 fi
4517
4518 if test $netmask = no; then
4519 echo $ac_n "checking for netmask AIX""... $ac_c" 1>&6
4520 echo "configure:4521: checking for netmask AIX" >&5
4521 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_AIX'+set}'`\" = set"; then
4522   echo $ac_n "(cached) $ac_c" 1>&6
4523 else
4524   
4525 if test "$cross_compiling" = yes; then
4526   samba_cv_HAVE_NETMASK_AIX=cross
4527 else
4528   cat > conftest.$ac_ext <<EOF
4529 #line 4530 "configure"
4530 #include "confdefs.h"
4531
4532 #define HAVE_NETMASK_AIX 1
4533 #define AUTOCONF 1
4534 #include "${srcdir-.}/lib/netmask.c"
4535 EOF
4536 if { (eval echo configure:4537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4537 then
4538   samba_cv_HAVE_NETMASK_AIX=yes
4539 else
4540   echo "configure: failed program was:" >&5
4541   cat conftest.$ac_ext >&5
4542   rm -fr conftest*
4543   samba_cv_HAVE_NETMASK_AIX=no
4544 fi
4545 rm -fr conftest*
4546 fi
4547
4548 fi
4549
4550 echo "$ac_t""$samba_cv_HAVE_NETMASK_AIX" 1>&6
4551 if test x"$samba_cv_HAVE_NETMASK_AIX" = x"yes"; then
4552     netmask=yes;cat >> confdefs.h <<\EOF
4553 #define HAVE_NETMASK_AIX 1
4554 EOF
4555
4556 fi
4557 fi
4558
4559 echo $ac_n "checking for trapdoor seteuid""... $ac_c" 1>&6
4560 echo "configure:4561: checking for trapdoor seteuid" >&5
4561 if eval "test \"`echo '$''{'samba_cv_HAVE_TRAPDOOR_UID'+set}'`\" = set"; then
4562   echo $ac_n "(cached) $ac_c" 1>&6
4563 else
4564   
4565 if test "$cross_compiling" = yes; then
4566   :
4567 else
4568   cat > conftest.$ac_ext <<EOF
4569 #line 4570 "configure"
4570 #include "confdefs.h"
4571 #include "${srcdir-.}/tests/trapdoor.c"
4572 EOF
4573 if { (eval echo configure:4574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4574 then
4575   samba_cv_HAVE_TRAPDOOR_UID=no
4576 else
4577   echo "configure: failed program was:" >&5
4578   cat conftest.$ac_ext >&5
4579   rm -fr conftest*
4580   samba_cv_HAVE_TRAPDOOR_UID=yes
4581 fi
4582 rm -fr conftest*
4583 fi
4584
4585 fi
4586
4587 echo "$ac_t""$samba_cv_HAVE_TRAPDOOR_UID" 1>&6
4588 if test x"$samba_cv_HAVE_TRAPDOOR_UID" = x"yes"; then
4589     cat >> confdefs.h <<\EOF
4590 #define HAVE_TRAPDOOR_UID 1
4591 EOF
4592
4593 fi
4594
4595 echo $ac_n "checking for shared mmap""... $ac_c" 1>&6
4596 echo "configure:4597: checking for shared mmap" >&5
4597 if eval "test \"`echo '$''{'samba_cv_HAVE_SHARED_MMAP'+set}'`\" = set"; then
4598   echo $ac_n "(cached) $ac_c" 1>&6
4599 else
4600   
4601 if test "$cross_compiling" = yes; then
4602   samba_cv_HAVE_SHARED_MMAP=cross
4603 else
4604   cat > conftest.$ac_ext <<EOF
4605 #line 4606 "configure"
4606 #include "confdefs.h"
4607 #include "${srcdir-.}/tests/shared_mmap.c"
4608 EOF
4609 if { (eval echo configure:4610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4610 then
4611   samba_cv_HAVE_SHARED_MMAP=yes
4612 else
4613   echo "configure: failed program was:" >&5
4614   cat conftest.$ac_ext >&5
4615   rm -fr conftest*
4616   samba_cv_HAVE_SHARED_MMAP=no
4617 fi
4618 rm -fr conftest*
4619 fi
4620
4621 fi
4622
4623 echo "$ac_t""$samba_cv_HAVE_SHARED_MMAP" 1>&6
4624 if test x"$samba_cv_HAVE_SHARED_MMAP" = x"yes"; then
4625     cat >> confdefs.h <<\EOF
4626 #define HAVE_SHARED_MMAP 1
4627 EOF
4628
4629 fi
4630
4631 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
4632 echo "configure:4633: checking for fcntl locking" >&5
4633 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
4634   echo $ac_n "(cached) $ac_c" 1>&6
4635 else
4636   
4637 if test "$cross_compiling" = yes; then
4638   samba_cv_HAVE_FCNTL_LOCK=cross
4639 else
4640   cat > conftest.$ac_ext <<EOF
4641 #line 4642 "configure"
4642 #include "confdefs.h"
4643 #include "${srcdir-.}/tests/fcntl_lock.c"
4644 EOF
4645 if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4646 then
4647   samba_cv_HAVE_FCNTL_LOCK=yes
4648 else
4649   echo "configure: failed program was:" >&5
4650   cat conftest.$ac_ext >&5
4651   rm -fr conftest*
4652   samba_cv_HAVE_FCNTL_LOCK=no
4653 fi
4654 rm -fr conftest*
4655 fi
4656
4657 fi
4658
4659 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
4660 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
4661     cat >> confdefs.h <<\EOF
4662 #define HAVE_FCNTL_LOCK 1
4663 EOF
4664
4665 fi
4666
4667 echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
4668 echo "configure:4669: checking for 64 bit fcntl locking" >&5
4669 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
4670   echo $ac_n "(cached) $ac_c" 1>&6
4671 else
4672   
4673 if test "$cross_compiling" = yes; then
4674   samba_cv_HAVE_STRUCT_FLOCK64=cross
4675 else
4676   cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679
4680 #include <stdio.h>
4681 #include <stdlib.h>
4682
4683 #ifdef HAVE_FCNTL_H
4684 #include <fcntl.h>
4685 #endif
4686
4687 #ifdef HAVE_SYS_FCNTL_H
4688 #include <sys/fcntl.h>
4689 #endif
4690 main() { struct flock64 fl64;
4691 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
4692 exit(0);
4693 #else
4694 exit(1);
4695 #endif
4696 }
4697 EOF
4698 if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4699 then
4700   samba_cv_HAVE_STRUCT_FLOCK64=yes
4701 else
4702   echo "configure: failed program was:" >&5
4703   cat conftest.$ac_ext >&5
4704   rm -fr conftest*
4705   samba_cv_HAVE_STRUCT_FLOCK64=no
4706 fi
4707 rm -fr conftest*
4708 fi
4709
4710 fi
4711
4712 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
4713 if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
4714     cat >> confdefs.h <<\EOF
4715 #define HAVE_STRUCT_FLOCK64 1
4716 EOF
4717
4718 fi
4719
4720 echo $ac_n "checking for sysv ipc""... $ac_c" 1>&6
4721 echo "configure:4722: checking for sysv ipc" >&5
4722 if eval "test \"`echo '$''{'samba_cv_HAVE_SYSV_IPC'+set}'`\" = set"; then
4723   echo $ac_n "(cached) $ac_c" 1>&6
4724 else
4725   
4726 if test "$cross_compiling" = yes; then
4727   samba_cv_HAVE_SYSV_IPC=cross
4728 else
4729   cat > conftest.$ac_ext <<EOF
4730 #line 4731 "configure"
4731 #include "confdefs.h"
4732 #include "${srcdir-.}/tests/sysv_ipc.c"
4733 EOF
4734 if { (eval echo configure:4735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4735 then
4736   samba_cv_HAVE_SYSV_IPC=yes
4737 else
4738   echo "configure: failed program was:" >&5
4739   cat conftest.$ac_ext >&5
4740   rm -fr conftest*
4741   samba_cv_HAVE_SYSV_IPC=no
4742 fi
4743 rm -fr conftest*
4744 fi
4745
4746 fi
4747
4748 echo "$ac_t""$samba_cv_HAVE_SYSV_IPC" 1>&6
4749 if test x"$samba_cv_HAVE_SYSV_IPC" = x"yes"; then
4750     cat >> confdefs.h <<\EOF
4751 #define HAVE_SYSV_IPC 1
4752 EOF
4753
4754 fi
4755
4756 #################################################
4757 # check for the AFS filesystem
4758 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
4759 echo "configure:4760: checking whether to use AFS" >&5
4760 # Check whether --with-afs or --without-afs was given.
4761 if test "${with_afs+set}" = set; then
4762   withval="$with_afs"
4763    case "$withval" in
4764   yes)
4765     echo "$ac_t""yes" 1>&6
4766     cat >> confdefs.h <<\EOF
4767 #define WITH_AFS 1
4768 EOF
4769
4770     ;;
4771   *)
4772     echo "$ac_t""no" 1>&6
4773     ;;
4774   esac 
4775 else
4776   echo "$ac_t""no" 1>&6
4777
4778 fi
4779
4780
4781
4782 #################################################
4783 # check for the DFS auth system
4784 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
4785 echo "configure:4786: checking whether to use DFS auth" >&5
4786 # Check whether --with-dfs or --without-dfs was given.
4787 if test "${with_dfs+set}" = set; then
4788   withval="$with_dfs"
4789    case "$withval" in
4790   yes)
4791     echo "$ac_t""yes" 1>&6
4792     cat >> confdefs.h <<\EOF
4793 #define WITH_DFS 1
4794 EOF
4795
4796     ;;
4797   *)
4798     echo "$ac_t""no" 1>&6
4799     ;;
4800   esac 
4801 else
4802   echo "$ac_t""no" 1>&6
4803
4804 fi
4805
4806
4807 #################################################
4808 # check for automount support
4809 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
4810 echo "configure:4811: checking whether to use AUTOMOUNT" >&5
4811 # Check whether --with-automount or --without-automount was given.
4812 if test "${with_automount+set}" = set; then
4813   withval="$with_automount"
4814    case "$withval" in
4815   yes)
4816     echo "$ac_t""yes" 1>&6
4817     cat >> confdefs.h <<\EOF
4818 #define WITH_AUTOMOUNT 1
4819 EOF
4820
4821     ;;
4822   *)
4823     echo "$ac_t""no" 1>&6
4824     ;;
4825   esac 
4826 else
4827   echo "$ac_t""no" 1>&6
4828
4829 fi
4830
4831
4832 #################################################
4833 # check for a LDAP password database
4834 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
4835 echo "configure:4836: checking whether to use LDAP password database" >&5
4836 # Check whether --with-ldap or --without-ldap was given.
4837 if test "${with_ldap+set}" = set; then
4838   withval="$with_ldap"
4839    case "$withval" in
4840   yes)
4841     echo "$ac_t""yes" 1>&6
4842     cat >> confdefs.h <<\EOF
4843 #define WITH_LDAP 1
4844 EOF
4845
4846     ;;
4847   *)
4848     echo "$ac_t""no" 1>&6
4849     ;;
4850   esac 
4851 else
4852   echo "$ac_t""no" 1>&6
4853
4854 fi
4855
4856
4857 #################################################
4858 # check for a NISPLUS password database
4859 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
4860 echo "configure:4861: checking whether to use NISPLUS password database" >&5
4861 # Check whether --with-nisplus or --without-nisplus was given.
4862 if test "${with_nisplus+set}" = set; then
4863   withval="$with_nisplus"
4864    case "$withval" in
4865   yes)
4866     echo "$ac_t""yes" 1>&6
4867     cat >> confdefs.h <<\EOF
4868 #define WITH_NISPLUS 1
4869 EOF
4870
4871     ;;
4872   *)
4873     echo "$ac_t""no" 1>&6
4874     ;;
4875   esac 
4876 else
4877   echo "$ac_t""no" 1>&6
4878
4879 fi
4880
4881
4882 #################################################
4883 # check for a NISPLUS_HOME support 
4884 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
4885 echo "configure:4886: checking whether to use NISPLUS_HOME" >&5
4886 # Check whether --with-nisplus-home or --without-nisplus-home was given.
4887 if test "${with_nisplus_home+set}" = set; then
4888   withval="$with_nisplus_home"
4889    case "$withval" in
4890   yes)
4891     echo "$ac_t""yes" 1>&6
4892     cat >> confdefs.h <<\EOF
4893 #define WITH_NISPLUS_HOME 1
4894 EOF
4895
4896     ;;
4897   *)
4898     echo "$ac_t""no" 1>&6
4899     ;;
4900   esac 
4901 else
4902   echo "$ac_t""no" 1>&6
4903
4904 fi
4905
4906
4907 #################################################
4908 # check for the secure socket layer
4909 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
4910 echo "configure:4911: checking whether to use SSL" >&5
4911 # Check whether --with-ssl or --without-ssl was given.
4912 if test "${with_ssl+set}" = set; then
4913   withval="$with_ssl"
4914    case "$withval" in
4915   yes)
4916     echo "$ac_t""yes" 1>&6
4917     cat >> confdefs.h <<\EOF
4918 #define WITH_SSL 1
4919 EOF
4920
4921     ;;
4922   *)
4923     echo "$ac_t""no" 1>&6
4924     ;;
4925   esac 
4926 else
4927   echo "$ac_t""no" 1>&6
4928
4929 fi
4930
4931
4932 #################################################
4933 # check for experimental mmap support
4934 echo $ac_n "checking whether to use MMAP""... $ac_c" 1>&6
4935 echo "configure:4936: checking whether to use MMAP" >&5
4936 # Check whether --with-mmap or --without-mmap was given.
4937 if test "${with_mmap+set}" = set; then
4938   withval="$with_mmap"
4939    case "$withval" in
4940   yes)
4941     echo "$ac_t""yes" 1>&6
4942     cat >> confdefs.h <<\EOF
4943 #define WITH_MMAP 1
4944 EOF
4945
4946     ;;
4947   *)
4948     echo "$ac_t""no" 1>&6
4949     ;;
4950   esac 
4951 else
4952   echo "$ac_t""no" 1>&6
4953
4954 fi
4955
4956
4957 #################################################
4958 # check for syslog logging
4959 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
4960 echo "configure:4961: checking whether to use syslog logging" >&5
4961 # Check whether --with-syslog or --without-syslog was given.
4962 if test "${with_syslog+set}" = set; then
4963   withval="$with_syslog"
4964    case "$withval" in
4965   yes)
4966     echo "$ac_t""yes" 1>&6
4967     cat >> confdefs.h <<\EOF
4968 #define WITH_SYSLOG 1
4969 EOF
4970
4971     ;;
4972   *)
4973     echo "$ac_t""no" 1>&6
4974     ;;
4975   esac 
4976 else
4977   echo "$ac_t""no" 1>&6
4978
4979 fi
4980
4981
4982 #################################################
4983 # check for experimental netatalk resource fork support
4984 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
4985 echo "configure:4986: checking whether to support netatalk" >&5
4986 # Check whether --with-netatalk or --without-netatalk was given.
4987 if test "${with_netatalk+set}" = set; then
4988   withval="$with_netatalk"
4989    case "$withval" in
4990   yes)
4991     echo "$ac_t""yes" 1>&6
4992     cat >> confdefs.h <<\EOF
4993 #define WITH_NETATALK 1
4994 EOF
4995
4996     ;;
4997   *)
4998     echo "$ac_t""no" 1>&6
4999     ;;
5000   esac 
5001 else
5002   echo "$ac_t""no" 1>&6
5003
5004 fi
5005
5006
5007
5008 #################################################
5009 # these tests are taken from the GNU fileutils package
5010 echo "checking how to get filesystem space usage" 1>&6
5011 echo "configure:5012: checking how to get filesystem space usage" >&5
5012 space=no
5013
5014 # Test for statvfs64.
5015 if test $space = no; then
5016   # SVR4
5017   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
5018 echo "configure:5019: checking statvfs64 function (SVR4)" >&5
5019 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
5020   echo $ac_n "(cached) $ac_c" 1>&6
5021 else
5022   if test "$cross_compiling" = yes; then
5023   fu_cv_sys_stat_statvfs64=cross
5024 else
5025   cat > conftest.$ac_ext <<EOF
5026 #line 5027 "configure"
5027 #include "confdefs.h"
5028
5029 #include <sys/types.h>
5030 #include <sys/statvfs.h>
5031   main ()
5032   {
5033     struct statvfs64 fsd;
5034     exit (statfs64 (".", &fsd));
5035   }
5036 EOF
5037 if { (eval echo configure:5038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5038 then
5039   fu_cv_sys_stat_statvfs64=yes
5040 else
5041   echo "configure: failed program was:" >&5
5042   cat conftest.$ac_ext >&5
5043   rm -fr conftest*
5044   fu_cv_sys_stat_statvfs64=no
5045 fi
5046 rm -fr conftest*
5047 fi
5048
5049 fi
5050
5051 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
5052   if test $fu_cv_sys_stat_statvfs64 = yes; then
5053     space=yes
5054     cat >> confdefs.h <<\EOF
5055 #define STAT_STATVFS64 1
5056 EOF
5057
5058   fi
5059 fi
5060
5061 # Perform only the link test since it seems there are no variants of the
5062 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
5063 # because that got a false positive on SCO OSR5.  Adding the declaration
5064 # of a `struct statvfs' causes this test to fail (as it should) on such
5065 # systems.  That system is reported to work fine with STAT_STATFS4 which
5066 # is what it gets when this test fails.
5067 if test $space = no; then
5068   # SVR4
5069   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
5070 echo "configure:5071: checking statvfs function (SVR4)" >&5
5071 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
5072   echo $ac_n "(cached) $ac_c" 1>&6
5073 else
5074   cat > conftest.$ac_ext <<EOF
5075 #line 5076 "configure"
5076 #include "confdefs.h"
5077 #include <sys/types.h>
5078 #include <sys/statvfs.h>
5079 int main() {
5080 struct statvfs fsd; statvfs (0, &fsd);
5081 ; return 0; }
5082 EOF
5083 if { (eval echo configure:5084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5084   rm -rf conftest*
5085   fu_cv_sys_stat_statvfs=yes
5086 else
5087   echo "configure: failed program was:" >&5
5088   cat conftest.$ac_ext >&5
5089   rm -rf conftest*
5090   fu_cv_sys_stat_statvfs=no
5091 fi
5092 rm -f conftest*
5093 fi
5094
5095 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
5096   if test $fu_cv_sys_stat_statvfs = yes; then
5097     space=yes
5098     cat >> confdefs.h <<\EOF
5099 #define STAT_STATVFS 1
5100 EOF
5101
5102   fi
5103 fi
5104
5105 if test $space = no; then
5106   # DEC Alpha running OSF/1
5107   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
5108 echo "configure:5109: checking for 3-argument statfs function (DEC OSF/1)" >&5
5109   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
5110   echo $ac_n "(cached) $ac_c" 1>&6
5111 else
5112   if test "$cross_compiling" = yes; then
5113   fu_cv_sys_stat_statfs3_osf1=no
5114 else
5115   cat > conftest.$ac_ext <<EOF
5116 #line 5117 "configure"
5117 #include "confdefs.h"
5118
5119 #include <sys/param.h>
5120 #include <sys/types.h>
5121 #include <sys/mount.h>
5122   main ()
5123   {
5124     struct statfs fsd;
5125     fsd.f_fsize = 0;
5126     exit (statfs (".", &fsd, sizeof (struct statfs)));
5127   }
5128 EOF
5129 if { (eval echo configure:5130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5130 then
5131   fu_cv_sys_stat_statfs3_osf1=yes
5132 else
5133   echo "configure: failed program was:" >&5
5134   cat conftest.$ac_ext >&5
5135   rm -fr conftest*
5136   fu_cv_sys_stat_statfs3_osf1=no
5137 fi
5138 rm -fr conftest*
5139 fi
5140
5141 fi
5142
5143   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
5144   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
5145     space=yes
5146     cat >> confdefs.h <<\EOF
5147 #define STAT_STATFS3_OSF1 1
5148 EOF
5149
5150   fi
5151 fi
5152
5153 if test $space = no; then
5154 # AIX
5155   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
5156 echo "configure:5157: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
5157   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
5158   echo $ac_n "(cached) $ac_c" 1>&6
5159 else
5160   if test "$cross_compiling" = yes; then
5161   fu_cv_sys_stat_statfs2_bsize=no
5162 else
5163   cat > conftest.$ac_ext <<EOF
5164 #line 5165 "configure"
5165 #include "confdefs.h"
5166
5167 #ifdef HAVE_SYS_PARAM_H
5168 #include <sys/param.h>
5169 #endif
5170 #ifdef HAVE_SYS_MOUNT_H
5171 #include <sys/mount.h>
5172 #endif
5173 #ifdef HAVE_SYS_VFS_H
5174 #include <sys/vfs.h>
5175 #endif
5176   main ()
5177   {
5178   struct statfs fsd;
5179   fsd.f_bsize = 0;
5180   exit (statfs (".", &fsd));
5181   }
5182 EOF
5183 if { (eval echo configure:5184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5184 then
5185   fu_cv_sys_stat_statfs2_bsize=yes
5186 else
5187   echo "configure: failed program was:" >&5
5188   cat conftest.$ac_ext >&5
5189   rm -fr conftest*
5190   fu_cv_sys_stat_statfs2_bsize=no
5191 fi
5192 rm -fr conftest*
5193 fi
5194
5195 fi
5196
5197   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
5198   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
5199     space=yes
5200     cat >> confdefs.h <<\EOF
5201 #define STAT_STATFS2_BSIZE 1
5202 EOF
5203
5204   fi
5205 fi
5206
5207 if test $space = no; then
5208 # SVR3
5209   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
5210 echo "configure:5211: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
5211   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
5212   echo $ac_n "(cached) $ac_c" 1>&6
5213 else
5214   if test "$cross_compiling" = yes; then
5215   fu_cv_sys_stat_statfs4=no
5216 else
5217   cat > conftest.$ac_ext <<EOF
5218 #line 5219 "configure"
5219 #include "confdefs.h"
5220 #include <sys/types.h>
5221 #include <sys/statfs.h>
5222   main ()
5223   {
5224   struct statfs fsd;
5225   exit (statfs (".", &fsd, sizeof fsd, 0));
5226   }
5227 EOF
5228 if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5229 then
5230   fu_cv_sys_stat_statfs4=yes
5231 else
5232   echo "configure: failed program was:" >&5
5233   cat conftest.$ac_ext >&5
5234   rm -fr conftest*
5235   fu_cv_sys_stat_statfs4=no
5236 fi
5237 rm -fr conftest*
5238 fi
5239
5240 fi
5241
5242   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
5243   if test $fu_cv_sys_stat_statfs4 = yes; then
5244     space=yes
5245     cat >> confdefs.h <<\EOF
5246 #define STAT_STATFS4 1
5247 EOF
5248
5249   fi
5250 fi
5251
5252 if test $space = no; then
5253 # 4.4BSD and NetBSD
5254   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
5255 echo "configure:5256: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
5256   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
5257   echo $ac_n "(cached) $ac_c" 1>&6
5258 else
5259   if test "$cross_compiling" = yes; then
5260   fu_cv_sys_stat_statfs2_fsize=no
5261 else
5262   cat > conftest.$ac_ext <<EOF
5263 #line 5264 "configure"
5264 #include "confdefs.h"
5265 #include <sys/types.h>
5266 #ifdef HAVE_SYS_PARAM_H
5267 #include <sys/param.h>
5268 #endif
5269 #ifdef HAVE_SYS_MOUNT_H
5270 #include <sys/mount.h>
5271 #endif
5272   main ()
5273   {
5274   struct statfs fsd;
5275   fsd.f_fsize = 0;
5276   exit (statfs (".", &fsd));
5277   }
5278 EOF
5279 if { (eval echo configure:5280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5280 then
5281   fu_cv_sys_stat_statfs2_fsize=yes
5282 else
5283   echo "configure: failed program was:" >&5
5284   cat conftest.$ac_ext >&5
5285   rm -fr conftest*
5286   fu_cv_sys_stat_statfs2_fsize=no
5287 fi
5288 rm -fr conftest*
5289 fi
5290
5291 fi
5292
5293   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
5294   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
5295     space=yes
5296     cat >> confdefs.h <<\EOF
5297 #define STAT_STATFS2_FSIZE 1
5298 EOF
5299
5300   fi
5301 fi
5302
5303 if test $space = no; then
5304   # Ultrix
5305   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
5306 echo "configure:5307: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
5307   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
5308   echo $ac_n "(cached) $ac_c" 1>&6
5309 else
5310   if test "$cross_compiling" = yes; then
5311   fu_cv_sys_stat_fs_data=no
5312 else
5313   cat > conftest.$ac_ext <<EOF
5314 #line 5315 "configure"
5315 #include "confdefs.h"
5316 #include <sys/types.h>
5317 #ifdef HAVE_SYS_PARAM_H
5318 #include <sys/param.h>
5319 #endif
5320 #ifdef HAVE_SYS_MOUNT_H
5321 #include <sys/mount.h>
5322 #endif
5323 #ifdef HAVE_SYS_FS_TYPES_H
5324 #include <sys/fs_types.h>
5325 #endif
5326   main ()
5327   {
5328   struct fs_data fsd;
5329   /* Ultrix's statfs returns 1 for success,
5330      0 for not mounted, -1 for failure.  */
5331   exit (statfs (".", &fsd) != 1);
5332   }
5333 EOF
5334 if { (eval echo configure:5335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5335 then
5336   fu_cv_sys_stat_fs_data=yes
5337 else
5338   echo "configure: failed program was:" >&5
5339   cat conftest.$ac_ext >&5
5340   rm -fr conftest*
5341   fu_cv_sys_stat_fs_data=no
5342 fi
5343 rm -fr conftest*
5344 fi
5345
5346 fi
5347
5348   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
5349   if test $fu_cv_sys_stat_fs_data = yes; then
5350     space=yes
5351     cat >> confdefs.h <<\EOF
5352 #define STAT_STATFS2_FS_DATA 1
5353 EOF
5354
5355   fi
5356 fi
5357
5358 echo "checking configure summary"
5359 if test "$cross_compiling" = yes; then
5360   :
5361 else
5362   cat > conftest.$ac_ext <<EOF
5363 #line 5364 "configure"
5364 #include "confdefs.h"
5365 #include "${srcdir-.}/tests/summary.c"
5366 EOF
5367 if { (eval echo configure:5368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5368 then
5369   echo "configure OK";
5370 else
5371   echo "configure: failed program was:" >&5
5372   cat conftest.$ac_ext >&5
5373   rm -fr conftest*
5374   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
5375 fi
5376 rm -fr conftest*
5377 fi
5378
5379
5380
5381 trap '' 1 2 15
5382 cat > confcache <<\EOF
5383 # This file is a shell script that caches the results of configure
5384 # tests run on this system so they can be shared between configure
5385 # scripts and configure runs.  It is not useful on other systems.
5386 # If it contains results you don't want to keep, you may remove or edit it.
5387 #
5388 # By default, configure uses ./config.cache as the cache file,
5389 # creating it if it does not exist already.  You can give configure
5390 # the --cache-file=FILE option to use a different cache file; that is
5391 # what configure does when it calls configure scripts in
5392 # subdirectories, so they share the cache.
5393 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5394 # config.status only pays attention to the cache file if you give it the
5395 # --recheck option to rerun configure.
5396 #
5397 EOF
5398 # The following way of writing the cache mishandles newlines in values,
5399 # but we know of no workaround that is simple, portable, and efficient.
5400 # So, don't put newlines in cache variables' values.
5401 # Ultrix sh set writes to stderr and can't be redirected directly,
5402 # and sets the high bit in the cache file unless we assign to the vars.
5403 (set) 2>&1 |
5404   case `(ac_space=' '; set) 2>&1` in
5405   *ac_space=\ *)
5406     # `set' does not quote correctly, so add quotes (double-quote substitution
5407     # turns \\\\ into \\, and sed turns \\ into \).
5408     sed -n \
5409       -e "s/'/'\\\\''/g" \
5410       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5411     ;;
5412   *)
5413     # `set' quotes correctly as required by POSIX, so do not add quotes.
5414     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5415     ;;
5416   esac >> confcache
5417 if cmp -s $cache_file confcache; then
5418   :
5419 else
5420   if test -w $cache_file; then
5421     echo "updating cache $cache_file"
5422     cat confcache > $cache_file
5423   else
5424     echo "not updating unwritable cache $cache_file"
5425   fi
5426 fi
5427 rm -f confcache
5428
5429 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5430
5431 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5432 # Let make expand exec_prefix.
5433 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5434
5435 # Any assignment to VPATH causes Sun make to only execute
5436 # the first set of double-colon rules, so remove it if not needed.
5437 # If there is a colon in the path, we need to keep it.
5438 if test "x$srcdir" = x.; then
5439   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5440 fi
5441
5442 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5443
5444 DEFS=-DHAVE_CONFIG_H
5445
5446 # Without the "./", some shells look in PATH for config.status.
5447 : ${CONFIG_STATUS=./config.status}
5448
5449 echo creating $CONFIG_STATUS
5450 rm -f $CONFIG_STATUS
5451 cat > $CONFIG_STATUS <<EOF
5452 #! /bin/sh
5453 # Generated automatically by configure.
5454 # Run this file to recreate the current configuration.
5455 # This directory was configured as follows,
5456 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5457 #
5458 # $0 $ac_configure_args
5459 #
5460 # Compiler output produced by configure, useful for debugging
5461 # configure, is in ./config.log if it exists.
5462
5463 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5464 for ac_option
5465 do
5466   case "\$ac_option" in
5467   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5468     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5469     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5470   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5471     echo "$CONFIG_STATUS generated by autoconf version 2.12"
5472     exit 0 ;;
5473   -help | --help | --hel | --he | --h)
5474     echo "\$ac_cs_usage"; exit 0 ;;
5475   *) echo "\$ac_cs_usage"; exit 1 ;;
5476   esac
5477 done
5478
5479 ac_given_srcdir=$srcdir
5480 ac_given_INSTALL="$INSTALL"
5481
5482 trap 'rm -fr `echo "Makefile tests/dummy client/dummy lib/dummy ubiqx/dummy
5483 web/dummy param/dummy nmbd/dummy smbd/dummy rpc_server/dummy
5484 rpc_client/dummy rpc_parse/dummy locking/dummy passdb/dummy
5485 script/dummy include/dummy codepages/dummy libsmb/dummy bin/dummy
5486 utils/dummy printing/dummy include/stamp-h include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5487 EOF
5488 cat >> $CONFIG_STATUS <<EOF
5489
5490 # Protect against being on the right side of a sed subst in config.status.
5491 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5492  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5493 $ac_vpsub
5494 $extrasub
5495 s%@CFLAGS@%$CFLAGS%g
5496 s%@CPPFLAGS@%$CPPFLAGS%g
5497 s%@CXXFLAGS@%$CXXFLAGS%g
5498 s%@DEFS@%$DEFS%g
5499 s%@LDFLAGS@%$LDFLAGS%g
5500 s%@LIBS@%$LIBS%g
5501 s%@exec_prefix@%$exec_prefix%g
5502 s%@prefix@%$prefix%g
5503 s%@program_transform_name@%$program_transform_name%g
5504 s%@bindir@%$bindir%g
5505 s%@sbindir@%$sbindir%g
5506 s%@libexecdir@%$libexecdir%g
5507 s%@datadir@%$datadir%g
5508 s%@sysconfdir@%$sysconfdir%g
5509 s%@sharedstatedir@%$sharedstatedir%g
5510 s%@localstatedir@%$localstatedir%g
5511 s%@libdir@%$libdir%g
5512 s%@includedir@%$includedir%g
5513 s%@oldincludedir@%$oldincludedir%g
5514 s%@infodir@%$infodir%g
5515 s%@mandir@%$mandir%g
5516 s%@CC@%$CC%g
5517 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5518 s%@INSTALL_DATA@%$INSTALL_DATA%g
5519 s%@SHELL@%$SHELL%g
5520 s%@AWK@%$AWK%g
5521 s%@host@%$host%g
5522 s%@host_alias@%$host_alias%g
5523 s%@host_cpu@%$host_cpu%g
5524 s%@host_vendor@%$host_vendor%g
5525 s%@host_os@%$host_os%g
5526 s%@target@%$target%g
5527 s%@target_alias@%$target_alias%g
5528 s%@target_cpu@%$target_cpu%g
5529 s%@target_vendor@%$target_vendor%g
5530 s%@target_os@%$target_os%g
5531 s%@build@%$build%g
5532 s%@build_alias@%$build_alias%g
5533 s%@build_cpu@%$build_cpu%g
5534 s%@build_vendor@%$build_vendor%g
5535 s%@build_os@%$build_os%g
5536 s%@CPP@%$CPP%g
5537 s%@LIBOBJS@%$LIBOBJS%g
5538
5539 CEOF
5540 EOF
5541
5542 cat >> $CONFIG_STATUS <<\EOF
5543
5544 # Split the substitutions into bite-sized pieces for seds with
5545 # small command number limits, like on Digital OSF/1 and HP-UX.
5546 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5547 ac_file=1 # Number of current file.
5548 ac_beg=1 # First line for current file.
5549 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5550 ac_more_lines=:
5551 ac_sed_cmds=""
5552 while $ac_more_lines; do
5553   if test $ac_beg -gt 1; then
5554     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5555   else
5556     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5557   fi
5558   if test ! -s conftest.s$ac_file; then
5559     ac_more_lines=false
5560     rm -f conftest.s$ac_file
5561   else
5562     if test -z "$ac_sed_cmds"; then
5563       ac_sed_cmds="sed -f conftest.s$ac_file"
5564     else
5565       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5566     fi
5567     ac_file=`expr $ac_file + 1`
5568     ac_beg=$ac_end
5569     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5570   fi
5571 done
5572 if test -z "$ac_sed_cmds"; then
5573   ac_sed_cmds=cat
5574 fi
5575 EOF
5576
5577 cat >> $CONFIG_STATUS <<EOF
5578
5579 CONFIG_FILES=\${CONFIG_FILES-"Makefile tests/dummy client/dummy lib/dummy ubiqx/dummy
5580 web/dummy param/dummy nmbd/dummy smbd/dummy rpc_server/dummy
5581 rpc_client/dummy rpc_parse/dummy locking/dummy passdb/dummy
5582 script/dummy include/dummy codepages/dummy libsmb/dummy bin/dummy
5583 utils/dummy printing/dummy include/stamp-h"}
5584 EOF
5585 cat >> $CONFIG_STATUS <<\EOF
5586 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5587   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5588   case "$ac_file" in
5589   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5590        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5591   *) ac_file_in="${ac_file}.in" ;;
5592   esac
5593
5594   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5595
5596   # Remove last slash and all that follows it.  Not all systems have dirname.
5597   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5598   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5599     # The file is in a subdirectory.
5600     test ! -d "$ac_dir" && mkdir "$ac_dir"
5601     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5602     # A "../" for each directory in $ac_dir_suffix.
5603     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5604   else
5605     ac_dir_suffix= ac_dots=
5606   fi
5607
5608   case "$ac_given_srcdir" in
5609   .)  srcdir=.
5610       if test -z "$ac_dots"; then top_srcdir=.
5611       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5612   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5613   *) # Relative path.
5614     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5615     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5616   esac
5617
5618   case "$ac_given_INSTALL" in
5619   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5620   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5621   esac
5622
5623   echo creating "$ac_file"
5624   rm -f "$ac_file"
5625   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5626   case "$ac_file" in
5627   *Makefile*) ac_comsub="1i\\
5628 # $configure_input" ;;
5629   *) ac_comsub= ;;
5630   esac
5631
5632   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5633   sed -e "$ac_comsub
5634 s%@configure_input@%$configure_input%g
5635 s%@srcdir@%$srcdir%g
5636 s%@top_srcdir@%$top_srcdir%g
5637 s%@INSTALL@%$INSTALL%g
5638 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5639 fi; done
5640 rm -f conftest.s*
5641
5642 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5643 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5644 #
5645 # ac_d sets the value in "#define NAME VALUE" lines.
5646 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5647 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5648 ac_dC='\3'
5649 ac_dD='%g'
5650 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5651 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5652 ac_uB='\([      ]\)%\1#\2define\3'
5653 ac_uC=' '
5654 ac_uD='\4%g'
5655 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5656 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5657 ac_eB='$%\1#\2define\3'
5658 ac_eC=' '
5659 ac_eD='%g'
5660
5661 if test "${CONFIG_HEADERS+set}" != set; then
5662 EOF
5663 cat >> $CONFIG_STATUS <<EOF
5664   CONFIG_HEADERS="include/config.h"
5665 EOF
5666 cat >> $CONFIG_STATUS <<\EOF
5667 fi
5668 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5669   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5670   case "$ac_file" in
5671   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5672        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5673   *) ac_file_in="${ac_file}.in" ;;
5674   esac
5675
5676   echo creating $ac_file
5677
5678   rm -f conftest.frag conftest.in conftest.out
5679   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5680   cat $ac_file_inputs > conftest.in
5681
5682 EOF
5683
5684 # Transform confdefs.h into a sed script conftest.vals that substitutes
5685 # the proper values into config.h.in to produce config.h.  And first:
5686 # Protect against being on the right side of a sed subst in config.status.
5687 # Protect against being in an unquoted here document in config.status.
5688 rm -f conftest.vals
5689 cat > conftest.hdr <<\EOF
5690 s/[\\&%]/\\&/g
5691 s%[\\$`]%\\&%g
5692 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5693 s%ac_d%ac_u%gp
5694 s%ac_u%ac_e%gp
5695 EOF
5696 sed -n -f conftest.hdr confdefs.h > conftest.vals
5697 rm -f conftest.hdr
5698
5699 # This sed command replaces #undef with comments.  This is necessary, for
5700 # example, in the case of _POSIX_SOURCE, which is predefined and required
5701 # on some systems where configure will not decide to define it.
5702 cat >> conftest.vals <<\EOF
5703 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5704 EOF
5705
5706 # Break up conftest.vals because some shells have a limit on
5707 # the size of here documents, and old seds have small limits too.
5708
5709 rm -f conftest.tail
5710 while :
5711 do
5712   ac_lines=`grep -c . conftest.vals`
5713   # grep -c gives empty output for an empty file on some AIX systems.
5714   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5715   # Write a limited-size here document to conftest.frag.
5716   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5717   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5718   echo 'CEOF
5719   sed -f conftest.frag conftest.in > conftest.out
5720   rm -f conftest.in
5721   mv conftest.out conftest.in
5722 ' >> $CONFIG_STATUS
5723   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5724   rm -f conftest.vals
5725   mv conftest.tail conftest.vals
5726 done
5727 rm -f conftest.vals
5728
5729 cat >> $CONFIG_STATUS <<\EOF
5730   rm -f conftest.frag conftest.h
5731   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5732   cat conftest.in >> conftest.h
5733   rm -f conftest.in
5734   if cmp -s $ac_file conftest.h 2>/dev/null; then
5735     echo "$ac_file is unchanged"
5736     rm -f conftest.h
5737   else
5738     # Remove last slash and all that follows it.  Not all systems have dirname.
5739       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5740       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5741       # The file is in a subdirectory.
5742       test ! -d "$ac_dir" && mkdir "$ac_dir"
5743     fi
5744     rm -f $ac_file
5745     mv conftest.h $ac_file
5746   fi
5747 fi; done
5748
5749 EOF
5750 cat >> $CONFIG_STATUS <<EOF
5751
5752 EOF
5753 cat >> $CONFIG_STATUS <<\EOF
5754
5755 exit 0
5756 EOF
5757 chmod +x $CONFIG_STATUS
5758 rm -fr confdefs* $ac_clean_files
5759 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5760