05e10e7ecde7e81152057a1e1692f33bee5874da
[samba.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-afs     Include AFS support
16   --without-afs  Don't include AFS support (default)"
17 ac_help="$ac_help
18   --with-dfs     Include DFS support
19   --without-dfs  Don't include DFS support (default)"
20 ac_help="$ac_help
21   --with-automount     Include AUTOMOUNT support
22   --without-automount  Don't include AUTOMOUNT support (default)"
23 ac_help="$ac_help
24   --with-ldap     Include LDAP support
25   --without-ldap  Don't include LDAP support (default)"
26 ac_help="$ac_help
27   --with-nisplus     Include NISPLUS password database support
28   --without-nisplus  Don't include NISPLUS password database support (default)"
29 ac_help="$ac_help
30   --with-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 #include <netinet/in.h>
3308 int main() {
3309 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
3310 ; return 0; }
3311 EOF
3312 if { (eval echo configure:3313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3313   rm -rf conftest*
3314   echo yes;cat >> confdefs.h <<\EOF
3315 #define HAVE_SOCK_SIN_LEN 1
3316 EOF
3317
3318 else
3319   echo "configure: failed program was:" >&5
3320   cat conftest.$ac_ext >&5
3321   rm -rf conftest*
3322   echo no
3323 fi
3324 rm -f conftest*
3325
3326 echo $ac_n "checking if gettimeofday takes tz argument ... $ac_c"
3327 if test "$cross_compiling" = yes; then
3328     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3329 else
3330   cat > conftest.$ac_ext <<EOF
3331 #line 3332 "configure"
3332 #include "confdefs.h"
3333
3334 #include <sys/time.h>
3335 #include <unistd.h>
3336 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
3337 EOF
3338 if { (eval echo configure:3339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3339 then
3340   echo yes;cat >> confdefs.h <<\EOF
3341 #define HAVE_GETTIMEOFDAY_TZ 1
3342 EOF
3343
3344 else
3345   echo "configure: failed program was:" >&5
3346   cat conftest.$ac_ext >&5
3347   rm -fr conftest*
3348   echo no
3349 fi
3350 rm -fr conftest*
3351 fi
3352
3353
3354
3355 echo $ac_n "checking for broken readdir ... $ac_c"
3356 if test "$cross_compiling" = yes; then
3357     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3358 else
3359   cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3362 #include <sys/types.h>
3363 #include <dirent.h>
3364 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
3365 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
3366 di->d_name[0] == 0) exit(0); exit(1);} 
3367 EOF
3368 if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3369 then
3370   echo yes - you are using the broken /usr/ucb/cc;cat >> confdefs.h <<\EOF
3371 #define HAVE_BROKEN_READDIR 1
3372 EOF
3373
3374 else
3375   echo "configure: failed program was:" >&5
3376   cat conftest.$ac_ext >&5
3377   rm -fr conftest*
3378   echo no
3379 fi
3380 rm -fr conftest*
3381 fi
3382
3383
3384 echo $ac_n "checking for utimbuf ... $ac_c"
3385 cat > conftest.$ac_ext <<EOF
3386 #line 3387 "configure"
3387 #include "confdefs.h"
3388 #include <sys/types.h>
3389 #include <utime.h>
3390 int main() {
3391 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
3392 ; return 0; }
3393 EOF
3394 if { (eval echo configure:3395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3395   rm -rf conftest*
3396   echo yes;cat >> confdefs.h <<\EOF
3397 #define HAVE_UTIMBUF 1
3398 EOF
3399
3400 else
3401   echo "configure: failed program was:" >&5
3402   cat conftest.$ac_ext >&5
3403   rm -rf conftest*
3404   echo no
3405 fi
3406 rm -f conftest*
3407
3408 echo $ac_n "checking for ftruncate extend ... $ac_c"
3409 if test "$cross_compiling" = yes; then
3410     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3411 else
3412   cat > conftest.$ac_ext <<EOF
3413 #line 3414 "configure"
3414 #include "confdefs.h"
3415 #include "tests/ftruncate.c"
3416 EOF
3417 if { (eval echo configure:3418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3418 then
3419   echo yes;cat >> confdefs.h <<\EOF
3420 #define HAVE_FTRUNCATE_EXTEND 1
3421 EOF
3422
3423 else
3424   echo "configure: failed program was:" >&5
3425   cat conftest.$ac_ext >&5
3426   rm -fr conftest*
3427   echo no
3428 fi
3429 rm -fr conftest*
3430 fi
3431
3432
3433 # The following test taken from the cvs sources
3434 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
3435 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
3436 # libsocket.so which has a bad implementation of gethostbyname (it
3437 # only looks in /etc/hosts), so we only look for -lsocket if we need
3438 # it.
3439 echo $ac_n "checking for connect""... $ac_c" 1>&6
3440 echo "configure:3441: checking for connect" >&5
3441 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3442   echo $ac_n "(cached) $ac_c" 1>&6
3443 else
3444   cat > conftest.$ac_ext <<EOF
3445 #line 3446 "configure"
3446 #include "confdefs.h"
3447 /* System header to define __stub macros and hopefully few prototypes,
3448     which can conflict with char connect(); below.  */
3449 #include <assert.h>
3450 /* Override any gcc2 internal prototype to avoid an error.  */
3451 /* We use char because int might match the return type of a gcc2
3452     builtin and then its argument prototype would still apply.  */
3453 char connect();
3454
3455 int main() {
3456
3457 /* The GNU C library defines this for functions which it implements
3458     to always fail with ENOSYS.  Some functions are actually named
3459     something starting with __ and the normal name is an alias.  */
3460 #if defined (__stub_connect) || defined (__stub___connect)
3461 choke me
3462 #else
3463 connect();
3464 #endif
3465
3466 ; return 0; }
3467 EOF
3468 if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3469   rm -rf conftest*
3470   eval "ac_cv_func_connect=yes"
3471 else
3472   echo "configure: failed program was:" >&5
3473   cat conftest.$ac_ext >&5
3474   rm -rf conftest*
3475   eval "ac_cv_func_connect=no"
3476 fi
3477 rm -f conftest*
3478 fi
3479
3480 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3481   echo "$ac_t""yes" 1>&6
3482   :
3483 else
3484   echo "$ac_t""no" 1>&6
3485 case "$LIBS" in
3486 *-lnsl*) ;;
3487 *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
3488 echo "configure:3489: checking for printf in -lnsl_s" >&5
3489 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
3490 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3491   echo $ac_n "(cached) $ac_c" 1>&6
3492 else
3493   ac_save_LIBS="$LIBS"
3494 LIBS="-lnsl_s  $LIBS"
3495 cat > conftest.$ac_ext <<EOF
3496 #line 3497 "configure"
3497 #include "confdefs.h"
3498 /* Override any gcc2 internal prototype to avoid an error.  */
3499 /* We use char because int might match the return type of a gcc2
3500     builtin and then its argument prototype would still apply.  */
3501 char printf();
3502
3503 int main() {
3504 printf()
3505 ; return 0; }
3506 EOF
3507 if { (eval echo configure:3508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3508   rm -rf conftest*
3509   eval "ac_cv_lib_$ac_lib_var=yes"
3510 else
3511   echo "configure: failed program was:" >&5
3512   cat conftest.$ac_ext >&5
3513   rm -rf conftest*
3514   eval "ac_cv_lib_$ac_lib_var=no"
3515 fi
3516 rm -f conftest*
3517 LIBS="$ac_save_LIBS"
3518
3519 fi
3520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3521   echo "$ac_t""yes" 1>&6
3522     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3523     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3524   cat >> confdefs.h <<EOF
3525 #define $ac_tr_lib 1
3526 EOF
3527
3528   LIBS="-lnsl_s $LIBS"
3529
3530 else
3531   echo "$ac_t""no" 1>&6
3532 fi
3533  ;;
3534 esac
3535 case "$LIBS" in
3536 *-lnsl*) ;;
3537 *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
3538 echo "configure:3539: checking for printf in -lnsl" >&5
3539 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
3540 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3541   echo $ac_n "(cached) $ac_c" 1>&6
3542 else
3543   ac_save_LIBS="$LIBS"
3544 LIBS="-lnsl  $LIBS"
3545 cat > conftest.$ac_ext <<EOF
3546 #line 3547 "configure"
3547 #include "confdefs.h"
3548 /* Override any gcc2 internal prototype to avoid an error.  */
3549 /* We use char because int might match the return type of a gcc2
3550     builtin and then its argument prototype would still apply.  */
3551 char printf();
3552
3553 int main() {
3554 printf()
3555 ; return 0; }
3556 EOF
3557 if { (eval echo configure:3558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3558   rm -rf conftest*
3559   eval "ac_cv_lib_$ac_lib_var=yes"
3560 else
3561   echo "configure: failed program was:" >&5
3562   cat conftest.$ac_ext >&5
3563   rm -rf conftest*
3564   eval "ac_cv_lib_$ac_lib_var=no"
3565 fi
3566 rm -f conftest*
3567 LIBS="$ac_save_LIBS"
3568
3569 fi
3570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3571   echo "$ac_t""yes" 1>&6
3572     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3573     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3574   cat >> confdefs.h <<EOF
3575 #define $ac_tr_lib 1
3576 EOF
3577
3578   LIBS="-lnsl $LIBS"
3579
3580 else
3581   echo "$ac_t""no" 1>&6
3582 fi
3583  ;;
3584 esac
3585 case "$LIBS" in
3586 *-lsocket*) ;;
3587 *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3588 echo "configure:3589: checking for connect in -lsocket" >&5
3589 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3590 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3591   echo $ac_n "(cached) $ac_c" 1>&6
3592 else
3593   ac_save_LIBS="$LIBS"
3594 LIBS="-lsocket  $LIBS"
3595 cat > conftest.$ac_ext <<EOF
3596 #line 3597 "configure"
3597 #include "confdefs.h"
3598 /* Override any gcc2 internal prototype to avoid an error.  */
3599 /* We use char because int might match the return type of a gcc2
3600     builtin and then its argument prototype would still apply.  */
3601 char connect();
3602
3603 int main() {
3604 connect()
3605 ; return 0; }
3606 EOF
3607 if { (eval echo configure:3608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3608   rm -rf conftest*
3609   eval "ac_cv_lib_$ac_lib_var=yes"
3610 else
3611   echo "configure: failed program was:" >&5
3612   cat conftest.$ac_ext >&5
3613   rm -rf conftest*
3614   eval "ac_cv_lib_$ac_lib_var=no"
3615 fi
3616 rm -f conftest*
3617 LIBS="$ac_save_LIBS"
3618
3619 fi
3620 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3621   echo "$ac_t""yes" 1>&6
3622     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3623     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3624   cat >> confdefs.h <<EOF
3625 #define $ac_tr_lib 1
3626 EOF
3627
3628   LIBS="-lsocket $LIBS"
3629
3630 else
3631   echo "$ac_t""no" 1>&6
3632 fi
3633  ;;
3634 esac
3635 case "$LIBS" in
3636 *-linet*) ;;
3637 *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
3638 echo "configure:3639: checking for connect in -linet" >&5
3639 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
3640 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3641   echo $ac_n "(cached) $ac_c" 1>&6
3642 else
3643   ac_save_LIBS="$LIBS"
3644 LIBS="-linet  $LIBS"
3645 cat > conftest.$ac_ext <<EOF
3646 #line 3647 "configure"
3647 #include "confdefs.h"
3648 /* Override any gcc2 internal prototype to avoid an error.  */
3649 /* We use char because int might match the return type of a gcc2
3650     builtin and then its argument prototype would still apply.  */
3651 char connect();
3652
3653 int main() {
3654 connect()
3655 ; return 0; }
3656 EOF
3657 if { (eval echo configure:3658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3658   rm -rf conftest*
3659   eval "ac_cv_lib_$ac_lib_var=yes"
3660 else
3661   echo "configure: failed program was:" >&5
3662   cat conftest.$ac_ext >&5
3663   rm -rf conftest*
3664   eval "ac_cv_lib_$ac_lib_var=no"
3665 fi
3666 rm -f conftest*
3667 LIBS="$ac_save_LIBS"
3668
3669 fi
3670 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3671   echo "$ac_t""yes" 1>&6
3672     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3673     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3674   cat >> confdefs.h <<EOF
3675 #define $ac_tr_lib 1
3676 EOF
3677
3678   LIBS="-linet $LIBS"
3679
3680 else
3681   echo "$ac_t""no" 1>&6
3682 fi
3683  ;;
3684 esac
3685 if test "$ac_cv_lib_socket_connect" = "yes" || 
3686    test "$ac_cv_lib_inet_connect" = "yes"; then
3687   ac_cv_func_connect=yes
3688   cat >> confdefs.h <<\EOF
3689 #define HAVE_CONNECT 1
3690 EOF
3691
3692 fi
3693 fi
3694
3695
3696 echo $ac_n "checking for broken getgroups ... $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 #include "tests/getgroups.c"
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_BROKEN_GETGROUPS 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 no
3716 fi
3717 rm -fr conftest*
3718 fi
3719
3720
3721
3722 echo $ac_n "checking for broken inet_ntoa ... $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 #include <stdio.h>
3731 #include <sys/types.h>
3732 #include <netinet/in.h>
3733 #include <arpa/inet.h>
3734 main() { struct in_addr ip; ip.s_addr = 0x12345678;
3735 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
3736     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
3737 exit(1);}
3738 EOF
3739 if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3740 then
3741   echo yes;cat >> confdefs.h <<\EOF
3742 #define REPLACE_INET_NTOA 1
3743 EOF
3744
3745 else
3746   echo "configure: failed program was:" >&5
3747   cat conftest.$ac_ext >&5
3748   rm -fr conftest*
3749   echo no
3750 fi
3751 rm -fr conftest*
3752 fi
3753
3754
3755 echo $ac_n "checking for root ... $ac_c"
3756 if test "$cross_compiling" = yes; then
3757     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3758 else
3759   cat > conftest.$ac_ext <<EOF
3760 #line 3761 "configure"
3761 #include "confdefs.h"
3762 main() { exit(getuid() != 0); }
3763 EOF
3764 if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3765 then
3766   echo yes;cat >> confdefs.h <<\EOF
3767 #define HAVE_ROOT 1
3768 EOF
3769
3770 else
3771   echo "configure: failed program was:" >&5
3772   cat conftest.$ac_ext >&5
3773   rm -fr conftest*
3774   echo WARNING: running as non-root will disable some tests;
3775 fi
3776 rm -fr conftest*
3777 fi
3778
3779
3780 netmask=no;
3781 echo $ac_n "checking for netmask ifconf ... $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_IFCONF 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_IFCONF 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
3809 if test $netmask = no; then
3810 echo $ac_n "checking for netmask ifreq ... $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
3818 #define HAVE_NETMASK_IFREQ 1
3819 #define AUTOCONF 1
3820 #include "netmask.c"
3821 EOF
3822 if { (eval echo configure:3823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3823 then
3824   echo yes;netmask=yes;cat >> confdefs.h <<\EOF
3825 #define HAVE_NETMASK_IFREQ 1
3826 EOF
3827
3828 else
3829   echo "configure: failed program was:" >&5
3830   cat conftest.$ac_ext >&5
3831   rm -fr conftest*
3832   echo no
3833 fi
3834 rm -fr conftest*
3835 fi
3836
3837 fi
3838
3839 if test $netmask = no; then
3840 echo $ac_n "checking for netmask AIX ... $ac_c"
3841 if test "$cross_compiling" = yes; then
3842     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3843 else
3844   cat > conftest.$ac_ext <<EOF
3845 #line 3846 "configure"
3846 #include "confdefs.h"
3847
3848 #define HAVE_NETMASK_AIX 1
3849 #define AUTOCONF 1
3850 #include "netmask.c"
3851 EOF
3852 if { (eval echo configure:3853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3853 then
3854   echo yes;netmask=yes;cat >> confdefs.h <<\EOF
3855 #define HAVE_NETMASK_AIX 1
3856 EOF
3857
3858 else
3859   echo "configure: failed program was:" >&5
3860   cat conftest.$ac_ext >&5
3861   rm -fr conftest*
3862   echo no
3863 fi
3864 rm -fr conftest*
3865 fi
3866
3867 fi
3868
3869 echo $ac_n "checking for trapdoor seteuid ... $ac_c"
3870 if test "$cross_compiling" = yes; then
3871     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3872 else
3873   cat > conftest.$ac_ext <<EOF
3874 #line 3875 "configure"
3875 #include "confdefs.h"
3876 #include "tests/trapdoor.c"
3877 EOF
3878 if { (eval echo configure:3879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3879 then
3880   echo no
3881 else
3882   echo "configure: failed program was:" >&5
3883   cat conftest.$ac_ext >&5
3884   rm -fr conftest*
3885   echo yes;cat >> confdefs.h <<\EOF
3886 #define HAVE_TRAPDOOR_UID 1
3887 EOF
3888
3889 fi
3890 rm -fr conftest*
3891 fi
3892
3893
3894 echo $ac_n "checking for shared mmap ... $ac_c"
3895 if test "$cross_compiling" = yes; then
3896     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3897 else
3898   cat > conftest.$ac_ext <<EOF
3899 #line 3900 "configure"
3900 #include "confdefs.h"
3901 #include "tests/shared_mmap.c"
3902 EOF
3903 if { (eval echo configure:3904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3904 then
3905   echo yes;cat >> confdefs.h <<\EOF
3906 #define HAVE_SHARED_MMAP 1
3907 EOF
3908
3909 else
3910   echo "configure: failed program was:" >&5
3911   cat conftest.$ac_ext >&5
3912   rm -fr conftest*
3913   echo no
3914 fi
3915 rm -fr conftest*
3916 fi
3917
3918
3919 echo $ac_n "checking for fcntl locking ... $ac_c"
3920 if test "$cross_compiling" = yes; then
3921     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3922 else
3923   cat > conftest.$ac_ext <<EOF
3924 #line 3925 "configure"
3925 #include "confdefs.h"
3926 #include "tests/fcntl_lock.c"
3927 EOF
3928 if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3929 then
3930   echo yes;cat >> confdefs.h <<\EOF
3931 #define HAVE_FCNTL_LOCK 1
3932 EOF
3933
3934 else
3935   echo "configure: failed program was:" >&5
3936   cat conftest.$ac_ext >&5
3937   rm -fr conftest*
3938   echo no
3939 fi
3940 rm -fr conftest*
3941 fi
3942
3943
3944 echo $ac_n "checking for sysv ipc ... $ac_c"
3945 if test "$cross_compiling" = yes; then
3946     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3947 else
3948   cat > conftest.$ac_ext <<EOF
3949 #line 3950 "configure"
3950 #include "confdefs.h"
3951 #include "tests/sysv_ipc.c"
3952 EOF
3953 if { (eval echo configure:3954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3954 then
3955   echo yes;cat >> confdefs.h <<\EOF
3956 #define HAVE_SYSV_IPC 1
3957 EOF
3958
3959 else
3960   echo "configure: failed program was:" >&5
3961   cat conftest.$ac_ext >&5
3962   rm -fr conftest*
3963   echo no
3964 fi
3965 rm -fr conftest*
3966 fi
3967
3968
3969 #################################################
3970 # check for the AFS filesystem
3971 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
3972 echo "configure:3973: checking whether to use AFS" >&5
3973 # Check whether --with-afs or --without-afs was given.
3974 if test "${with_afs+set}" = set; then
3975   withval="$with_afs"
3976    case "$withval" in
3977   yes)
3978     echo "$ac_t""yes" 1>&6
3979     cat >> confdefs.h <<\EOF
3980 #define WITH_AFS 1
3981 EOF
3982
3983     ;;
3984   *)
3985     echo "$ac_t""no" 1>&6
3986     ;;
3987   esac 
3988 else
3989   echo "$ac_t""no" 1>&6
3990
3991 fi
3992
3993
3994
3995 #################################################
3996 # check for the DFS auth system
3997 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
3998 echo "configure:3999: checking whether to use DFS auth" >&5
3999 # Check whether --with-dfs or --without-dfs was given.
4000 if test "${with_dfs+set}" = set; then
4001   withval="$with_dfs"
4002    case "$withval" in
4003   yes)
4004     echo "$ac_t""yes" 1>&6
4005     cat >> confdefs.h <<\EOF
4006 #define WITH_DFS 1
4007 EOF
4008
4009     ;;
4010   *)
4011     echo "$ac_t""no" 1>&6
4012     ;;
4013   esac 
4014 else
4015   echo "$ac_t""no" 1>&6
4016
4017 fi
4018
4019
4020 #################################################
4021 # check for automount support
4022 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
4023 echo "configure:4024: checking whether to use AUTOMOUNT" >&5
4024 # Check whether --with-automount or --without-automount was given.
4025 if test "${with_automount+set}" = set; then
4026   withval="$with_automount"
4027    case "$withval" in
4028   yes)
4029     echo "$ac_t""yes" 1>&6
4030     cat >> confdefs.h <<\EOF
4031 #define WITH_AUTOMOUNT 1
4032 EOF
4033
4034     ;;
4035   *)
4036     echo "$ac_t""no" 1>&6
4037     ;;
4038   esac 
4039 else
4040   echo "$ac_t""no" 1>&6
4041
4042 fi
4043
4044
4045 #################################################
4046 # check for a LDAP password database
4047 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
4048 echo "configure:4049: checking whether to use LDAP password database" >&5
4049 # Check whether --with-ldap or --without-ldap was given.
4050 if test "${with_ldap+set}" = set; then
4051   withval="$with_ldap"
4052    case "$withval" in
4053   yes)
4054     echo "$ac_t""yes" 1>&6
4055     cat >> confdefs.h <<\EOF
4056 #define WITH_LDAP 1
4057 EOF
4058
4059     ;;
4060   *)
4061     echo "$ac_t""no" 1>&6
4062     ;;
4063   esac 
4064 else
4065   echo "$ac_t""no" 1>&6
4066
4067 fi
4068
4069
4070 #################################################
4071 # check for a NISPLUS password database
4072 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
4073 echo "configure:4074: checking whether to use NISPLUS password database" >&5
4074 # Check whether --with-nisplus or --without-nisplus was given.
4075 if test "${with_nisplus+set}" = set; then
4076   withval="$with_nisplus"
4077    case "$withval" in
4078   yes)
4079     echo "$ac_t""yes" 1>&6
4080     cat >> confdefs.h <<\EOF
4081 #define WITH_NISPLUS 1
4082 EOF
4083
4084     ;;
4085   *)
4086     echo "$ac_t""no" 1>&6
4087     ;;
4088   esac 
4089 else
4090   echo "$ac_t""no" 1>&6
4091
4092 fi
4093
4094
4095 #################################################
4096 # check for the secure socket layer
4097 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
4098 echo "configure:4099: checking whether to use SSL" >&5
4099 # Check whether --with-ssl or --without-ssl was given.
4100 if test "${with_ssl+set}" = set; then
4101   withval="$with_ssl"
4102    case "$withval" in
4103   yes)
4104     echo "$ac_t""yes" 1>&6
4105     cat >> confdefs.h <<\EOF
4106 #define WITH_SSL 1
4107 EOF
4108
4109     ;;
4110   *)
4111     echo "$ac_t""no" 1>&6
4112     ;;
4113   esac 
4114 else
4115   echo "$ac_t""no" 1>&6
4116
4117 fi
4118
4119
4120 #################################################
4121 # check for experimental mmap support
4122 echo $ac_n "checking whether to use MMAP""... $ac_c" 1>&6
4123 echo "configure:4124: checking whether to use MMAP" >&5
4124 # Check whether --with-mmap or --without-mmap was given.
4125 if test "${with_mmap+set}" = set; then
4126   withval="$with_mmap"
4127    case "$withval" in
4128   yes)
4129     echo "$ac_t""yes" 1>&6
4130     cat >> confdefs.h <<\EOF
4131 #define WITH_MMAP 1
4132 EOF
4133
4134     ;;
4135   *)
4136     echo "$ac_t""no" 1>&6
4137     ;;
4138   esac 
4139 else
4140   echo "$ac_t""no" 1>&6
4141
4142 fi
4143
4144
4145 #################################################
4146 # check for syslog logging
4147 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
4148 echo "configure:4149: checking whether to use syslog logging" >&5
4149 # Check whether --with-syslog or --without-syslog was given.
4150 if test "${with_syslog+set}" = set; then
4151   withval="$with_syslog"
4152    case "$withval" in
4153   yes)
4154     echo "$ac_t""yes" 1>&6
4155     cat >> confdefs.h <<\EOF
4156 #define WITH_SYSLOG 1
4157 EOF
4158
4159     ;;
4160   *)
4161     echo "$ac_t""no" 1>&6
4162     ;;
4163   esac 
4164 else
4165   echo "$ac_t""no" 1>&6
4166
4167 fi
4168
4169
4170
4171 #################################################
4172 # these tests are taken from the GNU fileutils package
4173 echo "checking how to get filesystem space usage" 1>&6
4174 echo "configure:4175: checking how to get filesystem space usage" >&5
4175 space=no
4176
4177 # Perform only the link test since it seems there are no variants of the
4178 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
4179 # because that got a false positive on SCO OSR5.  Adding the declaration
4180 # of a `struct statvfs' causes this test to fail (as it should) on such
4181 # systems.  That system is reported to work fine with STAT_STATFS4 which
4182 # is what it gets when this test fails.
4183 if test $space = no; then
4184   # SVR4
4185   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
4186 echo "configure:4187: checking statvfs function (SVR4)" >&5
4187 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
4188   echo $ac_n "(cached) $ac_c" 1>&6
4189 else
4190   cat > conftest.$ac_ext <<EOF
4191 #line 4192 "configure"
4192 #include "confdefs.h"
4193 #include <sys/types.h>
4194 #include <sys/statvfs.h>
4195 int main() {
4196 struct statvfs fsd; statvfs (0, &fsd);
4197 ; return 0; }
4198 EOF
4199 if { (eval echo configure:4200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4200   rm -rf conftest*
4201   fu_cv_sys_stat_statvfs=yes
4202 else
4203   echo "configure: failed program was:" >&5
4204   cat conftest.$ac_ext >&5
4205   rm -rf conftest*
4206   fu_cv_sys_stat_statvfs=no
4207 fi
4208 rm -f conftest*
4209 fi
4210
4211 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
4212   if test $fu_cv_sys_stat_statvfs = yes; then
4213     space=yes
4214     cat >> confdefs.h <<\EOF
4215 #define STAT_STATVFS 1
4216 EOF
4217
4218   fi
4219 fi
4220
4221 if test $space = no; then
4222   # DEC Alpha running OSF/1
4223   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
4224 echo "configure:4225: checking for 3-argument statfs function (DEC OSF/1)" >&5
4225   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
4226   echo $ac_n "(cached) $ac_c" 1>&6
4227 else
4228   if test "$cross_compiling" = yes; then
4229   fu_cv_sys_stat_statfs3_osf1=no
4230 else
4231   cat > conftest.$ac_ext <<EOF
4232 #line 4233 "configure"
4233 #include "confdefs.h"
4234
4235 #include <sys/param.h>
4236 #include <sys/types.h>
4237 #include <sys/mount.h>
4238   main ()
4239   {
4240     struct statfs fsd;
4241     fsd.f_fsize = 0;
4242     exit (statfs (".", &fsd, sizeof (struct statfs)));
4243   }
4244 EOF
4245 if { (eval echo configure:4246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4246 then
4247   fu_cv_sys_stat_statfs3_osf1=yes
4248 else
4249   echo "configure: failed program was:" >&5
4250   cat conftest.$ac_ext >&5
4251   rm -fr conftest*
4252   fu_cv_sys_stat_statfs3_osf1=no
4253 fi
4254 rm -fr conftest*
4255 fi
4256
4257 fi
4258
4259   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
4260   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
4261     space=yes
4262     cat >> confdefs.h <<\EOF
4263 #define STAT_STATFS3_OSF1 1
4264 EOF
4265
4266   fi
4267 fi
4268
4269 if test $space = no; then
4270 # AIX
4271   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
4272 echo "configure:4273: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
4273   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
4274   echo $ac_n "(cached) $ac_c" 1>&6
4275 else
4276   if test "$cross_compiling" = yes; then
4277   fu_cv_sys_stat_statfs2_bsize=no
4278 else
4279   cat > conftest.$ac_ext <<EOF
4280 #line 4281 "configure"
4281 #include "confdefs.h"
4282
4283 #ifdef HAVE_SYS_PARAM_H
4284 #include <sys/param.h>
4285 #endif
4286 #ifdef HAVE_SYS_MOUNT_H
4287 #include <sys/mount.h>
4288 #endif
4289 #ifdef HAVE_SYS_VFS_H
4290 #include <sys/vfs.h>
4291 #endif
4292   main ()
4293   {
4294   struct statfs fsd;
4295   fsd.f_bsize = 0;
4296   exit (statfs (".", &fsd));
4297   }
4298 EOF
4299 if { (eval echo configure:4300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4300 then
4301   fu_cv_sys_stat_statfs2_bsize=yes
4302 else
4303   echo "configure: failed program was:" >&5
4304   cat conftest.$ac_ext >&5
4305   rm -fr conftest*
4306   fu_cv_sys_stat_statfs2_bsize=no
4307 fi
4308 rm -fr conftest*
4309 fi
4310
4311 fi
4312
4313   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
4314   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
4315     space=yes
4316     cat >> confdefs.h <<\EOF
4317 #define STAT_STATFS2_BSIZE 1
4318 EOF
4319
4320   fi
4321 fi
4322
4323 if test $space = no; then
4324 # SVR3
4325   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
4326 echo "configure:4327: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
4327   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
4328   echo $ac_n "(cached) $ac_c" 1>&6
4329 else
4330   if test "$cross_compiling" = yes; then
4331   fu_cv_sys_stat_statfs4=no
4332 else
4333   cat > conftest.$ac_ext <<EOF
4334 #line 4335 "configure"
4335 #include "confdefs.h"
4336 #include <sys/types.h>
4337 #include <sys/statfs.h>
4338   main ()
4339   {
4340   struct statfs fsd;
4341   exit (statfs (".", &fsd, sizeof fsd, 0));
4342   }
4343 EOF
4344 if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4345 then
4346   fu_cv_sys_stat_statfs4=yes
4347 else
4348   echo "configure: failed program was:" >&5
4349   cat conftest.$ac_ext >&5
4350   rm -fr conftest*
4351   fu_cv_sys_stat_statfs4=no
4352 fi
4353 rm -fr conftest*
4354 fi
4355
4356 fi
4357
4358   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
4359   if test $fu_cv_sys_stat_statfs4 = yes; then
4360     space=yes
4361     cat >> confdefs.h <<\EOF
4362 #define STAT_STATFS4 1
4363 EOF
4364
4365   fi
4366 fi
4367
4368 if test $space = no; then
4369 # 4.4BSD and NetBSD
4370   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
4371 echo "configure:4372: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
4372   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
4373   echo $ac_n "(cached) $ac_c" 1>&6
4374 else
4375   if test "$cross_compiling" = yes; then
4376   fu_cv_sys_stat_statfs2_fsize=no
4377 else
4378   cat > conftest.$ac_ext <<EOF
4379 #line 4380 "configure"
4380 #include "confdefs.h"
4381 #include <sys/types.h>
4382 #ifdef HAVE_SYS_PARAM_H
4383 #include <sys/param.h>
4384 #endif
4385 #ifdef HAVE_SYS_MOUNT_H
4386 #include <sys/mount.h>
4387 #endif
4388   main ()
4389   {
4390   struct statfs fsd;
4391   fsd.f_fsize = 0;
4392   exit (statfs (".", &fsd));
4393   }
4394 EOF
4395 if { (eval echo configure:4396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4396 then
4397   fu_cv_sys_stat_statfs2_fsize=yes
4398 else
4399   echo "configure: failed program was:" >&5
4400   cat conftest.$ac_ext >&5
4401   rm -fr conftest*
4402   fu_cv_sys_stat_statfs2_fsize=no
4403 fi
4404 rm -fr conftest*
4405 fi
4406
4407 fi
4408
4409   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
4410   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
4411     space=yes
4412     cat >> confdefs.h <<\EOF
4413 #define STAT_STATFS2_FSIZE 1
4414 EOF
4415
4416   fi
4417 fi
4418
4419 if test $space = no; then
4420   # Ultrix
4421   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
4422 echo "configure:4423: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
4423   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
4424   echo $ac_n "(cached) $ac_c" 1>&6
4425 else
4426   if test "$cross_compiling" = yes; then
4427   fu_cv_sys_stat_fs_data=no
4428 else
4429   cat > conftest.$ac_ext <<EOF
4430 #line 4431 "configure"
4431 #include "confdefs.h"
4432 #include <sys/types.h>
4433 #ifdef HAVE_SYS_PARAM_H
4434 #include <sys/param.h>
4435 #endif
4436 #ifdef HAVE_SYS_MOUNT_H
4437 #include <sys/mount.h>
4438 #endif
4439 #ifdef HAVE_SYS_FS_TYPES_H
4440 #include <sys/fs_types.h>
4441 #endif
4442   main ()
4443   {
4444   struct fs_data fsd;
4445   /* Ultrix's statfs returns 1 for success,
4446      0 for not mounted, -1 for failure.  */
4447   exit (statfs (".", &fsd) != 1);
4448   }
4449 EOF
4450 if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4451 then
4452   fu_cv_sys_stat_fs_data=yes
4453 else
4454   echo "configure: failed program was:" >&5
4455   cat conftest.$ac_ext >&5
4456   rm -fr conftest*
4457   fu_cv_sys_stat_fs_data=no
4458 fi
4459 rm -fr conftest*
4460 fi
4461
4462 fi
4463
4464   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
4465   if test $fu_cv_sys_stat_fs_data = yes; then
4466     space=yes
4467     cat >> confdefs.h <<\EOF
4468 #define STAT_STATFS2_FS_DATA 1
4469 EOF
4470
4471   fi
4472 fi
4473
4474
4475 trap '' 1 2 15
4476 cat > confcache <<\EOF
4477 # This file is a shell script that caches the results of configure
4478 # tests run on this system so they can be shared between configure
4479 # scripts and configure runs.  It is not useful on other systems.
4480 # If it contains results you don't want to keep, you may remove or edit it.
4481 #
4482 # By default, configure uses ./config.cache as the cache file,
4483 # creating it if it does not exist already.  You can give configure
4484 # the --cache-file=FILE option to use a different cache file; that is
4485 # what configure does when it calls configure scripts in
4486 # subdirectories, so they share the cache.
4487 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4488 # config.status only pays attention to the cache file if you give it the
4489 # --recheck option to rerun configure.
4490 #
4491 EOF
4492 # The following way of writing the cache mishandles newlines in values,
4493 # but we know of no workaround that is simple, portable, and efficient.
4494 # So, don't put newlines in cache variables' values.
4495 # Ultrix sh set writes to stderr and can't be redirected directly,
4496 # and sets the high bit in the cache file unless we assign to the vars.
4497 (set) 2>&1 |
4498   case `(ac_space=' '; set) 2>&1` in
4499   *ac_space=\ *)
4500     # `set' does not quote correctly, so add quotes (double-quote substitution
4501     # turns \\\\ into \\, and sed turns \\ into \).
4502     sed -n \
4503       -e "s/'/'\\\\''/g" \
4504       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4505     ;;
4506   *)
4507     # `set' quotes correctly as required by POSIX, so do not add quotes.
4508     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4509     ;;
4510   esac >> confcache
4511 if cmp -s $cache_file confcache; then
4512   :
4513 else
4514   if test -w $cache_file; then
4515     echo "updating cache $cache_file"
4516     cat confcache > $cache_file
4517   else
4518     echo "not updating unwritable cache $cache_file"
4519   fi
4520 fi
4521 rm -f confcache
4522
4523 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4524
4525 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4526 # Let make expand exec_prefix.
4527 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4528
4529 # Any assignment to VPATH causes Sun make to only execute
4530 # the first set of double-colon rules, so remove it if not needed.
4531 # If there is a colon in the path, we need to keep it.
4532 if test "x$srcdir" = x.; then
4533   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4534 fi
4535
4536 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4537
4538 DEFS=-DHAVE_CONFIG_H
4539
4540 # Without the "./", some shells look in PATH for config.status.
4541 : ${CONFIG_STATUS=./config.status}
4542
4543 echo creating $CONFIG_STATUS
4544 rm -f $CONFIG_STATUS
4545 cat > $CONFIG_STATUS <<EOF
4546 #! /bin/sh
4547 # Generated automatically by configure.
4548 # Run this file to recreate the current configuration.
4549 # This directory was configured as follows,
4550 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4551 #
4552 # $0 $ac_configure_args
4553 #
4554 # Compiler output produced by configure, useful for debugging
4555 # configure, is in ./config.log if it exists.
4556
4557 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4558 for ac_option
4559 do
4560   case "\$ac_option" in
4561   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4562     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4563     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4564   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4565     echo "$CONFIG_STATUS generated by autoconf version 2.12"
4566     exit 0 ;;
4567   -help | --help | --hel | --he | --h)
4568     echo "\$ac_cs_usage"; exit 0 ;;
4569   *) echo "\$ac_cs_usage"; exit 1 ;;
4570   esac
4571 done
4572
4573 ac_given_srcdir=$srcdir
4574 ac_given_INSTALL="$INSTALL"
4575
4576 trap 'rm -fr `echo "Makefile tests/dummy client/dummy lib/dummy lib/rpc/dummy
4577 lib/rpc/client/dummy lib/rpc/include/dummy lib/rpc/parse/dummy
4578 lib/rpc/server/dummy lib/smb/dummy ubiqx/dummy web/dummy config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4579 EOF
4580 cat >> $CONFIG_STATUS <<EOF
4581
4582 # Protect against being on the right side of a sed subst in config.status.
4583 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4584  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4585 $ac_vpsub
4586 $extrasub
4587 s%@CFLAGS@%$CFLAGS%g
4588 s%@CPPFLAGS@%$CPPFLAGS%g
4589 s%@CXXFLAGS@%$CXXFLAGS%g
4590 s%@DEFS@%$DEFS%g
4591 s%@LDFLAGS@%$LDFLAGS%g
4592 s%@LIBS@%$LIBS%g
4593 s%@exec_prefix@%$exec_prefix%g
4594 s%@prefix@%$prefix%g
4595 s%@program_transform_name@%$program_transform_name%g
4596 s%@bindir@%$bindir%g
4597 s%@sbindir@%$sbindir%g
4598 s%@libexecdir@%$libexecdir%g
4599 s%@datadir@%$datadir%g
4600 s%@sysconfdir@%$sysconfdir%g
4601 s%@sharedstatedir@%$sharedstatedir%g
4602 s%@localstatedir@%$localstatedir%g
4603 s%@libdir@%$libdir%g
4604 s%@includedir@%$includedir%g
4605 s%@oldincludedir@%$oldincludedir%g
4606 s%@infodir@%$infodir%g
4607 s%@mandir@%$mandir%g
4608 s%@CC@%$CC%g
4609 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4610 s%@INSTALL_DATA@%$INSTALL_DATA%g
4611 s%@SHELL@%$SHELL%g
4612 s%@AWK@%$AWK%g
4613 s%@host@%$host%g
4614 s%@host_alias@%$host_alias%g
4615 s%@host_cpu@%$host_cpu%g
4616 s%@host_vendor@%$host_vendor%g
4617 s%@host_os@%$host_os%g
4618 s%@target@%$target%g
4619 s%@target_alias@%$target_alias%g
4620 s%@target_cpu@%$target_cpu%g
4621 s%@target_vendor@%$target_vendor%g
4622 s%@target_os@%$target_os%g
4623 s%@build@%$build%g
4624 s%@build_alias@%$build_alias%g
4625 s%@build_cpu@%$build_cpu%g
4626 s%@build_vendor@%$build_vendor%g
4627 s%@build_os@%$build_os%g
4628 s%@CPP@%$CPP%g
4629 s%@LIBOBJS@%$LIBOBJS%g
4630
4631 CEOF
4632 EOF
4633
4634 cat >> $CONFIG_STATUS <<\EOF
4635
4636 # Split the substitutions into bite-sized pieces for seds with
4637 # small command number limits, like on Digital OSF/1 and HP-UX.
4638 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4639 ac_file=1 # Number of current file.
4640 ac_beg=1 # First line for current file.
4641 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4642 ac_more_lines=:
4643 ac_sed_cmds=""
4644 while $ac_more_lines; do
4645   if test $ac_beg -gt 1; then
4646     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4647   else
4648     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4649   fi
4650   if test ! -s conftest.s$ac_file; then
4651     ac_more_lines=false
4652     rm -f conftest.s$ac_file
4653   else
4654     if test -z "$ac_sed_cmds"; then
4655       ac_sed_cmds="sed -f conftest.s$ac_file"
4656     else
4657       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4658     fi
4659     ac_file=`expr $ac_file + 1`
4660     ac_beg=$ac_end
4661     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4662   fi
4663 done
4664 if test -z "$ac_sed_cmds"; then
4665   ac_sed_cmds=cat
4666 fi
4667 EOF
4668
4669 cat >> $CONFIG_STATUS <<EOF
4670
4671 CONFIG_FILES=\${CONFIG_FILES-"Makefile tests/dummy client/dummy lib/dummy lib/rpc/dummy
4672 lib/rpc/client/dummy lib/rpc/include/dummy lib/rpc/parse/dummy
4673 lib/rpc/server/dummy lib/smb/dummy ubiqx/dummy web/dummy"}
4674 EOF
4675 cat >> $CONFIG_STATUS <<\EOF
4676 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4677   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4678   case "$ac_file" in
4679   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4680        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4681   *) ac_file_in="${ac_file}.in" ;;
4682   esac
4683
4684   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4685
4686   # Remove last slash and all that follows it.  Not all systems have dirname.
4687   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4688   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4689     # The file is in a subdirectory.
4690     test ! -d "$ac_dir" && mkdir "$ac_dir"
4691     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4692     # A "../" for each directory in $ac_dir_suffix.
4693     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4694   else
4695     ac_dir_suffix= ac_dots=
4696   fi
4697
4698   case "$ac_given_srcdir" in
4699   .)  srcdir=.
4700       if test -z "$ac_dots"; then top_srcdir=.
4701       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4702   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4703   *) # Relative path.
4704     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4705     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4706   esac
4707
4708   case "$ac_given_INSTALL" in
4709   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4710   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4711   esac
4712
4713   echo creating "$ac_file"
4714   rm -f "$ac_file"
4715   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4716   case "$ac_file" in
4717   *Makefile*) ac_comsub="1i\\
4718 # $configure_input" ;;
4719   *) ac_comsub= ;;
4720   esac
4721
4722   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4723   sed -e "$ac_comsub
4724 s%@configure_input@%$configure_input%g
4725 s%@srcdir@%$srcdir%g
4726 s%@top_srcdir@%$top_srcdir%g
4727 s%@INSTALL@%$INSTALL%g
4728 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4729 fi; done
4730 rm -f conftest.s*
4731
4732 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4733 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4734 #
4735 # ac_d sets the value in "#define NAME VALUE" lines.
4736 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4737 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4738 ac_dC='\3'
4739 ac_dD='%g'
4740 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4741 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4742 ac_uB='\([      ]\)%\1#\2define\3'
4743 ac_uC=' '
4744 ac_uD='\4%g'
4745 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4746 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4747 ac_eB='$%\1#\2define\3'
4748 ac_eC=' '
4749 ac_eD='%g'
4750
4751 if test "${CONFIG_HEADERS+set}" != set; then
4752 EOF
4753 cat >> $CONFIG_STATUS <<EOF
4754   CONFIG_HEADERS="config.h"
4755 EOF
4756 cat >> $CONFIG_STATUS <<\EOF
4757 fi
4758 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4759   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4760   case "$ac_file" in
4761   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4762        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4763   *) ac_file_in="${ac_file}.in" ;;
4764   esac
4765
4766   echo creating $ac_file
4767
4768   rm -f conftest.frag conftest.in conftest.out
4769   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4770   cat $ac_file_inputs > conftest.in
4771
4772 EOF
4773
4774 # Transform confdefs.h into a sed script conftest.vals that substitutes
4775 # the proper values into config.h.in to produce config.h.  And first:
4776 # Protect against being on the right side of a sed subst in config.status.
4777 # Protect against being in an unquoted here document in config.status.
4778 rm -f conftest.vals
4779 cat > conftest.hdr <<\EOF
4780 s/[\\&%]/\\&/g
4781 s%[\\$`]%\\&%g
4782 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4783 s%ac_d%ac_u%gp
4784 s%ac_u%ac_e%gp
4785 EOF
4786 sed -n -f conftest.hdr confdefs.h > conftest.vals
4787 rm -f conftest.hdr
4788
4789 # This sed command replaces #undef with comments.  This is necessary, for
4790 # example, in the case of _POSIX_SOURCE, which is predefined and required
4791 # on some systems where configure will not decide to define it.
4792 cat >> conftest.vals <<\EOF
4793 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4794 EOF
4795
4796 # Break up conftest.vals because some shells have a limit on
4797 # the size of here documents, and old seds have small limits too.
4798
4799 rm -f conftest.tail
4800 while :
4801 do
4802   ac_lines=`grep -c . conftest.vals`
4803   # grep -c gives empty output for an empty file on some AIX systems.
4804   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4805   # Write a limited-size here document to conftest.frag.
4806   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4807   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4808   echo 'CEOF
4809   sed -f conftest.frag conftest.in > conftest.out
4810   rm -f conftest.in
4811   mv conftest.out conftest.in
4812 ' >> $CONFIG_STATUS
4813   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4814   rm -f conftest.vals
4815   mv conftest.tail conftest.vals
4816 done
4817 rm -f conftest.vals
4818
4819 cat >> $CONFIG_STATUS <<\EOF
4820   rm -f conftest.frag conftest.h
4821   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4822   cat conftest.in >> conftest.h
4823   rm -f conftest.in
4824   if cmp -s $ac_file conftest.h 2>/dev/null; then
4825     echo "$ac_file is unchanged"
4826     rm -f conftest.h
4827   else
4828     # Remove last slash and all that follows it.  Not all systems have dirname.
4829       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4830       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4831       # The file is in a subdirectory.
4832       test ! -d "$ac_dir" && mkdir "$ac_dir"
4833     fi
4834     rm -f $ac_file
4835     mv conftest.h $ac_file
4836   fi
4837 fi; done
4838
4839 EOF
4840 cat >> $CONFIG_STATUS <<EOF
4841
4842 EOF
4843 cat >> $CONFIG_STATUS <<\EOF
4844
4845 exit 0
4846 EOF
4847 chmod +x $CONFIG_STATUS
4848 rm -fr confdefs* $ac_clean_files
4849 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4850