More 64 bit stuff - now the fcntl locks are 64 bit clean.
[samba.git] / source / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --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 echo $ac_n "checking for inline""... $ac_c" 1>&6
970 echo "configure:971: checking for inline" >&5
971 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
972   echo $ac_n "(cached) $ac_c" 1>&6
973 else
974   ac_cv_c_inline=no
975 for ac_kw in inline __inline__ __inline; do
976   cat > conftest.$ac_ext <<EOF
977 #line 978 "configure"
978 #include "confdefs.h"
979
980 int main() {
981 } $ac_kw foo() {
982 ; return 0; }
983 EOF
984 if { (eval echo configure:985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
985   rm -rf conftest*
986   ac_cv_c_inline=$ac_kw; break
987 else
988   echo "configure: failed program was:" >&5
989   cat conftest.$ac_ext >&5
990 fi
991 rm -f conftest*
992 done
993
994 fi
995
996 echo "$ac_t""$ac_cv_c_inline" 1>&6
997 case "$ac_cv_c_inline" in
998   inline | yes) ;;
999   no) cat >> confdefs.h <<\EOF
1000 #define inline 
1001 EOF
1002  ;;
1003   *)  cat >> confdefs.h <<EOF
1004 #define inline $ac_cv_c_inline
1005 EOF
1006  ;;
1007 esac
1008
1009 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1010 echo "configure:1011: checking how to run the C preprocessor" >&5
1011 # On Suns, sometimes $CPP names a directory.
1012 if test -n "$CPP" && test -d "$CPP"; then
1013   CPP=
1014 fi
1015 if test -z "$CPP"; then
1016 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1017   echo $ac_n "(cached) $ac_c" 1>&6
1018 else
1019     # This must be in double quotes, not single quotes, because CPP may get
1020   # substituted into the Makefile and "${CC-cc}" will confuse make.
1021   CPP="${CC-cc} -E"
1022   # On the NeXT, cc -E runs the code through the compiler's parser,
1023   # not just through cpp.
1024   cat > conftest.$ac_ext <<EOF
1025 #line 1026 "configure"
1026 #include "confdefs.h"
1027 #include <assert.h>
1028 Syntax Error
1029 EOF
1030 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1031 { (eval echo configure:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1032 ac_err=`grep -v '^ *+' conftest.out`
1033 if test -z "$ac_err"; then
1034   :
1035 else
1036   echo "$ac_err" >&5
1037   echo "configure: failed program was:" >&5
1038   cat conftest.$ac_ext >&5
1039   rm -rf conftest*
1040   CPP="${CC-cc} -E -traditional-cpp"
1041   cat > conftest.$ac_ext <<EOF
1042 #line 1043 "configure"
1043 #include "confdefs.h"
1044 #include <assert.h>
1045 Syntax Error
1046 EOF
1047 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1048 { (eval echo configure:1049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1049 ac_err=`grep -v '^ *+' conftest.out`
1050 if test -z "$ac_err"; then
1051   :
1052 else
1053   echo "$ac_err" >&5
1054   echo "configure: failed program was:" >&5
1055   cat conftest.$ac_ext >&5
1056   rm -rf conftest*
1057   CPP=/lib/cpp
1058 fi
1059 rm -f conftest*
1060 fi
1061 rm -f conftest*
1062   ac_cv_prog_CPP="$CPP"
1063 fi
1064   CPP="$ac_cv_prog_CPP"
1065 else
1066   ac_cv_prog_CPP="$CPP"
1067 fi
1068 echo "$ac_t""$CPP" 1>&6
1069
1070 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1071 echo "configure:1072: checking for ANSI C header files" >&5
1072 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1073   echo $ac_n "(cached) $ac_c" 1>&6
1074 else
1075   cat > conftest.$ac_ext <<EOF
1076 #line 1077 "configure"
1077 #include "confdefs.h"
1078 #include <stdlib.h>
1079 #include <stdarg.h>
1080 #include <string.h>
1081 #include <float.h>
1082 EOF
1083 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1084 { (eval echo configure:1085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1085 ac_err=`grep -v '^ *+' conftest.out`
1086 if test -z "$ac_err"; then
1087   rm -rf conftest*
1088   ac_cv_header_stdc=yes
1089 else
1090   echo "$ac_err" >&5
1091   echo "configure: failed program was:" >&5
1092   cat conftest.$ac_ext >&5
1093   rm -rf conftest*
1094   ac_cv_header_stdc=no
1095 fi
1096 rm -f conftest*
1097
1098 if test $ac_cv_header_stdc = yes; then
1099   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1100 cat > conftest.$ac_ext <<EOF
1101 #line 1102 "configure"
1102 #include "confdefs.h"
1103 #include <string.h>
1104 EOF
1105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1106   egrep "memchr" >/dev/null 2>&1; then
1107   :
1108 else
1109   rm -rf conftest*
1110   ac_cv_header_stdc=no
1111 fi
1112 rm -f conftest*
1113
1114 fi
1115
1116 if test $ac_cv_header_stdc = yes; then
1117   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1118 cat > conftest.$ac_ext <<EOF
1119 #line 1120 "configure"
1120 #include "confdefs.h"
1121 #include <stdlib.h>
1122 EOF
1123 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1124   egrep "free" >/dev/null 2>&1; then
1125   :
1126 else
1127   rm -rf conftest*
1128   ac_cv_header_stdc=no
1129 fi
1130 rm -f conftest*
1131
1132 fi
1133
1134 if test $ac_cv_header_stdc = yes; then
1135   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1136 if test "$cross_compiling" = yes; then
1137   :
1138 else
1139   cat > conftest.$ac_ext <<EOF
1140 #line 1141 "configure"
1141 #include "confdefs.h"
1142 #include <ctype.h>
1143 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1144 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1145 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1146 int main () { int i; for (i = 0; i < 256; i++)
1147 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1148 exit (0); }
1149
1150 EOF
1151 if { (eval echo configure:1152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1152 then
1153   :
1154 else
1155   echo "configure: failed program was:" >&5
1156   cat conftest.$ac_ext >&5
1157   rm -fr conftest*
1158   ac_cv_header_stdc=no
1159 fi
1160 rm -fr conftest*
1161 fi
1162
1163 fi
1164 fi
1165
1166 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1167 if test $ac_cv_header_stdc = yes; then
1168   cat >> confdefs.h <<\EOF
1169 #define STDC_HEADERS 1
1170 EOF
1171
1172 fi
1173
1174 ac_header_dirent=no
1175 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1176 do
1177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1178 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1179 echo "configure:1180: checking for $ac_hdr that defines DIR" >&5
1180 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1181   echo $ac_n "(cached) $ac_c" 1>&6
1182 else
1183   cat > conftest.$ac_ext <<EOF
1184 #line 1185 "configure"
1185 #include "confdefs.h"
1186 #include <sys/types.h>
1187 #include <$ac_hdr>
1188 int main() {
1189 DIR *dirp = 0;
1190 ; return 0; }
1191 EOF
1192 if { (eval echo configure:1193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1193   rm -rf conftest*
1194   eval "ac_cv_header_dirent_$ac_safe=yes"
1195 else
1196   echo "configure: failed program was:" >&5
1197   cat conftest.$ac_ext >&5
1198   rm -rf conftest*
1199   eval "ac_cv_header_dirent_$ac_safe=no"
1200 fi
1201 rm -f conftest*
1202 fi
1203 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1204   echo "$ac_t""yes" 1>&6
1205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1206   cat >> confdefs.h <<EOF
1207 #define $ac_tr_hdr 1
1208 EOF
1209  ac_header_dirent=$ac_hdr; break
1210 else
1211   echo "$ac_t""no" 1>&6
1212 fi
1213 done
1214 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1215 if test $ac_header_dirent = dirent.h; then
1216 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1217 echo "configure:1218: checking for opendir in -ldir" >&5
1218 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1219 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1220   echo $ac_n "(cached) $ac_c" 1>&6
1221 else
1222   ac_save_LIBS="$LIBS"
1223 LIBS="-ldir  $LIBS"
1224 cat > conftest.$ac_ext <<EOF
1225 #line 1226 "configure"
1226 #include "confdefs.h"
1227 /* Override any gcc2 internal prototype to avoid an error.  */
1228 /* We use char because int might match the return type of a gcc2
1229     builtin and then its argument prototype would still apply.  */
1230 char opendir();
1231
1232 int main() {
1233 opendir()
1234 ; return 0; }
1235 EOF
1236 if { (eval echo configure:1237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1237   rm -rf conftest*
1238   eval "ac_cv_lib_$ac_lib_var=yes"
1239 else
1240   echo "configure: failed program was:" >&5
1241   cat conftest.$ac_ext >&5
1242   rm -rf conftest*
1243   eval "ac_cv_lib_$ac_lib_var=no"
1244 fi
1245 rm -f conftest*
1246 LIBS="$ac_save_LIBS"
1247
1248 fi
1249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1250   echo "$ac_t""yes" 1>&6
1251   LIBS="$LIBS -ldir"
1252 else
1253   echo "$ac_t""no" 1>&6
1254 fi
1255
1256 else
1257 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1258 echo "configure:1259: checking for opendir in -lx" >&5
1259 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1260 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1261   echo $ac_n "(cached) $ac_c" 1>&6
1262 else
1263   ac_save_LIBS="$LIBS"
1264 LIBS="-lx  $LIBS"
1265 cat > conftest.$ac_ext <<EOF
1266 #line 1267 "configure"
1267 #include "confdefs.h"
1268 /* Override any gcc2 internal prototype to avoid an error.  */
1269 /* We use char because int might match the return type of a gcc2
1270     builtin and then its argument prototype would still apply.  */
1271 char opendir();
1272
1273 int main() {
1274 opendir()
1275 ; return 0; }
1276 EOF
1277 if { (eval echo configure:1278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1278   rm -rf conftest*
1279   eval "ac_cv_lib_$ac_lib_var=yes"
1280 else
1281   echo "configure: failed program was:" >&5
1282   cat conftest.$ac_ext >&5
1283   rm -rf conftest*
1284   eval "ac_cv_lib_$ac_lib_var=no"
1285 fi
1286 rm -f conftest*
1287 LIBS="$ac_save_LIBS"
1288
1289 fi
1290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1291   echo "$ac_t""yes" 1>&6
1292   LIBS="$LIBS -lx"
1293 else
1294   echo "$ac_t""no" 1>&6
1295 fi
1296
1297 fi
1298
1299 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1300 echo "configure:1301: checking whether time.h and sys/time.h may both be included" >&5
1301 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1302   echo $ac_n "(cached) $ac_c" 1>&6
1303 else
1304   cat > conftest.$ac_ext <<EOF
1305 #line 1306 "configure"
1306 #include "confdefs.h"
1307 #include <sys/types.h>
1308 #include <sys/time.h>
1309 #include <time.h>
1310 int main() {
1311 struct tm *tp;
1312 ; return 0; }
1313 EOF
1314 if { (eval echo configure:1315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1315   rm -rf conftest*
1316   ac_cv_header_time=yes
1317 else
1318   echo "configure: failed program was:" >&5
1319   cat conftest.$ac_ext >&5
1320   rm -rf conftest*
1321   ac_cv_header_time=no
1322 fi
1323 rm -f conftest*
1324 fi
1325
1326 echo "$ac_t""$ac_cv_header_time" 1>&6
1327 if test $ac_cv_header_time = yes; then
1328   cat >> confdefs.h <<\EOF
1329 #define TIME_WITH_SYS_TIME 1
1330 EOF
1331
1332 fi
1333
1334 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1335 echo "configure:1336: checking for sys/wait.h that is POSIX.1 compatible" >&5
1336 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1337   echo $ac_n "(cached) $ac_c" 1>&6
1338 else
1339   cat > conftest.$ac_ext <<EOF
1340 #line 1341 "configure"
1341 #include "confdefs.h"
1342 #include <sys/types.h>
1343 #include <sys/wait.h>
1344 #ifndef WEXITSTATUS
1345 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1346 #endif
1347 #ifndef WIFEXITED
1348 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1349 #endif
1350 int main() {
1351 int s;
1352 wait (&s);
1353 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1354 ; return 0; }
1355 EOF
1356 if { (eval echo configure:1357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1357   rm -rf conftest*
1358   ac_cv_header_sys_wait_h=yes
1359 else
1360   echo "configure: failed program was:" >&5
1361   cat conftest.$ac_ext >&5
1362   rm -rf conftest*
1363   ac_cv_header_sys_wait_h=no
1364 fi
1365 rm -f conftest*
1366 fi
1367
1368 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1369 if test $ac_cv_header_sys_wait_h = yes; then
1370   cat >> confdefs.h <<\EOF
1371 #define HAVE_SYS_WAIT_H 1
1372 EOF
1373
1374 fi
1375
1376 for ac_hdr in sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1377 do
1378 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1379 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1380 echo "configure:1381: checking for $ac_hdr" >&5
1381 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1382   echo $ac_n "(cached) $ac_c" 1>&6
1383 else
1384   cat > conftest.$ac_ext <<EOF
1385 #line 1386 "configure"
1386 #include "confdefs.h"
1387 #include <$ac_hdr>
1388 EOF
1389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1390 { (eval echo configure:1391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1391 ac_err=`grep -v '^ *+' conftest.out`
1392 if test -z "$ac_err"; then
1393   rm -rf conftest*
1394   eval "ac_cv_header_$ac_safe=yes"
1395 else
1396   echo "$ac_err" >&5
1397   echo "configure: failed program was:" >&5
1398   cat conftest.$ac_ext >&5
1399   rm -rf conftest*
1400   eval "ac_cv_header_$ac_safe=no"
1401 fi
1402 rm -f conftest*
1403 fi
1404 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1405   echo "$ac_t""yes" 1>&6
1406     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1407   cat >> confdefs.h <<EOF
1408 #define $ac_tr_hdr 1
1409 EOF
1410  
1411 else
1412   echo "$ac_t""no" 1>&6
1413 fi
1414 done
1415
1416 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1417 do
1418 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1419 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1420 echo "configure:1421: checking for $ac_hdr" >&5
1421 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1422   echo $ac_n "(cached) $ac_c" 1>&6
1423 else
1424   cat > conftest.$ac_ext <<EOF
1425 #line 1426 "configure"
1426 #include "confdefs.h"
1427 #include <$ac_hdr>
1428 EOF
1429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1430 { (eval echo configure:1431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1431 ac_err=`grep -v '^ *+' conftest.out`
1432 if test -z "$ac_err"; then
1433   rm -rf conftest*
1434   eval "ac_cv_header_$ac_safe=yes"
1435 else
1436   echo "$ac_err" >&5
1437   echo "configure: failed program was:" >&5
1438   cat conftest.$ac_ext >&5
1439   rm -rf conftest*
1440   eval "ac_cv_header_$ac_safe=no"
1441 fi
1442 rm -f conftest*
1443 fi
1444 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1445   echo "$ac_t""yes" 1>&6
1446     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1447   cat >> confdefs.h <<EOF
1448 #define $ac_tr_hdr 1
1449 EOF
1450  
1451 else
1452   echo "$ac_t""no" 1>&6
1453 fi
1454 done
1455
1456 for ac_hdr in compat.h rpc/types.h rpc/xdr.h rpc/auth.h rpc/clnt.h
1457 do
1458 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1459 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1460 echo "configure:1461: checking for $ac_hdr" >&5
1461 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1462   echo $ac_n "(cached) $ac_c" 1>&6
1463 else
1464   cat > conftest.$ac_ext <<EOF
1465 #line 1466 "configure"
1466 #include "confdefs.h"
1467 #include <$ac_hdr>
1468 EOF
1469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1470 { (eval echo configure:1471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1471 ac_err=`grep -v '^ *+' conftest.out`
1472 if test -z "$ac_err"; then
1473   rm -rf conftest*
1474   eval "ac_cv_header_$ac_safe=yes"
1475 else
1476   echo "$ac_err" >&5
1477   echo "configure: failed program was:" >&5
1478   cat conftest.$ac_ext >&5
1479   rm -rf conftest*
1480   eval "ac_cv_header_$ac_safe=no"
1481 fi
1482 rm -f conftest*
1483 fi
1484 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1485   echo "$ac_t""yes" 1>&6
1486     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1487   cat >> confdefs.h <<EOF
1488 #define $ac_tr_hdr 1
1489 EOF
1490  
1491 else
1492   echo "$ac_t""no" 1>&6
1493 fi
1494 done
1495
1496 for ac_hdr in rpcsvc/yp_prot.h rpcsvc/ypclnt.h sys/param.h ctype.h 
1497 do
1498 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1499 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1500 echo "configure:1501: checking for $ac_hdr" >&5
1501 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1502   echo $ac_n "(cached) $ac_c" 1>&6
1503 else
1504   cat > conftest.$ac_ext <<EOF
1505 #line 1506 "configure"
1506 #include "confdefs.h"
1507 #include <$ac_hdr>
1508 EOF
1509 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1510 { (eval echo configure:1511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1511 ac_err=`grep -v '^ *+' conftest.out`
1512 if test -z "$ac_err"; then
1513   rm -rf conftest*
1514   eval "ac_cv_header_$ac_safe=yes"
1515 else
1516   echo "$ac_err" >&5
1517   echo "configure: failed program was:" >&5
1518   cat conftest.$ac_ext >&5
1519   rm -rf conftest*
1520   eval "ac_cv_header_$ac_safe=no"
1521 fi
1522 rm -f conftest*
1523 fi
1524 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1525   echo "$ac_t""yes" 1>&6
1526     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1527   cat >> confdefs.h <<EOF
1528 #define $ac_tr_hdr 1
1529 EOF
1530  
1531 else
1532   echo "$ac_t""no" 1>&6
1533 fi
1534 done
1535
1536 for ac_hdr in sys/wait.h sys/resource.h sys/ioctl.h sys/mode.h
1537 do
1538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1540 echo "configure:1541: checking for $ac_hdr" >&5
1541 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1542   echo $ac_n "(cached) $ac_c" 1>&6
1543 else
1544   cat > conftest.$ac_ext <<EOF
1545 #line 1546 "configure"
1546 #include "confdefs.h"
1547 #include <$ac_hdr>
1548 EOF
1549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1550 { (eval echo configure:1551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1551 ac_err=`grep -v '^ *+' conftest.out`
1552 if test -z "$ac_err"; then
1553   rm -rf conftest*
1554   eval "ac_cv_header_$ac_safe=yes"
1555 else
1556   echo "$ac_err" >&5
1557   echo "configure: failed program was:" >&5
1558   cat conftest.$ac_ext >&5
1559   rm -rf conftest*
1560   eval "ac_cv_header_$ac_safe=no"
1561 fi
1562 rm -f conftest*
1563 fi
1564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1565   echo "$ac_t""yes" 1>&6
1566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1567   cat >> confdefs.h <<EOF
1568 #define $ac_tr_hdr 1
1569 EOF
1570  
1571 else
1572   echo "$ac_t""no" 1>&6
1573 fi
1574 done
1575
1576 for ac_hdr in sys/filio.h string.h strings.h stdlib.h sys/socket.h
1577 do
1578 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1579 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1580 echo "configure:1581: checking for $ac_hdr" >&5
1581 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1582   echo $ac_n "(cached) $ac_c" 1>&6
1583 else
1584   cat > conftest.$ac_ext <<EOF
1585 #line 1586 "configure"
1586 #include "confdefs.h"
1587 #include <$ac_hdr>
1588 EOF
1589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1590 { (eval echo configure:1591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1591 ac_err=`grep -v '^ *+' conftest.out`
1592 if test -z "$ac_err"; then
1593   rm -rf conftest*
1594   eval "ac_cv_header_$ac_safe=yes"
1595 else
1596   echo "$ac_err" >&5
1597   echo "configure: failed program was:" >&5
1598   cat conftest.$ac_ext >&5
1599   rm -rf conftest*
1600   eval "ac_cv_header_$ac_safe=no"
1601 fi
1602 rm -f conftest*
1603 fi
1604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1605   echo "$ac_t""yes" 1>&6
1606     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1607   cat >> confdefs.h <<EOF
1608 #define $ac_tr_hdr 1
1609 EOF
1610  
1611 else
1612   echo "$ac_t""no" 1>&6
1613 fi
1614 done
1615
1616 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h
1617 do
1618 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1619 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1620 echo "configure:1621: checking for $ac_hdr" >&5
1621 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1622   echo $ac_n "(cached) $ac_c" 1>&6
1623 else
1624   cat > conftest.$ac_ext <<EOF
1625 #line 1626 "configure"
1626 #include "confdefs.h"
1627 #include <$ac_hdr>
1628 EOF
1629 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1630 { (eval echo configure:1631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1631 ac_err=`grep -v '^ *+' conftest.out`
1632 if test -z "$ac_err"; then
1633   rm -rf conftest*
1634   eval "ac_cv_header_$ac_safe=yes"
1635 else
1636   echo "$ac_err" >&5
1637   echo "configure: failed program was:" >&5
1638   cat conftest.$ac_ext >&5
1639   rm -rf conftest*
1640   eval "ac_cv_header_$ac_safe=no"
1641 fi
1642 rm -f conftest*
1643 fi
1644 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1645   echo "$ac_t""yes" 1>&6
1646     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1647   cat >> confdefs.h <<EOF
1648 #define $ac_tr_hdr 1
1649 EOF
1650  
1651 else
1652   echo "$ac_t""no" 1>&6
1653 fi
1654 done
1655
1656 for ac_hdr in sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
1657 do
1658 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1659 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1660 echo "configure:1661: checking for $ac_hdr" >&5
1661 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1662   echo $ac_n "(cached) $ac_c" 1>&6
1663 else
1664   cat > conftest.$ac_ext <<EOF
1665 #line 1666 "configure"
1666 #include "confdefs.h"
1667 #include <$ac_hdr>
1668 EOF
1669 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1670 { (eval echo configure:1671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1671 ac_err=`grep -v '^ *+' conftest.out`
1672 if test -z "$ac_err"; then
1673   rm -rf conftest*
1674   eval "ac_cv_header_$ac_safe=yes"
1675 else
1676   echo "$ac_err" >&5
1677   echo "configure: failed program was:" >&5
1678   cat conftest.$ac_ext >&5
1679   rm -rf conftest*
1680   eval "ac_cv_header_$ac_safe=no"
1681 fi
1682 rm -f conftest*
1683 fi
1684 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1685   echo "$ac_t""yes" 1>&6
1686     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1687   cat >> confdefs.h <<EOF
1688 #define $ac_tr_hdr 1
1689 EOF
1690  
1691 else
1692   echo "$ac_t""no" 1>&6
1693 fi
1694 done
1695
1696 for ac_hdr in shadow.h netinet/tcp.h sys/security.h security/pam_appl.h
1697 do
1698 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1699 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1700 echo "configure:1701: checking for $ac_hdr" >&5
1701 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1702   echo $ac_n "(cached) $ac_c" 1>&6
1703 else
1704   cat > conftest.$ac_ext <<EOF
1705 #line 1706 "configure"
1706 #include "confdefs.h"
1707 #include <$ac_hdr>
1708 EOF
1709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1710 { (eval echo configure:1711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1711 ac_err=`grep -v '^ *+' conftest.out`
1712 if test -z "$ac_err"; then
1713   rm -rf conftest*
1714   eval "ac_cv_header_$ac_safe=yes"
1715 else
1716   echo "$ac_err" >&5
1717   echo "configure: failed program was:" >&5
1718   cat conftest.$ac_ext >&5
1719   rm -rf conftest*
1720   eval "ac_cv_header_$ac_safe=no"
1721 fi
1722 rm -f conftest*
1723 fi
1724 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1725   echo "$ac_t""yes" 1>&6
1726     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1727   cat >> confdefs.h <<EOF
1728 #define $ac_tr_hdr 1
1729 EOF
1730  
1731 else
1732   echo "$ac_t""no" 1>&6
1733 fi
1734 done
1735
1736 for ac_hdr in stropts.h poll.h
1737 do
1738 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1739 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1740 echo "configure:1741: checking for $ac_hdr" >&5
1741 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1742   echo $ac_n "(cached) $ac_c" 1>&6
1743 else
1744   cat > conftest.$ac_ext <<EOF
1745 #line 1746 "configure"
1746 #include "confdefs.h"
1747 #include <$ac_hdr>
1748 EOF
1749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1750 { (eval echo configure:1751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1751 ac_err=`grep -v '^ *+' conftest.out`
1752 if test -z "$ac_err"; then
1753   rm -rf conftest*
1754   eval "ac_cv_header_$ac_safe=yes"
1755 else
1756   echo "$ac_err" >&5
1757   echo "configure: failed program was:" >&5
1758   cat conftest.$ac_ext >&5
1759   rm -rf conftest*
1760   eval "ac_cv_header_$ac_safe=no"
1761 fi
1762 rm -f conftest*
1763 fi
1764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1765   echo "$ac_t""yes" 1>&6
1766     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1767   cat >> confdefs.h <<EOF
1768 #define $ac_tr_hdr 1
1769 EOF
1770  
1771 else
1772   echo "$ac_t""no" 1>&6
1773 fi
1774 done
1775
1776
1777 echo $ac_n "checking size of int""... $ac_c" 1>&6
1778 echo "configure:1779: checking size of int" >&5
1779 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1780   echo $ac_n "(cached) $ac_c" 1>&6
1781 else
1782   if test "$cross_compiling" = yes; then
1783     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1784 else
1785   cat > conftest.$ac_ext <<EOF
1786 #line 1787 "configure"
1787 #include "confdefs.h"
1788 #include <stdio.h>
1789 main()
1790 {
1791   FILE *f=fopen("conftestval", "w");
1792   if (!f) exit(1);
1793   fprintf(f, "%d\n", sizeof(int));
1794   exit(0);
1795 }
1796 EOF
1797 if { (eval echo configure:1798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1798 then
1799   ac_cv_sizeof_int=`cat conftestval`
1800 else
1801   echo "configure: failed program was:" >&5
1802   cat conftest.$ac_ext >&5
1803   rm -fr conftest*
1804   ac_cv_sizeof_int=0
1805 fi
1806 rm -fr conftest*
1807 fi
1808
1809 fi
1810 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1811 cat >> confdefs.h <<EOF
1812 #define SIZEOF_INT $ac_cv_sizeof_int
1813 EOF
1814
1815
1816 echo $ac_n "checking size of long""... $ac_c" 1>&6
1817 echo "configure:1818: checking size of long" >&5
1818 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1819   echo $ac_n "(cached) $ac_c" 1>&6
1820 else
1821   if test "$cross_compiling" = yes; then
1822     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1823 else
1824   cat > conftest.$ac_ext <<EOF
1825 #line 1826 "configure"
1826 #include "confdefs.h"
1827 #include <stdio.h>
1828 main()
1829 {
1830   FILE *f=fopen("conftestval", "w");
1831   if (!f) exit(1);
1832   fprintf(f, "%d\n", sizeof(long));
1833   exit(0);
1834 }
1835 EOF
1836 if { (eval echo configure:1837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1837 then
1838   ac_cv_sizeof_long=`cat conftestval`
1839 else
1840   echo "configure: failed program was:" >&5
1841   cat conftest.$ac_ext >&5
1842   rm -fr conftest*
1843   ac_cv_sizeof_long=0
1844 fi
1845 rm -fr conftest*
1846 fi
1847
1848 fi
1849 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1850 cat >> confdefs.h <<EOF
1851 #define SIZEOF_LONG $ac_cv_sizeof_long
1852 EOF
1853
1854
1855 echo $ac_n "checking size of short""... $ac_c" 1>&6
1856 echo "configure:1857: checking size of short" >&5
1857 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1858   echo $ac_n "(cached) $ac_c" 1>&6
1859 else
1860   if test "$cross_compiling" = yes; then
1861     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1862 else
1863   cat > conftest.$ac_ext <<EOF
1864 #line 1865 "configure"
1865 #include "confdefs.h"
1866 #include <stdio.h>
1867 main()
1868 {
1869   FILE *f=fopen("conftestval", "w");
1870   if (!f) exit(1);
1871   fprintf(f, "%d\n", sizeof(short));
1872   exit(0);
1873 }
1874 EOF
1875 if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1876 then
1877   ac_cv_sizeof_short=`cat conftestval`
1878 else
1879   echo "configure: failed program was:" >&5
1880   cat conftest.$ac_ext >&5
1881   rm -fr conftest*
1882   ac_cv_sizeof_short=0
1883 fi
1884 rm -fr conftest*
1885 fi
1886
1887 fi
1888 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1889 cat >> confdefs.h <<EOF
1890 #define SIZEOF_SHORT $ac_cv_sizeof_short
1891 EOF
1892
1893
1894
1895 echo $ac_n "checking for working const""... $ac_c" 1>&6
1896 echo "configure:1897: checking for working const" >&5
1897 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1898   echo $ac_n "(cached) $ac_c" 1>&6
1899 else
1900   cat > conftest.$ac_ext <<EOF
1901 #line 1902 "configure"
1902 #include "confdefs.h"
1903
1904 int main() {
1905
1906 /* Ultrix mips cc rejects this.  */
1907 typedef int charset[2]; const charset x;
1908 /* SunOS 4.1.1 cc rejects this.  */
1909 char const *const *ccp;
1910 char **p;
1911 /* NEC SVR4.0.2 mips cc rejects this.  */
1912 struct point {int x, y;};
1913 static struct point const zero = {0,0};
1914 /* AIX XL C 1.02.0.0 rejects this.
1915    It does not let you subtract one const X* pointer from another in an arm
1916    of an if-expression whose if-part is not a constant expression */
1917 const char *g = "string";
1918 ccp = &g + (g ? g-g : 0);
1919 /* HPUX 7.0 cc rejects these. */
1920 ++ccp;
1921 p = (char**) ccp;
1922 ccp = (char const *const *) p;
1923 { /* SCO 3.2v4 cc rejects this.  */
1924   char *t;
1925   char const *s = 0 ? (char *) 0 : (char const *) 0;
1926
1927   *t++ = 0;
1928 }
1929 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1930   int x[] = {25, 17};
1931   const int *foo = &x[0];
1932   ++foo;
1933 }
1934 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1935   typedef const int *iptr;
1936   iptr p = 0;
1937   ++p;
1938 }
1939 { /* AIX XL C 1.02.0.0 rejects this saying
1940      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1941   struct s { int j; const int *ap[3]; };
1942   struct s *b; b->j = 5;
1943 }
1944 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1945   const int foo = 10;
1946 }
1947
1948 ; return 0; }
1949 EOF
1950 if { (eval echo configure:1951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1951   rm -rf conftest*
1952   ac_cv_c_const=yes
1953 else
1954   echo "configure: failed program was:" >&5
1955   cat conftest.$ac_ext >&5
1956   rm -rf conftest*
1957   ac_cv_c_const=no
1958 fi
1959 rm -f conftest*
1960 fi
1961
1962 echo "$ac_t""$ac_cv_c_const" 1>&6
1963 if test $ac_cv_c_const = no; then
1964   cat >> confdefs.h <<\EOF
1965 #define const 
1966 EOF
1967
1968 fi
1969
1970 echo $ac_n "checking for inline""... $ac_c" 1>&6
1971 echo "configure:1972: checking for inline" >&5
1972 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1973   echo $ac_n "(cached) $ac_c" 1>&6
1974 else
1975   ac_cv_c_inline=no
1976 for ac_kw in inline __inline__ __inline; do
1977   cat > conftest.$ac_ext <<EOF
1978 #line 1979 "configure"
1979 #include "confdefs.h"
1980
1981 int main() {
1982 } $ac_kw foo() {
1983 ; return 0; }
1984 EOF
1985 if { (eval echo configure:1986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1986   rm -rf conftest*
1987   ac_cv_c_inline=$ac_kw; break
1988 else
1989   echo "configure: failed program was:" >&5
1990   cat conftest.$ac_ext >&5
1991 fi
1992 rm -f conftest*
1993 done
1994
1995 fi
1996
1997 echo "$ac_t""$ac_cv_c_inline" 1>&6
1998 case "$ac_cv_c_inline" in
1999   inline | yes) ;;
2000   no) cat >> confdefs.h <<\EOF
2001 #define inline 
2002 EOF
2003  ;;
2004   *)  cat >> confdefs.h <<EOF
2005 #define inline $ac_cv_c_inline
2006 EOF
2007  ;;
2008 esac
2009
2010 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2011 echo "configure:2012: checking whether byte ordering is bigendian" >&5
2012 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2013   echo $ac_n "(cached) $ac_c" 1>&6
2014 else
2015   ac_cv_c_bigendian=unknown
2016 # See if sys/param.h defines the BYTE_ORDER macro.
2017 cat > conftest.$ac_ext <<EOF
2018 #line 2019 "configure"
2019 #include "confdefs.h"
2020 #include <sys/types.h>
2021 #include <sys/param.h>
2022 int main() {
2023
2024 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2025  bogus endian macros
2026 #endif
2027 ; return 0; }
2028 EOF
2029 if { (eval echo configure:2030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2030   rm -rf conftest*
2031   # It does; now see whether it defined to BIG_ENDIAN or not.
2032 cat > conftest.$ac_ext <<EOF
2033 #line 2034 "configure"
2034 #include "confdefs.h"
2035 #include <sys/types.h>
2036 #include <sys/param.h>
2037 int main() {
2038
2039 #if BYTE_ORDER != BIG_ENDIAN
2040  not big endian
2041 #endif
2042 ; return 0; }
2043 EOF
2044 if { (eval echo configure:2045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2045   rm -rf conftest*
2046   ac_cv_c_bigendian=yes
2047 else
2048   echo "configure: failed program was:" >&5
2049   cat conftest.$ac_ext >&5
2050   rm -rf conftest*
2051   ac_cv_c_bigendian=no
2052 fi
2053 rm -f conftest*
2054 else
2055   echo "configure: failed program was:" >&5
2056   cat conftest.$ac_ext >&5
2057 fi
2058 rm -f conftest*
2059 if test $ac_cv_c_bigendian = unknown; then
2060 if test "$cross_compiling" = yes; then
2061     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2062 else
2063   cat > conftest.$ac_ext <<EOF
2064 #line 2065 "configure"
2065 #include "confdefs.h"
2066 main () {
2067   /* Are we little or big endian?  From Harbison&Steele.  */
2068   union
2069   {
2070     long l;
2071     char c[sizeof (long)];
2072   } u;
2073   u.l = 1;
2074   exit (u.c[sizeof (long) - 1] == 1);
2075 }
2076 EOF
2077 if { (eval echo configure:2078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2078 then
2079   ac_cv_c_bigendian=no
2080 else
2081   echo "configure: failed program was:" >&5
2082   cat conftest.$ac_ext >&5
2083   rm -fr conftest*
2084   ac_cv_c_bigendian=yes
2085 fi
2086 rm -fr conftest*
2087 fi
2088
2089 fi
2090 fi
2091
2092 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2093 if test $ac_cv_c_bigendian = yes; then
2094   cat >> confdefs.h <<\EOF
2095 #define WORDS_BIGENDIAN 1
2096 EOF
2097
2098 fi
2099
2100 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2101 echo "configure:2102: checking whether char is unsigned" >&5
2102 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2103   echo $ac_n "(cached) $ac_c" 1>&6
2104 else
2105   if test "$GCC" = yes; then
2106   # GCC predefines this symbol on systems where it applies.
2107 cat > conftest.$ac_ext <<EOF
2108 #line 2109 "configure"
2109 #include "confdefs.h"
2110 #ifdef __CHAR_UNSIGNED__
2111   yes
2112 #endif
2113
2114 EOF
2115 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2116   egrep "yes" >/dev/null 2>&1; then
2117   rm -rf conftest*
2118   ac_cv_c_char_unsigned=yes
2119 else
2120   rm -rf conftest*
2121   ac_cv_c_char_unsigned=no
2122 fi
2123 rm -f conftest*
2124
2125 else
2126 if test "$cross_compiling" = yes; then
2127     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2128 else
2129   cat > conftest.$ac_ext <<EOF
2130 #line 2131 "configure"
2131 #include "confdefs.h"
2132 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2133 #if !defined(__STDC__) || __STDC__ != 1
2134 #define volatile
2135 #endif
2136 main() {
2137   volatile char c = 255; exit(c < 0);
2138 }
2139 EOF
2140 if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2141 then
2142   ac_cv_c_char_unsigned=yes
2143 else
2144   echo "configure: failed program was:" >&5
2145   cat conftest.$ac_ext >&5
2146   rm -fr conftest*
2147   ac_cv_c_char_unsigned=no
2148 fi
2149 rm -fr conftest*
2150 fi
2151
2152 fi
2153 fi
2154
2155 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2156 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2157   cat >> confdefs.h <<\EOF
2158 #define __CHAR_UNSIGNED__ 1
2159 EOF
2160
2161 fi
2162
2163
2164 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2165 echo "configure:2166: checking return type of signal handlers" >&5
2166 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2167   echo $ac_n "(cached) $ac_c" 1>&6
2168 else
2169   cat > conftest.$ac_ext <<EOF
2170 #line 2171 "configure"
2171 #include "confdefs.h"
2172 #include <sys/types.h>
2173 #include <signal.h>
2174 #ifdef signal
2175 #undef signal
2176 #endif
2177 #ifdef __cplusplus
2178 extern "C" void (*signal (int, void (*)(int)))(int);
2179 #else
2180 void (*signal ()) ();
2181 #endif
2182
2183 int main() {
2184 int i;
2185 ; return 0; }
2186 EOF
2187 if { (eval echo configure:2188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2188   rm -rf conftest*
2189   ac_cv_type_signal=void
2190 else
2191   echo "configure: failed program was:" >&5
2192   cat conftest.$ac_ext >&5
2193   rm -rf conftest*
2194   ac_cv_type_signal=int
2195 fi
2196 rm -f conftest*
2197 fi
2198
2199 echo "$ac_t""$ac_cv_type_signal" 1>&6
2200 cat >> confdefs.h <<EOF
2201 #define RETSIGTYPE $ac_cv_type_signal
2202 EOF
2203
2204
2205 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2206 echo "configure:2207: checking for uid_t in sys/types.h" >&5
2207 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2208   echo $ac_n "(cached) $ac_c" 1>&6
2209 else
2210   cat > conftest.$ac_ext <<EOF
2211 #line 2212 "configure"
2212 #include "confdefs.h"
2213 #include <sys/types.h>
2214 EOF
2215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2216   egrep "uid_t" >/dev/null 2>&1; then
2217   rm -rf conftest*
2218   ac_cv_type_uid_t=yes
2219 else
2220   rm -rf conftest*
2221   ac_cv_type_uid_t=no
2222 fi
2223 rm -f conftest*
2224
2225 fi
2226
2227 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2228 if test $ac_cv_type_uid_t = no; then
2229   cat >> confdefs.h <<\EOF
2230 #define uid_t int
2231 EOF
2232
2233   cat >> confdefs.h <<\EOF
2234 #define gid_t int
2235 EOF
2236
2237 fi
2238
2239 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2240 echo "configure:2241: checking for mode_t" >&5
2241 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2242   echo $ac_n "(cached) $ac_c" 1>&6
2243 else
2244   cat > conftest.$ac_ext <<EOF
2245 #line 2246 "configure"
2246 #include "confdefs.h"
2247 #include <sys/types.h>
2248 #if STDC_HEADERS
2249 #include <stdlib.h>
2250 #include <stddef.h>
2251 #endif
2252 EOF
2253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2254   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2255   rm -rf conftest*
2256   ac_cv_type_mode_t=yes
2257 else
2258   rm -rf conftest*
2259   ac_cv_type_mode_t=no
2260 fi
2261 rm -f conftest*
2262
2263 fi
2264 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2265 if test $ac_cv_type_mode_t = no; then
2266   cat >> confdefs.h <<\EOF
2267 #define mode_t int
2268 EOF
2269
2270 fi
2271
2272 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2273 echo "configure:2274: checking for off_t" >&5
2274 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2275   echo $ac_n "(cached) $ac_c" 1>&6
2276 else
2277   cat > conftest.$ac_ext <<EOF
2278 #line 2279 "configure"
2279 #include "confdefs.h"
2280 #include <sys/types.h>
2281 #if STDC_HEADERS
2282 #include <stdlib.h>
2283 #include <stddef.h>
2284 #endif
2285 EOF
2286 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2287   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2288   rm -rf conftest*
2289   ac_cv_type_off_t=yes
2290 else
2291   rm -rf conftest*
2292   ac_cv_type_off_t=no
2293 fi
2294 rm -f conftest*
2295
2296 fi
2297 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2298 if test $ac_cv_type_off_t = no; then
2299   cat >> confdefs.h <<\EOF
2300 #define off_t long
2301 EOF
2302
2303 fi
2304
2305 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2306 echo "configure:2307: checking for size_t" >&5
2307 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2308   echo $ac_n "(cached) $ac_c" 1>&6
2309 else
2310   cat > conftest.$ac_ext <<EOF
2311 #line 2312 "configure"
2312 #include "confdefs.h"
2313 #include <sys/types.h>
2314 #if STDC_HEADERS
2315 #include <stdlib.h>
2316 #include <stddef.h>
2317 #endif
2318 EOF
2319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2320   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2321   rm -rf conftest*
2322   ac_cv_type_size_t=yes
2323 else
2324   rm -rf conftest*
2325   ac_cv_type_size_t=no
2326 fi
2327 rm -f conftest*
2328
2329 fi
2330 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2331 if test $ac_cv_type_size_t = no; then
2332   cat >> confdefs.h <<\EOF
2333 #define size_t unsigned
2334 EOF
2335
2336 fi
2337
2338 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2339 echo "configure:2340: checking for pid_t" >&5
2340 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2341   echo $ac_n "(cached) $ac_c" 1>&6
2342 else
2343   cat > conftest.$ac_ext <<EOF
2344 #line 2345 "configure"
2345 #include "confdefs.h"
2346 #include <sys/types.h>
2347 #if STDC_HEADERS
2348 #include <stdlib.h>
2349 #include <stddef.h>
2350 #endif
2351 EOF
2352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2353   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2354   rm -rf conftest*
2355   ac_cv_type_pid_t=yes
2356 else
2357   rm -rf conftest*
2358   ac_cv_type_pid_t=no
2359 fi
2360 rm -f conftest*
2361
2362 fi
2363 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2364 if test $ac_cv_type_pid_t = no; then
2365   cat >> confdefs.h <<\EOF
2366 #define pid_t int
2367 EOF
2368
2369 fi
2370
2371 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
2372 echo "configure:2373: checking for st_rdev in struct stat" >&5
2373 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
2374   echo $ac_n "(cached) $ac_c" 1>&6
2375 else
2376   cat > conftest.$ac_ext <<EOF
2377 #line 2378 "configure"
2378 #include "confdefs.h"
2379 #include <sys/types.h>
2380 #include <sys/stat.h>
2381 int main() {
2382 struct stat s; s.st_rdev;
2383 ; return 0; }
2384 EOF
2385 if { (eval echo configure:2386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2386   rm -rf conftest*
2387   ac_cv_struct_st_rdev=yes
2388 else
2389   echo "configure: failed program was:" >&5
2390   cat conftest.$ac_ext >&5
2391   rm -rf conftest*
2392   ac_cv_struct_st_rdev=no
2393 fi
2394 rm -f conftest*
2395 fi
2396
2397 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
2398 if test $ac_cv_struct_st_rdev = yes; then
2399   cat >> confdefs.h <<\EOF
2400 #define HAVE_ST_RDEV 1
2401 EOF
2402
2403 fi
2404
2405 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
2406 echo "configure:2407: checking for ino_t" >&5
2407 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
2408   echo $ac_n "(cached) $ac_c" 1>&6
2409 else
2410   cat > conftest.$ac_ext <<EOF
2411 #line 2412 "configure"
2412 #include "confdefs.h"
2413 #include <sys/types.h>
2414 #if STDC_HEADERS
2415 #include <stdlib.h>
2416 #include <stddef.h>
2417 #endif
2418 EOF
2419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2420   egrep "ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2421   rm -rf conftest*
2422   ac_cv_type_ino_t=yes
2423 else
2424   rm -rf conftest*
2425   ac_cv_type_ino_t=no
2426 fi
2427 rm -f conftest*
2428
2429 fi
2430 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
2431 if test $ac_cv_type_ino_t = no; then
2432   cat >> confdefs.h <<\EOF
2433 #define ino_t unsigned
2434 EOF
2435
2436 fi
2437
2438
2439 echo $ac_n "checking for errno in errno.h... $ac_c"
2440 cat > conftest.$ac_ext <<EOF
2441 #line 2442 "configure"
2442 #include "confdefs.h"
2443 #include <errno.h>
2444 int main() {
2445 int i = errno
2446 ; return 0; }
2447 EOF
2448 if { (eval echo configure:2449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2449   rm -rf conftest*
2450   echo yes; cat >> confdefs.h <<\EOF
2451 #define HAVE_ERRNO_DECL 1
2452 EOF
2453
2454 else
2455   echo "configure: failed program was:" >&5
2456   cat conftest.$ac_ext >&5
2457   rm -rf conftest*
2458   echo no
2459 fi
2460 rm -f conftest*
2461
2462 # stupid glibc has the functions but no declaration. grrrr.
2463 echo $ac_n "checking for setresuid declaration $ac_c"
2464 cat > conftest.$ac_ext <<EOF
2465 #line 2466 "configure"
2466 #include "confdefs.h"
2467 #include <unistd.h>
2468 int main() {
2469 int i = setresuid
2470 ; return 0; }
2471 EOF
2472 if { (eval echo configure:2473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2473   rm -rf conftest*
2474   echo yes; cat >> confdefs.h <<\EOF
2475 #define HAVE_SETRESUID_DECL 1
2476 EOF
2477
2478 else
2479   echo "configure: failed program was:" >&5
2480   cat conftest.$ac_ext >&5
2481   rm -rf conftest*
2482   echo no
2483 fi
2484 rm -f conftest*
2485
2486 # and glibc has setresuid under linux but the function does
2487 # nothing until kernel 2.1.44! very dumb.
2488 echo $ac_n "checking for real setresuid $ac_c"
2489 if test "$cross_compiling" = yes; then
2490     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2491 else
2492   cat > conftest.$ac_ext <<EOF
2493 #line 2494 "configure"
2494 #include "confdefs.h"
2495 #include <errno.h>
2496 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
2497 EOF
2498 if { (eval echo configure:2499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2499 then
2500   echo yes;cat >> confdefs.h <<\EOF
2501 #define HAVE_SETRESUID 1
2502 EOF
2503
2504 else
2505   echo "configure: failed program was:" >&5
2506   cat conftest.$ac_ext >&5
2507   rm -fr conftest*
2508   echo no
2509 fi
2510 rm -fr conftest*
2511 fi
2512
2513
2514
2515 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
2516 echo "configure:2517: checking for 8-bit clean memcmp" >&5
2517 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
2518   echo $ac_n "(cached) $ac_c" 1>&6
2519 else
2520   if test "$cross_compiling" = yes; then
2521   ac_cv_func_memcmp_clean=no
2522 else
2523   cat > conftest.$ac_ext <<EOF
2524 #line 2525 "configure"
2525 #include "confdefs.h"
2526
2527 main()
2528 {
2529   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
2530   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
2531 }
2532
2533 EOF
2534 if { (eval echo configure:2535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2535 then
2536   ac_cv_func_memcmp_clean=yes
2537 else
2538   echo "configure: failed program was:" >&5
2539   cat conftest.$ac_ext >&5
2540   rm -fr conftest*
2541   ac_cv_func_memcmp_clean=no
2542 fi
2543 rm -fr conftest*
2544 fi
2545
2546 fi
2547
2548 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
2549 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
2550
2551
2552 ###############################################
2553 # test for where we get crypt() from
2554 if test "$ac_cv_lib_crypt_crypt" = "yes"; then
2555   echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
2556 echo "configure:2557: checking for crypt in -lcrypt" >&5
2557 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
2558 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2559   echo $ac_n "(cached) $ac_c" 1>&6
2560 else
2561   ac_save_LIBS="$LIBS"
2562 LIBS="-lcrypt  $LIBS"
2563 cat > conftest.$ac_ext <<EOF
2564 #line 2565 "configure"
2565 #include "confdefs.h"
2566 /* Override any gcc2 internal prototype to avoid an error.  */
2567 /* We use char because int might match the return type of a gcc2
2568     builtin and then its argument prototype would still apply.  */
2569 char crypt();
2570
2571 int main() {
2572 crypt()
2573 ; return 0; }
2574 EOF
2575 if { (eval echo configure:2576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2576   rm -rf conftest*
2577   eval "ac_cv_lib_$ac_lib_var=yes"
2578 else
2579   echo "configure: failed program was:" >&5
2580   cat conftest.$ac_ext >&5
2581   rm -rf conftest*
2582   eval "ac_cv_lib_$ac_lib_var=no"
2583 fi
2584 rm -f conftest*
2585 LIBS="$ac_save_LIBS"
2586
2587 fi
2588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2589   echo "$ac_t""yes" 1>&6
2590     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2591     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2592   cat >> confdefs.h <<EOF
2593 #define $ac_tr_lib 1
2594 EOF
2595
2596   LIBS="-lcrypt $LIBS"
2597
2598 else
2599   echo "$ac_t""no" 1>&6
2600 fi
2601
2602   cat >> confdefs.h <<\EOF
2603 #define HAVE_CRYPT 1
2604 EOF
2605
2606 fi
2607 if test "$ac_cv_lib_crypt_crypt" = "no" || 
2608    test "$ac_cv_lib_crypt_crypt" = ""; then
2609 # look for crypt 
2610 echo $ac_n "checking for crypt""... $ac_c" 1>&6
2611 echo "configure:2612: checking for crypt" >&5
2612 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
2613   echo $ac_n "(cached) $ac_c" 1>&6
2614 else
2615   cat > conftest.$ac_ext <<EOF
2616 #line 2617 "configure"
2617 #include "confdefs.h"
2618 /* System header to define __stub macros and hopefully few prototypes,
2619     which can conflict with char crypt(); below.  */
2620 #include <assert.h>
2621 /* Override any gcc2 internal prototype to avoid an error.  */
2622 /* We use char because int might match the return type of a gcc2
2623     builtin and then its argument prototype would still apply.  */
2624 char crypt();
2625
2626 int main() {
2627
2628 /* The GNU C library defines this for functions which it implements
2629     to always fail with ENOSYS.  Some functions are actually named
2630     something starting with __ and the normal name is an alias.  */
2631 #if defined (__stub_crypt) || defined (__stub___crypt)
2632 choke me
2633 #else
2634 crypt();
2635 #endif
2636
2637 ; return 0; }
2638 EOF
2639 if { (eval echo configure:2640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2640   rm -rf conftest*
2641   eval "ac_cv_func_crypt=yes"
2642 else
2643   echo "configure: failed program was:" >&5
2644   cat conftest.$ac_ext >&5
2645   rm -rf conftest*
2646   eval "ac_cv_func_crypt=no"
2647 fi
2648 rm -f conftest*
2649 fi
2650
2651 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
2652   echo "$ac_t""yes" 1>&6
2653   cat >> confdefs.h <<\EOF
2654 #define HAVE_CRYPT 1
2655 EOF
2656
2657 else
2658   echo "$ac_t""no" 1>&6
2659 case "$LIBS" in
2660 *-lcrypt*) ;;
2661 *) echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
2662 echo "configure:2663: checking for crypt in -lcrypt" >&5
2663 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
2664 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2665   echo $ac_n "(cached) $ac_c" 1>&6
2666 else
2667   ac_save_LIBS="$LIBS"
2668 LIBS="-lcrypt  $LIBS"
2669 cat > conftest.$ac_ext <<EOF
2670 #line 2671 "configure"
2671 #include "confdefs.h"
2672 /* Override any gcc2 internal prototype to avoid an error.  */
2673 /* We use char because int might match the return type of a gcc2
2674     builtin and then its argument prototype would still apply.  */
2675 char crypt();
2676
2677 int main() {
2678 crypt()
2679 ; return 0; }
2680 EOF
2681 if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2682   rm -rf conftest*
2683   eval "ac_cv_lib_$ac_lib_var=yes"
2684 else
2685   echo "configure: failed program was:" >&5
2686   cat conftest.$ac_ext >&5
2687   rm -rf conftest*
2688   eval "ac_cv_lib_$ac_lib_var=no"
2689 fi
2690 rm -f conftest*
2691 LIBS="$ac_save_LIBS"
2692
2693 fi
2694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2695   echo "$ac_t""yes" 1>&6
2696     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2697     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2698   cat >> confdefs.h <<EOF
2699 #define $ac_tr_lib 1
2700 EOF
2701
2702   LIBS="-lcrypt $LIBS"
2703
2704 else
2705   echo "$ac_t""no" 1>&6
2706 fi
2707  ;;
2708 esac
2709 if test "$ac_cv_lib_crypt_crypt" = "yes"; then
2710   ac_cv_func_crypt=yes
2711   cat >> confdefs.h <<\EOF
2712 #define HAVE_CRYPT 1
2713 EOF
2714
2715 fi
2716 fi
2717
2718 fi
2719
2720
2721 ###############################################
2722 # test for where we get pam_authenticate() from
2723 # might need libdl for this to work
2724 if test "$ac_cv_header_security_pam_appl_h" = "yes"; then
2725   echo $ac_n "checking for -ldl""... $ac_c" 1>&6
2726 echo "configure:2727: checking for -ldl" >&5
2727 if eval "test \"`echo '$''{'ac_cv_lib_dl'+set}'`\" = set"; then
2728   echo $ac_n "(cached) $ac_c" 1>&6
2729 else
2730   ac_save_LIBS="$LIBS"
2731 LIBS="-ldl  $LIBS"
2732 cat > conftest.$ac_ext <<EOF
2733 #line 2734 "configure"
2734 #include "confdefs.h"
2735
2736 int main() {
2737 main()
2738 ; return 0; }
2739 EOF
2740 if { (eval echo configure:2741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2741   rm -rf conftest*
2742   ac_cv_lib_dl=yes
2743 else
2744   echo "configure: failed program was:" >&5
2745   cat conftest.$ac_ext >&5
2746   rm -rf conftest*
2747   ac_cv_lib_dl=no
2748 fi
2749 rm -f conftest*
2750 LIBS="$ac_save_LIBS"
2751
2752 fi
2753 echo "$ac_t""$ac_cv_lib_dl" 1>&6
2754 if test "$ac_cv_lib_dl" = yes; then
2755   cat >> confdefs.h <<\EOF
2756 #define HAVE_LIBDL 1
2757 EOF
2758
2759   LIBS="-ldl $LIBS"
2760
2761 fi
2762
2763 fi
2764 if test "$ac_cv_lib_pam_pam_authenticate" = "yes"; then
2765   echo $ac_n "checking for pam_authenticate in -lpam""... $ac_c" 1>&6
2766 echo "configure:2767: checking for pam_authenticate in -lpam" >&5
2767 ac_lib_var=`echo pam'_'pam_authenticate | sed 'y%./+-%__p_%'`
2768 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2769   echo $ac_n "(cached) $ac_c" 1>&6
2770 else
2771   ac_save_LIBS="$LIBS"
2772 LIBS="-lpam  $LIBS"
2773 cat > conftest.$ac_ext <<EOF
2774 #line 2775 "configure"
2775 #include "confdefs.h"
2776 /* Override any gcc2 internal prototype to avoid an error.  */
2777 /* We use char because int might match the return type of a gcc2
2778     builtin and then its argument prototype would still apply.  */
2779 char pam_authenticate();
2780
2781 int main() {
2782 pam_authenticate()
2783 ; return 0; }
2784 EOF
2785 if { (eval echo configure:2786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2786   rm -rf conftest*
2787   eval "ac_cv_lib_$ac_lib_var=yes"
2788 else
2789   echo "configure: failed program was:" >&5
2790   cat conftest.$ac_ext >&5
2791   rm -rf conftest*
2792   eval "ac_cv_lib_$ac_lib_var=no"
2793 fi
2794 rm -f conftest*
2795 LIBS="$ac_save_LIBS"
2796
2797 fi
2798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2799   echo "$ac_t""yes" 1>&6
2800     ac_tr_lib=HAVE_LIB`echo pam | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2801     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2802   cat >> confdefs.h <<EOF
2803 #define $ac_tr_lib 1
2804 EOF
2805
2806   LIBS="-lpam $LIBS"
2807
2808 else
2809   echo "$ac_t""no" 1>&6
2810 fi
2811
2812   cat >> confdefs.h <<\EOF
2813 #define HAVE_PAM_AUTHENTICATE 1
2814 EOF
2815
2816 fi
2817 if test "$ac_cv_lib_pam_pam_authenticate" = "no" || 
2818    test "$ac_cv_lib_pam_pam_authenticate" = ""; then
2819 # look for pam_authenticate
2820 echo $ac_n "checking for pam_authenticate""... $ac_c" 1>&6
2821 echo "configure:2822: checking for pam_authenticate" >&5
2822 if eval "test \"`echo '$''{'ac_cv_func_pam_authenticate'+set}'`\" = set"; then
2823   echo $ac_n "(cached) $ac_c" 1>&6
2824 else
2825   cat > conftest.$ac_ext <<EOF
2826 #line 2827 "configure"
2827 #include "confdefs.h"
2828 /* System header to define __stub macros and hopefully few prototypes,
2829     which can conflict with char pam_authenticate(); below.  */
2830 #include <assert.h>
2831 /* Override any gcc2 internal prototype to avoid an error.  */
2832 /* We use char because int might match the return type of a gcc2
2833     builtin and then its argument prototype would still apply.  */
2834 char pam_authenticate();
2835
2836 int main() {
2837
2838 /* The GNU C library defines this for functions which it implements
2839     to always fail with ENOSYS.  Some functions are actually named
2840     something starting with __ and the normal name is an alias.  */
2841 #if defined (__stub_pam_authenticate) || defined (__stub___pam_authenticate)
2842 choke me
2843 #else
2844 pam_authenticate();
2845 #endif
2846
2847 ; return 0; }
2848 EOF
2849 if { (eval echo configure:2850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2850   rm -rf conftest*
2851   eval "ac_cv_func_pam_authenticate=yes"
2852 else
2853   echo "configure: failed program was:" >&5
2854   cat conftest.$ac_ext >&5
2855   rm -rf conftest*
2856   eval "ac_cv_func_pam_authenticate=no"
2857 fi
2858 rm -f conftest*
2859 fi
2860
2861 if eval "test \"`echo '$ac_cv_func_'pam_authenticate`\" = yes"; then
2862   echo "$ac_t""yes" 1>&6
2863   cat >> confdefs.h <<\EOF
2864 #define HAVE_PAM_AUTHENTICATE 1
2865 EOF
2866
2867 else
2868   echo "$ac_t""no" 1>&6
2869 case "$LIBS" in
2870 *-lpam*) ;;
2871 *) echo $ac_n "checking for pam_authenticate in -lpam""... $ac_c" 1>&6
2872 echo "configure:2873: checking for pam_authenticate in -lpam" >&5
2873 ac_lib_var=`echo pam'_'pam_authenticate | sed 'y%./+-%__p_%'`
2874 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2875   echo $ac_n "(cached) $ac_c" 1>&6
2876 else
2877   ac_save_LIBS="$LIBS"
2878 LIBS="-lpam  $LIBS"
2879 cat > conftest.$ac_ext <<EOF
2880 #line 2881 "configure"
2881 #include "confdefs.h"
2882 /* Override any gcc2 internal prototype to avoid an error.  */
2883 /* We use char because int might match the return type of a gcc2
2884     builtin and then its argument prototype would still apply.  */
2885 char pam_authenticate();
2886
2887 int main() {
2888 pam_authenticate()
2889 ; return 0; }
2890 EOF
2891 if { (eval echo configure:2892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2892   rm -rf conftest*
2893   eval "ac_cv_lib_$ac_lib_var=yes"
2894 else
2895   echo "configure: failed program was:" >&5
2896   cat conftest.$ac_ext >&5
2897   rm -rf conftest*
2898   eval "ac_cv_lib_$ac_lib_var=no"
2899 fi
2900 rm -f conftest*
2901 LIBS="$ac_save_LIBS"
2902
2903 fi
2904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2905   echo "$ac_t""yes" 1>&6
2906     ac_tr_lib=HAVE_LIB`echo pam | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2907     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2908   cat >> confdefs.h <<EOF
2909 #define $ac_tr_lib 1
2910 EOF
2911
2912   LIBS="-lpam $LIBS"
2913
2914 else
2915   echo "$ac_t""no" 1>&6
2916 fi
2917  ;;
2918 esac
2919 if test "$ac_cv_lib_pam_pam_authenticate" = "yes"; then
2920   ac_cv_func_pam_authenticate=yes
2921   cat >> confdefs.h <<\EOF
2922 #define HAVE_PAM_AUTHENTICATE 1
2923 EOF
2924
2925 fi
2926 fi
2927
2928 fi
2929
2930 # The following test taken from the cvs sources
2931 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
2932 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
2933 # libsocket.so which has a bad implementation of gethostbyname (it
2934 # only looks in /etc/hosts), so we only look for -lsocket if we need
2935 # it.
2936 echo $ac_n "checking for connect""... $ac_c" 1>&6
2937 echo "configure:2938: checking for connect" >&5
2938 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2939   echo $ac_n "(cached) $ac_c" 1>&6
2940 else
2941   cat > conftest.$ac_ext <<EOF
2942 #line 2943 "configure"
2943 #include "confdefs.h"
2944 /* System header to define __stub macros and hopefully few prototypes,
2945     which can conflict with char connect(); below.  */
2946 #include <assert.h>
2947 /* Override any gcc2 internal prototype to avoid an error.  */
2948 /* We use char because int might match the return type of a gcc2
2949     builtin and then its argument prototype would still apply.  */
2950 char connect();
2951
2952 int main() {
2953
2954 /* The GNU C library defines this for functions which it implements
2955     to always fail with ENOSYS.  Some functions are actually named
2956     something starting with __ and the normal name is an alias.  */
2957 #if defined (__stub_connect) || defined (__stub___connect)
2958 choke me
2959 #else
2960 connect();
2961 #endif
2962
2963 ; return 0; }
2964 EOF
2965 if { (eval echo configure:2966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2966   rm -rf conftest*
2967   eval "ac_cv_func_connect=yes"
2968 else
2969   echo "configure: failed program was:" >&5
2970   cat conftest.$ac_ext >&5
2971   rm -rf conftest*
2972   eval "ac_cv_func_connect=no"
2973 fi
2974 rm -f conftest*
2975 fi
2976
2977 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2978   echo "$ac_t""yes" 1>&6
2979   :
2980 else
2981   echo "$ac_t""no" 1>&6
2982 case "$LIBS" in
2983 *-lnsl*) ;;
2984 *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
2985 echo "configure:2986: checking for printf in -lnsl_s" >&5
2986 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
2987 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2988   echo $ac_n "(cached) $ac_c" 1>&6
2989 else
2990   ac_save_LIBS="$LIBS"
2991 LIBS="-lnsl_s  $LIBS"
2992 cat > conftest.$ac_ext <<EOF
2993 #line 2994 "configure"
2994 #include "confdefs.h"
2995 /* Override any gcc2 internal prototype to avoid an error.  */
2996 /* We use char because int might match the return type of a gcc2
2997     builtin and then its argument prototype would still apply.  */
2998 char printf();
2999
3000 int main() {
3001 printf()
3002 ; return 0; }
3003 EOF
3004 if { (eval echo configure:3005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3005   rm -rf conftest*
3006   eval "ac_cv_lib_$ac_lib_var=yes"
3007 else
3008   echo "configure: failed program was:" >&5
3009   cat conftest.$ac_ext >&5
3010   rm -rf conftest*
3011   eval "ac_cv_lib_$ac_lib_var=no"
3012 fi
3013 rm -f conftest*
3014 LIBS="$ac_save_LIBS"
3015
3016 fi
3017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3018   echo "$ac_t""yes" 1>&6
3019     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3020     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3021   cat >> confdefs.h <<EOF
3022 #define $ac_tr_lib 1
3023 EOF
3024
3025   LIBS="-lnsl_s $LIBS"
3026
3027 else
3028   echo "$ac_t""no" 1>&6
3029 fi
3030  ;;
3031 esac
3032 case "$LIBS" in
3033 *-lnsl*) ;;
3034 *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
3035 echo "configure:3036: checking for printf in -lnsl" >&5
3036 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
3037 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3038   echo $ac_n "(cached) $ac_c" 1>&6
3039 else
3040   ac_save_LIBS="$LIBS"
3041 LIBS="-lnsl  $LIBS"
3042 cat > conftest.$ac_ext <<EOF
3043 #line 3044 "configure"
3044 #include "confdefs.h"
3045 /* Override any gcc2 internal prototype to avoid an error.  */
3046 /* We use char because int might match the return type of a gcc2
3047     builtin and then its argument prototype would still apply.  */
3048 char printf();
3049
3050 int main() {
3051 printf()
3052 ; return 0; }
3053 EOF
3054 if { (eval echo configure:3055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3055   rm -rf conftest*
3056   eval "ac_cv_lib_$ac_lib_var=yes"
3057 else
3058   echo "configure: failed program was:" >&5
3059   cat conftest.$ac_ext >&5
3060   rm -rf conftest*
3061   eval "ac_cv_lib_$ac_lib_var=no"
3062 fi
3063 rm -f conftest*
3064 LIBS="$ac_save_LIBS"
3065
3066 fi
3067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3068   echo "$ac_t""yes" 1>&6
3069     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3071   cat >> confdefs.h <<EOF
3072 #define $ac_tr_lib 1
3073 EOF
3074
3075   LIBS="-lnsl $LIBS"
3076
3077 else
3078   echo "$ac_t""no" 1>&6
3079 fi
3080  ;;
3081 esac
3082 case "$LIBS" in
3083 *-lsocket*) ;;
3084 *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3085 echo "configure:3086: checking for connect in -lsocket" >&5
3086 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3087 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3088   echo $ac_n "(cached) $ac_c" 1>&6
3089 else
3090   ac_save_LIBS="$LIBS"
3091 LIBS="-lsocket  $LIBS"
3092 cat > conftest.$ac_ext <<EOF
3093 #line 3094 "configure"
3094 #include "confdefs.h"
3095 /* Override any gcc2 internal prototype to avoid an error.  */
3096 /* We use char because int might match the return type of a gcc2
3097     builtin and then its argument prototype would still apply.  */
3098 char connect();
3099
3100 int main() {
3101 connect()
3102 ; return 0; }
3103 EOF
3104 if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3105   rm -rf conftest*
3106   eval "ac_cv_lib_$ac_lib_var=yes"
3107 else
3108   echo "configure: failed program was:" >&5
3109   cat conftest.$ac_ext >&5
3110   rm -rf conftest*
3111   eval "ac_cv_lib_$ac_lib_var=no"
3112 fi
3113 rm -f conftest*
3114 LIBS="$ac_save_LIBS"
3115
3116 fi
3117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3118   echo "$ac_t""yes" 1>&6
3119     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3120     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3121   cat >> confdefs.h <<EOF
3122 #define $ac_tr_lib 1
3123 EOF
3124
3125   LIBS="-lsocket $LIBS"
3126
3127 else
3128   echo "$ac_t""no" 1>&6
3129 fi
3130  ;;
3131 esac
3132 case "$LIBS" in
3133 *-linet*) ;;
3134 *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
3135 echo "configure:3136: checking for connect in -linet" >&5
3136 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
3137 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3138   echo $ac_n "(cached) $ac_c" 1>&6
3139 else
3140   ac_save_LIBS="$LIBS"
3141 LIBS="-linet  $LIBS"
3142 cat > conftest.$ac_ext <<EOF
3143 #line 3144 "configure"
3144 #include "confdefs.h"
3145 /* Override any gcc2 internal prototype to avoid an error.  */
3146 /* We use char because int might match the return type of a gcc2
3147     builtin and then its argument prototype would still apply.  */
3148 char connect();
3149
3150 int main() {
3151 connect()
3152 ; return 0; }
3153 EOF
3154 if { (eval echo configure:3155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3155   rm -rf conftest*
3156   eval "ac_cv_lib_$ac_lib_var=yes"
3157 else
3158   echo "configure: failed program was:" >&5
3159   cat conftest.$ac_ext >&5
3160   rm -rf conftest*
3161   eval "ac_cv_lib_$ac_lib_var=no"
3162 fi
3163 rm -f conftest*
3164 LIBS="$ac_save_LIBS"
3165
3166 fi
3167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3168   echo "$ac_t""yes" 1>&6
3169     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3170     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3171   cat >> confdefs.h <<EOF
3172 #define $ac_tr_lib 1
3173 EOF
3174
3175   LIBS="-linet $LIBS"
3176
3177 else
3178   echo "$ac_t""no" 1>&6
3179 fi
3180  ;;
3181 esac
3182 if test "$ac_cv_lib_socket_connect" = "yes" || 
3183    test "$ac_cv_lib_inet_connect" = "yes"; then
3184   ac_cv_func_connect=yes
3185   cat >> confdefs.h <<\EOF
3186 #define HAVE_CONNECT 1
3187 EOF
3188
3189 fi
3190 fi
3191
3192
3193
3194 for ac_func in waitpid getcwd strdup strerror chown chmod chroot
3195 do
3196 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3197 echo "configure:3198: checking for $ac_func" >&5
3198 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3199   echo $ac_n "(cached) $ac_c" 1>&6
3200 else
3201   cat > conftest.$ac_ext <<EOF
3202 #line 3203 "configure"
3203 #include "confdefs.h"
3204 /* System header to define __stub macros and hopefully few prototypes,
3205     which can conflict with char $ac_func(); below.  */
3206 #include <assert.h>
3207 /* Override any gcc2 internal prototype to avoid an error.  */
3208 /* We use char because int might match the return type of a gcc2
3209     builtin and then its argument prototype would still apply.  */
3210 char $ac_func();
3211
3212 int main() {
3213
3214 /* The GNU C library defines this for functions which it implements
3215     to always fail with ENOSYS.  Some functions are actually named
3216     something starting with __ and the normal name is an alias.  */
3217 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3218 choke me
3219 #else
3220 $ac_func();
3221 #endif
3222
3223 ; return 0; }
3224 EOF
3225 if { (eval echo configure:3226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3226   rm -rf conftest*
3227   eval "ac_cv_func_$ac_func=yes"
3228 else
3229   echo "configure: failed program was:" >&5
3230   cat conftest.$ac_ext >&5
3231   rm -rf conftest*
3232   eval "ac_cv_func_$ac_func=no"
3233 fi
3234 rm -f conftest*
3235 fi
3236
3237 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3238   echo "$ac_t""yes" 1>&6
3239     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3240   cat >> confdefs.h <<EOF
3241 #define $ac_tr_func 1
3242 EOF
3243  
3244 else
3245   echo "$ac_t""no" 1>&6
3246 fi
3247 done
3248
3249 for ac_func in fstat strchr utime utimes getrlimit fsync execl bzero memset
3250 do
3251 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3252 echo "configure:3253: checking for $ac_func" >&5
3253 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3254   echo $ac_n "(cached) $ac_c" 1>&6
3255 else
3256   cat > conftest.$ac_ext <<EOF
3257 #line 3258 "configure"
3258 #include "confdefs.h"
3259 /* System header to define __stub macros and hopefully few prototypes,
3260     which can conflict with char $ac_func(); below.  */
3261 #include <assert.h>
3262 /* Override any gcc2 internal prototype to avoid an error.  */
3263 /* We use char because int might match the return type of a gcc2
3264     builtin and then its argument prototype would still apply.  */
3265 char $ac_func();
3266
3267 int main() {
3268
3269 /* The GNU C library defines this for functions which it implements
3270     to always fail with ENOSYS.  Some functions are actually named
3271     something starting with __ and the normal name is an alias.  */
3272 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3273 choke me
3274 #else
3275 $ac_func();
3276 #endif
3277
3278 ; return 0; }
3279 EOF
3280 if { (eval echo configure:3281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3281   rm -rf conftest*
3282   eval "ac_cv_func_$ac_func=yes"
3283 else
3284   echo "configure: failed program was:" >&5
3285   cat conftest.$ac_ext >&5
3286   rm -rf conftest*
3287   eval "ac_cv_func_$ac_func=no"
3288 fi
3289 rm -f conftest*
3290 fi
3291
3292 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3293   echo "$ac_t""yes" 1>&6
3294     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3295   cat >> confdefs.h <<EOF
3296 #define $ac_tr_func 1
3297 EOF
3298  
3299 else
3300   echo "$ac_t""no" 1>&6
3301 fi
3302 done
3303
3304 for ac_func in memmove vsnprintf setsid glob strpbrk pipe crypt16 getauthuid
3305 do
3306 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3307 echo "configure:3308: checking for $ac_func" >&5
3308 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3309   echo $ac_n "(cached) $ac_c" 1>&6
3310 else
3311   cat > conftest.$ac_ext <<EOF
3312 #line 3313 "configure"
3313 #include "confdefs.h"
3314 /* System header to define __stub macros and hopefully few prototypes,
3315     which can conflict with char $ac_func(); below.  */
3316 #include <assert.h>
3317 /* Override any gcc2 internal prototype to avoid an error.  */
3318 /* We use char because int might match the return type of a gcc2
3319     builtin and then its argument prototype would still apply.  */
3320 char $ac_func();
3321
3322 int main() {
3323
3324 /* The GNU C library defines this for functions which it implements
3325     to always fail with ENOSYS.  Some functions are actually named
3326     something starting with __ and the normal name is an alias.  */
3327 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3328 choke me
3329 #else
3330 $ac_func();
3331 #endif
3332
3333 ; return 0; }
3334 EOF
3335 if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3336   rm -rf conftest*
3337   eval "ac_cv_func_$ac_func=yes"
3338 else
3339   echo "configure: failed program was:" >&5
3340   cat conftest.$ac_ext >&5
3341   rm -rf conftest*
3342   eval "ac_cv_func_$ac_func=no"
3343 fi
3344 rm -f conftest*
3345 fi
3346
3347 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3348   echo "$ac_t""yes" 1>&6
3349     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3350   cat >> confdefs.h <<EOF
3351 #define $ac_tr_func 1
3352 EOF
3353  
3354 else
3355   echo "$ac_t""no" 1>&6
3356 fi
3357 done
3358
3359 for ac_func in strftime sigprocmask sigblock sigaction innetgr
3360 do
3361 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3362 echo "configure:3363: checking for $ac_func" >&5
3363 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3364   echo $ac_n "(cached) $ac_c" 1>&6
3365 else
3366   cat > conftest.$ac_ext <<EOF
3367 #line 3368 "configure"
3368 #include "confdefs.h"
3369 /* System header to define __stub macros and hopefully few prototypes,
3370     which can conflict with char $ac_func(); below.  */
3371 #include <assert.h>
3372 /* Override any gcc2 internal prototype to avoid an error.  */
3373 /* We use char because int might match the return type of a gcc2
3374     builtin and then its argument prototype would still apply.  */
3375 char $ac_func();
3376
3377 int main() {
3378
3379 /* The GNU C library defines this for functions which it implements
3380     to always fail with ENOSYS.  Some functions are actually named
3381     something starting with __ and the normal name is an alias.  */
3382 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3383 choke me
3384 #else
3385 $ac_func();
3386 #endif
3387
3388 ; return 0; }
3389 EOF
3390 if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3391   rm -rf conftest*
3392   eval "ac_cv_func_$ac_func=yes"
3393 else
3394   echo "configure: failed program was:" >&5
3395   cat conftest.$ac_ext >&5
3396   rm -rf conftest*
3397   eval "ac_cv_func_$ac_func=no"
3398 fi
3399 rm -f conftest*
3400 fi
3401
3402 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3403   echo "$ac_t""yes" 1>&6
3404     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3405   cat >> confdefs.h <<EOF
3406 #define $ac_tr_func 1
3407 EOF
3408  
3409 else
3410   echo "$ac_t""no" 1>&6
3411 fi
3412 done
3413
3414 for ac_func in initgroups select rdchk getgrnam pathconf putprpwnam
3415 do
3416 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3417 echo "configure:3418: checking for $ac_func" >&5
3418 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3419   echo $ac_n "(cached) $ac_c" 1>&6
3420 else
3421   cat > conftest.$ac_ext <<EOF
3422 #line 3423 "configure"
3423 #include "confdefs.h"
3424 /* System header to define __stub macros and hopefully few prototypes,
3425     which can conflict with char $ac_func(); below.  */
3426 #include <assert.h>
3427 /* Override any gcc2 internal prototype to avoid an error.  */
3428 /* We use char because int might match the return type of a gcc2
3429     builtin and then its argument prototype would still apply.  */
3430 char $ac_func();
3431
3432 int main() {
3433
3434 /* The GNU C library defines this for functions which it implements
3435     to always fail with ENOSYS.  Some functions are actually named
3436     something starting with __ and the normal name is an alias.  */
3437 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3438 choke me
3439 #else
3440 $ac_func();
3441 #endif
3442
3443 ; return 0; }
3444 EOF
3445 if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3446   rm -rf conftest*
3447   eval "ac_cv_func_$ac_func=yes"
3448 else
3449   echo "configure: failed program was:" >&5
3450   cat conftest.$ac_ext >&5
3451   rm -rf conftest*
3452   eval "ac_cv_func_$ac_func=no"
3453 fi
3454 rm -f conftest*
3455 fi
3456
3457 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3458   echo "$ac_t""yes" 1>&6
3459     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3460   cat >> confdefs.h <<EOF
3461 #define $ac_tr_func 1
3462 EOF
3463  
3464 else
3465   echo "$ac_t""no" 1>&6
3466 fi
3467 done
3468
3469 for ac_func in setuidx setgroups mktime rename ftruncate stat64 fstat64 lstat64
3470 do
3471 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3472 echo "configure:3473: checking for $ac_func" >&5
3473 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3474   echo $ac_n "(cached) $ac_c" 1>&6
3475 else
3476   cat > conftest.$ac_ext <<EOF
3477 #line 3478 "configure"
3478 #include "confdefs.h"
3479 /* System header to define __stub macros and hopefully few prototypes,
3480     which can conflict with char $ac_func(); below.  */
3481 #include <assert.h>
3482 /* Override any gcc2 internal prototype to avoid an error.  */
3483 /* We use char because int might match the return type of a gcc2
3484     builtin and then its argument prototype would still apply.  */
3485 char $ac_func();
3486
3487 int main() {
3488
3489 /* The GNU C library defines this for functions which it implements
3490     to always fail with ENOSYS.  Some functions are actually named
3491     something starting with __ and the normal name is an alias.  */
3492 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3493 choke me
3494 #else
3495 $ac_func();
3496 #endif
3497
3498 ; return 0; }
3499 EOF
3500 if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3501   rm -rf conftest*
3502   eval "ac_cv_func_$ac_func=yes"
3503 else
3504   echo "configure: failed program was:" >&5
3505   cat conftest.$ac_ext >&5
3506   rm -rf conftest*
3507   eval "ac_cv_func_$ac_func=no"
3508 fi
3509 rm -f conftest*
3510 fi
3511
3512 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3513   echo "$ac_t""yes" 1>&6
3514     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3515   cat >> confdefs.h <<EOF
3516 #define $ac_tr_func 1
3517 EOF
3518  
3519 else
3520   echo "$ac_t""no" 1>&6
3521 fi
3522 done
3523
3524 for ac_func in set_auth_parameters atexit grantpt getspnam dup2 lseek64 ftruncate64
3525 do
3526 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3527 echo "configure:3528: checking for $ac_func" >&5
3528 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3529   echo $ac_n "(cached) $ac_c" 1>&6
3530 else
3531   cat > conftest.$ac_ext <<EOF
3532 #line 3533 "configure"
3533 #include "confdefs.h"
3534 /* System header to define __stub macros and hopefully few prototypes,
3535     which can conflict with char $ac_func(); below.  */
3536 #include <assert.h>
3537 /* Override any gcc2 internal prototype to avoid an error.  */
3538 /* We use char because int might match the return type of a gcc2
3539     builtin and then its argument prototype would still apply.  */
3540 char $ac_func();
3541
3542 int main() {
3543
3544 /* The GNU C library defines this for functions which it implements
3545     to always fail with ENOSYS.  Some functions are actually named
3546     something starting with __ and the normal name is an alias.  */
3547 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3548 choke me
3549 #else
3550 $ac_func();
3551 #endif
3552
3553 ; return 0; }
3554 EOF
3555 if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3556   rm -rf conftest*
3557   eval "ac_cv_func_$ac_func=yes"
3558 else
3559   echo "configure: failed program was:" >&5
3560   cat conftest.$ac_ext >&5
3561   rm -rf conftest*
3562   eval "ac_cv_func_$ac_func=no"
3563 fi
3564 rm -f conftest*
3565 fi
3566
3567 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3568   echo "$ac_t""yes" 1>&6
3569     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3570   cat >> confdefs.h <<EOF
3571 #define $ac_tr_func 1
3572 EOF
3573  
3574 else
3575   echo "$ac_t""no" 1>&6
3576 fi
3577 done
3578
3579 for ac_func in bigcrypt getprpwnam setluid yp_get_default_domain getpwanam
3580 do
3581 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3582 echo "configure:3583: checking for $ac_func" >&5
3583 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3584   echo $ac_n "(cached) $ac_c" 1>&6
3585 else
3586   cat > conftest.$ac_ext <<EOF
3587 #line 3588 "configure"
3588 #include "confdefs.h"
3589 /* System header to define __stub macros and hopefully few prototypes,
3590     which can conflict with char $ac_func(); below.  */
3591 #include <assert.h>
3592 /* Override any gcc2 internal prototype to avoid an error.  */
3593 /* We use char because int might match the return type of a gcc2
3594     builtin and then its argument prototype would still apply.  */
3595 char $ac_func();
3596
3597 int main() {
3598
3599 /* The GNU C library defines this for functions which it implements
3600     to always fail with ENOSYS.  Some functions are actually named
3601     something starting with __ and the normal name is an alias.  */
3602 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3603 choke me
3604 #else
3605 $ac_func();
3606 #endif
3607
3608 ; return 0; }
3609 EOF
3610 if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3611   rm -rf conftest*
3612   eval "ac_cv_func_$ac_func=yes"
3613 else
3614   echo "configure: failed program was:" >&5
3615   cat conftest.$ac_ext >&5
3616   rm -rf conftest*
3617   eval "ac_cv_func_$ac_func=no"
3618 fi
3619 rm -f conftest*
3620 fi
3621
3622 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3623   echo "$ac_t""yes" 1>&6
3624     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3625   cat >> confdefs.h <<EOF
3626 #define $ac_tr_func 1
3627 EOF
3628  
3629 else
3630   echo "$ac_t""no" 1>&6
3631 fi
3632 done
3633
3634
3635 echo $ac_n "checking for long long ... $ac_c"
3636 if test "$cross_compiling" = yes; then
3637     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3638 else
3639   cat > conftest.$ac_ext <<EOF
3640 #line 3641 "configure"
3641 #include "confdefs.h"
3642 #include <stdio.h>
3643 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
3644 EOF
3645 if { (eval echo configure:3646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3646 then
3647   echo yes;cat >> confdefs.h <<\EOF
3648 #define HAVE_LONGLONG 1
3649 EOF
3650
3651 else
3652   echo "configure: failed program was:" >&5
3653   cat conftest.$ac_ext >&5
3654   rm -fr conftest*
3655   echo no
3656 fi
3657 rm -fr conftest*
3658 fi
3659
3660
3661 echo $ac_n "checking for 64 bit off_t ... $ac_c"
3662 if test "$cross_compiling" = yes; then
3663     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3664 else
3665   cat > conftest.$ac_ext <<EOF
3666 #line 3667 "configure"
3667 #include "confdefs.h"
3668 #include <stdio.h>
3669 #include <sys/stat.h>
3670 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
3671 EOF
3672 if { (eval echo configure:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3673 then
3674   echo yes;cat >> confdefs.h <<\EOF
3675 #define SIZEOF_OFF_T 8
3676 EOF
3677
3678 else
3679   echo "configure: failed program was:" >&5
3680   cat conftest.$ac_ext >&5
3681   rm -fr conftest*
3682   echo no
3683 fi
3684 rm -fr conftest*
3685 fi
3686
3687
3688 echo $ac_n "checking for off64_t ... $ac_c"
3689 if test "$cross_compiling" = yes; then
3690     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3691 else
3692   cat > conftest.$ac_ext <<EOF
3693 #line 3694 "configure"
3694 #include "confdefs.h"
3695 #include <stdio.h>
3696 #include <sys/stat.h>
3697 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
3698 EOF
3699 if { (eval echo configure:3700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3700 then
3701   echo yes;cat >> confdefs.h <<\EOF
3702 #define HAVE_OFF64_T 1
3703 EOF
3704
3705 else
3706   echo "configure: failed program was:" >&5
3707   cat conftest.$ac_ext >&5
3708   rm -fr conftest*
3709   echo no
3710 fi
3711 rm -fr conftest*
3712 fi
3713
3714
3715 echo $ac_n "checking for union semun ... $ac_c"
3716 if test "$cross_compiling" = yes; then
3717     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3718 else
3719   cat > conftest.$ac_ext <<EOF
3720 #line 3721 "configure"
3721 #include "confdefs.h"
3722
3723 #include <sys/types.h>
3724 #include <sys/ipc.h>
3725 #include <sys/sem.h>
3726 main() { union semun ss; exit(0); }
3727 EOF
3728 if { (eval echo configure:3729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3729 then
3730   echo yes;cat >> confdefs.h <<\EOF
3731 #define HAVE_UNION_SEMUN 1
3732 EOF
3733
3734 else
3735   echo "configure: failed program was:" >&5
3736   cat conftest.$ac_ext >&5
3737   rm -fr conftest*
3738   echo no
3739 fi
3740 rm -fr conftest*
3741 fi
3742
3743
3744 echo $ac_n "checking for unsigned char ... $ac_c"
3745 if test "$cross_compiling" = yes; then
3746     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3747 else
3748   cat > conftest.$ac_ext <<EOF
3749 #line 3750 "configure"
3750 #include "confdefs.h"
3751 #include <stdio.h>
3752 main() { char c; c=250; exit((c > 0)?0:1); }
3753 EOF
3754 if { (eval echo configure:3755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3755 then
3756   echo yes;cat >> confdefs.h <<\EOF
3757 #define HAVE_UNSIGNED_CHAR 1
3758 EOF
3759
3760 else
3761   echo "configure: failed program was:" >&5
3762   cat conftest.$ac_ext >&5
3763   rm -fr conftest*
3764   echo no
3765 fi
3766 rm -fr conftest*
3767 fi
3768
3769
3770 echo $ac_n "checking for sin_len in sock ... $ac_c"
3771 cat > conftest.$ac_ext <<EOF
3772 #line 3773 "configure"
3773 #include "confdefs.h"
3774 #include <sys/types.h>
3775 #include <sys/socket.h>
3776 #include <netinet/in.h>
3777 int main() {
3778 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
3779 ; return 0; }
3780 EOF
3781 if { (eval echo configure:3782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3782   rm -rf conftest*
3783   echo yes;cat >> confdefs.h <<\EOF
3784 #define HAVE_SOCK_SIN_LEN 1
3785 EOF
3786
3787 else
3788   echo "configure: failed program was:" >&5
3789   cat conftest.$ac_ext >&5
3790   rm -rf conftest*
3791   echo no
3792 fi
3793 rm -f conftest*
3794
3795 echo $ac_n "checking for __FILE__ macro ... $ac_c"
3796 cat > conftest.$ac_ext <<EOF
3797 #line 3798 "configure"
3798 #include "confdefs.h"
3799 #include <stdio.h>
3800 int main() {
3801 printf("%s\n", __FILE__);
3802 ; return 0; }
3803 EOF
3804 if { (eval echo configure:3805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3805   rm -rf conftest*
3806   echo yes;cat >> confdefs.h <<\EOF
3807 #define HAVE_FILE_MACRO 1
3808 EOF
3809
3810 else
3811   echo "configure: failed program was:" >&5
3812   cat conftest.$ac_ext >&5
3813   rm -rf conftest*
3814   echo no
3815 fi
3816 rm -f conftest*
3817
3818 echo $ac_n "checking for __FUNCTION__ macro ... $ac_c"
3819 cat > conftest.$ac_ext <<EOF
3820 #line 3821 "configure"
3821 #include "confdefs.h"
3822 #include <stdio.h>
3823 int main() {
3824 printf("%s\n", __FUNCTION__);
3825 ; return 0; }
3826 EOF
3827 if { (eval echo configure:3828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3828   rm -rf conftest*
3829   echo yes;cat >> confdefs.h <<\EOF
3830 #define HAVE_FUNCTION_MACRO 1
3831 EOF
3832
3833 else
3834   echo "configure: failed program was:" >&5
3835   cat conftest.$ac_ext >&5
3836   rm -rf conftest*
3837   echo no
3838 fi
3839 rm -f conftest*
3840
3841 echo $ac_n "checking if gettimeofday takes tz argument ... $ac_c"
3842 if test "$cross_compiling" = yes; then
3843     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3844 else
3845   cat > conftest.$ac_ext <<EOF
3846 #line 3847 "configure"
3847 #include "confdefs.h"
3848
3849 #include <sys/time.h>
3850 #include <unistd.h>
3851 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
3852 EOF
3853 if { (eval echo configure:3854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3854 then
3855   echo yes;cat >> confdefs.h <<\EOF
3856 #define HAVE_GETTIMEOFDAY_TZ 1
3857 EOF
3858
3859 else
3860   echo "configure: failed program was:" >&5
3861   cat conftest.$ac_ext >&5
3862   rm -fr conftest*
3863   echo no
3864 fi
3865 rm -fr conftest*
3866 fi
3867
3868
3869
3870 echo $ac_n "checking for broken readdir ... $ac_c"
3871 if test "$cross_compiling" = yes; then
3872     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3873 else
3874   cat > conftest.$ac_ext <<EOF
3875 #line 3876 "configure"
3876 #include "confdefs.h"
3877 #include <sys/types.h>
3878 #include <dirent.h>
3879 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
3880 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
3881 di->d_name[0] == 0) exit(0); exit(1);} 
3882 EOF
3883 if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3884 then
3885   echo yes - you are using the broken /usr/ucb/cc;cat >> confdefs.h <<\EOF
3886 #define HAVE_BROKEN_READDIR 1
3887 EOF
3888
3889 else
3890   echo "configure: failed program was:" >&5
3891   cat conftest.$ac_ext >&5
3892   rm -fr conftest*
3893   echo no
3894 fi
3895 rm -fr conftest*
3896 fi
3897
3898
3899 echo $ac_n "checking for utimbuf ... $ac_c"
3900 cat > conftest.$ac_ext <<EOF
3901 #line 3902 "configure"
3902 #include "confdefs.h"
3903 #include <sys/types.h>
3904 #include <utime.h>
3905 int main() {
3906 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
3907 ; return 0; }
3908 EOF
3909 if { (eval echo configure:3910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3910   rm -rf conftest*
3911   echo yes;cat >> confdefs.h <<\EOF
3912 #define HAVE_UTIMBUF 1
3913 EOF
3914
3915 else
3916   echo "configure: failed program was:" >&5
3917   cat conftest.$ac_ext >&5
3918   rm -rf conftest*
3919   echo no
3920 fi
3921 rm -f conftest*
3922
3923 echo $ac_n "checking for ftruncate extend ... $ac_c"
3924 if test "$cross_compiling" = yes; then
3925     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3926 else
3927   cat > conftest.$ac_ext <<EOF
3928 #line 3929 "configure"
3929 #include "confdefs.h"
3930 #include "tests/ftruncate.c"
3931 EOF
3932 if { (eval echo configure:3933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3933 then
3934   echo yes;cat >> confdefs.h <<\EOF
3935 #define HAVE_FTRUNCATE_EXTEND 1
3936 EOF
3937
3938 else
3939   echo "configure: failed program was:" >&5
3940   cat conftest.$ac_ext >&5
3941   rm -fr conftest*
3942   echo no
3943 fi
3944 rm -fr conftest*
3945 fi
3946
3947
3948 echo $ac_n "checking for broken getgroups ... $ac_c"
3949 if test "$cross_compiling" = yes; then
3950     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3951 else
3952   cat > conftest.$ac_ext <<EOF
3953 #line 3954 "configure"
3954 #include "confdefs.h"
3955 #include "tests/getgroups.c"
3956 EOF
3957 if { (eval echo configure:3958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3958 then
3959   echo yes;cat >> confdefs.h <<\EOF
3960 #define HAVE_BROKEN_GETGROUPS 1
3961 EOF
3962
3963 else
3964   echo "configure: failed program was:" >&5
3965   cat conftest.$ac_ext >&5
3966   rm -fr conftest*
3967   echo no
3968 fi
3969 rm -fr conftest*
3970 fi
3971
3972
3973
3974 echo $ac_n "checking for broken inet_ntoa ... $ac_c"
3975 if test "$cross_compiling" = yes; then
3976     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3977 else
3978   cat > conftest.$ac_ext <<EOF
3979 #line 3980 "configure"
3980 #include "confdefs.h"
3981
3982 #include <stdio.h>
3983 #include <sys/types.h>
3984 #include <netinet/in.h>
3985 #include <arpa/inet.h>
3986 main() { struct in_addr ip; ip.s_addr = 0x12345678;
3987 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
3988     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
3989 exit(1);}
3990 EOF
3991 if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3992 then
3993   echo yes;cat >> confdefs.h <<\EOF
3994 #define REPLACE_INET_NTOA 1
3995 EOF
3996
3997 else
3998   echo "configure: failed program was:" >&5
3999   cat conftest.$ac_ext >&5
4000   rm -fr conftest*
4001   echo no
4002 fi
4003 rm -fr conftest*
4004 fi
4005
4006
4007 echo $ac_n "checking for root ... $ac_c"
4008 if test "$cross_compiling" = yes; then
4009     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4010 else
4011   cat > conftest.$ac_ext <<EOF
4012 #line 4013 "configure"
4013 #include "confdefs.h"
4014 main() { exit(getuid() != 0); }
4015 EOF
4016 if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4017 then
4018   echo yes;cat >> confdefs.h <<\EOF
4019 #define HAVE_ROOT 1
4020 EOF
4021
4022 else
4023   echo "configure: failed program was:" >&5
4024   cat conftest.$ac_ext >&5
4025   rm -fr conftest*
4026   echo WARNING: running as non-root will disable some tests;
4027 fi
4028 rm -fr conftest*
4029 fi
4030
4031
4032 netmask=no;
4033 echo $ac_n "checking for netmask ifconf ... $ac_c"
4034 if test "$cross_compiling" = yes; then
4035     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4036 else
4037   cat > conftest.$ac_ext <<EOF
4038 #line 4039 "configure"
4039 #include "confdefs.h"
4040
4041 #define HAVE_NETMASK_IFCONF 1
4042 #define AUTOCONF 1
4043 #include "lib/netmask.c"
4044 EOF
4045 if { (eval echo configure:4046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4046 then
4047   echo yes;netmask=yes;cat >> confdefs.h <<\EOF
4048 #define HAVE_NETMASK_IFCONF 1
4049 EOF
4050
4051 else
4052   echo "configure: failed program was:" >&5
4053   cat conftest.$ac_ext >&5
4054   rm -fr conftest*
4055   echo no
4056 fi
4057 rm -fr conftest*
4058 fi
4059
4060
4061 if test $netmask = no; then
4062 echo $ac_n "checking for netmask ifreq ... $ac_c"
4063 if test "$cross_compiling" = yes; then
4064     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4065 else
4066   cat > conftest.$ac_ext <<EOF
4067 #line 4068 "configure"
4068 #include "confdefs.h"
4069
4070 #define HAVE_NETMASK_IFREQ 1
4071 #define AUTOCONF 1
4072 #include "lib/netmask.c"
4073 EOF
4074 if { (eval echo configure:4075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4075 then
4076   echo yes;netmask=yes;cat >> confdefs.h <<\EOF
4077 #define HAVE_NETMASK_IFREQ 1
4078 EOF
4079
4080 else
4081   echo "configure: failed program was:" >&5
4082   cat conftest.$ac_ext >&5
4083   rm -fr conftest*
4084   echo no
4085 fi
4086 rm -fr conftest*
4087 fi
4088
4089 fi
4090
4091 if test $netmask = no; then
4092 echo $ac_n "checking for netmask AIX ... $ac_c"
4093 if test "$cross_compiling" = yes; then
4094     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4095 else
4096   cat > conftest.$ac_ext <<EOF
4097 #line 4098 "configure"
4098 #include "confdefs.h"
4099
4100 #define HAVE_NETMASK_AIX 1
4101 #define AUTOCONF 1
4102 #include "lib/netmask.c"
4103 EOF
4104 if { (eval echo configure:4105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4105 then
4106   echo yes;netmask=yes;cat >> confdefs.h <<\EOF
4107 #define HAVE_NETMASK_AIX 1
4108 EOF
4109
4110 else
4111   echo "configure: failed program was:" >&5
4112   cat conftest.$ac_ext >&5
4113   rm -fr conftest*
4114   echo no
4115 fi
4116 rm -fr conftest*
4117 fi
4118
4119 fi
4120
4121 echo $ac_n "checking for trapdoor seteuid ... $ac_c"
4122 if test "$cross_compiling" = yes; then
4123     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4124 else
4125   cat > conftest.$ac_ext <<EOF
4126 #line 4127 "configure"
4127 #include "confdefs.h"
4128 #include "tests/trapdoor.c"
4129 EOF
4130 if { (eval echo configure:4131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4131 then
4132   echo no
4133 else
4134   echo "configure: failed program was:" >&5
4135   cat conftest.$ac_ext >&5
4136   rm -fr conftest*
4137   echo yes;cat >> confdefs.h <<\EOF
4138 #define HAVE_TRAPDOOR_UID 1
4139 EOF
4140
4141 fi
4142 rm -fr conftest*
4143 fi
4144
4145
4146 echo $ac_n "checking for shared mmap ... $ac_c"
4147 if test "$cross_compiling" = yes; then
4148     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4149 else
4150   cat > conftest.$ac_ext <<EOF
4151 #line 4152 "configure"
4152 #include "confdefs.h"
4153 #include "tests/shared_mmap.c"
4154 EOF
4155 if { (eval echo configure:4156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4156 then
4157   echo yes;cat >> confdefs.h <<\EOF
4158 #define HAVE_SHARED_MMAP 1
4159 EOF
4160
4161 else
4162   echo "configure: failed program was:" >&5
4163   cat conftest.$ac_ext >&5
4164   rm -fr conftest*
4165   echo no
4166 fi
4167 rm -fr conftest*
4168 fi
4169
4170
4171 echo $ac_n "checking for fcntl locking ... $ac_c"
4172 if test "$cross_compiling" = yes; then
4173     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4174 else
4175   cat > conftest.$ac_ext <<EOF
4176 #line 4177 "configure"
4177 #include "confdefs.h"
4178 #include "tests/fcntl_lock.c"
4179 EOF
4180 if { (eval echo configure:4181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4181 then
4182   echo yes;cat >> confdefs.h <<\EOF
4183 #define HAVE_FCNTL_LOCK 1
4184 EOF
4185
4186 else
4187   echo "configure: failed program was:" >&5
4188   cat conftest.$ac_ext >&5
4189   rm -fr conftest*
4190   echo no
4191 fi
4192 rm -fr conftest*
4193 fi
4194
4195
4196 echo $ac_n "checking for 64 bit fcntl locking ... $ac_c"
4197 if test "$cross_compiling" = yes; then
4198     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4199 else
4200   cat > conftest.$ac_ext <<EOF
4201 #line 4202 "configure"
4202 #include "confdefs.h"
4203
4204 #include <stdio.h>
4205 #include <stdlib.h>
4206
4207 #ifdef HAVE_FCNTL_H
4208 #include <fcntl.h>
4209 #endif
4210
4211 #ifdef HAVE_SYS_FCNTL_H
4212 #include <sys/fcntl.h>
4213 #endif
4214 main() { struct flock64 fl64;
4215 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
4216 exit(0);
4217 #else
4218 exit(1);
4219 #endif
4220 }
4221 EOF
4222 if { (eval echo configure:4223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4223 then
4224   echo yes;cat >> confdefs.h <<\EOF
4225 #define HAVE_STRUCT_FLOCK64 1
4226 EOF
4227
4228 else
4229   echo "configure: failed program was:" >&5
4230   cat conftest.$ac_ext >&5
4231   rm -fr conftest*
4232   echo no
4233 fi
4234 rm -fr conftest*
4235 fi
4236
4237
4238 echo $ac_n "checking for sysv ipc ... $ac_c"
4239 if test "$cross_compiling" = yes; then
4240     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4241 else
4242   cat > conftest.$ac_ext <<EOF
4243 #line 4244 "configure"
4244 #include "confdefs.h"
4245 #include "tests/sysv_ipc.c"
4246 EOF
4247 if { (eval echo configure:4248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4248 then
4249   echo yes;cat >> confdefs.h <<\EOF
4250 #define HAVE_SYSV_IPC 1
4251 EOF
4252
4253 else
4254   echo "configure: failed program was:" >&5
4255   cat conftest.$ac_ext >&5
4256   rm -fr conftest*
4257   echo no
4258 fi
4259 rm -fr conftest*
4260 fi
4261
4262
4263 #################################################
4264 # check for the AFS filesystem
4265 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
4266 echo "configure:4267: checking whether to use AFS" >&5
4267 # Check whether --with-afs or --without-afs was given.
4268 if test "${with_afs+set}" = set; then
4269   withval="$with_afs"
4270    case "$withval" in
4271   yes)
4272     echo "$ac_t""yes" 1>&6
4273     cat >> confdefs.h <<\EOF
4274 #define WITH_AFS 1
4275 EOF
4276
4277     ;;
4278   *)
4279     echo "$ac_t""no" 1>&6
4280     ;;
4281   esac 
4282 else
4283   echo "$ac_t""no" 1>&6
4284
4285 fi
4286
4287
4288
4289 #################################################
4290 # check for the DFS auth system
4291 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
4292 echo "configure:4293: checking whether to use DFS auth" >&5
4293 # Check whether --with-dfs or --without-dfs was given.
4294 if test "${with_dfs+set}" = set; then
4295   withval="$with_dfs"
4296    case "$withval" in
4297   yes)
4298     echo "$ac_t""yes" 1>&6
4299     cat >> confdefs.h <<\EOF
4300 #define WITH_DFS 1
4301 EOF
4302
4303     ;;
4304   *)
4305     echo "$ac_t""no" 1>&6
4306     ;;
4307   esac 
4308 else
4309   echo "$ac_t""no" 1>&6
4310
4311 fi
4312
4313
4314 #################################################
4315 # check for automount support
4316 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
4317 echo "configure:4318: checking whether to use AUTOMOUNT" >&5
4318 # Check whether --with-automount or --without-automount was given.
4319 if test "${with_automount+set}" = set; then
4320   withval="$with_automount"
4321    case "$withval" in
4322   yes)
4323     echo "$ac_t""yes" 1>&6
4324     cat >> confdefs.h <<\EOF
4325 #define WITH_AUTOMOUNT 1
4326 EOF
4327
4328     ;;
4329   *)
4330     echo "$ac_t""no" 1>&6
4331     ;;
4332   esac 
4333 else
4334   echo "$ac_t""no" 1>&6
4335
4336 fi
4337
4338
4339 #################################################
4340 # check for a LDAP password database
4341 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
4342 echo "configure:4343: checking whether to use LDAP password database" >&5
4343 # Check whether --with-ldap or --without-ldap was given.
4344 if test "${with_ldap+set}" = set; then
4345   withval="$with_ldap"
4346    case "$withval" in
4347   yes)
4348     echo "$ac_t""yes" 1>&6
4349     cat >> confdefs.h <<\EOF
4350 #define WITH_LDAP 1
4351 EOF
4352
4353     ;;
4354   *)
4355     echo "$ac_t""no" 1>&6
4356     ;;
4357   esac 
4358 else
4359   echo "$ac_t""no" 1>&6
4360
4361 fi
4362
4363
4364 #################################################
4365 # check for a NISPLUS password database
4366 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
4367 echo "configure:4368: checking whether to use NISPLUS password database" >&5
4368 # Check whether --with-nisplus or --without-nisplus was given.
4369 if test "${with_nisplus+set}" = set; then
4370   withval="$with_nisplus"
4371    case "$withval" in
4372   yes)
4373     echo "$ac_t""yes" 1>&6
4374     cat >> confdefs.h <<\EOF
4375 #define WITH_NISPLUS 1
4376 EOF
4377
4378     ;;
4379   *)
4380     echo "$ac_t""no" 1>&6
4381     ;;
4382   esac 
4383 else
4384   echo "$ac_t""no" 1>&6
4385
4386 fi
4387
4388
4389 #################################################
4390 # check for a NISPLUS_HOME support 
4391 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
4392 echo "configure:4393: checking whether to use NISPLUS_HOME" >&5
4393 # Check whether --with-nisplus-home or --without-nisplus-home was given.
4394 if test "${with_nisplus_home+set}" = set; then
4395   withval="$with_nisplus_home"
4396    case "$withval" in
4397   yes)
4398     echo "$ac_t""yes" 1>&6
4399     cat >> confdefs.h <<\EOF
4400 #define WITH_NISPLUS_HOME 1
4401 EOF
4402
4403     ;;
4404   *)
4405     echo "$ac_t""no" 1>&6
4406     ;;
4407   esac 
4408 else
4409   echo "$ac_t""no" 1>&6
4410
4411 fi
4412
4413
4414 #################################################
4415 # check for the secure socket layer
4416 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
4417 echo "configure:4418: checking whether to use SSL" >&5
4418 # Check whether --with-ssl or --without-ssl was given.
4419 if test "${with_ssl+set}" = set; then
4420   withval="$with_ssl"
4421    case "$withval" in
4422   yes)
4423     echo "$ac_t""yes" 1>&6
4424     cat >> confdefs.h <<\EOF
4425 #define WITH_SSL 1
4426 EOF
4427
4428     ;;
4429   *)
4430     echo "$ac_t""no" 1>&6
4431     ;;
4432   esac 
4433 else
4434   echo "$ac_t""no" 1>&6
4435
4436 fi
4437
4438
4439 #################################################
4440 # check for experimental mmap support
4441 echo $ac_n "checking whether to use MMAP""... $ac_c" 1>&6
4442 echo "configure:4443: checking whether to use MMAP" >&5
4443 # Check whether --with-mmap or --without-mmap was given.
4444 if test "${with_mmap+set}" = set; then
4445   withval="$with_mmap"
4446    case "$withval" in
4447   yes)
4448     echo "$ac_t""yes" 1>&6
4449     cat >> confdefs.h <<\EOF
4450 #define WITH_MMAP 1
4451 EOF
4452
4453     ;;
4454   *)
4455     echo "$ac_t""no" 1>&6
4456     ;;
4457   esac 
4458 else
4459   echo "$ac_t""no" 1>&6
4460
4461 fi
4462
4463
4464 #################################################
4465 # check for syslog logging
4466 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
4467 echo "configure:4468: checking whether to use syslog logging" >&5
4468 # Check whether --with-syslog or --without-syslog was given.
4469 if test "${with_syslog+set}" = set; then
4470   withval="$with_syslog"
4471    case "$withval" in
4472   yes)
4473     echo "$ac_t""yes" 1>&6
4474     cat >> confdefs.h <<\EOF
4475 #define WITH_SYSLOG 1
4476 EOF
4477
4478     ;;
4479   *)
4480     echo "$ac_t""no" 1>&6
4481     ;;
4482   esac 
4483 else
4484   echo "$ac_t""no" 1>&6
4485
4486 fi
4487
4488
4489 #################################################
4490 # check for experimental netatalk resource fork support
4491 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
4492 echo "configure:4493: checking whether to support netatalk" >&5
4493 # Check whether --with-netatalk or --without-netatalk was given.
4494 if test "${with_netatalk+set}" = set; then
4495   withval="$with_netatalk"
4496    case "$withval" in
4497   yes)
4498     echo "$ac_t""yes" 1>&6
4499     cat >> confdefs.h <<\EOF
4500 #define WITH_NETATALK 1
4501 EOF
4502
4503     ;;
4504   *)
4505     echo "$ac_t""no" 1>&6
4506     ;;
4507   esac 
4508 else
4509   echo "$ac_t""no" 1>&6
4510
4511 fi
4512
4513
4514
4515 #################################################
4516 # these tests are taken from the GNU fileutils package
4517 echo "checking how to get filesystem space usage" 1>&6
4518 echo "configure:4519: checking how to get filesystem space usage" >&5
4519 space=no
4520
4521 # Perform only the link test since it seems there are no variants of the
4522 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
4523 # because that got a false positive on SCO OSR5.  Adding the declaration
4524 # of a `struct statvfs' causes this test to fail (as it should) on such
4525 # systems.  That system is reported to work fine with STAT_STATFS4 which
4526 # is what it gets when this test fails.
4527 if test $space = no; then
4528   # SVR4
4529   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
4530 echo "configure:4531: checking statvfs function (SVR4)" >&5
4531 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
4532   echo $ac_n "(cached) $ac_c" 1>&6
4533 else
4534   cat > conftest.$ac_ext <<EOF
4535 #line 4536 "configure"
4536 #include "confdefs.h"
4537 #include <sys/types.h>
4538 #include <sys/statvfs.h>
4539 int main() {
4540 struct statvfs fsd; statvfs (0, &fsd);
4541 ; return 0; }
4542 EOF
4543 if { (eval echo configure:4544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4544   rm -rf conftest*
4545   fu_cv_sys_stat_statvfs=yes
4546 else
4547   echo "configure: failed program was:" >&5
4548   cat conftest.$ac_ext >&5
4549   rm -rf conftest*
4550   fu_cv_sys_stat_statvfs=no
4551 fi
4552 rm -f conftest*
4553 fi
4554
4555 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
4556   if test $fu_cv_sys_stat_statvfs = yes; then
4557     space=yes
4558     cat >> confdefs.h <<\EOF
4559 #define STAT_STATVFS 1
4560 EOF
4561
4562   fi
4563 fi
4564
4565 if test $space = no; then
4566   # DEC Alpha running OSF/1
4567   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
4568 echo "configure:4569: checking for 3-argument statfs function (DEC OSF/1)" >&5
4569   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
4570   echo $ac_n "(cached) $ac_c" 1>&6
4571 else
4572   if test "$cross_compiling" = yes; then
4573   fu_cv_sys_stat_statfs3_osf1=no
4574 else
4575   cat > conftest.$ac_ext <<EOF
4576 #line 4577 "configure"
4577 #include "confdefs.h"
4578
4579 #include <sys/param.h>
4580 #include <sys/types.h>
4581 #include <sys/mount.h>
4582   main ()
4583   {
4584     struct statfs fsd;
4585     fsd.f_fsize = 0;
4586     exit (statfs (".", &fsd, sizeof (struct statfs)));
4587   }
4588 EOF
4589 if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4590 then
4591   fu_cv_sys_stat_statfs3_osf1=yes
4592 else
4593   echo "configure: failed program was:" >&5
4594   cat conftest.$ac_ext >&5
4595   rm -fr conftest*
4596   fu_cv_sys_stat_statfs3_osf1=no
4597 fi
4598 rm -fr conftest*
4599 fi
4600
4601 fi
4602
4603   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
4604   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
4605     space=yes
4606     cat >> confdefs.h <<\EOF
4607 #define STAT_STATFS3_OSF1 1
4608 EOF
4609
4610   fi
4611 fi
4612
4613 if test $space = no; then
4614 # AIX
4615   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
4616 echo "configure:4617: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
4617   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
4618   echo $ac_n "(cached) $ac_c" 1>&6
4619 else
4620   if test "$cross_compiling" = yes; then
4621   fu_cv_sys_stat_statfs2_bsize=no
4622 else
4623   cat > conftest.$ac_ext <<EOF
4624 #line 4625 "configure"
4625 #include "confdefs.h"
4626
4627 #ifdef HAVE_SYS_PARAM_H
4628 #include <sys/param.h>
4629 #endif
4630 #ifdef HAVE_SYS_MOUNT_H
4631 #include <sys/mount.h>
4632 #endif
4633 #ifdef HAVE_SYS_VFS_H
4634 #include <sys/vfs.h>
4635 #endif
4636   main ()
4637   {
4638   struct statfs fsd;
4639   fsd.f_bsize = 0;
4640   exit (statfs (".", &fsd));
4641   }
4642 EOF
4643 if { (eval echo configure:4644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4644 then
4645   fu_cv_sys_stat_statfs2_bsize=yes
4646 else
4647   echo "configure: failed program was:" >&5
4648   cat conftest.$ac_ext >&5
4649   rm -fr conftest*
4650   fu_cv_sys_stat_statfs2_bsize=no
4651 fi
4652 rm -fr conftest*
4653 fi
4654
4655 fi
4656
4657   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
4658   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
4659     space=yes
4660     cat >> confdefs.h <<\EOF
4661 #define STAT_STATFS2_BSIZE 1
4662 EOF
4663
4664   fi
4665 fi
4666
4667 if test $space = no; then
4668 # SVR3
4669   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
4670 echo "configure:4671: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
4671   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
4672   echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674   if test "$cross_compiling" = yes; then
4675   fu_cv_sys_stat_statfs4=no
4676 else
4677   cat > conftest.$ac_ext <<EOF
4678 #line 4679 "configure"
4679 #include "confdefs.h"
4680 #include <sys/types.h>
4681 #include <sys/statfs.h>
4682   main ()
4683   {
4684   struct statfs fsd;
4685   exit (statfs (".", &fsd, sizeof fsd, 0));
4686   }
4687 EOF
4688 if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4689 then
4690   fu_cv_sys_stat_statfs4=yes
4691 else
4692   echo "configure: failed program was:" >&5
4693   cat conftest.$ac_ext >&5
4694   rm -fr conftest*
4695   fu_cv_sys_stat_statfs4=no
4696 fi
4697 rm -fr conftest*
4698 fi
4699
4700 fi
4701
4702   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
4703   if test $fu_cv_sys_stat_statfs4 = yes; then
4704     space=yes
4705     cat >> confdefs.h <<\EOF
4706 #define STAT_STATFS4 1
4707 EOF
4708
4709   fi
4710 fi
4711
4712 if test $space = no; then
4713 # 4.4BSD and NetBSD
4714   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
4715 echo "configure:4716: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
4716   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
4717   echo $ac_n "(cached) $ac_c" 1>&6
4718 else
4719   if test "$cross_compiling" = yes; then
4720   fu_cv_sys_stat_statfs2_fsize=no
4721 else
4722   cat > conftest.$ac_ext <<EOF
4723 #line 4724 "configure"
4724 #include "confdefs.h"
4725 #include <sys/types.h>
4726 #ifdef HAVE_SYS_PARAM_H
4727 #include <sys/param.h>
4728 #endif
4729 #ifdef HAVE_SYS_MOUNT_H
4730 #include <sys/mount.h>
4731 #endif
4732   main ()
4733   {
4734   struct statfs fsd;
4735   fsd.f_fsize = 0;
4736   exit (statfs (".", &fsd));
4737   }
4738 EOF
4739 if { (eval echo configure:4740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4740 then
4741   fu_cv_sys_stat_statfs2_fsize=yes
4742 else
4743   echo "configure: failed program was:" >&5
4744   cat conftest.$ac_ext >&5
4745   rm -fr conftest*
4746   fu_cv_sys_stat_statfs2_fsize=no
4747 fi
4748 rm -fr conftest*
4749 fi
4750
4751 fi
4752
4753   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
4754   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
4755     space=yes
4756     cat >> confdefs.h <<\EOF
4757 #define STAT_STATFS2_FSIZE 1
4758 EOF
4759
4760   fi
4761 fi
4762
4763 if test $space = no; then
4764   # Ultrix
4765   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
4766 echo "configure:4767: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
4767   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
4768   echo $ac_n "(cached) $ac_c" 1>&6
4769 else
4770   if test "$cross_compiling" = yes; then
4771   fu_cv_sys_stat_fs_data=no
4772 else
4773   cat > conftest.$ac_ext <<EOF
4774 #line 4775 "configure"
4775 #include "confdefs.h"
4776 #include <sys/types.h>
4777 #ifdef HAVE_SYS_PARAM_H
4778 #include <sys/param.h>
4779 #endif
4780 #ifdef HAVE_SYS_MOUNT_H
4781 #include <sys/mount.h>
4782 #endif
4783 #ifdef HAVE_SYS_FS_TYPES_H
4784 #include <sys/fs_types.h>
4785 #endif
4786   main ()
4787   {
4788   struct fs_data fsd;
4789   /* Ultrix's statfs returns 1 for success,
4790      0 for not mounted, -1 for failure.  */
4791   exit (statfs (".", &fsd) != 1);
4792   }
4793 EOF
4794 if { (eval echo configure:4795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4795 then
4796   fu_cv_sys_stat_fs_data=yes
4797 else
4798   echo "configure: failed program was:" >&5
4799   cat conftest.$ac_ext >&5
4800   rm -fr conftest*
4801   fu_cv_sys_stat_fs_data=no
4802 fi
4803 rm -fr conftest*
4804 fi
4805
4806 fi
4807
4808   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
4809   if test $fu_cv_sys_stat_fs_data = yes; then
4810     space=yes
4811     cat >> confdefs.h <<\EOF
4812 #define STAT_STATFS2_FS_DATA 1
4813 EOF
4814
4815   fi
4816 fi
4817
4818
4819 trap '' 1 2 15
4820 cat > confcache <<\EOF
4821 # This file is a shell script that caches the results of configure
4822 # tests run on this system so they can be shared between configure
4823 # scripts and configure runs.  It is not useful on other systems.
4824 # If it contains results you don't want to keep, you may remove or edit it.
4825 #
4826 # By default, configure uses ./config.cache as the cache file,
4827 # creating it if it does not exist already.  You can give configure
4828 # the --cache-file=FILE option to use a different cache file; that is
4829 # what configure does when it calls configure scripts in
4830 # subdirectories, so they share the cache.
4831 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4832 # config.status only pays attention to the cache file if you give it the
4833 # --recheck option to rerun configure.
4834 #
4835 EOF
4836 # The following way of writing the cache mishandles newlines in values,
4837 # but we know of no workaround that is simple, portable, and efficient.
4838 # So, don't put newlines in cache variables' values.
4839 # Ultrix sh set writes to stderr and can't be redirected directly,
4840 # and sets the high bit in the cache file unless we assign to the vars.
4841 (set) 2>&1 |
4842   case `(ac_space=' '; set) 2>&1` in
4843   *ac_space=\ *)
4844     # `set' does not quote correctly, so add quotes (double-quote substitution
4845     # turns \\\\ into \\, and sed turns \\ into \).
4846     sed -n \
4847       -e "s/'/'\\\\''/g" \
4848       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4849     ;;
4850   *)
4851     # `set' quotes correctly as required by POSIX, so do not add quotes.
4852     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4853     ;;
4854   esac >> confcache
4855 if cmp -s $cache_file confcache; then
4856   :
4857 else
4858   if test -w $cache_file; then
4859     echo "updating cache $cache_file"
4860     cat confcache > $cache_file
4861   else
4862     echo "not updating unwritable cache $cache_file"
4863   fi
4864 fi
4865 rm -f confcache
4866
4867 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4868
4869 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4870 # Let make expand exec_prefix.
4871 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4872
4873 # Any assignment to VPATH causes Sun make to only execute
4874 # the first set of double-colon rules, so remove it if not needed.
4875 # If there is a colon in the path, we need to keep it.
4876 if test "x$srcdir" = x.; then
4877   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4878 fi
4879
4880 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4881
4882 DEFS=-DHAVE_CONFIG_H
4883
4884 # Without the "./", some shells look in PATH for config.status.
4885 : ${CONFIG_STATUS=./config.status}
4886
4887 echo creating $CONFIG_STATUS
4888 rm -f $CONFIG_STATUS
4889 cat > $CONFIG_STATUS <<EOF
4890 #! /bin/sh
4891 # Generated automatically by configure.
4892 # Run this file to recreate the current configuration.
4893 # This directory was configured as follows,
4894 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4895 #
4896 # $0 $ac_configure_args
4897 #
4898 # Compiler output produced by configure, useful for debugging
4899 # configure, is in ./config.log if it exists.
4900
4901 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4902 for ac_option
4903 do
4904   case "\$ac_option" in
4905   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4906     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4907     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4908   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4909     echo "$CONFIG_STATUS generated by autoconf version 2.12"
4910     exit 0 ;;
4911   -help | --help | --hel | --he | --h)
4912     echo "\$ac_cs_usage"; exit 0 ;;
4913   *) echo "\$ac_cs_usage"; exit 1 ;;
4914   esac
4915 done
4916
4917 ac_given_srcdir=$srcdir
4918 ac_given_INSTALL="$INSTALL"
4919
4920 trap 'rm -fr `echo "Makefile tests/dummy client/dummy lib/dummy ubiqx/dummy
4921 web/dummy param/dummy nmbd/dummy smbd/dummy rpc_server/dummy
4922 rpc_parse/dummy script/dummy include/dummy codepages/dummy
4923 libsmb/dummy bin/dummy printing/dummy include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4924 EOF
4925 cat >> $CONFIG_STATUS <<EOF
4926
4927 # Protect against being on the right side of a sed subst in config.status.
4928 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4929  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4930 $ac_vpsub
4931 $extrasub
4932 s%@CFLAGS@%$CFLAGS%g
4933 s%@CPPFLAGS@%$CPPFLAGS%g
4934 s%@CXXFLAGS@%$CXXFLAGS%g
4935 s%@DEFS@%$DEFS%g
4936 s%@LDFLAGS@%$LDFLAGS%g
4937 s%@LIBS@%$LIBS%g
4938 s%@exec_prefix@%$exec_prefix%g
4939 s%@prefix@%$prefix%g
4940 s%@program_transform_name@%$program_transform_name%g
4941 s%@bindir@%$bindir%g
4942 s%@sbindir@%$sbindir%g
4943 s%@libexecdir@%$libexecdir%g
4944 s%@datadir@%$datadir%g
4945 s%@sysconfdir@%$sysconfdir%g
4946 s%@sharedstatedir@%$sharedstatedir%g
4947 s%@localstatedir@%$localstatedir%g
4948 s%@libdir@%$libdir%g
4949 s%@includedir@%$includedir%g
4950 s%@oldincludedir@%$oldincludedir%g
4951 s%@infodir@%$infodir%g
4952 s%@mandir@%$mandir%g
4953 s%@CC@%$CC%g
4954 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4955 s%@INSTALL_DATA@%$INSTALL_DATA%g
4956 s%@SHELL@%$SHELL%g
4957 s%@AWK@%$AWK%g
4958 s%@host@%$host%g
4959 s%@host_alias@%$host_alias%g
4960 s%@host_cpu@%$host_cpu%g
4961 s%@host_vendor@%$host_vendor%g
4962 s%@host_os@%$host_os%g
4963 s%@target@%$target%g
4964 s%@target_alias@%$target_alias%g
4965 s%@target_cpu@%$target_cpu%g
4966 s%@target_vendor@%$target_vendor%g
4967 s%@target_os@%$target_os%g
4968 s%@build@%$build%g
4969 s%@build_alias@%$build_alias%g
4970 s%@build_cpu@%$build_cpu%g
4971 s%@build_vendor@%$build_vendor%g
4972 s%@build_os@%$build_os%g
4973 s%@CPP@%$CPP%g
4974 s%@LIBOBJS@%$LIBOBJS%g
4975
4976 CEOF
4977 EOF
4978
4979 cat >> $CONFIG_STATUS <<\EOF
4980
4981 # Split the substitutions into bite-sized pieces for seds with
4982 # small command number limits, like on Digital OSF/1 and HP-UX.
4983 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4984 ac_file=1 # Number of current file.
4985 ac_beg=1 # First line for current file.
4986 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4987 ac_more_lines=:
4988 ac_sed_cmds=""
4989 while $ac_more_lines; do
4990   if test $ac_beg -gt 1; then
4991     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4992   else
4993     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4994   fi
4995   if test ! -s conftest.s$ac_file; then
4996     ac_more_lines=false
4997     rm -f conftest.s$ac_file
4998   else
4999     if test -z "$ac_sed_cmds"; then
5000       ac_sed_cmds="sed -f conftest.s$ac_file"
5001     else
5002       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5003     fi
5004     ac_file=`expr $ac_file + 1`
5005     ac_beg=$ac_end
5006     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5007   fi
5008 done
5009 if test -z "$ac_sed_cmds"; then
5010   ac_sed_cmds=cat
5011 fi
5012 EOF
5013
5014 cat >> $CONFIG_STATUS <<EOF
5015
5016 CONFIG_FILES=\${CONFIG_FILES-"Makefile tests/dummy client/dummy lib/dummy ubiqx/dummy
5017 web/dummy param/dummy nmbd/dummy smbd/dummy rpc_server/dummy
5018 rpc_parse/dummy script/dummy include/dummy codepages/dummy
5019 libsmb/dummy bin/dummy printing/dummy"}
5020 EOF
5021 cat >> $CONFIG_STATUS <<\EOF
5022 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5023   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5024   case "$ac_file" in
5025   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5026        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5027   *) ac_file_in="${ac_file}.in" ;;
5028   esac
5029
5030   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5031
5032   # Remove last slash and all that follows it.  Not all systems have dirname.
5033   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5034   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5035     # The file is in a subdirectory.
5036     test ! -d "$ac_dir" && mkdir "$ac_dir"
5037     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5038     # A "../" for each directory in $ac_dir_suffix.
5039     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5040   else
5041     ac_dir_suffix= ac_dots=
5042   fi
5043
5044   case "$ac_given_srcdir" in
5045   .)  srcdir=.
5046       if test -z "$ac_dots"; then top_srcdir=.
5047       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5048   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5049   *) # Relative path.
5050     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5051     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5052   esac
5053
5054   case "$ac_given_INSTALL" in
5055   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5056   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5057   esac
5058
5059   echo creating "$ac_file"
5060   rm -f "$ac_file"
5061   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5062   case "$ac_file" in
5063   *Makefile*) ac_comsub="1i\\
5064 # $configure_input" ;;
5065   *) ac_comsub= ;;
5066   esac
5067
5068   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5069   sed -e "$ac_comsub
5070 s%@configure_input@%$configure_input%g
5071 s%@srcdir@%$srcdir%g
5072 s%@top_srcdir@%$top_srcdir%g
5073 s%@INSTALL@%$INSTALL%g
5074 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5075 fi; done
5076 rm -f conftest.s*
5077
5078 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5079 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5080 #
5081 # ac_d sets the value in "#define NAME VALUE" lines.
5082 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5083 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5084 ac_dC='\3'
5085 ac_dD='%g'
5086 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5087 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5088 ac_uB='\([      ]\)%\1#\2define\3'
5089 ac_uC=' '
5090 ac_uD='\4%g'
5091 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5092 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5093 ac_eB='$%\1#\2define\3'
5094 ac_eC=' '
5095 ac_eD='%g'
5096
5097 if test "${CONFIG_HEADERS+set}" != set; then
5098 EOF
5099 cat >> $CONFIG_STATUS <<EOF
5100   CONFIG_HEADERS="include/config.h"
5101 EOF
5102 cat >> $CONFIG_STATUS <<\EOF
5103 fi
5104 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5105   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5106   case "$ac_file" in
5107   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5108        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5109   *) ac_file_in="${ac_file}.in" ;;
5110   esac
5111
5112   echo creating $ac_file
5113
5114   rm -f conftest.frag conftest.in conftest.out
5115   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5116   cat $ac_file_inputs > conftest.in
5117
5118 EOF
5119
5120 # Transform confdefs.h into a sed script conftest.vals that substitutes
5121 # the proper values into config.h.in to produce config.h.  And first:
5122 # Protect against being on the right side of a sed subst in config.status.
5123 # Protect against being in an unquoted here document in config.status.
5124 rm -f conftest.vals
5125 cat > conftest.hdr <<\EOF
5126 s/[\\&%]/\\&/g
5127 s%[\\$`]%\\&%g
5128 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5129 s%ac_d%ac_u%gp
5130 s%ac_u%ac_e%gp
5131 EOF
5132 sed -n -f conftest.hdr confdefs.h > conftest.vals
5133 rm -f conftest.hdr
5134
5135 # This sed command replaces #undef with comments.  This is necessary, for
5136 # example, in the case of _POSIX_SOURCE, which is predefined and required
5137 # on some systems where configure will not decide to define it.
5138 cat >> conftest.vals <<\EOF
5139 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5140 EOF
5141
5142 # Break up conftest.vals because some shells have a limit on
5143 # the size of here documents, and old seds have small limits too.
5144
5145 rm -f conftest.tail
5146 while :
5147 do
5148   ac_lines=`grep -c . conftest.vals`
5149   # grep -c gives empty output for an empty file on some AIX systems.
5150   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5151   # Write a limited-size here document to conftest.frag.
5152   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5153   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5154   echo 'CEOF
5155   sed -f conftest.frag conftest.in > conftest.out
5156   rm -f conftest.in
5157   mv conftest.out conftest.in
5158 ' >> $CONFIG_STATUS
5159   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5160   rm -f conftest.vals
5161   mv conftest.tail conftest.vals
5162 done
5163 rm -f conftest.vals
5164
5165 cat >> $CONFIG_STATUS <<\EOF
5166   rm -f conftest.frag conftest.h
5167   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5168   cat conftest.in >> conftest.h
5169   rm -f conftest.in
5170   if cmp -s $ac_file conftest.h 2>/dev/null; then
5171     echo "$ac_file is unchanged"
5172     rm -f conftest.h
5173   else
5174     # Remove last slash and all that follows it.  Not all systems have dirname.
5175       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5176       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5177       # The file is in a subdirectory.
5178       test ! -d "$ac_dir" && mkdir "$ac_dir"
5179     fi
5180     rm -f $ac_file
5181     mv conftest.h $ac_file
5182   fi
5183 fi; done
5184
5185 EOF
5186 cat >> $CONFIG_STATUS <<EOF
5187
5188 EOF
5189 cat >> $CONFIG_STATUS <<\EOF
5190
5191 exit 0
5192 EOF
5193 chmod +x $CONFIG_STATUS
5194 rm -fr confdefs* $ac_clean_files
5195 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5196