Added ssize_t to configure code.
[samba.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-afs     Include AFS support
16   --without-afs  Don't include AFS support (default)"
17 ac_help="$ac_help
18   --with-dfs     Include DFS support
19   --without-dfs  Don't include DFS support (default)"
20 ac_help="$ac_help
21   --with-automount     Include AUTOMOUNT support
22   --without-automount  Don't include AUTOMOUNT support (default)"
23 ac_help="$ac_help
24   --with-ldap     Include LDAP support
25   --without-ldap  Don't include LDAP support (default)"
26 ac_help="$ac_help
27   --with-nisplus     Include NISPLUS password database support
28   --without-nisplus  Don't include NISPLUS password database support (default)"
29 ac_help="$ac_help
30   --with-nisplus-home     Include NISPLUS_HOME support
31   --without-nisplus-home  Don't include NISPLUS_HOME support (default)"
32 ac_help="$ac_help
33   --with-ssl     Include SSL support
34   --without-ssl  Don't include SSL support (default)"
35 ac_help="$ac_help
36   --with-mmap     Include experimental MMAP support
37   --without-mmap  Don't include MMAP support (default)"
38 ac_help="$ac_help
39   --with-syslog     Include experimental SYSLOG support
40   --without-syslog  Don't include SYSLOG support (default)"
41 ac_help="$ac_help
42   --with-netatalk     Include experimental Netatalk support
43   --without-netatalk  Don't include experimental Netatalk support (default)"
44
45 # Initialize some variables set by options.
46 # The variables have the same names as the options, with
47 # dashes changed to underlines.
48 build=NONE
49 cache_file=./config.cache
50 exec_prefix=NONE
51 host=NONE
52 no_create=
53 nonopt=NONE
54 no_recursion=
55 prefix=NONE
56 program_prefix=NONE
57 program_suffix=NONE
58 program_transform_name=s,x,x,
59 silent=
60 site=
61 srcdir=
62 target=NONE
63 verbose=
64 x_includes=NONE
65 x_libraries=NONE
66 bindir='${exec_prefix}/bin'
67 sbindir='${exec_prefix}/sbin'
68 libexecdir='${exec_prefix}/libexec'
69 datadir='${prefix}/share'
70 sysconfdir='${prefix}/etc'
71 sharedstatedir='${prefix}/com'
72 localstatedir='${prefix}/var'
73 libdir='${exec_prefix}/lib'
74 includedir='${prefix}/include'
75 oldincludedir='/usr/include'
76 infodir='${prefix}/info'
77 mandir='${prefix}/man'
78
79 # Initialize some other variables.
80 subdirs=
81 MFLAGS= MAKEFLAGS=
82 # Maximum number of lines to put in a shell here document.
83 ac_max_here_lines=12
84
85 ac_prev=
86 for ac_option
87 do
88
89   # If the previous option needs an argument, assign it.
90   if test -n "$ac_prev"; then
91     eval "$ac_prev=\$ac_option"
92     ac_prev=
93     continue
94   fi
95
96   case "$ac_option" in
97   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
98   *) ac_optarg= ;;
99   esac
100
101   # Accept the important Cygnus configure options, so we can diagnose typos.
102
103   case "$ac_option" in
104
105   -bindir | --bindir | --bindi | --bind | --bin | --bi)
106     ac_prev=bindir ;;
107   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
108     bindir="$ac_optarg" ;;
109
110   -build | --build | --buil | --bui | --bu)
111     ac_prev=build ;;
112   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
113     build="$ac_optarg" ;;
114
115   -cache-file | --cache-file | --cache-fil | --cache-fi \
116   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
117     ac_prev=cache_file ;;
118   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
119   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
120     cache_file="$ac_optarg" ;;
121
122   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
123     ac_prev=datadir ;;
124   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
125   | --da=*)
126     datadir="$ac_optarg" ;;
127
128   -disable-* | --disable-*)
129     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
130     # Reject names that are not valid shell variable names.
131     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
132       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
133     fi
134     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
135     eval "enable_${ac_feature}=no" ;;
136
137   -enable-* | --enable-*)
138     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
139     # Reject names that are not valid shell variable names.
140     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
141       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
142     fi
143     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
144     case "$ac_option" in
145       *=*) ;;
146       *) ac_optarg=yes ;;
147     esac
148     eval "enable_${ac_feature}='$ac_optarg'" ;;
149
150   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
151   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
152   | --exec | --exe | --ex)
153     ac_prev=exec_prefix ;;
154   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
155   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
156   | --exec=* | --exe=* | --ex=*)
157     exec_prefix="$ac_optarg" ;;
158
159   -gas | --gas | --ga | --g)
160     # Obsolete; use --with-gas.
161     with_gas=yes ;;
162
163   -help | --help | --hel | --he)
164     # Omit some internal or obsolete options to make the list less imposing.
165     # This message is too long to be a string in the A/UX 3.1 sh.
166     cat << EOF
167 Usage: configure [options] [host]
168 Options: [defaults in brackets after descriptions]
169 Configuration:
170   --cache-file=FILE       cache test results in FILE
171   --help                  print this message
172   --no-create             do not create output files
173   --quiet, --silent       do not print \`checking...' messages
174   --version               print the version of autoconf that created configure
175 Directory and file names:
176   --prefix=PREFIX         install architecture-independent files in PREFIX
177                           [$ac_default_prefix]
178   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
179                           [same as prefix]
180   --bindir=DIR            user executables in DIR [EPREFIX/bin]
181   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
182   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
183   --datadir=DIR           read-only architecture-independent data in DIR
184                           [PREFIX/share]
185   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
186   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
187                           [PREFIX/com]
188   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
189   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
190   --includedir=DIR        C header files in DIR [PREFIX/include]
191   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
192   --infodir=DIR           info documentation in DIR [PREFIX/info]
193   --mandir=DIR            man documentation in DIR [PREFIX/man]
194   --srcdir=DIR            find the sources in DIR [configure dir or ..]
195   --program-prefix=PREFIX prepend PREFIX to installed program names
196   --program-suffix=SUFFIX append SUFFIX to installed program names
197   --program-transform-name=PROGRAM
198                           run sed PROGRAM on installed program names
199 EOF
200     cat << EOF
201 Host type:
202   --build=BUILD           configure for building on BUILD [BUILD=HOST]
203   --host=HOST             configure for HOST [guessed]
204   --target=TARGET         configure for TARGET [TARGET=HOST]
205 Features and packages:
206   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
207   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
208   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
209   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
210   --x-includes=DIR        X include files are in DIR
211   --x-libraries=DIR       X library files are in DIR
212 EOF
213     if test -n "$ac_help"; then
214       echo "--enable and --with options recognized:$ac_help"
215     fi
216     exit 0 ;;
217
218   -host | --host | --hos | --ho)
219     ac_prev=host ;;
220   -host=* | --host=* | --hos=* | --ho=*)
221     host="$ac_optarg" ;;
222
223   -includedir | --includedir | --includedi | --included | --include \
224   | --includ | --inclu | --incl | --inc)
225     ac_prev=includedir ;;
226   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
227   | --includ=* | --inclu=* | --incl=* | --inc=*)
228     includedir="$ac_optarg" ;;
229
230   -infodir | --infodir | --infodi | --infod | --info | --inf)
231     ac_prev=infodir ;;
232   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
233     infodir="$ac_optarg" ;;
234
235   -libdir | --libdir | --libdi | --libd)
236     ac_prev=libdir ;;
237   -libdir=* | --libdir=* | --libdi=* | --libd=*)
238     libdir="$ac_optarg" ;;
239
240   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
241   | --libexe | --libex | --libe)
242     ac_prev=libexecdir ;;
243   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
244   | --libexe=* | --libex=* | --libe=*)
245     libexecdir="$ac_optarg" ;;
246
247   -localstatedir | --localstatedir | --localstatedi | --localstated \
248   | --localstate | --localstat | --localsta | --localst \
249   | --locals | --local | --loca | --loc | --lo)
250     ac_prev=localstatedir ;;
251   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
252   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
253   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
254     localstatedir="$ac_optarg" ;;
255
256   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
257     ac_prev=mandir ;;
258   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
259     mandir="$ac_optarg" ;;
260
261   -nfp | --nfp | --nf)
262     # Obsolete; use --without-fp.
263     with_fp=no ;;
264
265   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
266   | --no-cr | --no-c)
267     no_create=yes ;;
268
269   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
270   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
271     no_recursion=yes ;;
272
273   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
274   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
275   | --oldin | --oldi | --old | --ol | --o)
276     ac_prev=oldincludedir ;;
277   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
278   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
279   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
280     oldincludedir="$ac_optarg" ;;
281
282   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
283     ac_prev=prefix ;;
284   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
285     prefix="$ac_optarg" ;;
286
287   -program-prefix | --program-prefix | --program-prefi | --program-pref \
288   | --program-pre | --program-pr | --program-p)
289     ac_prev=program_prefix ;;
290   -program-prefix=* | --program-prefix=* | --program-prefi=* \
291   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
292     program_prefix="$ac_optarg" ;;
293
294   -program-suffix | --program-suffix | --program-suffi | --program-suff \
295   | --program-suf | --program-su | --program-s)
296     ac_prev=program_suffix ;;
297   -program-suffix=* | --program-suffix=* | --program-suffi=* \
298   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
299     program_suffix="$ac_optarg" ;;
300
301   -program-transform-name | --program-transform-name \
302   | --program-transform-nam | --program-transform-na \
303   | --program-transform-n | --program-transform- \
304   | --program-transform | --program-transfor \
305   | --program-transfo | --program-transf \
306   | --program-trans | --program-tran \
307   | --progr-tra | --program-tr | --program-t)
308     ac_prev=program_transform_name ;;
309   -program-transform-name=* | --program-transform-name=* \
310   | --program-transform-nam=* | --program-transform-na=* \
311   | --program-transform-n=* | --program-transform-=* \
312   | --program-transform=* | --program-transfor=* \
313   | --program-transfo=* | --program-transf=* \
314   | --program-trans=* | --program-tran=* \
315   | --progr-tra=* | --program-tr=* | --program-t=*)
316     program_transform_name="$ac_optarg" ;;
317
318   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
319   | -silent | --silent | --silen | --sile | --sil)
320     silent=yes ;;
321
322   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
323     ac_prev=sbindir ;;
324   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
325   | --sbi=* | --sb=*)
326     sbindir="$ac_optarg" ;;
327
328   -sharedstatedir | --sharedstatedir | --sharedstatedi \
329   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
330   | --sharedst | --shareds | --shared | --share | --shar \
331   | --sha | --sh)
332     ac_prev=sharedstatedir ;;
333   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
334   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
335   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
336   | --sha=* | --sh=*)
337     sharedstatedir="$ac_optarg" ;;
338
339   -site | --site | --sit)
340     ac_prev=site ;;
341   -site=* | --site=* | --sit=*)
342     site="$ac_optarg" ;;
343
344   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
345     ac_prev=srcdir ;;
346   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
347     srcdir="$ac_optarg" ;;
348
349   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
350   | --syscon | --sysco | --sysc | --sys | --sy)
351     ac_prev=sysconfdir ;;
352   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
353   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
354     sysconfdir="$ac_optarg" ;;
355
356   -target | --target | --targe | --targ | --tar | --ta | --t)
357     ac_prev=target ;;
358   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
359     target="$ac_optarg" ;;
360
361   -v | -verbose | --verbose | --verbos | --verbo | --verb)
362     verbose=yes ;;
363
364   -version | --version | --versio | --versi | --vers)
365     echo "configure generated by autoconf version 2.12"
366     exit 0 ;;
367
368   -with-* | --with-*)
369     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
370     # Reject names that are not valid shell variable names.
371     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
372       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
373     fi
374     ac_package=`echo $ac_package| sed 's/-/_/g'`
375     case "$ac_option" in
376       *=*) ;;
377       *) ac_optarg=yes ;;
378     esac
379     eval "with_${ac_package}='$ac_optarg'" ;;
380
381   -without-* | --without-*)
382     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
383     # Reject names that are not valid shell variable names.
384     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
385       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
386     fi
387     ac_package=`echo $ac_package| sed 's/-/_/g'`
388     eval "with_${ac_package}=no" ;;
389
390   --x)
391     # Obsolete; use --with-x.
392     with_x=yes ;;
393
394   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
395   | --x-incl | --x-inc | --x-in | --x-i)
396     ac_prev=x_includes ;;
397   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
398   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
399     x_includes="$ac_optarg" ;;
400
401   -x-libraries | --x-libraries | --x-librarie | --x-librari \
402   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
403     ac_prev=x_libraries ;;
404   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
405   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
406     x_libraries="$ac_optarg" ;;
407
408   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
409     ;;
410
411   *)
412     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
413       echo "configure: warning: $ac_option: invalid host type" 1>&2
414     fi
415     if test "x$nonopt" != xNONE; then
416       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
417     fi
418     nonopt="$ac_option"
419     ;;
420
421   esac
422 done
423
424 if test -n "$ac_prev"; then
425   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
426 fi
427
428 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
429
430 # File descriptor usage:
431 # 0 standard input
432 # 1 file creation
433 # 2 errors and warnings
434 # 3 some systems may open it to /dev/tty
435 # 4 used on the Kubota Titan
436 # 6 checking for... messages and results
437 # 5 compiler messages saved in config.log
438 if test "$silent" = yes; then
439   exec 6>/dev/null
440 else
441   exec 6>&1
442 fi
443 exec 5>./config.log
444
445 echo "\
446 This file contains any messages produced by compilers while
447 running configure, to aid debugging if configure makes a mistake.
448 " 1>&5
449
450 # Strip out --no-create and --no-recursion so they do not pile up.
451 # Also quote any args containing shell metacharacters.
452 ac_configure_args=
453 for ac_arg
454 do
455   case "$ac_arg" in
456   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
457   | --no-cr | --no-c) ;;
458   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
459   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
460   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
461   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
462   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
463   esac
464 done
465
466 # NLS nuisances.
467 # Only set these to C if already set.  These must not be set unconditionally
468 # because not all systems understand e.g. LANG=C (notably SCO).
469 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
470 # Non-C LC_CTYPE values break the ctype check.
471 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
472 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
473 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
474 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
475
476 # confdefs.h avoids OS command line length limits that DEFS can exceed.
477 rm -rf conftest* confdefs.h
478 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
479 echo > confdefs.h
480
481 # A filename unique to this package, relative to the directory that
482 # configure is in, which we can look for to find out if srcdir is correct.
483 ac_unique_file=include/includes.h
484
485 # Find the source files, if location was not specified.
486 if test -z "$srcdir"; then
487   ac_srcdir_defaulted=yes
488   # Try the directory containing this script, then its parent.
489   ac_prog=$0
490   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
491   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
492   srcdir=$ac_confdir
493   if test ! -r $srcdir/$ac_unique_file; then
494     srcdir=..
495   fi
496 else
497   ac_srcdir_defaulted=no
498 fi
499 if test ! -r $srcdir/$ac_unique_file; then
500   if test "$ac_srcdir_defaulted" = yes; then
501     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
502   else
503     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
504   fi
505 fi
506 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
507
508 # Prefer explicitly selected file to automatically selected ones.
509 if test -z "$CONFIG_SITE"; then
510   if test "x$prefix" != xNONE; then
511     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
512   else
513     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
514   fi
515 fi
516 for ac_site_file in $CONFIG_SITE; do
517   if test -r "$ac_site_file"; then
518     echo "loading site script $ac_site_file"
519     . "$ac_site_file"
520   fi
521 done
522
523 if test -r "$cache_file"; then
524   echo "loading cache $cache_file"
525   . $cache_file
526 else
527   echo "creating cache $cache_file"
528   > $cache_file
529 fi
530
531 ac_ext=c
532 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
533 ac_cpp='$CPP $CPPFLAGS'
534 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
535 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
536 cross_compiling=$ac_cv_prog_cc_cross
537
538 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
539   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
540   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
541     ac_n= ac_c='
542 ' ac_t='        '
543   else
544     ac_n=-n ac_c= ac_t=
545   fi
546 else
547   ac_n= ac_c='\c' ac_t=
548 fi
549
550
551
552
553 # Extract the first word of "gcc", so it can be a program name with args.
554 set dummy gcc; ac_word=$2
555 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
556 echo "configure:557: checking for $ac_word" >&5
557 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
558   echo $ac_n "(cached) $ac_c" 1>&6
559 else
560   if test -n "$CC"; then
561   ac_cv_prog_CC="$CC" # Let the user override the test.
562 else
563   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
564   for ac_dir in $PATH; do
565     test -z "$ac_dir" && ac_dir=.
566     if test -f $ac_dir/$ac_word; then
567       ac_cv_prog_CC="gcc"
568       break
569     fi
570   done
571   IFS="$ac_save_ifs"
572 fi
573 fi
574 CC="$ac_cv_prog_CC"
575 if test -n "$CC"; then
576   echo "$ac_t""$CC" 1>&6
577 else
578   echo "$ac_t""no" 1>&6
579 fi
580
581 if test -z "$CC"; then
582   # Extract the first word of "cc", so it can be a program name with args.
583 set dummy cc; ac_word=$2
584 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
585 echo "configure:586: checking for $ac_word" >&5
586 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
587   echo $ac_n "(cached) $ac_c" 1>&6
588 else
589   if test -n "$CC"; then
590   ac_cv_prog_CC="$CC" # Let the user override the test.
591 else
592   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
593   ac_prog_rejected=no
594   for ac_dir in $PATH; do
595     test -z "$ac_dir" && ac_dir=.
596     if test -f $ac_dir/$ac_word; then
597       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
598         ac_prog_rejected=yes
599         continue
600       fi
601       ac_cv_prog_CC="cc"
602       break
603     fi
604   done
605   IFS="$ac_save_ifs"
606 if test $ac_prog_rejected = yes; then
607   # We found a bogon in the path, so make sure we never use it.
608   set dummy $ac_cv_prog_CC
609   shift
610   if test $# -gt 0; then
611     # We chose a different compiler from the bogus one.
612     # However, it has the same basename, so the bogon will be chosen
613     # first if we set CC to just the basename; use the full file name.
614     shift
615     set dummy "$ac_dir/$ac_word" "$@"
616     shift
617     ac_cv_prog_CC="$@"
618   fi
619 fi
620 fi
621 fi
622 CC="$ac_cv_prog_CC"
623 if test -n "$CC"; then
624   echo "$ac_t""$CC" 1>&6
625 else
626   echo "$ac_t""no" 1>&6
627 fi
628
629   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
630 fi
631
632 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
633 echo "configure:634: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
634
635 ac_ext=c
636 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
637 ac_cpp='$CPP $CPPFLAGS'
638 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
639 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
640 cross_compiling=$ac_cv_prog_cc_cross
641
642 cat > conftest.$ac_ext <<EOF
643 #line 644 "configure"
644 #include "confdefs.h"
645 main(){return(0);}
646 EOF
647 if { (eval echo configure:648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
648   ac_cv_prog_cc_works=yes
649   # If we can't run a trivial program, we are probably using a cross compiler.
650   if (./conftest; exit) 2>/dev/null; then
651     ac_cv_prog_cc_cross=no
652   else
653     ac_cv_prog_cc_cross=yes
654   fi
655 else
656   echo "configure: failed program was:" >&5
657   cat conftest.$ac_ext >&5
658   ac_cv_prog_cc_works=no
659 fi
660 rm -fr conftest*
661
662 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
663 if test $ac_cv_prog_cc_works = no; then
664   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
665 fi
666 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
667 echo "configure:668: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
668 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
669 cross_compiling=$ac_cv_prog_cc_cross
670
671 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
672 echo "configure:673: checking whether we are using GNU C" >&5
673 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
674   echo $ac_n "(cached) $ac_c" 1>&6
675 else
676   cat > conftest.c <<EOF
677 #ifdef __GNUC__
678   yes;
679 #endif
680 EOF
681 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
682   ac_cv_prog_gcc=yes
683 else
684   ac_cv_prog_gcc=no
685 fi
686 fi
687
688 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
689
690 if test $ac_cv_prog_gcc = yes; then
691   GCC=yes
692   ac_test_CFLAGS="${CFLAGS+set}"
693   ac_save_CFLAGS="$CFLAGS"
694   CFLAGS=
695   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
696 echo "configure:697: checking whether ${CC-cc} accepts -g" >&5
697 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
698   echo $ac_n "(cached) $ac_c" 1>&6
699 else
700   echo 'void f(){}' > conftest.c
701 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
702   ac_cv_prog_cc_g=yes
703 else
704   ac_cv_prog_cc_g=no
705 fi
706 rm -f conftest*
707
708 fi
709
710 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
711   if test "$ac_test_CFLAGS" = set; then
712     CFLAGS="$ac_save_CFLAGS"
713   elif test $ac_cv_prog_cc_g = yes; then
714     CFLAGS="-g -O2"
715   else
716     CFLAGS="-O2"
717   fi
718 else
719   GCC=
720   test "${CFLAGS+set}" = set || CFLAGS="-g"
721 fi
722
723 ac_aux_dir=
724 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
725   if test -f $ac_dir/install-sh; then
726     ac_aux_dir=$ac_dir
727     ac_install_sh="$ac_aux_dir/install-sh -c"
728     break
729   elif test -f $ac_dir/install.sh; then
730     ac_aux_dir=$ac_dir
731     ac_install_sh="$ac_aux_dir/install.sh -c"
732     break
733   fi
734 done
735 if test -z "$ac_aux_dir"; then
736   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
737 fi
738 ac_config_guess=$ac_aux_dir/config.guess
739 ac_config_sub=$ac_aux_dir/config.sub
740 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
741
742 # Find a good install program.  We prefer a C program (faster),
743 # so one script is as good as another.  But avoid the broken or
744 # incompatible versions:
745 # SysV /etc/install, /usr/sbin/install
746 # SunOS /usr/etc/install
747 # IRIX /sbin/install
748 # AIX /bin/install
749 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
750 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
751 # ./install, which can be erroneously created by make from ./install.sh.
752 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
753 echo "configure:754: checking for a BSD compatible install" >&5
754 if test -z "$INSTALL"; then
755 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
756   echo $ac_n "(cached) $ac_c" 1>&6
757 else
758     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
759   for ac_dir in $PATH; do
760     # Account for people who put trailing slashes in PATH elements.
761     case "$ac_dir/" in
762     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
763     *)
764       # OSF1 and SCO ODT 3.0 have their own names for install.
765       for ac_prog in ginstall installbsd scoinst install; do
766         if test -f $ac_dir/$ac_prog; then
767           if test $ac_prog = install &&
768             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
769             # AIX install.  It has an incompatible calling convention.
770             # OSF/1 installbsd also uses dspmsg, but is usable.
771             :
772           else
773             ac_cv_path_install="$ac_dir/$ac_prog -c"
774             break 2
775           fi
776         fi
777       done
778       ;;
779     esac
780   done
781   IFS="$ac_save_IFS"
782
783 fi
784   if test "${ac_cv_path_install+set}" = set; then
785     INSTALL="$ac_cv_path_install"
786   else
787     # As a last resort, use the slow shell script.  We don't cache a
788     # path for INSTALL within a source directory, because that will
789     # break other packages using the cache if that directory is
790     # removed, or if the path is relative.
791     INSTALL="$ac_install_sh"
792   fi
793 fi
794 echo "$ac_t""$INSTALL" 1>&6
795
796 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
797 # It thinks the first close brace ends the variable substitution.
798 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
799
800 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
801
802
803 for ac_prog in mawk gawk nawk awk
804 do
805 # Extract the first word of "$ac_prog", so it can be a program name with args.
806 set dummy $ac_prog; ac_word=$2
807 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
808 echo "configure:809: checking for $ac_word" >&5
809 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
810   echo $ac_n "(cached) $ac_c" 1>&6
811 else
812   if test -n "$AWK"; then
813   ac_cv_prog_AWK="$AWK" # Let the user override the test.
814 else
815   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
816   for ac_dir in $PATH; do
817     test -z "$ac_dir" && ac_dir=.
818     if test -f $ac_dir/$ac_word; then
819       ac_cv_prog_AWK="$ac_prog"
820       break
821     fi
822   done
823   IFS="$ac_save_ifs"
824 fi
825 fi
826 AWK="$ac_cv_prog_AWK"
827 if test -n "$AWK"; then
828   echo "$ac_t""$AWK" 1>&6
829 else
830   echo "$ac_t""no" 1>&6
831 fi
832
833 test -n "$AWK" && break
834 done
835
836
837
838 # Do some error checking and defaulting for the host and target type.
839 # The inputs are:
840 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
841 #
842 # The rules are:
843 # 1. You are not allowed to specify --host, --target, and nonopt at the
844 #    same time.
845 # 2. Host defaults to nonopt.
846 # 3. If nonopt is not specified, then host defaults to the current host,
847 #    as determined by config.guess.
848 # 4. Target and build default to nonopt.
849 # 5. If nonopt is not specified, then target and build default to host.
850
851 # The aliases save the names the user supplied, while $host etc.
852 # will get canonicalized.
853 case $host---$target---$nonopt in
854 NONE---*---* | *---NONE---* | *---*---NONE) ;;
855 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
856 esac
857
858
859 # Make sure we can run config.sub.
860 if $ac_config_sub sun4 >/dev/null 2>&1; then :
861 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
862 fi
863
864 echo $ac_n "checking host system type""... $ac_c" 1>&6
865 echo "configure:866: checking host system type" >&5
866
867 host_alias=$host
868 case "$host_alias" in
869 NONE)
870   case $nonopt in
871   NONE)
872     if host_alias=`$ac_config_guess`; then :
873     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
874     fi ;;
875   *) host_alias=$nonopt ;;
876   esac ;;
877 esac
878
879 host=`$ac_config_sub $host_alias`
880 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
881 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
882 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
883 echo "$ac_t""$host" 1>&6
884
885 echo $ac_n "checking target system type""... $ac_c" 1>&6
886 echo "configure:887: checking target system type" >&5
887
888 target_alias=$target
889 case "$target_alias" in
890 NONE)
891   case $nonopt in
892   NONE) target_alias=$host_alias ;;
893   *) target_alias=$nonopt ;;
894   esac ;;
895 esac
896
897 target=`$ac_config_sub $target_alias`
898 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
899 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
900 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
901 echo "$ac_t""$target" 1>&6
902
903 echo $ac_n "checking build system type""... $ac_c" 1>&6
904 echo "configure:905: checking build system type" >&5
905
906 build_alias=$build
907 case "$build_alias" in
908 NONE)
909   case $nonopt in
910   NONE) build_alias=$host_alias ;;
911   *) build_alias=$nonopt ;;
912   esac ;;
913 esac
914
915 build=`$ac_config_sub $build_alias`
916 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
917 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
918 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
919 echo "$ac_t""$build" 1>&6
920
921 test "$host_alias" != "$target_alias" &&
922   test "$program_prefix$program_suffix$program_transform_name" = \
923     NONENONEs,x,x, &&
924   program_prefix=${target_alias}-
925
926 case "$host_os" in
927         *linux*)   cat >> confdefs.h <<\EOF
928 #define LINUX 1
929 EOF
930 ;;
931         *solaris*) cat >> confdefs.h <<\EOF
932 #define SUNOS5 1
933 EOF
934 ;;
935         *sunos*) cat >> confdefs.h <<\EOF
936 #define SUNOS4 1
937 EOF
938 ;;
939         *irix*) cat >> confdefs.h <<\EOF
940 #define IRIX 1
941 EOF
942 ;;
943         *aix*) cat >> confdefs.h <<\EOF
944 #define AIX 1
945 EOF
946 ;;
947         *hpux*) cat >> confdefs.h <<\EOF
948 #define HPUX 1
949 EOF
950 ;;
951         *qnx*) cat >> confdefs.h <<\EOF
952 #define QNX 1
953 EOF
954 ;;
955         *osf1*) cat >> confdefs.h <<\EOF
956 #define OSF1 1
957 EOF
958 ;;
959         *sco*) cat >> confdefs.h <<\EOF
960 #define SCO 1
961 EOF
962 ;;
963         *next2*) cat >> confdefs.h <<\EOF
964 #define NEXT2 1
965 EOF
966 ;;
967 esac
968
969 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 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
2439 echo "configure:2440: checking for ssize_t" >&5
2440 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
2441   echo $ac_n "(cached) $ac_c" 1>&6
2442 else
2443   cat > conftest.$ac_ext <<EOF
2444 #line 2445 "configure"
2445 #include "confdefs.h"
2446 #include <sys/types.h>
2447 #if STDC_HEADERS
2448 #include <stdlib.h>
2449 #include <stddef.h>
2450 #endif
2451 EOF
2452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2453   egrep "ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2454   rm -rf conftest*
2455   ac_cv_type_ssize_t=yes
2456 else
2457   rm -rf conftest*
2458   ac_cv_type_ssize_t=no
2459 fi
2460 rm -f conftest*
2461
2462 fi
2463 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
2464 if test $ac_cv_type_ssize_t = no; then
2465   cat >> confdefs.h <<\EOF
2466 #define ssize_t int
2467 EOF
2468
2469 fi
2470
2471
2472 echo $ac_n "checking for errno in errno.h... $ac_c"
2473 cat > conftest.$ac_ext <<EOF
2474 #line 2475 "configure"
2475 #include "confdefs.h"
2476 #include <errno.h>
2477 int main() {
2478 int i = errno
2479 ; return 0; }
2480 EOF
2481 if { (eval echo configure:2482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2482   rm -rf conftest*
2483   echo yes; cat >> confdefs.h <<\EOF
2484 #define HAVE_ERRNO_DECL 1
2485 EOF
2486
2487 else
2488   echo "configure: failed program was:" >&5
2489   cat conftest.$ac_ext >&5
2490   rm -rf conftest*
2491   echo no
2492 fi
2493 rm -f conftest*
2494
2495 # stupid glibc has the functions but no declaration. grrrr.
2496 echo $ac_n "checking for setresuid declaration $ac_c"
2497 cat > conftest.$ac_ext <<EOF
2498 #line 2499 "configure"
2499 #include "confdefs.h"
2500 #include <unistd.h>
2501 int main() {
2502 int i = setresuid
2503 ; return 0; }
2504 EOF
2505 if { (eval echo configure:2506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2506   rm -rf conftest*
2507   echo yes; cat >> confdefs.h <<\EOF
2508 #define HAVE_SETRESUID_DECL 1
2509 EOF
2510
2511 else
2512   echo "configure: failed program was:" >&5
2513   cat conftest.$ac_ext >&5
2514   rm -rf conftest*
2515   echo no
2516 fi
2517 rm -f conftest*
2518
2519 # and glibc has setresuid under linux but the function does
2520 # nothing until kernel 2.1.44! very dumb.
2521 echo $ac_n "checking for real setresuid $ac_c"
2522 if test "$cross_compiling" = yes; then
2523     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2524 else
2525   cat > conftest.$ac_ext <<EOF
2526 #line 2527 "configure"
2527 #include "confdefs.h"
2528 #include <errno.h>
2529 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
2530 EOF
2531 if { (eval echo configure:2532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2532 then
2533   echo yes;cat >> confdefs.h <<\EOF
2534 #define HAVE_SETRESUID 1
2535 EOF
2536
2537 else
2538   echo "configure: failed program was:" >&5
2539   cat conftest.$ac_ext >&5
2540   rm -fr conftest*
2541   echo no
2542 fi
2543 rm -fr conftest*
2544 fi
2545
2546
2547
2548 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
2549 echo "configure:2550: checking for 8-bit clean memcmp" >&5
2550 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
2551   echo $ac_n "(cached) $ac_c" 1>&6
2552 else
2553   if test "$cross_compiling" = yes; then
2554   ac_cv_func_memcmp_clean=no
2555 else
2556   cat > conftest.$ac_ext <<EOF
2557 #line 2558 "configure"
2558 #include "confdefs.h"
2559
2560 main()
2561 {
2562   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
2563   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
2564 }
2565
2566 EOF
2567 if { (eval echo configure:2568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2568 then
2569   ac_cv_func_memcmp_clean=yes
2570 else
2571   echo "configure: failed program was:" >&5
2572   cat conftest.$ac_ext >&5
2573   rm -fr conftest*
2574   ac_cv_func_memcmp_clean=no
2575 fi
2576 rm -fr conftest*
2577 fi
2578
2579 fi
2580
2581 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
2582 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
2583
2584
2585 ###############################################
2586 # test for where we get crypt() from
2587 if test "$ac_cv_lib_crypt_crypt" = "yes"; then
2588   echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
2589 echo "configure:2590: checking for crypt in -lcrypt" >&5
2590 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
2591 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2592   echo $ac_n "(cached) $ac_c" 1>&6
2593 else
2594   ac_save_LIBS="$LIBS"
2595 LIBS="-lcrypt  $LIBS"
2596 cat > conftest.$ac_ext <<EOF
2597 #line 2598 "configure"
2598 #include "confdefs.h"
2599 /* Override any gcc2 internal prototype to avoid an error.  */
2600 /* We use char because int might match the return type of a gcc2
2601     builtin and then its argument prototype would still apply.  */
2602 char crypt();
2603
2604 int main() {
2605 crypt()
2606 ; return 0; }
2607 EOF
2608 if { (eval echo configure:2609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2609   rm -rf conftest*
2610   eval "ac_cv_lib_$ac_lib_var=yes"
2611 else
2612   echo "configure: failed program was:" >&5
2613   cat conftest.$ac_ext >&5
2614   rm -rf conftest*
2615   eval "ac_cv_lib_$ac_lib_var=no"
2616 fi
2617 rm -f conftest*
2618 LIBS="$ac_save_LIBS"
2619
2620 fi
2621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2622   echo "$ac_t""yes" 1>&6
2623     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2624     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2625   cat >> confdefs.h <<EOF
2626 #define $ac_tr_lib 1
2627 EOF
2628
2629   LIBS="-lcrypt $LIBS"
2630
2631 else
2632   echo "$ac_t""no" 1>&6
2633 fi
2634
2635   cat >> confdefs.h <<\EOF
2636 #define HAVE_CRYPT 1
2637 EOF
2638
2639 fi
2640 if test "$ac_cv_lib_crypt_crypt" = "no" || 
2641    test "$ac_cv_lib_crypt_crypt" = ""; then
2642 # look for crypt 
2643 echo $ac_n "checking for crypt""... $ac_c" 1>&6
2644 echo "configure:2645: checking for crypt" >&5
2645 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
2646   echo $ac_n "(cached) $ac_c" 1>&6
2647 else
2648   cat > conftest.$ac_ext <<EOF
2649 #line 2650 "configure"
2650 #include "confdefs.h"
2651 /* System header to define __stub macros and hopefully few prototypes,
2652     which can conflict with char crypt(); below.  */
2653 #include <assert.h>
2654 /* Override any gcc2 internal prototype to avoid an error.  */
2655 /* We use char because int might match the return type of a gcc2
2656     builtin and then its argument prototype would still apply.  */
2657 char crypt();
2658
2659 int main() {
2660
2661 /* The GNU C library defines this for functions which it implements
2662     to always fail with ENOSYS.  Some functions are actually named
2663     something starting with __ and the normal name is an alias.  */
2664 #if defined (__stub_crypt) || defined (__stub___crypt)
2665 choke me
2666 #else
2667 crypt();
2668 #endif
2669
2670 ; return 0; }
2671 EOF
2672 if { (eval echo configure:2673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2673   rm -rf conftest*
2674   eval "ac_cv_func_crypt=yes"
2675 else
2676   echo "configure: failed program was:" >&5
2677   cat conftest.$ac_ext >&5
2678   rm -rf conftest*
2679   eval "ac_cv_func_crypt=no"
2680 fi
2681 rm -f conftest*
2682 fi
2683
2684 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
2685   echo "$ac_t""yes" 1>&6
2686   cat >> confdefs.h <<\EOF
2687 #define HAVE_CRYPT 1
2688 EOF
2689
2690 else
2691   echo "$ac_t""no" 1>&6
2692 case "$LIBS" in
2693 *-lcrypt*) ;;
2694 *) echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
2695 echo "configure:2696: checking for crypt in -lcrypt" >&5
2696 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
2697 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2698   echo $ac_n "(cached) $ac_c" 1>&6
2699 else
2700   ac_save_LIBS="$LIBS"
2701 LIBS="-lcrypt  $LIBS"
2702 cat > conftest.$ac_ext <<EOF
2703 #line 2704 "configure"
2704 #include "confdefs.h"
2705 /* Override any gcc2 internal prototype to avoid an error.  */
2706 /* We use char because int might match the return type of a gcc2
2707     builtin and then its argument prototype would still apply.  */
2708 char crypt();
2709
2710 int main() {
2711 crypt()
2712 ; return 0; }
2713 EOF
2714 if { (eval echo configure:2715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2715   rm -rf conftest*
2716   eval "ac_cv_lib_$ac_lib_var=yes"
2717 else
2718   echo "configure: failed program was:" >&5
2719   cat conftest.$ac_ext >&5
2720   rm -rf conftest*
2721   eval "ac_cv_lib_$ac_lib_var=no"
2722 fi
2723 rm -f conftest*
2724 LIBS="$ac_save_LIBS"
2725
2726 fi
2727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2728   echo "$ac_t""yes" 1>&6
2729     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2730     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2731   cat >> confdefs.h <<EOF
2732 #define $ac_tr_lib 1
2733 EOF
2734
2735   LIBS="-lcrypt $LIBS"
2736
2737 else
2738   echo "$ac_t""no" 1>&6
2739 fi
2740  ;;
2741 esac
2742 if test "$ac_cv_lib_crypt_crypt" = "yes"; then
2743   ac_cv_func_crypt=yes
2744   cat >> confdefs.h <<\EOF
2745 #define HAVE_CRYPT 1
2746 EOF
2747
2748 fi
2749 fi
2750
2751 fi
2752
2753
2754 ###############################################
2755 # test for where we get pam_authenticate() from
2756 # might need libdl for this to work
2757 if test "$ac_cv_header_security_pam_appl_h" = "yes"; then
2758   echo $ac_n "checking for -ldl""... $ac_c" 1>&6
2759 echo "configure:2760: checking for -ldl" >&5
2760 if eval "test \"`echo '$''{'ac_cv_lib_dl'+set}'`\" = set"; then
2761   echo $ac_n "(cached) $ac_c" 1>&6
2762 else
2763   ac_save_LIBS="$LIBS"
2764 LIBS="-ldl  $LIBS"
2765 cat > conftest.$ac_ext <<EOF
2766 #line 2767 "configure"
2767 #include "confdefs.h"
2768
2769 int main() {
2770 main()
2771 ; return 0; }
2772 EOF
2773 if { (eval echo configure:2774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2774   rm -rf conftest*
2775   ac_cv_lib_dl=yes
2776 else
2777   echo "configure: failed program was:" >&5
2778   cat conftest.$ac_ext >&5
2779   rm -rf conftest*
2780   ac_cv_lib_dl=no
2781 fi
2782 rm -f conftest*
2783 LIBS="$ac_save_LIBS"
2784
2785 fi
2786 echo "$ac_t""$ac_cv_lib_dl" 1>&6
2787 if test "$ac_cv_lib_dl" = yes; then
2788   cat >> confdefs.h <<\EOF
2789 #define HAVE_LIBDL 1
2790 EOF
2791
2792   LIBS="-ldl $LIBS"
2793
2794 fi
2795
2796 fi
2797 if test "$ac_cv_lib_pam_pam_authenticate" = "yes"; then
2798   echo $ac_n "checking for pam_authenticate in -lpam""... $ac_c" 1>&6
2799 echo "configure:2800: checking for pam_authenticate in -lpam" >&5
2800 ac_lib_var=`echo pam'_'pam_authenticate | sed 'y%./+-%__p_%'`
2801 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2802   echo $ac_n "(cached) $ac_c" 1>&6
2803 else
2804   ac_save_LIBS="$LIBS"
2805 LIBS="-lpam  $LIBS"
2806 cat > conftest.$ac_ext <<EOF
2807 #line 2808 "configure"
2808 #include "confdefs.h"
2809 /* Override any gcc2 internal prototype to avoid an error.  */
2810 /* We use char because int might match the return type of a gcc2
2811     builtin and then its argument prototype would still apply.  */
2812 char pam_authenticate();
2813
2814 int main() {
2815 pam_authenticate()
2816 ; return 0; }
2817 EOF
2818 if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2819   rm -rf conftest*
2820   eval "ac_cv_lib_$ac_lib_var=yes"
2821 else
2822   echo "configure: failed program was:" >&5
2823   cat conftest.$ac_ext >&5
2824   rm -rf conftest*
2825   eval "ac_cv_lib_$ac_lib_var=no"
2826 fi
2827 rm -f conftest*
2828 LIBS="$ac_save_LIBS"
2829
2830 fi
2831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2832   echo "$ac_t""yes" 1>&6
2833     ac_tr_lib=HAVE_LIB`echo pam | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2834     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2835   cat >> confdefs.h <<EOF
2836 #define $ac_tr_lib 1
2837 EOF
2838
2839   LIBS="-lpam $LIBS"
2840
2841 else
2842   echo "$ac_t""no" 1>&6
2843 fi
2844
2845   cat >> confdefs.h <<\EOF
2846 #define HAVE_PAM_AUTHENTICATE 1
2847 EOF
2848
2849 fi
2850 if test "$ac_cv_lib_pam_pam_authenticate" = "no" || 
2851    test "$ac_cv_lib_pam_pam_authenticate" = ""; then
2852 # look for pam_authenticate
2853 echo $ac_n "checking for pam_authenticate""... $ac_c" 1>&6
2854 echo "configure:2855: checking for pam_authenticate" >&5
2855 if eval "test \"`echo '$''{'ac_cv_func_pam_authenticate'+set}'`\" = set"; then
2856   echo $ac_n "(cached) $ac_c" 1>&6
2857 else
2858   cat > conftest.$ac_ext <<EOF
2859 #line 2860 "configure"
2860 #include "confdefs.h"
2861 /* System header to define __stub macros and hopefully few prototypes,
2862     which can conflict with char pam_authenticate(); below.  */
2863 #include <assert.h>
2864 /* Override any gcc2 internal prototype to avoid an error.  */
2865 /* We use char because int might match the return type of a gcc2
2866     builtin and then its argument prototype would still apply.  */
2867 char pam_authenticate();
2868
2869 int main() {
2870
2871 /* The GNU C library defines this for functions which it implements
2872     to always fail with ENOSYS.  Some functions are actually named
2873     something starting with __ and the normal name is an alias.  */
2874 #if defined (__stub_pam_authenticate) || defined (__stub___pam_authenticate)
2875 choke me
2876 #else
2877 pam_authenticate();
2878 #endif
2879
2880 ; return 0; }
2881 EOF
2882 if { (eval echo configure:2883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2883   rm -rf conftest*
2884   eval "ac_cv_func_pam_authenticate=yes"
2885 else
2886   echo "configure: failed program was:" >&5
2887   cat conftest.$ac_ext >&5
2888   rm -rf conftest*
2889   eval "ac_cv_func_pam_authenticate=no"
2890 fi
2891 rm -f conftest*
2892 fi
2893
2894 if eval "test \"`echo '$ac_cv_func_'pam_authenticate`\" = yes"; then
2895   echo "$ac_t""yes" 1>&6
2896   cat >> confdefs.h <<\EOF
2897 #define HAVE_PAM_AUTHENTICATE 1
2898 EOF
2899
2900 else
2901   echo "$ac_t""no" 1>&6
2902 case "$LIBS" in
2903 *-lpam*) ;;
2904 *) echo $ac_n "checking for pam_authenticate in -lpam""... $ac_c" 1>&6
2905 echo "configure:2906: checking for pam_authenticate in -lpam" >&5
2906 ac_lib_var=`echo pam'_'pam_authenticate | sed 'y%./+-%__p_%'`
2907 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2908   echo $ac_n "(cached) $ac_c" 1>&6
2909 else
2910   ac_save_LIBS="$LIBS"
2911 LIBS="-lpam  $LIBS"
2912 cat > conftest.$ac_ext <<EOF
2913 #line 2914 "configure"
2914 #include "confdefs.h"
2915 /* Override any gcc2 internal prototype to avoid an error.  */
2916 /* We use char because int might match the return type of a gcc2
2917     builtin and then its argument prototype would still apply.  */
2918 char pam_authenticate();
2919
2920 int main() {
2921 pam_authenticate()
2922 ; return 0; }
2923 EOF
2924 if { (eval echo configure:2925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2925   rm -rf conftest*
2926   eval "ac_cv_lib_$ac_lib_var=yes"
2927 else
2928   echo "configure: failed program was:" >&5
2929   cat conftest.$ac_ext >&5
2930   rm -rf conftest*
2931   eval "ac_cv_lib_$ac_lib_var=no"
2932 fi
2933 rm -f conftest*
2934 LIBS="$ac_save_LIBS"
2935
2936 fi
2937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2938   echo "$ac_t""yes" 1>&6
2939     ac_tr_lib=HAVE_LIB`echo pam | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2940     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2941   cat >> confdefs.h <<EOF
2942 #define $ac_tr_lib 1
2943 EOF
2944
2945   LIBS="-lpam $LIBS"
2946
2947 else
2948   echo "$ac_t""no" 1>&6
2949 fi
2950  ;;
2951 esac
2952 if test "$ac_cv_lib_pam_pam_authenticate" = "yes"; then
2953   ac_cv_func_pam_authenticate=yes
2954   cat >> confdefs.h <<\EOF
2955 #define HAVE_PAM_AUTHENTICATE 1
2956 EOF
2957
2958 fi
2959 fi
2960
2961 fi
2962
2963 # The following test taken from the cvs sources
2964 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
2965 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
2966 # libsocket.so which has a bad implementation of gethostbyname (it
2967 # only looks in /etc/hosts), so we only look for -lsocket if we need
2968 # it.
2969 echo $ac_n "checking for connect""... $ac_c" 1>&6
2970 echo "configure:2971: checking for connect" >&5
2971 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2972   echo $ac_n "(cached) $ac_c" 1>&6
2973 else
2974   cat > conftest.$ac_ext <<EOF
2975 #line 2976 "configure"
2976 #include "confdefs.h"
2977 /* System header to define __stub macros and hopefully few prototypes,
2978     which can conflict with char connect(); below.  */
2979 #include <assert.h>
2980 /* Override any gcc2 internal prototype to avoid an error.  */
2981 /* We use char because int might match the return type of a gcc2
2982     builtin and then its argument prototype would still apply.  */
2983 char connect();
2984
2985 int main() {
2986
2987 /* The GNU C library defines this for functions which it implements
2988     to always fail with ENOSYS.  Some functions are actually named
2989     something starting with __ and the normal name is an alias.  */
2990 #if defined (__stub_connect) || defined (__stub___connect)
2991 choke me
2992 #else
2993 connect();
2994 #endif
2995
2996 ; return 0; }
2997 EOF
2998 if { (eval echo configure:2999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2999   rm -rf conftest*
3000   eval "ac_cv_func_connect=yes"
3001 else
3002   echo "configure: failed program was:" >&5
3003   cat conftest.$ac_ext >&5
3004   rm -rf conftest*
3005   eval "ac_cv_func_connect=no"
3006 fi
3007 rm -f conftest*
3008 fi
3009
3010 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3011   echo "$ac_t""yes" 1>&6
3012   :
3013 else
3014   echo "$ac_t""no" 1>&6
3015 case "$LIBS" in
3016 *-lnsl*) ;;
3017 *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
3018 echo "configure:3019: checking for printf in -lnsl_s" >&5
3019 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
3020 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3021   echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023   ac_save_LIBS="$LIBS"
3024 LIBS="-lnsl_s  $LIBS"
3025 cat > conftest.$ac_ext <<EOF
3026 #line 3027 "configure"
3027 #include "confdefs.h"
3028 /* Override any gcc2 internal prototype to avoid an error.  */
3029 /* We use char because int might match the return type of a gcc2
3030     builtin and then its argument prototype would still apply.  */
3031 char printf();
3032
3033 int main() {
3034 printf()
3035 ; return 0; }
3036 EOF
3037 if { (eval echo configure:3038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3038   rm -rf conftest*
3039   eval "ac_cv_lib_$ac_lib_var=yes"
3040 else
3041   echo "configure: failed program was:" >&5
3042   cat conftest.$ac_ext >&5
3043   rm -rf conftest*
3044   eval "ac_cv_lib_$ac_lib_var=no"
3045 fi
3046 rm -f conftest*
3047 LIBS="$ac_save_LIBS"
3048
3049 fi
3050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3051   echo "$ac_t""yes" 1>&6
3052     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3053     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3054   cat >> confdefs.h <<EOF
3055 #define $ac_tr_lib 1
3056 EOF
3057
3058   LIBS="-lnsl_s $LIBS"
3059
3060 else
3061   echo "$ac_t""no" 1>&6
3062 fi
3063  ;;
3064 esac
3065 case "$LIBS" in
3066 *-lnsl*) ;;
3067 *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
3068 echo "configure:3069: checking for printf in -lnsl" >&5
3069 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
3070 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3071   echo $ac_n "(cached) $ac_c" 1>&6
3072 else
3073   ac_save_LIBS="$LIBS"
3074 LIBS="-lnsl  $LIBS"
3075 cat > conftest.$ac_ext <<EOF
3076 #line 3077 "configure"
3077 #include "confdefs.h"
3078 /* Override any gcc2 internal prototype to avoid an error.  */
3079 /* We use char because int might match the return type of a gcc2
3080     builtin and then its argument prototype would still apply.  */
3081 char printf();
3082
3083 int main() {
3084 printf()
3085 ; return 0; }
3086 EOF
3087 if { (eval echo configure:3088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3088   rm -rf conftest*
3089   eval "ac_cv_lib_$ac_lib_var=yes"
3090 else
3091   echo "configure: failed program was:" >&5
3092   cat conftest.$ac_ext >&5
3093   rm -rf conftest*
3094   eval "ac_cv_lib_$ac_lib_var=no"
3095 fi
3096 rm -f conftest*
3097 LIBS="$ac_save_LIBS"
3098
3099 fi
3100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3101   echo "$ac_t""yes" 1>&6
3102     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3103     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3104   cat >> confdefs.h <<EOF
3105 #define $ac_tr_lib 1
3106 EOF
3107
3108   LIBS="-lnsl $LIBS"
3109
3110 else
3111   echo "$ac_t""no" 1>&6
3112 fi
3113  ;;
3114 esac
3115 case "$LIBS" in
3116 *-lsocket*) ;;
3117 *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3118 echo "configure:3119: checking for connect in -lsocket" >&5
3119 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3120 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3121   echo $ac_n "(cached) $ac_c" 1>&6
3122 else
3123   ac_save_LIBS="$LIBS"
3124 LIBS="-lsocket  $LIBS"
3125 cat > conftest.$ac_ext <<EOF
3126 #line 3127 "configure"
3127 #include "confdefs.h"
3128 /* Override any gcc2 internal prototype to avoid an error.  */
3129 /* We use char because int might match the return type of a gcc2
3130     builtin and then its argument prototype would still apply.  */
3131 char connect();
3132
3133 int main() {
3134 connect()
3135 ; return 0; }
3136 EOF
3137 if { (eval echo configure:3138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3138   rm -rf conftest*
3139   eval "ac_cv_lib_$ac_lib_var=yes"
3140 else
3141   echo "configure: failed program was:" >&5
3142   cat conftest.$ac_ext >&5
3143   rm -rf conftest*
3144   eval "ac_cv_lib_$ac_lib_var=no"
3145 fi
3146 rm -f conftest*
3147 LIBS="$ac_save_LIBS"
3148
3149 fi
3150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3151   echo "$ac_t""yes" 1>&6
3152     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3153     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3154   cat >> confdefs.h <<EOF
3155 #define $ac_tr_lib 1
3156 EOF
3157
3158   LIBS="-lsocket $LIBS"
3159
3160 else
3161   echo "$ac_t""no" 1>&6
3162 fi
3163  ;;
3164 esac
3165 case "$LIBS" in
3166 *-linet*) ;;
3167 *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
3168 echo "configure:3169: checking for connect in -linet" >&5
3169 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
3170 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3171   echo $ac_n "(cached) $ac_c" 1>&6
3172 else
3173   ac_save_LIBS="$LIBS"
3174 LIBS="-linet  $LIBS"
3175 cat > conftest.$ac_ext <<EOF
3176 #line 3177 "configure"
3177 #include "confdefs.h"
3178 /* Override any gcc2 internal prototype to avoid an error.  */
3179 /* We use char because int might match the return type of a gcc2
3180     builtin and then its argument prototype would still apply.  */
3181 char connect();
3182
3183 int main() {
3184 connect()
3185 ; return 0; }
3186 EOF
3187 if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3188   rm -rf conftest*
3189   eval "ac_cv_lib_$ac_lib_var=yes"
3190 else
3191   echo "configure: failed program was:" >&5
3192   cat conftest.$ac_ext >&5
3193   rm -rf conftest*
3194   eval "ac_cv_lib_$ac_lib_var=no"
3195 fi
3196 rm -f conftest*
3197 LIBS="$ac_save_LIBS"
3198
3199 fi
3200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3201   echo "$ac_t""yes" 1>&6
3202     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3203     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3204   cat >> confdefs.h <<EOF
3205 #define $ac_tr_lib 1
3206 EOF
3207
3208   LIBS="-linet $LIBS"
3209
3210 else
3211   echo "$ac_t""no" 1>&6
3212 fi
3213  ;;
3214 esac
3215 if test "$ac_cv_lib_socket_connect" = "yes" || 
3216    test "$ac_cv_lib_inet_connect" = "yes"; then
3217   ac_cv_func_connect=yes
3218   cat >> confdefs.h <<\EOF
3219 #define HAVE_CONNECT 1
3220 EOF
3221
3222 fi
3223 fi
3224
3225
3226
3227 for ac_func in waitpid getcwd strdup strerror chown chmod chroot
3228 do
3229 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3230 echo "configure:3231: checking for $ac_func" >&5
3231 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3232   echo $ac_n "(cached) $ac_c" 1>&6
3233 else
3234   cat > conftest.$ac_ext <<EOF
3235 #line 3236 "configure"
3236 #include "confdefs.h"
3237 /* System header to define __stub macros and hopefully few prototypes,
3238     which can conflict with char $ac_func(); below.  */
3239 #include <assert.h>
3240 /* Override any gcc2 internal prototype to avoid an error.  */
3241 /* We use char because int might match the return type of a gcc2
3242     builtin and then its argument prototype would still apply.  */
3243 char $ac_func();
3244
3245 int main() {
3246
3247 /* The GNU C library defines this for functions which it implements
3248     to always fail with ENOSYS.  Some functions are actually named
3249     something starting with __ and the normal name is an alias.  */
3250 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3251 choke me
3252 #else
3253 $ac_func();
3254 #endif
3255
3256 ; return 0; }
3257 EOF
3258 if { (eval echo configure:3259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3259   rm -rf conftest*
3260   eval "ac_cv_func_$ac_func=yes"
3261 else
3262   echo "configure: failed program was:" >&5
3263   cat conftest.$ac_ext >&5
3264   rm -rf conftest*
3265   eval "ac_cv_func_$ac_func=no"
3266 fi
3267 rm -f conftest*
3268 fi
3269
3270 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3271   echo "$ac_t""yes" 1>&6
3272     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3273   cat >> confdefs.h <<EOF
3274 #define $ac_tr_func 1
3275 EOF
3276  
3277 else
3278   echo "$ac_t""no" 1>&6
3279 fi
3280 done
3281
3282 for ac_func in fstat strchr utime utimes getrlimit fsync execl bzero memset
3283 do
3284 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3285 echo "configure:3286: checking for $ac_func" >&5
3286 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3287   echo $ac_n "(cached) $ac_c" 1>&6
3288 else
3289   cat > conftest.$ac_ext <<EOF
3290 #line 3291 "configure"
3291 #include "confdefs.h"
3292 /* System header to define __stub macros and hopefully few prototypes,
3293     which can conflict with char $ac_func(); below.  */
3294 #include <assert.h>
3295 /* Override any gcc2 internal prototype to avoid an error.  */
3296 /* We use char because int might match the return type of a gcc2
3297     builtin and then its argument prototype would still apply.  */
3298 char $ac_func();
3299
3300 int main() {
3301
3302 /* The GNU C library defines this for functions which it implements
3303     to always fail with ENOSYS.  Some functions are actually named
3304     something starting with __ and the normal name is an alias.  */
3305 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3306 choke me
3307 #else
3308 $ac_func();
3309 #endif
3310
3311 ; return 0; }
3312 EOF
3313 if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3314   rm -rf conftest*
3315   eval "ac_cv_func_$ac_func=yes"
3316 else
3317   echo "configure: failed program was:" >&5
3318   cat conftest.$ac_ext >&5
3319   rm -rf conftest*
3320   eval "ac_cv_func_$ac_func=no"
3321 fi
3322 rm -f conftest*
3323 fi
3324
3325 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3326   echo "$ac_t""yes" 1>&6
3327     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3328   cat >> confdefs.h <<EOF
3329 #define $ac_tr_func 1
3330 EOF
3331  
3332 else
3333   echo "$ac_t""no" 1>&6
3334 fi
3335 done
3336
3337 for ac_func in memmove vsnprintf setsid glob strpbrk pipe crypt16 getauthuid
3338 do
3339 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3340 echo "configure:3341: checking for $ac_func" >&5
3341 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3342   echo $ac_n "(cached) $ac_c" 1>&6
3343 else
3344   cat > conftest.$ac_ext <<EOF
3345 #line 3346 "configure"
3346 #include "confdefs.h"
3347 /* System header to define __stub macros and hopefully few prototypes,
3348     which can conflict with char $ac_func(); below.  */
3349 #include <assert.h>
3350 /* Override any gcc2 internal prototype to avoid an error.  */
3351 /* We use char because int might match the return type of a gcc2
3352     builtin and then its argument prototype would still apply.  */
3353 char $ac_func();
3354
3355 int main() {
3356
3357 /* The GNU C library defines this for functions which it implements
3358     to always fail with ENOSYS.  Some functions are actually named
3359     something starting with __ and the normal name is an alias.  */
3360 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3361 choke me
3362 #else
3363 $ac_func();
3364 #endif
3365
3366 ; return 0; }
3367 EOF
3368 if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3369   rm -rf conftest*
3370   eval "ac_cv_func_$ac_func=yes"
3371 else
3372   echo "configure: failed program was:" >&5
3373   cat conftest.$ac_ext >&5
3374   rm -rf conftest*
3375   eval "ac_cv_func_$ac_func=no"
3376 fi
3377 rm -f conftest*
3378 fi
3379
3380 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3381   echo "$ac_t""yes" 1>&6
3382     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3383   cat >> confdefs.h <<EOF
3384 #define $ac_tr_func 1
3385 EOF
3386  
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390 done
3391
3392 for ac_func in strftime sigprocmask sigblock sigaction innetgr
3393 do
3394 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3395 echo "configure:3396: checking for $ac_func" >&5
3396 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3397   echo $ac_n "(cached) $ac_c" 1>&6
3398 else
3399   cat > conftest.$ac_ext <<EOF
3400 #line 3401 "configure"
3401 #include "confdefs.h"
3402 /* System header to define __stub macros and hopefully few prototypes,
3403     which can conflict with char $ac_func(); below.  */
3404 #include <assert.h>
3405 /* Override any gcc2 internal prototype to avoid an error.  */
3406 /* We use char because int might match the return type of a gcc2
3407     builtin and then its argument prototype would still apply.  */
3408 char $ac_func();
3409
3410 int main() {
3411
3412 /* The GNU C library defines this for functions which it implements
3413     to always fail with ENOSYS.  Some functions are actually named
3414     something starting with __ and the normal name is an alias.  */
3415 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3416 choke me
3417 #else
3418 $ac_func();
3419 #endif
3420
3421 ; return 0; }
3422 EOF
3423 if { (eval echo configure:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3424   rm -rf conftest*
3425   eval "ac_cv_func_$ac_func=yes"
3426 else
3427   echo "configure: failed program was:" >&5
3428   cat conftest.$ac_ext >&5
3429   rm -rf conftest*
3430   eval "ac_cv_func_$ac_func=no"
3431 fi
3432 rm -f conftest*
3433 fi
3434
3435 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3436   echo "$ac_t""yes" 1>&6
3437     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3438   cat >> confdefs.h <<EOF
3439 #define $ac_tr_func 1
3440 EOF
3441  
3442 else
3443   echo "$ac_t""no" 1>&6
3444 fi
3445 done
3446
3447 for ac_func in initgroups select rdchk getgrnam pathconf putprpwnam
3448 do
3449 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3450 echo "configure:3451: checking for $ac_func" >&5
3451 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3452   echo $ac_n "(cached) $ac_c" 1>&6
3453 else
3454   cat > conftest.$ac_ext <<EOF
3455 #line 3456 "configure"
3456 #include "confdefs.h"
3457 /* System header to define __stub macros and hopefully few prototypes,
3458     which can conflict with char $ac_func(); below.  */
3459 #include <assert.h>
3460 /* Override any gcc2 internal prototype to avoid an error.  */
3461 /* We use char because int might match the return type of a gcc2
3462     builtin and then its argument prototype would still apply.  */
3463 char $ac_func();
3464
3465 int main() {
3466
3467 /* The GNU C library defines this for functions which it implements
3468     to always fail with ENOSYS.  Some functions are actually named
3469     something starting with __ and the normal name is an alias.  */
3470 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3471 choke me
3472 #else
3473 $ac_func();
3474 #endif
3475
3476 ; return 0; }
3477 EOF
3478 if { (eval echo configure:3479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3479   rm -rf conftest*
3480   eval "ac_cv_func_$ac_func=yes"
3481 else
3482   echo "configure: failed program was:" >&5
3483   cat conftest.$ac_ext >&5
3484   rm -rf conftest*
3485   eval "ac_cv_func_$ac_func=no"
3486 fi
3487 rm -f conftest*
3488 fi
3489
3490 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3491   echo "$ac_t""yes" 1>&6
3492     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3493   cat >> confdefs.h <<EOF
3494 #define $ac_tr_func 1
3495 EOF
3496  
3497 else
3498   echo "$ac_t""no" 1>&6
3499 fi
3500 done
3501
3502 for ac_func in setuidx setgroups mktime rename ftruncate stat64 fstat64 lstat64
3503 do
3504 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3505 echo "configure:3506: checking for $ac_func" >&5
3506 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3507   echo $ac_n "(cached) $ac_c" 1>&6
3508 else
3509   cat > conftest.$ac_ext <<EOF
3510 #line 3511 "configure"
3511 #include "confdefs.h"
3512 /* System header to define __stub macros and hopefully few prototypes,
3513     which can conflict with char $ac_func(); below.  */
3514 #include <assert.h>
3515 /* Override any gcc2 internal prototype to avoid an error.  */
3516 /* We use char because int might match the return type of a gcc2
3517     builtin and then its argument prototype would still apply.  */
3518 char $ac_func();
3519
3520 int main() {
3521
3522 /* The GNU C library defines this for functions which it implements
3523     to always fail with ENOSYS.  Some functions are actually named
3524     something starting with __ and the normal name is an alias.  */
3525 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3526 choke me
3527 #else
3528 $ac_func();
3529 #endif
3530
3531 ; return 0; }
3532 EOF
3533 if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3534   rm -rf conftest*
3535   eval "ac_cv_func_$ac_func=yes"
3536 else
3537   echo "configure: failed program was:" >&5
3538   cat conftest.$ac_ext >&5
3539   rm -rf conftest*
3540   eval "ac_cv_func_$ac_func=no"
3541 fi
3542 rm -f conftest*
3543 fi
3544
3545 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3546   echo "$ac_t""yes" 1>&6
3547     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3548   cat >> confdefs.h <<EOF
3549 #define $ac_tr_func 1
3550 EOF
3551  
3552 else
3553   echo "$ac_t""no" 1>&6
3554 fi
3555 done
3556
3557 for ac_func in set_auth_parameters atexit grantpt getspnam dup2 lseek64 ftruncate64
3558 do
3559 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3560 echo "configure:3561: checking for $ac_func" >&5
3561 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3562   echo $ac_n "(cached) $ac_c" 1>&6
3563 else
3564   cat > conftest.$ac_ext <<EOF
3565 #line 3566 "configure"
3566 #include "confdefs.h"
3567 /* System header to define __stub macros and hopefully few prototypes,
3568     which can conflict with char $ac_func(); below.  */
3569 #include <assert.h>
3570 /* Override any gcc2 internal prototype to avoid an error.  */
3571 /* We use char because int might match the return type of a gcc2
3572     builtin and then its argument prototype would still apply.  */
3573 char $ac_func();
3574
3575 int main() {
3576
3577 /* The GNU C library defines this for functions which it implements
3578     to always fail with ENOSYS.  Some functions are actually named
3579     something starting with __ and the normal name is an alias.  */
3580 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3581 choke me
3582 #else
3583 $ac_func();
3584 #endif
3585
3586 ; return 0; }
3587 EOF
3588 if { (eval echo configure:3589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3589   rm -rf conftest*
3590   eval "ac_cv_func_$ac_func=yes"
3591 else
3592   echo "configure: failed program was:" >&5
3593   cat conftest.$ac_ext >&5
3594   rm -rf conftest*
3595   eval "ac_cv_func_$ac_func=no"
3596 fi
3597 rm -f conftest*
3598 fi
3599
3600 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3601   echo "$ac_t""yes" 1>&6
3602     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3603   cat >> confdefs.h <<EOF
3604 #define $ac_tr_func 1
3605 EOF
3606  
3607 else
3608   echo "$ac_t""no" 1>&6
3609 fi
3610 done
3611
3612 for ac_func in bigcrypt getprpwnam setluid yp_get_default_domain getpwanam
3613 do
3614 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3615 echo "configure:3616: checking for $ac_func" >&5
3616 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3617   echo $ac_n "(cached) $ac_c" 1>&6
3618 else
3619   cat > conftest.$ac_ext <<EOF
3620 #line 3621 "configure"
3621 #include "confdefs.h"
3622 /* System header to define __stub macros and hopefully few prototypes,
3623     which can conflict with char $ac_func(); below.  */
3624 #include <assert.h>
3625 /* Override any gcc2 internal prototype to avoid an error.  */
3626 /* We use char because int might match the return type of a gcc2
3627     builtin and then its argument prototype would still apply.  */
3628 char $ac_func();
3629
3630 int main() {
3631
3632 /* The GNU C library defines this for functions which it implements
3633     to always fail with ENOSYS.  Some functions are actually named
3634     something starting with __ and the normal name is an alias.  */
3635 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3636 choke me
3637 #else
3638 $ac_func();
3639 #endif
3640
3641 ; return 0; }
3642 EOF
3643 if { (eval echo configure:3644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3644   rm -rf conftest*
3645   eval "ac_cv_func_$ac_func=yes"
3646 else
3647   echo "configure: failed program was:" >&5
3648   cat conftest.$ac_ext >&5
3649   rm -rf conftest*
3650   eval "ac_cv_func_$ac_func=no"
3651 fi
3652 rm -f conftest*
3653 fi
3654
3655 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3656   echo "$ac_t""yes" 1>&6
3657     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3658   cat >> confdefs.h <<EOF
3659 #define $ac_tr_func 1
3660 EOF
3661  
3662 else
3663   echo "$ac_t""no" 1>&6
3664 fi
3665 done
3666
3667
3668 echo $ac_n "checking for long long ... $ac_c"
3669 if test "$cross_compiling" = yes; then
3670     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3671 else
3672   cat > conftest.$ac_ext <<EOF
3673 #line 3674 "configure"
3674 #include "confdefs.h"
3675 #include <stdio.h>
3676 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
3677 EOF
3678 if { (eval echo configure:3679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3679 then
3680   echo yes;cat >> confdefs.h <<\EOF
3681 #define HAVE_LONGLONG 1
3682 EOF
3683
3684 else
3685   echo "configure: failed program was:" >&5
3686   cat conftest.$ac_ext >&5
3687   rm -fr conftest*
3688   echo no
3689 fi
3690 rm -fr conftest*
3691 fi
3692
3693
3694 echo $ac_n "checking for 64 bit off_t ... $ac_c"
3695 if test "$cross_compiling" = yes; then
3696     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3697 else
3698   cat > conftest.$ac_ext <<EOF
3699 #line 3700 "configure"
3700 #include "confdefs.h"
3701 #include <stdio.h>
3702 #include <sys/stat.h>
3703 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
3704 EOF
3705 if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3706 then
3707   echo yes;cat >> confdefs.h <<\EOF
3708 #define SIZEOF_OFF_T 8
3709 EOF
3710
3711 else
3712   echo "configure: failed program was:" >&5
3713   cat conftest.$ac_ext >&5
3714   rm -fr conftest*
3715   echo no
3716 fi
3717 rm -fr conftest*
3718 fi
3719
3720
3721 echo $ac_n "checking for off64_t ... $ac_c"
3722 if test "$cross_compiling" = yes; then
3723     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3724 else
3725   cat > conftest.$ac_ext <<EOF
3726 #line 3727 "configure"
3727 #include "confdefs.h"
3728 #include <stdio.h>
3729 #include <sys/stat.h>
3730 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
3731 EOF
3732 if { (eval echo configure:3733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3733 then
3734   echo yes;cat >> confdefs.h <<\EOF
3735 #define HAVE_OFF64_T 1
3736 EOF
3737
3738 else
3739   echo "configure: failed program was:" >&5
3740   cat conftest.$ac_ext >&5
3741   rm -fr conftest*
3742   echo no
3743 fi
3744 rm -fr conftest*
3745 fi
3746
3747
3748 echo $ac_n "checking for 64 bit ino_t ... $ac_c"
3749 if test "$cross_compiling" = yes; then
3750     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3751 else
3752   cat > conftest.$ac_ext <<EOF
3753 #line 3754 "configure"
3754 #include "confdefs.h"
3755 #include <stdio.h>
3756 #include <sys/stat.h>
3757 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
3758 EOF
3759 if { (eval echo configure:3760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3760 then
3761   echo yes;cat >> confdefs.h <<\EOF
3762 #define SIZEOF_INO_T 8
3763 EOF
3764
3765 else
3766   echo "configure: failed program was:" >&5
3767   cat conftest.$ac_ext >&5
3768   rm -fr conftest*
3769   echo no
3770 fi
3771 rm -fr conftest*
3772 fi
3773
3774
3775 echo $ac_n "checking for ino64_t ... $ac_c"
3776 if test "$cross_compiling" = yes; then
3777     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3778 else
3779   cat > conftest.$ac_ext <<EOF
3780 #line 3781 "configure"
3781 #include "confdefs.h"
3782 #include <stdio.h>
3783 #include <sys/stat.h>
3784 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
3785 EOF
3786 if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3787 then
3788   echo yes;cat >> confdefs.h <<\EOF
3789 #define HAVE_INO64_T 1
3790 EOF
3791
3792 else
3793   echo "configure: failed program was:" >&5
3794   cat conftest.$ac_ext >&5
3795   rm -fr conftest*
3796   echo no
3797 fi
3798 rm -fr conftest*
3799 fi
3800
3801
3802 echo $ac_n "checking for union semun ... $ac_c"
3803 if test "$cross_compiling" = yes; then
3804     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3805 else
3806   cat > conftest.$ac_ext <<EOF
3807 #line 3808 "configure"
3808 #include "confdefs.h"
3809
3810 #include <sys/types.h>
3811 #include <sys/ipc.h>
3812 #include <sys/sem.h>
3813 main() { union semun ss; exit(0); }
3814 EOF
3815 if { (eval echo configure:3816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3816 then
3817   echo yes;cat >> confdefs.h <<\EOF
3818 #define HAVE_UNION_SEMUN 1
3819 EOF
3820
3821 else
3822   echo "configure: failed program was:" >&5
3823   cat conftest.$ac_ext >&5
3824   rm -fr conftest*
3825   echo no
3826 fi
3827 rm -fr conftest*
3828 fi
3829
3830
3831 echo $ac_n "checking for unsigned char ... $ac_c"
3832 if test "$cross_compiling" = yes; then
3833     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3834 else
3835   cat > conftest.$ac_ext <<EOF
3836 #line 3837 "configure"
3837 #include "confdefs.h"
3838 #include <stdio.h>
3839 main() { char c; c=250; exit((c > 0)?0:1); }
3840 EOF
3841 if { (eval echo configure:3842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3842 then
3843   echo yes;cat >> confdefs.h <<\EOF
3844 #define HAVE_UNSIGNED_CHAR 1
3845 EOF
3846
3847 else
3848   echo "configure: failed program was:" >&5
3849   cat conftest.$ac_ext >&5
3850   rm -fr conftest*
3851   echo no
3852 fi
3853 rm -fr conftest*
3854 fi
3855
3856
3857 echo $ac_n "checking for sin_len in sock ... $ac_c"
3858 cat > conftest.$ac_ext <<EOF
3859 #line 3860 "configure"
3860 #include "confdefs.h"
3861 #include <sys/types.h>
3862 #include <sys/socket.h>
3863 #include <netinet/in.h>
3864 int main() {
3865 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
3866 ; return 0; }
3867 EOF
3868 if { (eval echo configure:3869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3869   rm -rf conftest*
3870   echo yes;cat >> confdefs.h <<\EOF
3871 #define HAVE_SOCK_SIN_LEN 1
3872 EOF
3873
3874 else
3875   echo "configure: failed program was:" >&5
3876   cat conftest.$ac_ext >&5
3877   rm -rf conftest*
3878   echo no
3879 fi
3880 rm -f conftest*
3881
3882 echo $ac_n "checking for __FILE__ macro ... $ac_c"
3883 cat > conftest.$ac_ext <<EOF
3884 #line 3885 "configure"
3885 #include "confdefs.h"
3886 #include <stdio.h>
3887 int main() {
3888 printf("%s\n", __FILE__);
3889 ; return 0; }
3890 EOF
3891 if { (eval echo configure:3892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3892   rm -rf conftest*
3893   echo yes;cat >> confdefs.h <<\EOF
3894 #define HAVE_FILE_MACRO 1
3895 EOF
3896
3897 else
3898   echo "configure: failed program was:" >&5
3899   cat conftest.$ac_ext >&5
3900   rm -rf conftest*
3901   echo no
3902 fi
3903 rm -f conftest*
3904
3905 echo $ac_n "checking for __FUNCTION__ macro ... $ac_c"
3906 cat > conftest.$ac_ext <<EOF
3907 #line 3908 "configure"
3908 #include "confdefs.h"
3909 #include <stdio.h>
3910 int main() {
3911 printf("%s\n", __FUNCTION__);
3912 ; return 0; }
3913 EOF
3914 if { (eval echo configure:3915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3915   rm -rf conftest*
3916   echo yes;cat >> confdefs.h <<\EOF
3917 #define HAVE_FUNCTION_MACRO 1
3918 EOF
3919
3920 else
3921   echo "configure: failed program was:" >&5
3922   cat conftest.$ac_ext >&5
3923   rm -rf conftest*
3924   echo no
3925 fi
3926 rm -f conftest*
3927
3928 echo $ac_n "checking if gettimeofday takes tz argument ... $ac_c"
3929 if test "$cross_compiling" = yes; then
3930     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3931 else
3932   cat > conftest.$ac_ext <<EOF
3933 #line 3934 "configure"
3934 #include "confdefs.h"
3935
3936 #include <sys/time.h>
3937 #include <unistd.h>
3938 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
3939 EOF
3940 if { (eval echo configure:3941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3941 then
3942   echo yes;cat >> confdefs.h <<\EOF
3943 #define HAVE_GETTIMEOFDAY_TZ 1
3944 EOF
3945
3946 else
3947   echo "configure: failed program was:" >&5
3948   cat conftest.$ac_ext >&5
3949   rm -fr conftest*
3950   echo no
3951 fi
3952 rm -fr conftest*
3953 fi
3954
3955
3956
3957 echo $ac_n "checking for broken readdir ... $ac_c"
3958 if test "$cross_compiling" = yes; then
3959     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3960 else
3961   cat > conftest.$ac_ext <<EOF
3962 #line 3963 "configure"
3963 #include "confdefs.h"
3964 #include <sys/types.h>
3965 #include <dirent.h>
3966 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
3967 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
3968 di->d_name[0] == 0) exit(0); exit(1);} 
3969 EOF
3970 if { (eval echo configure:3971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3971 then
3972   echo yes - you are using the broken /usr/ucb/cc;cat >> confdefs.h <<\EOF
3973 #define HAVE_BROKEN_READDIR 1
3974 EOF
3975
3976 else
3977   echo "configure: failed program was:" >&5
3978   cat conftest.$ac_ext >&5
3979   rm -fr conftest*
3980   echo no
3981 fi
3982 rm -fr conftest*
3983 fi
3984
3985
3986 echo $ac_n "checking for utimbuf ... $ac_c"
3987 cat > conftest.$ac_ext <<EOF
3988 #line 3989 "configure"
3989 #include "confdefs.h"
3990 #include <sys/types.h>
3991 #include <utime.h>
3992 int main() {
3993 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
3994 ; return 0; }
3995 EOF
3996 if { (eval echo configure:3997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3997   rm -rf conftest*
3998   echo yes;cat >> confdefs.h <<\EOF
3999 #define HAVE_UTIMBUF 1
4000 EOF
4001
4002 else
4003   echo "configure: failed program was:" >&5
4004   cat conftest.$ac_ext >&5
4005   rm -rf conftest*
4006   echo no
4007 fi
4008 rm -f conftest*
4009
4010
4011 echo $ac_n "checking for test routines ... $ac_c"
4012 if test "$cross_compiling" = yes; then
4013     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4014 else
4015   cat > conftest.$ac_ext <<EOF
4016 #line 4017 "configure"
4017 #include "confdefs.h"
4018 #include "tests/trivial.c"
4019 EOF
4020 if { (eval echo configure:4021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4021 then
4022   echo yes;
4023 else
4024   echo "configure: failed program was:" >&5
4025   cat conftest.$ac_ext >&5
4026   rm -fr conftest*
4027   echo ERROR - cant find test code. Aborting config; exit 1
4028 fi
4029 rm -fr conftest*
4030 fi
4031
4032
4033 echo $ac_n "checking for ftruncate extend ... $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 #include "tests/ftruncate.c"
4041 EOF
4042 if { (eval echo configure:4043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4043 then
4044   echo yes;cat >> confdefs.h <<\EOF
4045 #define HAVE_FTRUNCATE_EXTEND 1
4046 EOF
4047
4048 else
4049   echo "configure: failed program was:" >&5
4050   cat conftest.$ac_ext >&5
4051   rm -fr conftest*
4052   echo no
4053 fi
4054 rm -fr conftest*
4055 fi
4056
4057
4058 echo $ac_n "checking for broken getgroups ... $ac_c"
4059 if test "$cross_compiling" = yes; then
4060     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4061 else
4062   cat > conftest.$ac_ext <<EOF
4063 #line 4064 "configure"
4064 #include "confdefs.h"
4065 #include "tests/getgroups.c"
4066 EOF
4067 if { (eval echo configure:4068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4068 then
4069   echo yes;cat >> confdefs.h <<\EOF
4070 #define HAVE_BROKEN_GETGROUPS 1
4071 EOF
4072
4073 else
4074   echo "configure: failed program was:" >&5
4075   cat conftest.$ac_ext >&5
4076   rm -fr conftest*
4077   echo no
4078 fi
4079 rm -fr conftest*
4080 fi
4081
4082
4083
4084 echo $ac_n "checking for broken inet_ntoa ... $ac_c"
4085 if test "$cross_compiling" = yes; then
4086     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4087 else
4088   cat > conftest.$ac_ext <<EOF
4089 #line 4090 "configure"
4090 #include "confdefs.h"
4091
4092 #include <stdio.h>
4093 #include <sys/types.h>
4094 #include <netinet/in.h>
4095 #include <arpa/inet.h>
4096 main() { struct in_addr ip; ip.s_addr = 0x12345678;
4097 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
4098     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
4099 exit(1);}
4100 EOF
4101 if { (eval echo configure:4102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4102 then
4103   echo yes;cat >> confdefs.h <<\EOF
4104 #define REPLACE_INET_NTOA 1
4105 EOF
4106
4107 else
4108   echo "configure: failed program was:" >&5
4109   cat conftest.$ac_ext >&5
4110   rm -fr conftest*
4111   echo no
4112 fi
4113 rm -fr conftest*
4114 fi
4115
4116
4117 echo $ac_n "checking for root ... $ac_c"
4118 if test "$cross_compiling" = yes; then
4119     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4120 else
4121   cat > conftest.$ac_ext <<EOF
4122 #line 4123 "configure"
4123 #include "confdefs.h"
4124 main() { exit(getuid() != 0); }
4125 EOF
4126 if { (eval echo configure:4127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4127 then
4128   echo yes;cat >> confdefs.h <<\EOF
4129 #define HAVE_ROOT 1
4130 EOF
4131
4132 else
4133   echo "configure: failed program was:" >&5
4134   cat conftest.$ac_ext >&5
4135   rm -fr conftest*
4136   echo WARNING: running as non-root will disable some tests;
4137 fi
4138 rm -fr conftest*
4139 fi
4140
4141
4142 netmask=no;
4143 echo $ac_n "checking for netmask ifconf ... $ac_c"
4144 if test "$cross_compiling" = yes; then
4145     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4146 else
4147   cat > conftest.$ac_ext <<EOF
4148 #line 4149 "configure"
4149 #include "confdefs.h"
4150
4151 #define HAVE_NETMASK_IFCONF 1
4152 #define AUTOCONF 1
4153 #include "lib/netmask.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;netmask=yes;cat >> confdefs.h <<\EOF
4158 #define HAVE_NETMASK_IFCONF 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 if test $netmask = no; then
4172 echo $ac_n "checking for netmask ifreq ... $ac_c"
4173 if test "$cross_compiling" = yes; then
4174     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4175 else
4176   cat > conftest.$ac_ext <<EOF
4177 #line 4178 "configure"
4178 #include "confdefs.h"
4179
4180 #define HAVE_NETMASK_IFREQ 1
4181 #define AUTOCONF 1
4182 #include "lib/netmask.c"
4183 EOF
4184 if { (eval echo configure:4185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4185 then
4186   echo yes;netmask=yes;cat >> confdefs.h <<\EOF
4187 #define HAVE_NETMASK_IFREQ 1
4188 EOF
4189
4190 else
4191   echo "configure: failed program was:" >&5
4192   cat conftest.$ac_ext >&5
4193   rm -fr conftest*
4194   echo no
4195 fi
4196 rm -fr conftest*
4197 fi
4198
4199 fi
4200
4201 if test $netmask = no; then
4202 echo $ac_n "checking for netmask AIX ... $ac_c"
4203 if test "$cross_compiling" = yes; then
4204     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4205 else
4206   cat > conftest.$ac_ext <<EOF
4207 #line 4208 "configure"
4208 #include "confdefs.h"
4209
4210 #define HAVE_NETMASK_AIX 1
4211 #define AUTOCONF 1
4212 #include "lib/netmask.c"
4213 EOF
4214 if { (eval echo configure:4215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4215 then
4216   echo yes;netmask=yes;cat >> confdefs.h <<\EOF
4217 #define HAVE_NETMASK_AIX 1
4218 EOF
4219
4220 else
4221   echo "configure: failed program was:" >&5
4222   cat conftest.$ac_ext >&5
4223   rm -fr conftest*
4224   echo no
4225 fi
4226 rm -fr conftest*
4227 fi
4228
4229 fi
4230
4231 echo $ac_n "checking for trapdoor seteuid ... $ac_c"
4232 if test "$cross_compiling" = yes; then
4233     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4234 else
4235   cat > conftest.$ac_ext <<EOF
4236 #line 4237 "configure"
4237 #include "confdefs.h"
4238 #include "tests/trapdoor.c"
4239 EOF
4240 if { (eval echo configure:4241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4241 then
4242   echo no
4243 else
4244   echo "configure: failed program was:" >&5
4245   cat conftest.$ac_ext >&5
4246   rm -fr conftest*
4247   echo yes;cat >> confdefs.h <<\EOF
4248 #define HAVE_TRAPDOOR_UID 1
4249 EOF
4250
4251 fi
4252 rm -fr conftest*
4253 fi
4254
4255
4256 echo $ac_n "checking for shared mmap ... $ac_c"
4257 if test "$cross_compiling" = yes; then
4258     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4259 else
4260   cat > conftest.$ac_ext <<EOF
4261 #line 4262 "configure"
4262 #include "confdefs.h"
4263 #include "tests/shared_mmap.c"
4264 EOF
4265 if { (eval echo configure:4266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4266 then
4267   echo yes;cat >> confdefs.h <<\EOF
4268 #define HAVE_SHARED_MMAP 1
4269 EOF
4270
4271 else
4272   echo "configure: failed program was:" >&5
4273   cat conftest.$ac_ext >&5
4274   rm -fr conftest*
4275   echo no
4276 fi
4277 rm -fr conftest*
4278 fi
4279
4280
4281 echo $ac_n "checking for fcntl locking ... $ac_c"
4282 if test "$cross_compiling" = yes; then
4283     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4284 else
4285   cat > conftest.$ac_ext <<EOF
4286 #line 4287 "configure"
4287 #include "confdefs.h"
4288 #include "tests/fcntl_lock.c"
4289 EOF
4290 if { (eval echo configure:4291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4291 then
4292   echo yes;cat >> confdefs.h <<\EOF
4293 #define HAVE_FCNTL_LOCK 1
4294 EOF
4295
4296 else
4297   echo "configure: failed program was:" >&5
4298   cat conftest.$ac_ext >&5
4299   rm -fr conftest*
4300   echo no
4301 fi
4302 rm -fr conftest*
4303 fi
4304
4305
4306 echo $ac_n "checking for 64 bit fcntl locking ... $ac_c"
4307 if test "$cross_compiling" = yes; then
4308     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4309 else
4310   cat > conftest.$ac_ext <<EOF
4311 #line 4312 "configure"
4312 #include "confdefs.h"
4313
4314 #include <stdio.h>
4315 #include <stdlib.h>
4316
4317 #ifdef HAVE_FCNTL_H
4318 #include <fcntl.h>
4319 #endif
4320
4321 #ifdef HAVE_SYS_FCNTL_H
4322 #include <sys/fcntl.h>
4323 #endif
4324 main() { struct flock64 fl64;
4325 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
4326 exit(0);
4327 #else
4328 exit(1);
4329 #endif
4330 }
4331 EOF
4332 if { (eval echo configure:4333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4333 then
4334   echo yes;cat >> confdefs.h <<\EOF
4335 #define HAVE_STRUCT_FLOCK64 1
4336 EOF
4337
4338 else
4339   echo "configure: failed program was:" >&5
4340   cat conftest.$ac_ext >&5
4341   rm -fr conftest*
4342   echo no
4343 fi
4344 rm -fr conftest*
4345 fi
4346
4347
4348 echo $ac_n "checking for sysv ipc ... $ac_c"
4349 if test "$cross_compiling" = yes; then
4350     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4351 else
4352   cat > conftest.$ac_ext <<EOF
4353 #line 4354 "configure"
4354 #include "confdefs.h"
4355 #include "tests/sysv_ipc.c"
4356 EOF
4357 if { (eval echo configure:4358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4358 then
4359   echo yes;cat >> confdefs.h <<\EOF
4360 #define HAVE_SYSV_IPC 1
4361 EOF
4362
4363 else
4364   echo "configure: failed program was:" >&5
4365   cat conftest.$ac_ext >&5
4366   rm -fr conftest*
4367   echo no
4368 fi
4369 rm -fr conftest*
4370 fi
4371
4372
4373 #################################################
4374 # check for the AFS filesystem
4375 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
4376 echo "configure:4377: checking whether to use AFS" >&5
4377 # Check whether --with-afs or --without-afs was given.
4378 if test "${with_afs+set}" = set; then
4379   withval="$with_afs"
4380    case "$withval" in
4381   yes)
4382     echo "$ac_t""yes" 1>&6
4383     cat >> confdefs.h <<\EOF
4384 #define WITH_AFS 1
4385 EOF
4386
4387     ;;
4388   *)
4389     echo "$ac_t""no" 1>&6
4390     ;;
4391   esac 
4392 else
4393   echo "$ac_t""no" 1>&6
4394
4395 fi
4396
4397
4398
4399 #################################################
4400 # check for the DFS auth system
4401 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
4402 echo "configure:4403: checking whether to use DFS auth" >&5
4403 # Check whether --with-dfs or --without-dfs was given.
4404 if test "${with_dfs+set}" = set; then
4405   withval="$with_dfs"
4406    case "$withval" in
4407   yes)
4408     echo "$ac_t""yes" 1>&6
4409     cat >> confdefs.h <<\EOF
4410 #define WITH_DFS 1
4411 EOF
4412
4413     ;;
4414   *)
4415     echo "$ac_t""no" 1>&6
4416     ;;
4417   esac 
4418 else
4419   echo "$ac_t""no" 1>&6
4420
4421 fi
4422
4423
4424 #################################################
4425 # check for automount support
4426 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
4427 echo "configure:4428: checking whether to use AUTOMOUNT" >&5
4428 # Check whether --with-automount or --without-automount was given.
4429 if test "${with_automount+set}" = set; then
4430   withval="$with_automount"
4431    case "$withval" in
4432   yes)
4433     echo "$ac_t""yes" 1>&6
4434     cat >> confdefs.h <<\EOF
4435 #define WITH_AUTOMOUNT 1
4436 EOF
4437
4438     ;;
4439   *)
4440     echo "$ac_t""no" 1>&6
4441     ;;
4442   esac 
4443 else
4444   echo "$ac_t""no" 1>&6
4445
4446 fi
4447
4448
4449 #################################################
4450 # check for a LDAP password database
4451 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
4452 echo "configure:4453: checking whether to use LDAP password database" >&5
4453 # Check whether --with-ldap or --without-ldap was given.
4454 if test "${with_ldap+set}" = set; then
4455   withval="$with_ldap"
4456    case "$withval" in
4457   yes)
4458     echo "$ac_t""yes" 1>&6
4459     cat >> confdefs.h <<\EOF
4460 #define WITH_LDAP 1
4461 EOF
4462
4463     ;;
4464   *)
4465     echo "$ac_t""no" 1>&6
4466     ;;
4467   esac 
4468 else
4469   echo "$ac_t""no" 1>&6
4470
4471 fi
4472
4473
4474 #################################################
4475 # check for a NISPLUS password database
4476 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
4477 echo "configure:4478: checking whether to use NISPLUS password database" >&5
4478 # Check whether --with-nisplus or --without-nisplus was given.
4479 if test "${with_nisplus+set}" = set; then
4480   withval="$with_nisplus"
4481    case "$withval" in
4482   yes)
4483     echo "$ac_t""yes" 1>&6
4484     cat >> confdefs.h <<\EOF
4485 #define WITH_NISPLUS 1
4486 EOF
4487
4488     ;;
4489   *)
4490     echo "$ac_t""no" 1>&6
4491     ;;
4492   esac 
4493 else
4494   echo "$ac_t""no" 1>&6
4495
4496 fi
4497
4498
4499 #################################################
4500 # check for a NISPLUS_HOME support 
4501 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
4502 echo "configure:4503: checking whether to use NISPLUS_HOME" >&5
4503 # Check whether --with-nisplus-home or --without-nisplus-home was given.
4504 if test "${with_nisplus_home+set}" = set; then
4505   withval="$with_nisplus_home"
4506    case "$withval" in
4507   yes)
4508     echo "$ac_t""yes" 1>&6
4509     cat >> confdefs.h <<\EOF
4510 #define WITH_NISPLUS_HOME 1
4511 EOF
4512
4513     ;;
4514   *)
4515     echo "$ac_t""no" 1>&6
4516     ;;
4517   esac 
4518 else
4519   echo "$ac_t""no" 1>&6
4520
4521 fi
4522
4523
4524 #################################################
4525 # check for the secure socket layer
4526 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
4527 echo "configure:4528: checking whether to use SSL" >&5
4528 # Check whether --with-ssl or --without-ssl was given.
4529 if test "${with_ssl+set}" = set; then
4530   withval="$with_ssl"
4531    case "$withval" in
4532   yes)
4533     echo "$ac_t""yes" 1>&6
4534     cat >> confdefs.h <<\EOF
4535 #define WITH_SSL 1
4536 EOF
4537
4538     ;;
4539   *)
4540     echo "$ac_t""no" 1>&6
4541     ;;
4542   esac 
4543 else
4544   echo "$ac_t""no" 1>&6
4545
4546 fi
4547
4548
4549 #################################################
4550 # check for experimental mmap support
4551 echo $ac_n "checking whether to use MMAP""... $ac_c" 1>&6
4552 echo "configure:4553: checking whether to use MMAP" >&5
4553 # Check whether --with-mmap or --without-mmap was given.
4554 if test "${with_mmap+set}" = set; then
4555   withval="$with_mmap"
4556    case "$withval" in
4557   yes)
4558     echo "$ac_t""yes" 1>&6
4559     cat >> confdefs.h <<\EOF
4560 #define WITH_MMAP 1
4561 EOF
4562
4563     ;;
4564   *)
4565     echo "$ac_t""no" 1>&6
4566     ;;
4567   esac 
4568 else
4569   echo "$ac_t""no" 1>&6
4570
4571 fi
4572
4573
4574 #################################################
4575 # check for syslog logging
4576 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
4577 echo "configure:4578: checking whether to use syslog logging" >&5
4578 # Check whether --with-syslog or --without-syslog was given.
4579 if test "${with_syslog+set}" = set; then
4580   withval="$with_syslog"
4581    case "$withval" in
4582   yes)
4583     echo "$ac_t""yes" 1>&6
4584     cat >> confdefs.h <<\EOF
4585 #define WITH_SYSLOG 1
4586 EOF
4587
4588     ;;
4589   *)
4590     echo "$ac_t""no" 1>&6
4591     ;;
4592   esac 
4593 else
4594   echo "$ac_t""no" 1>&6
4595
4596 fi
4597
4598
4599 #################################################
4600 # check for experimental netatalk resource fork support
4601 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
4602 echo "configure:4603: checking whether to support netatalk" >&5
4603 # Check whether --with-netatalk or --without-netatalk was given.
4604 if test "${with_netatalk+set}" = set; then
4605   withval="$with_netatalk"
4606    case "$withval" in
4607   yes)
4608     echo "$ac_t""yes" 1>&6
4609     cat >> confdefs.h <<\EOF
4610 #define WITH_NETATALK 1
4611 EOF
4612
4613     ;;
4614   *)
4615     echo "$ac_t""no" 1>&6
4616     ;;
4617   esac 
4618 else
4619   echo "$ac_t""no" 1>&6
4620
4621 fi
4622
4623
4624
4625 #################################################
4626 # these tests are taken from the GNU fileutils package
4627 echo "checking how to get filesystem space usage" 1>&6
4628 echo "configure:4629: checking how to get filesystem space usage" >&5
4629 space=no
4630
4631 # Perform only the link test since it seems there are no variants of the
4632 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
4633 # because that got a false positive on SCO OSR5.  Adding the declaration
4634 # of a `struct statvfs' causes this test to fail (as it should) on such
4635 # systems.  That system is reported to work fine with STAT_STATFS4 which
4636 # is what it gets when this test fails.
4637 if test $space = no; then
4638   # SVR4
4639   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
4640 echo "configure:4641: checking statvfs function (SVR4)" >&5
4641 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
4642   echo $ac_n "(cached) $ac_c" 1>&6
4643 else
4644   cat > conftest.$ac_ext <<EOF
4645 #line 4646 "configure"
4646 #include "confdefs.h"
4647 #include <sys/types.h>
4648 #include <sys/statvfs.h>
4649 int main() {
4650 struct statvfs fsd; statvfs (0, &fsd);
4651 ; return 0; }
4652 EOF
4653 if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4654   rm -rf conftest*
4655   fu_cv_sys_stat_statvfs=yes
4656 else
4657   echo "configure: failed program was:" >&5
4658   cat conftest.$ac_ext >&5
4659   rm -rf conftest*
4660   fu_cv_sys_stat_statvfs=no
4661 fi
4662 rm -f conftest*
4663 fi
4664
4665 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
4666   if test $fu_cv_sys_stat_statvfs = yes; then
4667     space=yes
4668     cat >> confdefs.h <<\EOF
4669 #define STAT_STATVFS 1
4670 EOF
4671
4672   fi
4673 fi
4674
4675 if test $space = no; then
4676   # DEC Alpha running OSF/1
4677   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
4678 echo "configure:4679: checking for 3-argument statfs function (DEC OSF/1)" >&5
4679   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
4680   echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682   if test "$cross_compiling" = yes; then
4683   fu_cv_sys_stat_statfs3_osf1=no
4684 else
4685   cat > conftest.$ac_ext <<EOF
4686 #line 4687 "configure"
4687 #include "confdefs.h"
4688
4689 #include <sys/param.h>
4690 #include <sys/types.h>
4691 #include <sys/mount.h>
4692   main ()
4693   {
4694     struct statfs fsd;
4695     fsd.f_fsize = 0;
4696     exit (statfs (".", &fsd, sizeof (struct statfs)));
4697   }
4698 EOF
4699 if { (eval echo configure:4700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4700 then
4701   fu_cv_sys_stat_statfs3_osf1=yes
4702 else
4703   echo "configure: failed program was:" >&5
4704   cat conftest.$ac_ext >&5
4705   rm -fr conftest*
4706   fu_cv_sys_stat_statfs3_osf1=no
4707 fi
4708 rm -fr conftest*
4709 fi
4710
4711 fi
4712
4713   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
4714   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
4715     space=yes
4716     cat >> confdefs.h <<\EOF
4717 #define STAT_STATFS3_OSF1 1
4718 EOF
4719
4720   fi
4721 fi
4722
4723 if test $space = no; then
4724 # AIX
4725   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
4726 echo "configure:4727: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
4727   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
4728   echo $ac_n "(cached) $ac_c" 1>&6
4729 else
4730   if test "$cross_compiling" = yes; then
4731   fu_cv_sys_stat_statfs2_bsize=no
4732 else
4733   cat > conftest.$ac_ext <<EOF
4734 #line 4735 "configure"
4735 #include "confdefs.h"
4736
4737 #ifdef HAVE_SYS_PARAM_H
4738 #include <sys/param.h>
4739 #endif
4740 #ifdef HAVE_SYS_MOUNT_H
4741 #include <sys/mount.h>
4742 #endif
4743 #ifdef HAVE_SYS_VFS_H
4744 #include <sys/vfs.h>
4745 #endif
4746   main ()
4747   {
4748   struct statfs fsd;
4749   fsd.f_bsize = 0;
4750   exit (statfs (".", &fsd));
4751   }
4752 EOF
4753 if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4754 then
4755   fu_cv_sys_stat_statfs2_bsize=yes
4756 else
4757   echo "configure: failed program was:" >&5
4758   cat conftest.$ac_ext >&5
4759   rm -fr conftest*
4760   fu_cv_sys_stat_statfs2_bsize=no
4761 fi
4762 rm -fr conftest*
4763 fi
4764
4765 fi
4766
4767   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
4768   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
4769     space=yes
4770     cat >> confdefs.h <<\EOF
4771 #define STAT_STATFS2_BSIZE 1
4772 EOF
4773
4774   fi
4775 fi
4776
4777 if test $space = no; then
4778 # SVR3
4779   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
4780 echo "configure:4781: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
4781   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
4782   echo $ac_n "(cached) $ac_c" 1>&6
4783 else
4784   if test "$cross_compiling" = yes; then
4785   fu_cv_sys_stat_statfs4=no
4786 else
4787   cat > conftest.$ac_ext <<EOF
4788 #line 4789 "configure"
4789 #include "confdefs.h"
4790 #include <sys/types.h>
4791 #include <sys/statfs.h>
4792   main ()
4793   {
4794   struct statfs fsd;
4795   exit (statfs (".", &fsd, sizeof fsd, 0));
4796   }
4797 EOF
4798 if { (eval echo configure:4799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4799 then
4800   fu_cv_sys_stat_statfs4=yes
4801 else
4802   echo "configure: failed program was:" >&5
4803   cat conftest.$ac_ext >&5
4804   rm -fr conftest*
4805   fu_cv_sys_stat_statfs4=no
4806 fi
4807 rm -fr conftest*
4808 fi
4809
4810 fi
4811
4812   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
4813   if test $fu_cv_sys_stat_statfs4 = yes; then
4814     space=yes
4815     cat >> confdefs.h <<\EOF
4816 #define STAT_STATFS4 1
4817 EOF
4818
4819   fi
4820 fi
4821
4822 if test $space = no; then
4823 # 4.4BSD and NetBSD
4824   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
4825 echo "configure:4826: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
4826   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
4827   echo $ac_n "(cached) $ac_c" 1>&6
4828 else
4829   if test "$cross_compiling" = yes; then
4830   fu_cv_sys_stat_statfs2_fsize=no
4831 else
4832   cat > conftest.$ac_ext <<EOF
4833 #line 4834 "configure"
4834 #include "confdefs.h"
4835 #include <sys/types.h>
4836 #ifdef HAVE_SYS_PARAM_H
4837 #include <sys/param.h>
4838 #endif
4839 #ifdef HAVE_SYS_MOUNT_H
4840 #include <sys/mount.h>
4841 #endif
4842   main ()
4843   {
4844   struct statfs fsd;
4845   fsd.f_fsize = 0;
4846   exit (statfs (".", &fsd));
4847   }
4848 EOF
4849 if { (eval echo configure:4850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4850 then
4851   fu_cv_sys_stat_statfs2_fsize=yes
4852 else
4853   echo "configure: failed program was:" >&5
4854   cat conftest.$ac_ext >&5
4855   rm -fr conftest*
4856   fu_cv_sys_stat_statfs2_fsize=no
4857 fi
4858 rm -fr conftest*
4859 fi
4860
4861 fi
4862
4863   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
4864   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
4865     space=yes
4866     cat >> confdefs.h <<\EOF
4867 #define STAT_STATFS2_FSIZE 1
4868 EOF
4869
4870   fi
4871 fi
4872
4873 if test $space = no; then
4874   # Ultrix
4875   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
4876 echo "configure:4877: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
4877   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
4878   echo $ac_n "(cached) $ac_c" 1>&6
4879 else
4880   if test "$cross_compiling" = yes; then
4881   fu_cv_sys_stat_fs_data=no
4882 else
4883   cat > conftest.$ac_ext <<EOF
4884 #line 4885 "configure"
4885 #include "confdefs.h"
4886 #include <sys/types.h>
4887 #ifdef HAVE_SYS_PARAM_H
4888 #include <sys/param.h>
4889 #endif
4890 #ifdef HAVE_SYS_MOUNT_H
4891 #include <sys/mount.h>
4892 #endif
4893 #ifdef HAVE_SYS_FS_TYPES_H
4894 #include <sys/fs_types.h>
4895 #endif
4896   main ()
4897   {
4898   struct fs_data fsd;
4899   /* Ultrix's statfs returns 1 for success,
4900      0 for not mounted, -1 for failure.  */
4901   exit (statfs (".", &fsd) != 1);
4902   }
4903 EOF
4904 if { (eval echo configure:4905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4905 then
4906   fu_cv_sys_stat_fs_data=yes
4907 else
4908   echo "configure: failed program was:" >&5
4909   cat conftest.$ac_ext >&5
4910   rm -fr conftest*
4911   fu_cv_sys_stat_fs_data=no
4912 fi
4913 rm -fr conftest*
4914 fi
4915
4916 fi
4917
4918   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
4919   if test $fu_cv_sys_stat_fs_data = yes; then
4920     space=yes
4921     cat >> confdefs.h <<\EOF
4922 #define STAT_STATFS2_FS_DATA 1
4923 EOF
4924
4925   fi
4926 fi
4927
4928 echo "checking configure summary"
4929 if test "$cross_compiling" = yes; then
4930     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4931 else
4932   cat > conftest.$ac_ext <<EOF
4933 #line 4934 "configure"
4934 #include "confdefs.h"
4935 #include "tests/summary.c"
4936 EOF
4937 if { (eval echo configure:4938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4938 then
4939   echo "configure OK";
4940 else
4941   echo "configure: failed program was:" >&5
4942   cat conftest.$ac_ext >&5
4943   rm -fr conftest*
4944   echo ERROR - summary failure. Aborting config; exit 1
4945 fi
4946 rm -fr conftest*
4947 fi
4948
4949
4950
4951 trap '' 1 2 15
4952 cat > confcache <<\EOF
4953 # This file is a shell script that caches the results of configure
4954 # tests run on this system so they can be shared between configure
4955 # scripts and configure runs.  It is not useful on other systems.
4956 # If it contains results you don't want to keep, you may remove or edit it.
4957 #
4958 # By default, configure uses ./config.cache as the cache file,
4959 # creating it if it does not exist already.  You can give configure
4960 # the --cache-file=FILE option to use a different cache file; that is
4961 # what configure does when it calls configure scripts in
4962 # subdirectories, so they share the cache.
4963 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4964 # config.status only pays attention to the cache file if you give it the
4965 # --recheck option to rerun configure.
4966 #
4967 EOF
4968 # The following way of writing the cache mishandles newlines in values,
4969 # but we know of no workaround that is simple, portable, and efficient.
4970 # So, don't put newlines in cache variables' values.
4971 # Ultrix sh set writes to stderr and can't be redirected directly,
4972 # and sets the high bit in the cache file unless we assign to the vars.
4973 (set) 2>&1 |
4974   case `(ac_space=' '; set) 2>&1` in
4975   *ac_space=\ *)
4976     # `set' does not quote correctly, so add quotes (double-quote substitution
4977     # turns \\\\ into \\, and sed turns \\ into \).
4978     sed -n \
4979       -e "s/'/'\\\\''/g" \
4980       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4981     ;;
4982   *)
4983     # `set' quotes correctly as required by POSIX, so do not add quotes.
4984     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4985     ;;
4986   esac >> confcache
4987 if cmp -s $cache_file confcache; then
4988   :
4989 else
4990   if test -w $cache_file; then
4991     echo "updating cache $cache_file"
4992     cat confcache > $cache_file
4993   else
4994     echo "not updating unwritable cache $cache_file"
4995   fi
4996 fi
4997 rm -f confcache
4998
4999 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5000
5001 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5002 # Let make expand exec_prefix.
5003 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5004
5005 # Any assignment to VPATH causes Sun make to only execute
5006 # the first set of double-colon rules, so remove it if not needed.
5007 # If there is a colon in the path, we need to keep it.
5008 if test "x$srcdir" = x.; then
5009   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5010 fi
5011
5012 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5013
5014 DEFS=-DHAVE_CONFIG_H
5015
5016 # Without the "./", some shells look in PATH for config.status.
5017 : ${CONFIG_STATUS=./config.status}
5018
5019 echo creating $CONFIG_STATUS
5020 rm -f $CONFIG_STATUS
5021 cat > $CONFIG_STATUS <<EOF
5022 #! /bin/sh
5023 # Generated automatically by configure.
5024 # Run this file to recreate the current configuration.
5025 # This directory was configured as follows,
5026 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5027 #
5028 # $0 $ac_configure_args
5029 #
5030 # Compiler output produced by configure, useful for debugging
5031 # configure, is in ./config.log if it exists.
5032
5033 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5034 for ac_option
5035 do
5036   case "\$ac_option" in
5037   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5038     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5039     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5040   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5041     echo "$CONFIG_STATUS generated by autoconf version 2.12"
5042     exit 0 ;;
5043   -help | --help | --hel | --he | --h)
5044     echo "\$ac_cs_usage"; exit 0 ;;
5045   *) echo "\$ac_cs_usage"; exit 1 ;;
5046   esac
5047 done
5048
5049 ac_given_srcdir=$srcdir
5050 ac_given_INSTALL="$INSTALL"
5051
5052 trap 'rm -fr `echo "Makefile tests/dummy client/dummy lib/dummy ubiqx/dummy
5053 web/dummy param/dummy nmbd/dummy smbd/dummy rpc_server/dummy
5054 rpc_parse/dummy script/dummy include/dummy codepages/dummy
5055 libsmb/dummy bin/dummy printing/dummy include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5056 EOF
5057 cat >> $CONFIG_STATUS <<EOF
5058
5059 # Protect against being on the right side of a sed subst in config.status.
5060 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5061  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5062 $ac_vpsub
5063 $extrasub
5064 s%@CFLAGS@%$CFLAGS%g
5065 s%@CPPFLAGS@%$CPPFLAGS%g
5066 s%@CXXFLAGS@%$CXXFLAGS%g
5067 s%@DEFS@%$DEFS%g
5068 s%@LDFLAGS@%$LDFLAGS%g
5069 s%@LIBS@%$LIBS%g
5070 s%@exec_prefix@%$exec_prefix%g
5071 s%@prefix@%$prefix%g
5072 s%@program_transform_name@%$program_transform_name%g
5073 s%@bindir@%$bindir%g
5074 s%@sbindir@%$sbindir%g
5075 s%@libexecdir@%$libexecdir%g
5076 s%@datadir@%$datadir%g
5077 s%@sysconfdir@%$sysconfdir%g
5078 s%@sharedstatedir@%$sharedstatedir%g
5079 s%@localstatedir@%$localstatedir%g
5080 s%@libdir@%$libdir%g
5081 s%@includedir@%$includedir%g
5082 s%@oldincludedir@%$oldincludedir%g
5083 s%@infodir@%$infodir%g
5084 s%@mandir@%$mandir%g
5085 s%@CC@%$CC%g
5086 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5087 s%@INSTALL_DATA@%$INSTALL_DATA%g
5088 s%@SHELL@%$SHELL%g
5089 s%@AWK@%$AWK%g
5090 s%@host@%$host%g
5091 s%@host_alias@%$host_alias%g
5092 s%@host_cpu@%$host_cpu%g
5093 s%@host_vendor@%$host_vendor%g
5094 s%@host_os@%$host_os%g
5095 s%@target@%$target%g
5096 s%@target_alias@%$target_alias%g
5097 s%@target_cpu@%$target_cpu%g
5098 s%@target_vendor@%$target_vendor%g
5099 s%@target_os@%$target_os%g
5100 s%@build@%$build%g
5101 s%@build_alias@%$build_alias%g
5102 s%@build_cpu@%$build_cpu%g
5103 s%@build_vendor@%$build_vendor%g
5104 s%@build_os@%$build_os%g
5105 s%@CPP@%$CPP%g
5106 s%@LIBOBJS@%$LIBOBJS%g
5107
5108 CEOF
5109 EOF
5110
5111 cat >> $CONFIG_STATUS <<\EOF
5112
5113 # Split the substitutions into bite-sized pieces for seds with
5114 # small command number limits, like on Digital OSF/1 and HP-UX.
5115 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5116 ac_file=1 # Number of current file.
5117 ac_beg=1 # First line for current file.
5118 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5119 ac_more_lines=:
5120 ac_sed_cmds=""
5121 while $ac_more_lines; do
5122   if test $ac_beg -gt 1; then
5123     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5124   else
5125     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5126   fi
5127   if test ! -s conftest.s$ac_file; then
5128     ac_more_lines=false
5129     rm -f conftest.s$ac_file
5130   else
5131     if test -z "$ac_sed_cmds"; then
5132       ac_sed_cmds="sed -f conftest.s$ac_file"
5133     else
5134       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5135     fi
5136     ac_file=`expr $ac_file + 1`
5137     ac_beg=$ac_end
5138     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5139   fi
5140 done
5141 if test -z "$ac_sed_cmds"; then
5142   ac_sed_cmds=cat
5143 fi
5144 EOF
5145
5146 cat >> $CONFIG_STATUS <<EOF
5147
5148 CONFIG_FILES=\${CONFIG_FILES-"Makefile tests/dummy client/dummy lib/dummy ubiqx/dummy
5149 web/dummy param/dummy nmbd/dummy smbd/dummy rpc_server/dummy
5150 rpc_parse/dummy script/dummy include/dummy codepages/dummy
5151 libsmb/dummy bin/dummy printing/dummy"}
5152 EOF
5153 cat >> $CONFIG_STATUS <<\EOF
5154 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5155   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5156   case "$ac_file" in
5157   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5158        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5159   *) ac_file_in="${ac_file}.in" ;;
5160   esac
5161
5162   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5163
5164   # Remove last slash and all that follows it.  Not all systems have dirname.
5165   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5166   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5167     # The file is in a subdirectory.
5168     test ! -d "$ac_dir" && mkdir "$ac_dir"
5169     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5170     # A "../" for each directory in $ac_dir_suffix.
5171     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5172   else
5173     ac_dir_suffix= ac_dots=
5174   fi
5175
5176   case "$ac_given_srcdir" in
5177   .)  srcdir=.
5178       if test -z "$ac_dots"; then top_srcdir=.
5179       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5180   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5181   *) # Relative path.
5182     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5183     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5184   esac
5185
5186   case "$ac_given_INSTALL" in
5187   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5188   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5189   esac
5190
5191   echo creating "$ac_file"
5192   rm -f "$ac_file"
5193   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5194   case "$ac_file" in
5195   *Makefile*) ac_comsub="1i\\
5196 # $configure_input" ;;
5197   *) ac_comsub= ;;
5198   esac
5199
5200   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5201   sed -e "$ac_comsub
5202 s%@configure_input@%$configure_input%g
5203 s%@srcdir@%$srcdir%g
5204 s%@top_srcdir@%$top_srcdir%g
5205 s%@INSTALL@%$INSTALL%g
5206 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5207 fi; done
5208 rm -f conftest.s*
5209
5210 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5211 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5212 #
5213 # ac_d sets the value in "#define NAME VALUE" lines.
5214 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5215 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5216 ac_dC='\3'
5217 ac_dD='%g'
5218 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5219 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5220 ac_uB='\([      ]\)%\1#\2define\3'
5221 ac_uC=' '
5222 ac_uD='\4%g'
5223 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5224 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5225 ac_eB='$%\1#\2define\3'
5226 ac_eC=' '
5227 ac_eD='%g'
5228
5229 if test "${CONFIG_HEADERS+set}" != set; then
5230 EOF
5231 cat >> $CONFIG_STATUS <<EOF
5232   CONFIG_HEADERS="include/config.h"
5233 EOF
5234 cat >> $CONFIG_STATUS <<\EOF
5235 fi
5236 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5237   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5238   case "$ac_file" in
5239   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5240        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5241   *) ac_file_in="${ac_file}.in" ;;
5242   esac
5243
5244   echo creating $ac_file
5245
5246   rm -f conftest.frag conftest.in conftest.out
5247   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5248   cat $ac_file_inputs > conftest.in
5249
5250 EOF
5251
5252 # Transform confdefs.h into a sed script conftest.vals that substitutes
5253 # the proper values into config.h.in to produce config.h.  And first:
5254 # Protect against being on the right side of a sed subst in config.status.
5255 # Protect against being in an unquoted here document in config.status.
5256 rm -f conftest.vals
5257 cat > conftest.hdr <<\EOF
5258 s/[\\&%]/\\&/g
5259 s%[\\$`]%\\&%g
5260 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5261 s%ac_d%ac_u%gp
5262 s%ac_u%ac_e%gp
5263 EOF
5264 sed -n -f conftest.hdr confdefs.h > conftest.vals
5265 rm -f conftest.hdr
5266
5267 # This sed command replaces #undef with comments.  This is necessary, for
5268 # example, in the case of _POSIX_SOURCE, which is predefined and required
5269 # on some systems where configure will not decide to define it.
5270 cat >> conftest.vals <<\EOF
5271 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5272 EOF
5273
5274 # Break up conftest.vals because some shells have a limit on
5275 # the size of here documents, and old seds have small limits too.
5276
5277 rm -f conftest.tail
5278 while :
5279 do
5280   ac_lines=`grep -c . conftest.vals`
5281   # grep -c gives empty output for an empty file on some AIX systems.
5282   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5283   # Write a limited-size here document to conftest.frag.
5284   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5285   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5286   echo 'CEOF
5287   sed -f conftest.frag conftest.in > conftest.out
5288   rm -f conftest.in
5289   mv conftest.out conftest.in
5290 ' >> $CONFIG_STATUS
5291   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5292   rm -f conftest.vals
5293   mv conftest.tail conftest.vals
5294 done
5295 rm -f conftest.vals
5296
5297 cat >> $CONFIG_STATUS <<\EOF
5298   rm -f conftest.frag conftest.h
5299   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5300   cat conftest.in >> conftest.h
5301   rm -f conftest.in
5302   if cmp -s $ac_file conftest.h 2>/dev/null; then
5303     echo "$ac_file is unchanged"
5304     rm -f conftest.h
5305   else
5306     # Remove last slash and all that follows it.  Not all systems have dirname.
5307       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5308       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5309       # The file is in a subdirectory.
5310       test ! -d "$ac_dir" && mkdir "$ac_dir"
5311     fi
5312     rm -f $ac_file
5313     mv conftest.h $ac_file
5314   fi
5315 fi; done
5316
5317 EOF
5318 cat >> $CONFIG_STATUS <<EOF
5319
5320 EOF
5321 cat >> $CONFIG_STATUS <<\EOF
5322
5323 exit 0
5324 EOF
5325 chmod +x $CONFIG_STATUS
5326 rm -fr confdefs* $ac_clean_files
5327 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5328