]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/cvs/configure
This commit was generated by cvs2svn to compensate for changes in r53910,
[FreeBSD/FreeBSD.git] / contrib / cvs / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.10 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-krb4=value       set default \$(KRB4) from value"
16 ac_help="$ac_help
17   --with-gssapi=value     GSSAPI directory"
18 ac_help="$ac_help
19   --enable-encryption     enable encryption support"
20 ac_help="$ac_help
21   --enable-client         include code for running as a remote client (default)
22   --disable-client        don't include remote client code"
23 ac_help="$ac_help
24   --enable-server         include code for running as a server (default)
25   --disable-server        don't include server code"
26
27 # Initialize some variables set by options.
28 # The variables have the same names as the options, with
29 # dashes changed to underlines.
30 build=NONE
31 cache_file=./config.cache
32 exec_prefix=NONE
33 host=NONE
34 no_create=
35 nonopt=NONE
36 no_recursion=
37 prefix=NONE
38 program_prefix=NONE
39 program_suffix=NONE
40 program_transform_name=s,x,x,
41 silent=
42 site=
43 srcdir=
44 target=NONE
45 verbose=
46 x_includes=NONE
47 x_libraries=NONE
48 bindir='${exec_prefix}/bin'
49 sbindir='${exec_prefix}/sbin'
50 libexecdir='${exec_prefix}/libexec'
51 datadir='${prefix}/share'
52 sysconfdir='${prefix}/etc'
53 sharedstatedir='${prefix}/com'
54 localstatedir='${prefix}/var'
55 libdir='${exec_prefix}/lib'
56 includedir='${prefix}/include'
57 oldincludedir='/usr/include'
58 infodir='${prefix}/info'
59 mandir='${prefix}/man'
60
61 # Initialize some other variables.
62 subdirs=
63 MFLAGS= MAKEFLAGS=
64
65 ac_prev=
66 for ac_option
67 do
68
69   # If the previous option needs an argument, assign it.
70   if test -n "$ac_prev"; then
71     eval "$ac_prev=\$ac_option"
72     ac_prev=
73     continue
74   fi
75
76   case "$ac_option" in
77   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
78   *) ac_optarg= ;;
79   esac
80
81   # Accept the important Cygnus configure options, so we can diagnose typos.
82
83   case "$ac_option" in
84
85   -bindir | --bindir | --bindi | --bind | --bin | --bi)
86     ac_prev=bindir ;;
87   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
88     bindir="$ac_optarg" ;;
89
90   -build | --build | --buil | --bui | --bu)
91     ac_prev=build ;;
92   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
93     build="$ac_optarg" ;;
94
95   -cache-file | --cache-file | --cache-fil | --cache-fi \
96   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
97     ac_prev=cache_file ;;
98   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
99   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
100     cache_file="$ac_optarg" ;;
101
102   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
103     ac_prev=datadir ;;
104   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
105   | --da=*)
106     datadir="$ac_optarg" ;;
107
108   -disable-* | --disable-*)
109     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
110     # Reject names that are not valid shell variable names.
111     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
112       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
113     fi
114     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
115     eval "enable_${ac_feature}=no" ;;
116
117   -enable-* | --enable-*)
118     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
119     # Reject names that are not valid shell variable names.
120     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
121       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
122     fi
123     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
124     case "$ac_option" in
125       *=*) ;;
126       *) ac_optarg=yes ;;
127     esac
128     eval "enable_${ac_feature}='$ac_optarg'" ;;
129
130   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
131   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
132   | --exec | --exe | --ex)
133     ac_prev=exec_prefix ;;
134   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
135   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
136   | --exec=* | --exe=* | --ex=*)
137     exec_prefix="$ac_optarg" ;;
138
139   -gas | --gas | --ga | --g)
140     # Obsolete; use --with-gas.
141     with_gas=yes ;;
142
143   -help | --help | --hel | --he)
144     # Omit some internal or obsolete options to make the list less imposing.
145     # This message is too long to be a string in the A/UX 3.1 sh.
146     cat << EOF
147 Usage: configure [options] [host]
148 Options: [defaults in brackets after descriptions]
149 Configuration:
150   --cache-file=FILE       cache test results in FILE
151   --help                  print this message
152   --no-create             do not create output files
153   --quiet, --silent       do not print \`checking...' messages
154   --version               print the version of autoconf that created configure
155 Directory and file names:
156   --prefix=PREFIX         install architecture-independent files in PREFIX
157                           [$ac_default_prefix]
158   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
159                           [same as prefix]
160   --bindir=DIR            user executables in DIR [EPREFIX/bin]
161   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
162   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
163   --datadir=DIR           read-only architecture-independent data in DIR
164                           [PREFIX/share]
165   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
166   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
167                           [PREFIX/com]
168   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
169   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
170   --includedir=DIR        C header files in DIR [PREFIX/include]
171   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
172   --infodir=DIR           info documentation in DIR [PREFIX/info]
173   --mandir=DIR            man documentation in DIR [PREFIX/man]
174   --srcdir=DIR            find the sources in DIR [configure dir or ..]
175   --program-prefix=PREFIX prepend PREFIX to installed program names
176   --program-suffix=SUFFIX append SUFFIX to installed program names
177   --program-transform-name=PROGRAM
178                           run sed PROGRAM on installed program names
179 EOF
180     cat << EOF
181 Host type:
182   --build=BUILD           configure for building on BUILD [BUILD=HOST]
183   --host=HOST             configure for HOST [guessed]
184   --target=TARGET         configure for TARGET [TARGET=HOST]
185 Features and packages:
186   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
187   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
188   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
189   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
190   --x-includes=DIR        X include files are in DIR
191   --x-libraries=DIR       X library files are in DIR
192 EOF
193     if test -n "$ac_help"; then
194       echo "--enable and --with options recognized:$ac_help"
195     fi
196     exit 0 ;;
197
198   -host | --host | --hos | --ho)
199     ac_prev=host ;;
200   -host=* | --host=* | --hos=* | --ho=*)
201     host="$ac_optarg" ;;
202
203   -includedir | --includedir | --includedi | --included | --include \
204   | --includ | --inclu | --incl | --inc)
205     ac_prev=includedir ;;
206   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
207   | --includ=* | --inclu=* | --incl=* | --inc=*)
208     includedir="$ac_optarg" ;;
209
210   -infodir | --infodir | --infodi | --infod | --info | --inf)
211     ac_prev=infodir ;;
212   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
213     infodir="$ac_optarg" ;;
214
215   -libdir | --libdir | --libdi | --libd)
216     ac_prev=libdir ;;
217   -libdir=* | --libdir=* | --libdi=* | --libd=*)
218     libdir="$ac_optarg" ;;
219
220   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
221   | --libexe | --libex | --libe)
222     ac_prev=libexecdir ;;
223   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
224   | --libexe=* | --libex=* | --libe=*)
225     libexecdir="$ac_optarg" ;;
226
227   -localstatedir | --localstatedir | --localstatedi | --localstated \
228   | --localstate | --localstat | --localsta | --localst \
229   | --locals | --local | --loca | --loc | --lo)
230     ac_prev=localstatedir ;;
231   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
232   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
233   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
234     localstatedir="$ac_optarg" ;;
235
236   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
237     ac_prev=mandir ;;
238   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
239     mandir="$ac_optarg" ;;
240
241   -nfp | --nfp | --nf)
242     # Obsolete; use --without-fp.
243     with_fp=no ;;
244
245   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
246   | --no-cr | --no-c)
247     no_create=yes ;;
248
249   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
250   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
251     no_recursion=yes ;;
252
253   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
254   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
255   | --oldin | --oldi | --old | --ol | --o)
256     ac_prev=oldincludedir ;;
257   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
258   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
259   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
260     oldincludedir="$ac_optarg" ;;
261
262   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
263     ac_prev=prefix ;;
264   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
265     prefix="$ac_optarg" ;;
266
267   -program-prefix | --program-prefix | --program-prefi | --program-pref \
268   | --program-pre | --program-pr | --program-p)
269     ac_prev=program_prefix ;;
270   -program-prefix=* | --program-prefix=* | --program-prefi=* \
271   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
272     program_prefix="$ac_optarg" ;;
273
274   -program-suffix | --program-suffix | --program-suffi | --program-suff \
275   | --program-suf | --program-su | --program-s)
276     ac_prev=program_suffix ;;
277   -program-suffix=* | --program-suffix=* | --program-suffi=* \
278   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
279     program_suffix="$ac_optarg" ;;
280
281   -program-transform-name | --program-transform-name \
282   | --program-transform-nam | --program-transform-na \
283   | --program-transform-n | --program-transform- \
284   | --program-transform | --program-transfor \
285   | --program-transfo | --program-transf \
286   | --program-trans | --program-tran \
287   | --progr-tra | --program-tr | --program-t)
288     ac_prev=program_transform_name ;;
289   -program-transform-name=* | --program-transform-name=* \
290   | --program-transform-nam=* | --program-transform-na=* \
291   | --program-transform-n=* | --program-transform-=* \
292   | --program-transform=* | --program-transfor=* \
293   | --program-transfo=* | --program-transf=* \
294   | --program-trans=* | --program-tran=* \
295   | --progr-tra=* | --program-tr=* | --program-t=*)
296     program_transform_name="$ac_optarg" ;;
297
298   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
299   | -silent | --silent | --silen | --sile | --sil)
300     silent=yes ;;
301
302   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
303     ac_prev=sbindir ;;
304   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
305   | --sbi=* | --sb=*)
306     sbindir="$ac_optarg" ;;
307
308   -sharedstatedir | --sharedstatedir | --sharedstatedi \
309   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
310   | --sharedst | --shareds | --shared | --share | --shar \
311   | --sha | --sh)
312     ac_prev=sharedstatedir ;;
313   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
314   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
315   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
316   | --sha=* | --sh=*)
317     sharedstatedir="$ac_optarg" ;;
318
319   -site | --site | --sit)
320     ac_prev=site ;;
321   -site=* | --site=* | --sit=*)
322     site="$ac_optarg" ;;
323
324   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
325     ac_prev=srcdir ;;
326   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
327     srcdir="$ac_optarg" ;;
328
329   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
330   | --syscon | --sysco | --sysc | --sys | --sy)
331     ac_prev=sysconfdir ;;
332   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
333   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
334     sysconfdir="$ac_optarg" ;;
335
336   -target | --target | --targe | --targ | --tar | --ta | --t)
337     ac_prev=target ;;
338   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
339     target="$ac_optarg" ;;
340
341   -v | -verbose | --verbose | --verbos | --verbo | --verb)
342     verbose=yes ;;
343
344   -version | --version | --versio | --versi | --vers)
345     echo "configure generated by autoconf version 2.10"
346     exit 0 ;;
347
348   -with-* | --with-*)
349     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
350     # Reject names that are not valid shell variable names.
351     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
352       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
353     fi
354     ac_package=`echo $ac_package| sed 's/-/_/g'`
355     case "$ac_option" in
356       *=*) ;;
357       *) ac_optarg=yes ;;
358     esac
359     eval "with_${ac_package}='$ac_optarg'" ;;
360
361   -without-* | --without-*)
362     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
363     # Reject names that are not valid shell variable names.
364     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
365       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
366     fi
367     ac_package=`echo $ac_package| sed 's/-/_/g'`
368     eval "with_${ac_package}=no" ;;
369
370   --x)
371     # Obsolete; use --with-x.
372     with_x=yes ;;
373
374   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
375   | --x-incl | --x-inc | --x-in | --x-i)
376     ac_prev=x_includes ;;
377   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
378   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
379     x_includes="$ac_optarg" ;;
380
381   -x-libraries | --x-libraries | --x-librarie | --x-librari \
382   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
383     ac_prev=x_libraries ;;
384   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
385   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
386     x_libraries="$ac_optarg" ;;
387
388   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
389     ;;
390
391   *)
392     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
393       echo "configure: warning: $ac_option: invalid host type" 1>&2
394     fi
395     if test "x$nonopt" != xNONE; then
396       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
397     fi
398     nonopt="$ac_option"
399     ;;
400
401   esac
402 done
403
404 if test -n "$ac_prev"; then
405   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
406 fi
407
408 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
409
410 # File descriptor usage:
411 # 0 standard input
412 # 1 file creation
413 # 2 errors and warnings
414 # 3 some systems may open it to /dev/tty
415 # 4 used on the Kubota Titan
416 # 6 checking for... messages and results
417 # 5 compiler messages saved in config.log
418 if test "$silent" = yes; then
419   exec 6>/dev/null
420 else
421   exec 6>&1
422 fi
423 exec 5>./config.log
424
425 echo "\
426 This file contains any messages produced by compilers while
427 running configure, to aid debugging if configure makes a mistake.
428 " 1>&5
429
430 # Strip out --no-create and --no-recursion so they do not pile up.
431 # Also quote any args containing shell metacharacters.
432 ac_configure_args=
433 for ac_arg
434 do
435   case "$ac_arg" in
436   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
437   | --no-cr | --no-c) ;;
438   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
439   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
440   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
441   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
442   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
443   esac
444 done
445
446 # NLS nuisances.
447 # Only set LANG and LC_ALL to C if already set.
448 # These must not be set unconditionally because not all systems understand
449 # e.g. LANG=C (notably SCO).
450 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
451 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
452
453 # confdefs.h avoids OS command line length limits that DEFS can exceed.
454 rm -rf conftest* confdefs.h
455 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
456 echo > confdefs.h
457
458 # A filename unique to this package, relative to the directory that
459 # configure is in, which we can look for to find out if srcdir is correct.
460 ac_unique_file=src/cvs.h
461
462 # Find the source files, if location was not specified.
463 if test -z "$srcdir"; then
464   ac_srcdir_defaulted=yes
465   # Try the directory containing this script, then its parent.
466   ac_prog=$0
467   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
468   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
469   srcdir=$ac_confdir
470   if test ! -r $srcdir/$ac_unique_file; then
471     srcdir=..
472   fi
473 else
474   ac_srcdir_defaulted=no
475 fi
476 if test ! -r $srcdir/$ac_unique_file; then
477   if test "$ac_srcdir_defaulted" = yes; then
478     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
479   else
480     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
481   fi
482 fi
483 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
484
485 # Prefer explicitly selected file to automatically selected ones.
486 if test -z "$CONFIG_SITE"; then
487   if test "x$prefix" != xNONE; then
488     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
489   else
490     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
491   fi
492 fi
493 for ac_site_file in $CONFIG_SITE; do
494   if test -r "$ac_site_file"; then
495     echo "loading site script $ac_site_file"
496     . "$ac_site_file"
497   fi
498 done
499
500 if test -r "$cache_file"; then
501   echo "loading cache $cache_file"
502   . $cache_file
503 else
504   echo "creating cache $cache_file"
505   > $cache_file
506 fi
507
508 ac_ext=c
509 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
510 ac_cpp='$CPP $CPPFLAGS'
511 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
512 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
513
514 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
515   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
516   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
517     ac_n= ac_c='
518 ' ac_t='        '
519   else
520     ac_n=-n ac_c= ac_t=
521   fi
522 else
523   ac_n= ac_c='\c' ac_t=
524 fi
525
526
527
528
529 # Extract the first word of "gcc", so it can be a program name with args.
530 set dummy gcc; ac_word=$2
531 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
532 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
533   echo $ac_n "(cached) $ac_c" 1>&6
534 else
535   if test -n "$CC"; then
536   ac_cv_prog_CC="$CC" # Let the user override the test.
537 else
538   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
539   for ac_dir in $PATH; do
540     test -z "$ac_dir" && ac_dir=.
541     if test -f $ac_dir/$ac_word; then
542       ac_cv_prog_CC="gcc"
543       break
544     fi
545   done
546   IFS="$ac_save_ifs"
547 fi
548 fi
549 CC="$ac_cv_prog_CC"
550 if test -n "$CC"; then
551   echo "$ac_t""$CC" 1>&6
552 else
553   echo "$ac_t""no" 1>&6
554 fi
555
556 if test -z "$CC"; then
557   # Extract the first word of "cc", so it can be a program name with args.
558 set dummy cc; ac_word=$2
559 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
560 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
561   echo $ac_n "(cached) $ac_c" 1>&6
562 else
563   if test -n "$CC"; then
564   ac_cv_prog_CC="$CC" # Let the user override the test.
565 else
566   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
567   ac_prog_rejected=no
568   for ac_dir in $PATH; do
569     test -z "$ac_dir" && ac_dir=.
570     if test -f $ac_dir/$ac_word; then
571       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
572         ac_prog_rejected=yes
573         continue
574       fi
575       ac_cv_prog_CC="cc"
576       break
577     fi
578   done
579   IFS="$ac_save_ifs"
580 if test $ac_prog_rejected = yes; then
581   # We found a bogon in the path, so make sure we never use it.
582   set dummy $ac_cv_prog_CC
583   shift
584   if test $# -gt 0; then
585     # We chose a different compiler from the bogus one.
586     # However, it has the same basename, so the bogon will be chosen
587     # first if we set CC to just the basename; use the full file name.
588     shift
589     set dummy "$ac_dir/$ac_word" "$@"
590     shift
591     ac_cv_prog_CC="$@"
592   fi
593 fi
594 fi
595 fi
596 CC="$ac_cv_prog_CC"
597 if test -n "$CC"; then
598   echo "$ac_t""$CC" 1>&6
599 else
600   echo "$ac_t""no" 1>&6
601 fi
602
603   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
604 fi
605
606 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
607 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
608   echo $ac_n "(cached) $ac_c" 1>&6
609 else
610   cat > conftest.c <<EOF
611 #ifdef __GNUC__
612   yes;
613 #endif
614 EOF
615 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
616   ac_cv_prog_gcc=yes
617 else
618   ac_cv_prog_gcc=no
619 fi
620 fi
621
622 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
623 if test $ac_cv_prog_gcc = yes; then
624   GCC=yes
625   if test "${CFLAGS+set}" != set; then
626     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
627 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
628   echo $ac_n "(cached) $ac_c" 1>&6
629 else
630   echo 'void f(){}' > conftest.c
631 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
632   ac_cv_prog_gcc_g=yes
633 else
634   ac_cv_prog_gcc_g=no
635 fi
636 rm -f conftest*
637
638 fi
639
640 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
641     if test $ac_cv_prog_gcc_g = yes; then
642       CFLAGS="-g -O"
643     else
644       CFLAGS="-O"
645     fi
646   fi
647 else
648   GCC=
649   test "${CFLAGS+set}" = set || CFLAGS="-g"
650 fi
651
652
653 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
654 # On Suns, sometimes $CPP names a directory.
655 if test -n "$CPP" && test -d "$CPP"; then
656   CPP=
657 fi
658 if test -z "$CPP"; then
659 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
660   echo $ac_n "(cached) $ac_c" 1>&6
661 else
662     # This must be in double quotes, not single quotes, because CPP may get
663   # substituted into the Makefile and "${CC-cc}" will confuse make.
664   CPP="${CC-cc} -E"
665   # On the NeXT, cc -E runs the code through the compiler's parser,
666   # not just through cpp.
667   cat > conftest.$ac_ext <<EOF
668 #line 669 "configure"
669 #include "confdefs.h"
670 #include <assert.h>
671 Syntax Error
672 EOF
673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
674 { (eval echo configure:675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
675 ac_err=`grep -v '^ *+' conftest.out`
676 if test -z "$ac_err"; then
677   :
678 else
679   echo "$ac_err" >&5
680   rm -rf conftest*
681   CPP="${CC-cc} -E -traditional-cpp"
682   cat > conftest.$ac_ext <<EOF
683 #line 684 "configure"
684 #include "confdefs.h"
685 #include <assert.h>
686 Syntax Error
687 EOF
688 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
689 { (eval echo configure:690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
690 ac_err=`grep -v '^ *+' conftest.out`
691 if test -z "$ac_err"; then
692   :
693 else
694   echo "$ac_err" >&5
695   rm -rf conftest*
696   CPP=/lib/cpp
697 fi
698 rm -f conftest*
699 fi
700 rm -f conftest*
701   ac_cv_prog_CPP="$CPP"
702 fi
703   CPP="$ac_cv_prog_CPP"
704 else
705   ac_cv_prog_CPP="$CPP"
706 fi
707 echo "$ac_t""$CPP" 1>&6
708
709 echo $ac_n "checking for AIX""... $ac_c" 1>&6
710 cat > conftest.$ac_ext <<EOF
711 #line 712 "configure"
712 #include "confdefs.h"
713 #ifdef _AIX
714   yes
715 #endif
716
717 EOF
718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
719   egrep "yes" >/dev/null 2>&1; then
720   rm -rf conftest*
721   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
722 #define _ALL_SOURCE 1
723 EOF
724
725 else
726   rm -rf conftest*
727   echo "$ac_t""no" 1>&6
728 fi
729 rm -f conftest*
730
731
732 ac_safe=`echo "minix/config.h" | tr './\055' '___'`
733 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
734 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
735   echo $ac_n "(cached) $ac_c" 1>&6
736 else
737   cat > conftest.$ac_ext <<EOF
738 #line 739 "configure"
739 #include "confdefs.h"
740 #include <minix/config.h>
741 EOF
742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
743 { (eval echo configure:744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
744 ac_err=`grep -v '^ *+' conftest.out`
745 if test -z "$ac_err"; then
746   rm -rf conftest*
747   eval "ac_cv_header_$ac_safe=yes"
748 else
749   echo "$ac_err" >&5
750   rm -rf conftest*
751   eval "ac_cv_header_$ac_safe=no"
752 fi
753 rm -f conftest*
754 fi
755 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
756   echo "$ac_t""yes" 1>&6
757   MINIX=yes
758 else
759   echo "$ac_t""no" 1>&6
760 MINIX=
761 fi
762
763 if test "$MINIX" = yes; then
764   cat >> confdefs.h <<\EOF
765 #define _POSIX_SOURCE 1
766 EOF
767
768   cat >> confdefs.h <<\EOF
769 #define _POSIX_1_SOURCE 2
770 EOF
771
772   cat >> confdefs.h <<\EOF
773 #define _MINIX 1
774 EOF
775
776 fi
777
778 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
779 if test -d /etc/conf/kconfig.d &&
780   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
781 then
782   echo "$ac_t""yes" 1>&6
783   ISC=yes # If later tests want to check for ISC.
784   cat >> confdefs.h <<\EOF
785 #define _POSIX_SOURCE 1
786 EOF
787
788   if test "$GCC" = yes; then
789     CC="$CC -posix"
790   else
791     CC="$CC -Xp"
792   fi
793 else
794   echo "$ac_t""no" 1>&6
795   ISC=
796 fi
797
798 if test "$ISC" = yes; then
799 CFLAGS="$CFLAGS -D_SYSV3"
800 LIBS="-lcrypt $LIBS"
801 fi
802
803 if test "x$prefix" = xNONE; then
804 echo $ac_n "checking for prefix by ""... $ac_c" 1>&6
805 # Extract the first word of "cvs", so it can be a program name with args.
806 set dummy cvs; ac_word=$2
807 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
808 if eval "test \"`echo '$''{'ac_cv_path_CVS'+set}'`\" = set"; then
809   echo $ac_n "(cached) $ac_c" 1>&6
810 else
811   case "$CVS" in
812   /*)
813   ac_cv_path_CVS="$CVS" # Let the user override the test with a path.
814   ;;
815   *)
816   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
817   for ac_dir in $PATH; do
818     test -z "$ac_dir" && ac_dir=.
819     if test -f $ac_dir/$ac_word; then
820       ac_cv_path_CVS="$ac_dir/$ac_word"
821       break
822     fi
823   done
824   IFS="$ac_save_ifs"
825   ;;
826 esac
827 fi
828 CVS="$ac_cv_path_CVS"
829 if test -n "$CVS"; then
830   echo "$ac_t""$CVS" 1>&6
831 else
832   echo "$ac_t""no" 1>&6
833 fi
834
835   if test -n "$ac_cv_path_CVS"; then
836     prefix=`echo $ac_cv_path_CVS|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
837   fi
838 fi
839
840
841 # If we cannot run a trivial program, we must be cross compiling.
842 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
843 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
844   echo $ac_n "(cached) $ac_c" 1>&6
845 else
846   if test "$cross_compiling" = yes; then
847   ac_cv_c_cross=yes
848 else
849 cat > conftest.$ac_ext <<EOF
850 #line 851 "configure"
851 #include "confdefs.h"
852 main(){return(0);}
853 EOF
854 { (eval echo configure:855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
855 if test -s conftest && (./conftest; exit) 2>/dev/null; then
856   ac_cv_c_cross=no
857 else
858   ac_cv_c_cross=yes
859 fi
860 fi
861 rm -fr conftest*
862 fi
863
864 echo "$ac_t""$ac_cv_c_cross" 1>&6
865 cross_compiling=$ac_cv_c_cross
866
867
868 echo $ac_n "checking for working const""... $ac_c" 1>&6
869 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
870   echo $ac_n "(cached) $ac_c" 1>&6
871 else
872   cat > conftest.$ac_ext <<EOF
873 #line 874 "configure"
874 #include "confdefs.h"
875
876 int main() { return 0; }
877 int t() {
878
879 /* Ultrix mips cc rejects this.  */
880 typedef int charset[2]; const charset x;
881 /* SunOS 4.1.1 cc rejects this.  */
882 char const *const *ccp;
883 char **p;
884 /* NEC SVR4.0.2 mips cc rejects this.  */
885 struct point {int x, y;};
886 static struct point const zero = {0,0};
887 /* AIX XL C 1.02.0.0 rejects this.
888    It does not let you subtract one const X* pointer from another in an arm
889    of an if-expression whose if-part is not a constant expression */
890 const char *g = "string";
891 ccp = &g + (g ? g-g : 0);
892 /* HPUX 7.0 cc rejects these. */
893 ++ccp;
894 p = (char**) ccp;
895 ccp = (char const *const *) p;
896 { /* SCO 3.2v4 cc rejects this.  */
897   char *t;
898   char const *s = 0 ? (char *) 0 : (char const *) 0;
899
900   *t++ = 0;
901 }
902 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
903   int x[] = {25, 17};
904   const int *foo = &x[0];
905   ++foo;
906 }
907 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
908   typedef const int *iptr;
909   iptr p = 0;
910   ++p;
911 }
912 { /* AIX XL C 1.02.0.0 rejects this saying
913      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
914   struct s { int j; const int *ap[3]; };
915   struct s *b; b->j = 5;
916 }
917 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
918   const int foo = 10;
919 }
920
921 ; return 0; }
922 EOF
923 if { (eval echo configure:924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
924   rm -rf conftest*
925   ac_cv_c_const=yes
926 else
927   rm -rf conftest*
928   ac_cv_c_const=no
929 fi
930 rm -f conftest*
931
932 fi
933
934 echo "$ac_t""$ac_cv_c_const" 1>&6
935 if test $ac_cv_c_const = no; then
936   cat >> confdefs.h <<\EOF
937 #define const 
938 EOF
939
940 fi
941
942
943 ac_aux_dir=
944 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
945   if test -f $ac_dir/install-sh; then
946     ac_aux_dir=$ac_dir
947     ac_install_sh="$ac_aux_dir/install-sh -c"
948     break
949   elif test -f $ac_dir/install.sh; then
950     ac_aux_dir=$ac_dir
951     ac_install_sh="$ac_aux_dir/install.sh -c"
952     break
953   fi
954 done
955 if test -z "$ac_aux_dir"; then
956   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
957 fi
958 ac_config_guess=$ac_aux_dir/config.guess
959 ac_config_sub=$ac_aux_dir/config.sub
960 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
961
962 # Find a good install program.  We prefer a C program (faster),
963 # so one script is as good as another.  But avoid the broken or
964 # incompatible versions:
965 # SysV /etc/install, /usr/sbin/install
966 # SunOS /usr/etc/install
967 # IRIX /sbin/install
968 # AIX /bin/install
969 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
970 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
971 # ./install, which can be erroneously created by make from ./install.sh.
972 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
973 if test -z "$INSTALL"; then
974 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
975   echo $ac_n "(cached) $ac_c" 1>&6
976 else
977     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
978   for ac_dir in $PATH; do
979     # Account for people who put trailing slashes in PATH elements.
980     case "$ac_dir/" in
981     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
982     *)
983       # OSF1 and SCO ODT 3.0 have their own names for install.
984       for ac_prog in ginstall installbsd scoinst install; do
985         if test -f $ac_dir/$ac_prog; then
986           if test $ac_prog = install &&
987             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
988             # AIX install.  It has an incompatible calling convention.
989             # OSF/1 installbsd also uses dspmsg, but is usable.
990             :
991           else
992             ac_cv_path_install="$ac_dir/$ac_prog -c"
993             break 2
994           fi
995         fi
996       done
997       ;;
998     esac
999   done
1000   IFS="$ac_save_ifs"
1001
1002 fi
1003   if test "${ac_cv_path_install+set}" = set; then
1004     INSTALL="$ac_cv_path_install"
1005   else
1006     # As a last resort, use the slow shell script.  We don't cache a
1007     # path for INSTALL within a source directory, because that will
1008     # break other packages using the cache if that directory is
1009     # removed, or if the path is relative.
1010     INSTALL="$ac_install_sh"
1011   fi
1012 fi
1013 echo "$ac_t""$INSTALL" 1>&6
1014
1015 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1016 # It thinks the first close brace ends the variable substitution.
1017 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1018
1019 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1020
1021 # Extract the first word of "ranlib", so it can be a program name with args.
1022 set dummy ranlib; ac_word=$2
1023 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1024 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1025   echo $ac_n "(cached) $ac_c" 1>&6
1026 else
1027   if test -n "$RANLIB"; then
1028   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1029 else
1030   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1031   for ac_dir in $PATH; do
1032     test -z "$ac_dir" && ac_dir=.
1033     if test -f $ac_dir/$ac_word; then
1034       ac_cv_prog_RANLIB="ranlib"
1035       break
1036     fi
1037   done
1038   IFS="$ac_save_ifs"
1039   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1040 fi
1041 fi
1042 RANLIB="$ac_cv_prog_RANLIB"
1043 if test -n "$RANLIB"; then
1044   echo "$ac_t""$RANLIB" 1>&6
1045 else
1046   echo "$ac_t""no" 1>&6
1047 fi
1048
1049 for ac_prog in 'bison -y' byacc
1050 do
1051 # Extract the first word of "$ac_prog", so it can be a program name with args.
1052 set dummy $ac_prog; ac_word=$2
1053 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1054 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1055   echo $ac_n "(cached) $ac_c" 1>&6
1056 else
1057   if test -n "$YACC"; then
1058   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1059 else
1060   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1061   for ac_dir in $PATH; do
1062     test -z "$ac_dir" && ac_dir=.
1063     if test -f $ac_dir/$ac_word; then
1064       ac_cv_prog_YACC="$ac_prog"
1065       break
1066     fi
1067   done
1068   IFS="$ac_save_ifs"
1069 fi
1070 fi
1071 YACC="$ac_cv_prog_YACC"
1072 if test -n "$YACC"; then
1073   echo "$ac_t""$YACC" 1>&6
1074 else
1075   echo "$ac_t""no" 1>&6
1076 fi
1077
1078 test -n "$YACC" && break
1079 done
1080 test -n "$YACC" || YACC="yacc"
1081
1082 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1083 set dummy ${MAKE-make}; ac_make=$2
1084 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1085   echo $ac_n "(cached) $ac_c" 1>&6
1086 else
1087   cat > conftestmake <<\EOF
1088 all:
1089         @echo 'ac_maketemp="${MAKE}"'
1090 EOF
1091 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1092 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1093 if test -n "$ac_maketemp"; then
1094   eval ac_cv_prog_make_${ac_make}_set=yes
1095 else
1096   eval ac_cv_prog_make_${ac_make}_set=no
1097 fi
1098 rm -f conftestmake
1099 fi
1100 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1101   echo "$ac_t""yes" 1>&6
1102   SET_MAKE=
1103 else
1104   echo "$ac_t""no" 1>&6
1105   SET_MAKE="MAKE=${MAKE-make}"
1106 fi
1107
1108
1109 # Extract the first word of "perl", so it can be a program name with args.
1110 set dummy perl; ac_word=$2
1111 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1112 if eval "test \"`echo '$''{'ac_cv_path_perl_path'+set}'`\" = set"; then
1113   echo $ac_n "(cached) $ac_c" 1>&6
1114 else
1115   case "$perl_path" in
1116   /*)
1117   ac_cv_path_perl_path="$perl_path" # Let the user override the test with a path.
1118   ;;
1119   *)
1120   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1121   for ac_dir in $PATH; do
1122     test -z "$ac_dir" && ac_dir=.
1123     if test -f $ac_dir/$ac_word; then
1124       ac_cv_path_perl_path="$ac_dir/$ac_word"
1125       break
1126     fi
1127   done
1128   IFS="$ac_save_ifs"
1129   test -z "$ac_cv_path_perl_path" && ac_cv_path_perl_path="no"
1130   ;;
1131 esac
1132 fi
1133 perl_path="$ac_cv_path_perl_path"
1134 if test -n "$perl_path"; then
1135   echo "$ac_t""$perl_path" 1>&6
1136 else
1137   echo "$ac_t""no" 1>&6
1138 fi
1139
1140 # Extract the first word of "csh", so it can be a program name with args.
1141 set dummy csh; ac_word=$2
1142 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1143 if eval "test \"`echo '$''{'ac_cv_path_csh_path'+set}'`\" = set"; then
1144   echo $ac_n "(cached) $ac_c" 1>&6
1145 else
1146   case "$csh_path" in
1147   /*)
1148   ac_cv_path_csh_path="$csh_path" # Let the user override the test with a path.
1149   ;;
1150   *)
1151   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1152   for ac_dir in $PATH; do
1153     test -z "$ac_dir" && ac_dir=.
1154     if test -f $ac_dir/$ac_word; then
1155       ac_cv_path_csh_path="$ac_dir/$ac_word"
1156       break
1157     fi
1158   done
1159   IFS="$ac_save_ifs"
1160   test -z "$ac_cv_path_csh_path" && ac_cv_path_csh_path="no"
1161   ;;
1162 esac
1163 fi
1164 csh_path="$ac_cv_path_csh_path"
1165 if test -n "$csh_path"; then
1166   echo "$ac_t""$csh_path" 1>&6
1167 else
1168   echo "$ac_t""no" 1>&6
1169 fi
1170
1171
1172 # Pull the hash mark out of the macro call to avoid m4 problems.
1173 ac_msg="whether #! works in shell scripts"
1174 echo $ac_n "checking $ac_msg""... $ac_c" 1>&6
1175 if eval "test \"`echo '$''{'ac_cv_sys_interpreter'+set}'`\" = set"; then
1176   echo $ac_n "(cached) $ac_c" 1>&6
1177 else
1178   echo '#! /bin/cat
1179 exit 69
1180 ' > conftest
1181 chmod u+x conftest
1182 (SHELL=/bin/sh; export SHELL; ./conftest >/dev/null)
1183 if test $? -ne 69; then
1184    ac_cv_sys_interpreter=yes
1185 else
1186    ac_cv_sys_interpreter=no
1187 fi
1188 rm -f conftest
1189 fi
1190
1191 echo "$ac_t""$ac_cv_sys_interpreter" 1>&6
1192
1193 if test X"$ac_cv_sys_interpreter" != X"yes" ; then
1194   # silly trick to avoid problems in AC macros...
1195   ac_msg='perl scripts using #! may not be invoked properly'
1196   echo "configure: warning: $ac_msg" 1>&2
1197 fi
1198
1199 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1200 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1201   echo $ac_n "(cached) $ac_c" 1>&6
1202 else
1203   cat > conftest.$ac_ext <<EOF
1204 #line 1205 "configure"
1205 #include "confdefs.h"
1206 #include <stdlib.h>
1207 #include <stdarg.h>
1208 #include <string.h>
1209 #include <float.h>
1210 EOF
1211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1212 { (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1213 ac_err=`grep -v '^ *+' conftest.out`
1214 if test -z "$ac_err"; then
1215   rm -rf conftest*
1216   ac_cv_header_stdc=yes
1217 else
1218   echo "$ac_err" >&5
1219   rm -rf conftest*
1220   ac_cv_header_stdc=no
1221 fi
1222 rm -f conftest*
1223
1224 if test $ac_cv_header_stdc = yes; then
1225   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1226 cat > conftest.$ac_ext <<EOF
1227 #line 1228 "configure"
1228 #include "confdefs.h"
1229 #include <string.h>
1230 EOF
1231 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1232   egrep "memchr" >/dev/null 2>&1; then
1233   :
1234 else
1235   rm -rf conftest*
1236   ac_cv_header_stdc=no
1237 fi
1238 rm -f conftest*
1239
1240 fi
1241
1242 if test $ac_cv_header_stdc = yes; then
1243   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1244 cat > conftest.$ac_ext <<EOF
1245 #line 1246 "configure"
1246 #include "confdefs.h"
1247 #include <stdlib.h>
1248 EOF
1249 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1250   egrep "free" >/dev/null 2>&1; then
1251   :
1252 else
1253   rm -rf conftest*
1254   ac_cv_header_stdc=no
1255 fi
1256 rm -f conftest*
1257
1258 fi
1259
1260 if test $ac_cv_header_stdc = yes; then
1261   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1262 if test "$cross_compiling" = yes; then
1263   :
1264 else
1265 cat > conftest.$ac_ext <<EOF
1266 #line 1267 "configure"
1267 #include "confdefs.h"
1268 #include <ctype.h>
1269 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1270 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1271 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1272 int main () { int i; for (i = 0; i < 256; i++)
1273 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1274 exit (0); }
1275
1276 EOF
1277 { (eval echo configure:1278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1278 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1279   :
1280 else
1281   ac_cv_header_stdc=no
1282 fi
1283 fi
1284 rm -fr conftest*
1285 fi
1286 fi
1287
1288 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1289 if test $ac_cv_header_stdc = yes; then
1290   cat >> confdefs.h <<\EOF
1291 #define STDC_HEADERS 1
1292 EOF
1293
1294 fi
1295
1296 for ac_hdr in errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \
1297                  limits.h sys/file.h \
1298                  sys/param.h sys/select.h sys/time.h sys/timeb.h \
1299                  io.h direct.h sys/bsdtypes.h sys/resource.h
1300 do
1301 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1302 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1303 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1304   echo $ac_n "(cached) $ac_c" 1>&6
1305 else
1306   cat > conftest.$ac_ext <<EOF
1307 #line 1308 "configure"
1308 #include "confdefs.h"
1309 #include <$ac_hdr>
1310 EOF
1311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1312 { (eval echo configure:1313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1313 ac_err=`grep -v '^ *+' conftest.out`
1314 if test -z "$ac_err"; then
1315   rm -rf conftest*
1316   eval "ac_cv_header_$ac_safe=yes"
1317 else
1318   echo "$ac_err" >&5
1319   rm -rf conftest*
1320   eval "ac_cv_header_$ac_safe=no"
1321 fi
1322 rm -f conftest*
1323 fi
1324 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1325   echo "$ac_t""yes" 1>&6
1326     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1327   cat >> confdefs.h <<EOF
1328 #define $ac_tr_hdr 1
1329 EOF
1330  
1331 else
1332   echo "$ac_t""no" 1>&6
1333 fi
1334 done
1335
1336 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1337 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1338   echo $ac_n "(cached) $ac_c" 1>&6
1339 else
1340   cat > conftest.$ac_ext <<EOF
1341 #line 1342 "configure"
1342 #include "confdefs.h"
1343 #include <sys/types.h>
1344 #include <sys/wait.h>
1345 #ifndef WEXITSTATUS
1346 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1347 #endif
1348 #ifndef WIFEXITED
1349 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1350 #endif
1351 int main() { return 0; }
1352 int t() {
1353 int s;
1354 wait (&s);
1355 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1356 ; return 0; }
1357 EOF
1358 if { (eval echo configure:1359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1359   rm -rf conftest*
1360   ac_cv_header_sys_wait_h=yes
1361 else
1362   rm -rf conftest*
1363   ac_cv_header_sys_wait_h=no
1364 fi
1365 rm -f conftest*
1366
1367 fi
1368
1369 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1370 if test $ac_cv_header_sys_wait_h = yes; then
1371   cat >> confdefs.h <<\EOF
1372 #define HAVE_SYS_WAIT_H 1
1373 EOF
1374
1375 fi
1376
1377 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1378 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1379   echo $ac_n "(cached) $ac_c" 1>&6
1380 else
1381   cat > conftest.$ac_ext <<EOF
1382 #line 1383 "configure"
1383 #include "confdefs.h"
1384 #include <sys/types.h>
1385 #include <sys/stat.h>
1386
1387 #if defined(S_ISBLK) && defined(S_IFDIR)
1388 # if S_ISBLK (S_IFDIR)
1389 You lose.
1390 # endif
1391 #endif
1392
1393 #if defined(S_ISBLK) && defined(S_IFCHR)
1394 # if S_ISBLK (S_IFCHR)
1395 You lose.
1396 # endif
1397 #endif
1398
1399 #if defined(S_ISLNK) && defined(S_IFREG)
1400 # if S_ISLNK (S_IFREG)
1401 You lose.
1402 # endif
1403 #endif
1404
1405 #if defined(S_ISSOCK) && defined(S_IFREG)
1406 # if S_ISSOCK (S_IFREG)
1407 You lose.
1408 # endif
1409 #endif
1410
1411 EOF
1412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1413   egrep "You lose" >/dev/null 2>&1; then
1414   rm -rf conftest*
1415   ac_cv_header_stat_broken=yes
1416 else
1417   rm -rf conftest*
1418   ac_cv_header_stat_broken=no
1419 fi
1420 rm -f conftest*
1421
1422 fi
1423
1424 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1425 if test $ac_cv_header_stat_broken = yes; then
1426   cat >> confdefs.h <<\EOF
1427 #define STAT_MACROS_BROKEN 1
1428 EOF
1429
1430 fi
1431
1432 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1433 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1434   echo $ac_n "(cached) $ac_c" 1>&6
1435 else
1436   cat > conftest.$ac_ext <<EOF
1437 #line 1438 "configure"
1438 #include "confdefs.h"
1439 #include <sys/types.h>
1440 #include <sys/time.h>
1441 #include <time.h>
1442 int main() { return 0; }
1443 int t() {
1444 struct tm *tp;
1445 ; return 0; }
1446 EOF
1447 if { (eval echo configure:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1448   rm -rf conftest*
1449   ac_cv_header_time=yes
1450 else
1451   rm -rf conftest*
1452   ac_cv_header_time=no
1453 fi
1454 rm -f conftest*
1455
1456 fi
1457
1458 echo "$ac_t""$ac_cv_header_time" 1>&6
1459 if test $ac_cv_header_time = yes; then
1460   cat >> confdefs.h <<\EOF
1461 #define TIME_WITH_SYS_TIME 1
1462 EOF
1463
1464 fi
1465
1466 ac_header_dirent=no
1467 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1468 do
1469 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1470 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1471 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1472   echo $ac_n "(cached) $ac_c" 1>&6
1473 else
1474   cat > conftest.$ac_ext <<EOF
1475 #line 1476 "configure"
1476 #include "confdefs.h"
1477 #include <sys/types.h>
1478 #include <$ac_hdr>
1479 int main() { return 0; }
1480 int t() {
1481 DIR *dirp = 0;
1482 ; return 0; }
1483 EOF
1484 if { (eval echo configure:1485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1485   rm -rf conftest*
1486   eval "ac_cv_header_dirent_$ac_safe=yes"
1487 else
1488   rm -rf conftest*
1489   eval "ac_cv_header_dirent_$ac_safe=no"
1490 fi
1491 rm -f conftest*
1492
1493 fi
1494 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1495   echo "$ac_t""yes" 1>&6
1496     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
1497   cat >> confdefs.h <<EOF
1498 #define $ac_tr_hdr 1
1499 EOF
1500  ac_header_dirent=$ac_hdr; break
1501 else
1502   echo "$ac_t""no" 1>&6
1503 fi
1504 done
1505 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1506 if test $ac_header_dirent = dirent.h; then
1507 echo $ac_n "checking for -ldir""... $ac_c" 1>&6
1508 ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'`
1509 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1510   echo $ac_n "(cached) $ac_c" 1>&6
1511 else
1512   ac_save_LIBS="$LIBS"
1513 LIBS="-ldir  $LIBS"
1514 cat > conftest.$ac_ext <<EOF
1515 #line 1516 "configure"
1516 #include "confdefs.h"
1517 /* Override any gcc2 internal prototype to avoid an error.  */
1518 /* We use char because int might match the return type of a gcc2
1519     builtin and then its argument prototype would still apply.  */
1520 char opendir();
1521
1522 int main() { return 0; }
1523 int t() {
1524 opendir()
1525 ; return 0; }
1526 EOF
1527 if { (eval echo configure:1528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1528   rm -rf conftest*
1529   eval "ac_cv_lib_$ac_lib_var=yes"
1530 else
1531   rm -rf conftest*
1532   eval "ac_cv_lib_$ac_lib_var=no"
1533 fi
1534 rm -f conftest*
1535 LIBS="$ac_save_LIBS"
1536
1537 fi
1538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1539   echo "$ac_t""yes" 1>&6
1540   LIBS="$LIBS -ldir"
1541 else
1542   echo "$ac_t""no" 1>&6
1543 fi
1544
1545 else
1546 echo $ac_n "checking for -lx""... $ac_c" 1>&6
1547 ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'`
1548 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1549   echo $ac_n "(cached) $ac_c" 1>&6
1550 else
1551   ac_save_LIBS="$LIBS"
1552 LIBS="-lx  $LIBS"
1553 cat > conftest.$ac_ext <<EOF
1554 #line 1555 "configure"
1555 #include "confdefs.h"
1556 /* Override any gcc2 internal prototype to avoid an error.  */
1557 /* We use char because int might match the return type of a gcc2
1558     builtin and then its argument prototype would still apply.  */
1559 char opendir();
1560
1561 int main() { return 0; }
1562 int t() {
1563 opendir()
1564 ; return 0; }
1565 EOF
1566 if { (eval echo configure:1567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1567   rm -rf conftest*
1568   eval "ac_cv_lib_$ac_lib_var=yes"
1569 else
1570   rm -rf conftest*
1571   eval "ac_cv_lib_$ac_lib_var=no"
1572 fi
1573 rm -f conftest*
1574 LIBS="$ac_save_LIBS"
1575
1576 fi
1577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1578   echo "$ac_t""yes" 1>&6
1579   LIBS="$LIBS -lx"
1580 else
1581   echo "$ac_t""no" 1>&6
1582 fi
1583
1584 fi
1585
1586 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1587 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1588   echo $ac_n "(cached) $ac_c" 1>&6
1589 else
1590   cat > conftest.$ac_ext <<EOF
1591 #line 1592 "configure"
1592 #include "confdefs.h"
1593 #include <sys/types.h>
1594 #include <signal.h>
1595 #ifdef signal
1596 #undef signal
1597 #endif
1598 #ifdef __cplusplus
1599 extern "C" void (*signal (int, void (*)(int)))(int);
1600 #else
1601 void (*signal ()) ();
1602 #endif
1603
1604 int main() { return 0; }
1605 int t() {
1606 int i;
1607 ; return 0; }
1608 EOF
1609 if { (eval echo configure:1610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1610   rm -rf conftest*
1611   ac_cv_type_signal=void
1612 else
1613   rm -rf conftest*
1614   ac_cv_type_signal=int
1615 fi
1616 rm -f conftest*
1617
1618 fi
1619
1620 echo "$ac_t""$ac_cv_type_signal" 1>&6
1621 cat >> confdefs.h <<EOF
1622 #define RETSIGTYPE $ac_cv_type_signal
1623 EOF
1624
1625
1626 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1627 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1628   echo $ac_n "(cached) $ac_c" 1>&6
1629 else
1630   cat > conftest.$ac_ext <<EOF
1631 #line 1632 "configure"
1632 #include "confdefs.h"
1633 #include <sys/types.h>
1634 EOF
1635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1636   egrep "uid_t" >/dev/null 2>&1; then
1637   rm -rf conftest*
1638   ac_cv_type_uid_t=yes
1639 else
1640   rm -rf conftest*
1641   ac_cv_type_uid_t=no
1642 fi
1643 rm -f conftest*
1644
1645 fi
1646
1647 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1648 if test $ac_cv_type_uid_t = no; then
1649   cat >> confdefs.h <<\EOF
1650 #define uid_t int
1651 EOF
1652
1653   cat >> confdefs.h <<\EOF
1654 #define gid_t int
1655 EOF
1656
1657 fi
1658
1659 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1660 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1661   echo $ac_n "(cached) $ac_c" 1>&6
1662 else
1663   cat > conftest.$ac_ext <<EOF
1664 #line 1665 "configure"
1665 #include "confdefs.h"
1666 #include <sys/types.h>
1667 #if STDC_HEADERS
1668 #include <stdlib.h>
1669 #endif
1670 EOF
1671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1672   egrep "mode_t" >/dev/null 2>&1; then
1673   rm -rf conftest*
1674   ac_cv_type_mode_t=yes
1675 else
1676   rm -rf conftest*
1677   ac_cv_type_mode_t=no
1678 fi
1679 rm -f conftest*
1680
1681 fi
1682 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1683 if test $ac_cv_type_mode_t = no; then
1684   cat >> confdefs.h <<\EOF
1685 #define mode_t int
1686 EOF
1687
1688 fi
1689
1690 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1691 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1692   echo $ac_n "(cached) $ac_c" 1>&6
1693 else
1694   cat > conftest.$ac_ext <<EOF
1695 #line 1696 "configure"
1696 #include "confdefs.h"
1697 #include <sys/types.h>
1698 #if STDC_HEADERS
1699 #include <stdlib.h>
1700 #endif
1701 EOF
1702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1703   egrep "size_t" >/dev/null 2>&1; then
1704   rm -rf conftest*
1705   ac_cv_type_size_t=yes
1706 else
1707   rm -rf conftest*
1708   ac_cv_type_size_t=no
1709 fi
1710 rm -f conftest*
1711
1712 fi
1713 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1714 if test $ac_cv_type_size_t = no; then
1715   cat >> confdefs.h <<\EOF
1716 #define size_t unsigned
1717 EOF
1718
1719 fi
1720
1721 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1722 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1723   echo $ac_n "(cached) $ac_c" 1>&6
1724 else
1725   cat > conftest.$ac_ext <<EOF
1726 #line 1727 "configure"
1727 #include "confdefs.h"
1728 #include <sys/types.h>
1729 #if STDC_HEADERS
1730 #include <stdlib.h>
1731 #endif
1732 EOF
1733 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1734   egrep "pid_t" >/dev/null 2>&1; then
1735   rm -rf conftest*
1736   ac_cv_type_pid_t=yes
1737 else
1738   rm -rf conftest*
1739   ac_cv_type_pid_t=no
1740 fi
1741 rm -f conftest*
1742
1743 fi
1744 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1745 if test $ac_cv_type_pid_t = no; then
1746   cat >> confdefs.h <<\EOF
1747 #define pid_t int
1748 EOF
1749
1750 fi
1751
1752 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
1753 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
1754   echo $ac_n "(cached) $ac_c" 1>&6
1755 else
1756   cat > conftest.$ac_ext <<EOF
1757 #line 1758 "configure"
1758 #include "confdefs.h"
1759 #include <sys/types.h>
1760 #include <sys/stat.h>
1761 int main() { return 0; }
1762 int t() {
1763 struct stat s; s.st_blksize;
1764 ; return 0; }
1765 EOF
1766 if { (eval echo configure:1767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1767   rm -rf conftest*
1768   ac_cv_struct_st_blksize=yes
1769 else
1770   rm -rf conftest*
1771   ac_cv_struct_st_blksize=no
1772 fi
1773 rm -f conftest*
1774
1775 fi
1776
1777 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
1778 if test $ac_cv_struct_st_blksize = yes; then
1779   cat >> confdefs.h <<\EOF
1780 #define HAVE_ST_BLKSIZE 1
1781 EOF
1782
1783 fi
1784
1785 for ac_func in mkdir rename strstr dup2 strerror valloc waitpid memmove vasprintf strtoul
1786 do
1787 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1788 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1789   echo $ac_n "(cached) $ac_c" 1>&6
1790 else
1791   cat > conftest.$ac_ext <<EOF
1792 #line 1793 "configure"
1793 #include "confdefs.h"
1794 /* System header to define __stub macros and hopefully few prototypes,
1795     which can conflict with char $ac_func(); below.  */
1796 #include <assert.h>
1797 /* Override any gcc2 internal prototype to avoid an error.  */
1798 /* We use char because int might match the return type of a gcc2
1799     builtin and then its argument prototype would still apply.  */
1800 char $ac_func();
1801
1802 int main() { return 0; }
1803 int t() {
1804
1805 /* The GNU C library defines this for functions which it implements
1806     to always fail with ENOSYS.  Some functions are actually named
1807     something starting with __ and the normal name is an alias.  */
1808 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1809 choke me
1810 #else
1811 $ac_func();
1812 #endif
1813
1814 ; return 0; }
1815 EOF
1816 if { (eval echo configure:1817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1817   rm -rf conftest*
1818   eval "ac_cv_func_$ac_func=yes"
1819 else
1820   rm -rf conftest*
1821   eval "ac_cv_func_$ac_func=no"
1822 fi
1823 rm -f conftest*
1824
1825 fi
1826 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1827   echo "$ac_t""yes" 1>&6
1828   :
1829 else
1830   echo "$ac_t""no" 1>&6
1831 LIBOBJS="$LIBOBJS ${ac_func}.o"
1832 fi
1833
1834 done
1835
1836 for ac_func in fchmod fsync ftime mktemp putenv vprintf ftruncate timezone getpagesize initgroups fchdir sigaction sigprocmask sigvec sigsetmask sigblock tempnam tzset readlink wait3
1837 do
1838 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1839 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1840   echo $ac_n "(cached) $ac_c" 1>&6
1841 else
1842   cat > conftest.$ac_ext <<EOF
1843 #line 1844 "configure"
1844 #include "confdefs.h"
1845 /* System header to define __stub macros and hopefully few prototypes,
1846     which can conflict with char $ac_func(); below.  */
1847 #include <assert.h>
1848 /* Override any gcc2 internal prototype to avoid an error.  */
1849 /* We use char because int might match the return type of a gcc2
1850     builtin and then its argument prototype would still apply.  */
1851 char $ac_func();
1852
1853 int main() { return 0; }
1854 int t() {
1855
1856 /* The GNU C library defines this for functions which it implements
1857     to always fail with ENOSYS.  Some functions are actually named
1858     something starting with __ and the normal name is an alias.  */
1859 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1860 choke me
1861 #else
1862 $ac_func();
1863 #endif
1864
1865 ; return 0; }
1866 EOF
1867 if { (eval echo configure:1868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1868   rm -rf conftest*
1869   eval "ac_cv_func_$ac_func=yes"
1870 else
1871   rm -rf conftest*
1872   eval "ac_cv_func_$ac_func=no"
1873 fi
1874 rm -f conftest*
1875
1876 fi
1877 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1878   echo "$ac_t""yes" 1>&6
1879     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1880   cat >> confdefs.h <<EOF
1881 #define $ac_tr_func 1
1882 EOF
1883  
1884 else
1885   echo "$ac_t""no" 1>&6
1886 fi
1887 done
1888
1889
1890 cat >> confdefs.h <<\EOF
1891 #define HAVE_STRCHR 1
1892 EOF
1893
1894 cat >> confdefs.h <<\EOF
1895 #define HAVE_MEMCHR 1
1896 EOF
1897
1898
1899 ac_safe=`echo "vfork.h" | tr './\055' '___'`
1900 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
1901 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1902   echo $ac_n "(cached) $ac_c" 1>&6
1903 else
1904   cat > conftest.$ac_ext <<EOF
1905 #line 1906 "configure"
1906 #include "confdefs.h"
1907 #include <vfork.h>
1908 EOF
1909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1910 { (eval echo configure:1911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1911 ac_err=`grep -v '^ *+' conftest.out`
1912 if test -z "$ac_err"; then
1913   rm -rf conftest*
1914   eval "ac_cv_header_$ac_safe=yes"
1915 else
1916   echo "$ac_err" >&5
1917   rm -rf conftest*
1918   eval "ac_cv_header_$ac_safe=no"
1919 fi
1920 rm -f conftest*
1921 fi
1922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1923   echo "$ac_t""yes" 1>&6
1924   cat >> confdefs.h <<\EOF
1925 #define HAVE_VFORK_H 1
1926 EOF
1927
1928 else
1929   echo "$ac_t""no" 1>&6
1930 fi
1931
1932 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
1933 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
1934   echo $ac_n "(cached) $ac_c" 1>&6
1935 else
1936   if test "$cross_compiling" = yes; then
1937   echo $ac_n "checking for vfork""... $ac_c" 1>&6
1938 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
1939   echo $ac_n "(cached) $ac_c" 1>&6
1940 else
1941   cat > conftest.$ac_ext <<EOF
1942 #line 1943 "configure"
1943 #include "confdefs.h"
1944 /* System header to define __stub macros and hopefully few prototypes,
1945     which can conflict with char vfork(); below.  */
1946 #include <assert.h>
1947 /* Override any gcc2 internal prototype to avoid an error.  */
1948 /* We use char because int might match the return type of a gcc2
1949     builtin and then its argument prototype would still apply.  */
1950 char vfork();
1951
1952 int main() { return 0; }
1953 int t() {
1954
1955 /* The GNU C library defines this for functions which it implements
1956     to always fail with ENOSYS.  Some functions are actually named
1957     something starting with __ and the normal name is an alias.  */
1958 #if defined (__stub_vfork) || defined (__stub___vfork)
1959 choke me
1960 #else
1961 vfork();
1962 #endif
1963
1964 ; return 0; }
1965 EOF
1966 if { (eval echo configure:1967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1967   rm -rf conftest*
1968   eval "ac_cv_func_vfork=yes"
1969 else
1970   rm -rf conftest*
1971   eval "ac_cv_func_vfork=no"
1972 fi
1973 rm -f conftest*
1974
1975 fi
1976 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
1977   echo "$ac_t""yes" 1>&6
1978   :
1979 else
1980   echo "$ac_t""no" 1>&6
1981 fi
1982
1983 else
1984 cat > conftest.$ac_ext <<EOF
1985 #line 1986 "configure"
1986 #include "confdefs.h"
1987 /* Thanks to Paul Eggert for this test.  */
1988 #include <stdio.h>
1989 #include <sys/types.h>
1990 #include <sys/stat.h>
1991 #ifdef HAVE_UNISTD_H
1992 #include <unistd.h>
1993 #endif
1994 #ifdef HAVE_VFORK_H
1995 #include <vfork.h>
1996 #endif
1997 /* On some sparc systems, changes by the child to local and incoming
1998    argument registers are propagated back to the parent.
1999    The compiler is told about this with #include <vfork.h>,
2000    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
2001    Test for this by using a static variable whose address
2002    is put into a register that is clobbered by the vfork.  */
2003 static
2004 #ifdef __cplusplus
2005 sparc_address_test (int arg)
2006 #else
2007 sparc_address_test (arg) int arg;
2008 #endif
2009 {
2010   static pid_t child;
2011   if (!child) {
2012     child = vfork ();
2013     if (child < 0)
2014       perror ("vfork");
2015     if (!child) {
2016       arg = getpid();
2017       write(-1, "", 0);
2018       _exit (arg);
2019     }
2020   }
2021 }
2022 main() {
2023   pid_t parent = getpid ();
2024   pid_t child;
2025
2026   sparc_address_test ();
2027
2028   child = vfork ();
2029
2030   if (child == 0) {
2031     /* Here is another test for sparc vfork register problems.
2032        This test uses lots of local variables, at least
2033        as many local variables as main has allocated so far
2034        including compiler temporaries.  4 locals are enough for
2035        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
2036        A buggy compiler should reuse the register of parent
2037        for one of the local variables, since it will think that
2038        parent can't possibly be used any more in this routine.
2039        Assigning to the local variable will thus munge parent
2040        in the parent process.  */
2041     pid_t
2042       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
2043       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
2044     /* Convince the compiler that p..p7 are live; otherwise, it might
2045        use the same hardware register for all 8 local variables.  */
2046     if (p != p1 || p != p2 || p != p3 || p != p4
2047         || p != p5 || p != p6 || p != p7)
2048       _exit(1);
2049
2050     /* On some systems (e.g. IRIX 3.3),
2051        vfork doesn't separate parent from child file descriptors.
2052        If the child closes a descriptor before it execs or exits,
2053        this munges the parent's descriptor as well.
2054        Test for this by closing stdout in the child.  */
2055     _exit(close(fileno(stdout)) != 0);
2056   } else {
2057     int status;
2058     struct stat st;
2059
2060     while (wait(&status) != child)
2061       ;
2062     exit(
2063          /* Was there some problem with vforking?  */
2064          child < 0
2065
2066          /* Did the child fail?  (This shouldn't happen.)  */
2067          || status
2068
2069          /* Did the vfork/compiler bug occur?  */
2070          || parent != getpid()
2071
2072          /* Did the file descriptor bug occur?  */
2073          || fstat(fileno(stdout), &st) != 0
2074          );
2075   }
2076 }
2077 EOF
2078 { (eval echo configure:2079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2079 if test -s conftest && (./conftest; exit) 2>/dev/null; then
2080   ac_cv_func_vfork=yes
2081 else
2082   ac_cv_func_vfork=no
2083 fi
2084 fi
2085 rm -fr conftest*
2086 fi
2087
2088 echo "$ac_t""$ac_cv_func_vfork" 1>&6
2089 if test $ac_cv_func_vfork = no; then
2090   cat >> confdefs.h <<\EOF
2091 #define vfork fork
2092 EOF
2093
2094 fi
2095
2096 echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
2097 if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
2098   echo $ac_n "(cached) $ac_c" 1>&6
2099 else
2100   if test "$cross_compiling" = yes; then
2101   ac_cv_func_closedir_void=yes
2102 else
2103 cat > conftest.$ac_ext <<EOF
2104 #line 2105 "configure"
2105 #include "confdefs.h"
2106 #include <sys/types.h>
2107 #include <$ac_header_dirent>
2108 int closedir(); main() { exit(closedir(opendir(".")) != 0); }
2109 EOF
2110 { (eval echo configure:2111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2111 if test -s conftest && (./conftest; exit) 2>/dev/null; then
2112   ac_cv_func_closedir_void=no
2113 else
2114   ac_cv_func_closedir_void=yes
2115 fi
2116 fi
2117 rm -fr conftest*
2118 fi
2119
2120 echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
2121 if test $ac_cv_func_closedir_void = yes; then
2122   cat >> confdefs.h <<\EOF
2123 #define CLOSEDIR_VOID 1
2124 EOF
2125
2126 fi
2127
2128
2129 echo $ac_n "checking for -lsec""... $ac_c" 1>&6
2130 ac_lib_var=`echo sec'_'getspnam | tr './+\055' '__p_'`
2131 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2132   echo $ac_n "(cached) $ac_c" 1>&6
2133 else
2134   ac_save_LIBS="$LIBS"
2135 LIBS="-lsec  $LIBS"
2136 cat > conftest.$ac_ext <<EOF
2137 #line 2138 "configure"
2138 #include "confdefs.h"
2139 /* Override any gcc2 internal prototype to avoid an error.  */
2140 /* We use char because int might match the return type of a gcc2
2141     builtin and then its argument prototype would still apply.  */
2142 char getspnam();
2143
2144 int main() { return 0; }
2145 int t() {
2146 getspnam()
2147 ; return 0; }
2148 EOF
2149 if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2150   rm -rf conftest*
2151   eval "ac_cv_lib_$ac_lib_var=yes"
2152 else
2153   rm -rf conftest*
2154   eval "ac_cv_lib_$ac_lib_var=no"
2155 fi
2156 rm -f conftest*
2157 LIBS="$ac_save_LIBS"
2158
2159 fi
2160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2161   echo "$ac_t""yes" 1>&6
2162     ac_tr_lib=HAVE_LIB`echo sec | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2163   cat >> confdefs.h <<EOF
2164 #define $ac_tr_lib 1
2165 EOF
2166
2167   LIBS="-lsec $LIBS"
2168
2169 else
2170   echo "$ac_t""no" 1>&6
2171 fi
2172
2173 for ac_func in getspnam
2174 do
2175 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2176 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2177   echo $ac_n "(cached) $ac_c" 1>&6
2178 else
2179   cat > conftest.$ac_ext <<EOF
2180 #line 2181 "configure"
2181 #include "confdefs.h"
2182 /* System header to define __stub macros and hopefully few prototypes,
2183     which can conflict with char $ac_func(); below.  */
2184 #include <assert.h>
2185 /* Override any gcc2 internal prototype to avoid an error.  */
2186 /* We use char because int might match the return type of a gcc2
2187     builtin and then its argument prototype would still apply.  */
2188 char $ac_func();
2189
2190 int main() { return 0; }
2191 int t() {
2192
2193 /* The GNU C library defines this for functions which it implements
2194     to always fail with ENOSYS.  Some functions are actually named
2195     something starting with __ and the normal name is an alias.  */
2196 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2197 choke me
2198 #else
2199 $ac_func();
2200 #endif
2201
2202 ; return 0; }
2203 EOF
2204 if { (eval echo configure:2205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2205   rm -rf conftest*
2206   eval "ac_cv_func_$ac_func=yes"
2207 else
2208   rm -rf conftest*
2209   eval "ac_cv_func_$ac_func=no"
2210 fi
2211 rm -f conftest*
2212
2213 fi
2214 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2215   echo "$ac_t""yes" 1>&6
2216     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2217   cat >> confdefs.h <<EOF
2218 #define $ac_tr_func 1
2219 EOF
2220  
2221 else
2222   echo "$ac_t""no" 1>&6
2223 fi
2224 done
2225
2226
2227 echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
2228 if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then
2229   echo $ac_n "(cached) $ac_c" 1>&6
2230 else
2231   rm -f conftestdata; > conftestdata
2232 # Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
2233 if test "$cross_compiling" = yes; then
2234   ac_cv_func_utime_null=no
2235 else
2236 cat > conftest.$ac_ext <<EOF
2237 #line 2238 "configure"
2238 #include "confdefs.h"
2239 #include <sys/types.h>
2240 #include <sys/stat.h>
2241 main() {
2242 struct stat s, t;
2243 exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
2244 && stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
2245 && t.st_mtime - s.st_mtime < 120));
2246 }
2247 EOF
2248 { (eval echo configure:2249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2249 if test -s conftest && (./conftest; exit) 2>/dev/null; then
2250   ac_cv_func_utime_null=yes
2251 else
2252   ac_cv_func_utime_null=no
2253 fi
2254 fi
2255 rm -fr conftest*
2256 rm -f core core.* *.core
2257 fi
2258
2259 echo "$ac_t""$ac_cv_func_utime_null" 1>&6
2260 if test $ac_cv_func_utime_null = yes; then
2261   cat >> confdefs.h <<\EOF
2262 #define HAVE_UTIME_NULL 1
2263 EOF
2264
2265 fi
2266
2267 echo $ac_n "checking for long file names""... $ac_c" 1>&6
2268 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
2269   echo $ac_n "(cached) $ac_c" 1>&6
2270 else
2271   ac_cv_sys_long_file_names=yes
2272 # Test for long file names in all the places we know might matter:
2273 #      .                the current directory, where building will happen
2274 #      /tmp             where it might want to write temporary files
2275 #      /var/tmp         likewise
2276 #      /usr/tmp         likewise
2277 #      $prefix/lib      where we will be installing things
2278 #      $exec_prefix/lib likewise
2279 # eval it to expand exec_prefix.
2280 for ac_dir in `eval echo . /tmp /var/tmp /usr/tmp $prefix/lib $exec_prefix/lib` ; do
2281   test -d $ac_dir || continue
2282   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2283   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
2284   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
2285   val=`cat $ac_dir/conftest9012345 2>/dev/null`
2286   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
2287     ac_cv_sys_long_file_names=no
2288     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
2289     break
2290   fi
2291   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
2292 done
2293 fi
2294
2295 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
2296 if test $ac_cv_sys_long_file_names = yes; then
2297   cat >> confdefs.h <<\EOF
2298 #define HAVE_LONG_FILE_NAMES 1
2299 EOF
2300
2301 fi
2302
2303
2304 echo $ac_n "checking for working fnmatch function""... $ac_c" 1>&6
2305 if eval "test \"`echo '$''{'ccvs_cv_sys_working_fnmatch'+set}'`\" = set"; then
2306   echo $ac_n "(cached) $ac_c" 1>&6
2307 else
2308   if test "$cross_compiling" = yes; then
2309   ccvs_cv_sys_working_fnmatch=no
2310 else
2311 cat > conftest.$ac_ext <<EOF
2312 #line 2313 "configure"
2313 #include "confdefs.h"
2314
2315 #include <fnmatch.h>
2316 int
2317 main ()
2318 {
2319   exit ((fnmatch ("a", "a", FNM_PATHNAME) == 0
2320          && fnmatch ("a", "b", FNM_PATHNAME) == FNM_NOMATCH)
2321         ? 0 : 1);
2322 }
2323 EOF
2324 { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2325 if test -s conftest && (./conftest; exit) 2>/dev/null; then
2326   ccvs_cv_sys_working_fnmatch=yes
2327 else
2328   ccvs_cv_sys_working_fnmatch=no
2329 fi
2330 fi
2331 rm -fr conftest*
2332 fi
2333
2334 if test $ccvs_cv_sys_working_fnmatch = no; then
2335   LIBOBJS="$LIBOBJS fnmatch.o"
2336 fi
2337 echo "$ac_t""$ccvs_cv_sys_working_fnmatch" 1>&6
2338
2339 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
2340 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
2341 # libsocket.so which has a bad implementation of gethostbyname (it
2342 # only looks in /etc/hosts), so we only look for -lsocket if we need
2343 # it.
2344 echo $ac_n "checking for connect""... $ac_c" 1>&6
2345 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2346   echo $ac_n "(cached) $ac_c" 1>&6
2347 else
2348   cat > conftest.$ac_ext <<EOF
2349 #line 2350 "configure"
2350 #include "confdefs.h"
2351 /* System header to define __stub macros and hopefully few prototypes,
2352     which can conflict with char connect(); below.  */
2353 #include <assert.h>
2354 /* Override any gcc2 internal prototype to avoid an error.  */
2355 /* We use char because int might match the return type of a gcc2
2356     builtin and then its argument prototype would still apply.  */
2357 char connect();
2358
2359 int main() { return 0; }
2360 int t() {
2361
2362 /* The GNU C library defines this for functions which it implements
2363     to always fail with ENOSYS.  Some functions are actually named
2364     something starting with __ and the normal name is an alias.  */
2365 #if defined (__stub_connect) || defined (__stub___connect)
2366 choke me
2367 #else
2368 connect();
2369 #endif
2370
2371 ; return 0; }
2372 EOF
2373 if { (eval echo configure:2374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2374   rm -rf conftest*
2375   eval "ac_cv_func_connect=yes"
2376 else
2377   rm -rf conftest*
2378   eval "ac_cv_func_connect=no"
2379 fi
2380 rm -f conftest*
2381
2382 fi
2383 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2384   echo "$ac_t""yes" 1>&6
2385   :
2386 else
2387   echo "$ac_t""no" 1>&6
2388 case "$LIBS" in
2389 *-lnsl*) ;;
2390 *) echo $ac_n "checking for -lnsl_s""... $ac_c" 1>&6
2391 ac_lib_var=`echo nsl_s'_'printf | tr './+\055' '__p_'`
2392 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2393   echo $ac_n "(cached) $ac_c" 1>&6
2394 else
2395   ac_save_LIBS="$LIBS"
2396 LIBS="-lnsl_s  $LIBS"
2397 cat > conftest.$ac_ext <<EOF
2398 #line 2399 "configure"
2399 #include "confdefs.h"
2400 /* Override any gcc2 internal prototype to avoid an error.  */
2401 /* We use char because int might match the return type of a gcc2
2402     builtin and then its argument prototype would still apply.  */
2403 char printf();
2404
2405 int main() { return 0; }
2406 int t() {
2407 printf()
2408 ; return 0; }
2409 EOF
2410 if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2411   rm -rf conftest*
2412   eval "ac_cv_lib_$ac_lib_var=yes"
2413 else
2414   rm -rf conftest*
2415   eval "ac_cv_lib_$ac_lib_var=no"
2416 fi
2417 rm -f conftest*
2418 LIBS="$ac_save_LIBS"
2419
2420 fi
2421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2422   echo "$ac_t""yes" 1>&6
2423     ac_tr_lib=HAVE_LIB`echo nsl_s | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2424   cat >> confdefs.h <<EOF
2425 #define $ac_tr_lib 1
2426 EOF
2427
2428   LIBS="-lnsl_s $LIBS"
2429
2430 else
2431   echo "$ac_t""no" 1>&6
2432 fi
2433  ;;
2434 esac
2435 case "$LIBS" in
2436 *-lnsl*) ;;
2437 *) echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
2438 ac_lib_var=`echo nsl'_'printf | tr './+\055' '__p_'`
2439 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2440   echo $ac_n "(cached) $ac_c" 1>&6
2441 else
2442   ac_save_LIBS="$LIBS"
2443 LIBS="-lnsl  $LIBS"
2444 cat > conftest.$ac_ext <<EOF
2445 #line 2446 "configure"
2446 #include "confdefs.h"
2447 /* Override any gcc2 internal prototype to avoid an error.  */
2448 /* We use char because int might match the return type of a gcc2
2449     builtin and then its argument prototype would still apply.  */
2450 char printf();
2451
2452 int main() { return 0; }
2453 int t() {
2454 printf()
2455 ; return 0; }
2456 EOF
2457 if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2458   rm -rf conftest*
2459   eval "ac_cv_lib_$ac_lib_var=yes"
2460 else
2461   rm -rf conftest*
2462   eval "ac_cv_lib_$ac_lib_var=no"
2463 fi
2464 rm -f conftest*
2465 LIBS="$ac_save_LIBS"
2466
2467 fi
2468 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2469   echo "$ac_t""yes" 1>&6
2470     ac_tr_lib=HAVE_LIB`echo nsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2471   cat >> confdefs.h <<EOF
2472 #define $ac_tr_lib 1
2473 EOF
2474
2475   LIBS="-lnsl $LIBS"
2476
2477 else
2478   echo "$ac_t""no" 1>&6
2479 fi
2480  ;;
2481 esac
2482 case "$LIBS" in
2483 *-lsocket*) ;;
2484 *) echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
2485 ac_lib_var=`echo socket'_'connect | tr './+\055' '__p_'`
2486 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2487   echo $ac_n "(cached) $ac_c" 1>&6
2488 else
2489   ac_save_LIBS="$LIBS"
2490 LIBS="-lsocket  $LIBS"
2491 cat > conftest.$ac_ext <<EOF
2492 #line 2493 "configure"
2493 #include "confdefs.h"
2494 /* Override any gcc2 internal prototype to avoid an error.  */
2495 /* We use char because int might match the return type of a gcc2
2496     builtin and then its argument prototype would still apply.  */
2497 char connect();
2498
2499 int main() { return 0; }
2500 int t() {
2501 connect()
2502 ; return 0; }
2503 EOF
2504 if { (eval echo configure:2505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2505   rm -rf conftest*
2506   eval "ac_cv_lib_$ac_lib_var=yes"
2507 else
2508   rm -rf conftest*
2509   eval "ac_cv_lib_$ac_lib_var=no"
2510 fi
2511 rm -f conftest*
2512 LIBS="$ac_save_LIBS"
2513
2514 fi
2515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2516   echo "$ac_t""yes" 1>&6
2517     ac_tr_lib=HAVE_LIB`echo socket | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2518   cat >> confdefs.h <<EOF
2519 #define $ac_tr_lib 1
2520 EOF
2521
2522   LIBS="-lsocket $LIBS"
2523
2524 else
2525   echo "$ac_t""no" 1>&6
2526 fi
2527  ;;
2528 esac
2529 case "$LIBS" in
2530 *-linet*) ;;
2531 *) echo $ac_n "checking for -linet""... $ac_c" 1>&6
2532 ac_lib_var=`echo inet'_'connect | tr './+\055' '__p_'`
2533 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2534   echo $ac_n "(cached) $ac_c" 1>&6
2535 else
2536   ac_save_LIBS="$LIBS"
2537 LIBS="-linet  $LIBS"
2538 cat > conftest.$ac_ext <<EOF
2539 #line 2540 "configure"
2540 #include "confdefs.h"
2541 /* Override any gcc2 internal prototype to avoid an error.  */
2542 /* We use char because int might match the return type of a gcc2
2543     builtin and then its argument prototype would still apply.  */
2544 char connect();
2545
2546 int main() { return 0; }
2547 int t() {
2548 connect()
2549 ; return 0; }
2550 EOF
2551 if { (eval echo configure:2552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2552   rm -rf conftest*
2553   eval "ac_cv_lib_$ac_lib_var=yes"
2554 else
2555   rm -rf conftest*
2556   eval "ac_cv_lib_$ac_lib_var=no"
2557 fi
2558 rm -f conftest*
2559 LIBS="$ac_save_LIBS"
2560
2561 fi
2562 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2563   echo "$ac_t""yes" 1>&6
2564     ac_tr_lib=HAVE_LIB`echo inet | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2565   cat >> confdefs.h <<EOF
2566 #define $ac_tr_lib 1
2567 EOF
2568
2569   LIBS="-linet $LIBS"
2570
2571 else
2572   echo "$ac_t""no" 1>&6
2573 fi
2574  ;;
2575 esac
2576 if test "$ac_cv_lib_socket_connect" = "yes" || test "$ac_cv_lib_inet_connect" = "yes"; then
2577   ac_cv_func_connect=yes
2578   cat >> confdefs.h <<\EOF
2579 #define HAVE_CONNECT 1
2580 EOF
2581
2582 fi
2583 fi
2584
2585
2586 KRB4=/usr/kerberos
2587
2588 # Check whether --with-krb4 or --without-krb4 was given.
2589 if test "${with_krb4+set}" = set; then
2590   withval="$with_krb4"
2591   KRB4=$withval
2592 fi
2593 echo "default place for krb4 is $KRB4"
2594
2595
2596 krb_h=
2597 echo $ac_n "checking for krb.h""... $ac_c" 1>&6
2598 if test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then
2599    hold_cflags=$CFLAGS
2600    CFLAGS="$CFLAGS -I$KRB4/include"
2601    cat > conftest.$ac_ext <<EOF
2602 #line 2603 "configure"
2603 #include "confdefs.h"
2604 #include <krb.h>
2605 int main() { return 0; }
2606 int t() {
2607 int i;
2608 ; return 0; }
2609 EOF
2610 if { (eval echo configure:2611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2611   rm -rf conftest*
2612   krb_h=yes krb_incdir=$KRB4/include
2613 else
2614   rm -rf conftest*
2615   CFLAGS=$hold_cflags
2616            cat > conftest.$ac_ext <<EOF
2617 #line 2618 "configure"
2618 #include "confdefs.h"
2619 #include <krb.h>
2620 int main() { return 0; }
2621 int t() {
2622 int i;
2623 ; return 0; }
2624 EOF
2625 if { (eval echo configure:2626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2626   rm -rf conftest*
2627   krb_h=yes krb_incdir=
2628 fi
2629 rm -f conftest*
2630
2631 fi
2632 rm -f conftest*
2633
2634    CFLAGS=$hold_cflags
2635 else
2636    cat > conftest.$ac_ext <<EOF
2637 #line 2638 "configure"
2638 #include "confdefs.h"
2639 #include <krb.h>
2640 int main() { return 0; }
2641 int t() {
2642 int i;
2643 ; return 0; }
2644 EOF
2645 if { (eval echo configure:2646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2646   rm -rf conftest*
2647   krb_h=yes krb_incdir=
2648 fi
2649 rm -f conftest*
2650
2651 fi
2652 if test -z "$krb_h"; then
2653   cat > conftest.$ac_ext <<EOF
2654 #line 2655 "configure"
2655 #include "confdefs.h"
2656 #include <krb.h>
2657 int main() { return 0; }
2658 int t() {
2659 int i;
2660 ; return 0; }
2661 EOF
2662 if { (eval echo configure:2663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2663   rm -rf conftest*
2664   krb_h=yes krb_incdir=
2665 else
2666   rm -rf conftest*
2667   if test "$cross_compiling" != yes && test -r $KRB4/include/kerberosIV/krb.h; then
2668        hold_cflags=$CFLAGS
2669        CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV"
2670        cat > conftest.$ac_ext <<EOF
2671 #line 2672 "configure"
2672 #include "confdefs.h"
2673 #include <krb.h>
2674 int main() { return 0; }
2675 int t() {
2676 int i;
2677 ; return 0; }
2678 EOF
2679 if { (eval echo configure:2680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2680   rm -rf conftest*
2681   krb_h=yes krb_incdir=$KRB4/include/kerberosIV
2682 fi
2683 rm -f conftest*
2684
2685        CFLAGS=$hold_cflags
2686      fi
2687 fi
2688 rm -f conftest*
2689
2690 fi
2691 echo "$ac_t""$krb_h" 1>&6
2692
2693 includeopt=
2694
2695 if test -n "$krb_h"; then
2696   krb_lib=
2697   if test "$cross_compiling" != yes && test -r $KRB4/lib/libkrb.a; then
2698        hold_ldflags=$LDFLAGS
2699        LDFLAGS="-L${KRB4}/lib $LDFLAGS"
2700        echo $ac_n "checking for -lkrb""... $ac_c" 1>&6
2701 ac_lib_var=`echo krb'_'printf | tr './+\055' '__p_'`
2702 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2703   echo $ac_n "(cached) $ac_c" 1>&6
2704 else
2705   ac_save_LIBS="$LIBS"
2706 LIBS="-lkrb  $LIBS"
2707 cat > conftest.$ac_ext <<EOF
2708 #line 2709 "configure"
2709 #include "confdefs.h"
2710 /* Override any gcc2 internal prototype to avoid an error.  */
2711 /* We use char because int might match the return type of a gcc2
2712     builtin and then its argument prototype would still apply.  */
2713 char printf();
2714
2715 int main() { return 0; }
2716 int t() {
2717 printf()
2718 ; return 0; }
2719 EOF
2720 if { (eval echo configure:2721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2721   rm -rf conftest*
2722   eval "ac_cv_lib_$ac_lib_var=yes"
2723 else
2724   rm -rf conftest*
2725   eval "ac_cv_lib_$ac_lib_var=no"
2726 fi
2727 rm -f conftest*
2728 LIBS="$ac_save_LIBS"
2729
2730 fi
2731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2732   echo "$ac_t""yes" 1>&6
2733   krb_lib=yes krb_libdir=${KRB4}/lib
2734 else
2735   echo "$ac_t""no" 1>&6
2736 LDFLAGS=$hold_ldflags
2737             # Using open here instead of printf so we don't
2738             # get confused by the cached value for printf from above.
2739             echo $ac_n "checking for -lkrb""... $ac_c" 1>&6
2740 ac_lib_var=`echo krb'_'open | tr './+\055' '__p_'`
2741 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2742   echo $ac_n "(cached) $ac_c" 1>&6
2743 else
2744   ac_save_LIBS="$LIBS"
2745 LIBS="-lkrb  $LIBS"
2746 cat > conftest.$ac_ext <<EOF
2747 #line 2748 "configure"
2748 #include "confdefs.h"
2749 /* Override any gcc2 internal prototype to avoid an error.  */
2750 /* We use char because int might match the return type of a gcc2
2751     builtin and then its argument prototype would still apply.  */
2752 char open();
2753
2754 int main() { return 0; }
2755 int t() {
2756 open()
2757 ; return 0; }
2758 EOF
2759 if { (eval echo configure:2760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2760   rm -rf conftest*
2761   eval "ac_cv_lib_$ac_lib_var=yes"
2762 else
2763   rm -rf conftest*
2764   eval "ac_cv_lib_$ac_lib_var=no"
2765 fi
2766 rm -f conftest*
2767 LIBS="$ac_save_LIBS"
2768
2769 fi
2770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2771   echo "$ac_t""yes" 1>&6
2772   krb_lib=yes krb_libdir=
2773 else
2774   echo "$ac_t""no" 1>&6
2775 fi
2776
2777 fi
2778
2779        LDFLAGS=$hold_ldflags
2780   else
2781        echo $ac_n "checking for -lkrb""... $ac_c" 1>&6
2782 ac_lib_var=`echo krb'_'printf | tr './+\055' '__p_'`
2783 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2784   echo $ac_n "(cached) $ac_c" 1>&6
2785 else
2786   ac_save_LIBS="$LIBS"
2787 LIBS="-lkrb  $LIBS"
2788 cat > conftest.$ac_ext <<EOF
2789 #line 2790 "configure"
2790 #include "confdefs.h"
2791 /* Override any gcc2 internal prototype to avoid an error.  */
2792 /* We use char because int might match the return type of a gcc2
2793     builtin and then its argument prototype would still apply.  */
2794 char printf();
2795
2796 int main() { return 0; }
2797 int t() {
2798 printf()
2799 ; return 0; }
2800 EOF
2801 if { (eval echo configure:2802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2802   rm -rf conftest*
2803   eval "ac_cv_lib_$ac_lib_var=yes"
2804 else
2805   rm -rf conftest*
2806   eval "ac_cv_lib_$ac_lib_var=no"
2807 fi
2808 rm -f conftest*
2809 LIBS="$ac_save_LIBS"
2810
2811 fi
2812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2813   echo "$ac_t""yes" 1>&6
2814   krb_lib=yes krb_libdir=
2815 else
2816   echo "$ac_t""no" 1>&6
2817 fi
2818
2819   fi
2820   if test -n "$krb_lib"; then
2821     cat >> confdefs.h <<\EOF
2822 #define HAVE_KERBEROS 1
2823 EOF
2824
2825     test -n "${krb_libdir}" && LIBS="${LIBS} -L${krb_libdir}"
2826     LIBS="${LIBS} -lkrb"
2827     # Put -L${krb_libdir} in LDFLAGS temporarily so that it appears before
2828     # -ldes in the command line.  Don't do it permanently so that we honor
2829     # the user's setting for LDFLAGS
2830     hold_ldflags=$LDFLAGS
2831     test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}"
2832     echo $ac_n "checking for -ldes""... $ac_c" 1>&6
2833 ac_lib_var=`echo des'_'printf | tr './+\055' '__p_'`
2834 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2835   echo $ac_n "(cached) $ac_c" 1>&6
2836 else
2837   ac_save_LIBS="$LIBS"
2838 LIBS="-ldes  $LIBS"
2839 cat > conftest.$ac_ext <<EOF
2840 #line 2841 "configure"
2841 #include "confdefs.h"
2842 /* Override any gcc2 internal prototype to avoid an error.  */
2843 /* We use char because int might match the return type of a gcc2
2844     builtin and then its argument prototype would still apply.  */
2845 char printf();
2846
2847 int main() { return 0; }
2848 int t() {
2849 printf()
2850 ; return 0; }
2851 EOF
2852 if { (eval echo configure:2853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2853   rm -rf conftest*
2854   eval "ac_cv_lib_$ac_lib_var=yes"
2855 else
2856   rm -rf conftest*
2857   eval "ac_cv_lib_$ac_lib_var=no"
2858 fi
2859 rm -f conftest*
2860 LIBS="$ac_save_LIBS"
2861
2862 fi
2863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2864   echo "$ac_t""yes" 1>&6
2865   LIBS="${LIBS} -ldes"
2866 else
2867   echo "$ac_t""no" 1>&6
2868 fi
2869
2870     LDFLAGS=$hold_ldflags
2871     if test -n "$krb_incdir"; then
2872       includeopt="${includeopt} -I$krb_incdir"
2873     fi
2874   fi
2875 fi
2876 for ac_func in krb_get_err_text
2877 do
2878 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2879 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2880   echo $ac_n "(cached) $ac_c" 1>&6
2881 else
2882   cat > conftest.$ac_ext <<EOF
2883 #line 2884 "configure"
2884 #include "confdefs.h"
2885 /* System header to define __stub macros and hopefully few prototypes,
2886     which can conflict with char $ac_func(); below.  */
2887 #include <assert.h>
2888 /* Override any gcc2 internal prototype to avoid an error.  */
2889 /* We use char because int might match the return type of a gcc2
2890     builtin and then its argument prototype would still apply.  */
2891 char $ac_func();
2892
2893 int main() { return 0; }
2894 int t() {
2895
2896 /* The GNU C library defines this for functions which it implements
2897     to always fail with ENOSYS.  Some functions are actually named
2898     something starting with __ and the normal name is an alias.  */
2899 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2900 choke me
2901 #else
2902 $ac_func();
2903 #endif
2904
2905 ; return 0; }
2906 EOF
2907 if { (eval echo configure:2908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2908   rm -rf conftest*
2909   eval "ac_cv_func_$ac_func=yes"
2910 else
2911   rm -rf conftest*
2912   eval "ac_cv_func_$ac_func=no"
2913 fi
2914 rm -f conftest*
2915
2916 fi
2917 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2918   echo "$ac_t""yes" 1>&6
2919     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2920   cat >> confdefs.h <<EOF
2921 #define $ac_tr_func 1
2922 EOF
2923  
2924 else
2925   echo "$ac_t""no" 1>&6
2926 fi
2927 done
2928
2929
2930 GSSAPI=/usr/cygnus/kerbnet
2931
2932 # Check whether --with-gssapi or --without-gssapi was given.
2933 if test "${with_gssapi+set}" = set; then
2934   withval="$with_gssapi"
2935   GSSAPI=$withval
2936 fi
2937 echo "default place for GSSAPI is $GSSAPI"
2938
2939
2940 hold_cppflags=$CPPFLAGS
2941 CPPFLAGS="$CPPFLAGS -I$GSSAPI/include "
2942 for ac_hdr in gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h
2943 do
2944 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2945 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2946 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2947   echo $ac_n "(cached) $ac_c" 1>&6
2948 else
2949   cat > conftest.$ac_ext <<EOF
2950 #line 2951 "configure"
2951 #include "confdefs.h"
2952 #include <$ac_hdr>
2953 EOF
2954 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2955 { (eval echo configure:2956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2956 ac_err=`grep -v '^ *+' conftest.out`
2957 if test -z "$ac_err"; then
2958   rm -rf conftest*
2959   eval "ac_cv_header_$ac_safe=yes"
2960 else
2961   echo "$ac_err" >&5
2962   rm -rf conftest*
2963   eval "ac_cv_header_$ac_safe=no"
2964 fi
2965 rm -f conftest*
2966 fi
2967 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2968   echo "$ac_t""yes" 1>&6
2969     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2970   cat >> confdefs.h <<EOF
2971 #define $ac_tr_hdr 1
2972 EOF
2973  
2974 else
2975   echo "$ac_t""no" 1>&6
2976 fi
2977 done
2978
2979 CPPFLAGS=$hold_cppflags
2980
2981 if test "$ac_cv_header_gssapi_h" = "yes" || test "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
2982   cat >> confdefs.h <<\EOF
2983 #define HAVE_GSSAPI 1
2984 EOF
2985
2986   includeopt="${includeopt} -I$GSSAPI/include"
2987   # FIXME: This is ugly, but these things don't seem to be standardized.
2988   if test "$ac_cv_header_gssapi_h" = "yes"; then
2989     LIBS="$LIBS -L$GSSAPI/lib -lgssapi -lkrb5 -lasn1 -ldes -lroken"
2990   else
2991     LIBS="$LIBS -L$GSSAPI/lib -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err"
2992   fi
2993   save_CPPFLAGS=$CPPFLAGS
2994   CPPFLAGS="-I$GSSAPI/include $CPPFLAGS"
2995   if test "$ac_cv_header_gssapi_h" = "yes"; then
2996     cat > conftest.$ac_ext <<EOF
2997 #line 2998 "configure"
2998 #include "confdefs.h"
2999 #include <gssapi.h>
3000 EOF
3001 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3002   egrep "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
3003   rm -rf conftest*
3004   cat >> confdefs.h <<\EOF
3005 #define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1
3006 EOF
3007
3008 fi
3009 rm -f conftest*
3010
3011   else
3012     cat > conftest.$ac_ext <<EOF
3013 #line 3014 "configure"
3014 #include "confdefs.h"
3015 #include <gssapi/gssapi.h>
3016 EOF
3017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3018   egrep "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
3019   rm -rf conftest*
3020   cat >> confdefs.h <<\EOF
3021 #define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1
3022 EOF
3023
3024 fi
3025 rm -f conftest*
3026
3027   fi
3028   CPPFLAGS=$save_CPPFLAGS
3029   # This is necessary on Irix 5.3, in order to link against libkrb5 --
3030   # there, an_to_ln.o refers to things defined only in -lgen.
3031   echo $ac_n "checking for -lgen""... $ac_c" 1>&6
3032 ac_lib_var=`echo gen'_'compile | tr './+\055' '__p_'`
3033 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3034   echo $ac_n "(cached) $ac_c" 1>&6
3035 else
3036   ac_save_LIBS="$LIBS"
3037 LIBS="-lgen  $LIBS"
3038 cat > conftest.$ac_ext <<EOF
3039 #line 3040 "configure"
3040 #include "confdefs.h"
3041 /* Override any gcc2 internal prototype to avoid an error.  */
3042 /* We use char because int might match the return type of a gcc2
3043     builtin and then its argument prototype would still apply.  */
3044 char compile();
3045
3046 int main() { return 0; }
3047 int t() {
3048 compile()
3049 ; return 0; }
3050 EOF
3051 if { (eval echo configure:3052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3052   rm -rf conftest*
3053   eval "ac_cv_lib_$ac_lib_var=yes"
3054 else
3055   rm -rf conftest*
3056   eval "ac_cv_lib_$ac_lib_var=no"
3057 fi
3058 rm -f conftest*
3059 LIBS="$ac_save_LIBS"
3060
3061 fi
3062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3063   echo "$ac_t""yes" 1>&6
3064     ac_tr_lib=HAVE_LIB`echo gen | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3065   cat >> confdefs.h <<EOF
3066 #define $ac_tr_lib 1
3067 EOF
3068
3069   LIBS="-lgen $LIBS"
3070
3071 else
3072   echo "$ac_t""no" 1>&6
3073 fi
3074
3075 fi
3076
3077 # Check whether --enable-encryption or --disable-encryption was given.
3078 if test "${enable_encryption+set}" = set; then
3079   enableval="$enable_encryption"
3080   case "${enableval}" in
3081     yes) encryption=true ;;
3082     no) encryption=false ;;
3083     *) { echo "configure: error: bad value ${enableval} for encryption option" 1>&2; exit 1; } ;;
3084    esac
3085 else
3086   encryption=false
3087 fi
3088
3089 if test "$encryption" = "true"; then
3090   cat >> confdefs.h <<\EOF
3091 #define ENCRYPTION 1
3092 EOF
3093
3094 fi
3095
3096 echo $ac_n "checking for gethostname""... $ac_c" 1>&6
3097 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
3098   echo $ac_n "(cached) $ac_c" 1>&6
3099 else
3100   cat > conftest.$ac_ext <<EOF
3101 #line 3102 "configure"
3102 #include "confdefs.h"
3103 /* System header to define __stub macros and hopefully few prototypes,
3104     which can conflict with char gethostname(); below.  */
3105 #include <assert.h>
3106 /* Override any gcc2 internal prototype to avoid an error.  */
3107 /* We use char because int might match the return type of a gcc2
3108     builtin and then its argument prototype would still apply.  */
3109 char gethostname();
3110
3111 int main() { return 0; }
3112 int t() {
3113
3114 /* The GNU C library defines this for functions which it implements
3115     to always fail with ENOSYS.  Some functions are actually named
3116     something starting with __ and the normal name is an alias.  */
3117 #if defined (__stub_gethostname) || defined (__stub___gethostname)
3118 choke me
3119 #else
3120 gethostname();
3121 #endif
3122
3123 ; return 0; }
3124 EOF
3125 if { (eval echo configure:3126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3126   rm -rf conftest*
3127   eval "ac_cv_func_gethostname=yes"
3128 else
3129   rm -rf conftest*
3130   eval "ac_cv_func_gethostname=no"
3131 fi
3132 rm -f conftest*
3133
3134 fi
3135 if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
3136   echo "$ac_t""yes" 1>&6
3137   :
3138 else
3139   echo "$ac_t""no" 1>&6
3140 LIBOBJS="$LIBOBJS hostname.o"
3141 fi
3142
3143
3144 # Check for options requesting client and server feature. If none are
3145 # given and we have connect(), we want the full client & server arrangement.
3146 # Check whether --enable-client or --disable-client was given.
3147 if test "${enable_client+set}" = set; then
3148   enableval="$enable_client"
3149   if test "$enable_client" = yes; then
3150   cat >> confdefs.h <<\EOF
3151 #define CLIENT_SUPPORT 1
3152 EOF
3153
3154 fi
3155 else
3156   if test "$ac_cv_func_connect" = yes; then
3157   cat >> confdefs.h <<\EOF
3158 #define CLIENT_SUPPORT 1
3159 EOF
3160
3161 fi
3162 fi
3163
3164 # Check whether --enable-server or --disable-server was given.
3165 if test "${enable_server+set}" = set; then
3166   enableval="$enable_server"
3167   if test "$enable_server" = yes; then
3168   cat >> confdefs.h <<\EOF
3169 #define SERVER_SUPPORT 1
3170 EOF
3171
3172 fi
3173 else
3174   if test "$ac_cv_func_connect" = yes; then
3175   cat >> confdefs.h <<\EOF
3176 #define SERVER_SUPPORT 1
3177 EOF
3178
3179   enable_server=yes
3180 fi
3181 fi
3182
3183
3184 ### The auth server needs to be able to check passwords against passwd
3185 ### file entries, so we only #define AUTH_SERVER_SUPPORT if we can
3186 ### find the crypt function. 
3187 ###
3188 ### We used to test for crypt in libc first, and only add -lcrypt if
3189 ### we couldn't find it, but that interacts badly with the cache
3190 ### variables, the 'unset' command isn't portable, and I'm not sure
3191 ### there's any harm in just testing for -lcrypt first.
3192
3193 if test "$enable_server" = yes; then
3194 echo $ac_n "checking for -lcrypt""... $ac_c" 1>&6
3195 ac_lib_var=`echo crypt'_'crypt | tr './+\055' '__p_'`
3196 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3197   echo $ac_n "(cached) $ac_c" 1>&6
3198 else
3199   ac_save_LIBS="$LIBS"
3200 LIBS="-lcrypt  $LIBS"
3201 cat > conftest.$ac_ext <<EOF
3202 #line 3203 "configure"
3203 #include "confdefs.h"
3204 /* Override any gcc2 internal prototype to avoid an error.  */
3205 /* We use char because int might match the return type of a gcc2
3206     builtin and then its argument prototype would still apply.  */
3207 char crypt();
3208
3209 int main() { return 0; }
3210 int t() {
3211 crypt()
3212 ; return 0; }
3213 EOF
3214 if { (eval echo configure:3215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3215   rm -rf conftest*
3216   eval "ac_cv_lib_$ac_lib_var=yes"
3217 else
3218   rm -rf conftest*
3219   eval "ac_cv_lib_$ac_lib_var=no"
3220 fi
3221 rm -f conftest*
3222 LIBS="$ac_save_LIBS"
3223
3224 fi
3225 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3226   echo "$ac_t""yes" 1>&6
3227     ac_tr_lib=HAVE_LIB`echo crypt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3228   cat >> confdefs.h <<EOF
3229 #define $ac_tr_lib 1
3230 EOF
3231
3232   LIBS="-lcrypt $LIBS"
3233
3234 else
3235   echo "$ac_t""no" 1>&6
3236 fi
3237
3238 for ac_func in crypt
3239 do
3240 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3241 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3242   echo $ac_n "(cached) $ac_c" 1>&6
3243 else
3244   cat > conftest.$ac_ext <<EOF
3245 #line 3246 "configure"
3246 #include "confdefs.h"
3247 /* System header to define __stub macros and hopefully few prototypes,
3248     which can conflict with char $ac_func(); below.  */
3249 #include <assert.h>
3250 /* Override any gcc2 internal prototype to avoid an error.  */
3251 /* We use char because int might match the return type of a gcc2
3252     builtin and then its argument prototype would still apply.  */
3253 char $ac_func();
3254
3255 int main() { return 0; }
3256 int t() {
3257
3258 /* The GNU C library defines this for functions which it implements
3259     to always fail with ENOSYS.  Some functions are actually named
3260     something starting with __ and the normal name is an alias.  */
3261 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3262 choke me
3263 #else
3264 $ac_func();
3265 #endif
3266
3267 ; return 0; }
3268 EOF
3269 if { (eval echo configure:3270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3270   rm -rf conftest*
3271   eval "ac_cv_func_$ac_func=yes"
3272 else
3273   rm -rf conftest*
3274   eval "ac_cv_func_$ac_func=no"
3275 fi
3276 rm -f conftest*
3277
3278 fi
3279 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3280   echo "$ac_t""yes" 1>&6
3281     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3282   cat >> confdefs.h <<EOF
3283 #define $ac_tr_func 1
3284 EOF
3285  
3286 else
3287   echo "$ac_t""no" 1>&6
3288 fi
3289 done
3290
3291
3292 if test "$ac_cv_func_crypt" = yes; then
3293   cat >> confdefs.h <<\EOF
3294 #define AUTH_SERVER_SUPPORT 1
3295 EOF
3296
3297 fi
3298 fi # enable_server
3299
3300 cat >> confdefs.h <<\EOF
3301 #define PRESERVE_PERMISSIONS_SUPPORT 1
3302 EOF
3303
3304
3305 echo $ac_n "checking for cygwin32""... $ac_c" 1>&6
3306 if eval "test \"`echo '$''{'ccvs_cv_sys_cygwin32'+set}'`\" = set"; then
3307   echo $ac_n "(cached) $ac_c" 1>&6
3308 else
3309   cat > conftest.$ac_ext <<EOF
3310 #line 3311 "configure"
3311 #include "confdefs.h"
3312
3313 int main() { return 0; }
3314 int t() {
3315 return __CYGWIN32__;
3316 ; return 0; }
3317 EOF
3318 if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3319   rm -rf conftest*
3320   ccvs_cv_sys_cygwin32=yes
3321 else
3322   rm -rf conftest*
3323   ccvs_cv_sys_cygwin32=no
3324 fi
3325 rm -f conftest*
3326
3327 fi
3328
3329 echo "$ac_t""$ccvs_cv_sys_cygwin32" 1>&6
3330 if test $ccvs_cv_sys_cygwin32 = yes; then
3331   LIBOBJS="$LIBOBJS fncase.o"
3332   LIBS="$LIBS -ladvapi32"
3333
3334         cat >> confdefs.h <<\EOF
3335 #define UTIME_EXPECTS_WRITABLE 1
3336 EOF
3337
3338
3339       cat >> confdefs.h <<\EOF
3340 #define USE_SETMODE_STDOUT 1
3341 EOF
3342
3343   cat >> confdefs.h <<\EOF
3344 #define HAVE_SETMODE 1
3345 EOF
3346
3347 fi
3348
3349 test -f src/options.h && (
3350   echo "configure: warning: saving ./src/options.h in ./src/options.h-SAVED" 1>&2
3351   echo "configure: warning: You may wish to check that local options have not been lost." 1>&2
3352   echo "configure: warning: Do not re-run ./configure or ./config.status until you have...." 1>&2
3353   cp ./src/options.h ./src/options.h-SAVED
3354 )
3355
3356 trap '' 1 2 15
3357 cat > confcache <<\EOF
3358 # This file is a shell script that caches the results of configure
3359 # tests run on this system so they can be shared between configure
3360 # scripts and configure runs.  It is not useful on other systems.
3361 # If it contains results you don't want to keep, you may remove or edit it.
3362 #
3363 # By default, configure uses ./config.cache as the cache file,
3364 # creating it if it does not exist already.  You can give configure
3365 # the --cache-file=FILE option to use a different cache file; that is
3366 # what configure does when it calls configure scripts in
3367 # subdirectories, so they share the cache.
3368 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3369 # config.status only pays attention to the cache file if you give it the
3370 # --recheck option to rerun configure.
3371 #
3372 EOF
3373 # Ultrix sh set writes to stderr and can't be redirected directly,
3374 # and sets the high bit in the cache file unless we assign to the vars.
3375 (set) 2>&1 |
3376   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
3377   >> confcache
3378 if cmp -s $cache_file confcache; then
3379   :
3380 else
3381   if test -w $cache_file; then
3382     echo "updating cache $cache_file"
3383     cat confcache > $cache_file
3384   else
3385     echo "not updating unwritable cache $cache_file"
3386   fi
3387 fi
3388 rm -f confcache
3389
3390 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3391
3392 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3393 # Let make expand exec_prefix.
3394 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3395
3396 # Any assignment to VPATH causes Sun make to only execute
3397 # the first set of double-colon rules, so remove it if not needed.
3398 # If there is a colon in the path, we need to keep it.
3399 if test "x$srcdir" = x.; then
3400   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3401 fi
3402
3403 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3404
3405 DEFS=-DHAVE_CONFIG_H
3406
3407 # Without the "./", some shells look in PATH for config.status.
3408 : ${CONFIG_STATUS=./config.status}
3409
3410 echo creating $CONFIG_STATUS
3411 rm -f $CONFIG_STATUS
3412 cat > $CONFIG_STATUS <<EOF
3413 #! /bin/sh
3414 # Generated automatically by configure.
3415 # Run this file to recreate the current configuration.
3416 # This directory was configured as follows,
3417 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3418 #
3419 # $0 $ac_configure_args
3420 #
3421 # Compiler output produced by configure, useful for debugging
3422 # configure, is in ./config.log if it exists.
3423
3424 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3425 for ac_option
3426 do
3427   case "\$ac_option" in
3428   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3429     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3430     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3431   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3432     echo "$CONFIG_STATUS generated by autoconf version 2.10"
3433     exit 0 ;;
3434   -help | --help | --hel | --he | --h)
3435     echo "\$ac_cs_usage"; exit 0 ;;
3436   *) echo "\$ac_cs_usage"; exit 1 ;;
3437   esac
3438 done
3439
3440 ac_given_srcdir=$srcdir
3441 ac_given_INSTALL="$INSTALL"
3442
3443 trap 'rm -fr `echo "Makefile lib/Makefile src/Makefile zlib/Makefile diff/Makefile doc/Makefile \
3444           man/Makefile tools/Makefile tools/pcl-cvs/Makefile \
3445           contrib/Makefile contrib/elib/Makefile \
3446           windows-NT/Makefile windows-NT/SCC/Makefile \
3447           os2/Makefile emx/Makefile macintosh/Makefile vms/Makefile \
3448           stamp-h config.h src/options.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3449 EOF
3450 cat >> $CONFIG_STATUS <<EOF
3451
3452 # Protect against being on the right side of a sed subst in config.status.
3453 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3454  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3455 $ac_vpsub
3456 $extrasub
3457 s%@CFLAGS@%$CFLAGS%g
3458 s%@CPPFLAGS@%$CPPFLAGS%g
3459 s%@CXXFLAGS@%$CXXFLAGS%g
3460 s%@DEFS@%$DEFS%g
3461 s%@LDFLAGS@%$LDFLAGS%g
3462 s%@LIBS@%$LIBS%g
3463 s%@exec_prefix@%$exec_prefix%g
3464 s%@prefix@%$prefix%g
3465 s%@program_transform_name@%$program_transform_name%g
3466 s%@bindir@%$bindir%g
3467 s%@sbindir@%$sbindir%g
3468 s%@libexecdir@%$libexecdir%g
3469 s%@datadir@%$datadir%g
3470 s%@sysconfdir@%$sysconfdir%g
3471 s%@sharedstatedir@%$sharedstatedir%g
3472 s%@localstatedir@%$localstatedir%g
3473 s%@libdir@%$libdir%g
3474 s%@includedir@%$includedir%g
3475 s%@oldincludedir@%$oldincludedir%g
3476 s%@infodir@%$infodir%g
3477 s%@mandir@%$mandir%g
3478 s%@CC@%$CC%g
3479 s%@CPP@%$CPP%g
3480 s%@CVS@%$CVS%g
3481 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3482 s%@INSTALL_DATA@%$INSTALL_DATA%g
3483 s%@RANLIB@%$RANLIB%g
3484 s%@YACC@%$YACC%g
3485 s%@SET_MAKE@%$SET_MAKE%g
3486 s%@perl_path@%$perl_path%g
3487 s%@csh_path@%$csh_path%g
3488 s%@LIBOBJS@%$LIBOBJS%g
3489 s%@KRB4@%$KRB4%g
3490 s%@includeopt@%$includeopt%g
3491 s%@GSSAPI@%$GSSAPI%g
3492
3493 CEOF
3494 EOF
3495 cat >> $CONFIG_STATUS <<EOF
3496
3497 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile src/Makefile zlib/Makefile diff/Makefile doc/Makefile \
3498           man/Makefile tools/Makefile tools/pcl-cvs/Makefile \
3499           contrib/Makefile contrib/elib/Makefile \
3500           windows-NT/Makefile windows-NT/SCC/Makefile \
3501           os2/Makefile emx/Makefile macintosh/Makefile vms/Makefile \
3502           stamp-h"}
3503 EOF
3504 cat >> $CONFIG_STATUS <<\EOF
3505 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3506   # Support "outfile[:infile]", defaulting infile="outfile.in".
3507   case "$ac_file" in
3508   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3509        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3510   *) ac_file_in="${ac_file}.in" ;;
3511   esac
3512
3513   # Adjust relative srcdir, etc. for subdirectories.
3514
3515   # Remove last slash and all that follows it.  Not all systems have dirname.
3516   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3517   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3518     # The file is in a subdirectory.
3519     test ! -d "$ac_dir" && mkdir "$ac_dir"
3520     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3521     # A "../" for each directory in $ac_dir_suffix.
3522     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3523   else
3524     ac_dir_suffix= ac_dots=
3525   fi
3526
3527   case "$ac_given_srcdir" in
3528   .)  srcdir=.
3529       if test -z "$ac_dots"; then top_srcdir=.
3530       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3531   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3532   *) # Relative path.
3533     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3534     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3535   esac
3536
3537   case "$ac_given_INSTALL" in
3538   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3539   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3540   esac
3541   echo creating "$ac_file"
3542   rm -f "$ac_file"
3543   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3544   case "$ac_file" in
3545   *Makefile*) ac_comsub="1i\\
3546 # $configure_input" ;;
3547   *) ac_comsub= ;;
3548   esac
3549   sed -e "$ac_comsub
3550 s%@configure_input@%$configure_input%g
3551 s%@srcdir@%$srcdir%g
3552 s%@top_srcdir@%$top_srcdir%g
3553 s%@INSTALL@%$INSTALL%g
3554 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
3555 fi; done
3556 rm -f conftest.subs
3557
3558 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3559 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3560 #
3561 # ac_d sets the value in "#define NAME VALUE" lines.
3562 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3563 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3564 ac_dC='\3'
3565 ac_dD='%g'
3566 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3567 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3568 ac_uB='\([      ]\)%\1#\2define\3'
3569 ac_uC=' '
3570 ac_uD='\4%g'
3571 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3572 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3573 ac_eB='$%\1#\2define\3'
3574 ac_eC=' '
3575 ac_eD='%g'
3576
3577 CONFIG_HEADERS=${CONFIG_HEADERS-"config.h src/options.h"}
3578 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3579   # Support "outfile[:infile]", defaulting infile="outfile.in".
3580   case "$ac_file" in
3581   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3582        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3583   *) ac_file_in="${ac_file}.in" ;;
3584   esac
3585
3586   echo creating $ac_file
3587
3588   rm -f conftest.frag conftest.in conftest.out
3589   cp $ac_given_srcdir/$ac_file_in conftest.in
3590
3591 EOF
3592
3593 # Transform confdefs.h into a sed script conftest.vals that substitutes
3594 # the proper values into config.h.in to produce config.h.  And first:
3595 # Protect against being on the right side of a sed subst in config.status.
3596 # Protect against being in an unquoted here document in config.status.
3597 rm -f conftest.vals
3598 cat > conftest.hdr <<\EOF
3599 s/[\\&%]/\\&/g
3600 s%[\\$`]%\\&%g
3601 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3602 s%ac_d%ac_u%gp
3603 s%ac_u%ac_e%gp
3604 EOF
3605 sed -n -f conftest.hdr confdefs.h > conftest.vals
3606 rm -f conftest.hdr
3607
3608 # This sed command replaces #undef with comments.  This is necessary, for
3609 # example, in the case of _POSIX_SOURCE, which is predefined and required
3610 # on some systems where configure will not decide to define it.
3611 cat >> conftest.vals <<\EOF
3612 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3613 EOF
3614
3615 # Break up conftest.vals because some shells have a limit on
3616 # the size of here documents, and old seds have small limits too.
3617 # Maximum number of lines to put in a single here document.
3618 ac_max_here_lines=12
3619
3620 rm -f conftest.tail
3621 while :
3622 do
3623   ac_lines=`grep -c . conftest.vals`
3624   # grep -c gives empty output for an empty file on some AIX systems.
3625   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3626   # Write a limited-size here document to conftest.frag.
3627   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3628   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3629   echo 'CEOF
3630   sed -f conftest.frag conftest.in > conftest.out
3631   rm -f conftest.in
3632   mv conftest.out conftest.in
3633 ' >> $CONFIG_STATUS
3634   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3635   rm -f conftest.vals
3636   mv conftest.tail conftest.vals
3637 done
3638 rm -f conftest.vals
3639
3640 cat >> $CONFIG_STATUS <<\EOF
3641   rm -f conftest.frag conftest.h
3642   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3643   cat conftest.in >> conftest.h
3644   rm -f conftest.in
3645   if cmp -s $ac_file conftest.h 2>/dev/null; then
3646     echo "$ac_file is unchanged"
3647     rm -f conftest.h
3648   else
3649     # Remove last slash and all that follows it.  Not all systems have dirname.
3650       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3651       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3652       # The file is in a subdirectory.
3653       test ! -d "$ac_dir" && mkdir "$ac_dir"
3654     fi
3655     rm -f $ac_file
3656     mv conftest.h $ac_file
3657   fi
3658 fi; done
3659
3660
3661
3662 exit 0
3663 EOF
3664 chmod +x $CONFIG_STATUS
3665 rm -fr confdefs* $ac_clean_files
3666 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3667