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