]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/cvs/configure
This commit was generated by cvs2svn to compensate for changes in r44743,
[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 evidence of shadow passwords""... $ac_c" 1>&6
2130 if test -f /etc/shadow \
2131    || test -f /etc/security/passwd.adjunct ; then
2132   found="yes"
2133   echo $ac_n "checking for -lsec""... $ac_c" 1>&6
2134 ac_lib_var=`echo sec'_'getspnam | tr './+\055' '__p_'`
2135 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2136   echo $ac_n "(cached) $ac_c" 1>&6
2137 else
2138   ac_save_LIBS="$LIBS"
2139 LIBS="-lsec  $LIBS"
2140 cat > conftest.$ac_ext <<EOF
2141 #line 2142 "configure"
2142 #include "confdefs.h"
2143 /* Override any gcc2 internal prototype to avoid an error.  */
2144 /* We use char because int might match the return type of a gcc2
2145     builtin and then its argument prototype would still apply.  */
2146 char getspnam();
2147
2148 int main() { return 0; }
2149 int t() {
2150 getspnam()
2151 ; return 0; }
2152 EOF
2153 if { (eval echo configure:2154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2154   rm -rf conftest*
2155   eval "ac_cv_lib_$ac_lib_var=yes"
2156 else
2157   rm -rf conftest*
2158   eval "ac_cv_lib_$ac_lib_var=no"
2159 fi
2160 rm -f conftest*
2161 LIBS="$ac_save_LIBS"
2162
2163 fi
2164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2165   echo "$ac_t""yes" 1>&6
2166     ac_tr_lib=HAVE_LIB`echo sec | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2167   cat >> confdefs.h <<EOF
2168 #define $ac_tr_lib 1
2169 EOF
2170
2171   LIBS="-lsec $LIBS"
2172
2173 else
2174   echo "$ac_t""no" 1>&6
2175 fi
2176
2177   for ac_func in getspnam
2178 do
2179 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2180 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2181   echo $ac_n "(cached) $ac_c" 1>&6
2182 else
2183   cat > conftest.$ac_ext <<EOF
2184 #line 2185 "configure"
2185 #include "confdefs.h"
2186 /* System header to define __stub macros and hopefully few prototypes,
2187     which can conflict with char $ac_func(); below.  */
2188 #include <assert.h>
2189 /* Override any gcc2 internal prototype to avoid an error.  */
2190 /* We use char because int might match the return type of a gcc2
2191     builtin and then its argument prototype would still apply.  */
2192 char $ac_func();
2193
2194 int main() { return 0; }
2195 int t() {
2196
2197 /* The GNU C library defines this for functions which it implements
2198     to always fail with ENOSYS.  Some functions are actually named
2199     something starting with __ and the normal name is an alias.  */
2200 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2201 choke me
2202 #else
2203 $ac_func();
2204 #endif
2205
2206 ; return 0; }
2207 EOF
2208 if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2209   rm -rf conftest*
2210   eval "ac_cv_func_$ac_func=yes"
2211 else
2212   rm -rf conftest*
2213   eval "ac_cv_func_$ac_func=no"
2214 fi
2215 rm -f conftest*
2216
2217 fi
2218 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2219   echo "$ac_t""yes" 1>&6
2220     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2221   cat >> confdefs.h <<EOF
2222 #define $ac_tr_func 1
2223 EOF
2224  
2225 else
2226   echo "$ac_t""no" 1>&6
2227 fi
2228 done
2229
2230 else
2231   found="no"
2232 fi
2233 echo "$ac_t""$found" 1>&6
2234
2235 echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
2236 if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then
2237   echo $ac_n "(cached) $ac_c" 1>&6
2238 else
2239   rm -f conftestdata; > conftestdata
2240 # Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
2241 if test "$cross_compiling" = yes; then
2242   ac_cv_func_utime_null=no
2243 else
2244 cat > conftest.$ac_ext <<EOF
2245 #line 2246 "configure"
2246 #include "confdefs.h"
2247 #include <sys/types.h>
2248 #include <sys/stat.h>
2249 main() {
2250 struct stat s, t;
2251 exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
2252 && stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
2253 && t.st_mtime - s.st_mtime < 120));
2254 }
2255 EOF
2256 { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2257 if test -s conftest && (./conftest; exit) 2>/dev/null; then
2258   ac_cv_func_utime_null=yes
2259 else
2260   ac_cv_func_utime_null=no
2261 fi
2262 fi
2263 rm -fr conftest*
2264 rm -f core core.* *.core
2265 fi
2266
2267 echo "$ac_t""$ac_cv_func_utime_null" 1>&6
2268 if test $ac_cv_func_utime_null = yes; then
2269   cat >> confdefs.h <<\EOF
2270 #define HAVE_UTIME_NULL 1
2271 EOF
2272
2273 fi
2274
2275 echo $ac_n "checking for long file names""... $ac_c" 1>&6
2276 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
2277   echo $ac_n "(cached) $ac_c" 1>&6
2278 else
2279   ac_cv_sys_long_file_names=yes
2280 # Test for long file names in all the places we know might matter:
2281 #      .                the current directory, where building will happen
2282 #      /tmp             where it might want to write temporary files
2283 #      /var/tmp         likewise
2284 #      /usr/tmp         likewise
2285 #      $prefix/lib      where we will be installing things
2286 #      $exec_prefix/lib likewise
2287 # eval it to expand exec_prefix.
2288 for ac_dir in `eval echo . /tmp /var/tmp /usr/tmp $prefix/lib $exec_prefix/lib` ; do
2289   test -d $ac_dir || continue
2290   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2291   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
2292   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
2293   val=`cat $ac_dir/conftest9012345 2>/dev/null`
2294   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
2295     ac_cv_sys_long_file_names=no
2296     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
2297     break
2298   fi
2299   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
2300 done
2301 fi
2302
2303 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
2304 if test $ac_cv_sys_long_file_names = yes; then
2305   cat >> confdefs.h <<\EOF
2306 #define HAVE_LONG_FILE_NAMES 1
2307 EOF
2308
2309 fi
2310
2311
2312 echo $ac_n "checking for working fnmatch function""... $ac_c" 1>&6
2313 if eval "test \"`echo '$''{'ccvs_cv_sys_working_fnmatch'+set}'`\" = set"; then
2314   echo $ac_n "(cached) $ac_c" 1>&6
2315 else
2316   if test "$cross_compiling" = yes; then
2317   ccvs_cv_sys_working_fnmatch=no
2318 else
2319 cat > conftest.$ac_ext <<EOF
2320 #line 2321 "configure"
2321 #include "confdefs.h"
2322
2323 #include <fnmatch.h>
2324 int
2325 main ()
2326 {
2327   exit ((fnmatch ("a", "a", FNM_PATHNAME) == 0
2328          && fnmatch ("a", "b", FNM_PATHNAME) == FNM_NOMATCH)
2329         ? 0 : 1);
2330 }
2331 EOF
2332 { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2333 if test -s conftest && (./conftest; exit) 2>/dev/null; then
2334   ccvs_cv_sys_working_fnmatch=yes
2335 else
2336   ccvs_cv_sys_working_fnmatch=no
2337 fi
2338 fi
2339 rm -fr conftest*
2340 fi
2341
2342 if test $ccvs_cv_sys_working_fnmatch = no; then
2343   LIBOBJS="$LIBOBJS fnmatch.o"
2344 fi
2345 echo "$ac_t""$ccvs_cv_sys_working_fnmatch" 1>&6
2346
2347 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
2348 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
2349 # libsocket.so which has a bad implementation of gethostbyname (it
2350 # only looks in /etc/hosts), so we only look for -lsocket if we need
2351 # it.
2352 echo $ac_n "checking for connect""... $ac_c" 1>&6
2353 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2354   echo $ac_n "(cached) $ac_c" 1>&6
2355 else
2356   cat > conftest.$ac_ext <<EOF
2357 #line 2358 "configure"
2358 #include "confdefs.h"
2359 /* System header to define __stub macros and hopefully few prototypes,
2360     which can conflict with char connect(); below.  */
2361 #include <assert.h>
2362 /* Override any gcc2 internal prototype to avoid an error.  */
2363 /* We use char because int might match the return type of a gcc2
2364     builtin and then its argument prototype would still apply.  */
2365 char connect();
2366
2367 int main() { return 0; }
2368 int t() {
2369
2370 /* The GNU C library defines this for functions which it implements
2371     to always fail with ENOSYS.  Some functions are actually named
2372     something starting with __ and the normal name is an alias.  */
2373 #if defined (__stub_connect) || defined (__stub___connect)
2374 choke me
2375 #else
2376 connect();
2377 #endif
2378
2379 ; return 0; }
2380 EOF
2381 if { (eval echo configure:2382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2382   rm -rf conftest*
2383   eval "ac_cv_func_connect=yes"
2384 else
2385   rm -rf conftest*
2386   eval "ac_cv_func_connect=no"
2387 fi
2388 rm -f conftest*
2389
2390 fi
2391 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2392   echo "$ac_t""yes" 1>&6
2393   :
2394 else
2395   echo "$ac_t""no" 1>&6
2396 case "$LIBS" in
2397 *-lnsl*) ;;
2398 *) echo $ac_n "checking for -lnsl_s""... $ac_c" 1>&6
2399 ac_lib_var=`echo nsl_s'_'printf | tr './+\055' '__p_'`
2400 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2401   echo $ac_n "(cached) $ac_c" 1>&6
2402 else
2403   ac_save_LIBS="$LIBS"
2404 LIBS="-lnsl_s  $LIBS"
2405 cat > conftest.$ac_ext <<EOF
2406 #line 2407 "configure"
2407 #include "confdefs.h"
2408 /* Override any gcc2 internal prototype to avoid an error.  */
2409 /* We use char because int might match the return type of a gcc2
2410     builtin and then its argument prototype would still apply.  */
2411 char printf();
2412
2413 int main() { return 0; }
2414 int t() {
2415 printf()
2416 ; return 0; }
2417 EOF
2418 if { (eval echo configure:2419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2419   rm -rf conftest*
2420   eval "ac_cv_lib_$ac_lib_var=yes"
2421 else
2422   rm -rf conftest*
2423   eval "ac_cv_lib_$ac_lib_var=no"
2424 fi
2425 rm -f conftest*
2426 LIBS="$ac_save_LIBS"
2427
2428 fi
2429 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2430   echo "$ac_t""yes" 1>&6
2431     ac_tr_lib=HAVE_LIB`echo nsl_s | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2432   cat >> confdefs.h <<EOF
2433 #define $ac_tr_lib 1
2434 EOF
2435
2436   LIBS="-lnsl_s $LIBS"
2437
2438 else
2439   echo "$ac_t""no" 1>&6
2440 fi
2441  ;;
2442 esac
2443 case "$LIBS" in
2444 *-lnsl*) ;;
2445 *) echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
2446 ac_lib_var=`echo nsl'_'printf | tr './+\055' '__p_'`
2447 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2448   echo $ac_n "(cached) $ac_c" 1>&6
2449 else
2450   ac_save_LIBS="$LIBS"
2451 LIBS="-lnsl  $LIBS"
2452 cat > conftest.$ac_ext <<EOF
2453 #line 2454 "configure"
2454 #include "confdefs.h"
2455 /* Override any gcc2 internal prototype to avoid an error.  */
2456 /* We use char because int might match the return type of a gcc2
2457     builtin and then its argument prototype would still apply.  */
2458 char printf();
2459
2460 int main() { return 0; }
2461 int t() {
2462 printf()
2463 ; return 0; }
2464 EOF
2465 if { (eval echo configure:2466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2466   rm -rf conftest*
2467   eval "ac_cv_lib_$ac_lib_var=yes"
2468 else
2469   rm -rf conftest*
2470   eval "ac_cv_lib_$ac_lib_var=no"
2471 fi
2472 rm -f conftest*
2473 LIBS="$ac_save_LIBS"
2474
2475 fi
2476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2477   echo "$ac_t""yes" 1>&6
2478     ac_tr_lib=HAVE_LIB`echo nsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2479   cat >> confdefs.h <<EOF
2480 #define $ac_tr_lib 1
2481 EOF
2482
2483   LIBS="-lnsl $LIBS"
2484
2485 else
2486   echo "$ac_t""no" 1>&6
2487 fi
2488  ;;
2489 esac
2490 case "$LIBS" in
2491 *-lsocket*) ;;
2492 *) echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
2493 ac_lib_var=`echo socket'_'connect | tr './+\055' '__p_'`
2494 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2495   echo $ac_n "(cached) $ac_c" 1>&6
2496 else
2497   ac_save_LIBS="$LIBS"
2498 LIBS="-lsocket  $LIBS"
2499 cat > conftest.$ac_ext <<EOF
2500 #line 2501 "configure"
2501 #include "confdefs.h"
2502 /* Override any gcc2 internal prototype to avoid an error.  */
2503 /* We use char because int might match the return type of a gcc2
2504     builtin and then its argument prototype would still apply.  */
2505 char connect();
2506
2507 int main() { return 0; }
2508 int t() {
2509 connect()
2510 ; return 0; }
2511 EOF
2512 if { (eval echo configure:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2513   rm -rf conftest*
2514   eval "ac_cv_lib_$ac_lib_var=yes"
2515 else
2516   rm -rf conftest*
2517   eval "ac_cv_lib_$ac_lib_var=no"
2518 fi
2519 rm -f conftest*
2520 LIBS="$ac_save_LIBS"
2521
2522 fi
2523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2524   echo "$ac_t""yes" 1>&6
2525     ac_tr_lib=HAVE_LIB`echo socket | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2526   cat >> confdefs.h <<EOF
2527 #define $ac_tr_lib 1
2528 EOF
2529
2530   LIBS="-lsocket $LIBS"
2531
2532 else
2533   echo "$ac_t""no" 1>&6
2534 fi
2535  ;;
2536 esac
2537 case "$LIBS" in
2538 *-linet*) ;;
2539 *) echo $ac_n "checking for -linet""... $ac_c" 1>&6
2540 ac_lib_var=`echo inet'_'connect | tr './+\055' '__p_'`
2541 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2542   echo $ac_n "(cached) $ac_c" 1>&6
2543 else
2544   ac_save_LIBS="$LIBS"
2545 LIBS="-linet  $LIBS"
2546 cat > conftest.$ac_ext <<EOF
2547 #line 2548 "configure"
2548 #include "confdefs.h"
2549 /* Override any gcc2 internal prototype to avoid an error.  */
2550 /* We use char because int might match the return type of a gcc2
2551     builtin and then its argument prototype would still apply.  */
2552 char connect();
2553
2554 int main() { return 0; }
2555 int t() {
2556 connect()
2557 ; return 0; }
2558 EOF
2559 if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2560   rm -rf conftest*
2561   eval "ac_cv_lib_$ac_lib_var=yes"
2562 else
2563   rm -rf conftest*
2564   eval "ac_cv_lib_$ac_lib_var=no"
2565 fi
2566 rm -f conftest*
2567 LIBS="$ac_save_LIBS"
2568
2569 fi
2570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2571   echo "$ac_t""yes" 1>&6
2572     ac_tr_lib=HAVE_LIB`echo inet | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2573   cat >> confdefs.h <<EOF
2574 #define $ac_tr_lib 1
2575 EOF
2576
2577   LIBS="-linet $LIBS"
2578
2579 else
2580   echo "$ac_t""no" 1>&6
2581 fi
2582  ;;
2583 esac
2584 if test "$ac_cv_lib_socket_connect" = "yes" || test "$ac_cv_lib_inet_connect" = "yes"; then
2585   ac_cv_func_connect=yes
2586   cat >> confdefs.h <<\EOF
2587 #define HAVE_CONNECT 1
2588 EOF
2589
2590 fi
2591 fi
2592
2593
2594 KRB4=/usr/kerberos
2595
2596 # Check whether --with-krb4 or --without-krb4 was given.
2597 if test "${with_krb4+set}" = set; then
2598   withval="$with_krb4"
2599   KRB4=$withval
2600 fi
2601 echo "default place for krb4 is $KRB4"
2602
2603
2604 krb_h=
2605 echo $ac_n "checking for krb.h""... $ac_c" 1>&6
2606 if test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then
2607    hold_cflags=$CFLAGS
2608    CFLAGS="$CFLAGS -I$KRB4/include"
2609    cat > conftest.$ac_ext <<EOF
2610 #line 2611 "configure"
2611 #include "confdefs.h"
2612 #include <krb.h>
2613 int main() { return 0; }
2614 int t() {
2615 int i;
2616 ; return 0; }
2617 EOF
2618 if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2619   rm -rf conftest*
2620   krb_h=yes krb_incdir=$KRB4/include
2621 else
2622   rm -rf conftest*
2623   CFLAGS=$hold_cflags
2624            cat > conftest.$ac_ext <<EOF
2625 #line 2626 "configure"
2626 #include "confdefs.h"
2627 #include <krb.h>
2628 int main() { return 0; }
2629 int t() {
2630 int i;
2631 ; return 0; }
2632 EOF
2633 if { (eval echo configure:2634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2634   rm -rf conftest*
2635   krb_h=yes krb_incdir=
2636 fi
2637 rm -f conftest*
2638
2639 fi
2640 rm -f conftest*
2641
2642    CFLAGS=$hold_cflags
2643 else
2644    cat > conftest.$ac_ext <<EOF
2645 #line 2646 "configure"
2646 #include "confdefs.h"
2647 #include <krb.h>
2648 int main() { return 0; }
2649 int t() {
2650 int i;
2651 ; return 0; }
2652 EOF
2653 if { (eval echo configure:2654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2654   rm -rf conftest*
2655   krb_h=yes krb_incdir=
2656 fi
2657 rm -f conftest*
2658
2659 fi
2660 if test -z "$krb_h"; then
2661   cat > conftest.$ac_ext <<EOF
2662 #line 2663 "configure"
2663 #include "confdefs.h"
2664 #include <krb.h>
2665 int main() { return 0; }
2666 int t() {
2667 int i;
2668 ; return 0; }
2669 EOF
2670 if { (eval echo configure:2671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2671   rm -rf conftest*
2672   krb_h=yes krb_incdir=
2673 else
2674   rm -rf conftest*
2675   if test "$cross_compiling" != yes && test -r $KRB4/include/kerberosIV/krb.h; then
2676        hold_cflags=$CFLAGS
2677        CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV"
2678        cat > conftest.$ac_ext <<EOF
2679 #line 2680 "configure"
2680 #include "confdefs.h"
2681 #include <krb.h>
2682 int main() { return 0; }
2683 int t() {
2684 int i;
2685 ; return 0; }
2686 EOF
2687 if { (eval echo configure:2688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2688   rm -rf conftest*
2689   krb_h=yes krb_incdir=$KRB4/include/kerberosIV
2690 fi
2691 rm -f conftest*
2692
2693        CFLAGS=$hold_cflags
2694      fi
2695 fi
2696 rm -f conftest*
2697
2698 fi
2699 echo "$ac_t""$krb_h" 1>&6
2700
2701 includeopt=
2702
2703 if test -n "$krb_h"; then
2704   krb_lib=
2705   if test "$cross_compiling" != yes && test -r $KRB4/lib/libkrb.a; then
2706        hold_ldflags=$LDFLAGS
2707        LDFLAGS="-L${KRB4}/lib $LDFLAGS"
2708        echo $ac_n "checking for -lkrb""... $ac_c" 1>&6
2709 ac_lib_var=`echo krb'_'printf | tr './+\055' '__p_'`
2710 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2711   echo $ac_n "(cached) $ac_c" 1>&6
2712 else
2713   ac_save_LIBS="$LIBS"
2714 LIBS="-lkrb  $LIBS"
2715 cat > conftest.$ac_ext <<EOF
2716 #line 2717 "configure"
2717 #include "confdefs.h"
2718 /* Override any gcc2 internal prototype to avoid an error.  */
2719 /* We use char because int might match the return type of a gcc2
2720     builtin and then its argument prototype would still apply.  */
2721 char printf();
2722
2723 int main() { return 0; }
2724 int t() {
2725 printf()
2726 ; return 0; }
2727 EOF
2728 if { (eval echo configure:2729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2729   rm -rf conftest*
2730   eval "ac_cv_lib_$ac_lib_var=yes"
2731 else
2732   rm -rf conftest*
2733   eval "ac_cv_lib_$ac_lib_var=no"
2734 fi
2735 rm -f conftest*
2736 LIBS="$ac_save_LIBS"
2737
2738 fi
2739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2740   echo "$ac_t""yes" 1>&6
2741   krb_lib=yes krb_libdir=${KRB4}/lib
2742 else
2743   echo "$ac_t""no" 1>&6
2744 LDFLAGS=$hold_ldflags
2745             # Using open here instead of printf so we don't
2746             # get confused by the cached value for printf from above.
2747             echo $ac_n "checking for -lkrb""... $ac_c" 1>&6
2748 ac_lib_var=`echo krb'_'open | tr './+\055' '__p_'`
2749 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2750   echo $ac_n "(cached) $ac_c" 1>&6
2751 else
2752   ac_save_LIBS="$LIBS"
2753 LIBS="-lkrb  $LIBS"
2754 cat > conftest.$ac_ext <<EOF
2755 #line 2756 "configure"
2756 #include "confdefs.h"
2757 /* Override any gcc2 internal prototype to avoid an error.  */
2758 /* We use char because int might match the return type of a gcc2
2759     builtin and then its argument prototype would still apply.  */
2760 char open();
2761
2762 int main() { return 0; }
2763 int t() {
2764 open()
2765 ; return 0; }
2766 EOF
2767 if { (eval echo configure:2768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2768   rm -rf conftest*
2769   eval "ac_cv_lib_$ac_lib_var=yes"
2770 else
2771   rm -rf conftest*
2772   eval "ac_cv_lib_$ac_lib_var=no"
2773 fi
2774 rm -f conftest*
2775 LIBS="$ac_save_LIBS"
2776
2777 fi
2778 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2779   echo "$ac_t""yes" 1>&6
2780   krb_lib=yes krb_libdir=
2781 else
2782   echo "$ac_t""no" 1>&6
2783 fi
2784
2785 fi
2786
2787        LDFLAGS=$hold_ldflags
2788   else
2789        echo $ac_n "checking for -lkrb""... $ac_c" 1>&6
2790 ac_lib_var=`echo krb'_'printf | tr './+\055' '__p_'`
2791 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2792   echo $ac_n "(cached) $ac_c" 1>&6
2793 else
2794   ac_save_LIBS="$LIBS"
2795 LIBS="-lkrb  $LIBS"
2796 cat > conftest.$ac_ext <<EOF
2797 #line 2798 "configure"
2798 #include "confdefs.h"
2799 /* Override any gcc2 internal prototype to avoid an error.  */
2800 /* We use char because int might match the return type of a gcc2
2801     builtin and then its argument prototype would still apply.  */
2802 char printf();
2803
2804 int main() { return 0; }
2805 int t() {
2806 printf()
2807 ; return 0; }
2808 EOF
2809 if { (eval echo configure:2810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2810   rm -rf conftest*
2811   eval "ac_cv_lib_$ac_lib_var=yes"
2812 else
2813   rm -rf conftest*
2814   eval "ac_cv_lib_$ac_lib_var=no"
2815 fi
2816 rm -f conftest*
2817 LIBS="$ac_save_LIBS"
2818
2819 fi
2820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2821   echo "$ac_t""yes" 1>&6
2822   krb_lib=yes krb_libdir=
2823 else
2824   echo "$ac_t""no" 1>&6
2825 fi
2826
2827   fi
2828   if test -n "$krb_lib"; then
2829     cat >> confdefs.h <<\EOF
2830 #define HAVE_KERBEROS 1
2831 EOF
2832
2833     test -n "${krb_libdir}" && LIBS="${LIBS} -L${krb_libdir}"
2834     LIBS="${LIBS} -lkrb"
2835     # Put -L${krb_libdir} in LDFLAGS temporarily so that it appears before
2836     # -ldes in the command line.  Don't do it permanently so that we honor
2837     # the user's setting for LDFLAGS
2838     hold_ldflags=$LDFLAGS
2839     test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}"
2840     echo $ac_n "checking for -ldes""... $ac_c" 1>&6
2841 ac_lib_var=`echo des'_'printf | tr './+\055' '__p_'`
2842 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2843   echo $ac_n "(cached) $ac_c" 1>&6
2844 else
2845   ac_save_LIBS="$LIBS"
2846 LIBS="-ldes  $LIBS"
2847 cat > conftest.$ac_ext <<EOF
2848 #line 2849 "configure"
2849 #include "confdefs.h"
2850 /* Override any gcc2 internal prototype to avoid an error.  */
2851 /* We use char because int might match the return type of a gcc2
2852     builtin and then its argument prototype would still apply.  */
2853 char printf();
2854
2855 int main() { return 0; }
2856 int t() {
2857 printf()
2858 ; return 0; }
2859 EOF
2860 if { (eval echo configure:2861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2861   rm -rf conftest*
2862   eval "ac_cv_lib_$ac_lib_var=yes"
2863 else
2864   rm -rf conftest*
2865   eval "ac_cv_lib_$ac_lib_var=no"
2866 fi
2867 rm -f conftest*
2868 LIBS="$ac_save_LIBS"
2869
2870 fi
2871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2872   echo "$ac_t""yes" 1>&6
2873   LIBS="${LIBS} -ldes"
2874 else
2875   echo "$ac_t""no" 1>&6
2876 fi
2877
2878     LDFLAGS=$hold_ldflags
2879     if test -n "$krb_incdir"; then
2880       includeopt="${includeopt} -I$krb_incdir"
2881     fi
2882   fi
2883 fi
2884 for ac_func in krb_get_err_text
2885 do
2886 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2887 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2888   echo $ac_n "(cached) $ac_c" 1>&6
2889 else
2890   cat > conftest.$ac_ext <<EOF
2891 #line 2892 "configure"
2892 #include "confdefs.h"
2893 /* System header to define __stub macros and hopefully few prototypes,
2894     which can conflict with char $ac_func(); below.  */
2895 #include <assert.h>
2896 /* Override any gcc2 internal prototype to avoid an error.  */
2897 /* We use char because int might match the return type of a gcc2
2898     builtin and then its argument prototype would still apply.  */
2899 char $ac_func();
2900
2901 int main() { return 0; }
2902 int t() {
2903
2904 /* The GNU C library defines this for functions which it implements
2905     to always fail with ENOSYS.  Some functions are actually named
2906     something starting with __ and the normal name is an alias.  */
2907 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2908 choke me
2909 #else
2910 $ac_func();
2911 #endif
2912
2913 ; return 0; }
2914 EOF
2915 if { (eval echo configure:2916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2916   rm -rf conftest*
2917   eval "ac_cv_func_$ac_func=yes"
2918 else
2919   rm -rf conftest*
2920   eval "ac_cv_func_$ac_func=no"
2921 fi
2922 rm -f conftest*
2923
2924 fi
2925 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2926   echo "$ac_t""yes" 1>&6
2927     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2928   cat >> confdefs.h <<EOF
2929 #define $ac_tr_func 1
2930 EOF
2931  
2932 else
2933   echo "$ac_t""no" 1>&6
2934 fi
2935 done
2936
2937
2938 GSSAPI=/usr/cygnus/kerbnet
2939
2940 # Check whether --with-gssapi or --without-gssapi was given.
2941 if test "${with_gssapi+set}" = set; then
2942   withval="$with_gssapi"
2943   GSSAPI=$withval
2944 fi
2945 echo "default place for GSSAPI is $GSSAPI"
2946
2947
2948 echo $ac_n "checking for gssapi.h""... $ac_c" 1>&6
2949 hold_cppflags=$CPPFLAGS
2950 CPPFLAGS="$CPPFLAGS -I$GSSAPI/include "
2951 ac_safe=`echo "gssapi/gssapi.h" | tr './\055' '___'`
2952 echo $ac_n "checking for gssapi/gssapi.h""... $ac_c" 1>&6
2953 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2954   echo $ac_n "(cached) $ac_c" 1>&6
2955 else
2956   cat > conftest.$ac_ext <<EOF
2957 #line 2958 "configure"
2958 #include "confdefs.h"
2959 #include <gssapi/gssapi.h>
2960 EOF
2961 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2962 { (eval echo configure:2963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2963 ac_err=`grep -v '^ *+' conftest.out`
2964 if test -z "$ac_err"; then
2965   rm -rf conftest*
2966   eval "ac_cv_header_$ac_safe=yes"
2967 else
2968   echo "$ac_err" >&5
2969   rm -rf conftest*
2970   eval "ac_cv_header_$ac_safe=no"
2971 fi
2972 rm -f conftest*
2973 fi
2974 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2975   echo "$ac_t""yes" 1>&6
2976   cat >> confdefs.h <<\EOF
2977 #define HAVE_GSSAPI 1
2978 EOF
2979
2980    LIBS="$LIBS -L$GSSAPI/lib -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err"
2981    includeopt="${includeopt} -I$GSSAPI/include"
2982    # This is necessary on Irix 5.3, in order to link against libkrb5 --
2983    # there, an_to_ln.o refers to things defined only in -lgen.
2984    echo $ac_n "checking for -lgen""... $ac_c" 1>&6
2985 ac_lib_var=`echo gen'_'compile | tr './+\055' '__p_'`
2986 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2987   echo $ac_n "(cached) $ac_c" 1>&6
2988 else
2989   ac_save_LIBS="$LIBS"
2990 LIBS="-lgen  $LIBS"
2991 cat > conftest.$ac_ext <<EOF
2992 #line 2993 "configure"
2993 #include "confdefs.h"
2994 /* Override any gcc2 internal prototype to avoid an error.  */
2995 /* We use char because int might match the return type of a gcc2
2996     builtin and then its argument prototype would still apply.  */
2997 char compile();
2998
2999 int main() { return 0; }
3000 int t() {
3001 compile()
3002 ; return 0; }
3003 EOF
3004 if { (eval echo configure:3005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3005   rm -rf conftest*
3006   eval "ac_cv_lib_$ac_lib_var=yes"
3007 else
3008   rm -rf conftest*
3009   eval "ac_cv_lib_$ac_lib_var=no"
3010 fi
3011 rm -f conftest*
3012 LIBS="$ac_save_LIBS"
3013
3014 fi
3015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3016   echo "$ac_t""yes" 1>&6
3017     ac_tr_lib=HAVE_LIB`echo gen | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3018   cat >> confdefs.h <<EOF
3019 #define $ac_tr_lib 1
3020 EOF
3021
3022   LIBS="-lgen $LIBS"
3023
3024 else
3025   echo "$ac_t""no" 1>&6
3026 fi
3027
3028 else
3029   echo "$ac_t""no" 1>&6
3030 fi
3031
3032 CPPFLAGS=$hold_cppflags
3033
3034 # Check whether --enable-encryption or --disable-encryption was given.
3035 if test "${enable_encryption+set}" = set; then
3036   enableval="$enable_encryption"
3037   case "${enableval}" in
3038     yes) encryption=true ;;
3039     no) encryption=false ;;
3040     *) { echo "configure: error: bad value ${enableval} for encryption option" 1>&2; exit 1; } ;;
3041    esac
3042 else
3043   encryption=false
3044 fi
3045
3046 if test "$encryption" = "true"; then
3047   cat >> confdefs.h <<\EOF
3048 #define ENCRYPTION 1
3049 EOF
3050
3051 fi
3052
3053 echo $ac_n "checking for gethostname""... $ac_c" 1>&6
3054 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
3055   echo $ac_n "(cached) $ac_c" 1>&6
3056 else
3057   cat > conftest.$ac_ext <<EOF
3058 #line 3059 "configure"
3059 #include "confdefs.h"
3060 /* System header to define __stub macros and hopefully few prototypes,
3061     which can conflict with char gethostname(); below.  */
3062 #include <assert.h>
3063 /* Override any gcc2 internal prototype to avoid an error.  */
3064 /* We use char because int might match the return type of a gcc2
3065     builtin and then its argument prototype would still apply.  */
3066 char gethostname();
3067
3068 int main() { return 0; }
3069 int t() {
3070
3071 /* The GNU C library defines this for functions which it implements
3072     to always fail with ENOSYS.  Some functions are actually named
3073     something starting with __ and the normal name is an alias.  */
3074 #if defined (__stub_gethostname) || defined (__stub___gethostname)
3075 choke me
3076 #else
3077 gethostname();
3078 #endif
3079
3080 ; return 0; }
3081 EOF
3082 if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3083   rm -rf conftest*
3084   eval "ac_cv_func_gethostname=yes"
3085 else
3086   rm -rf conftest*
3087   eval "ac_cv_func_gethostname=no"
3088 fi
3089 rm -f conftest*
3090
3091 fi
3092 if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
3093   echo "$ac_t""yes" 1>&6
3094   :
3095 else
3096   echo "$ac_t""no" 1>&6
3097 LIBOBJS="$LIBOBJS hostname.o"
3098 fi
3099
3100
3101 # Check for options requesting client and server feature. If none are
3102 # given and we have connect(), we want the full client & server arrangement.
3103 # Check whether --enable-client or --disable-client was given.
3104 if test "${enable_client+set}" = set; then
3105   enableval="$enable_client"
3106   if test "$enable_client" = yes; then
3107   cat >> confdefs.h <<\EOF
3108 #define CLIENT_SUPPORT 1
3109 EOF
3110
3111 fi
3112 else
3113   if test "$ac_cv_func_connect" = yes; then
3114   cat >> confdefs.h <<\EOF
3115 #define CLIENT_SUPPORT 1
3116 EOF
3117
3118 fi
3119 fi
3120
3121 # Check whether --enable-server or --disable-server was given.
3122 if test "${enable_server+set}" = set; then
3123   enableval="$enable_server"
3124   if test "$enable_server" = yes; then
3125   cat >> confdefs.h <<\EOF
3126 #define SERVER_SUPPORT 1
3127 EOF
3128
3129 fi
3130 else
3131   if test "$ac_cv_func_connect" = yes; then
3132   cat >> confdefs.h <<\EOF
3133 #define SERVER_SUPPORT 1
3134 EOF
3135
3136   enable_server=yes
3137 fi
3138 fi
3139
3140
3141 ### The auth server needs to be able to check passwords against passwd
3142 ### file entries, so we only #define AUTH_SERVER_SUPPORT if we can
3143 ### find the crypt function. 
3144 ###
3145 ### We used to test for crypt in libc first, and only add -lcrypt if
3146 ### we couldn't find it, but that interacts badly with the cache
3147 ### variables, the 'unset' command isn't portable, and I'm not sure
3148 ### there's any harm in just testing for -lcrypt first.
3149
3150 if test "$enable_server" = yes; then
3151 echo $ac_n "checking for -lcrypt""... $ac_c" 1>&6
3152 ac_lib_var=`echo crypt'_'crypt | tr './+\055' '__p_'`
3153 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3154   echo $ac_n "(cached) $ac_c" 1>&6
3155 else
3156   ac_save_LIBS="$LIBS"
3157 LIBS="-lcrypt  $LIBS"
3158 cat > conftest.$ac_ext <<EOF
3159 #line 3160 "configure"
3160 #include "confdefs.h"
3161 /* Override any gcc2 internal prototype to avoid an error.  */
3162 /* We use char because int might match the return type of a gcc2
3163     builtin and then its argument prototype would still apply.  */
3164 char crypt();
3165
3166 int main() { return 0; }
3167 int t() {
3168 crypt()
3169 ; return 0; }
3170 EOF
3171 if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3172   rm -rf conftest*
3173   eval "ac_cv_lib_$ac_lib_var=yes"
3174 else
3175   rm -rf conftest*
3176   eval "ac_cv_lib_$ac_lib_var=no"
3177 fi
3178 rm -f conftest*
3179 LIBS="$ac_save_LIBS"
3180
3181 fi
3182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3183   echo "$ac_t""yes" 1>&6
3184     ac_tr_lib=HAVE_LIB`echo crypt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3185   cat >> confdefs.h <<EOF
3186 #define $ac_tr_lib 1
3187 EOF
3188
3189   LIBS="-lcrypt $LIBS"
3190
3191 else
3192   echo "$ac_t""no" 1>&6
3193 fi
3194
3195 for ac_func in crypt
3196 do
3197 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3198 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3199   echo $ac_n "(cached) $ac_c" 1>&6
3200 else
3201   cat > conftest.$ac_ext <<EOF
3202 #line 3203 "configure"
3203 #include "confdefs.h"
3204 /* System header to define __stub macros and hopefully few prototypes,
3205     which can conflict with char $ac_func(); below.  */
3206 #include <assert.h>
3207 /* Override any gcc2 internal prototype to avoid an error.  */
3208 /* We use char because int might match the return type of a gcc2
3209     builtin and then its argument prototype would still apply.  */
3210 char $ac_func();
3211
3212 int main() { return 0; }
3213 int t() {
3214
3215 /* The GNU C library defines this for functions which it implements
3216     to always fail with ENOSYS.  Some functions are actually named
3217     something starting with __ and the normal name is an alias.  */
3218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3219 choke me
3220 #else
3221 $ac_func();
3222 #endif
3223
3224 ; return 0; }
3225 EOF
3226 if { (eval echo configure:3227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3227   rm -rf conftest*
3228   eval "ac_cv_func_$ac_func=yes"
3229 else
3230   rm -rf conftest*
3231   eval "ac_cv_func_$ac_func=no"
3232 fi
3233 rm -f conftest*
3234
3235 fi
3236 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3237   echo "$ac_t""yes" 1>&6
3238     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3239   cat >> confdefs.h <<EOF
3240 #define $ac_tr_func 1
3241 EOF
3242  
3243 else
3244   echo "$ac_t""no" 1>&6
3245 fi
3246 done
3247
3248
3249 if test "$ac_cv_func_crypt" = yes; then
3250   cat >> confdefs.h <<\EOF
3251 #define AUTH_SERVER_SUPPORT 1
3252 EOF
3253
3254 fi
3255 fi # enable_server
3256
3257 cat >> confdefs.h <<\EOF
3258 #define PRESERVE_PERMISSIONS_SUPPORT 1
3259 EOF
3260
3261
3262 echo $ac_n "checking for cygwin32""... $ac_c" 1>&6
3263 if eval "test \"`echo '$''{'ccvs_cv_sys_cygwin32'+set}'`\" = set"; then
3264   echo $ac_n "(cached) $ac_c" 1>&6
3265 else
3266   cat > conftest.$ac_ext <<EOF
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269
3270 int main() { return 0; }
3271 int t() {
3272 return __CYGWIN32__;
3273 ; return 0; }
3274 EOF
3275 if { (eval echo configure:3276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3276   rm -rf conftest*
3277   ccvs_cv_sys_cygwin32=yes
3278 else
3279   rm -rf conftest*
3280   ccvs_cv_sys_cygwin32=no
3281 fi
3282 rm -f conftest*
3283
3284 fi
3285
3286 echo "$ac_t""$ccvs_cv_sys_cygwin32" 1>&6
3287 if test $ccvs_cv_sys_cygwin32 = yes; then
3288   LIBOBJS="$LIBOBJS fncase.o"
3289   LIBS="$LIBS -ladvapi32"
3290
3291         cat >> confdefs.h <<\EOF
3292 #define UTIME_EXPECTS_WRITABLE 1
3293 EOF
3294
3295
3296       cat >> confdefs.h <<\EOF
3297 #define USE_SETMODE_STDOUT 1
3298 EOF
3299
3300   cat >> confdefs.h <<\EOF
3301 #define HAVE_SETMODE 1
3302 EOF
3303
3304 fi
3305
3306 test -f src/options.h && (
3307   echo "configure: warning: saving ./src/options.h in ./src/options.h-SAVED" 1>&2
3308   echo "configure: warning: You may wish to check that local options have not been lost." 1>&2
3309   echo "configure: warning: Do not re-run ./configure or ./config.status until you have...." 1>&2
3310   cp ./src/options.h ./src/options.h-SAVED
3311 )
3312
3313 trap '' 1 2 15
3314 cat > confcache <<\EOF
3315 # This file is a shell script that caches the results of configure
3316 # tests run on this system so they can be shared between configure
3317 # scripts and configure runs.  It is not useful on other systems.
3318 # If it contains results you don't want to keep, you may remove or edit it.
3319 #
3320 # By default, configure uses ./config.cache as the cache file,
3321 # creating it if it does not exist already.  You can give configure
3322 # the --cache-file=FILE option to use a different cache file; that is
3323 # what configure does when it calls configure scripts in
3324 # subdirectories, so they share the cache.
3325 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3326 # config.status only pays attention to the cache file if you give it the
3327 # --recheck option to rerun configure.
3328 #
3329 EOF
3330 # Ultrix sh set writes to stderr and can't be redirected directly,
3331 # and sets the high bit in the cache file unless we assign to the vars.
3332 (set) 2>&1 |
3333   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
3334   >> confcache
3335 if cmp -s $cache_file confcache; then
3336   :
3337 else
3338   if test -w $cache_file; then
3339     echo "updating cache $cache_file"
3340     cat confcache > $cache_file
3341   else
3342     echo "not updating unwritable cache $cache_file"
3343   fi
3344 fi
3345 rm -f confcache
3346
3347 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3348
3349 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3350 # Let make expand exec_prefix.
3351 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3352
3353 # Any assignment to VPATH causes Sun make to only execute
3354 # the first set of double-colon rules, so remove it if not needed.
3355 # If there is a colon in the path, we need to keep it.
3356 if test "x$srcdir" = x.; then
3357   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3358 fi
3359
3360 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3361
3362 DEFS=-DHAVE_CONFIG_H
3363
3364 # Without the "./", some shells look in PATH for config.status.
3365 : ${CONFIG_STATUS=./config.status}
3366
3367 echo creating $CONFIG_STATUS
3368 rm -f $CONFIG_STATUS
3369 cat > $CONFIG_STATUS <<EOF
3370 #! /bin/sh
3371 # Generated automatically by configure.
3372 # Run this file to recreate the current configuration.
3373 # This directory was configured as follows,
3374 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3375 #
3376 # $0 $ac_configure_args
3377 #
3378 # Compiler output produced by configure, useful for debugging
3379 # configure, is in ./config.log if it exists.
3380
3381 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3382 for ac_option
3383 do
3384   case "\$ac_option" in
3385   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3386     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3387     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3388   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3389     echo "$CONFIG_STATUS generated by autoconf version 2.10"
3390     exit 0 ;;
3391   -help | --help | --hel | --he | --h)
3392     echo "\$ac_cs_usage"; exit 0 ;;
3393   *) echo "\$ac_cs_usage"; exit 1 ;;
3394   esac
3395 done
3396
3397 ac_given_srcdir=$srcdir
3398 ac_given_INSTALL="$INSTALL"
3399
3400 trap 'rm -fr `echo "Makefile lib/Makefile src/Makefile zlib/Makefile diff/Makefile doc/Makefile \
3401           man/Makefile tools/Makefile tools/pcl-cvs/Makefile \
3402           contrib/Makefile contrib/elib/Makefile \
3403           windows-NT/Makefile windows-NT/SCC/Makefile \
3404           os2/Makefile emx/Makefile macintosh/Makefile vms/Makefile \
3405           stamp-h config.h src/options.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3406 EOF
3407 cat >> $CONFIG_STATUS <<EOF
3408
3409 # Protect against being on the right side of a sed subst in config.status.
3410 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3411  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3412 $ac_vpsub
3413 $extrasub
3414 s%@CFLAGS@%$CFLAGS%g
3415 s%@CPPFLAGS@%$CPPFLAGS%g
3416 s%@CXXFLAGS@%$CXXFLAGS%g
3417 s%@DEFS@%$DEFS%g
3418 s%@LDFLAGS@%$LDFLAGS%g
3419 s%@LIBS@%$LIBS%g
3420 s%@exec_prefix@%$exec_prefix%g
3421 s%@prefix@%$prefix%g
3422 s%@program_transform_name@%$program_transform_name%g
3423 s%@bindir@%$bindir%g
3424 s%@sbindir@%$sbindir%g
3425 s%@libexecdir@%$libexecdir%g
3426 s%@datadir@%$datadir%g
3427 s%@sysconfdir@%$sysconfdir%g
3428 s%@sharedstatedir@%$sharedstatedir%g
3429 s%@localstatedir@%$localstatedir%g
3430 s%@libdir@%$libdir%g
3431 s%@includedir@%$includedir%g
3432 s%@oldincludedir@%$oldincludedir%g
3433 s%@infodir@%$infodir%g
3434 s%@mandir@%$mandir%g
3435 s%@CC@%$CC%g
3436 s%@CPP@%$CPP%g
3437 s%@CVS@%$CVS%g
3438 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3439 s%@INSTALL_DATA@%$INSTALL_DATA%g
3440 s%@RANLIB@%$RANLIB%g
3441 s%@YACC@%$YACC%g
3442 s%@SET_MAKE@%$SET_MAKE%g
3443 s%@perl_path@%$perl_path%g
3444 s%@csh_path@%$csh_path%g
3445 s%@LIBOBJS@%$LIBOBJS%g
3446 s%@KRB4@%$KRB4%g
3447 s%@includeopt@%$includeopt%g
3448 s%@GSSAPI@%$GSSAPI%g
3449
3450 CEOF
3451 EOF
3452 cat >> $CONFIG_STATUS <<EOF
3453
3454 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile src/Makefile zlib/Makefile diff/Makefile doc/Makefile \
3455           man/Makefile tools/Makefile tools/pcl-cvs/Makefile \
3456           contrib/Makefile contrib/elib/Makefile \
3457           windows-NT/Makefile windows-NT/SCC/Makefile \
3458           os2/Makefile emx/Makefile macintosh/Makefile vms/Makefile \
3459           stamp-h"}
3460 EOF
3461 cat >> $CONFIG_STATUS <<\EOF
3462 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3463   # Support "outfile[:infile]", defaulting infile="outfile.in".
3464   case "$ac_file" in
3465   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3466        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3467   *) ac_file_in="${ac_file}.in" ;;
3468   esac
3469
3470   # Adjust relative srcdir, etc. for subdirectories.
3471
3472   # Remove last slash and all that follows it.  Not all systems have dirname.
3473   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3474   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3475     # The file is in a subdirectory.
3476     test ! -d "$ac_dir" && mkdir "$ac_dir"
3477     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3478     # A "../" for each directory in $ac_dir_suffix.
3479     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3480   else
3481     ac_dir_suffix= ac_dots=
3482   fi
3483
3484   case "$ac_given_srcdir" in
3485   .)  srcdir=.
3486       if test -z "$ac_dots"; then top_srcdir=.
3487       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3488   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3489   *) # Relative path.
3490     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3491     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3492   esac
3493
3494   case "$ac_given_INSTALL" in
3495   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3496   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3497   esac
3498   echo creating "$ac_file"
3499   rm -f "$ac_file"
3500   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3501   case "$ac_file" in
3502   *Makefile*) ac_comsub="1i\\
3503 # $configure_input" ;;
3504   *) ac_comsub= ;;
3505   esac
3506   sed -e "$ac_comsub
3507 s%@configure_input@%$configure_input%g
3508 s%@srcdir@%$srcdir%g
3509 s%@top_srcdir@%$top_srcdir%g
3510 s%@INSTALL@%$INSTALL%g
3511 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
3512 fi; done
3513 rm -f conftest.subs
3514
3515 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3516 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3517 #
3518 # ac_d sets the value in "#define NAME VALUE" lines.
3519 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3520 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3521 ac_dC='\3'
3522 ac_dD='%g'
3523 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3524 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3525 ac_uB='\([      ]\)%\1#\2define\3'
3526 ac_uC=' '
3527 ac_uD='\4%g'
3528 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3529 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3530 ac_eB='$%\1#\2define\3'
3531 ac_eC=' '
3532 ac_eD='%g'
3533
3534 CONFIG_HEADERS=${CONFIG_HEADERS-"config.h src/options.h"}
3535 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3536   # Support "outfile[:infile]", defaulting infile="outfile.in".
3537   case "$ac_file" in
3538   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3539        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3540   *) ac_file_in="${ac_file}.in" ;;
3541   esac
3542
3543   echo creating $ac_file
3544
3545   rm -f conftest.frag conftest.in conftest.out
3546   cp $ac_given_srcdir/$ac_file_in conftest.in
3547
3548 EOF
3549
3550 # Transform confdefs.h into a sed script conftest.vals that substitutes
3551 # the proper values into config.h.in to produce config.h.  And first:
3552 # Protect against being on the right side of a sed subst in config.status.
3553 # Protect against being in an unquoted here document in config.status.
3554 rm -f conftest.vals
3555 cat > conftest.hdr <<\EOF
3556 s/[\\&%]/\\&/g
3557 s%[\\$`]%\\&%g
3558 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3559 s%ac_d%ac_u%gp
3560 s%ac_u%ac_e%gp
3561 EOF
3562 sed -n -f conftest.hdr confdefs.h > conftest.vals
3563 rm -f conftest.hdr
3564
3565 # This sed command replaces #undef with comments.  This is necessary, for
3566 # example, in the case of _POSIX_SOURCE, which is predefined and required
3567 # on some systems where configure will not decide to define it.
3568 cat >> conftest.vals <<\EOF
3569 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3570 EOF
3571
3572 # Break up conftest.vals because some shells have a limit on
3573 # the size of here documents, and old seds have small limits too.
3574 # Maximum number of lines to put in a single here document.
3575 ac_max_here_lines=12
3576
3577 rm -f conftest.tail
3578 while :
3579 do
3580   ac_lines=`grep -c . conftest.vals`
3581   # grep -c gives empty output for an empty file on some AIX systems.
3582   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3583   # Write a limited-size here document to conftest.frag.
3584   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3585   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3586   echo 'CEOF
3587   sed -f conftest.frag conftest.in > conftest.out
3588   rm -f conftest.in
3589   mv conftest.out conftest.in
3590 ' >> $CONFIG_STATUS
3591   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3592   rm -f conftest.vals
3593   mv conftest.tail conftest.vals
3594 done
3595 rm -f conftest.vals
3596
3597 cat >> $CONFIG_STATUS <<\EOF
3598   rm -f conftest.frag conftest.h
3599   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3600   cat conftest.in >> conftest.h
3601   rm -f conftest.in
3602   if cmp -s $ac_file conftest.h 2>/dev/null; then
3603     echo "$ac_file is unchanged"
3604     rm -f conftest.h
3605   else
3606     # Remove last slash and all that follows it.  Not all systems have dirname.
3607       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3608       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3609       # The file is in a subdirectory.
3610       test ! -d "$ac_dir" && mkdir "$ac_dir"
3611     fi
3612     rm -f $ac_file
3613     mv conftest.h $ac_file
3614   fi
3615 fi; done
3616
3617
3618
3619 exit 0
3620 EOF
3621 chmod +x $CONFIG_STATUS
3622 rm -fr confdefs* $ac_clean_files
3623 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3624