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